소스 검색

Merge branch 'develop' of git.sagacloud.cn:web/wanda-bm-guide into develop

guoxiaohuan 4 년 전
부모
커밋
efacc0eac5
2개의 변경된 파일16개의 추가작업 그리고 10개의 파일을 삭제
  1. 10 4
      src/components/floorMap/index.vue
  2. 6 6
      src/lib/FloorScene.js

+ 10 - 4
src/components/floorMap/index.vue

@@ -92,10 +92,13 @@ export default {
                 // 屋顶
                 if (window.fengmapData.frImg) {
                     let imgItem = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${window.fengmapData.frImg}`)
-                    this.scene.addItem(imgItem)
                     imgItem.showType = SImageShowType.AutoFit;
+                    imgItem.connect('imgLoadOver',this,()=> {
+                        this.readGraph();
+                    })
+                    this.scene.addItem(imgItem)
                     this.view.scene = this.scene
-                    this.view.fitSceneToView()
+                    // this.view.fitSceneToView()
                 }
             } else {
                 if (window.fengmapData.gnameToGid[floor]) {
@@ -109,7 +112,7 @@ export default {
                         this.fParser.spaceList.forEach(t => {
                             this.scene.addItem(t)
                             t.nameSize = 12
-                            t.nameColor = '#646A73'
+                            t.nameColor = '#2a2a2a';
                             if (t.data.Name && this.bunkObj[t.data.Name]) {
                                 t.name = this.bunkObj[t.data.Name].brandname
                             } else {
@@ -123,12 +126,15 @@ export default {
                         this.fParser.columnList.forEach(t => this.scene.addItem(t))
                         this.fParser.casementList.forEach(t => this.scene.addItem(t))
                         this.view.scene = this.scene
-                        this.view.fitSceneToView()
+                        // this.view.fitSceneToView()
+                        this.readGraph()
                     })
                 } else {
                     console.log('楼层不正确')
                 }
             }
+        },
+        readGraph(){
             this.readGroup(this.floorid).then(data => {
                 this.loading = false
                 if (data.Result == 'failure') {

+ 6 - 6
src/lib/FloorScene.js

@@ -11,12 +11,12 @@ import {
 export class FloorScene extends SGraphScene {
   constructor() {
     super()
-    ItemColor.spaceColor = new SColor("#A4ABB22B")
-    ItemColor.wallColor = new SColor("#A7AEB3FF")
-    ItemColor.columnColor = new SColor("#A7AEB3FF")
-    ItemColor.virtualWallColor = new SColor("#A7AEB3FF")
-    ItemColor.selectColor = new SColor("#84A0BB2B")
-    ItemColor.spaceBorderColor = new SColor("#A7AEB3FF")
+    ItemColor.spaceColor = new SColor("#f0f0f0")
+    ItemColor.wallColor = new SColor("#d4d4d4")
+    ItemColor.columnColor = new SColor("#d4d4d4")
+    ItemColor.virtualWallColor = new SColor("#d4d4d4")
+    ItemColor.selectColor = new SColor("#f0f0f0")
+    ItemColor.spaceBorderColor = new SColor("#d4d4d4")
   }
 
   onDoubleClick() {