update 设备信息, 更新字段的验证规则

This commit is contained in:
g7hoo 2022-08-16 16:21:35 +08:00
parent 566c900a24
commit f17fab4749

View File

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