作业管理:作业名称为空保存判断 #111
|
@ -703,6 +703,7 @@ const handleClassWorkSave = async () => {
|
||||||
entpcourseworklist: '', // 选择的 习题训练 list 需要转字符串
|
entpcourseworklist: '', // 选择的 习题训练 list 需要转字符串
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(cform.uniquekey.trim() == '') return ElMessage({ type: 'warning', message: '作业名称不能为空!'});
|
||||||
|
|
||||||
// 当前为[编辑]状态下点进来得处理 newWorkSpaceEdit true 为编辑状态
|
// 当前为[编辑]状态下点进来得处理 newWorkSpaceEdit true 为编辑状态
|
||||||
if(classWorkForm.id != '' ) {// 编辑状态 有id
|
if(classWorkForm.id != '' ) {// 编辑状态 有id
|
||||||
|
@ -741,6 +742,7 @@ const handleClassWorkSave = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(classWorkForm.worktype === "常规作业"){
|
else if(classWorkForm.worktype === "常规作业"){
|
||||||
|
if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'});
|
||||||
fileLoading.value = true
|
fileLoading.value = true
|
||||||
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
||||||
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
|
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
|
||||||
|
@ -832,7 +834,12 @@ const editWork = async (cform) =>{
|
||||||
}
|
}
|
||||||
}else if (classWorkForm.worktype == '课堂展示' || classWorkForm.worktype == '常规作业') {
|
}else if (classWorkForm.worktype == '课堂展示' || classWorkForm.worktype == '常规作业') {
|
||||||
// 不做校验
|
// 不做校验
|
||||||
|
// 不做校验
|
||||||
|
if(classWorkForm.worktype == '课堂展示'){
|
||||||
|
//
|
||||||
|
}else{
|
||||||
|
if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'});
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
if (classWorkForm.chooseWorkLists.length == 0) {
|
if (classWorkForm.chooseWorkLists.length == 0) {
|
||||||
// 框架梳理
|
// 框架梳理
|
||||||
|
|
|
@ -489,6 +489,7 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
entpcourseworklist: '', // 选择的 习题训练 list 需要转字符串
|
entpcourseworklist: '', // 选择的 习题训练 list 需要转字符串
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(cform.uniquekey.trim() == '') return ElMessage({ type: 'warning', message: '作业名称不能为空!'});
|
||||||
|
|
||||||
// 当前为[编辑]状态下点进来得处理 newWorkSpaceEdit true 为编辑状态
|
// 当前为[编辑]状态下点进来得处理 newWorkSpaceEdit true 为编辑状态
|
||||||
if(isShow.value === false){
|
if(isShow.value === false){
|
||||||
|
@ -530,6 +531,7 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(classWorkForm.worktype === "常规作业"){
|
else if(classWorkForm.worktype === "常规作业"){
|
||||||
|
if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'});
|
||||||
fileLoading.value = true
|
fileLoading.value = true
|
||||||
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
||||||
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
|
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
|
||||||
|
@ -634,7 +636,11 @@ const editWork = async (cform) =>{
|
||||||
}
|
}
|
||||||
}else if (classWorkForm.worktype == '课堂展示' || classWorkForm.worktype == '常规作业') {
|
}else if (classWorkForm.worktype == '课堂展示' || classWorkForm.worktype == '常规作业') {
|
||||||
// 不做校验
|
// 不做校验
|
||||||
|
if(classWorkForm.worktype == '课堂展示'){
|
||||||
|
//
|
||||||
|
}else{
|
||||||
|
if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'});
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
if (classWorkForm.chooseWorkLists.length == 0) {
|
if (classWorkForm.chooseWorkLists.length == 0) {
|
||||||
// 框架梳理
|
// 框架梳理
|
||||||
|
|
Loading…
Reference in New Issue