This commit is contained in:
wanglei
2022-02-10 14:36:31 +08:00
parent 2430e560fa
commit 66a58a8daf
2 changed files with 11 additions and 27 deletions

View File

@@ -101,13 +101,11 @@ export default {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getStatistic()
this.getStatisticMon()
this.getUserList()
})
uni.$on('specialPeopleList', () => {
this.getStatistic()
this.getStatisticMon()
this.getUserList()
})
},
@@ -119,7 +117,6 @@ export default {
areaSelect(e) {
this.areaId = e
this.getStatistic()
this.getStatisticMon()
this.getUserList()
},
tabClick(index) {
@@ -127,8 +124,9 @@ export default {
},
getStatistic() {
this.statisticsList = []
this.statisticsListMon = []
this.$http.post(`app/appspecialadjustment/statistic?type=0&range=0`).then((res) => {
if (res.code == 0) {
if (res?.data) {
for (let i in res.data.map) {
var obj = {
label: i,
@@ -136,19 +134,12 @@ export default {
}
this.statisticsList.push(obj)
}
}
})
},
getStatisticMon() {
this.statisticsListMon = []
this.$http.post(`app/appspecialadjustment/statistic?type=0&range=0`).then((res) => {
if (res.code == 0) {
for(let i in res.data.monthMap){
var obj = {
label: i,
value: res.data.monthMap[i]
for(let n in res.data.monthMap){
var objmon = {
label: n,
value: res.data.monthMap[n]
}
this.statisticsListMon.push(obj)
this.statisticsListMon.push(objmon)
}
}
})
@@ -156,7 +147,7 @@ export default {
getUserList() {
this.userList = []
this.$http.post(`app/appspecialadjustment/allList?size=20&current=${this.current}`,{type: this.type, name: this.name}).then((res) => {
if (res.code == 0) {
if (res?.data) {
if(this.current > res.data.total) {
return
}