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