import {type FormSchemaGetter} from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; export const querySchema: FormSchemaGetter = () => [ { component: 'Input', fieldName: 'routeName', label: '巡检路线名称', }, ]; export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { title: '巡检路线名称', field: 'routeName', }, { title: '创建时间', field: 'createTime', }, { title: '排序', field: 'sort', }, { title: '备注', field: 'remark', }, { field: 'action', fixed: 'right', slots: { default: 'action' }, title: '操作', width: 180, }, ]; export const modalSchema: FormSchemaGetter = () => [ { label: '主键id', fieldName: 'id', component: 'Input', dependencies: { show: () => false, triggerFields: [''], }, }, { label: '巡检路线名称', fieldName: 'routeName', component: 'Input', rules: 'required', }, { label: '排序', fieldName: 'sort', component: 'Input', rules: 'required', }, { label: '备注', fieldName: 'remark', component: 'Textarea', }, ]; //!!!!!! export const querySchemaPoint: FormSchemaGetter = () => [ { component: 'ApiSelect', fieldName: 'pointId', label: '巡检点名称', componentProps: {}, }, ]; export const columnsPoint: VxeGridProps['columns'] = [ { title: '巡检点ID', field: 'pointId', }, { title: '巡检点名称', field: 'pointName', }, { field: 'action', fixed: 'right', slots: { default: 'action' }, title: '操作', width: 180, }, ]; export const modalSchemaPoint: FormSchemaGetter = () => [ { label: '主键id', fieldName: 'id', component: 'Input', dependencies: { show: () => false, triggerFields: [''], }, }, { label: '巡检点名称', fieldName: 'pointId', rules: 'required', component: 'ApiSelect', componentProps: {}, }, { label: '开始时间', fieldName: 'startTime', component: 'DatePicker', componentProps: { showTime: true, format: 'YYYY-MM-DD HH:mm:ss', placeholder: '请选择开始时间', }, rules: 'required', }, { label: '结束时间', fieldName: 'endTime', component: 'DatePicker', componentProps: { showTime: true, format: 'YYYY-MM-DD HH:mm:ss', placeholder: '请选择开始时间', }, rules: 'required', }, { label: '排序', fieldName: 'sort', component: 'Input', rules: 'required', }, ];