YaolongHan 4 anos atrás
pai
commit
2a08e48b77

+ 2 - 2
src/components/edit/left_toolbar.vue

@@ -7,7 +7,7 @@
         v-for="(item,i) in baseChoice"
         :key="i"
         @click="toolActionClick(item)"
-        v-bind:class="{ actives:item.isChoice}"
+        :class="{ actives:item.isChoice}"
       >
         <div class="item">
           <img
@@ -406,7 +406,6 @@ export default {
     params = decodeURIComponent(params);
     // params = "categoryId=NTXT&ProjectID=5&BuildingID=1&FloorID=1"; // mock 参数
     const paramsArr = params.split("&");
-    console.log("paramsArr", paramsArr);
     const obj = {};
     paramsArr.map(item => {
       const arr = item.split("=");
@@ -455,6 +454,7 @@ export default {
       align-items: center;
       justify-content: center;
       position: relative;
+      cursor: pointer;
       .item {
         margin: 0 auto;
         display: flex;

+ 6 - 3
src/components/mapClass/EditScence.ts

@@ -293,14 +293,15 @@ export class EditScence extends SGraphScene {
         if (this.isSelecting && this._legend) {
             //@ts-ignore
             item.isExtracted = true
-            const SubType = this._legend.SubType ? this._legend.SubType : ''
+            const SubType = this._legend.SubType ? this._legend.SubType : '';
+            const AttachObjectIds = this._legend.InfoLocal ? this._legend.InfoLocal : [];
             const LegendData: Legend = {
                 ID: uuid(),
                 Name: this._legend.Name,
                 GraphElementType: this._legend.Type,
                 Num: 1,
                 GraphElementId: this._legend.Id,
-                AttachObjectIds: [],
+                AttachObjectIds: AttachObjectIds,
                 Type: "Zone",
                 Pos: { X: item.x, Y: item.y },
                 OutLine: item.pointArr[0],
@@ -408,13 +409,15 @@ export class EditScence extends SGraphScene {
      * 增加图标lenged图标
      */
     addIconItem(event: SMouseEvent): void {
+           //获取信息工程化相关参数
+        const AttachObjectIds = this._legend.InfoLocal ? this._legend.InfoLocal : [];
         const LegendData: Legend = {
             ID: uuid(),
             Name: this._legend.Name,
             GraphElementType: this._legend.Type,
             Num: 1,
             GraphElementId: this._legend.Id,
-            AttachObjectIds: [],
+            AttachObjectIds: AttachObjectIds,
             Pos: { X: event.x, Y: event.y },
             Scale: { X: 1, Y: 1, Z: 1 },          // 缩放
             Rolate: { X: 0, Y: 0, Z: 0 },