地图绘图代码调整

This commit is contained in:
joylink_cuiweidong 2020-08-11 14:17:00 +08:00
parent be112d3b96
commit c82edc8516
3 changed files with 41 additions and 26 deletions

View File

@ -72,7 +72,7 @@ export default {
break; break;
} }
case 'StationStand': case 'TrainWindow': { case 'StationStand': case 'TrainWindow': {
this.$emit('updateMapModel', selected); this.$emit('updateMapModel', selected, true);
break; break;
} }
default : { default : {

View File

@ -400,7 +400,10 @@ export default {
}); });
return beCentralizedStation[stationCode] || ''; return beCentralizedStation[stationCode] || '';
}, },
updateMapModel(selected) { updateMapModel(selected, isSpecialTreat) {
//
if (isSpecialTreat) {
//
const models = []; const models = [];
models.push(deepAssign(selected, { _dispose: true })); models.push(deepAssign(selected, { _dispose: true }));
this.espList.forEach(item => { this.espList.forEach(item => {
@ -414,6 +417,11 @@ export default {
} }
}); });
this.$emit('updateMapModel', models); this.$emit('updateMapModel', models);
} else {
//
this.$emit('updateMapModel', selected);
}
}, },
deleteObj() { deleteObj() {
this.$refs.dataform.deleteObj(); this.$refs.dataform.deleteObj();

View File

@ -341,7 +341,10 @@ export default {
edit() { edit() {
this.$refs.dataform.edit(); this.$refs.dataform.edit();
}, },
updateMapModel(selected) { updateMapModel(selected, isSpecialTreat) {
//
if (isSpecialTreat) {
//
const models = []; const models = [];
this.sectionList.forEach(elem => { this.sectionList.forEach(elem => {
if (elem.trainWindowCode == selected.code) { if (elem.trainWindowCode == selected.code) {
@ -352,6 +355,10 @@ export default {
}); });
models.push(deepAssign(selected, { _dispose: true })); models.push(deepAssign(selected, { _dispose: true }));
this.$emit('updateMapModel', models); this.$emit('updateMapModel', models);
} else {
//
this.$emit('updateMapModel', selected);
}
}, },
editTrainWindow() { editTrainWindow() {
this.$refs['addForm'].validate((valid) => { this.$refs['addForm'].validate((valid) => {