Explorar o código

为开发教师页面返回按钮功能前的备份

Jiang Pengyu hai 1 ano
pai
achega
cc5d550f9a

+ 2 - 0
src/layout/Header/index.scss

@@ -34,6 +34,8 @@
       vertical-align: middle;
       color: #000000;
       height: 40px;
+      font-size: 18px;
+      margin-right: 20px;
 
       &:hover {
         background-color: #fff;

+ 30 - 15
src/views/CorrectPage/CoursePage.vue

@@ -155,20 +155,20 @@
           <!-- 学生作业表格 -->
           <div class="table-section">
             <el-table :data="filteredStudentList" class="student-table" stripe>
-              <el-table-column prop="status" label="状态" width="290" align="left">
+              <el-table-column prop="status" label="状态" width="230" align="left">
                 <template #default="scope">
                   <span :class="getStatusClass(scope.row.status)" class="status-badge">
                     {{ statusMap[scope.row.status] || scope.row.status }}
                   </span>
                 </template>
               </el-table-column>
-              <el-table-column prop="stuName" label="学生姓名" width="290"></el-table-column>
-              <el-table-column label="班级" width="290">
+              <el-table-column prop="stuName" label="学生姓名" width="230"></el-table-column>
+              <el-table-column label="班级" width="230">
                 <template #default="scope">
                   {{ getStudentClassName(scope.row) }}
                 </template>
               </el-table-column>
-              <el-table-column prop="score" label="得分" width="290">
+              <el-table-column prop="score" label="得分" width="230">
                 <template #header>
                   <div class="score-header" @click="toggleSort">
                     <span>得分</span>
@@ -183,17 +183,19 @@
                   </span>
                 </template>
               </el-table-column>
-              <el-table-column label="操作" width="200">
+              <el-table-column label="备注" width="230"></el-table-column>
+              <el-table-column label="操作" width="230">
                 <template #default="scope">
-                                      <el-button 
-                      type="primary" 
-                      size="small" 
-                      class="action-button"
-                      @click="handleCorrect(scope.row)"
-                    >
-                      <el-icon class="correct-icon"><ZoomIn /></el-icon>
-                      批改
-                    </el-button>
+                  <el-button 
+                    type="primary" 
+                    size="small" 
+                    class="action-button"
+                    :disabled="scope.row.status === 'NOT_SUBMITTED'"
+                    @click="handleCorrect(scope.row)"
+                  >
+                    <el-icon class="correct-icon"><ZoomIn /></el-icon>
+                    批改
+                  </el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -685,7 +687,7 @@
         // 获取班级名称
         const classItem = classList.find(c => c.classId.toString() === classId)
         const className = classItem ? classItem.className : '未知班级'
-        
+        // console.log(response.data.data)
         // 为每个学生建立班级映射关系
         response.data.data.forEach((student: StudentAssignmentStatusDTO) => {
           studentClassMap.set(student.studentId, className)
@@ -739,6 +741,7 @@
   
   // 更新统计数据
   const updateStatsData = () => {
+    console.log(studentList)
     const total = studentList.length
     const corrected = studentList.filter(student => student.status === 'CORRECTED').length
     const submittedNotCorrected = studentList.filter(student => student.status === 'SUBMITTED').length
@@ -1311,6 +1314,18 @@ export default {
     font-size: 13px;
     font-family: "Noto Sans SC", sans-serif;
   }
+  
+  /* 禁用状态的按钮样式 */
+  .action-button:disabled {
+    background-color: #f5f5f5;
+    border-color: #d9d9d9;
+    color: #bfbfbf;
+    cursor: not-allowed;
+  }
+  
+  .action-button:disabled .correct-icon {
+    color: #bfbfbf;
+  }
 
   /* 批改按钮图标样式 */
   .correct-icon {

+ 2 - 2
src/views/CorrectPage/index.scss

@@ -893,7 +893,7 @@
   // 作业描述面板样式
   .content-panel {
     width: 900px;
-    height: 304px;
+    height: 240px;
     background: #FFF;
     border-radius: 15px;
     border: 1px solid #e9ecef;
@@ -932,7 +932,7 @@
   // 学生信息和回答区域样式
   .student-info-section {
     width: 900px;
-    height: 490px;
+    height: 550px;
     background: #FFF;
     border-radius: 15px;
     border: 1px solid #e9ecef;