网格
This commit is contained in:
@@ -10,12 +10,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</AiPagePicker>
|
</AiPagePicker>
|
||||||
<div class="grid-input">
|
<div class="grid-input">
|
||||||
<img src="./img/back-icon.png" alt="" class="back-icon" v-if="name && show" @click="show=false">
|
<img src="./img/search-icon-w.png" class="search-icon">
|
||||||
<img src="./img/search-icon-w.png" alt="" class="search-icon" v-else>
|
<input class="input" placeholder="请输入网格名称" v-model="girdName" maxlength="20" confirm-type="search" @confirm="search"/>
|
||||||
<input type="text" class="input" placeholder="请输入姓名、房屋信息" v-model="name" maxlength="10" confirm-type="search"
|
|
||||||
@confirm="search"/>
|
|
||||||
<div class="clear-btn">
|
<div class="clear-btn">
|
||||||
<img src="./img/del-icon.png" alt="" class="del-icon" v-if="name" @click="clear">
|
<img src="./img/del-icon.png" class="del-icon" v-if="girdName" @click="girdName = ''">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -48,6 +46,20 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</div>
|
</div>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<u-popup v-model="isShowGrid" mode="bottom" border-radius="14" height="60%">
|
||||||
|
<div class="grid-wrapper">
|
||||||
|
<div class="title">请选择网格</div>
|
||||||
|
<scroll-view scroll-y="true" class="grid-info">
|
||||||
|
<div
|
||||||
|
class="grid-item"
|
||||||
|
v-for="(item, index) in girdList"
|
||||||
|
@click="form.girdName = item.girdName, getGridList(item.id)"
|
||||||
|
:key="index">
|
||||||
|
{{ item.girdName }}
|
||||||
|
</div>
|
||||||
|
</scroll-view>
|
||||||
|
</div>
|
||||||
|
</u-popup>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -64,18 +76,20 @@ export default {
|
|||||||
show: false,
|
show: false,
|
||||||
form: {girdName: '', id: ''},
|
form: {girdName: '', id: ''},
|
||||||
treeList: [],
|
treeList: [],
|
||||||
name: '',
|
girdName: '',
|
||||||
showSelect: false,
|
showSelect: false,
|
||||||
editor: null,
|
editor: null,
|
||||||
polygons: [],
|
polygons: [],
|
||||||
labels: [],
|
labels: [],
|
||||||
latLngCenter: [], //中心点
|
latLngCenter: [],
|
||||||
|
isShowGrid: false,
|
||||||
|
girdList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {...mapState(['user'])},
|
computed: {...mapState(['user'])},
|
||||||
created() {
|
created() {
|
||||||
this.areaId = this.user.areaId
|
this.areaId = this.user.areaId
|
||||||
this.getLeafNodes()
|
|
||||||
uni.$on('goback', e => {
|
uni.$on('goback', e => {
|
||||||
this.form.girdName = e.girdName
|
this.form.girdName = e.girdName
|
||||||
this.getGridList(e.id, true)
|
this.getGridList(e.id, true)
|
||||||
@@ -91,6 +105,21 @@ export default {
|
|||||||
url: './SelectGird?isFormMap=1'
|
url: './SelectGird?isFormMap=1'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
search () {
|
||||||
|
this.$loading()
|
||||||
|
this.$http.post(`/app/appgirdinfo/list?size=1000&girdName=${this.girdName}`).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
if (res.data.records.length) {
|
||||||
|
this.girdList = res.data.records
|
||||||
|
this.isShowGrid = true
|
||||||
|
} else {
|
||||||
|
this.$u.toast('未查询到网格')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getLeafNodes() {
|
getLeafNodes() {
|
||||||
this.$http.post(`/app/appgirdinfo/queryGirdMemberGirdsById`).then((res) => {
|
this.$http.post(`/app/appgirdinfo/queryGirdMemberGirdsById`).then((res) => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
@@ -112,7 +141,6 @@ export default {
|
|||||||
getGridList(id) {
|
getGridList(id) {
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$http.post(`/app/appgirdinfo/queryChildGirdInfoByGirdId?girdId=${id}`).then((res) => {
|
this.$http.post(`/app/appgirdinfo/queryChildGirdInfoByGirdId?girdId=${id}`).then((res) => {
|
||||||
this.$hideLoading()
|
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
const arr = []
|
const arr = []
|
||||||
res.data.map(v => {
|
res.data.map(v => {
|
||||||
@@ -135,6 +163,7 @@ export default {
|
|||||||
if (!arr.filter(v => v.points).length) {
|
if (!arr.filter(v => v.points).length) {
|
||||||
return this.$u.toast('该网格还未标会')
|
return this.$u.toast('该网格还未标会')
|
||||||
}
|
}
|
||||||
|
this.isShowGrid = false
|
||||||
|
|
||||||
this.renderGridMap(arr.filter(v => v.points))
|
this.renderGridMap(arr.filter(v => v.points))
|
||||||
}
|
}
|
||||||
@@ -285,6 +314,46 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grid-wrapper {
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
height: 80px;
|
||||||
|
line-height: 80px;
|
||||||
|
text-align: center;
|
||||||
|
color: #333;
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
scroll-view {
|
||||||
|
height: calc(100% - 80px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-item {
|
||||||
|
height: 80px;
|
||||||
|
line-height: 80px;
|
||||||
|
padding: 0 24px;
|
||||||
|
text-align: center;
|
||||||
|
color: #333;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background: #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
@@ -1,14 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="searchMap">
|
<div class="searchMap">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<AiPagePicker class="left" type="custom" @select="handleSelectGird"
|
|
||||||
:ops="{url:'./SelectGird',label: 'girdName'}">
|
|
||||||
<div class="gird-content">
|
|
||||||
<image src="./img/gird--select-icon.png" class="avatras"/>
|
|
||||||
<div class="label">{{ form.girdName || '网格选择' }}</div>
|
|
||||||
<u-icon name="arrow-right" color="#cccccc" size="26" style="margin-left:4px;"></u-icon>
|
|
||||||
</div>
|
|
||||||
</AiPagePicker>
|
|
||||||
<div class="grid-input">
|
<div class="grid-input">
|
||||||
<img src="./img/back-icon.png" alt="" class="back-icon" v-if="name && show" @click="show=false">
|
<img src="./img/back-icon.png" alt="" class="back-icon" v-if="name && show" @click="show=false">
|
||||||
<img src="./img/search-icon-w.png" alt="" class="search-icon" v-else>
|
<img src="./img/search-icon-w.png" alt="" class="search-icon" v-else>
|
||||||
@@ -353,8 +345,7 @@ export default {
|
|||||||
|
|
||||||
this.detailInfo = {...res.data}
|
this.detailInfo = {...res.data}
|
||||||
|
|
||||||
console.log(this.detailInfo)
|
if(this.detailInfo.build.appGirdInfo && this.detailInfo.build.appGirdInfo.girdMemberNames && this.detailInfo.build.appGirdInfo.girdMemberNames) {
|
||||||
if(this.detailInfo.build.appGirdInfo.girdMemberNames && this.detailInfo.build.appGirdInfo.girdMemberNames) {
|
|
||||||
this.detailInfo.build.appGirdInfo.girdMemberNames = this.detailInfo.build.appGirdInfo.girdMemberNames.split(',')
|
this.detailInfo.build.appGirdInfo.girdMemberNames = this.detailInfo.build.appGirdInfo.girdMemberNames.split(',')
|
||||||
}
|
}
|
||||||
this.show = false
|
this.show = false
|
||||||
@@ -425,7 +416,7 @@ export default {
|
|||||||
.grid-input {
|
.grid-input {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 460px;
|
width: 100%;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
border-radius: 32px;
|
border-radius: 32px;
|
||||||
|
|||||||
Reference in New Issue
Block a user