src/api/index.ts
@@ -1,6 +1,7 @@ import { request } from '@/common/utils' import type { CraftParamsResponse, TasksGroupByChannel } from './task' import type { PLCResponse } from './plc' import type { Devices } from './device' export interface BaseResponse<T = any> { code: number @@ -94,3 +95,13 @@ data: params }) } /** * 获取当前面板绑定的设备列表 */ export function getDeviceList() { return request<BaseResponse<Devices>>({ url: `/v1/device/list`, method: 'get' }) }