绘图显现调整

This commit is contained in:
fan 2021-09-13 13:43:24 +08:00
parent 0e7155116d
commit bef8fee318
4 changed files with 8 additions and 13 deletions

View File

@ -669,12 +669,7 @@ const map = {
let flag = false;
const stationCode = state.showCentralizedStationCode;
state.map.displayList.forEach(item => {
if (
store.state.training.prdType === '01' &&
item.type === 'LOCAL' &&
item.stationCodeList.includes(stationCode) &&
item.elementList.includes(deviceCode)
) {
if (store.state.training.prdType === '01' && item.type === 'LOCAL' && ((item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) || !stationCode)) {
flag = true;
} else if (store.state.training.prdType === '02' && item.type === 'CENTER' && item.elementList.includes(deviceCode)) {
flag = true;

View File

@ -488,7 +488,7 @@ export default {
setShowMode(showMode) {
if (this.showMode !== showMode) {
this.setShowStation('');
this.localStationShow && this.$refs.switchStation.inintShowStation();
this.localStationShow && this.$refs.switchStation.initShowStation();
}
this.showMode = showMode;
const nameList = Object.keys(this.$store.state.map.map || {});
@ -501,10 +501,6 @@ export default {
this.$jlmap.updateShowMode(list, showMode);
},
setShowStation(stationCode, setCenter) {
const lineCode = this.$store.getters['map/lineCode'];
// if (lineCode === '02' || lineCode === '05') {
// !setCenter && this.setCenter(stationCode);
// } else {
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const key in mapDevice) {

View File

@ -26,9 +26,10 @@ export default {
return {
offsetY: 15,
offsetX: 150,
swch: '02',
swch: 'all',
rightWidth: 0,
swchList: [
{ value: 'all', name: '全部' },
{ value: '02', name: '行调' },
{ value: '03', name: '现地' },
{ value: '04', name: '大屏' }
@ -99,6 +100,8 @@ export default {
this.offsetX = 140 + this.rightWidth;
}
}
const map = { all: '', '02': '02', '03': '01', '04': '02' };
this.$store.dispatch('training/setPrdType', map[val]);
this.$emit('setShowMode', val);
}
}

View File

@ -77,7 +77,8 @@ export default {
}
});
},
inintShowStation() {
initShowStation() {
this.$store.dispatch('map/setShowCentralizedStationCode', '');
this.showStation = '';
},
setOffsetX() {