Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test_teach
@ -148,7 +148,6 @@ export function listUserRoutingData(mapId) {
|
||||
});
|
||||
}
|
||||
|
||||
// //////// 新添加
|
||||
/** 根据交路查询交路区段列表*/
|
||||
export function querySectionListByRouting(routingCode) {
|
||||
return request({
|
||||
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 145 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 262 KiB After Width: | Height: | Size: 262 KiB |
@ -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) {
|
||||
|
@ -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'
|
||||
|
@ -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: {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|