|
|
@@ -196,33 +196,11 @@ export default {
|
|
|
]);
|
|
|
this.controlInfoData = controlData || [];
|
|
|
|
|
|
- // 处理故障报警数据,确保显示12条,按4:4:4比例显示故障、离线、降级
|
|
|
+ // 处理故障报警数据,使用从API获取的12条数据
|
|
|
let originalAlarms = alarmData?.list || alarmData || [];
|
|
|
|
|
|
- // 定义三种状态的告警数据
|
|
|
- const faultAlarms = [
|
|
|
- { id: "F001", title: "通讯中断", time: new Date().toLocaleTimeString(), loc: "孔兴路与马坊路交叉口", level: "high", type: "error", description: "孔兴路与马坊路交叉口-通讯中断" },
|
|
|
- { id: "F002", title: "灯组故障", time: new Date().toLocaleTimeString(), loc: "TZ-174_绿心路路口(高怀亭北侧)", level: "high", type: "error", description: "TZ-174_绿心路路口(高怀亭北侧)-灯组故障" },
|
|
|
- { id: "F003", title: "相位冲突", time: new Date().toLocaleTimeString(), loc: "TZ-263_玉桥东路与梨园北街交叉路口", level: "high", type: "error", description: "TZ-263_玉桥东路与梨园北街交叉路口-相位冲突" },
|
|
|
- { id: "F004", title: "绿冲突", time: new Date().toLocaleTimeString(), loc: "TZ-364_辛安屯街与涌翠西路交叉路口", level: "high", type: "error", description: "TZ-364_辛安屯街与涌翠西路交叉路口-绿冲突" }
|
|
|
- ];
|
|
|
-
|
|
|
- const offlineAlarms = [
|
|
|
- { id: "O001", title: "信号机离线", time: new Date().toLocaleTimeString(), loc: "TZ-420_滨惠北一街与新光大中心西侧路口", level: "mid", type: "warning", description: "TZ-420_滨惠北一街与新光大中心西侧路口-信号机离线" },
|
|
|
- { id: "O002", title: "信号机离线", time: new Date().toLocaleTimeString(), loc: "TZ-332_畅和西路与大营南街交叉路口", level: "mid", type: "warning", description: "TZ-332_畅和西路与大营南街交叉路口-信号机离线" },
|
|
|
- { id: "O003", title: "通讯中断", time: new Date().toLocaleTimeString(), loc: "TZ-474_陈列馆路与焦王庄街交叉路口", level: "high", type: "error", description: "TZ-474_陈列馆路与焦王庄街交叉路口-通讯中断" },
|
|
|
- { id: "O004", title: "检测器异常", time: new Date().toLocaleTimeString(), loc: "TZ-083_月异路(南延)与文盛街交叉路口", level: "low", type: "warning", description: "TZ-083_月异路(南延)与文盛街交叉路口-检测器异常" }
|
|
|
- ];
|
|
|
-
|
|
|
- const degradedAlarms = [
|
|
|
- { id: "D001", title: "降级黄闪", time: new Date().toLocaleTimeString(), loc: "京塘路石槽村", level: "mid", type: "warning", description: "京塘路石槽村-降级黄闪" },
|
|
|
- { id: "D002", title: "降级黄闪", time: new Date().toLocaleTimeString(), loc: "TZ-339_潞通大街与紫运西路交叉路口", level: "mid", type: "warning", description: "TZ-339_潞通大街与紫运西路交叉路口-降级黄闪" },
|
|
|
- { id: "D003", title: "方案切换异常", time: new Date().toLocaleTimeString(), loc: "TZ-553_宋翟路与徐尹路", level: "mid", type: "warning", description: "TZ-553_宋翟路与徐尹路-方案切换异常" },
|
|
|
- { id: "D004", title: "检测器异常", time: new Date().toLocaleTimeString(), loc: "京塘路与塘通线交叉口", level: "low", type: "warning", description: "京塘路与塘通线交叉口-检测器异常" }
|
|
|
- ];
|
|
|
-
|
|
|
// 组合成12条数据
|
|
|
- this.alarmData = [...faultAlarms, ...offlineAlarms, ...degradedAlarms];
|
|
|
+ this.alarmData = originalAlarms;
|
|
|
|
|
|
this.tableData = taskData?.list || taskData || [];
|
|
|
this.keyIntersectionData = keyData || [];
|