@@ -57,7 +58,7 @@ export default {
data() {
return {
id: '',
- data: [],
+ datas: [],
resident: {},
areaId: '',
areaName: '',
@@ -70,38 +71,76 @@ export default {
},
],
currentTabs: 0,
+ keyword: ''
}
},
computed: {
...mapState(['user']),
},
+ onLoad() {
+ this.$dict.load('householdRelation', 'auditStatus').then(() => {
+ this.getList()
+ })
+ },
onShow() {
document.title = '居民档案审核'
},
methods: {
- change(index) {
- this.data = []
- // this.keyword = ''
- this.currentTabs = index
- // this.current = 1
- // this.getList()
+ getListInit() {
+ this.current = 1
+ this.datas = []
+ this.getList()
},
- getDetail() {
- this.$http.post(`/app/appresident/detail?id=${this.id}`).then((res) => {
+ getList() {
+ var auditType = 0 // 0待处理; 2已处理
+ if(this.currentTabs == 1) {
+ auditType = 2
+ }
+ this.$http.post('/app/appresident/list', null, {
+ params: {
+ size: 10,
+ current: this.current,
+ con: this.keyword,
+ areaId: this.areaId,
+ auditType
+ },
+ })
+ .then((res) => {
if (res.code == 0) {
- this.data = res.data
- this.$forceUpdate()
- this.$nextTick(() => {
- this.resident = res.data.resident
- this.$forceUpdate()
- })
+ this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
+
+ this.pages = res.data.pages
}
})
},
+ change(index) {
+ this.currentTabs = index
+ this.getListInit()
+ },
+
toDetailPeople(item) {
uni.navigateTo({ url: `./DetailPeople?id=${item.id}` })
},
+
+ seachObj(e) {
+ this.areaId = e
+ this.getListInit()
+ },
+
+ handerSearch(e) {
+ this.keyword = e
+ this.getListInit()
+ },
+
+ handerClear() {
+ this.keyword = ''
+ this.getListInit()
+ },
+ },
+ onReachBottom() {
+ this.current = this.current + 1
+ this.getList()
},
}
@@ -109,12 +148,18 @@ export default {
diff --git a/src/apps/AppPeopleList.vue/PeopleList.vue b/src/apps/AppPeopleList.vue/PeopleList.vue
index a0ac138e..ce3bda72 100644
--- a/src/apps/AppPeopleList.vue/PeopleList.vue
+++ b/src/apps/AppPeopleList.vue/PeopleList.vue
@@ -1,5 +1,5 @@
-