2022-07-01 17:02:37 +08:00
|
|
|
|
<template>
|
2022-07-02 16:23:35 +08:00
|
|
|
|
<div class="grid" v-if="pageShow">
|
2022-07-01 17:02:37 +08:00
|
|
|
|
<div class="gird-wrapper">
|
|
|
|
|
|
<div class="gird-item">
|
|
|
|
|
|
<h2>一级网格</h2>
|
2022-07-02 15:19:27 +08:00
|
|
|
|
<div class="gird-item__wrapper level1" @click="getStatistics(topGrid.id)">
|
|
|
|
|
|
<h3>{{ topGrid.girdName }}</h3>
|
2022-07-21 17:02:31 +08:00
|
|
|
|
<image :src="$cdn + 'xincheng/w-right.png'"/>
|
2022-07-01 17:02:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2022-07-02 15:19:27 +08:00
|
|
|
|
<div class="gird-item" v-if="secondaryGrid.length">
|
2022-07-01 17:02:37 +08:00
|
|
|
|
<h2>二级网格</h2>
|
|
|
|
|
|
<div class="gird-item__wrapper level2">
|
2022-07-02 15:19:27 +08:00
|
|
|
|
<div class="grid-item__item" v-for="(item, index) in secondaryGrid" :key="index">{{ item.girdName }}</div>
|
2022-07-01 17:02:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2022-07-02 15:19:27 +08:00
|
|
|
|
<div class="gird-item" v-if="tertiaryGrid.length">
|
2022-07-01 17:02:37 +08:00
|
|
|
|
<h2>三级网格</h2>
|
2022-07-02 16:17:55 +08:00
|
|
|
|
<div class="gird-item__wrapper level3" @click="getSubInfo">
|
2022-07-01 17:02:37 +08:00
|
|
|
|
<h3>专属网格</h3>
|
2022-07-02 15:19:27 +08:00
|
|
|
|
<p>({{ tertiaryGrid.length }}个)</p>
|
2022-07-21 17:02:31 +08:00
|
|
|
|
<image :src="$cdn + 'xincheng/blue-right.png'"/>
|
2022-07-01 17:02:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<u-popup v-model="isShowStreet" :closeable="false" border-radius="16" height="60%" mode="bottom">
|
2022-07-21 17:02:31 +08:00
|
|
|
|
<div class="street-dialog">
|
|
|
|
|
|
<scroll-view scroll-y class="street-wrapper">
|
|
|
|
|
|
<h2 class="title">数据统计</h2>
|
|
|
|
|
|
<div class="street-item__wrapper">
|
|
|
|
|
|
<div class="street-item" v-for="(item, index) in streetInfo" :key="index">
|
|
|
|
|
|
<div class="left">
|
|
|
|
|
|
<i></i>
|
|
|
|
|
|
<h2>{{ index }}</h2>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span>{{ item }}</span>
|
2022-07-01 17:02:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2022-07-21 17:02:31 +08:00
|
|
|
|
</scroll-view>
|
|
|
|
|
|
</div>
|
2022-07-01 17:02:37 +08:00
|
|
|
|
</u-popup>
|
|
|
|
|
|
<u-popup v-model="isShowVillage" :closeable="false" border-radius="16" height="60%" mode="bottom">
|
|
|
|
|
|
<div class="street-dialog">
|
|
|
|
|
|
<scroll-view scroll-y class="street-wrapper">
|
|
|
|
|
|
<h2 class="title">数据统计</h2>
|
|
|
|
|
|
<div class="street-item__wrapper">
|
2022-07-02 16:17:55 +08:00
|
|
|
|
<div class="street-item" v-for="(item, index) in tertiaryInfo" :key="index">
|
2022-07-01 17:02:37 +08:00
|
|
|
|
<div class="left">
|
|
|
|
|
|
<i></i>
|
2022-07-02 16:17:55 +08:00
|
|
|
|
<h2>{{ index }}</h2>
|
2022-07-01 17:02:37 +08:00
|
|
|
|
</div>
|
2022-07-02 16:17:55 +08:00
|
|
|
|
<span>{{ item }}</span>
|
2022-07-01 17:02:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<h2 class="title">网格列表</h2>
|
|
|
|
|
|
<div class="street-item__wrapper">
|
2022-07-02 15:19:27 +08:00
|
|
|
|
<div class="street-item" style="justify-content: center" v-for="(item, index) in tertiaryGrid" :key="index">
|
|
|
|
|
|
<span>{{ item.girdName }}</span>
|
2022-07-01 17:02:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</scroll-view>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-07-21 17:02:31 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: 'grid',
|
|
|
|
|
|
|
|
|
|
|
|
appName: '网格统计',
|
|
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
isShowStreet: false,
|
|
|
|
|
|
streetInfo: {},
|
|
|
|
|
|
isShowVillage: false,
|
|
|
|
|
|
topGrid: [],
|
|
|
|
|
|
secondaryGrid: [],
|
|
|
|
|
|
tertiaryGrid: [],
|
|
|
|
|
|
tertiaryInfo: {},
|
|
|
|
|
|
pageShow: false
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
onLoad() {
|
|
|
|
|
|
this.$loading()
|
|
|
|
|
|
this.getInfo().finally(() => uni.hideLoading())
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
getStatistics(girdId) {
|
2022-07-02 16:23:35 +08:00
|
|
|
|
this.$loading()
|
2022-07-21 17:02:31 +08:00
|
|
|
|
this.$http.post(`/api/appgirdinfo/girdInfoCountById?girdId=${girdId}`).then(res => {
|
|
|
|
|
|
if (res.code === 0) {
|
|
|
|
|
|
this.isShowStreet = true
|
|
|
|
|
|
this.streetInfo = res.data
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2022-07-01 17:02:37 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
getSubInfo() {
|
|
|
|
|
|
this.$loading()
|
|
|
|
|
|
this.$http.post(`/api/appgirdinfo/girdInfoCountByThree`).then(res => {
|
|
|
|
|
|
if (res.code === 0) {
|
|
|
|
|
|
this.isShowVillage = true
|
|
|
|
|
|
this.tertiaryInfo = res.data
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-07-02 15:19:27 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
getInfo() {
|
|
|
|
|
|
return this.$http.post(`/api/appgirdinfo/listAllByTop`).then(res => {
|
|
|
|
|
|
if (res.code === 0) {
|
|
|
|
|
|
this.topGrid = res.data
|
2022-07-02 15:19:27 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
if (res.data.girdList.length) {
|
|
|
|
|
|
this.secondaryGrid = res.data.girdList
|
2022-07-02 16:23:35 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
res.data.girdList.forEach(e => {
|
|
|
|
|
|
this.tertiaryGrid.push(...e.girdList)
|
2022-07-02 16:23:35 +08:00
|
|
|
|
})
|
2022-07-02 15:19:27 +08:00
|
|
|
|
}
|
2022-07-21 17:02:31 +08:00
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.pageShow = true
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-07-21 17:02:31 +08:00
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2022-07-21 17:02:31 +08:00
|
|
|
|
.grid {
|
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
|
padding: 32px 0;
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
|
|
|
|
* {
|
2022-07-01 17:02:37 +08:00
|
|
|
|
box-sizing: border-box;
|
2022-07-21 17:02:31 +08:00
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
.street-dialog {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
padding: 0 32px 30px;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
.street-wrapper {
|
|
|
|
|
|
.title {
|
|
|
|
|
|
height: 100px;
|
|
|
|
|
|
line-height: 100px;
|
|
|
|
|
|
width: 128px;
|
|
|
|
|
|
font-size: 32px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #262B36;
|
|
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
.street-item__wrapper {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
.street-item {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
width: calc((100% - 30px) / 2);
|
|
|
|
|
|
height: 88px;
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
padding: 0 32px;
|
|
|
|
|
|
background: #F3F5F7;
|
|
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(2n - 1) {
|
|
|
|
|
|
margin-right: 30px;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
.left {
|
2022-07-01 17:02:37 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
i {
|
|
|
|
|
|
width: 8px;
|
|
|
|
|
|
height: 8px;
|
|
|
|
|
|
margin-right: 16px;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
background: #1365DD;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
h2 {
|
|
|
|
|
|
color: #666666;
|
|
|
|
|
|
font-size: 26px;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-07-21 17:02:31 +08:00
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
|
display: -webkit-box;
|
|
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
-webkit-line-clamp: 2;
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-07-21 17:02:31 +08:00
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
.gird-item {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
margin: 0 16px 80px;
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
border: 2px dashed #CCCCCC;
|
|
|
|
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
z-index: 11;
|
|
|
|
|
|
width: 2px;
|
|
|
|
|
|
height: 80px;
|
|
|
|
|
|
background: #666666;
|
|
|
|
|
|
transform: translate(-50%, 100%);
|
|
|
|
|
|
content: ' ';
|
|
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
&::before {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: -80px;
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
z-index: 11;
|
|
|
|
|
|
border: 14px solid transparent;
|
|
|
|
|
|
border-top: 14px solid #666666;
|
|
|
|
|
|
transform: translate(-50%, 50%);
|
|
|
|
|
|
content: ' ';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&:last-child::after, &:last-child::before {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.level1 {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
height: 80px;
|
|
|
|
|
|
line-height: 80px;
|
|
|
|
|
|
background: #1365DD;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-size: 32px;
|
|
|
|
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
|
opacity: 0.6;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
image {
|
2022-07-01 17:02:37 +08:00
|
|
|
|
position: absolute;
|
2022-07-21 17:02:31 +08:00
|
|
|
|
top: 50%;
|
|
|
|
|
|
right: 16px;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
width: 32px;
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
transform: translateY(-50%);
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
h3 {
|
|
|
|
|
|
font-weight: normal;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
2022-07-21 17:02:31 +08:00
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
.level3 {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
height: 96px;
|
|
|
|
|
|
background: #E8EFFB;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
|
opacity: 0.6;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
h3 {
|
|
|
|
|
|
color: #1365DD;
|
|
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
p {
|
|
|
|
|
|
color: #CCCCCC;
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
image {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 50%;
|
|
|
|
|
|
right: 16px;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
width: 32px;
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
h3 {
|
|
|
|
|
|
font-weight: normal;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
2022-07-21 17:02:31 +08:00
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
.level2 {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
.grid-item__item {
|
|
|
|
|
|
width: calc((100% - 16px) / 2);
|
|
|
|
|
|
height: 80px;
|
|
|
|
|
|
line-height: 80px;
|
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
|
color: #3B3F59;
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
background: #F3F5F7;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
text-overflow: ellipsis;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
&:nth-of-type(2n - 1) {
|
|
|
|
|
|
margin-right: 8px;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-07-21 17:02:31 +08:00
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
|
2022-07-21 17:02:31 +08:00
|
|
|
|
& > h2 {
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
color: #1365DD;
|
|
|
|
|
|
font-size: 32px;
|
|
|
|
|
|
font-weight: 600;
|
2022-07-01 17:02:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-07-21 17:02:31 +08:00
|
|
|
|
}
|
2022-07-01 17:02:37 +08:00
|
|
|
|
</style>
|