陈冉 6 gadus atpakaļ
vecāks
revīzija
a175380725

+ 1
- 0
package.json Parādīt failu

@@ -55,4 +55,5 @@
55 55
     "last 2 versions",
56 56
     "not ie <= 8"
57 57
   ]
58
+
58 59
 }

Binārs
src/img/bottomdrawing.jpg Parādīt failu


Binārs
src/img/bottomdrawing.png Parādīt failu


Binārs
src/img/lADPDgQ9qVdv2kDNAazNAu4_750_428.jpg Parādīt failu


Binārs
src/img/lALPDgQ9qVOiyrPMuMy9_189_184.png Parādīt failu


Binārs
src/img/lALPDgQ9qVOltnrM2MzY_216_216.png Parādīt failu


+ 45
- 21
src/pages/building/buildingdetail.vue Parādīt failu

@@ -60,26 +60,26 @@
60 60
         </div>
61 61
         <van-row class="user-links">
62 62
           <van-col span="6" >
63
-            <div class="modulearea school" @click="perimeterinformation(school)">
63
+            <div class="modulearea school" @click="perimeterinformation(detail,school)">
64 64
               <i class="iconfont  icon-icon-test2 icontype"></i>
65 65
               <span class="characters">学校</span>
66 66
             </div>
67 67
           </van-col> 
68 68
           <van-col span="6">
69
-            <div class="modulearea histoptal" @click="perimeterinformation(histoptal)">
69
+            <div class="modulearea histoptal" @click="perimeterinformation(detail,hospital)">
70 70
               <i class="iconfont icon-icon-test4 icontype"></i>
71 71
               <span class="characters">医院</span>
72 72
             </div>
73 73
           </van-col>
74 74
 
75 75
           <van-col span="6">
76
-            <div class="modulearea taxi" @click="perimeterinformation(taxi)">
76
+            <div class="modulearea taxi" @click="perimeterinformation(detail,traffic)">
77 77
               <i class="iconfont icon-icon-test1 icontype"></i>
78 78
               <span class="characters">交通</span>
79 79
             </div>
80 80
           </van-col>
81 81
           <van-col span="6">
82
-            <div class="modulearea sround" @click="perimeterinformation(sround)">
82
+            <div class="modulearea sround" @click="perimeterinformation(detail,business)">
83 83
               <i class="iconfont icon-icon-test3 icontype"></i>
84 84
               <span class="characters">商业</span>
85 85
             </div>
@@ -118,6 +118,7 @@ const {mapState: mapbuildState, mapActions:mapbuildActions} = createNamespacedHe
118 118
 const {mapState: mapcollectState, mapActions:mapcollectActions} = createNamespacedHelpers('collect')
119 119
 const {mapState: mapdelectState, mapActions:mapdelectActions} = createNamespacedHelpers('delete')
120 120
 const {mapState: mapvisitState, mapActions:mapvisitActions} = createNamespacedHelpers('visitors')
121
+const { mapState: mapareaState, mapActions: mapareaActions} = createNamespacedHelpers("map");
121 122
 
122 123
 export default {
123 124
   name: "BuildingDetail",
@@ -127,6 +128,10 @@ export default {
127 128
       activeName: "",
128 129
       collect:'',
129 130
       id:'',
131
+      school:"学校",
132
+      hospital:"医院",
133
+      traffic:"交通",
134
+      business:"商业",
130 135
       isopen:false,
131 136
       swiperOption: {
132 137
           pagination: {
@@ -155,6 +160,9 @@ export default {
155 160
     ...mapvisitState({
156 161
       browsingnum: s => s.browsingnum
157 162
     }),
163
+    ...mapareaState({
164
+      mapinfo: s => s.mapinfo
165
+    }),
158 166
 
159 167
     pages () {
160 168
       const pages = []
@@ -180,6 +188,7 @@ export default {
180 188
     ...mapvisitActions(['postVisitors']),
181 189
     ...mapdelectActions(['getDeleteCollect']),
182 190
     ...mapbuildActions(['numadd']),
191
+    ...mapareaActions(['getMap']),
183 192
     //跳转到预约看房页面
184 193
     gotoLookHouse () {
185 194
       this.$router.push({ 
@@ -218,30 +227,45 @@ export default {
218 227
         collect :this.$route.query.collect},
219 228
         this.$toast("取消收藏成功"))
220 229
       }
221
-      window.console.log(buildingid)
222 230
       },
223 231
       //浏览人数
224 232
       addvistornum(element){
225
-      window.console.log(333)
226
-      let self = this;
227
-      if(!this.isopen){
228
-        this.postVisitors({
229
-            id: element.id,
230
-            browsingnu:element.browsingnum+1,
231
-          }).then(()=>{
232
-            self.numadd({id:element.id});
233
-          });
234
-      }
235
-       this.isopen = !this.isopen; 
236
-      },
233
+        let self = this;
234
+        if(!this.isopen){
235
+          this.postVisitors({
236
+              id: element.id,
237
+              browsingnu:element.browsingnum+1,
238
+            }).then(()=>{
239
+              self.numadd({id:element.id});
240
+            });
241
+        }
242
+        this.isopen = !this.isopen; 
243
+        },
237 244
 
238 245
 //周边配套信息
239
-    perimeterinformation () {
240
-       this.$router.push({ 
246
+    perimeterinformation (element,tag) {
247
+      let self = this;
248
+      this.getMap({
249
+        id: element.buildingid,
250
+        buildingname:element.buildingname,
251
+        areaname:element.areaname,
252
+        tag:tag,
253
+      }).then( ()=>{
254
+      this.$router.push({ 
241 255
         name: "perimetertype",
242
-        query: { id: this.detail.buildingid }
256
+        query: {
257
+        id: element.buildingid ,
258
+        lat:this.mapinfo.latitude,
259
+        lng:this.mapinfo.longitude,
260
+        buildingname:element.buildingname,
261
+        areaname:element.areaname,
262
+        tag:tag,
263
+        // hospital:hospital,
264
+        // traffic:traffic,
265
+        // business:business
266
+        }
243 267
       });
244
-      window.console.log(111)
268
+      })
245 269
     }
246 270
   }
247 271
 };

+ 73
- 16
src/pages/building/buildingimage.vue Parādīt failu

@@ -3,7 +3,7 @@
3 3
     <vue-headful title="楼盘相册"  />
4 4
     <div class="houseimagecontent">
5 5
       <div class="houseimage">
6
-        <swiper ref='mySwiper' class="slidewrapper">
6
+        <swiper :options="swiperOption" ref="mySwiper" class="slidewrapper">
7 7
             <swiper-slide class="slideimg" v-for="(list1, index1) in detail.imageLst1" :key="index1">
8 8
                 <img class="lazyimage" :src="list1.fileurl" />
9 9
                 <div class="houseindex">
@@ -118,7 +118,7 @@
118 118
       </div>
119 119
     </div>
120 120
     <div class="imageboxtype" >
121
-      <div class="drawingimpress" v-for="(list, index) in lists" :key="index"  @click="toggle(index)" :class='{active:list.active}'>
121
+      <div class="drawingimpress" v-for="(list, index) in lists" :key="index"  @click="toggle(index,detail)" :class='{active:list.active}'>
122 122
         <span class="boxcharacters" :class='{active:list.active}'>{{list.imagetypename}}</span>
123 123
       </div>
124 124
     </div>
@@ -127,8 +127,8 @@
127 127
 
128 128
 <script>
129 129
 import { mapState, mapActions } from "vuex";
130
-import bottomDrawing from '../../img/bottomdrawing.png'
131
-import Swiper from 'swiper'; 
130
+import bottomDrawing from "../../img/bottomdrawing.jpg";
131
+import Swiper from "swiper";
132 132
 
133 133
 export default {
134 134
   name: "BuildingImage",
@@ -136,7 +136,8 @@ export default {
136 136
     return {
137 137
       lists: [],
138 138
       bottomDrawing,
139
-      showPage:false
139
+      showPage: false,
140
+      swiperOption: {}
140 141
     };
141 142
   },
142 143
   components: {
@@ -145,11 +146,14 @@ export default {
145 146
   computed: {
146 147
     ...mapState({
147 148
       detail: s => s.buildingimage.detail
148
-    }),
149
+    })
150
+    // swiper() {
151
+    //     return this.$refs.mySwiper.swiper;
152
+    //   }
149 153
   },
150 154
   created() {
151 155
     this.getBuildingimage({ buildingid: this.$route.query.id }).then(() => {
152
-      this.showPage = true
156
+      this.showPage = true;
153 157
       this.lists = this.detail.imageTypeLst;
154 158
       this.lists.forEach((curr, index) => {
155 159
         curr.active = false;
@@ -158,25 +162,78 @@ export default {
158 162
         }
159 163
       });
160 164
     });
165
+    let config = {
166
+      on: {
167
+        slideChangeTransitionEnd: () => {
168
+          console.log(this.detail);
169
+          let swiper = this.$refs.mySwiper.swiper;
170
+          console.log(swiper.activeIndex);
171
+          console.log(parseInt(this.detail.imageLstCount1));
172
+              // debugger;
173
+          if (swiper.activeIndex <parseInt(this.detail.imageLstCount1)) {
174
+            this.detail.imageTypeLst[0].active = true;
175
+            console.log( this.detail.imageTypeLst[0])
176
+          }else if(swiper.activeIndex <(parseInt(this.detail.imageLstCount1)+parseInt(this.detail.imageLstCount2))){
177
+            this.detail.imageTypeLst[1]
178
+          }else if(swiper.activeIndex <(parseInt(this.detail.imageLstCount1)+parseInt(this.detail.imageLstCount2)+parseInt(this.detail.imageLstCount3))){
179
+            this.detail.imageTypeLst[2]
180
+          }else if(swiper.activeIndex <(parseInt(this.detail.imageLstCount1)+parseInt(this.detail.imageLstCount2)+parseInt(this.detail.imageLstCount3)+parseInt(detail.imageLstCount4))){
181
+            this.detail.imageTypeLst[3]
182
+          }else if(swiper.activeIndex <(parseInt(detail.imageLstCount1)+parseInt(detail.imageLstCount2)+parseInt(detail.imageLstCount3)+parseInt(detail.imageLstCount4)+parseInt(detail.imageLstCount5))){
183
+            this.detail.imageTypeLst[4]
184
+          }
185
+        }
186
+      }
187
+    };
188
+    this.swiperOption = { ...config };
161 189
   },
162 190
   methods: {
163 191
     ...mapActions(["getBuildingimage"]),
164
-    toggle(ind) {
165
-      this.swiper().slideTo(ind, 1000, false)
166
-        let list = []
167
-        this.lists.forEach((curr, index) => {
192
+    toggle(ind, detail) {
193
+      // debugger
194
+      // this.swiper().slideTo(ind, 1000, false);
195
+      let list = [];
196
+      this.lists.forEach((curr, index) => {
168 197
         curr.active = false;
169 198
         if (index === ind) {
170 199
           curr.active = true;
171 200
         }
172
-        list.push(curr)
201
+        list.push(curr);
173 202
       });
174
-      this.lists = []
175
-      this.lists = list
203
+      this.lists = [];
204
+      this.lists = list;
205
+      if (ind == 0) {
206
+        this.swiper().slideTo(0, 1000, false);
207
+      } else if (ind == 1) {
208
+        this.swiper().slideTo(parseInt(detail.imageLstCount1), 1000, false);
209
+      } else if (ind == 2) {
210
+        this.swiper().slideTo(
211
+          parseInt(detail.imageLstCount1) + parseInt(detail.imageLstCount2),
212
+          1000,
213
+          false
214
+        );
215
+      } else if (ind == 3) {
216
+        this.swiper().slideTo(
217
+          parseInt(detail.imageLstCount1) +
218
+            parseInt(detail.imageLstCount2) +
219
+            parseInt(detail.imageLstCount3),
220
+          1000,
221
+          false
222
+        );
223
+      } else if (ind == 4) {
224
+        this.swiper().slideTo(
225
+          parseInt(detail.imageLstCount1) +
226
+            parseInt(detail.imageLstCount2) +
227
+            parseInt(detail.imageLstCount3) +
228
+            parseInt(detail.imageLstCount4),
229
+          1000,
230
+          false
231
+        );
232
+      }
176 233
     },
177 234
     swiper() {
178
-        return this.$refs.mySwiper.swiper
179
-      }
235
+      return this.$refs.mySwiper.swiper;
236
+    }
180 237
   }
181 238
 };
182 239
 </script>

+ 147
- 68
src/pages/building/perimetertype.vue Parādīt failu

@@ -1,97 +1,176 @@
1 1
 <template>
2
-    <div class=context>
2
+    <div class="context" >
3 3
             <vue-headful title="周边配套"  />
4 4
             <div class="mapId">
5 5
                 <div id='mapcointainer'></div>
6 6
             </div>
7
-            <van-row class="user-links">
8
-                <van-col span="6">
9
-                    <i class="iconfont  icon-icon-test2 icontype"></i>
10
-                    <span class="characters">学校</span>
11
-                </van-col>
12
-                <van-col span="6">
13
-                    <i class="iconfont icon-icon-test4 icontype"></i>
14
-                    <span class="characters">医院</span>
15
-                </van-col>
16
-                <van-col span="6">
17
-                    <i class="iconfont icon-icon-test1 icontype"></i>
18
-                    <span class="characters">交通</span>
19
-                </van-col>
20
-                <van-col span="6">
21
-                    <i class="iconfont icon-icon-test3 icontype"></i>
22
-                    <span class="characters">商业</span>
23
-                </van-col>
24
-            </van-row>
7
+             <van-row class="user-links">
8
+          <van-col span="6" >
9
+            <div class="modulearea school" @click="searchContent('学校')" >
10
+              <i class="iconfont  icon-icon-test2 icontype" :class='{active:active}'></i>
11
+              <span class="characters" :class='{active:active}'>学校</span>
12
+            </div>
13
+          </van-col> 
14
+          <van-col span="6">
15
+            <div class="modulearea histoptal" @click="searchContent('医院')" >
16
+              <i class="iconfont icon-icon-test4 icontype" :class='{active:active}'></i>
17
+              <span class="characters" :class='{active:active}'>医院</span>
18
+            </div>
19
+          </van-col>
20
+
21
+          <van-col span="6">
22
+            <div class="modulearea taxi" @click="searchContent('交通')" >
23
+              <i class="iconfont icon-icon-test1 icontype" :class='{active:active}'></i>
24
+              <span class="characters" :class='{active:active}'>交通</span>
25
+            </div>
26
+          </van-col>
27
+          <van-col span="6">
28
+            <div class="modulearea sround" @click="searchContent('商业')" >
29
+              <i class="iconfont icon-icon-test3 icontype" :class='{active:active}'></i>
30
+              <span class="characters" :class='{active:active}'>商业</span>
31
+            </div>
32
+          </van-col>
33
+        </van-row>
25 34
     </div>
26 35
 </template>
27 36
 
28 37
 <script>
29
-import {lazyAmapApiLoaderInstanse} from 'vue-amap';
38
+import { lazyAmapApiLoaderInstanse } from "vue-amap";
39
+import { createNamespacedHelpers } from "vuex";
40
+// const { mapState: mapareaState, mapActions: mapareaActions} = createNamespacedHelpers("map");
41
+
42
+let map;
43
+let routerParams;
44
+let marker;
30 45
 export default {
31
-  name:'perimetertype',
46
+  name: "perimetertype",
47
+  data(){
48
+      return{
49
+          keyword:String,
50
+        //   active:false
51
+      }
52
+  },
32 53
   components: {
33
-    'vue-headful': () => import('vue-headful'),
54
+    "vue-headful": () => import("vue-headful")
55
+  },
56
+  //    computed: {
57
+  //     ...mapareaState({
58
+  //       mapinfo: s => s.mapinfo
59
+  //     }),
60
+  //   },
61
+  created() {
62
+    // 取到路由带过来的参数 
63
+    routerParams = this.$route.query;
34 64
   },
35
-  data () {
36
-        return {
37
-    
38
-        }
39
-    },
40 65
   mounted() {
41
-    this.map = new AMap.Map('mapcointainer', {
42
-        resizeEnable:true,
43
-        zoom:11,
44
-        center:[118.915671,32.075366]
45
-    })
46
-   }
47
-}
66
+    this.init();
67
+  },
68
+  methods: {
69
+    //    ...mapareaActions(["getMap"]),
70
+    init() {
71
+      map = new AMap.Map("mapcointainer", {
72
+        resizeEnable: true,
73
+        zoom: 15,
74
+        center: [routerParams.lng, routerParams.lat],
75
+        scrollWheel: false
76
+      });
77
+       AMap.plugin(['AMap.ToolBar','AMap.Scale'],
78
+         ()=>{
79
+             map.addControl(new AMap.ToolBar());
80
+           map.addControl(new AMap.Scale());
81
+        });
82
+      marker = new AMap.Marker({
83
+        position: [routerParams.lng, routerParams.lat],
84
+        title: "routerParams.buildingname",
85
+        map: map
86
+      });
87
+      this.searchAround(routerParams.tag);
88
+    },
89
+
90
+    searchAround(keywords){
91
+        AMap.service(["AMap.PlaceSearch"], ()=> {
92
+        var placeSearch = new AMap.PlaceSearch({
93
+            pageSize: 200, // 单页显示结果条数
94
+            pageIndex: 1, // 页码
95
+            // city: "南京", // 兴趣点城市\
96
+            type:keywords,
97
+            // citylimit: true,  //是否强制限制在设置的城市内搜索
98
+            map: map, // 展现结果的地图实例
99
+            // autoFitView: true // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
100
+        });
101
+        //关键字查询
102
+        var cpoint = [routerParams.lng, routerParams.lat]; //中心点坐标
103
+        placeSearch.searchNearBy(keywords, cpoint, 5000, (status, result)=> {
104
+
105
+        });
106
+    });
107
+    },
108
+    searchContent (val) {
109
+        this.searchAround(val);
110
+        this.active = val;
111
+    },
112
+  }
113
+};
48 114
 </script>
49 115
 
50 116
 <style lang="postcss" scoped>
51
-.context{
117
+.active{
118
+    color:rgba(59,153,252,1)!important;
119
+}
120
+.context {
121
+  width: 100%;
122
+  height: 100%;
123
+
124
+  .mapId {
125
+    width: 100%;
126
+    height: 587px;
127
+
128
+    #mapcointainer {
129
+      width: 100%;
130
+      height: 100%;
131
+    }
132
+  }
133
+  .user-links {
52 134
     width: 100%;
53
-    height: 100%;
135
+    height: 80px;
136
+    display: flex;
54 137
 
55
-    .mapId{
56
-        width: 100%;
57
-        height: 587px;
138
+    /* .icontype {
139
+      font-size: 16px !important;
140
+      color: #babdc0;
141
+    } */
58 142
 
59
-        #mapcointainer{
60
-            width: 100%;
61
-            height: 100%;
62
-        }
143
+    .linevertical {
144
+      border: 1px solid #ededed;
63 145
     }
64
-    .user-links{
65
-        width: 100%;
66
-        height: 80px;
67
-        display: flex;
68 146
 
69
-        .icontype{
70
-            font-size: 16px!important;
71
-            color:#BABDC0!important;
72
-        }
73
-        
74
-        .linevertical{
75
-        border:1px solid #EDEDED;
76
-        }
147
+    .van-col--6 {
148
+      display: flex;
149
+      flex-direction: column;
150
+      align-items: center;
151
+      justify-content: center;
77 152
 
78
-        .van-col--6{
79
-          display: flex;
80
-          flex-direction: column;
81
-          align-items: center;
82
-          justify-content: center;
83
-        }
153
+      .modulearea {
154
+        display: flex;
155
+        flex-direction: column;
156
+        align-items: center;
84 157
 
85
-        .characters{
86
-            font-size:16px;
87
-            font-family:PingFangSC-Regular;
88
-            font-weight:400;
89
-            color:rgba(102,102,102,1);
90
-            line-height:22px;
158
+        .icontype {
159
+          font-size: 16px !important;
160
+          color: #babdc0 ;
91 161
         }
162
+      }
92 163
     }
93
-}
94 164
 
165
+    .characters {
166
+      font-size: 16px;
167
+      font-family: PingFangSC-Regular;
168
+      font-weight: 400;
169
+      color: rgba(102, 102, 102, 1);
170
+      line-height: 22px;
171
+    }
172
+  }
173
+}
95 174
 </style>
96 175
 
97 176
 

+ 37
- 24
src/pages/reservation/lookhouse.vue Parādīt failu

@@ -6,11 +6,12 @@
6 6
           <van-cell class="field_name" is-link arrow-direction="down" @click="showName(detail.buildingList)">楼盘名称:<span class="buildingnamelist">{{detail.buildingName}}</span>
7 7
               <van-popup v-model="inside" position="bottom" :overlay="false">
8 8
                 <ul class="housenamelist">
9
-                  <li @click.stop class="namelist" 
9
+                  <li @click.stop class="namelists" 
10 10
                     v-for="list in namelist.buildingList"
11 11
                     :key="list.buildingid"   
12 12
                     @click="clicknamelist(list.buildingid)">
13 13
                     <span class="namelist">{{list.buildingname}}</span>
14
+                    <i class="iconfont icon-gou select_icon"></i>
14 15
                   </li>
15 16
                 </ul>
16 17
               </van-popup>
@@ -82,25 +83,6 @@ export default {
82 83
       }
83 84
     };
84 85
   },
85
-
86
-  filters: {
87
-    formatDate(value) {
88
-      let date = new Date(value);
89
-      let y = date.getFullYear();
90
-      let MM = date.getMonth() + 1;
91
-      MM = MM < 10 ? "0" + MM : MM;
92
-      let d = date.getDate();
93
-      d = d < 10 ? "0" + d : d;
94
-      let h = date.getHours();
95
-      h = h < 10 ? "0" + h : h;
96
-      let m = date.getMinutes();
97
-      m = m < 10 ? "0" + m : m;
98
-      let s = date.getSeconds();
99
-      s = s < 10 ? "0" + s : s;
100
-      return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
101
-    }
102
-  },
103
-
104 86
   computed: {
105 87
     desc() {
106 88
       return this.desc.length;
@@ -155,10 +137,26 @@ export default {
155 137
     },
156 138
     //点击确定按钮选中时间并收起日历
157 139
     confirm(val) {
158
-      this.formdata.booktime = val;
140
+      this.formdata.booktime = this.formatDate(val);
159 141
       window.console.log(val);
160 142
       this.show = false; //点击确认后,show=false,组件隐藏掉,值已经传过去了
161 143
     },
144
+    formatDate(value) {
145
+      let date = new Date(value);
146
+      console.log(date)
147
+      let y = date.getFullYear();
148
+      let MM = date.getMonth() + 1;
149
+      MM = MM < 10 ? "0" + MM : MM;
150
+      let d = date.getDate();
151
+      d = d < 10 ? "0" + d : d;
152
+      let h = date.getHours();
153
+      h = h < 10 ? "0" + h : h;
154
+      let m = date.getMinutes();
155
+      m = m < 10 ? "0" + m : m;
156
+      let s = date.getSeconds();
157
+      s = s < 10 ? "0" + s : s;
158
+      return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
159
+    },
162 160
     //点击楼盘名称栏获取楼盘名称列表
163 161
     showName(buildingid) {
164 162
       this.inside = true;
@@ -297,17 +295,32 @@ export default {
297 295
       height: 224px;
298 296
       overflow: scroll;
299 297
 
300
-      .namelist {
298
+      .namelists {
301 299
         width: 90%;
302 300
         border-bottom: 1px solid #ebebeb;
303 301
         text-align: center;
304 302
         padding: 10px 0;
305
-        font-size: 18px;
303
+        /* font-size: 18px;
306 304
         font-family: PingFangSC-Regular;
307 305
         font-weight: 400;
308 306
         color: rgba(51, 51, 51, 1);
309
-        line-height: 25px;
307
+        line-height: 25px; */
310 308
         margin-left: 20px;
309
+
310
+        .namelist{
311
+          font-size:18px;
312
+          font-family:PingFangSC-Regular;
313
+          font-weight:400;
314
+          color:rgba(51,51,51,1);
315
+          line-height:25px;
316
+        }
317
+
318
+        .select_icon{
319
+              position: absolute;
320
+              top: 12px;
321
+              right: 15px;
322
+              font-size: 20px !important;
323
+        }
311 324
       }
312 325
     }
313 326
   }

+ 0
- 1
src/store/building.js Parādīt failu

@@ -22,7 +22,6 @@ export default {
22 22
     },
23 23
     actions: {
24 24
       getBuilding({ commit }, params) {
25
-        window.console.log(888)
26 25
         return new Promise((resolve, reject) => {
27 26
           request({ ...getAPI('building.getbuilding', { project_id: params.project_id }) }).then((data) => {
28 27
             commit('updateBuilding', data)

+ 5
- 4
src/store/map.js Parādīt failu

@@ -2,18 +2,19 @@ import request from '../utils/request'
2 2
 import getAPI from '../config/apis'
3 3
 
4 4
 export default {
5
+    namespaced: true,
5 6
     state: {
6
-      detail: {},
7
+      mapinfo: {},
7 8
     },
8 9
     mutations: {
9
-      updateMap(state, detail) {
10
-        state.detail = detail
10
+      updateMap(state, mapinfo) {
11
+        state.mapinfo = mapinfo
11 12
       }
12 13
     },
13 14
     actions: {
14 15
       getMap({ commit }, params) {
15 16
         return new Promise((resolve, reject) => {
16
-          request({ ...getAPI('map.getmapinformation', { buildingid: params.buildingid }) }).then((data) => {
17
+          request({ ...getAPI('map.getmapinformation', { buildingid: params.id }) }).then((data) => {
17 18
             commit('updateMap', data)
18 19
             resolve()            
19 20
           }).catch(reject)