Merge remote-tracking branch 'origin/dev' into build

This commit is contained in:
aixianling
2022-09-08 13:23:39 +08:00
4 changed files with 532 additions and 137 deletions

View File

@@ -322,7 +322,7 @@
this.initLineChart('.chart2', {
x: res.data['群成员数'].map(v => v.month),
value: res.data['群成员数'].map(v => v.totalNumber),
name: '居民'
name: '居民'
})
}
})

View File

@@ -9,7 +9,7 @@
<div class="tab-content">
<div class="tab-content__item" v-show="leftIndex === 0">
<div class="item">
<div class="title">居民好友统计</div>
<div class="title">群员统计</div>
<div class="item-top jmhy">
<div class="item-top__item">
<h2>居民好友</h2>
@@ -111,12 +111,12 @@
</div>
<div class="middle">
<div class="top">
<PdGrid :instance="instance" @nodeClick="onNodeClick"></PdGrid>
<XyGrid :instance="instance" @nodeClick="onNodeClick"></XyGrid>
</div>
<div class="bottom">
<div class="bottom-title">
<img src="https://cdn.cunwuyun.cn/dvcp/dv/pddv/icon.png" />
<h2>网格动态</h2>
<h2>警务群动态</h2>
</div>
<div class="bottom-list">
<div class="item" v-for="item in dynamicList" :key="item.id">
@@ -127,7 +127,7 @@
</div>
</div>
<div class="right">
<div class="appPdDv-title">网格信息</div>
<div class="appPdDv-title">警务数据</div>
<div class="right-item top-wrapper">
<div class="title" :title="girdInfo['网格名称']">{{ girdInfo['网格名称'] }}</div>
<div class="item-wrapper">
@@ -171,34 +171,18 @@
</div>
</div>
<div class="right-item bottom-wrapper">
<div class="title">积分排行</div>
<div class="item-wrapper">
<div class="tab">
<div :class="[rightIndex === 0 ? 'active' : '']" @click="rightIndex = 0">累计积分榜</div>
<div :class="[rightIndex === 1 ? 'active' : '']" @click="rightIndex = 1">上周积分榜</div>
<div class="title">警务群统计</div>
<div class="item-table">
<div class="item-table__header">
<span style="width: 110px">居民群</span>
<span style="flex: 1; text-align: center;">群主</span>
<span style="width: 60px; text-align: right;">群人数</span>
</div>
<div class="tab-content">
<div class="tab-item" v-for="(item, index) in pointList" :key="index" v-show="rightIndex === 0">
<div class="left" :class="'left'+ index">{{ index + 1 }}</div>
<div class="middel">
<div class="top">
<h2>{{ item.userName }}</h2>
<!-- <span v-if="index === 0">网格长</span> -->
</div>
<p></p>
</div>
<i>{{ item.userIntegral }}</i>
</div>
<div class="tab-item" v-for="(item, index) in rankList" :key="index" v-show="rightIndex === 1">
<div class="left" :class="'left'+ index">{{ index + 1 }}</div>
<div class="middel">
<div class="top">
<h2>{{ item.userName }}</h2>
<!-- <span v-if="index === 0">网格长</span> -->
</div>
<p></p>
</div>
<i>{{ item.changeIntegral }}</i>
<div class="item-table__body">
<div class="item-table__item" v-for="(item, index) in gridList" :key="index">
<span style="width: 110px" :title="item.name">{{ item.name || '未命名群聊' }}</span>
<span style="flex: 1; text-align: center;">{{ item.ownerName }}</span>
<span style="width: 60px; text-align: right;">{{ item.personCount }}</span>
</div>
</div>
</div>
@@ -209,7 +193,7 @@
<script>
import DonutChart from './components/DonutChart'
import PdGrid from './components/PdGrid'
import XyGrid from './components/XyGrid'
import * as echarts from 'echarts'
export default {
@@ -223,13 +207,12 @@
components: {
DonutChart,
PdGrid
XyGrid
},
data () {
return {
leftIndex: 0,
rightIndex: 0,
dlIndex: 0,
qlIndex: 0,
currGirdName: '',
@@ -241,9 +224,7 @@
groupNumber: {},
replyPercentage: {},
groupChatNumber: {},
dynamicList: [],
rankList: [],
pointList: []
dynamicList: []
}
},
@@ -1120,9 +1101,6 @@
}
}
.middle-wrapper {
margin-bottom: 23px;
.item-table {
position: relative;
height: 240px;
@@ -1194,106 +1172,46 @@
}
}
}
.middle-wrapper {
margin-bottom: 23px;
}
.bottom-wrapper {
.tab {
display: flex;
align-items: center;
height: 32px;
margin-bottom: 15px;
border: 1px solid #0E6EB5;
div {
flex: 1;
line-height: 32px;
text-align: center;
color: #fff;
font-size: 14px;
cursor: pointer;
user-select: none;
&.active {
background: #0F93B8;
}
}
}
.tab-content {
height: 230px;
overflow-y: auto;
.tab-item {
.item-table {
.item-table__header {
display: flex;
align-items: center;
margin-bottom: 8px;
justify-content: space-between;
height: 40px;
padding: 0 24px;
color: #82C5FF;
font-size: 14px;
background: rgba(35,160,172,0.2000);
}
&:last-child {
margin-bottom: 0;
}
.item-table__body {
height: 280px;
overflow-y: overlay;
.left {
width: 22px;
height: 24px;
line-height: 24px;
text-align: center;
.item-table__item {
display: flex;
align-items: center;
justify-content: space-between;
height: 40px;
padding: 0 24px;
color: #fff;
font-size: 14px;
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/right-icon3.png);
background-size: 100% 100%;
background: rgba(35,160,172,0.2000);
&.left0 {
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/right-icon1.png);
background-size: 100% 100%;
&:nth-of-type(2n - 1) {
background: transparent;
}
&.left1 {
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/right-icon2.png);
background-size: 100% 100%;
}
}
i {
position: relative;
color: #fff;
font-size: 12px;
font-style: normal;
transform: translateY(50%);
}
.middel {
width: 250px;
margin: 0 8px;
p {
width: 100%;
height: 8px;
background: linear-gradient(270deg, #51BF34 0%, #257718 100%);
border: 1px solid;
border-image: linear-gradient(270deg, rgba(96, 255, 99, 1), rgba(13, 156, 17, 1)) 1 1;
}
.top {
display: flex;
align-items: center;
margin-bottom: 4px;
h2 {
margin-right: 4px;
color: #FFFFFF;
font-size: 14px;
}
span {
width: 48px;
height: 20px;
line-height: 20px;
text-align: center;
color: #2AF0F8;
font-size: 12px;
background: linear-gradient(180deg, rgba(69,210,218,0.2500) 0%, rgba(69,210,218,0.1000) 100%);
border: 1px solid;
border-image: linear-gradient(180deg, rgba(5, 185, 203, 1), rgba(73, 214, 207, 1)) 1 1;
}
span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}

View File

@@ -0,0 +1,483 @@
<template>
<div class="pdgrid">
<div class="pdgrid-title">
<h2>{{ currGird }}</h2>
</div>
<!-- <div class="pdgrid-grid__title" @click="isShowGrid2 = true">
<h2 :title="girdName2">{{ girdName2 }}</h2>
</div> -->
<div class="pdgrid-body">
<div class="pdgrid-body__item" @click="isShowGrid3 = true">
<h2>{{ girdNum3 }}</h2>
<div class="bottom">
<i></i>
<p>{{ girdName3 }}</p>
<i class="right"></i>
</div>
</div>
<div class="pdgrid-body__item" @click.stop="isShowGrid4 = true">
<h2>{{ girdNum4 }}</h2>
<div class="bottom">
<i></i>
<p>{{ girdName4 }}</p>
<i class="right"></i>
</div>
</div>
<div class="pdgrid-body__item" @click="isShowGrid5 = true">
<h2>{{ girdNum5 }}</h2>
<div class="bottom">
<i></i>
<p>{{ girdName5 }}</p>
<i class="right"></i>
</div>
</div>
</div>
<transition name="fade">
<div class="grid-dialog" v-show="isShowGrid2">
<div class="mask" @click="isShowGrid2 = false"></div>
<div class="grid-container">
<h2 :title="girdName2">{{ girdName2 }}</h2>
<div class="grid-list">
<div
:class="[currIndex2 === index ? 'grid-active' : '']"
v-for="(item, index) in girdInfoList2"
:key="index"
:title="item.girdName"
@click.stop="onGrid2Click(item, index)">
{{ item.girdName }}
</div>
</div>
</div>
</div>
</transition>
<transition name="fade">
<div class="grid-dialog" v-show="isShowGrid3">
<div class="mask" @click="isShowGrid3 = false"></div>
<div class="grid-container">
<h2 :title="girdName3">{{ girdName3 }}</h2>
<div class="grid-list">
<div
:class="[currIndex3 === index ? 'grid-active' : '']"
v-for="(item, index) in girdInfoList3"
:key="index"
:title="item.girdName"
@click.stop="onGrid3Click(item, index)">
{{ item.girdName }}
</div>
</div>
</div>
</div>
</transition>
<transition name="fade">
<div class="grid-dialog" v-show="isShowGrid4">
<div class="mask" @click="isShowGrid4 = false"></div>
<div class="grid-container">
<h2 :title="girdName4">{{ girdName4 }}</h2>
<div class="grid-list">
<div
:class="[currIndex4 === index ? 'grid-active' : '']"
v-for="(item, index) in girdInfoList4"
:key="index"
:title="item.girdName"
@click.stop="onGrid4Click(item, index)">
{{ item.girdName }}
</div>
</div>
</div>
</div>
</transition>
<transition name="fade">
<div class="grid-dialog" v-show="isShowGrid5">
<div class="mask" @click="isShowGrid5 = false"></div>
<div class="grid-container">
<h2 :title="girdName5">{{ girdName5 }}</h2>
<div class="grid-list">
<div
:class="[currIndex5 === index ? 'grid-active' : '']"
v-for="(item, index) in girdInfoList5"
:key="index"
:title="item.girdName"
@click.stop="onGrid5Click(item, index)">
{{ item.girdName }}
</div>
</div>
</div>
</div>
</transition>
</div>
</template>
<script>
export default {
name: 'XyGrid',
props: ['instance'],
data () {
return {
isShowGrid2: false,
isShowGrid3: false,
isShowGrid4: false,
isShowGrid5: false,
currIndex2: 0,
currIndex3: 0,
currIndex4: 0,
currIndex5: 0,
girdInfoList2: [],
girdInfoList3: [],
girdInfoList4: [],
girdInfoList5: [],
girdName2: '',
girdName3: '',
girdName4: '',
girdName5: '',
girdNum3: 0,
girdNum4: 0,
girdNum5: 0,
currGird: ''
}
},
mounted () {
this.$nextTick(() => {
document.addEventListener('keydown', this.onKeyDown)
})
this.getInfo()
},
destroyed () {
document.removeEventListener('keydown', this.onKeyDown)
},
methods: {
onKeyDown (e) {
if (e.keyCode == 27) {
this.isShowGrid2 = false
this.isShowGrid3 = false
this.isShowGrid4 = false
this.isShowGrid5 = false
}
},
onGrid2Click (item, index) {
this.currIndex2 = index
this.girdName2 = item.girdName
this.currIndex3 = -1
this.currIndex4 = -1
this.currIndex5 = -1
this.isShowGrid2 = false
this.girdInfoList3 = []
this.girdInfoList4 = []
this.girdInfoList5 = []
this.$emit('nodeClick', item.id)
this.currGird = item.girdName
this.getInfo(item.id)
},
onGrid3Click (item, index) {
this.currIndex3 = index
this.girdName3 = item.girdName
this.currIndex4 = -1
this.currIndex5 = -1
this.girdNum3 = 1
this.isShowGrid3 = false
this.$emit('nodeClick', item.id)
this.girdInfoList4 = []
this.girdInfoList5 = []
this.currGird = item.girdName
this.getInfo(item.id)
},
onGrid4Click (item, index) {
this.currIndex4 = index
this.girdName4 = item.girdName
this.currIndex5 = -1
this.girdNum4 = 1
this.isShowGrid4 = false
this.$emit('nodeClick', item.id)
this.girdInfoList5 = []
this.currGird = item.girdName
this.getInfo(item.id)
},
onGrid5Click (item, index) {
this.currIndex5 = index
this.girdName5 = item.girdName
this.isShowGrid5 = false
this.girdNum5 = 1
this.$emit('nodeClick', item.id)
this.currGird = item.girdName
this.getInfo(item.id)
},
getInfo (id) {
this.instance.post(`/app/appgirdinfo/queryPdDetailByGirdId?id=${id || ''}`).then(res => {
if (res.code === 0) {
res.data.girdInfoList2 && (this.girdInfoList2 = res.data.girdInfoList2)
res.data.girdInfoList3 && (this.girdInfoList3 = res.data.girdInfoList3)
res.data.girdInfoList4 && (this.girdInfoList4 = res.data.girdInfoList4)
res.data.girdInfoList5 && (this.girdInfoList5 = res.data.girdInfoList5)
res.data.girdName2 && (this.girdName2 = res.data.girdName2)
res.data.girdName3 && (this.girdName3 = res.data.girdName3)
res.data.girdName4 && (this.girdName4 = res.data.girdName4)
res.data.girdName5 && (this.girdName5 = res.data.girdName5)
res.data.girdNum3 != null && (this.girdNum3 = res.data.girdNum3)
res.data.girdNum4 != null && (this.girdNum4 = res.data.girdNum4)
res.data.girdNum5 != null && (this.girdNum5 = res.data.girdNum5)
if (!id) {
this.currGird = res.data.girdName2
this.currIndex2 = res.data.girdInfoList2.findIndex(v => res.data.girdName2 === v.girdName)
}
}
})
}
}
}
</script>
<style lang="scss">
.pdgrid {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
box-sizing: border-box;
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/middle-bg.png) no-repeat center;
background-size: contain;
.fade-enter-active, .fade-leave-active {
transition: opacity .3s ease-in-out;
}
.fade-enter, .fade-leave-to {
opacity: 0;
}
* {
box-sizing: border-box;
}
.pdgrid-grid__title {
position: absolute;
top: 40px;
left: 50%;
width: 271px;
height: 53px;
line-height: 53px;
text-align: center;
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/grid-title-sbg.png) no-repeat center;
background-size: 100% 100%;
cursor: pointer;
transform: translateX(-50%);
transition: opacity ease 0.3s;
&:hover {
opacity: 0.8;
}
h2 {
width: 182px;
margin: 0 auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #FFFFFF;
font-size: 21px;
text-shadow: 0px 0px 13px rgb(59 182 255 / 80%);
background: #fff;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.pdgrid-title {
position: absolute;
top: 200px;
left: 50%;
min-width: 640px;
height: 80px;
line-height: 80px;
text-align: center;
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/middle-titlebg.png) no-repeat center;
background-size: 100% 100%;
transform: translateX(-50%);
h2 {
color: #FFFFFF;
font-size: 22px;
white-space: nowrap;
text-shadow: 0px 0px 13px rgb(59 182 255 / 80%);
background: #fff;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.pdgrid-body {
display: flex;
position: absolute;
justify-content: space-between;
bottom: 200px;
left: 0;
width: 100%;
padding: 0 112px;
.pdgrid-body__item {
display: flex;
flex-direction: column;
width: 200px;
height: 187px;
align-items: center;
padding-top: 71px;
cursor: pointer;
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/item-bg.png) no-repeat center;
background-size: 100% 100%;
transition: opacity ease 0.3s;
&:hover {
opacity: 0.8;
}
&:nth-of-type(2) {
position: relative;
top: 67px;
}
h2 {
font-size: 36px;
color: #FFFFFF;
text-shadow: 0px 0px 13px rgb(59 182 255 / 80%);
background: #fff;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
p {
max-width: 164px;
margin-top: 4px;
padding: 0 16px;
font-size: 16px;
color: #FFFFFF;
text-shadow: 0px 0px 13px rgb(59 182 255 / 80%);
background: #fff;
-webkit-background-clip: text;
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-webkit-text-fill-color: transparent;
}
.bottom {
display: flex;
align-items: center;
i {
width: 0px;
height: 0px;
border: 6px solid transparent;
border-top-color: transparent;
border-bottom-color: transparent;
border-left-color: transparent;
border-right-color: #FFCB42;
&.right {
width: 0px;
height: 0px;
border: 6px solid transparent;
border-top-color: transparent;
border-bottom-color: transparent;
border-left-color: #FFCB42;
border-right-color: transparent;
}
}
}
}
}
.grid-dialog {
position: fixed;
top: 0;
left: 0;
z-index: 111;
width: 100%;
height: 100%;
& > .mask {
position: absolute;
left: 0;
top: 0;
z-index: 1;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
}
.grid-container {
display: flex;
position: absolute;
flex-direction: column;
left: 50%;
top: 50%;
z-index: 2;
width: 640px;
height: 640px;
background: rgba(7,13,41,0.9);
border: 1px solid #144662;
transform: translate(-50%, -50%);
& > h2 {
width: 100%;
height: 67px;
line-height: 67px;
padding: 0 20px;
text-align: center;
color: #FFFFFF;
font-size: 24px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-shadow: 0px 0px 13px rgb(59 182 255 / 80%);
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/grid-title-bg.png) no-repeat center;
background-size: 100% 100%;
}
.grid-list {
flex: 1;
overflow-y: auto;
& > div {
height: 67px;
line-height: 67px;
padding: 0 20px;
text-align: center;
color: #FFFFFF;
font-size: 27px;
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: all ease 0.5s;
&.grid-active {
background: linear-gradient(270deg, rgba(0,48,124,0) 0%, #00307C 16%, rgba(0,99,255,0.9100) 50%, rgba(0,48,124,0.8200) 87%, rgba(0,48,124,0) 100%);
box-shadow: inset 0px -1px 0px 0px rgba(16,34,54,1);
text-shadow: 0px 3px 5px rgba(0,0,0,0.5000);
}
&:hover {
background: linear-gradient(270deg, rgba(0,48,124,0) 0%, #00307C 16%, rgba(0,99,255,0.9100) 50%, rgba(0,48,124,0.8200) 87%, rgba(0,48,124,0) 100%);
box-shadow: inset 0px -1px 0px 0px rgba(16,34,54,1);
text-shadow: 0px 3px 5px rgba(0,0,0,0.5000);
}
}
}
}
}
}
</style>