|
@@ -338,6 +338,7 @@ const props = defineProps({
|
|
}
|
|
}
|
|
|
|
|
|
});
|
|
});
|
|
|
|
+let startlog=ref('0');
|
|
let shigtext = ref('');
|
|
let shigtext = ref('');
|
|
let websock = ref(null);
|
|
let websock = ref(null);
|
|
let times = ref({
|
|
let times = ref({
|
|
@@ -508,20 +509,6 @@ const accident = () => {
|
|
fetchFileContent();
|
|
fetchFileContent();
|
|
|
|
|
|
}
|
|
}
|
|
-// const accident2 = () => {
|
|
|
|
-// if (classradio.value == "Fire") {
|
|
|
|
-// leftcoll.value.collfire = true;
|
|
|
|
-// leftcoll.value.collwater = false;
|
|
|
|
-
|
|
|
|
-// } else if (classradio.value == "Water") {
|
|
|
|
-// leftcoll.value.collwater = true;
|
|
|
|
-// leftcoll.value.collfire = false;
|
|
|
|
-// }else{
|
|
|
|
-// leftcoll.value.collfire = false;
|
|
|
|
-// leftcoll.value.collfire = false;
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// }
|
|
|
|
const accident2 = (key) => {
|
|
const accident2 = (key) => {
|
|
if (key == '3') {
|
|
if (key == '3') {
|
|
if (classradio.value== "Fire") {
|
|
if (classradio.value== "Fire") {
|
|
@@ -710,7 +697,7 @@ const selectchange = (val) => {
|
|
}
|
|
}
|
|
//推演的开始计算
|
|
//推演的开始计算
|
|
const calculate = () => {
|
|
const calculate = () => {
|
|
-
|
|
|
|
|
|
+ rizhi.value.logs='';
|
|
const params = {
|
|
const params = {
|
|
transCode: 'D00008',
|
|
transCode: 'D00008',
|
|
aid: aid.value,
|
|
aid: aid.value,
|
|
@@ -726,7 +713,7 @@ const calculate = () => {
|
|
|
|
|
|
request(params)
|
|
request(params)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- initWebSocket();
|
|
|
|
|
|
+ // initWebSocket();
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
ElMessage.error(err.returnMsg)
|
|
ElMessage.error(err.returnMsg)
|
|
@@ -781,12 +768,12 @@ function initWebSocket() {
|
|
|
|
|
|
// Websoket连接成功事件
|
|
// Websoket连接成功事件
|
|
const websocketonopen = (res) => {
|
|
const websocketonopen = (res) => {
|
|
- console.log("WebSocket连接成功", res);
|
|
|
|
|
|
+ console.log("WebSocket连接成功", res);
|
|
start();
|
|
start();
|
|
};
|
|
};
|
|
// Websoket接收消息事件
|
|
// Websoket接收消息事件
|
|
const websocketonmessage = (res) => {
|
|
const websocketonmessage = (res) => {
|
|
- // console.log("数据", res);
|
|
|
|
|
|
+ console.log("数据", res);
|
|
// console.log(res.data);
|
|
// console.log(res.data);
|
|
getthislog(res.data);
|
|
getthislog(res.data);
|
|
|
|
|
|
@@ -795,7 +782,7 @@ const websocketonmessage = (res) => {
|
|
// Websoket连接错误事件
|
|
// Websoket连接错误事件
|
|
const websocketonerror = (res) => {
|
|
const websocketonerror = (res) => {
|
|
console.log("连接错误", res);
|
|
console.log("连接错误", res);
|
|
- socket.close();
|
|
|
|
|
|
+ websock.value.close();
|
|
reconnect();
|
|
reconnect();
|
|
};
|
|
};
|
|
// Websoket断开事件
|
|
// Websoket断开事件
|
|
@@ -833,6 +820,7 @@ const start = () => {
|
|
websock.send("heartCheck");
|
|
websock.send("heartCheck");
|
|
} else {
|
|
} else {
|
|
//否则重连
|
|
//否则重连
|
|
|
|
+ console.log(111111)
|
|
reconnect();
|
|
reconnect();
|
|
}
|
|
}
|
|
times.value.serverTimeoutObj = setTimeout(function () {
|
|
times.value.serverTimeoutObj = setTimeout(function () {
|