diff --git a/src/project/saas/AppBuilding/components/gridMap.vue b/src/project/saas/AppBuilding/components/gridMap.vue index cbe58b5b..ef9e2c5e 100644 --- a/src/project/saas/AppBuilding/components/gridMap.vue +++ b/src/project/saas/AppBuilding/components/gridMap.vue @@ -10,12 +10,10 @@
- - - + +
- +
@@ -48,6 +46,20 @@ + +
+
请选择网格
+ +
+ {{ item.girdName }} +
+
+
+
@@ -64,18 +76,20 @@ export default { show: false, form: {girdName: '', id: ''}, treeList: [], - name: '', + girdName: '', showSelect: false, editor: null, polygons: [], labels: [], - latLngCenter: [], //中心点 + latLngCenter: [], + isShowGrid: false, + girdList: [] } }, computed: {...mapState(['user'])}, created() { this.areaId = this.user.areaId - this.getLeafNodes() + uni.$on('goback', e => { this.form.girdName = e.girdName this.getGridList(e.id, true) @@ -91,6 +105,21 @@ export default { 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() { this.$http.post(`/app/appgirdinfo/queryGirdMemberGirdsById`).then((res) => { if (res?.data) { @@ -112,7 +141,6 @@ 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 => { @@ -135,6 +163,7 @@ export default { if (!arr.filter(v => v.points).length) { return this.$u.toast('该网格还未标会') } + this.isShowGrid = false this.renderGridMap(arr.filter(v => v.points)) } @@ -285,6 +314,46 @@ export default { 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 { display: flex; position: fixed; diff --git a/src/project/saas/AppBuilding/components/searchMap.vue b/src/project/saas/AppBuilding/components/searchMap.vue index 3cbb799e..559b4d65 100644 --- a/src/project/saas/AppBuilding/components/searchMap.vue +++ b/src/project/saas/AppBuilding/components/searchMap.vue @@ -1,14 +1,6 @@