时间校验
This commit is contained in:
@@ -152,24 +152,18 @@ export default {
|
||||
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) {
|
||||
if (!this.form.discussDeadline) {
|
||||
return this.$u.toast('请选择议事截止时间')
|
||||
}
|
||||
if (!this.form.publicityDeadline) {
|
||||
return this.$u.toast('请选择公示截止时间')
|
||||
}
|
||||
if (this.form.type == 1 && this.opts == 0 && !this.form.contents) {
|
||||
return this.$u.toast('请输入单选选项')
|
||||
}
|
||||
}
|
||||
if (this.opts == 1) {
|
||||
if (!this.list.length > 0) {
|
||||
if (this.opts == 1 && !this.list.length) {
|
||||
return this.$u.toast('请输入多选选项')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.opts == 1) {
|
||||
var lists = []
|
||||
@@ -209,11 +203,11 @@ export default {
|
||||
},
|
||||
|
||||
addOpts() {
|
||||
if (!this.content) {
|
||||
if (!this.contents) {
|
||||
return this.$u.toast('请输入选项内容')
|
||||
}
|
||||
this.list.push(this.content)
|
||||
this.content = ''
|
||||
this.list.push(this.contents)
|
||||
this.contents = ''
|
||||
},
|
||||
|
||||
del(index) {
|
||||
|
||||
Reference in New Issue
Block a user