报警列表页面显示微标

This commit is contained in:
xusd 2024-06-12 17:28:11 +08:00
parent 53853c4c9f
commit 05c14ae118

View File

@ -54,7 +54,8 @@
<script>
import {
listRecord
listRecord,
getAlarmCount
} from "@/api/alarm/alarm.js";
import {
@ -94,10 +95,19 @@
equipList: [],
tabList: [{
name: '全部',
badge: {
value: 0,
}
}, {
name: '未处理',
badge: {
value: 5,
}
}, {
name: '已处理'
name: '已处理',
badge: {
value: 5,
}
}]
}
},
@ -114,12 +124,23 @@
onShow() {
this.alarmList = [];
this.getAlarmList();
this.getAlarmCount();
// this.getEquipList();
},
// onLoad(opts) {
// this.flag = opts.flag;
// },
methods: {
getAlarmCount() {
getAlarmCount().then((res) => {
//
this.tabList[0].badge.value = res.allCount;
//
this.tabList[1].badge.value = res.untreatedCount;
//
this.tabList[2].badge.value = res.processedCount;
})
},
openPopup() {
this.getEquipList();
},
@ -161,12 +182,10 @@
// })
// })
this.ready = false;
this.treeData = [
{
this.treeData = [{
"id": null,
"equipName": "所有设备"
}
];
}];
getEquipTree().then((res) => {
this.treeData = this.treeData.concat(res);
this.ready = true;