diff --git a/src/utils/sock.js b/src/utils/sock.js index 1bc2e2cba..7e3767db7 100644 --- a/src/utils/sock.js +++ b/src/utils/sock.js @@ -79,6 +79,7 @@ StompClient.prototype = { // sock断开回调 that.clientIns.ws.onclose = () => { // Message.error(`通信连接已断开!`); + console.info(`通信连接已断开!`); notFirstConnect = true; checkLoginLine().then(() => { that.status = false; @@ -107,16 +108,18 @@ StompClient.prototype = { }, logOut(err) { console.info(err); - MessageBox.confirm('你已被登出,请重新登录', '确定登出', { - confirmButtonText: '重新登录', - showCancelButton: false, - type: 'warning' - }).then(() => { - store.dispatch('FedLogOut').then(() => { - location.reload();// 为了重新实例化vue-router对象 避免bug + // 退出登陆前断开连接 + store.dispatch('disconnect').then(()=>{ + MessageBox.confirm('你已被登出,请重新登录', '确定登出', { + confirmButtonText: '重新登录', + showCancelButton: false, + type: 'warning' + }).then(() => { + store.dispatch('FedLogOut').then(() => { + location.reload();// 为了重新实例化vue-router对象 避免bug + }); }); }); - }, // 恢复链接 reconnect(count) { diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index 6463a558f..e4f86184d 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -330,10 +330,10 @@ export default { return this.editModel.type == '01' || this.editModel.type == '03'; }, leftAxlePositionShow() { - return (this.editModel.type == '01' || this.editModel.type == '03') && this.editModel.leftAxlePosition; + return this.hasAssociatedSection && this.editModel.leftAxlePosition; }, rightAxlePositionShow() { - return (this.editModel.type == '01' || this.editModel.type == '03') && this.editModel.rightAxlePosition; + return this.hasAssociatedSection && this.editModel.rightAxlePosition; }, isParentCode() { return this.editModel.type == '02' || this.editModel.type == '03'; @@ -342,7 +342,7 @@ export default { return this.editModel.type == '01' && this.editModel.standTrack; }, isreentryTrackName() { - return this.editModel.type != '02' && this.editModel.type != '03' && this.editModel.reentryTrack; + return !this.isParentCode && this.editModel.reentryTrack; }, istransferTrackName() { return this.editModel.type == '01' && this.editModel.transferTrack; @@ -351,10 +351,10 @@ export default { return this.editModel.type == '01' && !this.editModel.reentryTrack; }, isReentryTrackShow() { - return this.editModel.type != '02' && this.editModel.type != '03' && !this.editModel.transferTrack; + return !this.isParentCode && !this.editModel.transferTrack; }, isdestinationCode() { - return this.editModel.type != '02' && this.editModel.type != '03' && (this.editModel.reentryTrack || this.editModel.transferTrack); + return !this.isParentCode && (this.editModel.reentryTrack || this.editModel.transferTrack); }, isStopPointOffset() { return this.editModel.type !== '04' && (this.editModel.reentryTrack || this.editModel.standTrack || this.editModel.transferTrack);