function getcolumns(setdrawer) {
  return [
    {
      tab: '我的待办',
      key: '1',
      columns: [
        {
          title: '追踪单号',
          dataIndex: 'taskOrderNo',
          key: 'taskOrderNo',
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.taskOrderNo}
              </a>
            );
          },
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
          valueType: 'textarea',
        },
        {
          title: '创建时间',
          dataIndex: 'createTime',
          key: 'createTimeList',
          valueType: 'dateTimeRange',
        },
        {
          title: '创建人员',
          dataIndex: 'createUserName',
          key: 'createUserName',
        },
        {
          title: '下次追踪日期',
          dataIndex: 'nextTrackDate',
          key: 'nextTrackDateList',
          valueType: 'dateTimeRange',
        },
        {
          title: '最新追踪人员',
          dataIndex: 'newRepairUserName',
          key: 'newRepairUserName',
        },
        {
          title: '来源单号',
          dataIndex: 'dataSourcesNo',
          key: 'dataSourcesNo',
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'status',
          valueType: 'radio',
          options: [
            {
              label: '待维修',
              value: '1',
            },
            {
              label: '维修中',
              value: '2',
            },
          ],
        },
      ],
      pathconfig: {
        enableadd: true,
        enableedit: false,
        enabledelete: true,
        enabledetail: false,
        add: '',
        edit: '',
        list: '/repair/umTrackOrder/queryMyDealwithList',
        delete: '/repair/umFailureRepair/deleteById',
        detail: '',
      },
    },
    {
      tab: '未完成',
      key: '2',
      columns: [
        {
          title: '追踪单号',
          dataIndex: 'taskOrderNo',
          key: 'taskOrderNo',
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.taskOrderNo}
              </a>
            );
          },
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
          valueType: 'textarea',
        },
        {
          title: '创建时间',
          dataIndex: 'createTime',
          key: 'createTimeList',
          valueType: 'dateTimeRange',
        },
        {
          title: '创建人员',
          dataIndex: 'createUserName',
          key: 'createUserName',
        },
        {
          title: '最新追踪人员',
          dataIndex: 'newRepairUserName',
          key: 'newRepairUserName',
        },
        {
          title: '来源单号',
          dataIndex: 'repairNo',
          key: 'repairNo',
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'status',
          valueType: 'radio',
          options: [
            {
              label: '待维修',
              value: '1',
            },
            {
              label: '维修中',
              value: '2',
            },
          ],
        },
      ],
      pathconfig: {
        enableadd: true,
        enableedit: false,
        enabledelete: true,
        enabledetail: false,
        add: '',
        edit: '',
        list: '/repair/umTrackOrder/queryList',
        delete: '/repair/umFailureRepair/deleteById',
        detail: '',
      },
    },
    {
      tab: '已完成',
      key: '3',
      columns: [
        {
          title: '追踪单号',
          dataIndex: 'taskOrderNo',
          key: 'taskOrderNo',
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.taskOrderNo}
              </a>
            );
          },
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
          valueType: 'textarea',
        },
        {
          title: '创建时间',
          dataIndex: 'createTime',
          key: 'createTimeList',
          valueType: 'dateTimeRange',
        },
        {
          title: '创建人员',
          dataIndex: 'createUserName',
          key: 'createUserName',
        },
        {
          title: '最新追踪人员',
          dataIndex: 'newRepairUserName',
          key: 'newRepairUserName',
        },
        {
          title: '来源单号',
          dataIndex: 'repairNo',
          key: 'repairNo',
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'status',
          valueType: 'radio',
          options: [
            {
              label: '待维修',
              value: '1',
            },
            {
              label: '维修中',
              value: '2',
            },
          ],
        },
      ],
      pathconfig: {
        enableadd: true,
        enableedit: false,
        enabledelete: true,
        enabledetail: false,
        add: '',
        edit: '',
        list: '/repair/umTrackOrderHis/queryList',
        delete: '/repair/umFailureRepair/deleteById',
        detail: '',
      },
    },
  ];
}
export default getcolumns;
