分类统计
-

+
-
-
小区管理
+
+
{{item.groupName}}
-
共11条 | 已办结9

-
-
-
-
小区管理
-
-
共11条 | 已办结9

-
-
-
-
小区管理
-
-
共11条 | 已办结9

+
共{{item.totalNum}}条 | 已办结{{item.finishNum}}
-
@@ -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;
diff --git a/src/apps/AppVillageDiscuss/Add.vue b/src/apps/AppVillageDiscuss/Add.vue
index a712e228..4e380a94 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 07f853b0..5f59d57a 100644
--- a/src/apps/AppVillageDiscuss/Detail.vue
+++ b/src/apps/AppVillageDiscuss/Detail.vue
@@ -41,6 +41,7 @@
+
@@ -111,6 +112,7 @@ export default {
deleShow: false,
modalShow: false,
deleId: '',
+ isAnnouncer: false,
}
},
computed: {
@@ -157,7 +159,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
})
@@ -183,40 +185,39 @@ export default {
like(id) {
this.$loading()
- this.$http
- .post(`/app/appvillagediscussmessage/suport?id=${id}&userId=${this.user.id}`)
- .then((res) => {
- this.$hideLoading()
- if (res.code === 0) {
- this.$u.toast('点赞成功')
+ this.$http.post(`/app/appvillagediscussmessage/suport?id=${id}&userId=${this.user.id}`).then((res) => {
+ this.$hideLoading()
+ if (res.code === 0) {
+ this.$u.toast('点赞成功')
- this.$nextTick(() => {
- this.getDetail()
- })
- } else {
- this.$u.toast(res.msg)
- }
- })
- .catch((e) => {
- this.$hideLoading()
- this.$u.toast(e)
- })
+ this.$nextTick(() => {
+ this.getDetail()
+ })
+ } else {
+ this.$u.toast(res.msg)
+ }
+ })
},
-
adddeleShow(id) {
this.deleId = id
this.deleShow = true
},
confirmDelete() {
- this.$http.post(`/app/appvillagediscussmessage/delete?ids=${this.deleId}`).then((res) => {
- if (res?.data) {
- this.deleShow = false
- this.modalShow = false
- this.deleId = ''
- this.getDetail()
- }
- })
+ this.$http
+ .post(`/app/appvillagediscussmessage/delete?ids=${this.deleId}`)
+ .then((res) => {
+ if (res?.data) {
+ this.deleShow = false
+ this.modalShow = false
+ this.deleId = ''
+ this.getDetail()
+ }
+ })
+ .catch((e) => {
+ this.$hideLoading()
+ this.$u.toast(e)
+ })
},
publish() {
@@ -293,7 +294,7 @@ export default {
})
.then((res) => {
if (res?.code == 0) {
- this.$u.toast('已结束公示!')
+ this.$u.toast('结束公示成功!')
this.getDetail()
}
})