bug
This commit is contained in:
@@ -2,12 +2,9 @@
|
||||
<div class="detail">
|
||||
<div class="grid-select">
|
||||
<span class="label">网格选择</span>
|
||||
<div class="value">
|
||||
<AiTreePicker :ops="treeList" v-model="form.id" @select="handleSelect">
|
||||
<div class="grid-name" :style="{ color: form.girdName ? '' : '#c0c4cc' }">{{ form.girdName || '请选择网格' }}
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</AiTreePicker>
|
||||
<div class="grid-select__right" @click="toChoose">
|
||||
<span>{{ form.girdName || '请选择' }}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="map-content">
|
||||
@@ -72,34 +69,22 @@ export default {
|
||||
created() {
|
||||
this.$dict.load('girdType', 'girdLevel')
|
||||
this.areaId = this.user.areaId
|
||||
this.getLeafNodes()
|
||||
// this.getLeafNodes()
|
||||
uni.$on('goback', e => {
|
||||
this.getGridInfo(e.id, true)
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
document.title = "网格管理"
|
||||
},
|
||||
|
||||
methods: {
|
||||
toChoose () {
|
||||
uni.navigateTo({
|
||||
url: './SelectGird?isFormMap=1'
|
||||
})
|
||||
},
|
||||
getLeafNodes() {
|
||||
// this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
|
||||
// if (res.code == 0) {
|
||||
// if (res.data.checkType != '0') {
|
||||
// this.$http.post(`/app/appgirdinfo/queryGirdMemberGirdsById?id=${res.data.appGirdInfo.id}`).then((res) => {
|
||||
// if (res?.data) {
|
||||
// this.treeList = res.data.filter(v => v.girdLevel === '2')
|
||||
|
||||
// const arr = res.data.filter(v => v.points).map(e => {
|
||||
// return {
|
||||
// id: e.id,
|
||||
// girdName: e.girdName,
|
||||
// points: e.points.map(p => [p.lng, p.lat])
|
||||
// }
|
||||
// })
|
||||
|
||||
// arr.length > 0 && this.renderGridMap(arr)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
this.$http.post(`/app/appgirdinfo/queryGirdMemberGirdsById`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.treeList = res.data.filter(v => v.girdLevel === '2')
|
||||
@@ -117,15 +102,25 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
getGridInfo (id) {
|
||||
getGridInfo (id, flag) {
|
||||
this.$loading()
|
||||
this.$http.post(`/app/appgirdinfo/queryDetailById?id=${id}`).then((res) => {
|
||||
this.$hideLoading()
|
||||
if (res?.data) {
|
||||
this.form = res.data
|
||||
|
||||
if (res.data.points && flag) {
|
||||
const arr = [{
|
||||
id: res.data.id,
|
||||
girdName: res.data.girdName,
|
||||
points: res.data.points.map(p => [p.lng, p.lat])
|
||||
}]
|
||||
|
||||
this.renderGridMap(arr)
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.show = true
|
||||
!flag && (this.show = true)
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
@@ -255,6 +250,11 @@ ai-tree-picker {
|
||||
line-height: 44px;
|
||||
color: #333;
|
||||
|
||||
.grid-select__right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.label {
|
||||
display: inline-block;
|
||||
width: 140px;
|
||||
|
||||
Reference in New Issue
Block a user