diff --git a/src/layout/index.vue b/src/layout/index.vue
index 27c8b44..fb24fcc 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -244,6 +244,7 @@
}
},
created() {
+ console.log('layout 再一次进入')
this.onLayoutResize();
window.addEventListener('resize', this.onLayoutResize);
const menu = this.$router.sc_getMenu();
diff --git a/src/layout/other/404.vue b/src/layout/other/404.vue
index f1ac390..c8894b0 100644
--- a/src/layout/other/404.vue
+++ b/src/layout/other/404.vue
@@ -6,9 +6,9 @@
无权限或找不到页面
当前页面无权限访问或者打开了一个不存在的链接,请检查当前账户权限和链接的可访问性。
-
返回首页
-
重新登录
-
返回上一页
+
返回首页
+
重新登录
+
返回上一页
@@ -16,15 +16,15 @@
diff --git a/src/utils/websocket.js b/src/utils/websocket.js
index 0834da9..46b3a19 100644
--- a/src/utils/websocket.js
+++ b/src/utils/websocket.js
@@ -13,7 +13,7 @@ let global_callback = function () {};
let timeoutObj = null;
let timeout = 28 * 1000; //30秒一次心跳
let serverTimeoutObj = 60; //心跳倒计时
-let timeOutNum = 60; //断开 重连倒计时
+let timeOutNum = 60; // 断开 重连倒计时
let lockReconnect = false; //是否真正建立连接
const wsUri = systemConfig.WS_URL;
let showNot = null;
@@ -46,7 +46,8 @@ function startHeartbeat() {
start();
}
-function start() {//开启心跳
+//开启心跳
+function start() {
timeoutObj && clearTimeout(timeoutObj);
serverTimeoutObj && clearTimeout(serverTimeoutObj);
timeoutObj = setTimeout(function () {
@@ -65,7 +66,22 @@ function start() {//开启心跳
}
function createWebSocket(callback, token) {
- if (websocket == null || typeof websocket !== WebSocket) {
+ console.log(websocket,'websocket')
+ // if (websocket == null || typeof websocket !== WebSocket) {
+ // initWebSocket(callback, token);
+ // }
+
+ // websocket.readyState 0 (CONNECTING) 1 (OPEN) 2 (CLOSING) 3 (CLOSED)
+ // 0 连接正在建立中,尚未连接
+ // 1 已经建立,可以进行通信
+ // 2 关闭握手过程,即将关闭
+ // 3 闭或者根本没有建立
+
+ if(websocket && websocket.readyState === 1){
+ return
+ }
+ console.log(websocket)
+ if (websocket === null || websocket.readyState === 3) {
initWebSocket(callback, token);
}
}
@@ -121,7 +137,6 @@ function closeSock(active) {
function webSocketOnMessage(msg) {
// 收到信息为Blob类型时
let result = null;
- // debugger
// 二进制文件
if (msg.data instanceof Blob) {
const reader = new FileReader();
diff --git a/src/views/order/repair-action.vue b/src/views/order/repair-action.vue
index af4175d..256b66f 100644
--- a/src/views/order/repair-action.vue
+++ b/src/views/order/repair-action.vue
@@ -114,14 +114,20 @@
{{scope.row.m_ascription===1?'旧部件':'新部件'}}
-