import { Modal } from 'antd';
// import { taskCancelTask } from '../../../services/api';
export default function() {
  return [
    {
      title: '合同名称',
      dataIndex: 'contractName',
      key: 'contractName',
    },
    {
      title: '合同类型',
      dataIndex: 'contractType',
      key: 'contractType',
    },
    {
      title: '企业档案编号',
      dataIndex: 'comFileNo',
      key: 'comFileNo',
    },
    {
      title: '合同有效期',
      dataIndex: 'departName',
      key: 'departName',
      render: (text, record) => {
        const { effectStartDate, effectEndDate } = record;
        return (
          <span>
            {`${effectStartDate}~${effectEndDate}`}
          </span>
        );
      }
    },
    {
      title: '合同状态',
      dataIndex: 'contractStatus',
      key: 'contractStatus',
      render: text => {
        let color = 'orange';
        if(text == '已终止') {
          color = 'red';
        }else if(text == '已完成') {
          color = 'green';
        }
        return <span style={{color}}>{text}</span>
      }
    }
  ];
} 