Browse Source

Merge branch 'master' of http://39.106.8.246:3003/sagacloud/sagacloud-sagacare-weChat

anxiaoxia 1 year ago
parent
commit
0923995068

+ 9 - 15
src/packagesEnv/pages/intelligentControl/home2.wpy

@@ -504,13 +504,7 @@ wepy.component({
   props: {
     space: {
       type: Object,
-      default: {
-        isControlSpace: 0,
-        buildingId: 'Bd1101080259317347f00d0811ebb06b1d2749356f83',
-        spaceId: 'Sp1101080259308f5ed92e964bc1b029038dea962de4',
-        spaceName: '上格云二区',
-        floorId: 'Fl1101080259282bba688d32419caa57685ff17447b2'
-      }
+      default: {}
     }
   },
   store,
@@ -561,9 +555,13 @@ wepy.component({
   watch: {
     // 父亲传过来的空间id 搜索返回才会有这个传递
     space: function(newSpace, oldSpace) {
-      console.log('获取到空间数据--');
-      console.log(newSpace);
-      // console.log(oldSpace)
+      if (newSpace && newSpace.spaceId !== oldSpace.spaceId) {
+        console.log('搜索页面过来', this.space);
+        console.log(this.space);
+        if (this.space.from == 'FindIt') {
+          this.init();
+        }
+      }
     }
   },
   methods: {
@@ -574,8 +572,6 @@ wepy.component({
       console.log(this.foldStatus);
     },
     init() {
-      // this.projectId = 'Pj3301100002';
-      console.log(this.userInfo);
       this.projectId = this.userInfo.projectId;
       this.getPageBuildingList();
     },
@@ -589,7 +585,6 @@ wepy.component({
     },
     //设置建筑名称
     setBuidingItem() {
-      console.log('this.space.buildingId==', this.space.buildingId);
       this.buildingData.map(item => {
         if (item.id == this.space.buildingId) {
           this.selectedBuilding = item.id;
@@ -606,9 +601,7 @@ wepy.component({
       };
       getBuildingList(params).then(res => {
         this.buildingData = res.content || [];
-        console.log('this.selectedBuilding==', this.selectedBuilding);
         this.setBuidingItem();
-        console.log('this.selectedBuilding==', this.selectedBuilding);
         if (this.selectedBuilding) {
           this.getFloorList();
         }
@@ -667,6 +660,7 @@ wepy.component({
     setMapIcon() {
       this.mapAreasInfo.map(item => {
         if (item.spaceId == this.space.spaceId) {
+          console.log(this.selectArea);
           this.selectArea = item;
         }
         if (item.localName) {

+ 2 - 0
src/packagesEnv/pages/search/index.wpy

@@ -324,12 +324,14 @@ wepy.page({
     },
     checkSpace(item) {
       this.activeId = item.permanentSpaceId;
+      console.log("item.permanentSpaceId==",item.permanentSpaceId)
       // 去地图页面
       wx.navigateTo({
         url: `/packagesEnv/pages/officehome/index?from=FindIt&floorId=${
           item.floorId
         }&buildingId=${item.buildingId}&spaceId=${item.permanentSpaceId}`
       });
+      
     },
     // 搜索
     getInputValue(e) {