forked from dyf/dyf-vue-ui
报警列表卡片,模式页面布局修改,估计播放,优化体验
This commit is contained in:
@ -1,63 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { EquipmentAlarmRecordVO, EquipmentAlarmRecordForm, EquipmentAlarmRecordQuery } from '@/api/equipmentAlarmRecord/types';
|
||||
import { AlarmVO, AlarmForm, AlarmQuery } from '@/api/equipment/alarm/types';
|
||||
|
||||
/**
|
||||
* 查询设备报警记录列表
|
||||
* 查询设备告警列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listEquipmentAlarmRecord = (query?: EquipmentAlarmRecordQuery): AxiosPromise<EquipmentAlarmRecordVO[]> => {
|
||||
export const listAlarm = (query?: AlarmQuery): AxiosPromise<AlarmVO[]> => {
|
||||
return request({
|
||||
url: '/equipment/equipmentAlarmRecord/list',
|
||||
url: 'api/equipment/alarm/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询设备报警记录详细
|
||||
* 查询设备告警详细
|
||||
* @param id
|
||||
*/
|
||||
export const getEquipmentAlarmRecord = (id: string | number): AxiosPromise<EquipmentAlarmRecordVO> => {
|
||||
export const getAlarm = (id: string | number): AxiosPromise<AlarmVO> => {
|
||||
return request({
|
||||
url: '/equipment/equipmentAlarmRecord/' + id,
|
||||
url: '/equipment/alarm/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增设备报警记录
|
||||
* 新增设备告警
|
||||
* @param data
|
||||
*/
|
||||
export const addEquipmentAlarmRecord = (data: EquipmentAlarmRecordForm) => {
|
||||
export const addAlarm = (data: AlarmForm) => {
|
||||
return request({
|
||||
url: '/equipment/equipmentAlarmRecord',
|
||||
url: '/equipment/alarm',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改设备报警记录
|
||||
* 修改设备告警
|
||||
* @param data
|
||||
*/
|
||||
export const updateEquipmentAlarmRecord = (data: EquipmentAlarmRecordForm) => {
|
||||
export const updateAlarm = (data: AlarmForm) => {
|
||||
return request({
|
||||
url: '/equipment/equipmentAlarmRecord',
|
||||
url: '/equipment/alarm',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除设备报警记录
|
||||
* 删除设备告警
|
||||
* @param id
|
||||
*/
|
||||
export const delEquipmentAlarmRecord = (id: string | number | Array<string | number>) => {
|
||||
export const delAlarm = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/equipment/equipmentAlarmRecord/' + id,
|
||||
url: '/equipment/alarm/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
@ -1,82 +1,39 @@
|
||||
export interface EquipmentAlarmRecordVO {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 报警设备id
|
||||
*/
|
||||
deviceId: string | number;
|
||||
|
||||
/**
|
||||
* 设备IMEI
|
||||
*/
|
||||
deviceImei: string;
|
||||
|
||||
/**
|
||||
* 设备MAC
|
||||
*/
|
||||
deviceMac: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
export interface AlarmVO {
|
||||
startTime: string;
|
||||
treatmentState?: string | number
|
||||
deviceAction?: string | number;
|
||||
deviceName: string;
|
||||
|
||||
/**
|
||||
* 所属代理(客户)
|
||||
*/
|
||||
agent: number;
|
||||
|
||||
/**
|
||||
* 绑定app用户
|
||||
*/
|
||||
bindApp: number;
|
||||
|
||||
/**
|
||||
* 报警类型
|
||||
*/
|
||||
alarmType: number;
|
||||
|
||||
/**
|
||||
* 报警编码
|
||||
|
||||
*/
|
||||
alarmCode: string;
|
||||
|
||||
/**
|
||||
* 报警描述
|
||||
*/
|
||||
alarmDescription: string;
|
||||
|
||||
/**
|
||||
* 报警时间
|
||||
*/
|
||||
alarmTime: string;
|
||||
|
||||
dataSource: string;
|
||||
content: string;
|
||||
longitude: number;
|
||||
latitude: number;
|
||||
location: string;
|
||||
queryTime1?: string | number;
|
||||
queryTime2?: string | number;
|
||||
durationTime: string;
|
||||
deviceTypeName: string;
|
||||
deviceImei: string;
|
||||
deviceMac: string;
|
||||
devicePic:string;
|
||||
finishTime: string;
|
||||
|
||||
}
|
||||
|
||||
export interface EquipmentAlarmRecordForm extends BaseEntity {
|
||||
export interface AlarmForm extends BaseEntity {
|
||||
/**
|
||||
*
|
||||
* ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 报警设备id
|
||||
* 设备ID
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备IMEI
|
||||
* 报警事项
|
||||
*/
|
||||
deviceImei?: string;
|
||||
|
||||
/**
|
||||
* 设备MAC
|
||||
*/
|
||||
deviceMac?: string;
|
||||
deviceAction?: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
@ -84,54 +41,69 @@ export interface EquipmentAlarmRecordForm extends BaseEntity {
|
||||
deviceName?: string;
|
||||
|
||||
/**
|
||||
* 所属代理(客户)
|
||||
* 数据来源
|
||||
*/
|
||||
agent?: number;
|
||||
dataSource?: string;
|
||||
|
||||
/**
|
||||
* 绑定app用户
|
||||
* 内容
|
||||
*/
|
||||
bindApp?: number;
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 报警类型
|
||||
* 设备类型
|
||||
*/
|
||||
alarmType?: number;
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 报警编码
|
||||
* 经度
|
||||
|
||||
*/
|
||||
alarmCode?: string;
|
||||
longitude?: number;
|
||||
|
||||
/**
|
||||
* 报警描述
|
||||
* 纬度
|
||||
*/
|
||||
alarmDescription?: string;
|
||||
latitude?: number;
|
||||
|
||||
/**
|
||||
* 报警时间
|
||||
* 报警位置
|
||||
*/
|
||||
alarmTime?: string;
|
||||
location?: string;
|
||||
|
||||
/**
|
||||
* 报警开始时间
|
||||
*/
|
||||
startTime?: string;
|
||||
|
||||
/**
|
||||
* 报警结束时间
|
||||
*/
|
||||
finishTime?: string;
|
||||
|
||||
/**
|
||||
* 报警持续时间
|
||||
*/
|
||||
durationTime?: string;
|
||||
|
||||
/**
|
||||
* 0已处理,1未处理
|
||||
*/
|
||||
treatmentState?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface EquipmentAlarmRecordQuery extends PageQuery {
|
||||
export interface AlarmQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 报警设备id
|
||||
* 设备ID
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备IMEI
|
||||
* 报警事项
|
||||
*/
|
||||
deviceImei?: string;
|
||||
|
||||
/**
|
||||
* 设备MAC
|
||||
*/
|
||||
deviceMac?: string;
|
||||
deviceAction?: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
@ -139,40 +111,60 @@ export interface EquipmentAlarmRecordQuery extends PageQuery {
|
||||
deviceName?: string;
|
||||
|
||||
/**
|
||||
* 所属代理(客户)
|
||||
* 数据来源
|
||||
*/
|
||||
agent?: number;
|
||||
dataSource?: string;
|
||||
|
||||
/**
|
||||
* 绑定app用户
|
||||
* 内容
|
||||
*/
|
||||
bindApp?: number;
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 报警类型
|
||||
* 设备类型
|
||||
*/
|
||||
alarmType?: number;
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 报警编码
|
||||
* 经度
|
||||
|
||||
*/
|
||||
alarmCode?: string;
|
||||
longitude?: number;
|
||||
|
||||
/**
|
||||
* 报警描述
|
||||
* 纬度
|
||||
*/
|
||||
alarmDescription?: string;
|
||||
latitude?: number;
|
||||
|
||||
/**
|
||||
* 报警时间
|
||||
* 报警位置
|
||||
*/
|
||||
alarmTime?: string;
|
||||
location?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
/**
|
||||
* 报警开始时间
|
||||
*/
|
||||
startTime?: string;
|
||||
|
||||
/**
|
||||
* 报警结束时间
|
||||
*/
|
||||
finishTime?: string;
|
||||
|
||||
/**
|
||||
* 报警持续时间
|
||||
*/
|
||||
durationTime?: string;
|
||||
|
||||
/**
|
||||
* 0已处理,1未处理
|
||||
*/
|
||||
treatmentState?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user