From b6744ba1dc39d03ad70ab0c0901299aeab1614db Mon Sep 17 00:00:00 2001 From: wanglei <1336977847@qq.com> Date: Tue, 23 Nov 2021 13:51:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AE=AE=E9=80=9A=E7=9F=A5=E8=BF=98?= =?UTF-8?q?=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppMeetingNotice/AppMeetingNotice.vue | 2 +- .../components/addMeeting.vue | 28 ++++++------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/apps/AppMeetingNotice/AppMeetingNotice.vue b/src/apps/AppMeetingNotice/AppMeetingNotice.vue index f4e8f2be..7fc65f18 100644 --- a/src/apps/AppMeetingNotice/AppMeetingNotice.vue +++ b/src/apps/AppMeetingNotice/AppMeetingNotice.vue @@ -67,7 +67,7 @@ params: null, } }, - onLoad() { + created() { this.$dict.load("meetingNoticeBefore", "meetingNoticeAfter", "meetStatus"); }, computed: { diff --git a/src/apps/AppMeetingNotice/components/addMeeting.vue b/src/apps/AppMeetingNotice/components/addMeeting.vue index a561e63c..40173fda 100644 --- a/src/apps/AppMeetingNotice/components/addMeeting.vue +++ b/src/apps/AppMeetingNotice/components/addMeeting.vue @@ -72,7 +72,7 @@
发布会议
- + @@ -188,29 +188,19 @@ }) }, confirm(e) { - const date = new Date(e.value); - const year = date.getFullYear(); - const month = date.getMonth() + 1; - const day = date.getDate(); - const hours = date.getHours(); - const minutes = date.getMinutes(); - const seconds = date.getSeconds(); - const weekday = date.getDay(); - - if (new Date().getTime() / 1000 > e.value) return this.$u.toast("选择时间不能小于当前时间") + if (new Date().getTime() / 1000 > e.timestamp) return this.$u.toast("选择时间不能小于当前时间") if (this.index == 0) { - this.form.startTime = {year,month,day,timestamp:e.vaule} - this.form.startTime.time = hours + ":" + minutes - this.form.startTime.weekday = '一二三四五六日'.charAt(weekday) + this.form.startTime = {...e} + this.form.startTime.time = e.hour + ":" + (e.minute.length > 1 ? e.minute : ("0" + e.minute)) + this.form.startTime.weekday = '日一二三四五六'.charAt(new Date(e.timestamp * 1000).getDay()) } else { - if (this.form.startTime.timestamp >= e.value) { + if (this.form.startTime.timestamp >= e.timestamp) { return this.$u.toast("结束时间不能小于开始时间"); } - this.form.endTime = {year,month,day,timestamp:e.vaule} - this.form.endTime.time = hours + ":" + minutes - this.form.endTime.weekday = '一二三四五六日'.charAt(weekday) + this.form.endTime = {...e} + this.form.endTime.time = e.hour + ":" + (e.minute.length > 1 ? e.minute : ("0" + e.minute)) + this.form.endTime.weekday = '日一二三四五六'.charAt(new Date(e.timestamp * 1000).getDay()) } - this.show = false; }, add(status) {