From a9a4c31c1f16966053c431621d7039b70d2bb383 Mon Sep 17 00:00:00 2001 From: fhysy <1149505133@qq.com> Date: Wed, 3 Sep 2025 15:08:23 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=E5=92=8C=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E3=80=81=E5=AF=B9=E6=8E=A5=E8=AE=BE=E5=A4=87=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E6=95=B0=E6=8D=AE=E5=92=8C=E8=AE=BE=E5=A4=87=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=E7=8A=B6=E6=80=81=E3=80=81=E4=BA=A7=E5=93=81=E3=80=81?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E9=80=82?= =?UTF-8?q?=E9=85=8D=E7=99=BD=E5=A4=A9/=E9=BB=91=E6=9A=97=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新设备详情页面布局和样式 - 优化实时数据展示和图表功能 - 统一模拟界面样式 - 调整产品详情组件样式 - 优化主题切换支持 --- apps/web-antd/loading.html | 431 ++++++++++++++++++ apps/web-antd/package.json | 1 - apps/web-antd/src/app.vue | 11 + .../src/components/MonacoEditor/index.vue | 2 + apps/web-antd/src/store/device.ts | 4 + .../device/detail/components/BasicInfo.vue | 79 ++-- .../detail/components/LogManagement.vue | 1 - .../components/running/RealtimeChart.vue | 160 +++++++ .../components/running/RealtimePanel.vue | 139 +++--- .../components/simulation/EventSimulation.vue | 26 +- .../simulation/FunctionSimulation.vue | 35 +- .../simulation/OnlineOfflineSimulation.vue | 12 +- .../simulation/PropertySimulation.vue | 30 +- .../src/views/device/device/detail/index.vue | 48 +- .../web-antd/src/views/device/product/data.ts | 6 +- .../detail/components/AccessSelector.vue | 32 +- .../product/detail/components/BasicInfo.vue | 42 +- .../detail/components/DeviceAccess.vue | 64 ++- .../product/detail/components/Metadata.vue | 11 +- .../detail/components/ProductParamDrawer.vue | 13 +- .../{ => metadata}/EnumListModal.vue | 3 +- .../components/{ => metadata}/EventDrawer.vue | 0 .../{ => metadata}/FunctionDrawer.vue | 0 .../components/{ => metadata}/ImportForm.vue | 74 +-- .../{ => metadata}/MetadataTable.vue | 48 +- .../{ => metadata}/ParameterModal.vue | 0 .../{ => metadata}/PropertyDrawer.vue | 23 +- .../{ => metadata}/PropertyGroupDrawer.vue | 43 +- .../{ => metadata}/PropertySelectionModal.vue | 3 +- .../components/{ => metadata}/TSLViewer.vue | 24 +- .../src/views/device/product/detail/index.vue | 4 +- .../src/views/operations/gateway/data.ts | 2 +- 32 files changed, 963 insertions(+), 408 deletions(-) create mode 100644 apps/web-antd/loading.html create mode 100644 apps/web-antd/src/views/device/device/detail/components/running/RealtimeChart.vue rename apps/web-antd/src/views/device/product/detail/components/{ => metadata}/EnumListModal.vue (98%) rename apps/web-antd/src/views/device/product/detail/components/{ => metadata}/EventDrawer.vue (100%) rename apps/web-antd/src/views/device/product/detail/components/{ => metadata}/FunctionDrawer.vue (100%) rename apps/web-antd/src/views/device/product/detail/components/{ => metadata}/ImportForm.vue (82%) rename apps/web-antd/src/views/device/product/detail/components/{ => metadata}/MetadataTable.vue (87%) rename apps/web-antd/src/views/device/product/detail/components/{ => metadata}/ParameterModal.vue (100%) rename apps/web-antd/src/views/device/product/detail/components/{ => metadata}/PropertyDrawer.vue (97%) rename apps/web-antd/src/views/device/product/detail/components/{ => metadata}/PropertyGroupDrawer.vue (85%) rename apps/web-antd/src/views/device/product/detail/components/{ => metadata}/PropertySelectionModal.vue (99%) rename apps/web-antd/src/views/device/product/detail/components/{ => metadata}/TSLViewer.vue (89%) diff --git a/apps/web-antd/loading.html b/apps/web-antd/loading.html new file mode 100644 index 0000000..dbbdb7c --- /dev/null +++ b/apps/web-antd/loading.html @@ -0,0 +1,431 @@ + +
+ +
+
+
+
+
+
<%= VITE_APP_TITLE %>
+
diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index c5fd098..110d9bc 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -52,7 +52,6 @@ "lodash-es": "^4.17.21", "monaco-editor": "^0.52.2", "pinia": "catalog:", - "qrcode.vue": "^3.6.0", "rxjs": "^7.8.2", "tinymce": "^7.3.0", "unplugin-vue-components": "^0.27.3", diff --git a/apps/web-antd/src/app.vue b/apps/web-antd/src/app.vue index f03f108..8be2bdb 100644 --- a/apps/web-antd/src/app.vue +++ b/apps/web-antd/src/app.vue @@ -41,3 +41,14 @@ const tokenTheme = computed(() => { + + diff --git a/apps/web-antd/src/components/MonacoEditor/index.vue b/apps/web-antd/src/components/MonacoEditor/index.vue index 6ab485e..e46df8a 100644 --- a/apps/web-antd/src/components/MonacoEditor/index.vue +++ b/apps/web-antd/src/components/MonacoEditor/index.vue @@ -93,5 +93,7 @@ defineExpose({ diff --git a/apps/web-antd/src/store/device.ts b/apps/web-antd/src/store/device.ts index 1af9fe8..7729dcc 100644 --- a/apps/web-antd/src/store/device.ts +++ b/apps/web-antd/src/store/device.ts @@ -28,6 +28,10 @@ export const useDeviceStore = defineStore('device', { this.deviceCount = count; }, + updateDeviceStatus(state: string) { + this.currentDevice.deviceState = state; + }, + async getDetail(id: string) { try { const res = await deviceInfo(id); diff --git a/apps/web-antd/src/views/device/device/detail/components/BasicInfo.vue b/apps/web-antd/src/views/device/device/detail/components/BasicInfo.vue index 9bcd216..8c6a7f0 100644 --- a/apps/web-antd/src/views/device/device/detail/components/BasicInfo.vue +++ b/apps/web-antd/src/views/device/device/detail/components/BasicInfo.vue @@ -6,10 +6,16 @@ import { computed, ref } from 'vue'; import { useVbenDrawer } from '@vben/common-ui'; import { EditOutlined, EyeOutlined } from '@ant-design/icons-vue'; -import { Button, Descriptions, DescriptionsItem, Drawer, Space } from 'ant-design-vue'; +import { + Button, + Descriptions, + DescriptionsItem, + Drawer, + Space, +} from 'ant-design-vue'; import { deviceTypeOptions, networkTypeOptions } from '#/constants/dicts'; -import TSLViewer from '#/views/device/product/detail/components/TSLViewer.vue'; +import TSLViewer from '#/views/device/product/detail/components/metadata/TSLViewer.vue'; import deviceDrawer from '../../device-drawer.vue'; @@ -53,7 +59,12 @@ const metadataObj = computed(() => {

设备信息

-