@@ -2,6 +2,8 @@ import request from '@/utils/request';
|
||||
import type { EquipmentList, DeviceInfoForm } from '@/api/equipmentList/types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DemoVO, DemoForm, DemoQuery, DrawFrom } from '@/api/demo/demo/types';
|
||||
import { AlarmAreaData } from '@/api/equipmentList/types';
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
* @param data 设备数据
|
||||
@@ -78,12 +80,12 @@ export const updateDeviceInfo = (data: DeviceInfoForm) => {
|
||||
|
||||
/**
|
||||
* todo绘制区域
|
||||
* @param data 绘制信息
|
||||
* /device/info/draw
|
||||
* @param data 绘制信息数组
|
||||
* /haikang/isup/device/motion-detection
|
||||
*/
|
||||
export const drawInfo = (data: DrawFrom) => {
|
||||
export const drawInfo = (data: AlarmAreaData[]) => {
|
||||
return request({
|
||||
url: '/device/info/draw',
|
||||
url: '/haikang/isup/device/motion-detection',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
|
||||
@@ -21,4 +21,24 @@ export interface DeviceInfoForm extends BaseEntity {
|
||||
isDelete?: number;
|
||||
/** 若依扩展参数 */
|
||||
params?: Record<string, Record<string, unknown>>;
|
||||
}
|
||||
}
|
||||
|
||||
export interface DeviceInfo {
|
||||
id?: number;
|
||||
code?: string;
|
||||
name?: string;
|
||||
monitoringArea?: string;
|
||||
status?: number | string;
|
||||
model?: string;
|
||||
isDrawArea?: number | string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
// 报警区域数据类型
|
||||
export interface AlarmAreaData {
|
||||
deviceId: number;
|
||||
x1: number;
|
||||
y1: number;
|
||||
x2: number;
|
||||
y2: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user