diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue
index 9f4c980ff..d8e45b8f1 100644
--- a/src/views/newMap/jointTrainingNew/index.vue
+++ b/src/views/newMap/jointTrainingNew/index.vue
@@ -50,6 +50,7 @@ import { EventBus } from '@/scripts/event-bus';
import ibpData from '@/ibp/constant/ibpData';
import { timeFormat } from '@/utils/date';
import { Message } from 'element-ui';
+import Vue from 'vue';
export default {
name: 'JointTrainingDraft',
@@ -126,17 +127,17 @@ export default {
this.setPosition();
if (val === '01' && this.$route.query.lineCode === '06') {
this.showSelectStation = true;
- this.mapViewLoadedOver && this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation(this.showStation);
+ this.mapViewLoadedOver && this.setShowStation(this.showStation);
} else if (val === '02' && this.$route.query.lineCode === '06') {
this.showSelectStation = false;
- this.mapViewLoadedOver && this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation('');
+ this.mapViewLoadedOver && this.setShowStation('');
}
},
'$store.state.map.mapViewLoadedCount': function (val) {
this.mapBoxP = document.getElementById(this.canvasId).children[0];
this.mapBoxP.style.cursor = '';
this.mapViewLoadedOver = true;
- this.showSelectStation && this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation(this.showStation);
+ this.showSelectStation && this.setShowStation(this.showStation);
},
'$store.state.socket.permissionOver': function () {
this.$alert(this.$t('tip.userRightsHaveBeenReclaimed'), this.$t('tip.hint'), {
@@ -436,7 +437,18 @@ export default {
},
switchStationMode(val) {
this.showStation = val;
- this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation(this.showStation);
+ this.setShowStation(this.showStation);
+ },
+ setShowStation(val) {
+ const nameList = Object.keys(this.$store.state.map.map);
+ let list = [];
+ nameList.forEach(item => {
+ if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
+ list = [...list, ...this.$store.state.map.map[item]];
+ }
+ });
+ Vue.prototype.$jlmap.updateShowStation(list, val);
+ Vue.prototype.$jlmap.setCenter(val);
},
setStationList(val) {
this.stationList = [];
diff --git a/src/views/newMap/jointTrainingNew/menuSchema.vue b/src/views/newMap/jointTrainingNew/menuSchema.vue
index eecb13afc..692dc1cb8 100644
--- a/src/views/newMap/jointTrainingNew/menuSchema.vue
+++ b/src/views/newMap/jointTrainingNew/menuSchema.vue
@@ -10,7 +10,7 @@
>
-
+
@@ -91,6 +91,7 @@ export default {
viewDisabled: true,
realData: {},
series: [],
+ chiShowStation: '',
kmRangeCoordMap: {},
runPlanData: {},
swch: '02',
@@ -156,6 +157,7 @@ export default {
});
},
switchMode(swch) {
+ this.chiShowStation = this.showStation;
this.$store.dispatch('training/setPrdType', swch);
},
initPlannedDriving(isDisable) {