Explorar el Código

进度轨迹回放

zhangjie hace 2 años
padre
commit
cbef47eb10

+ 2 - 11
src/features/examwork/StudentManagement/StudentManagementDialog.vue

@@ -68,10 +68,6 @@ export default {
   name: "StudentManagementDialog",
   props: {
     student: Object,
-    fromPage: {
-      type: String,
-      default: "student",
-    },
   },
   watch: {
     student() {
@@ -133,8 +129,8 @@ export default {
         pageSize: this.pageSize,
       };
       //
-      if (this.student.examId) {
-        datas.examId = this.student.examId;
+      if (this.student.examRecordId) {
+        datas.examRecordId = this.student.examRecordId;
       }
       const res = await searchStudentExamRecord(datas);
       this.tableData = res.data.data.records;
@@ -145,11 +141,6 @@ export default {
     },
     // monitor record
     openMonitorRecord(row) {
-      if (this.fromPage !== "student") {
-        this.$emit("to-track", row);
-        return;
-      }
-
       window.sessionStorage.setItem(
         "studentTrackMonitorRecord",
         row.monitorRecord

+ 6 - 17
src/features/invigilation/ProgressDetail/ProgressDetail.vue

@@ -124,12 +124,13 @@
       <el-table-column :context="_self" label="操作" width="120" fixed="right">
         <div slot-scope="scope">
           <el-button
+            v-if="scope.row.videoCount"
             size="mini"
             type="primary"
             plain
-            @click="openExamRecord(scope.row)"
+            @click="openMonitorRecord(scope.row)"
           >
-            考试记录
+            监考回放
           </el-button>
         </div>
       </el-table-column>
@@ -147,12 +148,6 @@
       </el-pagination>
     </div>
 
-    <StudentManagementDialog
-      ref="theDialog"
-      :student="selectedStudent"
-      from-page="invigilation"
-      @to-track="toTrack"
-    />
     <StudentTrackRecordDialog
       ref="StudentTrackRecordDialog"
       :data="selectedStudentTrack"
@@ -171,14 +166,12 @@ import SummaryLine from "../common/SummaryLine";
 import { downloadBlob } from "@/utils/utils";
 import { mapState, mapActions, mapMutations } from "vuex";
 import { BOOLEAN_TYPE } from "@/constant/constants";
-import StudentManagementDialog from "../../examwork/StudentManagement/StudentManagementDialog";
 import StudentTrackRecordDialog from "../../examwork/StudentManagement/StudentTrackRecordDialog";
 
 export default {
   name: "progress-detail",
   components: {
     SummaryLine,
-    StudentManagementDialog,
     StudentTrackRecordDialog,
   },
   data() {
@@ -277,13 +270,9 @@ export default {
         this.$message.error("导出失败,请重新尝试!");
       }
     },
-    openExamRecord(user) {
-      this.selectedStudent = { ...user, id: user.studentId };
-      this.$refs.theDialog.openDialog();
-    },
-    toTrack(trackInfo) {
-      this.selectedStudentTrack = trackInfo;
-      console.log(trackInfo);
+    openMonitorRecord(row) {
+      this.selectedStudentTrack = row;
+      console.log(row);
       this.$refs.StudentTrackRecordDialog.openDialog();
     },
   },