diff --git a/api/alarm/alarm.js b/api/alarm/alarm.js index a76da13..6a50894 100644 --- a/api/alarm/alarm.js +++ b/api/alarm/alarm.js @@ -10,10 +10,11 @@ export function listRecord(query) { } // 报警处理数量 -export function getAlarmCount() { +export function getAlarmCount(query) { return request({ url: "/alarm/record/alarmCount", - method: "get" + method: "get", + params: query, }); } diff --git a/pages/work/alarm/listAlarm.vue b/pages/work/alarm/listAlarm.vue index 26efe8b..6c636c1 100644 --- a/pages/work/alarm/listAlarm.vue +++ b/pages/work/alarm/listAlarm.vue @@ -92,6 +92,9 @@ pageNum: 1, pageSize: 10 }, + alarmCountQuery:{ + equipId: null + }, equipList: [], tabList: [{ name: '全部', @@ -132,7 +135,8 @@ // }, methods: { getAlarmCount() { - getAlarmCount().then((res) => { + this.alarmCountQuery.equipId = this.equipId; + getAlarmCount(this.alarmCountQuery).then((res) => { //报警总数 this.tabList[0].badge.value = res.allCount; //未处理数量 @@ -153,6 +157,7 @@ this.show = false; this.alarmList = []; this.getAlarmList(); + this.getAlarmCount(); }, tabListClick(item) { this.finished = true;