This commit is contained in:
fan 2021-03-25 14:09:38 +08:00
commit 19421566de
11 changed files with 46 additions and 45 deletions

View File

@ -148,7 +148,6 @@ export function listUserRoutingData(mapId) {
});
}
// //////// 新添加
/** 根据交路查询交路区段列表*/
export function querySectionListByRouting(routingCode) {
return request({

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 145 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 262 KiB

After

Width:  |  Height:  |  Size: 262 KiB

View File

@ -76,8 +76,8 @@ import bgStationA from '@/assets/iscs_picture/bg-station-A.png'
import bgStationB from '@/assets/iscs_picture/bg-station-B.png'
import bgStationC from '@/assets/iscs_picture/bg-station-C.png'
import bgStationD from '@/assets/iscs_picture/bg-station-D.png'
import bgStationDoorA from '@/assets/iscs_picture/bg-station-door-A.png'
import bgStationDoorB from '@/assets/iscs_picture/bg-station-door-B.png'
import bgStationE from '@/assets/iscs_picture/bg-station-E.png'
import bgStationF from '@/assets/iscs_picture/bg-station-F.png'
const pictureObj = {
'psdLeft': psdLeft,
@ -154,8 +154,8 @@ const pictureObj = {
bgStationB,
bgStationC,
bgStationD,
bgStationDoorA,
bgStationDoorB
bgStationE,
bgStationF
};
export default class Picture extends Group {
constructor(device) {

View File

@ -333,13 +333,13 @@ export default {
type: 'interface'
},
{
name: '站厅层出入口A端',
name: '站厅层E端',
mode: 'fas02',
id: 'stationHallSix',
type: 'interface'
},
{
name: '站厅层出入口B端',
name: '站厅层F端',
mode: 'fas02',
id: 'stationHallSeven',
type: 'interface'

View File

@ -130,8 +130,8 @@ export default {
{ name: '站厅B', value: 'bgStationB' },
{ name: '站厅C', value: 'bgStationC' },
{ name: '站厅D', value: 'bgStationD' },
{ name: '站厅出入口A', value: 'bgStationDoorA' },
{ name: '站厅出入口B', value: 'bgStationDoorB' }
{ name: '站厅E', value: 'bgStationE' },
{ name: '站厅F', value: 'bgStationF' },
],
rules: {

View File

@ -22,7 +22,7 @@
</template>
<script>
import { generatePlanTrain, listUserRoutingData } from '@/api/runplan';
import { generatePlanTrain, listUserRoutingData, querySectionListByRouting } from '@/api/runplan';
export default {
props: {
loadRunPlanId: {
@ -54,8 +54,6 @@ export default {
overTime: '22:00:00', //
runLevel:3, //
departureInterval:300, //
// inboundRouting:'', // code
// outboundRouting:'', // code
outAndIn:false, //
runningRouting1: '', // code1
runningRouting2: '', // code2
@ -65,7 +63,6 @@ export default {
rules: {
serviceNumber:[
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
// {required: true, validator: this.validateServiceNumber, trigger: 'change'}
{required: true, validator: this.validateServiceNo, trigger: 'change'}
],
beginTime: [
@ -123,11 +120,9 @@ export default {
this.dataLoading = true;
listUserRoutingData(mapId).then(response => {
const list = response.data;
// this.routingList = list.map(elem => { return { value: elem.code, label: elem.name, routingType:elem.routingType, startSectionCode: elem.startSectionCode, endSectionCode: elem.endSectionCode }; });
// console.time();
console.time();
list.forEach(elem=>{
// this.routingList.push({value: elem.code, label: elem.name, routingType:elem.routingType});
this.routingMap[elem.id] = {parkSectionCodeList:elem.parkSectionCodeList};
// this.routingMap[elem.id] = {parkSectionCodeList:elem.parkSectionCodeList};
if (elem.routingType === 'LOOP') {
// const name = elem.name;
// let temp = '';
@ -137,7 +132,6 @@ export default {
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].label = elem.name;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].value = elem.startSectionCode + '-' + elem.endSectionCode;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].runningRouting1 = elem.id;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].runningRouting1 = elem.id;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].startStationCode = elem.startStationCode;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].endStationCode = elem.endStationCode;
} else {
@ -149,7 +143,6 @@ export default {
});
this.runningRoutingMap = runningRoutingMap;
this.onRunningRouteChange();
// console.timeEnd();
this.dataLoading = false;
}).catch(_ => {
console.log(_);
@ -208,24 +201,34 @@ export default {
},
onRunningRouteChange(runningRouting = '') {
const temp = this.runningRoutingMap[runningRouting];
if (this.oldsection.length > 0) {
this.changeSectionSelected(this.oldsection, false);
}
if (temp) {
this.formModel.runningRouting1 = temp.runningRouting1;
this.formModel.runningRouting2 = temp.runningRouting2;
// if (this.routingMap[temp.runningRouting1] && this.routingMap[temp.runningRouting2]) {
// }
//
if (this.routingMap[temp.runningRouting1] && this.routingMap[temp.runningRouting2]) {
const parkSectionCodeList = this.routingMap[temp.runningRouting1].parkSectionCodeList;
parkSectionCodeList.push(...this.routingMap[temp.runningRouting2].parkSectionCodeList);
this.changeSectionSelected(parkSectionCodeList, true);
this.oldsection = parkSectionCodeList;
}
this.$emit('mapLoading', true);
querySectionListByRouting(temp.runningRouting1).then(resp=>{
querySectionListByRouting(temp.runningRouting2).then(res=>{
const parkSectionCodeList = resp.data;
// this.routingMap[temp.runningRouting1].parkSectionCodeList;
parkSectionCodeList.push(...res.data);
// this.routingMap[temp.runningRouting2].parkSectionCodeList
this.changeSectionSelected(parkSectionCodeList, true);
this.oldsection = parkSectionCodeList;
this.$emit('mapLoading', false);
}).catch(error => {
console.log(error.message + '根据交路查询交路区段列表失败');
});
}).catch(error => {
console.log(error.message + '根据交路查询交路区段列表失败');
});
}
// const outboundRoute = this.routingList.find(route => route.value == this.formModel.outboundRouting);
// const inboundRoute = this.routingList.find(route => route.value == this.formModel.inboundRouting);
// const runningRoute = Object.values(this.runningRoutingMap).find(route => route.value == this.formModel.runningRouting);
if (!this.formModel.runningRouting) {
let list = Object.values(this.runningRoutingMap).filter(route=>{ return route.runningRouting1 && route.runningRouting2; });
list = list.sort((a, b) => {
@ -236,11 +239,6 @@ export default {
return startStationA.kmRange == startStationB.kmRange ? endStationCodeA.kmRange - endStationCodeB.kmRange : startStationA.kmRange - startStationB.kmRange;
});
this.runningRouteList = list;
// this.runningRouteList = Object.values(this.runningRoutingMap).filter(route => route.runningRouting1 && route.runningRouting2
// && (outboundRoute && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode) ||
// inboundRoute && [route.startSectionCode, route.endSectionCode].includes(inboundRoute.startSectionCode) ||
// ! inboundRoute && !outboundRoute)
// );
}
this.checkRouteCurrentValue();
@ -304,13 +302,13 @@ export default {
changeSectionSelected(selectedList, flag) {
if (selectedList && selectedList.length > 0) {
if (flag) {
if (this.oldsection.length > 0) {
this.oldsection.forEach((sectionInfo)=>{
const section = this.$store.getters['map/getDeviceByCode'](sectionInfo.sectionCode);
section.instance.drawBatchSelected(section, '');
});
this.oldsection = [];
}
// if (this.oldsection.length > 0) {
// this.oldsection.forEach((sectionInfo)=>{
// const section = this.$store.getters['map/getDeviceByCode'](sectionInfo.sectionCode);
// section.instance.drawBatchSelected(section, '');
// });
// this.oldsection = [];
// }
selectedList.forEach(each=>{
const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode);
const list = section.logicSectionCodeList;

View File

@ -2,9 +2,9 @@
<el-dialog :title="title" :visible.sync="dialogShow" custom-class="content-route" width="100%" :fullscreen="true" top="0px" :before-close="close" :z-index="2000" :append-to-body="true">
<div class="content-box">
<div v-if="type=='generateRouting'">
<gernarate-plan ref="gernaratePlanTrain" @close="closeDialog" />
<gernarate-plan ref="gernaratePlanTrain" @close="closeDialog" @mapLoading="mapLoading" />
</div>
<jlmap-visual ref="jlmapVisual" @onMenu="onContextmenu" @onSelect="clickEvent" />
<jlmap-visual ref="jlmapVisual" v-loading="loadingMap" @onMenu="onContextmenu" @onSelect="clickEvent" />
<!-- :style="{height: $store.state.app.height-54+'px' }" -->
<div v-if="type=='routeMap'" class="routeMap">
<route-config ref="routeConfig" />
@ -39,7 +39,8 @@ export default {
dialogShow: false,
oldDevice: null,
oldsection:[],
isFirst:true
isFirst:true,
loadingMap:false
};
},
watch: {
@ -147,6 +148,9 @@ export default {
},
closeDialog() {
this.dialogShow = false;
},
mapLoading(status) {
this.loadingMap = status;
}
}
};