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) {
|
||||
|
||||
Reference in New Issue
Block a user