地图绘图代码调整
This commit is contained in:
parent
be112d3b96
commit
c82edc8516
@ -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 : {
|
||||||
|
@ -400,20 +400,28 @@ export default {
|
|||||||
});
|
});
|
||||||
return beCentralizedStation[stationCode] || '';
|
return beCentralizedStation[stationCode] || '';
|
||||||
},
|
},
|
||||||
updateMapModel(selected) {
|
updateMapModel(selected, isSpecialTreat) {
|
||||||
const models = [];
|
// 是否特殊处理
|
||||||
models.push(deepAssign(selected, { _dispose: true }));
|
if (isSpecialTreat) {
|
||||||
this.espList.forEach(item => {
|
// 用于删除
|
||||||
if (item.standCode == selected.code) {
|
const models = [];
|
||||||
models.push(deepAssign(item, { _dispose: true }));
|
models.push(deepAssign(selected, { _dispose: true }));
|
||||||
}
|
this.espList.forEach(item => {
|
||||||
});
|
if (item.standCode == selected.code) {
|
||||||
this.psdList.forEach(item => {
|
models.push(deepAssign(item, { _dispose: true }));
|
||||||
if (item.standCode == selected.code) {
|
}
|
||||||
models.push(deepAssign(item, { _dispose: true }));
|
});
|
||||||
}
|
this.psdList.forEach(item => {
|
||||||
});
|
if (item.standCode == selected.code) {
|
||||||
this.$emit('updateMapModel', models);
|
models.push(deepAssign(item, { _dispose: true }));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.$emit('updateMapModel', models);
|
||||||
|
} else {
|
||||||
|
// 用于更新
|
||||||
|
this.$emit('updateMapModel', selected);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
deleteObj() {
|
deleteObj() {
|
||||||
this.$refs.dataform.deleteObj();
|
this.$refs.dataform.deleteObj();
|
||||||
|
@ -341,17 +341,24 @@ export default {
|
|||||||
edit() {
|
edit() {
|
||||||
this.$refs.dataform.edit();
|
this.$refs.dataform.edit();
|
||||||
},
|
},
|
||||||
updateMapModel(selected) {
|
updateMapModel(selected, isSpecialTreat) {
|
||||||
const models = [];
|
// 是否特殊处理
|
||||||
this.sectionList.forEach(elem => {
|
if (isSpecialTreat) {
|
||||||
if (elem.trainWindowCode == selected.code) {
|
// 用于删除
|
||||||
const section = deepAssign({}, elem);
|
const models = [];
|
||||||
section.trainWindowCode = '';
|
this.sectionList.forEach(elem => {
|
||||||
models.push(section);
|
if (elem.trainWindowCode == selected.code) {
|
||||||
}
|
const section = deepAssign({}, elem);
|
||||||
});
|
section.trainWindowCode = '';
|
||||||
models.push(deepAssign(selected, { _dispose: true }));
|
models.push(section);
|
||||||
this.$emit('updateMapModel', models);
|
}
|
||||||
|
});
|
||||||
|
models.push(deepAssign(selected, { _dispose: true }));
|
||||||
|
this.$emit('updateMapModel', models);
|
||||||
|
} else {
|
||||||
|
// 用于更新
|
||||||
|
this.$emit('updateMapModel', selected);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
editTrainWindow() {
|
editTrainWindow() {
|
||||||
this.$refs['addForm'].validate((valid) => {
|
this.$refs['addForm'].validate((valid) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user