From a6c3bf5b741ceae9600c48bd79119df6c97866af Mon Sep 17 00:00:00 2001 From: liuye Date: Fri, 7 Jan 2022 09:20:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=8F=E6=89=8B=E6=8B=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppHandSnapshot/Detail.vue | 8 ++- src/apps/AppHandSnapshot/List.vue | 78 ++++++++++++++--------------- 2 files changed, 46 insertions(+), 40 deletions(-) diff --git a/src/apps/AppHandSnapshot/Detail.vue b/src/apps/AppHandSnapshot/Detail.vue index f3a75394..915f7334 100644 --- a/src/apps/AppHandSnapshot/Detail.vue +++ b/src/apps/AppHandSnapshot/Detail.vue @@ -51,7 +51,7 @@ 照片 - +
@@ -171,6 +171,12 @@ export default { toContent(number) { uni.navigateTo({ url: `./Content?number=${number}&groupId=${this.data.groupId}&groupName=${this.data.groupName}&id=${this.id}` }) }, + previewImage(images, img) { + uni.previewImage({ + urls: images.map(v => v.url), + current: img + }) + }, }, } diff --git a/src/apps/AppHandSnapshot/List.vue b/src/apps/AppHandSnapshot/List.vue index 0243f105..232c9fde 100644 --- a/src/apps/AppHandSnapshot/List.vue +++ b/src/apps/AppHandSnapshot/List.vue @@ -3,15 +3,15 @@
-
- 所属网格 +
+ {{girdNameText}}
- 办件状态 + {{eventStatusText}}
@@ -67,19 +67,17 @@ export default { name: '办件历史', }, ], - currentTabs: 0, current: 1, - size: 10, pages: 0, - show: false, myGirdList: [], - girdName: '', - + girdId: '', + girdNameText: '所属网格', showType: false, listType: [], eventStatus: '', + eventStatusText: '办件状态' } }, computed: { @@ -93,11 +91,20 @@ export default { this.current = 1 this.girdList() this.getList() + uni.$on('nextList', ()=>{ + this.current ++ + this.getList() + }) }, created() { this.$dict.load('clapEventStatus').then(() => { this.getList() this.listType = this.$dict.getDict('clapEventStatus') + var all = { + dictValue: '', + dictName: '全部' + } + this.listType.unshift(all) }) }, methods: { @@ -109,7 +116,7 @@ export default { current: this.current, searchType: this.currentTabs == 1 ? '1' : '0', eventStatus: this.eventStatus, - girdName: this.girdName, + girdId: this.girdId }, }) .then((res) => { @@ -121,41 +128,36 @@ export default { }) }, - toGirdList() { - this.show = true - }, - girdList() { - this.$http - .post(`/app/appgirdmemberinfo/queryMyGirdList`, null, { - params: { - size: 9999, - }, - }) - .then((res) => { - if (res.code == 0) { - this.myGirdList = res.data + this.$http.post(`/app/appgirdmemberinfo/queryMyGirdList`, null, { + params: { + size: 9999, + }, + }) + .then((res) => { + if (res.code == 0) { + this.myGirdList = res.data + var all = { + id: '', + girdName: '全部' } - }) + this.myGirdList.unshift(all) + } + }) }, confirm(e) { if (this.show) { - if (e[0].value) { - console.log(e) - - this.girdName = e[0].label - this.current = 1 - this.getList() - } + this.girdNameText = e[0].label + this.girdId = e[0].value } if (this.showType) { - console.log(e) - this.eventStatus = e[0].value - this.current = 1 - this.getList() + this.eventStatusText = e[0].label } + + this.current = 1 + this.getList() }, goDetail(item) { @@ -166,7 +168,9 @@ export default { this.current = 1 this.datas = [] this.eventStatus = '' - this.girdName = '' + this.girdId = '' + this.girdNameText = '所属网格' + this.eventStatusText = '办件状态' this.currentTabs = index this.getList() }, @@ -175,10 +179,6 @@ export default { uni.navigateTo({ url }) }, }, - onReachBottom() { - this.current = this.current + 1 - this.getList() - }, }