From b86957758aac4ff78f3a61e4ebe086f8a8a0a332 Mon Sep 17 00:00:00 2001 From: fhysy <1149505133@qq.com> Date: Wed, 13 Aug 2025 14:04:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=E6=96=B9=E5=BC=8F=E9=80=89=E6=8B=A9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 AccessSelector组件用于选择接入方式 - 实现设备接入方式的查询和展示 - 增加接入方式选择和更换功能 - 优化产品详情页面布局 --- .../src/api/operations/gateway/index.ts | 17 +- .../detail/components/AccessSelector.vue | 460 +++++++++++++++ .../detail/components/DeviceAccess.vue | 543 ++++++++++++++++++ .../src/views/device/product/detail/index.vue | 2 - 4 files changed, 1012 insertions(+), 10 deletions(-) create mode 100644 apps/web-antd/src/views/device/product/detail/components/AccessSelector.vue create mode 100644 apps/web-antd/src/views/device/product/detail/components/DeviceAccess.vue diff --git a/apps/web-antd/src/api/operations/gateway/index.ts b/apps/web-antd/src/api/operations/gateway/index.ts index 3e66dce..3c7b7e7 100644 --- a/apps/web-antd/src/api/operations/gateway/index.ts +++ b/apps/web-antd/src/api/operations/gateway/index.ts @@ -1,18 +1,19 @@ -import type { GatewayVO, GatewayForm, GatewayQuery } from './model'; +import type { GatewayForm, GatewayQuery, GatewayVO } from './model'; -import type { ID, IDS } from '#/api/common'; -import type { PageResult } from '#/api/common'; +import type { ID, IDS, PageResult } from '#/api/common'; import { commonExport } from '#/api/helper'; import { requestClient } from '#/api/request'; /** -* 查询设备接入网关列表 -* @param params -* @returns 设备接入网关列表 -*/ + * 查询设备接入网关列表 + * @param params + * @returns 设备接入网关列表 + */ export function gatewayList(params?: GatewayQuery) { - return requestClient.get>('/operations/gateway/list', { params }); + return requestClient.get>('/operations/gateway/list', { + params, + }); } /** diff --git a/apps/web-antd/src/views/device/product/detail/components/AccessSelector.vue b/apps/web-antd/src/views/device/product/detail/components/AccessSelector.vue new file mode 100644 index 0000000..7d7d831 --- /dev/null +++ b/apps/web-antd/src/views/device/product/detail/components/AccessSelector.vue @@ -0,0 +1,460 @@ + + + + + diff --git a/apps/web-antd/src/views/device/product/detail/components/DeviceAccess.vue b/apps/web-antd/src/views/device/product/detail/components/DeviceAccess.vue new file mode 100644 index 0000000..2fc741f --- /dev/null +++ b/apps/web-antd/src/views/device/product/detail/components/DeviceAccess.vue @@ -0,0 +1,543 @@ + + + + + diff --git a/apps/web-antd/src/views/device/product/detail/index.vue b/apps/web-antd/src/views/device/product/detail/index.vue index 54ec2e7..e8899c6 100644 --- a/apps/web-antd/src/views/device/product/detail/index.vue +++ b/apps/web-antd/src/views/device/product/detail/index.vue @@ -2,12 +2,10 @@ import { computed, onMounted, onUnmounted } from 'vue'; import { useRoute, useRouter } from 'vue-router'; -import { useAccess } from '@vben/access'; import { Page } from '@vben/common-ui'; import { ArrowLeftOutlined } from '@ant-design/icons-vue'; import { message, Switch, TabPane, Tabs } from 'ant-design-vue'; -import dayjs from 'dayjs'; import { productUpdate, productUpdateStatus } from '#/api/device/product'; import { useProductStore } from '#/store/product';