This commit is contained in:
sunzhenyu 2021-08-10 14:31:45 +08:00
commit 230de24156
6 changed files with 34 additions and 19 deletions

View File

@ -41,16 +41,19 @@ export default {
}
},
'$store.state.socket.beLogoutCount': async function(val) {
this.$store.dispatch('disconnect').then(()=>{
this.$alert(this.$t('tip.logoutTips'), this.$t('tip.hint'), {
confirmButtonText: this.$t('tip.confirm'),
callback: action => {
this.$store.dispatch('exit').then(resp => {
this.$router.push({path: loginInfo[getSessionStorage('project')].loginPath});
});
}
if (this.$store.state.socket.loggedOutMsg.token === getToken()) {
this.$store.dispatch('disconnect').then(()=>{
this.$alert(this.$t('tip.logoutTips'), this.$t('tip.hint'), {
confirmButtonText: this.$t('tip.confirm'),
callback: action => {
this.$store.dispatch('exit').then(resp => {
this.$router.push({path: loginInfo[getSessionStorage('project')].loginPath});
});
}
});
});
});
}
},
'$store.state.app.transitionAnimationsCount': function(val) {
this.loading = true;

View File

@ -162,7 +162,7 @@ class SkinCode extends defaultStyle {
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0', // 信号灯蓝色
faultType: 'flash', // 信号机故障类型flash太阳
overlapColor: '#0000ff' // 信号机延续保护颜色
overlapColor: '#22DFDF' // 信号机延续保护颜色
},
route: {
direction: false, // 自动进路方向

View File

@ -328,6 +328,7 @@ export default {
param: {},
stationObj: null,
selectedObj: null,
currentSelected: null,
oldClickObj: null, //
route: null, //
overlap: null, //
@ -416,7 +417,7 @@ export default {
return OperationEvent.Command.commandHaerbin.confrimCr2.domId;
},
stationContorl() {
return this.getStationControl(this.selectedObj || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
return this.getStationControl(this.currentSelected || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
},
isLocal() {
return this.$store.state.training.prdType == '01';
@ -462,6 +463,7 @@ export default {
EventBus.$emit('sendMsg', {}); //
this.initMenus();//
this.selectedObj = this.actualSelected;
this.currentSelected = val;
this.rightClickDialogVisible = false;
if (this.selectedObj._type && (val._event == MouseEvent.Left || (val._event == MouseEvent.Right && this.$store.state.training.prdType === '01'))) {
const type = this.State2SimulationMap[this.$store.state.training.prdType];
@ -476,7 +478,6 @@ export default {
code: this.selectedObj.code,
subType:this.$store.state.menuOperation.subType
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { this.handleDeviceMenu(); }
}).catch((error) => {
@ -839,9 +840,7 @@ export default {
});
if (this.selectRouteList.length) {
if (this.selectRouteList.length === 1) {
this.route = this.selectRouteList[0];
}
this.route = this.selectRouteList[0];
this.handleRouteMenu();
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;

View File

@ -2,6 +2,7 @@
<div>
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
<psl ref="psl" pop-class="xian-01__systerm" />
</div>
</template>
@ -13,12 +14,14 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import Psl from '@/jmapNew/theme/components/menus/dialog/psl';
export default {
name: 'StationStandMenu',
components: {
PopMenu,
SetFault
SetFault,
Psl
},
props: {
selected: {
@ -88,8 +91,13 @@ export default {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
if (this.$store.state.training.prdType === '01') {
this.menu.push({
label: 'PSL',
handler: this.openPsl
});
}
}
},
doShow(point) {
this.clickEvent();
@ -121,6 +129,10 @@ export default {
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
// PSL
openPsl() {
this.$refs.psl.doShow(this.selected);
}
}
};

View File

@ -191,7 +191,6 @@ export default {
handler: this.openPsl
}
];
}
},
doShow(point) {

View File

@ -135,6 +135,7 @@ function handle(state, data) {
break;
case 'Be_Logged_Out': // 重复登录被登出
state.beLogoutCount++;
state.loggedOutMsg = msg;
break;
case 'Simulation_Run_Plan_Reload': // 运行图变更
state.runPlanReloadCount++;
@ -342,7 +343,8 @@ const socket = {
simulationSpeed: 1, // 仿真倍速
simulationPause: false,
simulationPslStatus: [], // PSL面板按钮状态信息
simulationPlanChange:{} // 运行图加线/抽线/变化推送消息
simulationPlanChange:{}, // 运行图加线/抽线/变化推送消息
loggedOutMsg: ''
},
getters: {
},