运行图 代码调整

This commit is contained in:
joylink_cuiweidong 2021-03-05 13:06:06 +08:00
parent e9997a2f7f
commit c785523699

View File

@ -237,7 +237,7 @@ export default {
}, },
filterEndSectionList() { filterEndSectionList() {
if (this.sectionList) { if (this.sectionList) {
return this.sectionList.filter(elem => { return elem.reentryTrack; }); return this.sectionList.filter(elem => { return elem.reentryTrack || elem.transferTrack; });
} else { } else {
return []; return [];
} }
@ -362,7 +362,7 @@ export default {
this.$message.error('请选择正确的起始区段'); this.$message.error('请选择正确的起始区段');
} }
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'endSectionCode'.toUpperCase()) { } else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'endSectionCode'.toUpperCase()) {
if (selected.code != this.addModel.startSectionCode && selected.reentryTrack) { if (selected.code != this.addModel.startSectionCode && (selected.reentryTrack || selected.transferTrack)) {
this.popSection(this.addModel, 'endSectionCode'); this.popSection(this.addModel, 'endSectionCode');
if (this.addModel.startSectionCode == selected.code) { if (this.addModel.startSectionCode == selected.code) {
this.$message.error('起始区段和终到区段不能相同'); this.$message.error('起始区段和终到区段不能相同');
@ -667,7 +667,7 @@ export default {
}, },
popSection(data, type) { popSection(data, type) {
const list = this.addModel.parkSectionCodeList; const list = this.addModel.parkSectionCodeList;
const index = list.findIndex(el => { return el.sectionCode == data[type]}); const index = list.findIndex(el => { return el.sectionCode == data[type]; });
if (index >= 0) { if (index >= 0) {
this.deleteSection(list, index); this.deleteSection(list, index);
} }