浏览代码

轮廓线问题修复

haojianlong 4 年之前
父节点
当前提交
c3bad66c0a
共有 3 个文件被更改,包括 20 次插入4 次删除
  1. 2 2
      package.json
  2. 9 1
      src/components/baseEditer.vue
  3. 9 1
      src/views/drafts.vue

+ 2 - 2
package.json

@@ -9,9 +9,9 @@
   },
   "dependencies": {
     "@saga-web/base": "2.1.25",
-    "@saga-web/big": "1.0.107",
+    "@saga-web/big": "1.0.109",
     "@saga-web/draw": "2.1.106",
-    "@saga-web/feng-map": "1.0.39",
+    "@saga-web/feng-map": "1.0.41",
     "@saga-web/graph": "2.1.123",
     "ant-design-vue": "^1.6.0",
     "core-js": "^3.6.4",

+ 9 - 1
src/components/baseEditer.vue

@@ -9,7 +9,7 @@
 </template>
 <script>
 import { SFengParser, ProjectRf } from "@saga-web/feng-map";
-import { SFloorParser } from "@saga-web/big";
+import { SFloorParser, SBoardItem } from "@saga-web/big";
 import { FloorView } from "./../lib/FloorView";
 import { EditScence } from "./mapClass/EditScence";
 import bus from "@/bus";
@@ -220,8 +220,16 @@ export default {
         }
       }
     },
+    // 解析楼地板
+    loadBoard(floor){
+      window.FENGMAP.loadFloor(floor, res => {
+        const zone = new SBoardItem(null, res)
+        this.scene.addItem(zone);
+      })
+    },
     // 解析底图
     readBaseMap(floor){
+      this.loadBoard(this.floorList[floor]);
       window.FENGMAP.parseData(this.floorList[floor], res => {
         if (res.err) {
           console.log(res.err);

+ 9 - 1
src/views/drafts.vue

@@ -94,7 +94,7 @@
 <script>
 import Tree from "./../components/Tree/Tree.vue";
 import { SFengParser, ProjectRf } from "@saga-web/feng-map";
-import { SFloorParser } from "@saga-web/big";
+import { SFloorParser, SBoardItem } from "@saga-web/big";
 import { FloorView } from "./../lib/FloorView";
 import { EditScence } from "@/components/mapClass/EditScence";
 import bus from "@/bus";
@@ -270,6 +270,13 @@ export default {
         }
       }
     },
+    // 解析楼地板
+    loadBoard(floor){
+      fengmap.loadFloor(floor, res => {
+        const zone = new SBoardItem(null, res)
+        this.scene.addItem(zone);
+      })
+    },
     // 顶楼为多张图时计数器
     countRf(len) {
       this.count++
@@ -282,6 +289,7 @@ export default {
       }
     },
     readBaseMap(floor){
+      this.loadBoard(this.floorList[floor])
       fengmap.parseData(this.floorList[floor], res => {
         if (res.err) {
           console.log(res.err);