会议通知还原

This commit is contained in:
wanglei
2021-11-23 13:51:50 +08:00
parent 02db67eb00
commit b6744ba1dc
2 changed files with 10 additions and 20 deletions

View File

@@ -67,7 +67,7 @@
params: null,
}
},
onLoad() {
created() {
this.$dict.load("meetingNoticeBefore", "meetingNoticeAfter", "meetStatus");
},
computed: {

View File

@@ -72,7 +72,7 @@
<div @click="add(1)">发布会议</div>
</div>
</div>
<u-datetime-picker mode="datetime" :show="show" :value="value" @confirm="confirm"></u-datetime-picker>
<u-picker mode="time" v-model="show" :params="params" @confirm="confirm"></u-picker>
<AiBack ref="aiBack" v-if="!userSelect"/>
<AiSelectEnterprise :visible.sync="userSelect" :value="form.attendees" v-if="userSelect"
@change="change"></AiSelectEnterprise>
@@ -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) {