Browse Source

fix:四川大厦地图处理

chenzhen2 2 years ago
parent
commit
dc5879a4bf
1 changed files with 11 additions and 2 deletions
  1. 11 2
      src/views/envmonitor/components/Map/MapBox.vue

+ 11 - 2
src/views/envmonitor/components/Map/MapBox.vue

@@ -631,18 +631,24 @@ export default defineComponent({
             proxyData.comMapScale = 0.8;
           }
           if (props.projectId == "Pj1101020007") {
-            proxyData.comMapScale = 1.8;
+            proxyData.comMapScale = 1.5;
           }
           data.width = data.width * proxyData.comMapScale;
           data.height = data.height * proxyData.comMapScale;
+
           let spaceList: any = data?.spaceList ?? [];
           for (let i = 0; i < spaceList.length; i++) {
             let item = spaceList[i];
             item.width = item.width * proxyData.comMapScale;
             item.height = item.height * proxyData.comMapScale;
             item.top = item.top * proxyData.comMapScale;
-            item.left = item.left * proxyData.comMapScale;
+
             item.rotate = item.rotate * 1 + "deg";
+            if (props.projectId == "Pj1101020007") {
+              item.left = (item.left - 120) * proxyData.comMapScale;
+            } else {
+              item.left = item.left * proxyData.comMapScale;
+            }
             item.borderRadius = item.borderRadius
               ? JSON.parse(item.borderRadius)
               : "";
@@ -1351,6 +1357,9 @@ export default defineComponent({
       span {
         color: #fff !important;
       }
+      img {
+        width: 70px;
+      }
     }
     .device span {
       color: #fff !important;