区段列表变更调整

This commit is contained in:
fan 2019-12-09 15:05:15 +08:00
parent 96f237d581
commit 95caf1509e
2 changed files with 22 additions and 27 deletions

View File

@ -336,7 +336,9 @@ export default {
}
],
oldLeftSectionCode: '',
oldRightSectionCode: ''
oldRightSectionCode: '',
PhysicalSectionList: [],
ReverseSectionList: []
};
},
computed: {
@ -508,23 +510,6 @@ export default {
};
return rules;
},
PhysicalSectionList() {
let list = [];
if (this.sectionList && this.sectionList.length) {
list = this.sectionList.filter(elem => { return elem.type === '01'; });
}
return list;
},
ReverseSectionList() {
let list = [];
if (this.sectionList && this.sectionList.length) {
list = this.sectionList;
list = list.slice(0, list.length);
list.reverse();
}
return list;
},
// true false
isParentCode() {
return this.editModel.type == '02' || this.editModel.relSwitchCode;
@ -616,6 +601,7 @@ export default {
this.TrainPositionTypeList = list;
});
this.regionList = this.$ConstSelect.RegionTypeList;
this.updateRelevantData();
},
methods: {
@ -823,7 +809,6 @@ export default {
this.$emit('updateMapModel', models);
}
}
},
//
edit() {
@ -901,6 +886,7 @@ export default {
updateMapModel(models) {
this.activeName = 'first';
this.$emit('updateMapModel', models);
this.updateRelevantData();
},
//
deleteObj() {
@ -1136,13 +1122,6 @@ export default {
this.$emit('updateMapModel', models);
}
}
this.PhysicalSectionList.forEach(lsection => {
if (lsection.code === this.mergeModel.lsectioncode) {
this.PhysicalSectionList.forEach(rsection => {
});
}
});
}
}
});
@ -1152,6 +1131,23 @@ export default {
return point1.x === point2.x && point1.y === point2.y;
}
return false;
},
// section
updateRelevantData() {
const list = this.$store.getters['map/sectionList'];
this.sectionList = list;
let physicalList = [];
if (list && list.length) {
physicalList = list.filter(elem => { return elem.type === '01'; });
}
this.PhysicalSectionList = physicalList;
let revereseList = [];
if (list && list.length) {
revereseList = list;
revereseList = revereseList.slice(0, revereseList.length);
revereseList.reverse();
}
this.ReverseSectionList = revereseList;
}
}
};

View File

@ -206,7 +206,6 @@ export default {
}
}
});
this.$emit('updateMapModel', model);
} else {
this.$messageBox(this.$t('tip.selectedSectionEmpty'));