课程日历

master
lion 5 months ago
parent 7767ed35cf
commit 5f2d28d5b8

@ -795,13 +795,16 @@ export default {
this.form.title = this.form.title =
(item.type_detail ? item.type_detail.name + " - " : "") + (item.type_detail ? item.type_detail.name + " - " : "") +
item.name; item.name;
this.form.start_time = item.start_date // 仅新增时自动填充开始/截止时间,编辑时保留原值
? `${item.start_date} 09:00:00` if (this.type === 'add') {
: ""; this.form.start_time = item.start_date
this.form.end_time = item.end_date ? `${item.start_date} 09:00:00`
? `${item.end_date} 17:00:00` : "";
: ""; this.form.end_time = item.end_date
this.form.date = item.start_date; ? `${item.end_date} 17:00:00`
: "";
this.form.date = item.start_date;
}
this.form.url = item.url; this.form.url = item.url;
this.form.color = item.type_detail?(item.type_detail.color?item.type_detail.color:''):'' this.form.color = item.type_detail?(item.type_detail.color?item.type_detail.color:''):''
} }
@ -815,9 +818,12 @@ export default {
this.course_content_options.map((item) => { this.course_content_options.map((item) => {
if (item.id === e) { if (item.id === e) {
this.form.title = item.theme; this.form.title = item.theme;
this.form.start_time = item.start_date; // 仅新增时自动填充开始/截止时间,编辑时保留原值
this.form.end_time = item.end_date; if (this.type === 'add') {
this.form.date = item.start_date; this.form.start_time = item.start_date;
this.form.end_time = item.end_date;
this.form.date = item.start_date;
}
} }
}); });
this.updateDaysFromDates(); this.updateDaysFromDates();

Loading…
Cancel
Save