diff --git a/src/views/modules/monitoring/equipment.vue b/src/views/modules/monitoring/equipment.vue index cdbb5ee..af0ea2a 100644 --- a/src/views/modules/monitoring/equipment.vue +++ b/src/views/modules/monitoring/equipment.vue @@ -60,7 +60,7 @@ const addOrUpdateConfigs = { type: 'dialog', infoUrl: '/monitoring/equipment', fields: [ - { name: 'name', label: '设备名称' }, + { name: 'name', label: '设备名称', required: true }, { name: 'code', label: '设备编码' }, { name: 'enName', label: '英文名称' }, { name: 'abbr', label: '缩写' }, @@ -68,8 +68,8 @@ const addOrUpdateConfigs = { { name: 'groupId', label: '设备分组', required: true, type: 'select', options: [] }, { name: 'productionTime', label: '生产日期' }, { name: 'enterTime', label: '进厂日期' }, - { name: 'tvalue', label: '设备TT值', required: true }, - { name: 'processingTime', label: '单件产品加工时间' }, + { name: 'tvalue', label: '设备TT值', required: true, rules: [{ type: 'number', message: '请输入正确的浮点值', trigger: 'blur', transform: val => Number(val) }] }, + { name: 'processingTime', label: '单件产品加工时间(秒)', rules: [{ type: 'number', message: '请输入正确的数值', trigger: 'blur', transform: val => Number(val) }] }, { name: 'manufacturer', label: '制造商' }, { name: 'spec', label: '设备规格' }, {