|
|
@@ -131,11 +131,11 @@ import * as path from "node:path";
|
|
|
const getEvaluation = () => {
|
|
|
apis.getOverall(props.engagement.assignmentId, store.user.id,props.engagement.version)
|
|
|
.then(res => {
|
|
|
- // console.log(res)
|
|
|
data.overallEvaluation = res.data.data
|
|
|
loading.value = false;
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ ElMessage.error("获取智能批改结果异常")
|
|
|
console.log(err)
|
|
|
loading.value = false;
|
|
|
})
|
|
|
@@ -146,14 +146,15 @@ import * as path from "node:path";
|
|
|
.then(res => {
|
|
|
if(res.data.code === 200){
|
|
|
getEvaluation()
|
|
|
- }else if(res.data.code === 400){
|
|
|
- ElMessage.error(res.data.msg)
|
|
|
- loading.value = false;
|
|
|
// 允许查看详细报告
|
|
|
showCorrectToPageBtn.value = true;
|
|
|
+ }else{
|
|
|
+ ElMessage.error("智能批改请求超时")
|
|
|
+ loading.value = false;
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ ElMessage.error("智能批改请求异常")
|
|
|
console.log(err)
|
|
|
loading.value = false;
|
|
|
})
|
|
|
@@ -161,9 +162,13 @@ import * as path from "node:path";
|
|
|
.then(res => {
|
|
|
if(res.data.code === 400){
|
|
|
ElMessage.error(res.data.msg)
|
|
|
+ }else{
|
|
|
+ ElMessage.error("智能批改请求超时")
|
|
|
+ loading.value = false;
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ ElMessage.error("智能批改请求异常")
|
|
|
console.log(err)
|
|
|
})
|
|
|
}
|
|
|
@@ -171,6 +176,7 @@ import * as path from "node:path";
|
|
|
// 请求批改
|
|
|
const handleCorrect = () => {
|
|
|
loading.value = true;
|
|
|
+ showCorrectBtn.value = !showCorrectBtn.value
|
|
|
toEvaluation()
|
|
|
};
|
|
|
|
|
|
@@ -214,17 +220,16 @@ import * as path from "node:path";
|
|
|
apis.getEvaluationVersionList(props.engagement.assignmentId, store.user.id)
|
|
|
.then(res => {
|
|
|
// 从未批改过
|
|
|
- // console.log(res.data.data.length === 0)
|
|
|
if(res.data.data.length === 0){
|
|
|
showCorrectBtn.value = true
|
|
|
showCorrectToPageBtn.value = false
|
|
|
} else {
|
|
|
showCorrectToPageBtn.value = true
|
|
|
showCorrectBtn.value = (res.data.data[0].version !== props.engagement.version)
|
|
|
- // console.log(res.data.data)
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ ElMessage.error("获取评价历史记录异常")
|
|
|
console.log(err)
|
|
|
})
|
|
|
}
|
|
|
@@ -233,12 +238,12 @@ import * as path from "node:path";
|
|
|
|
|
|
const handleCorrectTip = () => {
|
|
|
if(!showCorrectBtn.value)
|
|
|
- ElMessage.error("请更新作文内容并暂存后批改~")
|
|
|
+ ElMessage.error("请更新作文内容并暂存后批改")
|
|
|
}
|
|
|
|
|
|
const handleCorrectToPageTip = () => {
|
|
|
if(!showCorrectToPageBtn.value)
|
|
|
- ElMessage.error("批改后才能查看报告~")
|
|
|
+ ElMessage.error("批改后查看报告")
|
|
|
}
|
|
|
|
|
|
// 监听props变化
|