From 2207056cc34b1d7d17cd1ddf73e64fcdcf2959ad Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 7 Feb 2020 18:53:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=EF=BC=9A=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=B4=BB=E5=8A=A8banner=E5=9B=BE=E7=89=87=E6=9C=AA?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C;=20=E5=8F=96=E6=B6=88=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E5=8E=BB=E6=8E=89=E6=96=87=E5=AD=97=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/heart/actinfo-add-or-update.vue | 25 ++++++++++++++++--- src/views/modules/heart/actinfo-cancel.vue | 6 ----- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/views/modules/heart/actinfo-add-or-update.vue b/src/views/modules/heart/actinfo-add-or-update.vue index f809c729..ea352ae2 100644 --- a/src/views/modules/heart/actinfo-add-or-update.vue +++ b/src/views/modules/heart/actinfo-add-or-update.vue @@ -55,6 +55,7 @@ type="datetime" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" + :picker-options="isSignupEndTime" placeholder="选择日期时间"> @@ -240,9 +241,9 @@ prop="isBanner"> 是 + label="1" @change="changeHandler">是 否 + label="0" @change="changeHandler">否 @@ -320,6 +321,12 @@ export default { actUserDefaultState: '1', bannerUrl:"" }, + isSignupEndTime: { + disabledDate(time) { + return time < Date.now() - 8.64e7;//8.64e7=1000*60*60*24一天 + } + }, + isImgRequired: true, mapSelectVisible:false, signInIsAble: true, isAble: false, @@ -499,6 +506,9 @@ export default { ], updatedTime: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } + ], + isBanner: [ + { required: this.isImgRequired, message: this.$t('validate.required'), trigger: 'blur' } ] } } @@ -507,6 +517,13 @@ export default { dateChangeTime(){ this.dataForm.signinStartTime = this.dataForm.actStartTime }, + changeHandler(value) { + if(value == 1){ + this.isImgRequired = true + } else{ + this.isImgRequired = false + } + }, backToActList () { this.$emit('refreshDataList') this.$parent.selectComponent = 'ActInfoList' @@ -609,9 +626,9 @@ export default { return this.$message.error('活动结束时间必须大于活动开始时间。'); } - if (signinEndTime < actStarTime) { + if (signinEndTime < actEndTime) { - return this.$message.error('签到结束时间必须大于签到开始时间。'); + return this.$message.error('签到结束时间必须大于活动结束时间。'); } this.isAble = true diff --git a/src/views/modules/heart/actinfo-cancel.vue b/src/views/modules/heart/actinfo-cancel.vue index d4f945c0..98f22154 100644 --- a/src/views/modules/heart/actinfo-cancel.vue +++ b/src/views/modules/heart/actinfo-cancel.vue @@ -1,12 +1,6 @@ - - - - 活动取消,并发送通知给已报名的志愿者,是否确定取消? - -
- 活动取消,并发送通知给已报名的志愿者,是否确定取消? -