26796
This commit is contained in:
@@ -72,7 +72,13 @@ export default {
|
|||||||
this.areaId = this.user.areaId
|
this.areaId = this.user.areaId
|
||||||
// this.getLeafNodes()
|
// this.getLeafNodes()
|
||||||
uni.$on('goback', e => {
|
uni.$on('goback', e => {
|
||||||
this.getGridInfo(e.id, true)
|
if (e.girdLevel == '0') {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$u.toast('请选择二级或者三级网格')
|
||||||
|
}, 400)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
this.getGridList(e.id, true)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -103,6 +109,26 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getGridList (id) {
|
||||||
|
this.$loading()
|
||||||
|
this.$http.post(`/app/appgirdinfo/queryChildGirdInfoByGirdId?girdId=${id}`).then((res) => {
|
||||||
|
this.$hideLoading()
|
||||||
|
if (res?.data) {
|
||||||
|
const arr = res.data.map(v => {
|
||||||
|
return {
|
||||||
|
id: v.id,
|
||||||
|
girdName: v.girdName,
|
||||||
|
points: v.points ? v.points.map(p => [p.lng, p.lat]) : []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
this.renderGridMap(arr)
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$hideLoading()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getGridInfo (id, flag) {
|
getGridInfo (id, flag) {
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$http.post(`/app/appgirdinfo/queryDetailById?id=${id}`).then((res) => {
|
this.$http.post(`/app/appgirdinfo/queryDetailById?id=${id}`).then((res) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user