From 4af1875001ddb3e2d45a70fa66961033ebe6f34e Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 29 Jun 2025 15:02:39 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90IoT=20=E7=89=A9=E8=81=94?= =?UTF-8?q?=E7=BD=91=E3=80=91=E7=AE=80=E5=8C=96=E9=83=A8=E5=88=86=20thingm?= =?UTF-8?q?odel=20=E7=BB=B4=E6=8A=A4=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iot/thingmodel/ThingModelEvent.vue | 15 +++++------ src/views/iot/thingmodel/ThingModelForm.vue | 4 +-- .../thingmodel/ThingModelInputOutputParam.vue | 11 +++----- .../iot/thingmodel/ThingModelProperty.vue | 27 +++++++++---------- .../iot/thingmodel/ThingModelService.vue | 14 +++++----- .../dataSpecs/ThingModelStructDataSpecs.vue | 6 +---- src/views/iot/utils/constants.ts | 22 +++++++-------- 7 files changed, 41 insertions(+), 58 deletions(-) diff --git a/src/views/iot/thingmodel/ThingModelEvent.vue b/src/views/iot/thingmodel/ThingModelEvent.vue index 041937e9..2704f4b5 100644 --- a/src/views/iot/thingmodel/ThingModelEvent.vue +++ b/src/views/iot/thingmodel/ThingModelEvent.vue @@ -6,15 +6,12 @@ prop="event.type" > - - - {{ IoTThingModelEventTypeEnum.INFO.label }} - - - {{ IoTThingModelEventTypeEnum.ALERT.label }} - - - {{ IoTThingModelEventTypeEnum.ERROR.label }} + + {{ eventType.label }} diff --git a/src/views/iot/thingmodel/ThingModelForm.vue b/src/views/iot/thingmodel/ThingModelForm.vue index 088391c7..d9ee1454 100644 --- a/src/views/iot/thingmodel/ThingModelForm.vue +++ b/src/views/iot/thingmodel/ThingModelForm.vue @@ -160,9 +160,8 @@ const submitForm = async () => { } } -/** 填写额外的属性 */ +/** 填写额外的属性(处理不同类型的情况) */ const fillExtraAttributes = (data: any) => { - // 处理不同类型的情况 // 属性 if (data.type === IoTThingModelTypeEnum.PROPERTY) { removeDataSpecs(data.property) @@ -191,6 +190,7 @@ const fillExtraAttributes = (data: any) => { delete data.service } } + /** 处理 dataSpecs 为空的情况 */ const removeDataSpecs = (val: any) => { if (isEmpty(val.dataSpecs)) { diff --git a/src/views/iot/thingmodel/ThingModelInputOutputParam.vue b/src/views/iot/thingmodel/ThingModelInputOutputParam.vue index 2dd6740c..04bc9509 100644 --- a/src/views/iot/thingmodel/ThingModelInputOutputParam.vue +++ b/src/views/iot/thingmodel/ThingModelInputOutputParam.vue @@ -15,7 +15,7 @@ +新增参数 - + -