Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_cp/dv_cp_wechat_app into dev
This commit is contained in:
		@@ -35,7 +35,8 @@ export default {
 | 
			
		||||
 | 
			
		||||
  computed: {
 | 
			
		||||
    params() {
 | 
			
		||||
      return this.$route.query || {}
 | 
			
		||||
      let {linkUrl} = this.$route.query
 | 
			
		||||
      return {...this.$route.query, linkUrl: decodeURIComponent(linkUrl)} || {}
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
@@ -73,7 +74,7 @@ export default {
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    confirm() {
 | 
			
		||||
      uni.navigateBack({})
 | 
			
		||||
      uni.navigateBack({delta: -2})
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  onShow() {
 | 
			
		||||
 
 | 
			
		||||
@@ -26,8 +26,7 @@
 | 
			
		||||
      <img src="./img/build-icon.png" alt=""> 楼栋<br/>列表
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="map-content">
 | 
			
		||||
      <AiTMap v-if="user.areaId" :areaId="user.areaId" :map.sync="map" :lib.sync="lib" :ops="ops"
 | 
			
		||||
              :libraries="['service', 'tools']"/>
 | 
			
		||||
      <AiTMap :map.sync="map" :lib.sync="lib" :ops="ops" :libraries="['service', 'tools']"/>
 | 
			
		||||
    </div>
 | 
			
		||||
    <u-popup v-model="showPop" mode="bottom" border-radius="14">
 | 
			
		||||
      <div class="popup">
 | 
			
		||||
@@ -111,7 +110,6 @@ import {mapState} from 'vuex'
 | 
			
		||||
export default {
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      latLngCenter: {},
 | 
			
		||||
      ops: {},
 | 
			
		||||
      lib: null,
 | 
			
		||||
      map: null,
 | 
			
		||||
@@ -133,9 +131,9 @@ export default {
 | 
			
		||||
      buildPopup: false
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {...mapState(['user'])},
 | 
			
		||||
  computed: {...mapState(['user', 'config'])},
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.getCenterLatLng().then(points => {
 | 
			
		||||
    this.getCommunityList().then(points => {
 | 
			
		||||
      this.getMarkerCluster(points)
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
@@ -146,14 +144,6 @@ export default {
 | 
			
		||||
    this.$dict.load("communityBuildingType")
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getCenterLatLng() {
 | 
			
		||||
      return this.$http.post(`/app/appdvcpconfig/getCorpLocation`).then(res => {
 | 
			
		||||
        if (res?.data) {
 | 
			
		||||
          this.latLngCenter = res.data
 | 
			
		||||
          return this.getCommunityList()
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    getCommunityList() {
 | 
			
		||||
      return this.$http.post('/app/appcommunitybuildinginfo/listByBuilding', null, {
 | 
			
		||||
        params: {
 | 
			
		||||
@@ -178,7 +168,7 @@ export default {
 | 
			
		||||
    getMarkerCluster(points, count = 0) {
 | 
			
		||||
      let {lib: TMap, map} = this
 | 
			
		||||
      if (map) {
 | 
			
		||||
        map.setCenter(this.latLngCenter)
 | 
			
		||||
        map.setCenter(this.config.latlng)
 | 
			
		||||
        let MarkerCluster = new TMap.MarkerCluster({
 | 
			
		||||
          map, gridSize: 60,
 | 
			
		||||
          enableDefaultStyle: false, // 关闭默认样式
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,6 @@
 | 
			
		||||
            </span>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
      </div>
 | 
			
		||||
    </u-popup>
 | 
			
		||||
 | 
			
		||||
@@ -62,7 +61,7 @@ export default {
 | 
			
		||||
      polygons: []
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {...mapState(['user'])},
 | 
			
		||||
  computed: {...mapState(['user', 'config'])},
 | 
			
		||||
  created() {
 | 
			
		||||
    this.$dict.load('girdType', 'girdLevel')
 | 
			
		||||
    this.areaId = this.user.areaId
 | 
			
		||||
@@ -82,7 +81,7 @@ export default {
 | 
			
		||||
              arr.push(e.points.map(p => [p.lng, p.lat]))
 | 
			
		||||
            }
 | 
			
		||||
          })
 | 
			
		||||
          arr.length>0&&this.renderGridMap(arr)
 | 
			
		||||
          arr.length > 0 && this.renderGridMap(arr)
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
@@ -94,6 +93,7 @@ export default {
 | 
			
		||||
          this.polygons.forEach(e => e.destroy())
 | 
			
		||||
          this.polygons = []
 | 
			
		||||
        }
 | 
			
		||||
        if (paths?.length > 0) {
 | 
			
		||||
          let bounds = []
 | 
			
		||||
          paths.forEach((path, i) => {
 | 
			
		||||
            let color = colors[i % colors.length]
 | 
			
		||||
@@ -121,6 +121,10 @@ export default {
 | 
			
		||||
            ]);
 | 
			
		||||
          });
 | 
			
		||||
          map.fitBounds(bounds, {padding: 100})
 | 
			
		||||
        } else {
 | 
			
		||||
          map.setCenter(this.config.latlng)
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
      } else {
 | 
			
		||||
        if (count < 5) {
 | 
			
		||||
          setTimeout(() => {
 | 
			
		||||
 
 | 
			
		||||
@@ -32,5 +32,8 @@ const app = new Vue({
 | 
			
		||||
  store,
 | 
			
		||||
  ...App
 | 
			
		||||
});
 | 
			
		||||
store.dispatch("agentSign").then(config => {
 | 
			
		||||
  store.commit("getConfig", {...config, latlng: [config.lat, config.lng]})
 | 
			
		||||
  app.$mount();
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
app.$mount();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user