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