|
@@ -649,7 +649,6 @@ export default {
|
|
|
},
|
|
|
|
|
|
saveRoom() {
|
|
|
- console.log(this.modules, 88888);
|
|
|
const pRadar = {
|
|
|
x: this.x_radar,
|
|
|
y: this.y_radar,
|
|
@@ -660,10 +659,13 @@ export default {
|
|
|
copyModule.forEach((item) => {
|
|
|
const rect = rotateRect_ccw(item, pRadar, pRadar.angle);
|
|
|
const rotatedRect = convert_region_c2r(rect, pRadar);
|
|
|
- // item.x = rotatedRect.x;
|
|
|
- // item.y = rotatedRect.y;
|
|
|
- // item.width = rotatedRect.width;
|
|
|
- // item.length = rotatedRect.length;
|
|
|
+ item.width = item.width;
|
|
|
+ item.length = item.length;
|
|
|
+ item.name = item.name;
|
|
|
+ item.type = item.type;
|
|
|
+ item.rotate = item.rotate || 0;
|
|
|
+ item.x = rotatedRect.x_cm_start;
|
|
|
+ item.y = rotatedRect.y_cm_start;
|
|
|
});
|
|
|
for (const item of copyModule) {
|
|
|
if (
|
|
@@ -680,8 +682,6 @@ export default {
|
|
|
return; // 这里能真正退出整个函数
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- console.log(copyModule, 999999);
|
|
|
this.$http
|
|
|
.post(
|
|
|
"wap/room/saveRoom",
|
|
@@ -805,7 +805,10 @@ export default {
|
|
|
pRadar,
|
|
|
pRadar.angle
|
|
|
);
|
|
|
- console.log(rotatedRect, 999999);
|
|
|
+ item.left = rotatedRect.left;
|
|
|
+ item.top = rotatedRect.top;
|
|
|
+ item.width = rotatedRect.width;
|
|
|
+ item.height = rotatedRect.height;
|
|
|
item.name = item.name;
|
|
|
item.type = item.type;
|
|
|
});
|