function getcolumns(setdrawer) {
  return [
    {
      tab: '维修工单',
      key: '1',
      columns: [
        {
          title: '维修单号',
          dataIndex: 'repairOrderNo',
          key: 'repairOrderNo',
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail_wxgd',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.repairOrderNo}
              </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: 'repairNo',
          key: 'repairNo',
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'statusName',
        },
      ],
      pathconfig: {
        enableadd: false,
        enableedit: false,
        enabledelete: false,
        enabledetail: false,
        add: '',
        edit: '',
        list: '/repair/umRepairOrder/queryRepairOrderList',
        delete: '',
        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_zzgd',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.taskOrderNo}
              </a>
            );
          },
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
        },
        {
          title: '创建时间',
          dataIndex: 'createTime',
          key: 'createTime',
        },
        {
          title: '创建人员',
          dataIndex: 'createUserName',
          key: 'createUserName',
        },
        {
          title: '来源单号',
          dataIndex: 'dataSourcesNo',
          key: 'dataSourcesNo',
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'statusName',
        },
      ],
      pathconfig: {
        enableadd: false,
        enableedit: false,
        enabledelete: false,
        enabledetail: false,
        add: '',
        edit: '',
        list: '/repair/umTrackOrder/queryTrackOrderList',
        delete: '',
        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_wgd',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.otherUnitsOrderNo}
              </a>
            );
          },
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
        },
        {
          title: '创建时间',
          dataIndex: 'createTime',
          key: 'createTimeList',
          valueType: 'dateTimeRange',
        },
        {
          title: '创建人员',
          dataIndex: 'createUserName',
          key: 'createUserName',
        },
        {
          title: '来源单号',
          dataIndex: 'dataSourcesNo',
          key: 'dataSourcesNo',
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'statusName',
        },
      ],
      pathconfig: {
        enableadd: true,
        enableedit: true,
        enabledelete: true,
        enabledetail: true,
        add: '',
        edit: '',
        list: '/repair/umOtherUnitsOrder/queryOtherUnitsOrderList',
        delete: '',
        detail: '',
      },
    },
  ];
}
export default getcolumns;
