BUG 29703

This commit is contained in:
aixianling
2022-05-20 15:12:31 +08:00
parent 1489ca4f57
commit 66ce6b1e5a

View File

@@ -1,7 +1,7 @@
<template>
<div class="selectResident">
<AiTopFixed>
<u-search placeholder="搜索" v-model="name" :show-action="false" @change="getList"/>
<u-search placeholder="搜索" v-model="name" :show-action="false" @change="current=1,getList()"/>
</AiTopFixed>
<div class="user-list">
<template v-if="list.length>0">
@@ -58,18 +58,18 @@ export default {
},
methods: {
getList() {
let {current, total, name: con, $route: {query: {action}}} = this
if (total == 0 || current <= total) {
let {current, total, name: con, $route: {query: {action = `/admin/user/userIntegralList`}}} = this
if ((!total && current == 1) || current <= total) {
action = decodeURIComponent(action)
this.$http.post(action || `/admin/user/userIntegralList`, null, {
this.$http.post(action, null, {
params: {current, size: 20, con}
}).then(res => {
if (res?.data) {
this.total = res.data.total || 0
this.total = res.data.pages || 0
res.data.records.forEach(e => {
e.isCheck = this.selected.includes(e.idNumber)
})
this.list = [this.list, res.data.records || []].flat()
this.list = [current == 1 ? [] : this.list, res.data.records || []].flat()
}
})
}