26797
This commit is contained in:
17
packages/2.0.5/AppGridMap/components/list.vue
vendored
17
packages/2.0.5/AppGridMap/components/list.vue
vendored
@@ -62,6 +62,7 @@ export default {
|
||||
},
|
||||
defaultExpandedKeys: [],
|
||||
},
|
||||
ops: {},
|
||||
|
||||
path: [],
|
||||
searchObj: {
|
||||
@@ -73,6 +74,7 @@ export default {
|
||||
},
|
||||
infoWindowHtml: "",
|
||||
marker: {},
|
||||
location: {},
|
||||
activeId: null,
|
||||
};
|
||||
},
|
||||
@@ -84,6 +86,7 @@ export default {
|
||||
this.getTreeList().then(() => {
|
||||
this.getLeafNodes()
|
||||
})
|
||||
this.getCorpLocation()
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
@@ -102,6 +105,13 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getCorpLocation(){
|
||||
this.instance.post("/app/appdvcpconfig/getCorpLocation").then(res=>{
|
||||
if(res.code==0){
|
||||
this.location = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getLeafNodes() {
|
||||
this.instance.post(`/app/appgirdinfo/listAll2`).then((res) => {
|
||||
if (res?.data) {
|
||||
@@ -111,7 +121,7 @@ export default {
|
||||
arr.push(e.points.map(p => [p.lng, p.lat]))
|
||||
}
|
||||
})
|
||||
this.renderGridMap(arr)
|
||||
this.renderGridMap(arr, true)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -124,9 +134,12 @@ export default {
|
||||
this.$message.error("所选网格没有标绘!")
|
||||
}
|
||||
},
|
||||
renderGridMap(paths) {
|
||||
renderGridMap(paths, flag) {
|
||||
let {map, mapLib: TMap, retryMapCount} = this
|
||||
if (TMap) {
|
||||
setTimeout(() => {
|
||||
flag && map.setCenter(new TMap.LatLng(this.location.lat, this.location.lng))
|
||||
}, 400)
|
||||
const colors = ["#A194F4", "#7CBDF3", "#F3A57D", "#62D063", "#58DBDA", "#F7D151"]
|
||||
const fitBounds = (latLngList) => {
|
||||
// 由多边形顶点坐标数组计算能完整呈现该多边形的最小矩形范围
|
||||
|
||||
Reference in New Issue
Block a user