积分统计
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<ai-title slot="title" title="总体统计">
|
||||
<template #rightBtn>
|
||||
<el-row type="flex" align="middle">
|
||||
<ai-select v-model="searchTypeList" @change="changeType" placeholder="选择积分申请事件" multiple :selectList="typeList"></ai-select>
|
||||
<span class="shortcut" v-for="(item,i) in timeCheck" :key="i" :class="{active:type==i}"
|
||||
@click="timeChange(i)" v-text="item"/>
|
||||
<el-cascader ref="cascader1" v-model="girdArr" :options="girdOptions" placeholder="所属网格" size="small"
|
||||
@@ -197,7 +198,10 @@ export default {
|
||||
userSortListY: [],
|
||||
girdSortListX: [],
|
||||
girdSortListY: [],
|
||||
sta: []
|
||||
sta: [],
|
||||
firstGirdId: '',
|
||||
typeList: [],
|
||||
searchTypeList: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -222,6 +226,7 @@ export default {
|
||||
this.search.startTime = this.time?.[0]
|
||||
this.search.endTime = this.time?.[1]
|
||||
this.getTableData()
|
||||
this.getTypeList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
@@ -231,7 +236,7 @@ export default {
|
||||
this.instance.post('/app/appintegraluser/allAppletUserIntegral', null, {
|
||||
params: {
|
||||
type: this.type,
|
||||
girdId: this.girdId,
|
||||
girdId: this.girdId ? this.girdId : this.firstGirdId,
|
||||
startTime: this.startTime,
|
||||
endTime: this.endTime,
|
||||
}
|
||||
@@ -243,9 +248,10 @@ export default {
|
||||
this.instance.post("/app/appwechatsigninfo/userSignAndIntegralApplyAndIntegralExchangeSort", null, {
|
||||
params: {
|
||||
type: this.type,
|
||||
girdId: this.girdId,
|
||||
girdId: this.girdId ? this.girdId : this.firstGirdId,
|
||||
startTime: this.startTime,
|
||||
endTime: this.endTime,
|
||||
itemIds: this.searchTypeList.length ? this.searchTypeList.join(',') : ''
|
||||
}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
@@ -267,9 +273,10 @@ export default {
|
||||
return this.instance.post('/app/appintegraluser/userAndGirdIntegralSortByApplet', null, {
|
||||
params: {
|
||||
type: this.type,
|
||||
girdId: this.girdId,
|
||||
girdId: this.girdId ? this.girdId : this.firstGirdId,
|
||||
startTime: this.startTime,
|
||||
endTime: this.endTime
|
||||
endTime: this.endTime,
|
||||
itemIds: this.searchTypeList.length ? this.searchTypeList.join(',') : ''
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res?.data) {
|
||||
@@ -438,21 +445,25 @@ export default {
|
||||
this.sta.map(e => e.chart?.resize())
|
||||
},
|
||||
gridChange(val) {
|
||||
console.log(val)
|
||||
this.girdArr = val
|
||||
this.girdId = val?.[val.length - 1]
|
||||
this.$refs.cascader1.dropDownVisible = false;
|
||||
this.getTypeList()
|
||||
this.getStatistics()
|
||||
this.getRanking()
|
||||
},
|
||||
// 所有网格
|
||||
getGridList() {
|
||||
this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => {
|
||||
this.instance.post(`/app/appgirdinfo/listAll3?girdCode=${this.user.info.areaId}`).then((res) => {
|
||||
if (res?.code == 0) {
|
||||
this.girdOptions = this.toTree(res.data)
|
||||
this.firstGirdId = res.data[0].girdId
|
||||
this.getRanking()
|
||||
this.getStatistics()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 转树形结构
|
||||
toTree(data) {
|
||||
let result = [];
|
||||
@@ -473,7 +484,6 @@ export default {
|
||||
});
|
||||
return result;
|
||||
},
|
||||
|
||||
timeChange(index) {
|
||||
this.type = index
|
||||
if (index == 3) {
|
||||
@@ -537,6 +547,25 @@ export default {
|
||||
{name: "积分", barWidth: 10, barGap: '20%', type: 'bar'}
|
||||
]
|
||||
}, true)
|
||||
},
|
||||
|
||||
getTypeList() {
|
||||
var url = this.girdId ? `&girdId=${this.girdId}` : `&girdCode=${this.user.info.areaId}`
|
||||
this.instance.post(`/app/appintegralrule/listByAppletFD?status=1¤t=1&size=100${url}`).then(res => {
|
||||
if (res?.data) {
|
||||
res.data.records.map((item) => {
|
||||
item.dictName = item.ruleName
|
||||
item.dictValue = item.id
|
||||
})
|
||||
this.typeList = res.data.records
|
||||
this.searchTypeList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
changeType(e) {
|
||||
this.searchTypeList = e
|
||||
this.getStatistics()
|
||||
this.getRanking()
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
@@ -550,8 +579,6 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', this.onResize)
|
||||
this.getRanking()
|
||||
this.getStatistics()
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('resize', this.onResize)
|
||||
@@ -571,7 +598,7 @@ export default {
|
||||
line-height: 32px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #D0D4DC;
|
||||
margin-right: 8px;
|
||||
margin: 0 8px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user