mirror of
https://gitee.com/myxzgzs/boyue-ui-admin-vue3
synced 2025-08-08 16:32:43 +08:00
【代码评审】IoT:物模型
This commit is contained in:
parent
67fb5ecf3a
commit
dd1eb5de6d
@ -1,4 +1,4 @@
|
|||||||
import {toNumber} from 'lodash-es'
|
import { toNumber } from 'lodash-es'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -459,7 +459,7 @@ export function jsonParse(str: string) {
|
|||||||
try {
|
try {
|
||||||
return JSON.parse(str)
|
return JSON.parse(str)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// console.error(`str[${str}] 不是一个 JSON 字符串`)
|
console.log(`str[${str}] 不是一个 JSON 字符串`)
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {isEmpty} from '@/utils/is'
|
import { isEmpty } from '@/utils/is'
|
||||||
|
|
||||||
/** dataSpecs 数值型数据结构 */
|
/** dataSpecs 数值型数据结构 */
|
||||||
export interface DataSpecsNumberDataVO {
|
export interface DataSpecsNumberDataVO {
|
||||||
@ -21,7 +21,6 @@ export interface DataSpecsEnumOrBoolDataVO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 属性值的数据类型 */
|
/** 属性值的数据类型 */
|
||||||
// TODO @puhui999:这个枚举类,要不放到 dict 里? 这个全是当常量来使用的不好放 dict 里 🤣
|
|
||||||
export const DataSpecsDataType = {
|
export const DataSpecsDataType = {
|
||||||
INT: 'int',
|
INT: 'int',
|
||||||
FLOAT: 'float',
|
FLOAT: 'float',
|
||||||
@ -35,7 +34,6 @@ export const DataSpecsDataType = {
|
|||||||
} as const
|
} as const
|
||||||
|
|
||||||
/** 物体模型数据类型配置项 */
|
/** 物体模型数据类型配置项 */
|
||||||
// TODO @puhui999:搞到字典里;label 只使用()部分,就是整数型、单精度浮点型等,这种哈。这样,拼接 value(label) 就可以渲染出来,通用性更强
|
|
||||||
export const dataTypeOptions = [
|
export const dataTypeOptions = [
|
||||||
{ value: DataSpecsDataType.INT, label: '整数型' },
|
{ value: DataSpecsDataType.INT, label: '整数型' },
|
||||||
{ value: DataSpecsDataType.FLOAT, label: '单精度浮点型' },
|
{ value: DataSpecsDataType.FLOAT, label: '单精度浮点型' },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user