function getcolumns(setdrawer) {
  return [
    {
      tab: '我的待办',
      key: '1',
      columns: [
        {
          title: '外协单号',
          dataIndex: 'otherUnitsOrderNo',
          key: 'otherUnitsOrderNo',
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.otherUnitsOrderNo}
              </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: '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/umOtherUnitsOrder/queryMyDealwithList',
        delete: '/repair/umFailureRepair/deleteById',
        detail: '',
      },
    },
    {
      tab: '未完成',
      key: '2',
      columns: [
        {
          title: '外协单号',
          dataIndex: 'otherUnitsOrderNo',
          key: 'otherUnitsOrderNo',
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.otherUnitsOrderNo}
              </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: 'repairUserName',
          key: 'repairUserName',
        },
        {
          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/umOtherUnitsOrder/queryList',
        delete: '/repair/umFailureRepair/deleteById',
        detail: '',
      },
    },
    {
      tab: '已完成',
      key: '3',
      columns: [
        {
          title: '外协单号',
          dataIndex: 'otherUnitsOrderNo',
          key: 'otherUnitsOrderNo',
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.otherUnitsOrderNo}
              </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: 'repairUserName',
          key: 'repairUserName',
        },
        {
          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/umOtherUnitsOrderHis/queryList',
        delete: '/repair/umFailureRepair/deleteById',
        detail: '',
      },
    },
  ];
}
export default getcolumns;
