From 5f6d993d846364efca304f1bbf5130ebabd13cfb Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Tue, 4 Jun 2024 10:41:07 +0800 Subject: [PATCH] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=20=E4=BF=9D?= =?UTF-8?q?=E5=85=BB=E8=AE=B0=E5=BD=95=20=E4=B8=BB=E5=AD=90=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentMaintenanceRecordMain.data.ts | 383 ++++++++++++++---- .../equipmentMaintenanceRecordMain/index.vue | 30 +- 2 files changed, 315 insertions(+), 98 deletions(-) diff --git a/src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts b/src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts index 199b71234..3541eeece 100644 --- a/src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts +++ b/src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts @@ -4,138 +4,229 @@ import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const EquipmentMaintenanceRecordMainRules = reactive({ number: [required], + sources: [required], equipmentCode: [required], - planNumber: [required], - status: [required], - factoryAreaCode: [required], - concurrencyStamp: [required] + type: [required], + planStartTime: [required], + planEndTime: [required], + startTime: [required], + endTime: [required], }) export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive([ { - label: '保养编号', - field: 'number', + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '记录编号', + field: 'recordNo', sort: 'custom', - isSearch: true + isSearch: true, }, { label: '描述', field: 'describing', sort: 'custom', - isSearch: true + isSearch: true, + isSearch: false, + }, + { + label: '保养工单', + field: 'number', + sort: 'custom', + isSearch: true, + }, + { + label: '来源字典', + field: 'sources', + sort: 'custom', + isSearch: true, + isSearch: false, }, { label: '设备编号', field: 'equipmentCode', sort: 'custom', - isSearch: true + isSearch: true, }, { - label: '设备类别', - field: 'category', + label: '故障类型枚举', + field: 'faultType', sort: 'custom', - dictType: DICT_TYPE.DEVICE_TYPE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isSearch: true, - form: { - component: 'SelectV2' - } + isSearch: false, + }, { - label: '班次枚举', - field: 'classes', + label: '工装或设备字典', + field: 'type', sort: 'custom', - // dictType: DICT_TYPE.SHIFT_TYPE, - // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isSearch: true, + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', }, { - label: '保养计划工单', + label: '保养计划工单号', field: 'planNumber', sort: 'custom', - isSearch: true + isSearch: true, }, { - label: '故障类型枚举', - field: 'faultType', + label: '计划开始时间', + field: 'planStartTime', sort: 'custom', - dictType: DICT_TYPE.FAILURE_REASON, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true, + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, form: { - component: 'SelectV2' - } + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, }, { - label: '保养周期', - field: 'cycle', + label: '计划结束时间', + field: 'planEndTime', sort: 'custom', - dictType: DICT_TYPE.MAINTENANCE_CYCLE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, }, { - label: '保养次数', - field: 'times', + label: '保养开始时间', + field: 'startTime', sort: 'custom', - isSearch: true + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, }, { - label: '验证人', - field: 'verifyer2', + label: '保养结束时间', + field: 'endTime', sort: 'custom', - isSearch: true, + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, form: { - component: 'InputNumber', - value: 0 - } + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, }, { - label: '验证内容', - field: 'verifyContent2', + label: '保养班组', + field: 'classType', sort: 'custom', - isSearch: true + isSearch: false, }, { - label: '验证时间', - field: 'verifyTime2', + label: '验证人', + field: 'verifyer', sort: 'custom', - isSearch: true + isSearch: false, }, { - label: '保养人', - field: 'maintenancer', + label: '验证内容', + field: 'verifyContent', sort: 'custom', - isSearch: true, + isSearch: false, form: { - component: 'InputNumber', - value: 0 - } + component: 'Editor', + componentProps: { + valueHtml: '', + height: 200 + } + }, }, { - label: '保养人联系电话', - field: 'maintenancePhone', + label: '验证时间', + field: 'verifyTime', sort: 'custom', - isSearch: true + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, }, { - label: '结果枚举', - field: 'completeResult', + label: '保养人id', + field: 'maintenancer', sort: 'custom', - isSearch: true + isSearch: false, }, { - label: '完成时间', - field: 'completionTime2', + label: '保养人联系电话', + field: 'maintenancePhone', sort: 'custom', - isSearch: true + isSearch: false, }, { - label: '保养时间', - field: 'maintenanceTime', + label: '完成时间', + field: 'completionTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -150,58 +241,172 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive -