diff --git a/apps/web-antd/src/constants/dicts/device.ts b/apps/web-antd/src/constants/dicts/device.ts index 07cf9dd..6618a91 100644 --- a/apps/web-antd/src/constants/dicts/device.ts +++ b/apps/web-antd/src/constants/dicts/device.ts @@ -21,3 +21,93 @@ export const deviceTypeOptions = [ tooltip: '能挂载子设备与平台进行通信的设备', }, ]; + +// 数据类型选项 +export const dataTypeOptions = [ + { + value: 'int', + label: 'int(整数型)', + }, + { + value: 'long', + label: 'long(长整数型)', + }, + { + value: 'float', + label: 'float(单精度浮点型)', + }, + { + value: 'double', + label: 'double(双精度浮点数)', + }, + { + value: 'string', + label: 'text(字符串)', + }, + { + value: 'boolean', + label: 'boolean(布尔型)', + }, + { + value: 'date', + label: 'date(时间型)', + }, + { + value: 'enum', + label: 'enum(枚举)', + }, + // { + // value: 'array', + // label: 'array(数组)', + // }, + // { + // value: 'object', + // label: 'object(结构体)', + // }, + // { + // value: 'file', + // label: 'file(文件)', + // }, + // { + // value: 'password', + // label: 'password(密码)', + // }, + // { + // value: 'geoPoint', + // label: 'geoPoint(地理位置)', + // } +]; + +// 表单类型选项 +export const formTypeOptions = [ + { label: '文本', value: 'input' }, + { label: '开关', value: 'switch' }, + { label: '数字', value: 'number' }, + { label: '进度条', value: 'progress' }, + { label: '选择器', value: 'select' }, + { label: '时间选择器', value: 'time' }, + // { label: '文本域', value: 'textarea' }, +]; + +export const viewTypeOptions = [ + { label: '文本', value: 'input' }, + { label: '开关', value: 'switch' }, + { label: '选择器', value: 'select' }, + { label: '进度条', value: 'progress' }, + { label: '图片', value: 'img' }, + { label: '折线图', value: 'line' }, + { label: '仪表盘', value: 'dashboard' }, +]; + +// 读写类型选项 +export const readWriteTypeOptions = [ + { label: '读', value: 'R' }, + { label: '写', value: 'W' }, + { label: '读写', value: 'RW' }, +]; + +export const timeOptions = [ + { label: 'yyyy-MM-dd HH:mm:ss', value: 'yyyy-MM-dd HH:mm:ss' }, + { label: 'yyyy-MM-dd', value: 'yyyy-MM-dd' }, + { label: 'HH:mm:ss', value: 'HH:mm:ss' }, +]; diff --git a/apps/web-antd/src/views/device/product/detail/components/BasicInfo.vue b/apps/web-antd/src/views/device/product/detail/components/BasicInfo.vue index c0d34c4..a931625 100644 --- a/apps/web-antd/src/views/device/product/detail/components/BasicInfo.vue +++ b/apps/web-antd/src/views/device/product/detail/components/BasicInfo.vue @@ -129,7 +129,7 @@ const productParams = computed(() => {{ formatTime(productInfo.updateTime) }} - + {{ productInfo.description || '暂无描述' }} diff --git a/apps/web-antd/src/views/device/product/detail/components/EventDrawer.vue b/apps/web-antd/src/views/device/product/detail/components/EventDrawer.vue new file mode 100644 index 0000000..36d65a2 --- /dev/null +++ b/apps/web-antd/src/views/device/product/detail/components/EventDrawer.vue @@ -0,0 +1,412 @@ + + +