占线板股道视图调整

This commit is contained in:
fan 2022-06-30 18:08:39 +08:00
parent 12d2f98e4a
commit a30991a53f
2 changed files with 34 additions and 25 deletions

View File

@ -8,7 +8,7 @@
<!-- <el-button v-if="$route.query.lineCode === '15'" size="small" type="jumpjlmap3d" @click="jumpjlmap3dDriver">司机视角</el-button> -->
<el-button v-if="$route.query.lineCode === '15'" size="small" @click="clCaAnCall">经典案例分析</el-button>
<el-button v-if="$route.query.lineCode === '15'" size="small" @click="normStudy">规范学习</el-button>
<el-button v-if="$route.query.lineCode === '16'" size="small" @click="showLineBoard">占线板</el-button>
<el-button v-if="$route.query.lineCode === '16'" size="small" @click="showLineBoard">占线板</el-button>
</el-button-group>
</div>
<Jl3dRailway-Device
@ -20,7 +20,7 @@
/>
<Jl3dRailway-Drive v-show="drivingShow" ref="Jl3dRailwayDrive" :panel-show="drivingShow" @showdriving="showdriving" />
<draw-select ref="drawSelect" />
<line-board ref="lineBoard" />
<line-board ref="lineBoard" />
</div>
</template>
<script>
@ -39,7 +39,7 @@ export default {
Jl3dRailwayDevice,
Jl3dRailwayDrive,
DrawSelect,
LineBoard
LineBoard
},
props:{
isAllShow:{
@ -145,8 +145,8 @@ export default {
});
}
if(this.$route.query.project == "zzww"){
this.jumpjlmap3dDriver();
if (this.$route.query.project == 'zzww') {
this.jumpjlmap3dDriver();
}
},
methods:{
@ -164,9 +164,9 @@ export default {
normStudy() {
this.$refs.drawSelect.doShow(null, 'normStudy');
},
showLineBoard() {
this.$refs.lineBoard.doShow();
},
showLineBoard() {
this.$refs.lineBoard.doShow();
},
jumpjlmap3dmodel() {
if (this.deviceif == false) {
this.deviceif = true;
@ -185,7 +185,7 @@ export default {
jumpjlmap3dDriver() {
this.drivingShow = true;
this.$refs.Jl3dRailwayDrive.show(this.mapId, this.group);
},
}
}
};
</script>

View File

@ -361,8 +361,12 @@ export default {
}
if (item && item.trackView && item.trackView.trackLineMap) {
for (const key in item.trackView.trackLineMap) {
if (this.standTrackSectionMap[key]) {
this.standTrackSectionMap[key].lines = item.trackView.trackLineMap[key];
if (this.standTrackSectionMap[key] && item.trackView.trackLineMap[key]) {
for (const trainCode in item.trackView.trackLineMap[key]) {
if (this.standTrackSectionMap[key].lineMap[trainCode]) {
Object.assign(this.standTrackSectionMap[key].lineMap[trainCode], item.trackView.trackLineMap[key][trainCode]);
} else { this.standTrackSectionMap[key].lineMap[trainCode] = item.trackView.trackLineMap[key][trainCode]; }
}
}
}
}
@ -384,10 +388,13 @@ export default {
let oddNumber = true;
for (const key in this.standTrackSectionMap) {
if (this.standTrackSectionMap[key].belongStation === this.selectCode) {
if (this.standTrackSectionMap[key].lines && this.standTrackSectionMap[key].lines.length) {
this.standTrackSectionMap[key].lines.forEach((item, index) => {
this.trackList.push(Object.assign({}, item, { trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, oddNumber: oddNumber, showTrack: index === 0 }));
});
if ( JSON.stringify(this.standTrackSectionMap[key].lineMap) !== '{}') {
let flag = true;
const lineMap = this.standTrackSectionMap[key].lineMap;
for (const item in lineMap) {
this.trackList.push(Object.assign({}, lineMap[item], { trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, oddNumber: oddNumber, showTrack: flag }));
flag = false;
}
oddNumber = !oddNumber;
} else {
this.trackList.push({trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, noData: true, oddNumber: oddNumber, showTrack: true});
@ -400,7 +407,7 @@ export default {
'$store.state.map.mapDataLoadedCount': function (val) { //
this.sectionList.forEach(item => {
if (item.standTrack) {
this.standTrackSectionMap[item.code] = { trackName: item.name, occupied: false, belongStation:item.belongStation, lines: [] };
this.standTrackSectionMap[item.code] = { trackName: item.name, occupied: false, belongStation:item.belongStation, lineMap: {}};
}
});
}
@ -421,18 +428,20 @@ export default {
selectStandCode(code) {
this.selectCode = code;
this.trackList = [];
let oddNumber = true;
for (const key in this.standTrackSectionMap) {
if (this.standTrackSectionMap[key].belongStation === this.selectCode) {
if (this.standTrackSectionMap[key].lines && this.standTrackSectionMap[key].lines.length) {
this.standTrackSectionMap[key].lines.forEach((item, index) => {
if (!index) {
this.trackList.push(Object.assign({}, item, { sectionName: this.standTrackSectionMap[key].sectionName, occupied: this.standTrackSectionMap[key].occupied }));
} else {
this.trackList.push(Object.assign({}, item));
}
});
if ( JSON.stringify(this.standTrackSectionMap[key].lineMap) !== '{}') {
let flag = true;
const lineMap = this.standTrackSectionMap[key].lineMap;
for (const item in lineMap) {
this.trackList.push(Object.assign({}, lineMap[item], { trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, oddNumber: oddNumber, showTrack: flag }));
flag = false;
}
oddNumber = !oddNumber;
} else {
this.trackList.push({sectionName: this.standTrackSectionMap[key].sectionName, occupied: this.standTrackSectionMap[key].occupied});
this.trackList.push({trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, noData: true, oddNumber: oddNumber, showTrack: true});
oddNumber = !oddNumber;
}
}
}