Files
admin-vben5/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/data.ts

155 lines
2.8 KiB
TypeScript
Raw Normal View History

2025-08-05 17:26:09 +08:00
import {type FormSchemaGetter} from '#/adapter/form';
2025-07-10 17:33:46 +08:00
import type { VxeGridProps } from '#/adapter/vxe-table';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'routeName',
2025-07-11 17:07:29 +08:00
label: '巡检路线名称',
2025-07-10 17:33:46 +08:00
},
];
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
2025-07-11 17:07:29 +08:00
title: '巡检路线名称',
field: 'routeName',
2025-07-10 17:33:46 +08:00
},
{
2025-07-11 17:07:29 +08:00
title: '创建时间',
field: 'createTime',
},
{
title: '排序',
field: 'sort',
2025-07-10 17:33:46 +08:00
},
{
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: [''],
},
},
{
2025-07-11 17:07:29 +08:00
label: '巡检路线名称',
2025-07-10 17:33:46 +08:00
fieldName: 'routeName',
component: 'Input',
rules: 'required',
},
2025-07-11 17:07:29 +08:00
{
label: '排序',
fieldName: 'sort',
component: 'Input',
rules: 'required',
},
2025-08-04 17:06:09 +08:00
{
2025-08-05 17:26:09 +08:00
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: 'createTime',
},
{
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: '巡检点名称',
2025-08-04 17:06:09 +08:00
fieldName: 'pointId',
2025-08-05 17:26:09 +08:00
rules: 'required',
2025-08-04 17:06:09 +08:00
component: 'ApiSelect',
2025-08-05 17:26:09 +08:00
componentProps: {},
},
];
export const modalSchemaPointSetting: FormSchemaGetter = () => [
{
label: '主键id',
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
2025-08-04 17:06:09 +08:00
},
},
2025-07-10 17:33:46 +08:00
{
2025-08-05 17:26:09 +08:00
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',
2025-07-10 17:33:46 +08:00
},
];