This commit is contained in:
liuye
2022-01-27 16:41:18 +08:00
parent 4869319c39
commit 036c5c30b0
2 changed files with 44 additions and 43 deletions

View File

@@ -7,12 +7,12 @@
<div class="area-select">
<div class="select-content">
<div class="area-content">
<AiAreaPicker :areaId="user.areaId" v-model="areaId" @select="areaSelect" :name.sync="areaName">
<!-- <AiAreaPicker :areaId="user.areaId" v-model="areaId" @select="areaSelect" :name.sync="areaName">
<img src="./img/local-icon.png" alt="">
<span class="label" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-down" color="#666" size="24" />
</AiAreaPicker>
</AiAreaPicker> -->
</div>
<div class="search-input" v-if="tabIndex">
<img src="./img/search-icon.png" alt="">
@@ -96,14 +96,15 @@ export default {
},
computed: { ...mapState(['user']) },
created() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getStatistic()
this.getStatisticMon()
this.getUserList()
this.$dict.load('appSpecialTypeFive').then(() => {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getStatistic()
this.getUserList()
})
uni.$on('specialPeopleList', () => {
this.getStatistic()
this.getStatisticMon()
this.getUserList()
})
},
@@ -115,7 +116,6 @@ export default {
areaSelect(e) {
this.areaId = e
this.getStatistic()
this.getStatisticMon()
this.getUserList()
},
tabClick(index) {
@@ -123,45 +123,45 @@ export default {
},
getStatistic() {
this.statisticsList = []
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=0`).then((res) => {
if (res.code == 0) {
for(let i in res.data){
var obj = {
label: i,
value: res.data[i]
}
this.statisticsList.push(obj)
}
}
this.$http.post(`/app/appspecialadjustment/statistic?type=0&range=0`).then((res) => {
// if (res.code == 0) {
// for(let i in res.data){
// var obj = {
// label: i,
// value: res.data[i]
// }
// this.statisticsList.push(obj)
// }
// }
})
},
getStatisticMon() {
this.statisticsListMon = []
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=1`).then((res) => {
if (res.code == 0) {
for(let i in res.data){
var obj = {
label: i,
value: res.data[i]
}
this.statisticsListMon.push(obj)
}
}
})
// this.statisticsListMon = []
// this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=1`).then((res) => {
// if (res.code == 0) {
// for(let i in res.data){
// var obj = {
// label: i,
// value: res.data[i]
// }
// this.statisticsListMon.push(obj)
// }
// }
// })
},
getUserList() {
this.userList = []
this.$http.post(`/app/appapplicationinfo/queryPeople?areaId=${this.areaId}&type=0&name=${this.name}`).then((res) => {
if (res.code == 0) {
for(let i in res.data){
var obj = {
label: i,
value: res.data[i],
check: false
}
this.userList.push(obj)
}
}
this.$http.post(`/app/appspecialadjustment/allList?type=0&name=${this.name}`).then((res) => {
// if (res.code == 0) {
// for(let i in res.data){
// var obj = {
// label: i,
// value: res.data[i],
// check: false
// }
// this.userList.push(obj)
// }
// }
})
},
toAdd() {