Skip to content

Commit dd1eb5d

Browse files
committed
【代码评审】IoT:物模型
1 parent 67fb5ec commit dd1eb5d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/utils/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {toNumber} from 'lodash-es'
1+
import { toNumber } from 'lodash-es'
22

33
/**
44
*
@@ -459,7 +459,7 @@ export function jsonParse(str: string) {
459459
try {
460460
return JSON.parse(str)
461461
} catch (e) {
462-
// console.error(`str[${str}] 不是一个 JSON 字符串`)
462+
console.log(`str[${str}] 不是一个 JSON 字符串`)
463463
return ''
464464
}
465465
}

src/views/iot/thingmodel/config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {isEmpty} from '@/utils/is'
1+
import { isEmpty } from '@/utils/is'
22

33
/** dataSpecs 数值型数据结构 */
44
export interface DataSpecsNumberDataVO {
@@ -21,7 +21,6 @@ export interface DataSpecsEnumOrBoolDataVO {
2121
}
2222

2323
/** 属性值的数据类型 */
24-
// TODO @puhui999:这个枚举类,要不放到 dict 里? 这个全是当常量来使用的不好放 dict 里 🤣
2524
export const DataSpecsDataType = {
2625
INT: 'int',
2726
FLOAT: 'float',
@@ -35,7 +34,6 @@ export const DataSpecsDataType = {
3534
} as const
3635

3736
/** 物体模型数据类型配置项 */
38-
// TODO @puhui999:搞到字典里;label 只使用()部分,就是整数型、单精度浮点型等,这种哈。这样,拼接 value(label) 就可以渲染出来,通用性更强
3937
export const dataTypeOptions = [
4038
{ value: DataSpecsDataType.INT, label: '整数型' },
4139
{ value: DataSpecsDataType.FLOAT, label: '单精度浮点型' },

0 commit comments

Comments
 (0)