|
@@ -67,7 +67,7 @@
|
|
|
}
|
|
|
"
|
|
|
>
|
|
|
- <el-link type="primary" href="kacvascript:;">
|
|
|
+ <el-link type="primary" href="javascript:;">
|
|
|
<!-- <el-icon color="#909399"><CaretBottom /></el-icon> -->
|
|
|
<span style="margin-left: 6px" v-if="!isCollapse">点此折叠报警</span>
|
|
|
<span style="margin-left: 6px; color: var(--el-color-danger)" v-else
|
|
@@ -147,7 +147,7 @@ export default {
|
|
|
// 如果超过一定时间还没重置计时器,说明websocket与后端断开了
|
|
|
this.showSocketLog && console.log("未收到心跳检测回复");
|
|
|
// 关闭WebSocket
|
|
|
- this.vueThis.socketObj.close();
|
|
|
+ this.vuethis.socketObj && this.socketObj.close();
|
|
|
}, this.timeout);
|
|
|
}, this.timeout);
|
|
|
},
|
|
@@ -204,7 +204,7 @@ export default {
|
|
|
|
|
|
unmounted() {
|
|
|
this.socketLeaveFlag = true;
|
|
|
- this.socketObj.close();
|
|
|
+ this.socketObj && this.socketObj.close();
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
@@ -481,7 +481,7 @@ export default {
|
|
|
// websocket重连
|
|
|
this.socketReconnect();
|
|
|
} else {
|
|
|
- this.socketObj.close();
|
|
|
+ this.socketObj && this.socketObj.close();
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -559,6 +559,11 @@ export default {
|
|
|
ts: alarmItem.ts,
|
|
|
tsName: new Date(alarmItem.ts).formatDate("MM-dd hh:mm:ss"),
|
|
|
fullTsName: new Date(alarmItem.ts).formatDate("yyyy-MM-dd hh:mm:ss"),
|
|
|
+ endts: alarmItem.endts,
|
|
|
+ endtsName:
|
|
|
+ alarmItem.endts > 0
|
|
|
+ ? new Date(alarmItem.endts).formatDate("yyyy-MM-dd hh:mm:ss")
|
|
|
+ : "",
|
|
|
deviceId: alarmItem.deviceId,
|
|
|
faultCause: alarmItem.faultCause,
|
|
|
resolvent: alarmItem.resolvent,
|
|
@@ -599,7 +604,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- goToAlertDescPage({ deviceId, alarmId, deviceType,alarmType }) {
|
|
|
+ goToAlertDescPage({ deviceId, alarmId, deviceType, alarmType }) {
|
|
|
if (alarmType == "custom") {
|
|
|
this.$router.push(
|
|
|
`/safe/customWarning/${deviceId}/${alarmId}/${deviceType}`
|
|
@@ -613,7 +618,7 @@ export default {
|
|
|
`/safe/historywaring/${deviceId}/${alarmId}/${deviceType}`
|
|
|
);
|
|
|
}
|
|
|
- // this.$router.push(`/safe/historywaring/${deviceId}/${alarmId}`);
|
|
|
+ // this.$router.push(`/safe/historywaring/${deviceId}/${alarmId}`);
|
|
|
},
|
|
|
|
|
|
getConfigItem(lv) {
|