删除元素补充

This commit is contained in:
zyy 2020-12-07 18:19:31 +08:00
parent c97074f585
commit ed93c3159e

View File

@ -372,25 +372,25 @@ export default {
if (flag) {
if (item.type == '03') {
const switchModel = this.$store.getters['map/getDeviceByCode'](item.relSwitchCode);
models.push(deepAssign(switchModel, { _dispose: true }));
switchModel && models.push(deepAssign(switchModel, { _dispose: true }));
}
models.push(deepAssign(item, { _dispose: true }));
}
}
});
map.lineList.forEach(item => {
map.lineList && map.lineList.forEach(item => {
const flag = this.fromModel.right ? item.points[0].x >= pointX : item.points[0].x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
}
});
map.trainWindowList.forEach(item => {
map.trainWindowList && map.trainWindowList.forEach(item => {
const flag = this.fromModel.right ? item.point.x > pointX : item.point.x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
}
});
map.powerLineList.forEach(item => {
map.powerLineList && map.powerLineList.forEach(item => {
const flag = this.fromModel.right ? item.points[0].x >= pointX : item.points[0].x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
@ -413,16 +413,71 @@ export default {
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
const esp = map.espList.find(ele => ele.standCode == item.code);
models.push(deepAssign(esp, { _dispose: true }));
esp && models.push(deepAssign(esp, { _dispose: true }));
}
});
map.psdList.forEach(item => {
map.psdList && map.psdList.forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
}
});
map.textList.forEach(item => {
//
map.axleCounterResetButtonList && map.axleCounterResetButtonList.forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
}
});
// GQX
map.tbStrategyList && map.tbStrategyList.forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
}
});
map.zcList && map.zcList.forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
}
});
//
map.cycleButtonList && map.cycleButtonList.forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
}
});
//
map.totalGuideLockButtonVOList && map.totalGuideLockButtonVOList.forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
}
});
//
map.automaticRouteButtonList && map.automaticRouteButtonList.forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
}
});
//
map.outerFrameList && map.outerFrameList.forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
}
});
//
map.directionRodList && map.directionRodList.forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));
}
});
map.textList && map.textList.forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
if (flag) {
models.push(deepAssign(item, { _dispose: true }));