告警中心接入 地图iframe接入 机器视频 控制接入

This commit is contained in:
mmc
2026-05-12 17:31:34 +08:00
parent 78ee2d5c09
commit 827822c22d
7 changed files with 693 additions and 654 deletions

71
src/api/alarmApi.js Normal file
View File

@@ -0,0 +1,71 @@
import request from './request';
// 1. 告警分页列表
export function getAlarmList(params) {
return request({
url: '/iot/alarm/list',
method: 'get',
params
});
}
// 2. 获取告警详情
export function getAlarmDetail(id) {
return request({
url: `/iot/alarm/${id}`,
method: 'get'
});
}
// 3. 新增告警
export function addAlarm(data) {
return request({
url: '/iot/alarm',
method: 'post',
data
});
}
// 4. 修改告警
export function updateAlarm(data) {
return request({
url: '/iot/alarm',
method: 'put',
data
});
}
// 5. 处理告警
export function handleAlarm(data) {
return request({
url: '/iot/alarm/handle',
method: 'put',
data
});
}
// 6. 删除告警(批量)
export function deleteAlarm(ids) {
return request({
url: `/iot/alarm/${ids}`,
method: 'delete'
});
}
// 7. 告警统计
export function getAlarmStatistics() {
return request({
url: '/iot/alarm/statistics',
method: 'get'
});
}
// 8. 导出告警
export function exportAlarm(data) {
return request({
url: '/iot/alarm/export',
method: 'post',
data,
responseType: 'blob'
});
}