diff --git a/.env.dev b/.env.dev index 64224de3..0f135154 100644 --- a/.env.dev +++ b/.env.dev @@ -28,7 +28,7 @@ VUE_APP_BASE_API = 'http://10.70.2.2:8080' # VUE_APP_BASE_API = 'http://192.168.1.78:48082' # socket地址 VUE_APP_Socket_API = 'ws://10.70.2.2:8080' - +VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081' # 积木报表指向地址 VUE_APP_JIMU_API = 'http://10.70.2.22:8080' diff --git a/.env.prod b/.env.prod index 58a50eae..0148da16 100644 --- a/.env.prod +++ b/.env.prod @@ -18,6 +18,7 @@ VUE_APP_BASE_API = '/prod-api' VUE_APP_JIMU_API = 'http://10.70.2.2:8080' # socket地址 VUE_APP_Socket_API = 'ws://10.70.2.2:8080' +VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081' # 根据服务器或域名修改 diff --git a/dist.zip b/dist.zip deleted file mode 100644 index 3c0cde84..00000000 Binary files a/dist.zip and /dev/null differ diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 913a7f6f..814ac1a9 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -88,23 +88,26 @@ export default { visitedViews(newVal, oldVal){ let num = 0 newVal && newVal.map(item => { + console.log(item) if (item.path === '/databoard/kiln' || item.path === '/databoard/whole-plant' || item.path === '/databoard/deep-processing') { num++ } }) - if (num > 0) { - if(!this.wsIsOpen) { - getDcsMsg() - this.wsIsOpen = true - console.log('开启websocket==========') + this.$nextTick(() => { + if (num > 0) { + if(!this.wsIsOpen) { + getDcsMsg() + this.wsIsOpen = true + console.log('开启websocket==========') + } + }else{ + if (this.wsIsOpen) { + closeDcsMsg() + this.wsIsOpen = false + console.log('关闭============') + } } - }else{ - if (this.wsIsOpen) { - closeDcsMsg() - this.wsIsOpen = false - console.log('关闭============') - } - } + }) } }, mounted() {