From c8dd19382e99a35c8299a3d60208e2280c2fa87c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Wed, 11 Dec 2024 14:51:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=AE=A1=E7=90=86=EF=BC=9A?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=90=8D=E7=A7=B0=E4=B8=BA=E7=A9=BA=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/classTask/container/newTask/taskTypeView.vue | 9 ++++++++- .../src/views/classTask/newClassTaskAssign/index.vue | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 218f71c..0c32397 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -703,6 +703,7 @@ const handleClassWorkSave = async () => { entpcourseworklist: '', // 选择的 习题训练 list 需要转字符串 }; + if(cform.uniquekey.trim() == '') return ElMessage({ type: 'warning', message: '作业名称不能为空!'}); // 当前为[编辑]状态下点进来得处理 newWorkSpaceEdit true 为编辑状态 if(classWorkForm.id != '' ) {// 编辑状态 有id @@ -741,6 +742,7 @@ const handleClassWorkSave = async () => { } } else if(classWorkForm.worktype === "常规作业"){ + if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'}); fileLoading.value = true cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList); cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]); @@ -832,7 +834,12 @@ const editWork = async (cform) =>{ } }else if (classWorkForm.worktype == '课堂展示' || classWorkForm.worktype == '常规作业') { // 不做校验 - + // 不做校验 + if(classWorkForm.worktype == '课堂展示'){ + // + }else{ + if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'}); + } }else { if (classWorkForm.chooseWorkLists.length == 0) { // 框架梳理 diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue index 8d18094..e8e9f7d 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue @@ -489,6 +489,7 @@ const handleClassWorkFormQuizRemove = (index) =>{ entpcourseworklist: '', // 选择的 习题训练 list 需要转字符串 }; + if(cform.uniquekey.trim() == '') return ElMessage({ type: 'warning', message: '作业名称不能为空!'}); // 当前为[编辑]状态下点进来得处理 newWorkSpaceEdit true 为编辑状态 if(isShow.value === false){ @@ -530,6 +531,7 @@ const handleClassWorkFormQuizRemove = (index) =>{ } } else if(classWorkForm.worktype === "常规作业"){ + if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'}); fileLoading.value = true cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList); cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]); @@ -634,7 +636,11 @@ const editWork = async (cform) =>{ } }else if (classWorkForm.worktype == '课堂展示' || classWorkForm.worktype == '常规作业') { // 不做校验 - + if(classWorkForm.worktype == '课堂展示'){ + // + }else{ + if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'}); + } }else { if (classWorkForm.chooseWorkLists.length == 0) { // 框架梳理 -- 2.44.0.windows.1