From a1ff252028bb2071e6d19d2bce7edd459a305e43 Mon Sep 17 00:00:00 2001 From: liuye Date: Wed, 16 Feb 2022 14:23:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppPeopleList.vue/Content.vue | 21 +++- src/apps/AppPeopleList.vue/DetailPeople.vue | 25 +++- src/apps/AppPeopleList.vue/ExamineList.vue | 113 +++++++++++++----- src/apps/AppPeopleList.vue/PeopleList.vue | 7 +- src/components/pages/selectGird.vue | 1 + .../AppGridManagement/AppGridManagement.vue | 2 +- 6 files changed, 127 insertions(+), 42 deletions(-) diff --git a/src/apps/AppPeopleList.vue/Content.vue b/src/apps/AppPeopleList.vue/Content.vue index 00c9e7eb..b9fe3e83 100644 --- a/src/apps/AppPeopleList.vue/Content.vue +++ b/src/apps/AppPeopleList.vue/Content.vue @@ -2,9 +2,9 @@
不通过理由
- +
- @@ -15,18 +15,27 @@ export default { name: "Content", data() { return { - value: '', + opinion: '', + id: '', }; }, onShow() { document.title = '居民档案审核' }, onLoad(option) { - // this.id = option.id + this.id = option.id }, methods: { - submit() { - + examine(pass) { + this.$http.post(`/app/appresident/examine?id=${this.id}&pass=${pass}&opinion=${this.opinion}`).then((res) => { + if (res.code == 0) { + this.$u.toast('审核成功') + uni.$emit('updatePeople') + setTimeout(() => { + uni.navigateBack() + }, 600) + } + }) } }, }; diff --git a/src/apps/AppPeopleList.vue/DetailPeople.vue b/src/apps/AppPeopleList.vue/DetailPeople.vue index 11879866..8b699e38 100644 --- a/src/apps/AppPeopleList.vue/DetailPeople.vue +++ b/src/apps/AppPeopleList.vue/DetailPeople.vue @@ -105,10 +105,10 @@
-
- @@ -131,6 +131,9 @@ export default { this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => { this.getDetail() }) + uni.$on('updatePeople', res => { + this.getDetail() + }) }, onShow() { document.title = '家庭成员信息' @@ -149,6 +152,20 @@ export default { callPhone(phone) { uni.makePhoneCall({ phoneNumber: phone }) }, + examine(pass) { + this.$confirm('确认通过该审核?').then(() => { + this.$http.post(`/app/appresident/examine?id=${this.id}&pass=${pass}`).then((res) => { + if (res.code == 0) { + this.getDetail() + this.$u.toast('审核成功') + } + }) + }) + + }, + toContent() { + uni.navigateTo({url: `./Content?id=${this.id}`}) + } }, } diff --git a/src/apps/AppPeopleList.vue/ExamineList.vue b/src/apps/AppPeopleList.vue/ExamineList.vue index 27b92792..fe9610e2 100644 --- a/src/apps/AppPeopleList.vue/ExamineList.vue +++ b/src/apps/AppPeopleList.vue/ExamineList.vue @@ -14,8 +14,8 @@ -
-
+
+
@@ -29,6 +29,7 @@ {{ $dict.getLabel('householdRelation', item.householdRelation) }} + {{ $dict.getLabel('auditStatus', item.auditStatus) }}
@@ -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 @@