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