综合演练切换车联段停车场后显示调整

This commit is contained in:
fan 2021-09-28 09:42:00 +08:00
parent 673d2e474c
commit 15f5fdf664
5 changed files with 31 additions and 4 deletions

View File

@ -349,7 +349,15 @@ class Jlmap {
getShowConfig() {
return this.showConfig;
}
amendDevice(list) {
list.forEach(elem => {
if (store.getters['map/amendPoints'](elem.code)) {
const oDevice = this.mapDevice[elem.code];
this.$painter.delete(oDevice);
this.$painter.add(oDevice);
}
});
}
updateShowStation(list = [], stationCode = '') {
store.dispatch('map/setShowCentralizedStationCode', stationCode);
list.forEach(elem => {

View File

@ -96,6 +96,7 @@ class Painter {
const instance = device.instance;
if (instance) {
this.mapInstanceLevel[device._type].remove(instance);
device.instance = null;
}
}

View File

@ -971,7 +971,6 @@ class Signal extends Group {
setState(model) {
const path = window.location.href;
this.recover();
// 只响应前端自定义类型的状态变化
if (this.model.showMode === '05') {
this.eachChild(item => { item.hide(); });

View File

@ -58,7 +58,11 @@ export default {
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.isDisplay;
},
top() {
return this.isShowDate ? (this.$route.query.prdType == '05' ? 5 : this.offset - 10) : this.offset;
if (this.isShowDate) {
return this.$route.query.prdType === '05' ? 5 : this.offset - 10;
} else {
return this.$store.state.training.prdType === '09' ? this.offset + 20 : this.offset;
}
},
newRight() {
return this.isShowDate ? this.$store.state.config.width - 420 : this.$store.state.config.width / 2 - 55;

View File

@ -137,7 +137,9 @@ export default {
...mapGetters('map', [
'map',
'bigScreenConfig',
'stationList'
'stationList',
'sectionList',
'signalList'
]),
width() {
return this.$store.state.app.width;
@ -385,6 +387,16 @@ export default {
this.jl3dmaintainershow = false;
this.drivingShow = false;
break;
case 'DEPOT_DISPATCHER':
this.$store.dispatch('training/setPrdType', '09');
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
this.$refs.menuSchema.chiShowStation = deviceCode;
this.showStation = deviceCode;
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList]);
this.mapViewLoadedOver && this.setShowStation(deviceCode);
this.jl3dmaintainershow = false;
this.drivingShow = false;
break;
case 'AUDIENCE':
this.$store.dispatch('training/setPrdType', '');
this.$store.dispatch('training/setRoles', 'AUDIENCE');
@ -559,6 +571,9 @@ export default {
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const key in mapDevice) {
if (key === 'X50747') {
console.log(mapDevice[key], '=============');
}
list.push(mapDevice[key]);
}
this.$jlmap.updateShowStation(list, showStation);