import { getAllUserInfo } from './gasInspect.api'; import { BasicColumn, FormSchema } from '/@/components/Table'; export const columns: BasicColumn[] = [ { title: '序号', width: 60, align: 'center', customRender: ({ index }: { index: number }) => `${index + 1}`, }, { title: '巡检卡ID', dataIndex: 'id', key: 'id', align: 'center', }, { title: '地点', dataIndex: 'strInstallPos', key: 'strInstallPos', align: 'center', }, { title: '巡检人', children: [ { title: '早班', dataIndex: 'nameEarly', key: 'nameEarly', align: 'center', }, { title: '中班', dataIndex: 'nameNoon', key: 'nameNoon', align: 'center', }, { title: '晚班', dataIndex: 'nameNight', key: 'nameNight', align: 'center', }, ], }, { title: '是否巡检', children: [ { title: '', dataIndex: 'insType', key: 'insType', align: 'center', }, { title: '早班', dataIndex: 'morning', key: 'morning', align: 'center', }, { title: '中班', dataIndex: 'afterNoon', key: 'afterNoon', align: 'center', }, { title: '晚班', dataIndex: 'evening', key: 'eevening', align: 'center', }, ], }, { title: '操作', dataIndex: 'action', width: 250, align: 'center', slots: { customRender: 'action' }, }, ]; export const columnsTask: BasicColumn[] = [ { title: '序号', width: 60, align: 'center', customRender: ({ index }: { index: number }) => `${index + 1}`, }, { title: '所属队别', dataIndex: 'name', key: 'name', align: 'center', }, { title: '早班巡检', dataIndex: 'accountEarly', key: 'accountEarly', align: 'center', }, { title: '中班巡检', dataIndex: 'accountNoon', key: 'accountNoon', align: 'center', }, { title: '晚班巡检', dataIndex: 'accountNight', key: 'accountNight', align: 'center', }, { title: '操作', dataIndex: 'action', width: 120, align: 'center', slots: { customRender: 'action' }, }, ]; //区队管理列表列 export const columnsTeam: BasicColumn[] = [ { title: '序号', width: 60, align: 'center', customRender: ({ index }: { index: number }) => `${index + 1}`, }, { title: 'ID', dataIndex: 'id', key: 'id', align: 'center', }, { title: '区队', dataIndex: 'name', key: 'name', align: 'center', }, { title: '操作', dataIndex: 'action', width: 180, align: 'center', slots: { customRender: 'action' }, }, ]; //分页参数 export const pagination = { current: 1, // 当前页码 pageSize: 10, // 每页显示条数 total: 0, // 总条目数,后端返回 // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息 showSizeChanger: true, // 是否可改变每页显示条数 pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数 }; //区队管理分页参数 export const paginationTeam = { current: 1, // 当前页码 pageSize: 5, // 每页显示条数 total: 0, // 总条目数,后端返回 // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息 showSizeChanger: true, // 是否可改变每页显示条数 pageSizeOptions: ['5', '10', '20', '50'], // 可选的每页显示条数 }; // 任务表格 export const taskColumns: BasicColumn[] = [ { title: '序号', width: 60, align: 'center', customRender: ({ index }: { index: number }) => `${index + 1}`, }, // { // title: 'ID', // dataIndex: 'id', // key: 'id', // align: 'center', // }, { title: '任务名称', dataIndex: 'name', key: 'name', align: 'center', }, // { // title: '早班巡检人账号', // dataIndex: 'accountEarly', // key: 'accountEarly', // align: 'center', // edit: true, // editComponent: 'ApiSelect', // editComponentProps: { // api: getAllUserInfo, // labelField: 'realname', // valueField: 'id', // }, // }, // { // title: '午班巡检人账号', // dataIndex: 'accountNoon', // key: 'accountNoon', // align: 'center', // edit: true, // editComponent: 'ApiSelect', // editComponentProps: { // api: getAllUserInfo, // labelField: 'realname', // valueField: 'id', // }, // }, // { // title: '晚班巡检人账号', // dataIndex: 'accountNight', // key: 'accountNight', // align: 'center', // edit: true, // editComponent: 'ApiSelect', // editComponentProps: { // api: getAllUserInfo, // labelField: 'realname', // valueField: 'id', // }, // }, { title: '任务班次', dataIndex: 'classType_dictText', key: 'classType_dictText', align: 'center', }, { title: '总巡检数', dataIndex: 'totalCheckNum', key: 'totalCheckNum', align: 'center', }, { title: '未巡检数', dataIndex: 'missCheckNum', key: 'missCheckNum', align: 'center', }, { title: '创建人', dataIndex: 'createBy', key: 'createBy', align: 'center', }, { title: '创建日期', dataIndex: 'createTime', key: 'createTime', align: 'center', }, ]; export const taskschemas: FormSchema[] = [ { label: 'ID', field: 'id', component: 'Input', show: false, }, { label: '任务名称', field: 'name', component: 'Input', }, // { // label: '早班巡检人账号', // field: 'accountEarly', // component: 'ApiSelect', // componentProps: { // api: getAllUserInfo, // labelField: 'realname', // valueField: 'id', // }, // }, // { // label: '午班巡检人账号', // field: 'accountNoon', // component: 'ApiSelect', // componentProps: { // api: getAllUserInfo, // labelField: 'realname', // valueField: 'id', // }, // }, // { // label: '晚班巡检人账号', // field: 'accountNight', // component: 'ApiSelect', // componentProps: { // api: getAllUserInfo, // labelField: 'realname', // valueField: 'id', // }, // }, { label: '任务班次', field: 'classType', component: 'Input', }, ]; // 任务详细表格 export const taskManageColumns: BasicColumn[] = [ { title: '序号', width: 60, align: 'center', customRender: ({ index }: { index: number }) => `${index + 1}`, }, { title: '巡检地址', dataIndex: 'deviceName', key: 'deviceName', align: 'center', width: 300, }, { title: '巡检次数', dataIndex: 'checkNum', key: 'checkNum', align: 'center', }, { title: '任务名称', dataIndex: 'taskName', key: 'taskName', align: 'center', }, { title: '任务班次', dataIndex: 'classType_dictText', key: 'classType_dictText', align: 'center', }, { title: '已关联当前任务', dataIndex: 'isSelect', key: 'isSelect', align: 'center', }, { title: '已关联其它任务', dataIndex: 'isOtherSelect', key: 'isOtherSelect', align: 'center', }, ]; // 任务详细表格 export const taskDetailsColumns: BasicColumn[] = [ { title: '序号', width: 60, align: 'center', customRender: ({ index }: { index: number }) => `${index + 1}`, }, { title: '巡检地址', dataIndex: 'deviceName', key: 'deviceName', align: 'center', width: 300, }, { title: '巡检次数', dataIndex: 'checkNum', key: 'checkNum', align: 'center', }, { title: '任务名称', dataIndex: 'taskName', key: 'taskName', align: 'center', }, { title: '任务班次', dataIndex: 'classType_dictText', key: 'classType_dictText', align: 'center', }, { title: '巡检状态', dataIndex: 'checkState', key: 'checkState', align: 'center', }, ];