From c48501610b5e0f95dba406aff3c2bf6f61e5608b Mon Sep 17 00:00:00 2001 From: fhysy <1149505133@qq.com> Date: Thu, 11 Sep 2025 17:16:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E9=A1=B5=E6=B7=BB=E5=8A=A0=E5=8D=A1=E7=89=87=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=EF=BC=8C=E5=8A=9F=E8=83=BD=E5=92=8C=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=89=A9=E6=A8=A1=E5=9E=8B=E6=B7=BB=E5=8A=A0=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 设备功能、上下线日志添加排序字段 - 调整页面、清除无用代码 - 重构产品管理页,添加表格和卡片视图切换功能,搜索表单、分页等功能。 - 产品物模型功能和事件参数查看弹窗 - 新增了参数弹窗组件用于展示参数详情。 --- .../components/running/OnlineStatusPanel.vue | 1 + .../components/running/PropertyPanel.vue | 2 +- .../src/views/device/device/index.vue | 80 +- .../product/detail/components/Metadata.vue | 2 +- .../components/metadata/EventDrawer.vue | 2 +- .../components/metadata/FunctionDrawer.vue | 2 +- .../components/metadata/MetadataTable.vue | 49 +- .../metadata/ParameterViewModal.vue | 72 ++ .../src/views/device/product/index.vue | 686 ++++++++++++++---- 9 files changed, 728 insertions(+), 168 deletions(-) create mode 100644 apps/web-antd/src/views/device/product/detail/components/metadata/ParameterViewModal.vue diff --git a/apps/web-antd/src/views/device/device/detail/components/running/OnlineStatusPanel.vue b/apps/web-antd/src/views/device/device/detail/components/running/OnlineStatusPanel.vue index 059c799..4259a51 100644 --- a/apps/web-antd/src/views/device/device/detail/components/running/OnlineStatusPanel.vue +++ b/apps/web-antd/src/views/device/device/detail/components/running/OnlineStatusPanel.vue @@ -74,6 +74,7 @@ const loadList = async () => { productKey: props.deviceInfo.productObj.productKey, msgId: messageId.value?.trim() || undefined, isAsc: 'desc', + orderByColumn: 'createTime', pageNum: pagination.value.current, pageSize: pagination.value.pageSize, params: { diff --git a/apps/web-antd/src/views/device/device/detail/components/running/PropertyPanel.vue b/apps/web-antd/src/views/device/device/detail/components/running/PropertyPanel.vue index c1b8096..0b2910e 100644 --- a/apps/web-antd/src/views/device/device/detail/components/running/PropertyPanel.vue +++ b/apps/web-antd/src/views/device/device/detail/components/running/PropertyPanel.vue @@ -1,5 +1,5 @@ + + + + + + + {{ + dataTypeOptions.find( + (item) => item.value === record?.valueParams?.dataType, + )?.label || '-' + }} + + + + {{ record.required ? '是' : '否' }} + + + + {{ + formTypeOptions.find( + (item) => item.value === record?.valueParams?.formType, + )?.label || '-' + }} + + + + + diff --git a/apps/web-antd/src/views/device/product/index.vue b/apps/web-antd/src/views/device/product/index.vue index 0478286..be40a20 100644 --- a/apps/web-antd/src/views/device/product/index.vue +++ b/apps/web-antd/src/views/device/product/index.vue @@ -1,115 +1,134 @@ - - - + + + + + + + + + + + + + + + + {{ opt.label }} + + + + + + + {{ opt.label }} + + + + + + 查询 + 重置 + + + + + + + 产品列表 - {{ $t('pages.common.export') }} - - + {{ $t('pages.common.delete') }} - - + {{ $t('pages.common.add') }} - + + + + + + + + - - - - {{ - deviceTypeOptions.find((option) => option.value === row.deviceType) - ?.label - }} - - - - - {{ row.enabled === '1' ? '启用' : '禁用' }} - - - - - + + + - 详情 - - + + + {{ getDeviceTypeLabel(text) }} + + + + + {{ record.enabled === '1' ? '启用' : '禁用' }} + + + + + + 详情 + + + {{ $t('pages.common.edit') }} + + + + + {{ $t('pages.common.delete') }} + + + + + + + + + - {{ $t('pages.common.edit') }} - - - - {{ $t('pages.common.delete') }} - - - - - - + + + + + + + + + + {{ item.productName || '-' }} + + 产品分类:{{ item.categoryName || '-' }} + + 设备类型:{{ getDeviceTypeLabel(item.deviceType) }} + + + {{ item.enabled === '1' ? '启用' : '禁用' }} + + + + + + {{ $t('pages.common.edit') }} + + + + {{ item.enabled === '1' ? '禁用' : '启用' }} + + + + + {{ $t('pages.common.delete') }} + + + + + + + + + + + { + pagination.current = p; + pagination.pageSize = s; + fetchData(); + } + " + @show-size-change=" + (p, s) => { + pagination.current = 1; + pagination.pageSize = s; + fetchData(); + } + " + /> + + + + + +