【大铁标准站】实训设计时,先编制一个场景添加列车,保存背景,切换到路票,返回列表新建一个场景,点击编制,切换到联锁界面,新建的场景会自动出现列车

This commit is contained in:
fan 2023-01-28 15:07:27 +08:00
parent 9c9ccdbfc7
commit 3be9bc566c
3 changed files with 32 additions and 19 deletions

View File

@ -1334,13 +1334,13 @@ const map = {
initClearTrainData: ({ commit, state}) => {
if (Vue.prototype.$jlmap) {
Vue.prototype.$jlmap.initClearTrainData();
}
let showConfig = {};
if (Vue.prototype.$jlmap && typeof Vue.prototype.$jlmap.getShowConfig === 'function') {
showConfig = Vue.prototype.$jlmap.getShowConfig();
}
const parser = parserFactory(ParserType.Graph.value);
parser.parserTrainData(state.mapDevice, state.map.trainList, state.map.skinVO.code, showConfig);
}
},
setTrainWindowShow: ({ commit, state }, show) => {
if (state.map) {

View File

@ -112,11 +112,11 @@ export default {
$route() {
this.mapViewLoaded(true);
},
'$store.state.socket.simulationReset': function (val) { // 仿
if (val) {
this.simulationReset(val);
}
},
// '$store.state.socket.simulationReset': function (val) { // 仿
// if (val) {
// this.simulationReset(val);
// }
// },
'$store.state.training.rezoomCount': function () {
let code = this.$store.state.training.offsetStationCode; //
if (code && code.includes('Cycle')) { //
@ -283,14 +283,14 @@ export default {
break;
}
},
simulationReset() {
this.$store.dispatch('socket/setSimulationStart');// 仿-
this.$store.dispatch('map/initClearTrainData'); //
this.$store.dispatch('map/setTrainWindowShow', false); //
this.$store.dispatch('training/over'); // -
this.$store.dispatch('map/resetActiveTrainList'); //
this.$store.dispatch('training/setMapDefaultState'); //
},
// simulationReset() {
// this.$store.dispatch('socket/setSimulationStart');// 仿-
// this.$store.dispatch('map/initClearTrainData'); //
// this.$store.dispatch('map/setTrainWindowShow', false); //
// this.$store.dispatch('training/over'); // -
// this.$store.dispatch('map/resetActiveTrainList'); //
// this.$store.dispatch('training/setMapDefaultState'); //
// },
//
onDataZoom(dataZoom) {
this.dataZoom.offsetX = dataZoom.offsetX.toFixed(1) + '';

View File

@ -181,6 +181,11 @@ export default {
this.showStationCode = device.code;
this.pictureChange('troDetailWork');
}
},
'$store.state.socket.simulationReset': function (val) { // 仿
if (val) {
this.simulationReset(val);
}
}
},
mounted() {
@ -311,6 +316,14 @@ export default {
mapViewLoaded(loading) {
this.loading = loading;
this.$store.dispatch('app/animationsClose');
},
simulationReset() {
this.$store.dispatch('socket/setSimulationStart');// 仿-
this.$store.dispatch('map/initClearTrainData'); //
this.$store.dispatch('map/setTrainWindowShow', false); //
this.$store.dispatch('training/over'); // -
this.$store.dispatch('map/resetActiveTrainList'); //
this.$store.dispatch('training/setMapDefaultState'); //
}
}
};