From 44a2e5f804d1e03df0960387c4112ea590a8208f Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 9 Feb 2026 10:11:43 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E9=87=87=E9=9B=86=E8=AE=BE?= =?UTF-8?q?=E5=A4=87-=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en.ts | 1 + src/locales/zh-CN.ts | 1 + src/views/iot/device/components/DeviceAttributeForm.vue | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/locales/en.ts b/src/locales/en.ts index de9490ac..e562124d 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -3503,6 +3503,7 @@ export default { validatorCodeRequired: 'Model code can not be empty', validatorNameRequired: 'Model name can not be empty', validatorProtocolRequired: 'Protocol can not be empty', + validatorDataTypeRequired: 'Data type can not be empty', exportFilename: 'AcquisitionDeviceModel.xls', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 32033b45..17fb19d7 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -3344,6 +3344,7 @@ export default { validatorCodeRequired: '模型编码不能为空', validatorNameRequired: '模型名称不能为空', validatorProtocolRequired: '通讯协议不能为空', + validatorDataTypeRequired: '数据类型不能为空', exportFilename: '采集设备模型.xls', diff --git a/src/views/iot/device/components/DeviceAttributeForm.vue b/src/views/iot/device/components/DeviceAttributeForm.vue index bfd9f82a..734957da 100644 --- a/src/views/iot/device/components/DeviceAttributeForm.vue +++ b/src/views/iot/device/components/DeviceAttributeForm.vue @@ -186,7 +186,12 @@ const formRules = reactive({ trigger: ['blur', 'change'] } ], - attributeName: [{ required: true, message: t('DataCollection.Device.attributeValidatorNameRequired'), trigger: 'blur' }], + attributeName: [ + { required: true, message: t('DataCollection.Device.attributeValidatorNameRequired'), trigger: 'blur' } + ], + dataType: [ + { required: true, message: t('DataCollection.DeviceModel.validatorDataTypeRequired'), trigger: 'change' } + ], remark: [ { validator: (_rule: any, value: string, callback: any) => {