This commit is contained in:
shijingjing
2022-02-07 15:38:27 +08:00
parent 17ecb93897
commit 2d4fe614c8
3 changed files with 45 additions and 43 deletions

View File

@@ -7,12 +7,6 @@
<div class="area-select">
<div class="select-content">
<div class="area-content">
<!-- <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> -->
</div>
<div class="search-input" v-if="tabIndex">
<img src="./img/search-icon.png" alt="">
@@ -28,7 +22,6 @@
<div class="num-item" v-for="(item, index) in statisticsList" :key="index">
<h3>
{{item.value}}
</h3>
<p>{{item.label}}</p>
</div>
@@ -105,11 +98,13 @@ 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()
})
},
@@ -121,6 +116,7 @@ export default {
areaSelect(e) {
this.areaId = e
this.getStatistic()
this.getStatisticMon()
this.getUserList()
},
tabClick(index) {
@@ -129,30 +125,32 @@ export default {
getStatistic() {
this.statisticsList = []
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)
// }
// }
// console.log(res);
if (res.code == 0) {
for (let i in res.data.map) {
var obj = {
label: i,
value: res.data.map[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/appspecialadjustment/statistic?type=0&range=0`).then((res) => {
console.log(res);
if (res.code == 0) {
for(let i in res.data.monthMap){
var obj = {
label: i,
value: res.data.monthMap[i]
}
this.statisticsListMon.push(obj)
}
}
})
},
getUserList() {
this.userList = []
@@ -171,9 +169,6 @@ export default {
})
},
toAdd() {
// this.$emit('change', {
// type: 'Add',
// })
uni.navigateTo({url: './add'})
},
idNumberInit(idNumber) {
@@ -196,7 +191,13 @@ export default {
},
toEdit(row,index) {
uni.navigateTo({url: `./add?id=${row.id}&index=${index}`})
this.$confirm('确定编辑该数据?').then(() => {
uni.navigateTo({
url: `./add?id=${row.id}&index=${index}`
})
}).catch(() => {
})
},
del(row,indexs) {
console.log(indexs);
@@ -208,7 +209,6 @@ export default {
this.$confirm('确定删除该数据?').then(() => {
uni.showLoading()
this.$http.post(delUrl[indexs],null, {params: {ids: row.id}}).then((res) => {
// this.$http.post(idUrl,{ids: row.id}).then((res) => {
if (res.code == 0) {
this.$u.toast('删除成功!')
this.getUserList()