Skip to content

Commit fe3715c

Browse files
committed
【代码评审】IoT:物模型的管理哈
1 parent 773b8de commit fe3715c

File tree

7 files changed

+10
-1
lines changed

7 files changed

+10
-1
lines changed

src/api/iot/thinkmodelfunction/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export enum ProductFunctionAccessModeEnum {
5151
READ_ONLY = 'r' // 只读
5252
}
5353

54+
// TODO @puhui999:getProductThingModelPage => getThingModelPage 哈,不用带 product 前缀
5455
// IoT 产品物模型 API
5556
export const ThinkModelFunctionApi = {
5657
// 查询产品物模型分页

src/views/iot/product/product/detail/ThingModel/ThingModelDataSpecs.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ import {
7474
} from './dataSpecs'
7575
import { ThingModelProperty } from '@/api/iot/thinkmodelfunction'
7676
77-
/** 物模型数据 */
77+
/** IoT 物模型数据 */
7878
defineOptions({ name: 'ThingModelDataSpecs' })
79+
7980
const props = defineProps<{ modelValue: any }>()
8081
const emits = defineEmits(['update:modelValue'])
8182
const property = useVModel(props, 'modelValue', emits) as Ref<ThingModelProperty>

src/views/iot/product/product/detail/ThingModel/ThingModelForm.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
>
1010
<el-form-item label="功能类型" prop="type">
1111
<el-radio-group v-model="formData.type">
12+
<!-- TODO @puhui999:从字典拿 -->
1213
<el-radio-button :value="1"> 属性</el-radio-button>
1314
<el-radio-button :value="2"> 服务</el-radio-button>
1415
<el-radio-button :value="3"> 事件</el-radio-button>
@@ -46,10 +47,12 @@ import { IOT_PROVIDE_KEY } from '@/views/iot/utils/constants'
4647
import { DataSpecsDataType } from './config'
4748
import { cloneDeep } from 'lodash-es'
4849
50+
// TODO @puhui999:这里注释下哈
4951
defineOptions({ name: 'IoTProductThingModelForm' })
5052
5153
const product = inject<Ref<ProductVO>>(IOT_PROVIDE_KEY.PRODUCT) // 注入产品信息
5254
55+
// TODO @puhui999:变量必要的注释哈。 = = 虽然有点啰嗦,但是写下,保持统一;
5356
const { t } = useI18n()
5457
const message = useMessage()
5558

src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelArrayTypeDataSpecs.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { DataSpecsDataType, dataTypeOptions } from '../config'
2626
2727
/** 数组型的 dataSpecs 配置组件 */
2828
defineOptions({ name: 'ThingModelArrayTypeDataSpecs' })
29+
2930
const props = defineProps<{ modelValue: any }>()
3031
const emits = defineEmits(['update:modelValue'])
3132
const dataSpecs = useVModel(props, 'modelValue', emits) as Ref<any>

src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelEnumTypeDataSpecs.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {
2929
3030
/** 枚举型的 dataSpecs 配置组件 */
3131
defineOptions({ name: 'ThingModelEnumTypeDataSpecs' })
32+
3233
const props = defineProps<{ modelValue: any }>()
3334
const emits = defineEmits(['update:modelValue'])
3435
const dataSpecsList = useVModel(props, 'modelValue', emits) as Ref<DataSpecsEnumOrBoolDataVO[]>

src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelNumberTypeDataSpecs.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { DataSpecsNumberDataVO } from '../config'
3434
3535
/** 数值型的 dataSpecs 配置组件 */
3636
defineOptions({ name: 'ThingModelNumberTypeDataSpecs' })
37+
3738
const props = defineProps<{ modelValue: any }>()
3839
const emits = defineEmits(['update:modelValue'])
3940
const dataSpecs = useVModel(props, 'modelValue', emits) as Ref<DataSpecsNumberDataVO>

src/views/iot/product/product/detail/ThingModel/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- TODO 目录,应该是 thinkModel 哈。 -->
12
<template>
23
<ContentWrap>
34
<!-- 搜索工作栏 -->

0 commit comments

Comments
 (0)