1、巡检管理
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
2025-07-10 17:33:46 +08:00
parent af0cfc3804
commit 1d9096e594
10 changed files with 1215 additions and 0 deletions

View File

@@ -0,0 +1,220 @@
import type {FormSchemaGetter} from '#/adapter/form';
import type {VxeGridProps} from '#/adapter/vxe-table';
import {getDictOptions} from "#/utils/dict";
import {renderDict} from "#/utils/render";
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'planName',
label: '计划名称',
},
{
component: 'Select',
componentProps: {
options: getDictOptions('wy_xjzq'),
},
fieldName: 'inspectionPlanPeriod',
label: '巡检周期',
},
{
component: 'Select',
componentProps: {
options: getDictOptions('wy_xjqdfs'),
},
fieldName: 'signType',
label: '签到方式',
},
];
export const columns: VxeGridProps['columns'] = [
{type: 'checkbox', width: 60},
{
title: '主键id',
field: 'id',
},
{
title: '巡检计划名称',
field: 'planName',
},
{
title: '巡检路线',
field: 'inspectionRouteId',
},
{
title: '巡检周期',
field: 'inspectionPlanPeriod',
slots: {
default: ({ row }) => {
return renderDict(row.inspectionPlanPeriod, 'wy_xjzq');
},
},
},
{
title: '任务提前分组',
field: 'beforeTime',
},
{
title: '开始日期',
field: 'startDate',
},
{
title: '结束日期',
field: 'endDate',
},
{
title: '开始时间',
field: 'startTime',
},
{
title: '结束时间',
field: 'endTime',
},
{
title: '签到方式',
field: 'signType',
slots: {
default: ({ row }) => {
return renderDict(row.signType, 'wy_xjqdfs');
},
},
},
{
title: '是否允许补检',
field: 'canReexamine',
slots: {
default: ({ row }) => {
return renderDict(row.canReexamine, 'wy_sf');
},
},
},
{
title: '选择员工',
field: 'userId',
},
{
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: 'planName',
component: 'Input',
rules: 'required',
},
{
label: '巡检路线',
fieldName: 'inspectionRouteId',
component: 'Input',
rules: 'required',
},
{
label: '巡检周期',
fieldName: 'inspectionPlanPeriod',
component: 'Input',
rules: 'required',
componentProps: {
options: getDictOptions('wy_xjzq'),
},
},
{
label: '任务提前分组',
fieldName: 'beforeTime',
component: 'Input',
rules: 'required',
},
{
label: '开始日期',
fieldName: 'startDate',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules: 'required',
},
{
label: '结束日期',
fieldName: 'endDate',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules: 'required',
},
{
label: '开始时间',
fieldName: 'startTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules: 'required',
},
{
label: '结束时间',
fieldName: 'endTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules: 'required',
},
{
label: '签到方式',
fieldName: 'signType',
component: 'Select',
componentProps: {
options: getDictOptions('wy_xjqdfs'),
},
rules: 'selectRequired',
},
{
label: '允许补检',
fieldName: 'canReexamine',
component: 'Select',
componentProps: {
options: getDictOptions('wy_sf'),
},
rules: 'selectRequired',
},
{
label: '选择员工',
fieldName: 'userId',
component: 'Input',
rules: 'required',
},
{
label: '备注',
fieldName: 'remark',
component: 'Input',
},
];