From d43e31cee5cc23a24749a6ebad2ae5eb6555fd60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8A=B1=E6=9C=89=E6=B8=85=E9=A6=99=E6=9C=88=E6=9C=89?=
=?UTF-8?q?=E9=98=B4?= <185154740@qq.com>
Date: Fri, 7 Jan 2022 16:25:43 +0800
Subject: [PATCH] bug
---
src/apps/AppVillageDiscuss/Add.vue | 40 ++++++++++++++++++++++--------
1 file changed, 30 insertions(+), 10 deletions(-)
diff --git a/src/apps/AppVillageDiscuss/Add.vue b/src/apps/AppVillageDiscuss/Add.vue
index 23a7d04d..01b903f9 100644
--- a/src/apps/AppVillageDiscuss/Add.vue
+++ b/src/apps/AppVillageDiscuss/Add.vue
@@ -3,7 +3,7 @@
@@ -53,7 +53,7 @@
-
+
@@ -112,9 +112,9 @@ export default {
timestamp: true,
},
opts: 0,
- checked: true,
+ checked: false,
list: [],
- content: '',
+ contents: '',
keys: ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
}
},
@@ -124,7 +124,7 @@ export default {
this.id = o.id
this.getDetail()
}
-
+ this.form.areaId = this.user.areaId
this.$dict.load('discussType').then(() => {
// this.areaId = this.user.areaId
})
@@ -147,16 +147,34 @@ export default {
submit() {
if (this.flag) return
if (!this.form.content) {
- return this.$u.toast('请输入 主题')
+ return this.$u.toast('请输入主题')
}
- if (!this.form.discussDeadline) {
- return this.$u.toast('请选择 议事截止时间')
+ if (!this.form.areaId) {
+ return this.$u.toast('请输入发布地区')
+ }
+ // if (!this.form.discussDeadline) {
+ // return this.$u.toast('请选择议事截止时间')
+ // }
+ // if (!this.form.publicityDeadline) {
+ // return this.$u.toast('请选择公示截止时间')
+ // }
+ if (this.form.type == 1) {
+ if (this.opts == 0) {
+ if (!this.form.contents) {
+ return this.$u.toast('请输入单选选项')
+ }
+ }
+ if (this.opts == 1) {
+ if (!this.list.length > 0) {
+ return this.$u.toast('请输入多选选项')
+ }
+ }
}
if (this.opts == 1) {
var lists = []
this.list.map((item, index) => {
- item.content == item, item.item == this.keys[index]
+ item.contents == item, item.item == this.keys[index]
lists.push({
content: item,
item: this.keys[index],
@@ -168,6 +186,8 @@ export default {
var params = {
...this.form,
// voteItems: this.list,
+ areaId: this.form.areaId,
+ areaName: this.form.areaName,
voteItems: lists,
anonymous: this.checked == true ? 1 : 0,
createUserId: this.user.id,