|
|
@@ -129,8 +129,8 @@
|
|
|
}
|
|
|
console.log(props)
|
|
|
try {
|
|
|
- await handleStage();
|
|
|
- } catch (e) {
|
|
|
+ await handleStage(true);
|
|
|
+ } catch (e) {
|
|
|
ElMessage.error('暂存失败,无法提交!');
|
|
|
return;
|
|
|
}
|
|
|
@@ -141,22 +141,22 @@
|
|
|
supplementarySubmission = true
|
|
|
}
|
|
|
apis.engagementSubmit(store.user.id, props.engagement.assignmentId, supplementarySubmission)
|
|
|
- .then((_res: any) => {
|
|
|
- success(_res.data.data);
|
|
|
- emitter.emit('exam-mode-change', false);
|
|
|
- emitter.emit('exam-submitted');
|
|
|
- router.push("/home/myHomework").then(() => {
|
|
|
- window.location.reload()
|
|
|
+ .then((_res: any) => {
|
|
|
+ success(_res.data.data);
|
|
|
+ emitter.emit('exam-mode-change', false);
|
|
|
+ emitter.emit('exam-submitted');
|
|
|
+ router.push("/home/myHomework").then(() => {
|
|
|
+ window.location.reload()
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
- .catch((error: any) => {
|
|
|
- console.error('提交失败', error);
|
|
|
- error('提交失败');
|
|
|
- });
|
|
|
- };
|
|
|
+ .catch((error: any) => {
|
|
|
+ console.error('提交失败', error);
|
|
|
+ error('提交失败');
|
|
|
+ });
|
|
|
+ };
|
|
|
|
|
|
// 暂存操作
|
|
|
- const handleStage = async () => {
|
|
|
+ const handleStage = async (isSubmit = false) => {
|
|
|
if (aiEvalBusy.value || store.aiEvalBusy) {
|
|
|
ElMessage.warning('智能批改进行中,请稍候再暂存')
|
|
|
return
|
|
|
@@ -164,7 +164,7 @@
|
|
|
try {
|
|
|
console.log(props)
|
|
|
const _res = await apis.engagementStage(store.user.id, props.engagement.assignmentId, JSON.stringify(getQuillContent), getText.value, getHTML.value);
|
|
|
- emitter.emit('click-stage');
|
|
|
+ emitter.emit('click-stage', { isSubmit });
|
|
|
emitter.emit('is-modified', false);
|
|
|
// 通知 Silder 组件暂存成功,可以启用批改按钮
|
|
|
emitter.emit('stage-success');
|