bug
This commit is contained in:
@@ -135,7 +135,7 @@
|
||||
</div>
|
||||
<div class="middle">
|
||||
<div class="top">
|
||||
<PdGrid :instance="instance" @nodeClick="onNodeClick"></PdGrid>
|
||||
<PlyGird :instance="instance" @nodeClick="onNodeClick"></PlyGird>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="bottom-title">
|
||||
@@ -193,10 +193,6 @@
|
||||
<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>
|
||||
<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>
|
||||
@@ -205,21 +201,10 @@
|
||||
<h2>{{ item.userName }}</h2>
|
||||
<!-- <span v-if="index === 0">网格长</span> -->
|
||||
</div>
|
||||
<p></p>
|
||||
<p :style="{width: item.rate}"></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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -229,7 +214,7 @@
|
||||
|
||||
<script>
|
||||
import DonutChart from './components/DonutChart'
|
||||
import PdGrid from './components/PdGrid'
|
||||
import PlyGird from './components/PlyGird'
|
||||
import * as echarts from 'echarts'
|
||||
|
||||
export default {
|
||||
@@ -243,7 +228,7 @@
|
||||
|
||||
components: {
|
||||
DonutChart,
|
||||
PdGrid
|
||||
PlyGird
|
||||
},
|
||||
|
||||
data () {
|
||||
@@ -288,17 +273,7 @@
|
||||
},
|
||||
|
||||
getInfo () {
|
||||
this.instance.post(`app/appintegraluser/userTotalIntegralSort`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pointList = res.data
|
||||
}
|
||||
})
|
||||
this.instance.post(`app/appintegraluser/userTotalIntegralSort`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pointList = res.data
|
||||
}
|
||||
})
|
||||
this.instance.post(`app/appmasssendingtask/statisticsEffectByPidu`).then(res => {
|
||||
this.instance.post(`/app/appmasssendingtask/statisticsEffectByPidu`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.xfInfo = res.data
|
||||
this.initBarChart('.chart11', {
|
||||
@@ -399,7 +374,7 @@
|
||||
},
|
||||
|
||||
getGridInfo (id) {
|
||||
this.instance.post(`/app/appgirdinfo/piduGirdCount?girdId=${id || ''}`).then(res => {
|
||||
this.instance.post(`/app/appgirdinfo/plyGirdCount?girdId=${id || ''}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.girdInfo = res.data
|
||||
}
|
||||
@@ -409,6 +384,17 @@
|
||||
this.gridList = res.data.records
|
||||
}
|
||||
})
|
||||
this.instance.post(`/app/appintegraluser/userTotalIntegralSortByGirdId?girdId=${id || ''}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
const val = Math.max(...res.data.map(v => v.userIntegral))
|
||||
this.pointList = res.data.map(v => {
|
||||
return {
|
||||
...v,
|
||||
rate: val === 0 ? '0%' : (v.userIntegral / val * 100).toFixed(0) + '%'
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
initLineChart (el, data) {
|
||||
|
||||
334
packages/bigscreen/dv/components/PlyGird.vue
Normal file
334
packages/bigscreen/dv/components/PlyGird.vue
Normal file
@@ -0,0 +1,334 @@
|
||||
<template>
|
||||
<div class="PlyGird">
|
||||
<div class="pdgrid-title">
|
||||
<h2>{{ currGird }}</h2>
|
||||
</div>
|
||||
<div class="pdgrid-body">
|
||||
<div class="pdgrid-body__item" @click="isShowGrid2 = true">
|
||||
<h2>{{ girdNum2 }}</h2>
|
||||
<div class="bottom">
|
||||
<i></i>
|
||||
<p>{{ girdName2 }}</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'pdgrid',
|
||||
|
||||
props: ['instance'],
|
||||
|
||||
data () {
|
||||
return {
|
||||
isShowGrid2: false,
|
||||
currIndex2: 0,
|
||||
girdInfoList2: [],
|
||||
girdName2: '',
|
||||
girdNum2: 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
|
||||
}
|
||||
},
|
||||
|
||||
onGrid2Click (item, index) {
|
||||
this.currIndex2 = index
|
||||
this.girdName2 = item.girdName
|
||||
this.isShowGrid2 = false
|
||||
this.$emit('nodeClick', item.id)
|
||||
|
||||
this.currGird = item.girdName
|
||||
this.getInfo(item.id)
|
||||
},
|
||||
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appgirdinfo/queryPlyDetailByGirdId?id=${id || ''}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
res.data.girdInfoList2 && (this.girdInfoList2 = res.data.girdInfoList2)
|
||||
res.data.girdName2 && (this.girdName2 = res.data.girdName2)
|
||||
res.data.girdNum2 != null && (this.girdNum2 = res.data.girdNum2)
|
||||
res.data.girdName1 && (this.currGird = res.data.girdName1)
|
||||
|
||||
if (!id) {
|
||||
this.currIndex2 = res.data.girdInfoList2.findIndex(v => res.data.girdName2 === v.girdName)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.PlyGird {
|
||||
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: center;
|
||||
bottom: 133px;
|
||||
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;
|
||||
}
|
||||
|
||||
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>
|
||||
Reference in New Issue
Block a user