2025-07-10 17:31:58 +08:00
|
|
|
import type { FormSchemaGetter } from '#/adapter/form';
|
|
|
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
|
|
|
|
|
|
|
|
|
|
export const querySchema: FormSchemaGetter = () => [
|
2025-07-11 15:45:25 +08:00
|
|
|
|
2025-07-10 17:31:58 +08:00
|
|
|
{
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
showTime: true,
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
},
|
|
|
|
fieldName: 'actInsTime',
|
|
|
|
label: '实际巡检时间',
|
2025-07-11 15:45:25 +08:00
|
|
|
labelWidth: 120,
|
2025-07-10 17:31:58 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Input',
|
|
|
|
fieldName: 'actUserId',
|
|
|
|
label: '当前巡检人',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
},
|
|
|
|
fieldName: 'taskType',
|
|
|
|
label: '巡检方式',
|
|
|
|
},
|
2025-07-11 15:45:25 +08:00
|
|
|
|
2025-07-10 17:31:58 +08:00
|
|
|
{
|
|
|
|
component: 'RadioGroup',
|
|
|
|
componentProps: {
|
|
|
|
buttonStyle: 'solid',
|
|
|
|
optionType: 'button',
|
|
|
|
},
|
|
|
|
fieldName: 'status',
|
|
|
|
label: '巡检状态',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
|
|
|
// export const columns: () => VxeGridProps['columns'] = () => [
|
|
|
|
export const columns: VxeGridProps['columns'] = [
|
|
|
|
{ type: 'checkbox', width: 60 },
|
2025-07-11 15:45:25 +08:00
|
|
|
{
|
|
|
|
title: '序号',
|
2025-07-10 17:31:58 +08:00
|
|
|
field: 'id',
|
2025-07-11 15:45:25 +08:00
|
|
|
slots: {
|
|
|
|
default: ({ rowIndex }) => {
|
|
|
|
return (rowIndex + 1).toString();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
width:60
|
2025-07-10 17:31:58 +08:00
|
|
|
},
|
2025-07-11 15:45:25 +08:00
|
|
|
{
|
|
|
|
title: '巡检计划',
|
|
|
|
field: 'planName',
|
|
|
|
width:'auto'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '巡检开始日期',
|
|
|
|
field: 'startDate',
|
|
|
|
width:180
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '巡检结束日期',
|
|
|
|
field: 'endDate',
|
|
|
|
width:180
|
|
|
|
|
2025-07-10 17:31:58 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '实际巡检时间',
|
|
|
|
field: 'actInsTime',
|
2025-07-11 15:45:25 +08:00
|
|
|
width:180
|
2025-07-10 17:31:58 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '当前巡检人',
|
|
|
|
field: 'actUserId',
|
2025-07-11 15:45:25 +08:00
|
|
|
width:'auto'
|
|
|
|
|
2025-07-10 17:31:58 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '巡检方式',
|
|
|
|
field: 'taskType',
|
2025-07-11 15:45:25 +08:00
|
|
|
width:'auto'
|
|
|
|
|
2025-07-10 17:31:58 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '转移描述',
|
|
|
|
field: 'transferDesc',
|
2025-07-11 15:45:25 +08:00
|
|
|
width:200
|
2025-07-10 17:31:58 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '巡检状态',
|
|
|
|
field: 'status',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '备注',
|
|
|
|
field: 'remark',
|
2025-07-11 15:45:25 +08:00
|
|
|
|
2025-07-10 17:31:58 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'action',
|
|
|
|
fixed: 'right',
|
|
|
|
slots: { default: 'action' },
|
|
|
|
title: '操作',
|
|
|
|
width: 180,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const modalSchema: FormSchemaGetter = () => [
|
|
|
|
{
|
|
|
|
label: '主键id',
|
|
|
|
fieldName: 'id',
|
|
|
|
component: 'Input',
|
|
|
|
dependencies: {
|
|
|
|
show: () => false,
|
|
|
|
triggerFields: [''],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2025-07-11 15:45:25 +08:00
|
|
|
label: '巡检计划',
|
|
|
|
fieldName: 'planName',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '巡检开始日期',
|
|
|
|
fieldName: 'startDate',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '巡检结束日期',
|
|
|
|
fieldName: 'endDate',
|
2025-07-10 17:31:58 +08:00
|
|
|
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',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '创建人id',
|
|
|
|
fieldName: 'createById',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '更新人id',
|
|
|
|
fieldName: 'updateById',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '搜索值',
|
|
|
|
fieldName: 'searchValue',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
];
|