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 3ad7b0990d651fc9d2fd9a1e1e722c76a5d0b665..8d41d1b74cffb26444a3418278d487eedffd58b5 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/api/iot/rule/scene/index.ts b/apps/web-antd/src/api/iot/rule/scene/index.ts index 5fc3224e19b00ea87c36046665f1ca902df092dc..59c8255a7869b827da9c3b1b3d1990c42c2c826f 100644 --- a/apps/web-antd/src/api/iot/rule/scene/index.ts +++ b/apps/web-antd/src/api/iot/rule/scene/index.ts @@ -101,6 +101,7 @@ export interface Action { identifier?: string; value?: any; alertConfigId?: number; + params?: string; } /** 查询场景联动规则分页 */ diff --git a/apps/web-antd/src/router/routes/modules/iot.ts b/apps/web-antd/src/router/routes/modules/iot.ts index f43a547b06e647acc26ae2faf393374d06ee6a3b..c90a5978f64cea1df6b3749ec561d1cd8e065365 100644 --- a/apps/web-antd/src/router/routes/modules/iot.ts +++ b/apps/web-antd/src/router/routes/modules/iot.ts @@ -29,6 +29,15 @@ const routes: RouteRecordRaw[] = [ }, 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'), + }, ], }, ]; 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 09ca905c7734db069aaf3a790926c407627b3fac..379867edb5e7079a6035f89d507699c007029617 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 10ebb12f3907ba4895afeba982b5a65b414e2fc0..70b13b26770431091b5d45cb76fe5349c60e9c91 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/alert/record/index.vue b/apps/web-antd/src/views/iot/alert/record/index.vue index 560aae39a33bc703ca84fc5dc183d2581cc2178f..64ba6cfacd9e7659d6b9f32abc2e0c0a76c1404c 100644 --- a/apps/web-antd/src/views/iot/alert/record/index.vue +++ b/apps/web-antd/src/views/iot/alert/record/index.vue @@ -101,7 +101,7 @@ async function handleProcess(row: AlertRecord) { try { await processAlertRecord(row.id as number, processRemark); message.success('处理成功'); - onRefresh(); + handleRefresh(); } catch (error) { console.error('处理失败:', error); throw error; 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 86996ceae58a16e3670e8336c9f416298ac2e4fd..a2fef45e8d32432cc6283b22e621de241c7af714 100644 --- a/apps/web-antd/src/views/iot/device/device/data.ts +++ b/apps/web-antd/src/views/iot/device/device/data.ts @@ -5,6 +5,7 @@ import { DICT_TYPE } from '@vben/constants'; import { getDictOptions } from '@vben/hooks'; import { z } from '#/adapter/form'; +import { getSimpleDeviceList } from '#/api/iot/device/device'; import { getSimpleDeviceGroupList } from '#/api/iot/device/group'; import { DeviceTypeEnum, @@ -27,7 +28,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '产品', component: 'ApiSelect', componentProps: { - api: getSimpleProductList, + api: () => getSimpleProductList(), labelField: 'name', valueField: 'id', placeholder: '请选择产品', @@ -55,12 +56,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '网关设备', component: 'ApiSelect', componentProps: { - api: async () => { - const { getSimpleDeviceList } = await import( - '#/api/iot/device/device' - ); - return getSimpleDeviceList(DeviceTypeEnum.GATEWAY); - }, + api: () => getSimpleDeviceList(DeviceTypeEnum.GATEWAY), labelField: 'nickname', valueField: 'id', placeholder: '子设备可选择父设备', @@ -93,7 +89,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '设备分组', component: 'ApiSelect', componentProps: { - api: getSimpleDeviceGroupList, + api: () => getSimpleDeviceGroupList(), labelField: 'name', valueField: 'id', mode: 'multiple', @@ -160,7 +156,7 @@ export function useGroupFormSchema(): VbenFormSchema[] { label: '设备分组', component: 'ApiSelect', componentProps: { - api: getSimpleDeviceGroupList, + api: () => getSimpleDeviceGroupList(), labelField: 'name', valueField: 'id', mode: 'multiple', @@ -203,7 +199,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '产品', component: 'ApiSelect', componentProps: { - api: getSimpleProductList, + api: () => getSimpleProductList(), labelField: 'name', valueField: 'id', placeholder: '请选择产品', @@ -253,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 06e34ac5ed5d7c7adf43123838780550c8dc0b2b..f83a7c14a9e758fa89e2163b2f471b196575a6fe 100644 --- a/apps/web-antd/src/views/iot/device/device/index.vue +++ b/apps/web-antd/src/views/iot/device/device/index.vue @@ -32,7 +32,6 @@ import { getSimpleProductList } from '#/api/iot/product/product'; import { $t } from '#/locales'; import { useGridColumns } from './data'; -// @ts-ignore import DeviceCardView from './modules/DeviceCardView.vue'; import DeviceForm from './modules/DeviceForm.vue'; import DeviceGroupForm from './modules/DeviceGroupForm.vue'; diff --git a/apps/web-antd/src/views/iot/device/device/modules/DeviceForm.vue b/apps/web-antd/src/views/iot/device/device/modules/DeviceForm.vue index 32875e43fb556b724e5c024d44ee2c542e26f732..39fe16a999d76a4c944c2f5bb4698f0f4491ea31 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/DeviceForm.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/DeviceForm.vue @@ -1,15 +1,13 @@