|
|
@@ -2,7 +2,7 @@
|
|
|
<div class="container">
|
|
|
<div class="header-container">
|
|
|
<!-- 返回按钮 -->
|
|
|
- <el-button style="color:#597D3B" class="back-button" type="text" @click="goBack">
|
|
|
+ <el-button style="color:#4A90C4" class="back-button" type="text" @click="goBack">
|
|
|
<el-icon><Back /></el-icon>
|
|
|
</el-button>
|
|
|
<!-- 标题 -->
|
|
|
@@ -255,7 +255,7 @@
|
|
|
<div class="button-container">
|
|
|
<div class="left-buttons">
|
|
|
<el-button
|
|
|
- style="background-color:#597D3B;color:white;width:200px"
|
|
|
+ style="background-color:#4A90C4;color:white;width:200px"
|
|
|
@click="submitComment"
|
|
|
class="submit-button"
|
|
|
:loading="submitting"
|
|
|
@@ -264,7 +264,7 @@
|
|
|
</el-button>
|
|
|
|
|
|
<el-button
|
|
|
- style="background-color:#597D3B;color:white;width:200px;margin-top:50px"
|
|
|
+ style="background-color:#4A90C4;color:white;width:200px;margin-top:50px"
|
|
|
@click="handleNext"
|
|
|
:disabled="isAllCorrected"
|
|
|
>
|
|
|
@@ -272,14 +272,14 @@
|
|
|
</el-button>
|
|
|
<!-- 新增:评语模板 -->
|
|
|
<el-button
|
|
|
- style="background-color:#597D3B;color:white;width:200px;margin-top:50px;"
|
|
|
+ style="background-color:#4A90C4;color:white;width:200px;margin-top:50px;"
|
|
|
@click="showTemplateDialog"
|
|
|
>
|
|
|
评语模板
|
|
|
</el-button>
|
|
|
|
|
|
<el-button
|
|
|
- style="background-color:#597D3B;color:white;width:200px;margin-top:50px;"
|
|
|
+ style="background-color:#4A90C4;color:white;width:200px;margin-top:50px;"
|
|
|
@click="goBack"
|
|
|
>
|
|
|
返回
|
|
|
@@ -937,10 +937,19 @@ onBeforeUnmount(() => {
|
|
|
});
|
|
|
|
|
|
const goBack = () => {
|
|
|
- router.push({
|
|
|
- name: 'myCorrectWithAssignmentId',
|
|
|
- params: { assignmentId: props.assignmentId }
|
|
|
- });
|
|
|
+ // 根据用户角色决定返回页面
|
|
|
+ if (ROLE === 'STUDENT') {
|
|
|
+ // 学生返回 myHomework 页面
|
|
|
+ router.push({
|
|
|
+ name: 'myHomework'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // 老师保持原有逻辑,返回批改页面
|
|
|
+ router.push({
|
|
|
+ name: 'myCorrectWithAssignmentId',
|
|
|
+ params: { assignmentId: props.assignmentId }
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const ROLE = store.user.role;
|