This commit is contained in:
gtz 2024-01-22 14:06:19 +08:00
parent dd2f982677
commit 861bda5df2
4 changed files with 17 additions and 13 deletions

View File

@ -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'

View File

@ -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'
# 根据服务器或域名修改

BIN
dist.zip

Binary file not shown.

View File

@ -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() {