socket 退出登陆 断开连接

绘图代码调整
This commit is contained in:
joylink_cuiweidong 2020-07-14 11:01:22 +08:00
parent d2f653bc54
commit a462e540fb
2 changed files with 16 additions and 13 deletions

View File

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

View File

@ -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);