fix(aiot): 边缘设备API切换到WVP直调,ROI下拉框改为动态加载
- edge/index.ts: requestClient → wvpRequestClient,路径改为 /api/ai/device/* - roi/index.vue: 移除硬编码 edge-001 选项,从 WVP 动态加载设备列表 - 新建 ROI 默认 deviceId 取设备列表第一项,兜底 edge Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
import { wvpRequestClient } from '#/api/aiot/request';
|
||||
|
||||
export namespace AiotEdgeApi {
|
||||
/** 边缘设备 VO */
|
||||
@@ -34,22 +34,23 @@ export namespace AiotEdgeApi {
|
||||
|
||||
/** 分页查询边缘设备列表 */
|
||||
export function getDevicePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<AiotEdgeApi.Device>>(
|
||||
'/aiot/edge/device/page',
|
||||
return wvpRequestClient.get<PageResult<AiotEdgeApi.Device>>(
|
||||
'/api/ai/device/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取设备详情 */
|
||||
export function getDevice(id: string) {
|
||||
return requestClient.get<AiotEdgeApi.Device>(
|
||||
`/aiot/edge/device/get?id=${id}`,
|
||||
export function getDevice(deviceId: string) {
|
||||
return wvpRequestClient.get<AiotEdgeApi.Device>(
|
||||
'/api/ai/device/get',
|
||||
{ params: { deviceId } },
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取设备统计 */
|
||||
export function getDeviceStatistics() {
|
||||
return requestClient.get<AiotEdgeApi.DeviceStatistics>(
|
||||
'/aiot/edge/device/statistics',
|
||||
return wvpRequestClient.get<AiotEdgeApi.DeviceStatistics>(
|
||||
'/api/ai/device/statistics',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user