区段添加代码调整
This commit is contained in:
parent
103e8c9c49
commit
c203ede054
@ -836,9 +836,17 @@ export default {
|
|||||||
} else if (this.createModel.type == '02') {
|
} else if (this.createModel.type == '02') {
|
||||||
const startModel = this.$store.getters['map/getDeviceByCode'](this.createModel.leftSection);
|
const startModel = this.$store.getters['map/getDeviceByCode'](this.createModel.leftSection);
|
||||||
const endModel = this.$store.getters['map/getDeviceByCode'](this.createModel.rightSection);
|
const endModel = this.$store.getters['map/getDeviceByCode'](this.createModel.rightSection);
|
||||||
|
|
||||||
|
const start_x = startModel.points[startModel.points.length - 1].x;
|
||||||
|
const end_x = endModel.points[0].x;
|
||||||
|
const start_y = startModel.points[startModel.points.length - 1].y;
|
||||||
|
const end_y = endModel.points[0].y;
|
||||||
|
if (start_x == end_x && start_y == end_y) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
model.points = [
|
model.points = [
|
||||||
{ x: startModel.points[startModel.points.length - 1].x, y: startModel.points[startModel.points.length - 1].y },
|
{ x: start_x, y: start_y },
|
||||||
{ x: endModel.points[0].x, y: endModel.points[0].y }
|
{ x: end_x, y: end_y }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
this.$emit('updateMapModel', model);
|
this.$emit('updateMapModel', model);
|
||||||
|
Loading…
Reference in New Issue
Block a user