获取车辆段偏移增加限制

This commit is contained in:
fan 2021-10-14 18:05:24 +08:00
parent 6979eaf778
commit 3271ef15b6

View File

@ -83,7 +83,7 @@ export default {
},
setCenter(code) {
if (this.$store.state.training.prdType === '09' && this.$store.state.map.map.displayList && this.$store.state.map.map.displayList.length) {
const tempData = this.$store.state.map.map.displayList.find(item => { return item.stationCodeList.includes(code); });
const tempData = this.$store.state.map.map.displayList.find(item => { return item.stationCodeList.includes(code) && item.type === 'DEPOT_IL'; });
const dataZoom = { offsetX: tempData.offsetX, offsetY: tempData.offsetY, scaleRate: tempData.scaleRate };
this.$store.commit('map/setDataZoom', dataZoom);
this.$jlmap.setDepot(dataZoom);