特殊人群
This commit is contained in:
@@ -39,15 +39,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="item-content" v-for="(item, index) in userList" :key="index">
|
||||
<div class="title" @click="showUserType(index)">
|
||||
<div class="item-content" v-for="(item, index) in typeList" :key="index">
|
||||
<div class="title" @click="showUserType(item)">
|
||||
<h2>
|
||||
{{ $dict.getLabel('appSpecialTypeFive', item.label) }}
|
||||
{{ item.dictName }}
|
||||
</h2>
|
||||
<img src="./img/down-icon.png" alt="" :class="item.check ? 'img-active' : ''">
|
||||
<img src="./img/down-icon.png" alt="" :class="type == item.dictValue ? 'img-active' : ''">
|
||||
</div>
|
||||
<div class="user-list" v-if="item.check">
|
||||
<div class="user-item" v-for="(e, indexs) in item.value" :key="indexs" v-if="item.value && item.value.length">
|
||||
<div class="user-list" v-if="type == item.dictValue">
|
||||
<div class="user-item" v-for="(e, indexs) in userList" :key="indexs">
|
||||
<div class="user-img">
|
||||
<img src="./img/user-img.png" alt="">
|
||||
</div>
|
||||
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text" v-if="!item.value.length">{{'暂无' + $dict.getLabel('appSpecialTypeFive', item.label) + '信息'}}</p>
|
||||
<p class="text" v-if="!userList.length">{{'暂无' + item.dictName + '信息'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer" @click="toAdd">
|
||||
@@ -88,12 +88,16 @@ export default {
|
||||
statisticsList: [],
|
||||
statisticsListMon: [],
|
||||
userList: [],
|
||||
name: ''
|
||||
name: '',
|
||||
typeList: [],
|
||||
type: '',
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
created() {
|
||||
this.$dict.load('appSpecialTypeFive').then(() => {
|
||||
this.typeList = this.$dict.getDict('appSpecialTypeFive')
|
||||
this.areaId = this.user.areaId
|
||||
this.areaName = this.user.areaName
|
||||
this.getStatistic()
|
||||
@@ -151,17 +155,12 @@ export default {
|
||||
},
|
||||
getUserList() {
|
||||
this.userList = []
|
||||
this.$http.post('app/appspecialadjustment/allList',{type: '', name: this.name}).then((res) => {
|
||||
this.$http.post(`app/appspecialadjustment/allList?size=20¤t=${this.current}`,{type: this.type, 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)
|
||||
|
||||
if(this.current > res.data.total) {
|
||||
return
|
||||
}
|
||||
this.userList = this.current > 1 ? [...this.userList, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -176,15 +175,20 @@ export default {
|
||||
}
|
||||
return idNumber
|
||||
},
|
||||
showUserType(index) {
|
||||
if(this.userList[index].check) {
|
||||
this.userList[index].check = false
|
||||
}else {
|
||||
this.userList.map((item) => {
|
||||
item.check = false
|
||||
})
|
||||
this.userList[index].check = true
|
||||
}
|
||||
showUserType(item) {
|
||||
// if(this.userList[index].check) {
|
||||
// this.userList[index].check = false
|
||||
// }else {
|
||||
// this.userList.map((item) => {
|
||||
// item.check = false
|
||||
// })
|
||||
// this.userList[index].check = true
|
||||
// }
|
||||
console.log(item)
|
||||
this.type = item.dictValue
|
||||
this.current = 1
|
||||
this.userList = []
|
||||
this.getUserList()
|
||||
|
||||
},
|
||||
toEdit(row,index) {
|
||||
@@ -209,6 +213,10 @@ export default {
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getUserList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -109,7 +109,6 @@ export default {
|
||||
res.data.records.map((item) => {
|
||||
item.isChecked = false
|
||||
})
|
||||
uni.hideLoading()
|
||||
this.userList = this.current > 1 ? [...this.userList, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user