From 7ea4f836a4dbe7134d378d11ccf9bdd9b9f77d6b Mon Sep 17 00:00:00 2001 From: Administrator <425053404@qq.com> Date: Wed, 22 Oct 2025 18:22:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=A9=E8=81=94?= =?UTF-8?q?=E7=BD=91OTA=E5=8D=87=E7=BA=A7=E9=A1=B5=E9=9D=A2=E5=92=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=B8=8D=E5=8F=AF=E7=94=A8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/iot/ota/task/record/index.ts | 2 +- .../web-antd/src/router/routes/modules/iot.ts | 16 ++++++--- .../src/views/iot/alert/config/data.ts | 4 +-- .../src/views/iot/alert/record/data.ts | 6 ++-- .../src/views/iot/device/device/data.ts | 10 +++--- .../src/views/iot/device/device/index.vue | 4 +++ .../device/modules/DeviceImportForm.vue | 5 ++- .../src/views/iot/device/group/data.ts | 2 +- apps/web-antd/src/views/iot/ota/data.ts | 4 +-- .../src/views/iot/ota/firmware/data.ts | 4 +-- .../src/views/iot/ota/firmware/index.vue | 31 ++++++++-------- .../views/iot/ota/modules/detail/index.vue | 36 +++++++++---------- .../src/views/iot/product/category/data.ts | 2 +- .../src/views/iot/product/product/data.ts | 4 +-- .../src/views/iot/product/product/index.vue | 4 +++ apps/web-antd/src/views/iot/rule/data/data.ts | 2 +- 16 files changed, 74 insertions(+), 62 deletions(-) diff --git a/apps/web-antd/src/api/iot/ota/task/record/index.ts b/apps/web-antd/src/api/iot/ota/task/record/index.ts index 3ad7b0990..8d41d1b74 100644 --- a/apps/web-antd/src/api/iot/ota/task/record/index.ts +++ b/apps/web-antd/src/api/iot/ota/task/record/index.ts @@ -95,7 +95,7 @@ export function getOtaTaskRecordStatusStatistics( taskId?: number, ) { return requestClient.get>( - '/iot/ota/task/record/status-statistics', + '/iot/ota/task/record/get-status-statistics', { params: { firmwareId, taskId } }, ); } diff --git a/apps/web-antd/src/router/routes/modules/iot.ts b/apps/web-antd/src/router/routes/modules/iot.ts index 54c0b27f8..c90a5978f 100644 --- a/apps/web-antd/src/router/routes/modules/iot.ts +++ b/apps/web-antd/src/router/routes/modules/iot.ts @@ -18,8 +18,7 @@ const routes: RouteRecordRaw[] = [ title: '产品详情', activePath: '/iot/device/product', }, - component: () => - import('#/views/iot/product/product/modules/detail/index.vue'), + component: () => import('#/views/iot/product/product/modules/detail/index.vue'), }, { path: 'device/detail/:id', @@ -28,11 +27,20 @@ const routes: RouteRecordRaw[] = [ title: '设备详情', activePath: '/iot/device/device', }, - component: () => - import('#/views/iot/device/device/modules/detail/index.vue'), + component: () => import('#/views/iot/device/device/modules/detail/index.vue'), + }, + { + path: 'ota/firmware/detail/:id', + name: 'IoTOtaFirmwareDetail', + meta: { + title: '固件详情', + activePath: '/iot/ota', + }, + component: () => import('#/views/iot/ota/modules/firmware-detail/index.vue'), }, ], }, ]; export default routes; + diff --git a/apps/web-antd/src/views/iot/alert/config/data.ts b/apps/web-antd/src/views/iot/alert/config/data.ts index 09ca905c7..379867edb 100644 --- a/apps/web-antd/src/views/iot/alert/config/data.ts +++ b/apps/web-antd/src/views/iot/alert/config/data.ts @@ -63,7 +63,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '关联场景联动规则', component: 'ApiSelect', componentProps: { - api: getSimpleRuleSceneList, + api: () => getSimpleRuleSceneList(), labelField: 'name', valueField: 'id', mode: 'multiple', @@ -76,7 +76,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '接收的用户', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', mode: 'multiple', diff --git a/apps/web-antd/src/views/iot/alert/record/data.ts b/apps/web-antd/src/views/iot/alert/record/data.ts index 10ebb12f3..70b13b267 100644 --- a/apps/web-antd/src/views/iot/alert/record/data.ts +++ b/apps/web-antd/src/views/iot/alert/record/data.ts @@ -17,7 +17,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '告警配置', component: 'ApiSelect', componentProps: { - api: getSimpleAlertConfigList, + api: () => getSimpleAlertConfigList(), labelField: 'name', valueField: 'id', placeholder: '请选择告警配置', @@ -40,7 +40,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '产品', component: 'ApiSelect', componentProps: { - api: getSimpleProductList, + api: () => getSimpleProductList(), labelField: 'name', valueField: 'id', placeholder: '请选择产品', @@ -53,7 +53,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '设备', component: 'ApiSelect', componentProps: { - api: getSimpleDeviceList, + api: () => getSimpleDeviceList(), labelField: 'deviceName', valueField: 'id', placeholder: '请选择设备', diff --git a/apps/web-antd/src/views/iot/device/device/data.ts b/apps/web-antd/src/views/iot/device/device/data.ts index 424f0ef92..a2fef45e8 100644 --- a/apps/web-antd/src/views/iot/device/device/data.ts +++ b/apps/web-antd/src/views/iot/device/device/data.ts @@ -28,7 +28,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '产品', component: 'ApiSelect', componentProps: { - api: getSimpleProductList, + api: () => getSimpleProductList(), labelField: 'name', valueField: 'id', placeholder: '请选择产品', @@ -89,7 +89,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '设备分组', component: 'ApiSelect', componentProps: { - api: getSimpleDeviceGroupList, + api: () => getSimpleDeviceGroupList(), labelField: 'name', valueField: 'id', mode: 'multiple', @@ -156,7 +156,7 @@ export function useGroupFormSchema(): VbenFormSchema[] { label: '设备分组', component: 'ApiSelect', componentProps: { - api: getSimpleDeviceGroupList, + api: () => getSimpleDeviceGroupList(), labelField: 'name', valueField: 'id', mode: 'multiple', @@ -199,7 +199,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '产品', component: 'ApiSelect', componentProps: { - api: getSimpleProductList, + api: () => getSimpleProductList(), labelField: 'name', valueField: 'id', placeholder: '请选择产品', @@ -249,7 +249,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '设备分组', component: 'ApiSelect', componentProps: { - api: getSimpleDeviceGroupList, + api: () => getSimpleDeviceGroupList(), labelField: 'name', valueField: 'id', placeholder: '请选择设备分组', diff --git a/apps/web-antd/src/views/iot/device/device/index.vue b/apps/web-antd/src/views/iot/device/device/index.vue index 4bcaf6d7a..f83a7c14a 100644 --- a/apps/web-antd/src/views/iot/device/device/index.vue +++ b/apps/web-antd/src/views/iot/device/device/index.vue @@ -481,6 +481,10 @@ onMounted(async () => {