新版地图 绘图 交路代码调整
This commit is contained in:
parent
7460abd1f1
commit
101e58118a
@ -170,10 +170,10 @@ export default {
|
||||
this.$emit('selectView', 'draft');
|
||||
},
|
||||
tabBeforeLeave(activeName, oldActiveName) {
|
||||
if (oldActiveName === 'route' || oldActiveName === 'signal' || oldActiveName == 'runLevel') {
|
||||
if (oldActiveName === 'route' || oldActiveName === 'signal' || oldActiveName == 'runLevel' || oldActiveName == 'routing') {
|
||||
this.$refs[this.enabledTabMenu[oldActiveName]].batchSectionListFocus(false);
|
||||
}
|
||||
if (activeName === 'route' || activeName === 'signal' || activeName == 'runLevel') {
|
||||
if (activeName === 'route' || activeName === 'signal' || activeName == 'runLevel' || activeName == 'routing') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs[this.enabledTabMenu[activeName]].batchSectionListFocus(true);
|
||||
});
|
||||
|
@ -78,6 +78,12 @@ export default {
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$emit('setCenter', code);
|
||||
},
|
||||
initLoad() {
|
||||
this.$refs.routeEdit.batchSectionListFocus(true);
|
||||
},
|
||||
batchSectionListFocus(flag) {
|
||||
this.$refs.routeEdit.batchSectionListFocus(flag);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -276,16 +276,16 @@ export default {
|
||||
}
|
||||
},
|
||||
'addModel.parkSectionCodeList':function(val, old) {
|
||||
val.forEach(each=>{
|
||||
const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode);
|
||||
section.instance.drawBatchSelected(section, 'routingSection');
|
||||
});
|
||||
this.changeSectionSelected(val, true);
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.rowDrop();
|
||||
},
|
||||
beforeDestroy() {
|
||||
// debugger;
|
||||
},
|
||||
methods: {
|
||||
// 行拖拽
|
||||
rowDrop() {
|
||||
@ -542,14 +542,27 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
clear() {
|
||||
if (this.$refs && this.$refs.form && this.mapInfo) {
|
||||
if (this.addModel.parkSectionCodeList.length > 0) {
|
||||
this.addModel.parkSectionCodeList.forEach(each=>{
|
||||
batchSectionListFocus(flag) {
|
||||
this.changeSectionSelected(this.addModel.parkSectionCodeList, flag);
|
||||
},
|
||||
changeSectionSelected(selectedList, flag) {
|
||||
if (this.addModel.parkSectionCodeList.length > 0) {
|
||||
if (flag) {
|
||||
selectedList.forEach(each=>{
|
||||
const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode);
|
||||
section.instance.drawBatchSelected(section, 'routingSection');
|
||||
});
|
||||
} else {
|
||||
selectedList.forEach(each=>{
|
||||
const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode);
|
||||
section.instance.drawBatchSelected(section, '');
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
clear() {
|
||||
if (this.$refs && this.$refs.form && this.mapInfo) {
|
||||
this.changeSectionSelected(this.addModel.parkSectionCodeList, false);
|
||||
delete this.addModel.id;
|
||||
this.$refs.form.resetFields();
|
||||
this.addModel.mapId = this.mapInfo.id;
|
||||
|
Loading…
Reference in New Issue
Block a user