function getcolumns(setdrawer) {
  return [
    {
      tab: '未完成',
      key: '1',
      columns: [
        {
          title: '报修单号',
          dataIndex: 'repairNo',
          key: 'repairNo',
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.repairNo}
              </a>
            );
          },
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
          valueType: 'textarea',
        },
        {
          title: '报修人员',
          dataIndex: 'repairUserName',
          key: 'repairUserName',
        },
        {
          title: '报修时间',
          dataIndex: 'repairTime',
          key: 'repairTimeList',
          valueType: 'dateTimeRange',
        },
        {
          title: '维修单号',
          dataIndex: 'repairOrderNo',
          key: 'repairOrderNo',
        },
        {
          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/umFailureRepair/queryNoFinishList',
        delete: '/repair/umFailureRepair/deleteById',
        detail: '',
      },
    },
    {
      tab: '已完成',
      key: '2',
      columns: [
        {
          title: '报修单号',
          dataIndex: 'repairNo',
          key: 'repairNo',
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.repairNo}
              </a>
            );
          },
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
        },
        {
          title: '报修人员',
          dataIndex: 'repairUserName',
          key: 'repairUserName',
        },
        {
          title: '报修时间',
          dataIndex: 'repairTime',
          key: 'repairTimeList',
          valueType: 'dateTimeRange',
        },
        {
          title: '关单时间',
          dataIndex: 'repairCloseTime',
          key: 'repairCloseTime',
        },
        {
          title: '维修单号',
          dataIndex: 'repairOrderNo',
          key: 'repairOrderNo',
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'status',
          valueType: 'radio',
          options: [
            {
              label: '待维修',
              value: '1',
            },
            {
              label: '维修中',
              value: '2',
            },
          ],
        },
      ],
      pathconfig: {
        enableadd: true,
        enableedit: true,
        enabledelete: true,
        enabledetail: true,
        add: '',
        edit: '',
        list: '/repair/umFailureRepair/queryFinishList',
        delete: '/repair/umFailureRepair/deleteById',
        detail: '',
      },
    },
  ];
}
export default getcolumns;
