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