From ff2fdc424f5c688c5c5b81450a506163cf668e5d Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Fri, 7 Jan 2022 17:19:29 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8A=95=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppVillageDiscuss/Add.vue | 63 ++++++++++++++------------- src/apps/AppVillageDiscuss/Detail.vue | 2 +- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/src/apps/AppVillageDiscuss/Add.vue b/src/apps/AppVillageDiscuss/Add.vue index 182cf053..22fbb46a 100644 --- a/src/apps/AppVillageDiscuss/Add.vue +++ b/src/apps/AppVillageDiscuss/Add.vue @@ -35,14 +35,14 @@
-
+ +
+
- +
@@ -133,6 +133,7 @@ export default { }, submit() { + let list = [] if (this.flag) return if (!this.form.content) { return this.$u.toast('请输入主题') @@ -146,26 +147,27 @@ export default { if (!this.form.publicityDeadline) { return this.$u.toast('请选择公示截止时间') } - if (this.form.type == 1 && this.opts == 0 && !this.contents) { - return this.$u.toast('请输入单选选项') - } - if (this.opts == 1 && !this.list.length) { - return this.$u.toast('请输入多选选项') - } - if (this.contents) { - this.list.push(this.contents) - } - if (this.opts == 1) { - var lists = [] - this.list.map((item, index) => { - item.contents == item, item.item == this.keys[index] - lists.push({ - content: item, - item: this.keys[index], - }) + if (this.form.type === '1') { + if (!this.list.length) { + return this.$u.toast('请添加选项') + } + if (this.list.length < 2) { + return this.$u.toast('选项不能少于2个') + } + + list = this.list.map((v, index) => { + return { + content: v.content, + item: this.keys[index] + } }) - console.log(lists) + + for (let i = 0; i < list.length; i ++) { + if (!list[i].content) { + return this.$u.toast(`请输入弟${i + 1}个选项的内容`) + } + } } var params = { @@ -173,7 +175,7 @@ export default { // voteItems: this.list, areaId: this.form.areaId, areaName: this.form.areaName, - voteItems: lists, + voteItems: list, anonymous: this.checked == true ? 1 : 0, createUserId: this.user.id, createUserName: this.user.name, @@ -194,11 +196,12 @@ export default { }, addOpts() { - if (!this.contents) { - return this.$u.toast('请输入选项内容') - } - this.list.push(this.contents) - this.contents = '' + // if (!this.contents) { + // return this.$u.toast('请输入选项内容') + // } + this.list.push({ + content: '' + }) }, del(index) { @@ -211,8 +214,6 @@ export default { }, confirmTime(e) { - console.log(e) - if (this.showStartTime == true) { var nowTime = new Date().getTime() * 1 diff --git a/src/apps/AppVillageDiscuss/Detail.vue b/src/apps/AppVillageDiscuss/Detail.vue index db601c2e..e98aed89 100644 --- a/src/apps/AppVillageDiscuss/Detail.vue +++ b/src/apps/AppVillageDiscuss/Detail.vue @@ -141,7 +141,7 @@ export default { this.timestamp = discussTime - nowTime } - if (res.data.voteType === '1') { + if (res.data.type === '1') { const total = Object.values(res.data.statistic).reduce((x, y) => { return x + y }) From abc687fb91639183a7f991dc6dddefb17420f58b Mon Sep 17 00:00:00 2001 From: liuye Date: Fri, 7 Jan 2022 17:21:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=9A=8F=E6=89=8B=E6=8B=8D=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppHandSnapshot/PercentageDetail.vue | 8 +- src/apps/AppHandSnapshot/SelectUser.vue | 6 +- src/apps/AppHandSnapshot/Statistics.vue | 83 ++++++++++++------- 3 files changed, 59 insertions(+), 38 deletions(-) diff --git a/src/apps/AppHandSnapshot/PercentageDetail.vue b/src/apps/AppHandSnapshot/PercentageDetail.vue index b56086fe..dfd5e63d 100644 --- a/src/apps/AppHandSnapshot/PercentageDetail.vue +++ b/src/apps/AppHandSnapshot/PercentageDetail.vue @@ -16,19 +16,19 @@
小区管理
-
共11条 | 已办结9 +
共11条 | 已办结9
小区管理
-
共11条 | 已办结9 +
共11条 | 已办结9
小区管理
-
共11条 | 已办结9 +
共11条 | 已办结9
@@ -186,7 +186,7 @@ export default { line-height: 48px; .line-bg{ display: inline-block; - width: 63%; + width: 56%; height: 14px; background: #D7D8D9; border-radius: 8px; diff --git a/src/apps/AppHandSnapshot/SelectUser.vue b/src/apps/AppHandSnapshot/SelectUser.vue index 47452aaa..3d3e78a2 100644 --- a/src/apps/AppHandSnapshot/SelectUser.vue +++ b/src/apps/AppHandSnapshot/SelectUser.vue @@ -115,11 +115,7 @@ export default { } }) }else { //查网格员 - this.$http.post(`/app/appgirdmemberinfo/listByGirdId`, { - appGirdMemberInfo: { - girdId: row.id - } - }).then((res) => { + this.$http.post(`/app/appgirdmemberinfo/listByGirdId`, {girdId: row.id}).then((res) => { if (res?.data) { this.userList = res.data this.userList.map((item) => { diff --git a/src/apps/AppHandSnapshot/Statistics.vue b/src/apps/AppHandSnapshot/Statistics.vue index 7e1c7262..80302deb 100644 --- a/src/apps/AppHandSnapshot/Statistics.vue +++ b/src/apps/AppHandSnapshot/Statistics.vue @@ -1,10 +1,11 @@ @@ -89,10 +78,16 @@ export default { data() { return { todayList: [], - info: {} + info: {}, + pageShow: false, + myGirdList: [], + showSelect: false, + myGirdList: [], + girdName: '全部网格' } }, mounted() { + this.girdList() this.getStatistics() }, methods: { @@ -107,7 +102,18 @@ export default { } this.todayList.push(info) }) + if(this.info.groupList.length) { + this.info.groupList.map((item, index) => { + if(item.finishNum) { + item.percentage = (item.finishNum/item.totalNum).toFixed(2) + }else { + item.percentage = 0 + } + item.width = 56-(index*10) + }) + } } + this.pageShow = true }) }, @@ -125,6 +131,27 @@ export default { }, toUserList() { uni.navigateTo({url: './UserList'}) + }, + + girdList() { + 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) { + } }, } @@ -291,13 +318,11 @@ export default { line-height: 48px; .line-bg{ display: inline-block; - width: 56%; height: 14px; background: #D7D8D9; border-radius: 8px; margin-right: 12px; .active-bg{ - width: 80%; height: 100%; background: #257FF1; border-radius: 8px; From d5bdc4d89f84d9b97db3f063fae2544d2b96a01b Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Fri, 7 Jan 2022 17:23:13 +0800 Subject: [PATCH 3/3] 26528 --- src/apps/AppVillageDiscuss/Detail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/AppVillageDiscuss/Detail.vue b/src/apps/AppVillageDiscuss/Detail.vue index e98aed89..8cd9c271 100644 --- a/src/apps/AppVillageDiscuss/Detail.vue +++ b/src/apps/AppVillageDiscuss/Detail.vue @@ -256,7 +256,7 @@ export default { id: this.id }).then((res) => { if (res?.code == 0) { - this.$u.toast('已结束公示!') + this.$u.toast('结束公示成功!') this.getDetail() } })