From 8c81ea26afdccb7e4607ff19b284822cd1abe6f0 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 09:40:39 +0800 Subject: [PATCH] 26420 --- src/apps/AppVillageDiscuss/Add.vue | 110 +++++++++++++++++++++++++++-- 1 file changed, 104 insertions(+), 6 deletions(-) diff --git a/src/apps/AppVillageDiscuss/Add.vue b/src/apps/AppVillageDiscuss/Add.vue index 34d3ee00..cf175989 100644 --- a/src/apps/AppVillageDiscuss/Add.vue +++ b/src/apps/AppVillageDiscuss/Add.vue @@ -2,18 +2,30 @@
- + + - - + + + - - + + + + + + + + + + + +
{{ op.dictName }} @@ -37,6 +49,17 @@ export default { id: '', form: { type: 0 }, flag: false, + showStartTime: false, + showEndTime: false, + params: { + year: true, + month: true, + day: true, + hour: true, + minute: true, + second: false, + timestamp: true, + }, } }, computed: { ...mapState(['user']) }, @@ -45,7 +68,10 @@ export default { this.id = o.id this.getDetail() } - this.$dict.load('discussType') + + this.$dict.load('discussType').then(() => { + // this.areaId = this.user.areaId + }) }, onShow() { document.title = '新增议事' @@ -61,6 +87,7 @@ export default { } }) }, + submit() { if (this.flag) return if (!this.form.content) { @@ -86,6 +113,43 @@ export default { } }) }, + + areaSelect(e) { + console.log(e) + this.form.areaId = e + }, + + confirmTime(e) { + console.log(e) + + if (this.showStartTime == true) { + var nowTime = new Date().getTime() * 1 + + var discussDeadlineTimes = new Date(e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00').getTime() * 1 + + if (nowTime > discussDeadlineTimes) { + this.form.discussDeadline = '' + return this.$u.toast('议事截止时间应大于当前时间') + } else { + this.form.discussDeadline = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00' + } + } + if (this.showEndTime == true) { + if (!this.form.discussDeadline) { + return this.$u.toast('请先选择议事截止时间') + } + var beginTimes = new Date(this.form.discussDeadline).getTime() * 1 + + var publicityDeadlineTimes = new Date(e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00').getTime() * 1 + + if (publicityDeadlineTimes > beginTimes && publicityDeadlineTimes != beginTimes) { + this.form.publicityDeadline = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00' + } else { + this.form.publicityDeadline = '' + return this.$u.toast('公示截止时间应大于议事截止时间') + } + } + }, }, } @@ -100,6 +164,9 @@ export default { .u-form-item__body { .u-form-item--right__content__slot { padding-bottom: 0; + .u-input { + text-align: right !important; + } } } } @@ -109,6 +176,27 @@ export default { padding-bottom: 20px !important; } + .addresss { + .u-form-item__body { + .u-form-item--right { + .u-form-item--right__content { + .u-form-item--right__content__slot { + .AiAreaPicker { + width: 100%; + display: flex; + justify-content: flex-end; + .areaSelector { + .location { + opacity: 0; + } + } + } + } + } + } + } + } + .avatars { margin: 16px 0; @@ -119,6 +207,16 @@ export default { } } } + + .contents { + .u-form-item__body { + .u-form-item--right__content__slot { + .u-input { + text-align: left !important; + } + } + } + } } }