ref: v3变更,,同步v2.2508.4

This commit is contained in:
TsMask
2025-09-01 11:19:01 +08:00
parent 2319cdf36b
commit e943b4dedc
129 changed files with 1876 additions and 3032 deletions

View File

@@ -6,12 +6,13 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
* 获取活动告警数
* @returns object
*/
export async function getActiveAlarmTotal() {
export async function getActiveAlarmTotal(coreUid: string) {
// 发起请求
const result = await request({
url: `/neData/alarm/list`,
method: 'GET',
params: {
coreUid: coreUid,
alarmStatus: 'Active',
sortField: 'event_time',
sortOrder: 'desc',
@@ -42,18 +43,15 @@ export async function listAct(query: Record<string, any>) {
/**
* 确认告警信息
* @param ids 记录ID
* @param id 记录ID
* @param state 状态 true确认 false取消确认
* @returns object
*/
export function ackAlarm(ids: number[], state: boolean) {
export function ackAlarm(data: Record<string, any>) {
return request({
url: `/neData/alarm/ack'`,
method: 'PUT',
data: {
ids: ids,
ackState: state,
},
data,
});
}
@@ -105,14 +103,14 @@ export function getPass() {
/**
* 清除告警信息
* @param ids 记录ID
* @param id 记录ID
* @returns object
*/
export function clearAlarm(ids: number[]) {
export function clearAlarm(id: number, coreUid: string) {
return request({
url: `/neData/alarm/clear`,
method: 'PUT',
data: { ids },
data: { id, coreUid },
});
}
@@ -193,11 +191,12 @@ export async function exportAll(query: Record<string, any>) {
* @param query 查询参数
* @returns bolb
*/
export async function origGet() {
export async function origGet(coreUid: string) {
return await request({
url: `/neData/alarm/count/severity`,
method: 'GET',
params: {
coreUid: coreUid,
alarmStatus: 'Active',
},
});
@@ -208,11 +207,12 @@ export async function origGet() {
* @param filterFlag 查询参数
* @returns object
*/
export async function top3Sel() {
export async function top3Sel(coreUid: string) {
return await request({
url: `/neData/alarm/count/ne`,
method: 'GET',
params: {
coreUid: coreUid,
alarmStatus: 'Active',
top: 3,
},