hookehuyr

fix(教师表单): 修复章节选择验证后未清空选中章节的问题

在验证章节时间有效性失败时,清空已选章节以避免用户困惑
......@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2025-01-20 10:00:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-06-25 15:49:50
* @LastEditTime: 2025-06-25 16:27:12
* @FilePath: /mlaj/src/views/teacher/formPage.vue
* @Description: 教师作业新增表单页面
-->
......@@ -675,6 +675,7 @@ const confirmChapterSelection = () => {
const invalidChapters = selectedChapters.value.filter(chapter => !chapter.startTime || !chapter.endTime);
if (invalidChapters.length > 0) {
showToast('请为所有选中的章节设置开始和结束时间');
selectedChapters.value = '';
return;
}
......@@ -684,6 +685,7 @@ const confirmChapterSelection = () => {
);
if (timeInvalidChapters.length > 0) {
showToast('存在结束时间早于开始时间的章节,请重新设置');
selectedChapters.value = '';
return;
}
......