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