wxwork.config整合
This commit is contained in:
@@ -132,7 +132,7 @@ export default {
|
|||||||
buildPopup: false
|
buildPopup: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {...mapState(['user', 'config'])},
|
computed: {...mapState(['user', 'wxwork'])},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getCommunityList().then(points => {
|
this.getCommunityList().then(points => {
|
||||||
this.getMarkerCluster(points)
|
this.getMarkerCluster(points)
|
||||||
@@ -217,7 +217,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.config.latlng && map.setCenter(this.config.latlng)
|
this.wxwork.config.latlng && map.setCenter(this.wxwork.config.latlng)
|
||||||
let MarkerCluster = new TMap.MarkerCluster({
|
let MarkerCluster = new TMap.MarkerCluster({
|
||||||
map, gridSize: 60,
|
map, gridSize: 60,
|
||||||
enableDefaultStyle: false, // 关闭默认样式
|
enableDefaultStyle: false, // 关闭默认样式
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export default {
|
|||||||
labels: []
|
labels: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {...mapState(['user', 'config'])},
|
computed: {...mapState(['user', 'wxwork'])},
|
||||||
created() {
|
created() {
|
||||||
this.$dict.load('girdType')
|
this.$dict.load('girdType')
|
||||||
this.areaId = this.user.areaId
|
this.areaId = this.user.areaId
|
||||||
@@ -178,7 +178,7 @@ export default {
|
|||||||
});
|
});
|
||||||
map.fitBounds(bounds, {padding: 100})
|
map.fitBounds(bounds, {padding: 100})
|
||||||
} else {
|
} else {
|
||||||
map.setCenter(this.config.latlng)
|
map.setCenter(this.wxwork.config.latlng)
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
lib: Object,
|
lib: Object,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['config']),
|
...mapState(['wxwork']),
|
||||||
key() {
|
key() {
|
||||||
return process.env.NODE_ENV == "production" ?
|
return process.env.NODE_ENV == "production" ?
|
||||||
"RWWBZ-64BEJ-MVLFJ-FTHLQ-JTR6J-SAB2S" :
|
"RWWBZ-64BEJ-MVLFJ-FTHLQ-JTR6J-SAB2S" :
|
||||||
@@ -59,8 +59,8 @@ export default {
|
|||||||
},
|
},
|
||||||
initTMap() {
|
initTMap() {
|
||||||
let latLng = {}
|
let latLng = {}
|
||||||
if (this.config.lat) { //通用版
|
if (this.wxwork.config.lat) { //通用版
|
||||||
latLng = this.config
|
latLng = this.wxwork.config
|
||||||
this.mapLib = TMap
|
this.mapLib = TMap
|
||||||
this.tmap = new TMap.Map(this.$refs.tmap, {
|
this.tmap = new TMap.Map(this.$refs.tmap, {
|
||||||
zoom: 11,
|
zoom: 11,
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ export default {
|
|||||||
buildPopup: false
|
buildPopup: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {...mapState(['user', 'config'])},
|
computed: {...mapState(['user', 'wxwork'])},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getCommunityList().then(points => {
|
this.getCommunityList().then(points => {
|
||||||
this.getMarkerCluster(points)
|
this.getMarkerCluster(points)
|
||||||
@@ -178,7 +178,6 @@ export default {
|
|||||||
getMarkerCluster(points, count = 0) {
|
getMarkerCluster(points, count = 0) {
|
||||||
let {lib: TMap, map} = this
|
let {lib: TMap, map} = this
|
||||||
if (map) {
|
if (map) {
|
||||||
// map.setCenter(this.config.latlng)
|
|
||||||
let MarkerCluster = new TMap.MarkerCluster({
|
let MarkerCluster = new TMap.MarkerCluster({
|
||||||
map, gridSize: 60,
|
map, gridSize: 60,
|
||||||
enableDefaultStyle: false, // 关闭默认样式
|
enableDefaultStyle: false, // 关闭默认样式
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export default {
|
|||||||
latLngCenter: [], //中心点
|
latLngCenter: [], //中心点
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {...mapState(['user', 'config'])},
|
computed: {...mapState(['user'])},
|
||||||
created() {
|
created() {
|
||||||
this.areaId = this.user.areaId
|
this.areaId = this.user.areaId
|
||||||
// this.getLeafNodes()
|
// this.getLeafNodes()
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
list: []
|
list: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {...mapState(['user', 'config'])},
|
computed: {...mapState(['user'])},
|
||||||
|
|
||||||
created () {
|
created () {
|
||||||
this.areaId = this.user.areaId
|
this.areaId = this.user.areaId
|
||||||
|
|||||||
Reference in New Issue
Block a user