linyanfei 3 years ago
parent
commit
4c74d5024e
1 changed files with 6 additions and 1 deletions
  1. 6 1
      shanXiPlatform/src/layout/components/TagsView/index.vue

+ 6 - 1
shanXiPlatform/src/layout/components/TagsView/index.vue

@@ -143,7 +143,6 @@ export default {
143
         // this.administrativeDivision = 140000
143
         // this.administrativeDivision = 140000
144
         this.homeType = JSON.parse(getUser()).homeType
144
         this.homeType = JSON.parse(getUser()).homeType
145
         this.depotId = this.$store.state.depotId
145
         this.depotId = this.$store.state.depotId
146
-
147
         if (JSON.parse(getUser()).homeType == 2) {
146
         if (JSON.parse(getUser()).homeType == 2) {
148
             let cfIds = ""
147
             let cfIds = ""
149
             let depotId = this.$store.state.depotId
148
             let depotId = this.$store.state.depotId
@@ -193,6 +192,12 @@ export default {
193
             getpointll(this.homeType, this.depotId).then(res => {
192
             getpointll(this.homeType, this.depotId).then(res => {
194
                 this.mapList = res.data
193
                 this.mapList = res.data
195
                 for (var i = 0; i < res.data.length; i++) {
194
                 for (var i = 0; i < res.data.length; i++) {
195
+                      if(    this.$store.state.depotName  == res.data[i].name){
196
+                          this.$store.commit({
197
+                                    type: "changeareacode",
198
+                                    areacodes: res.data[i].cityCode
199
+                                })
200
+                      }
196
                     var key = res.data[i].name
201
                     var key = res.data[i].name
197
                     this.mapAll[key] = [res.data[i].lon, res.data[i].lat]
202
                     this.mapAll[key] = [res.data[i].lon, res.data[i].lat]
198
                 }
203
                 }