zhangjie пре 2 година
родитељ
комит
b00a130532

+ 6 - 9
src/modules/paper/components/AuditPaperAudited.vue

@@ -104,15 +104,12 @@ export default {
       this.toPage(1);
     },
     toDetail(row) {
-      window.open(
-        this.getRouterPath({
-          name: "EditPaper",
-          params: {
-            id: row.id,
-            parentView: "audit-paper",
-          },
-        })
-      );
+      this.$router.push({
+        name: "ViewPaper",
+        params: {
+          id: row.id,
+        },
+      });
     },
   },
 };

+ 6 - 9
src/modules/paper/components/AuditPaperWait.vue

@@ -140,15 +140,12 @@ export default {
       this.toPage(1);
     },
     toDetail(row) {
-      window.open(
-        this.getRouterPath({
-          name: "EditPaper",
-          params: {
-            id: row.id,
-            parentView: "audit-paper",
-          },
-        })
-      );
+      this.$router.push({
+        name: "ViewPaper",
+        params: {
+          id: row.id,
+        },
+      });
     },
     toAudit(auditResult, paperId) {
       this.curAuditInfo = { auditResult, paperIds: [paperId] };

+ 11 - 4
src/modules/question/components/QuestionEditDialog.vue

@@ -31,7 +31,7 @@
       <el-form label-width="100px">
         <el-form-item v-if="isEdit" label="题型">
           <el-button type="primary" size="small">
-            {{ question.sourceDetailName }}
+            {{ questionModel.sourceDetailName }}
           </el-button>
         </el-form-item>
         <el-form-item v-else label="题型">
@@ -160,8 +160,13 @@ export default {
   },
   methods: {
     async visibleChange() {
-      if (this.question.id) {
-        const res = await questionDetailApi(this.question.id);
+      // paper模式时试题结构{question,[试卷相关信息]}
+      const questionId =
+        this.editMode === "paper"
+          ? this.question.question.id
+          : this.question.id;
+      if (questionId) {
+        const res = await questionDetailApi(questionId);
 
         const courseInfo = {
           courseId: res.data.course.id,
@@ -171,9 +176,11 @@ export default {
         let questionModel = {
           ...res.data,
           ...courseInfo,
-          score: this.question.score,
           editMode: this.editMode,
         };
+        if (this.editMode === "paper") {
+          questionModel.score = this.question.score;
+        }
         if (questionModel.subQuestions && questionModel.subQuestions.length) {
           questionModel.subQuestions = questionModel.subQuestions.map(
             (q, qindex) => {