From 5209318bb2c08da543abd5bfd9934b9f0bff925a Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 14 Dec 2024 22:47:17 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E3=80=91IOT:=20=E7=89=A9=E6=A8=A1=E5=9E=8B=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=E7=BB=84=E4=BB=B6=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 2 +- .../product/detail/ThingModel/config.ts | 6 ++--- .../dataSpecs/ThingModelEnumTypeDataSpecs.vue | 27 ++++++++++++++----- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 335f5270..8b4bbe0e 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -637,7 +637,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ hidden: true, activeMenu: '/iot/device' }, - component: () => import('@/views/iot/device/detail/index.vue') + component: () => import('@/views/iot/device/device/detail/index.vue') } ] } diff --git a/src/views/iot/product/product/detail/ThingModel/config.ts b/src/views/iot/product/product/detail/ThingModel/config.ts index e75fc082..6ba56515 100644 --- a/src/views/iot/product/product/detail/ThingModel/config.ts +++ b/src/views/iot/product/product/detail/ThingModel/config.ts @@ -1,6 +1,6 @@ /** dataSpecs 数值型数据结构 */ export interface DataSpecsNumberDataVO { - dataType: 'INT' | 'FLOAT' | 'DOUBLE' // 数据类型,取值为 INT、FLOAT 或 DOUBLE + dataType: 'int' | 'float' | 'double' // 数据类型,取值为 INT、FLOAT 或 DOUBLE max: string // 最大值,必须与 dataType 设置一致,且为 STRING 类型 min: string // 最小值,必须与 dataType 设置一致,且为 STRING 类型 step: string // 步长,必须与 dataType 设置一致,且为 STRING 类型 @@ -18,7 +18,7 @@ export interface DataSpecsTextDataVO { /** dataSpecs 枚举型数据结构 */ export interface DataSpecsEnumDataVO { - dataType: 'ENUM' | 'BOOL' + dataType: 'enum' | 'bool' defaultValue?: string // 默认值,可选 name: string // 枚举项的名称 value: number | undefined // 枚举值 @@ -35,4 +35,4 @@ export const DataSpecsDataType = { DATE: 'date', STRUCT: 'struct', ARRAY: 'array' -} +} as const diff --git a/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelEnumTypeDataSpecs.vue b/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelEnumTypeDataSpecs.vue index 7b977ae6..75adebdb 100644 --- a/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelEnumTypeDataSpecs.vue +++ b/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelEnumTypeDataSpecs.vue @@ -1,9 +1,9 @@