import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; import {renderDict} from "#/utils/render"; import {getDictOptions} from "#/utils/dict"; 1 export const querySchema: FormSchemaGetter = () => [ // { // component: 'Input', // fieldName: 'actUserId', // label: '当前巡检人', // }, { label: '签到类型', fieldName: 'signType', component: 'Select', componentProps: { options:getDictOptions('wy_xjqdfs') }, }, { component: 'Select', componentProps: { options:getDictOptions('wy_xjzt') }, fieldName: 'status', label: '巡检状态', }, ]; export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { title: '巡检计划', field: 'planId', minWidth:200 }, { title: '巡检任务', field: 'taskId', width:150 }, { title: '巡检路线', field: 'routeId', width:150 }, { title: '巡检点', field: 'pointId', width:150 }, { title: '签到类型', field: 'signType', width:150, slots: { default: ({ row }) => { return renderDict(row.signType, 'wy_xjqdfs'); }, }, }, { title: '巡检状态', field: 'status', width:150, slots: { default: ({ row }) => { return renderDict(row.inspectionState, 'wy_xjzt'); }, }, }, { title: '巡检照片', field: 'inspectionImage', width:120 }, { title: '开始时间', field: 'pointStartTime', width:150 }, { title: '结束时间', field: 'pointEndTime', width:150 }, { title: '实际巡检时间', field: 'inspectionTime', width:150 }, { title: '备注', field: 'remark', width:180 }, // { // field: 'action', // fixed: 'right', // slots: { default: 'action' }, // title: '操作', // width: 120, // }, ]; export const modalSchema: FormSchemaGetter = () => [ { label: '主键id', fieldName: 'id', component: 'Input', dependencies: { show: () => false, triggerFields: [''], }, }, { label: '巡检计划', fieldName: 'planName', component: 'Input', }, { label: '巡检开始日期', fieldName: 'startDate', component: 'Input', }, { label: '巡检结束日期', fieldName: 'endDate', component: 'Input', }, { label: '实际巡检时间', fieldName: 'actInsTime', component: 'DatePicker', componentProps: { showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, }, { label: '当前巡检人', fieldName: 'actUserId', component: 'Input', }, { label: '巡检方式', fieldName: 'taskType', component: 'Select', componentProps: { }, }, { label: '转移描述', fieldName: 'transferDesc', component: 'Textarea', }, { label: '巡检状态', fieldName: 'status', component: 'RadioGroup', componentProps: { buttonStyle: 'solid', optionType: 'button', }, }, { label: '备注', fieldName: 'remark', component: 'Input', }, ];