宁波一综合演练现地设置显示站
This commit is contained in:
parent
6afafc9371
commit
cc3f117a8f
@ -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 = [];
|
||||
|
@ -10,7 +10,7 @@
|
||||
>
|
||||
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select v-if="showSelectStation" v-model="showStation" style="width: 100px;" size="small" @change="switchStationMode">
|
||||
<el-select v-if="showSelectStation" v-model="chiShowStation" style="width: 100px;" size="small" @change="switchStationMode">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<el-button-group>
|
||||
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user