【代码评审】IoT:物模型的管理哈
parent
773b8dead2
commit
fe3715c40c
|
@ -51,6 +51,7 @@ export enum ProductFunctionAccessModeEnum {
|
|||
READ_ONLY = 'r' // 只读
|
||||
}
|
||||
|
||||
// TODO @puhui999:getProductThingModelPage => getThingModelPage 哈,不用带 product 前缀
|
||||
// IoT 产品物模型 API
|
||||
export const ThinkModelFunctionApi = {
|
||||
// 查询产品物模型分页
|
||||
|
|
|
@ -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<ThingModelProperty>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
>
|
||||
<el-form-item label="功能类型" prop="type">
|
||||
<el-radio-group v-model="formData.type">
|
||||
<!-- TODO @puhui999:从字典拿 -->
|
||||
<el-radio-button :value="1"> 属性</el-radio-button>
|
||||
<el-radio-button :value="2"> 服务</el-radio-button>
|
||||
<el-radio-button :value="3"> 事件</el-radio-button>
|
||||
|
@ -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<Ref<ProductVO>>(IOT_PROVIDE_KEY.PRODUCT) // 注入产品信息
|
||||
|
||||
// TODO @puhui999:变量必要的注释哈。 = = 虽然有点啰嗦,但是写下,保持统一;
|
||||
const { t } = useI18n()
|
||||
const message = useMessage()
|
||||
|
||||
|
|
|
@ -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<any>
|
||||
|
|
|
@ -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<DataSpecsEnumOrBoolDataVO[]>
|
||||
|
|
|
@ -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<DataSpecsNumberDataVO>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<!-- TODO 目录,应该是 thinkModel 哈。 -->
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
|
|
Loading…
Reference in New Issue