From fe3715c40cda8a18482749f81058393d735f9b1d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 16 Dec 2024 20:52:20 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E3=80=91IoT=EF=BC=9A=E7=89=A9=E6=A8=A1=E5=9E=8B=E7=9A=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=93=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/thinkmodelfunction/index.ts | 1 + .../product/product/detail/ThingModel/ThingModelDataSpecs.vue | 3 ++- .../iot/product/product/detail/ThingModel/ThingModelForm.vue | 3 +++ .../ThingModel/dataSpecs/ThingModelArrayTypeDataSpecs.vue | 1 + .../ThingModel/dataSpecs/ThingModelEnumTypeDataSpecs.vue | 1 + .../ThingModel/dataSpecs/ThingModelNumberTypeDataSpecs.vue | 1 + src/views/iot/product/product/detail/ThingModel/index.vue | 1 + 7 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/api/iot/thinkmodelfunction/index.ts b/src/api/iot/thinkmodelfunction/index.ts index 9c01cfa91..0117e7aac 100644 --- a/src/api/iot/thinkmodelfunction/index.ts +++ b/src/api/iot/thinkmodelfunction/index.ts @@ -51,6 +51,7 @@ export enum ProductFunctionAccessModeEnum { READ_ONLY = 'r' // 只读 } +// TODO @puhui999:getProductThingModelPage => getThingModelPage 哈,不用带 product 前缀 // IoT 产品物模型 API export const ThinkModelFunctionApi = { // 查询产品物模型分页 diff --git a/src/views/iot/product/product/detail/ThingModel/ThingModelDataSpecs.vue b/src/views/iot/product/product/detail/ThingModel/ThingModelDataSpecs.vue index 388191059..ab7d91e8a 100644 --- a/src/views/iot/product/product/detail/ThingModel/ThingModelDataSpecs.vue +++ b/src/views/iot/product/product/detail/ThingModel/ThingModelDataSpecs.vue @@ -74,8 +74,9 @@ import { } from './dataSpecs' import { ThingModelProperty } from '@/api/iot/thinkmodelfunction' -/** 物模型数据 */ +/** IoT 物模型数据 */ defineOptions({ name: 'ThingModelDataSpecs' }) + const props = defineProps<{ modelValue: any }>() const emits = defineEmits(['update:modelValue']) const property = useVModel(props, 'modelValue', emits) as Ref diff --git a/src/views/iot/product/product/detail/ThingModel/ThingModelForm.vue b/src/views/iot/product/product/detail/ThingModel/ThingModelForm.vue index f3d55d495..582000728 100644 --- a/src/views/iot/product/product/detail/ThingModel/ThingModelForm.vue +++ b/src/views/iot/product/product/detail/ThingModel/ThingModelForm.vue @@ -9,6 +9,7 @@ > + 属性 服务 事件 @@ -46,10 +47,12 @@ import { IOT_PROVIDE_KEY } from '@/views/iot/utils/constants' import { DataSpecsDataType } from './config' import { cloneDeep } from 'lodash-es' +// TODO @puhui999:这里注释下哈 defineOptions({ name: 'IoTProductThingModelForm' }) const product = inject>(IOT_PROVIDE_KEY.PRODUCT) // 注入产品信息 +// TODO @puhui999:变量必要的注释哈。 = = 虽然有点啰嗦,但是写下,保持统一; const { t } = useI18n() const message = useMessage() diff --git a/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelArrayTypeDataSpecs.vue b/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelArrayTypeDataSpecs.vue index 3b309d68e..c48732ef4 100644 --- a/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelArrayTypeDataSpecs.vue +++ b/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelArrayTypeDataSpecs.vue @@ -26,6 +26,7 @@ import { DataSpecsDataType, dataTypeOptions } from '../config' /** 数组型的 dataSpecs 配置组件 */ defineOptions({ name: 'ThingModelArrayTypeDataSpecs' }) + const props = defineProps<{ modelValue: any }>() const emits = defineEmits(['update:modelValue']) const dataSpecs = useVModel(props, 'modelValue', emits) as Ref 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 0c67358a3..af28e11ed 100644 --- a/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelEnumTypeDataSpecs.vue +++ b/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelEnumTypeDataSpecs.vue @@ -29,6 +29,7 @@ import { /** 枚举型的 dataSpecs 配置组件 */ defineOptions({ name: 'ThingModelEnumTypeDataSpecs' }) + const props = defineProps<{ modelValue: any }>() const emits = defineEmits(['update:modelValue']) const dataSpecsList = useVModel(props, 'modelValue', emits) as Ref diff --git a/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelNumberTypeDataSpecs.vue b/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelNumberTypeDataSpecs.vue index 3920a0f55..6dfff8ad7 100644 --- a/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelNumberTypeDataSpecs.vue +++ b/src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelNumberTypeDataSpecs.vue @@ -34,6 +34,7 @@ import { DataSpecsNumberDataVO } from '../config' /** 数值型的 dataSpecs 配置组件 */ defineOptions({ name: 'ThingModelNumberTypeDataSpecs' }) + const props = defineProps<{ modelValue: any }>() const emits = defineEmits(['update:modelValue']) const dataSpecs = useVModel(props, 'modelValue', emits) as Ref diff --git a/src/views/iot/product/product/detail/ThingModel/index.vue b/src/views/iot/product/product/detail/ThingModel/index.vue index 41cbb39d5..38bcd8fda 100644 --- a/src/views/iot/product/product/detail/ThingModel/index.vue +++ b/src/views/iot/product/product/detail/ThingModel/index.vue @@ -1,3 +1,4 @@ +