Browse Source

导入表

Shannon_mu 3 years ago
parent
commit
f15f846ed7

+ 7 - 3
energyManagement/src/components/common/Header.vue

@@ -76,7 +76,8 @@ export default {
                 require('@/assets/img/icon_msg7.png'),
                 require('@/assets/img/icon_msg7.png'),
                 require('@/assets/img/icon_msg8.png'),
                 require('@/assets/img/icon_msg8.png'),
                 require('@/assets/img/icon_msg9.png')
                 require('@/assets/img/icon_msg9.png')
-            ]
+            ],
+            websocket: ''
         };
         };
     },
     },
     components: {
     components: {
@@ -206,6 +207,7 @@ export default {
         initWebSocket(id) {
         initWebSocket(id) {
             if ('WebSocket' in window) {
             if ('WebSocket' in window) {
                 var serviceIp = this.envConfig.websoketUrl;
                 var serviceIp = this.envConfig.websoketUrl;
+
                 this.websocket = new WebSocket('ws://' + serviceIp + '/sc-message/webSocket/' + id);
                 this.websocket = new WebSocket('ws://' + serviceIp + '/sc-message/webSocket/' + id);
             } else {
             } else {
                 console.log('当前浏览器 Not support websocket');
                 console.log('当前浏览器 Not support websocket');
@@ -213,9 +215,10 @@ export default {
             let that = this;
             let that = this;
             this.interval = window.setInterval(function () {
             this.interval = window.setInterval(function () {
                 //每隔30秒钟发送一次心跳,避免websocket连接因超时而自动断开
                 //每隔30秒钟发送一次心跳,避免websocket连接因超时而自动断开
+
                 if (that.websocket != null) {
                 if (that.websocket != null) {
-                    // that.websocket.send('HeartBeat');
-                    // console.log('发送心跳包:HeartBeat');
+                    // that.websocket.send();
+                    console.log('发送心跳包:HeartBeat');
                 }
                 }
             }, 30000);
             }, 30000);
             //连接发生错误的回调方法
             //连接发生错误的回调方法
@@ -231,6 +234,7 @@ export default {
 
 
             //接收到消息的回调方法
             //接收到消息的回调方法
             this.websocket.onmessage = function (event) {
             this.websocket.onmessage = function (event) {
+                debugger;
                 let msg = JSON.parse(event.data);
                 let msg = JSON.parse(event.data);
                 let i = msg.typeId - 1;
                 let i = msg.typeId - 1;
                 if (msg.userId) {
                 if (msg.userId) {

+ 1 - 1
energyManagement/src/components/common/XKUpload.vue

@@ -30,7 +30,7 @@ export default {
     actionUrl: {
     actionUrl: {
       type: String,
       type: String,
       default() {
       default() {
-        return "/sc-community/excel/import/excel";
+        return "/sc-energy/excel/import/excel";
       }
       }
     },
     },
     params: {
     params: {

+ 1 - 1
energyManagement/src/config/env.development.js

@@ -17,7 +17,7 @@ module.exports = {
   baseImgApi: "http://114.135.61.186:21012/", // 图片api请求地址
   baseImgApi: "http://114.135.61.186:21012/", // 图片api请求地址
   baseExcelApi: "http://114.135.61.187:38082", // excel请求地址
   baseExcelApi: "http://114.135.61.187:38082", // excel请求地址
   loginUrl: "http://114.135.61.186:21020/sc-login/",
   loginUrl: "http://114.135.61.186:21020/sc-login/",
-  websoketUrl: '114.135.61.187:38081',
+  websoketUrl: '10.0.0.62:8082',
 
 
 
 
   upload: {
   upload: {

+ 1 - 1
energyManagement/src/config/env.production.js

@@ -14,7 +14,7 @@ module.exports = {
   baseImgApi: "http://114.135.61.186:21020", // 图片api请求地址
   baseImgApi: "http://114.135.61.186:21020", // 图片api请求地址
   baseExcelApi: "http://114.135.61.186:21020", // excel请求地址
   baseExcelApi: "http://114.135.61.186:21020", // excel请求地址
   loginUrl: "http://114.135.61.186:21020/sc-login/",
   loginUrl: "http://114.135.61.186:21020/sc-login/",
-  websoketUrl: '114.135.61.186:21020',
+  websoketUrl: '10.0.0.62:8082',
 
 
   upload: {
   upload: {
     imageSize: 5, // MB
     imageSize: 5, // MB

+ 1 - 1
energyManagement/src/config/env.sit.js

@@ -14,7 +14,7 @@ module.exports = {
     baseExcelApi: "http://114.135.61.186:21020", // excel请求地址
     baseExcelApi: "http://114.135.61.186:21020", // excel请求地址
     baseMapApi:"http://114.135.61.187:38082",
     baseMapApi:"http://114.135.61.187:38082",
     loginUrl: "http://114.135.61.186:21020/sc-login/", // 项目地址
     loginUrl: "http://114.135.61.186:21020/sc-login/", // 项目地址
-    websoketUrl:'114.135.61.186:21020',
+    websoketUrl:'10.0.0.62:8082',
     
     
     upload: {
     upload: {
       imageSize: 5, // MB
       imageSize: 5, // MB