浏览代码

处理评测修改试卷,切换后试卷信息复原

XW 11 月之前
父节点
当前提交
2e2c173797

+ 6 - 0
TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaper.vue

@@ -179,6 +179,11 @@ export default {
         type: Number,
         default: 0
     },
+    refreshExam: {
+        type: Function,
+        require: true,
+        default: null
+    },
   },
   data() {
     return {
@@ -581,6 +586,7 @@ export default {
                     // 进行试卷文件上传Blob 先上传所有题目 再上传index.json文件
                     Promise.all(promiseArr).then(async result => {
                         try {
+                            this.refreshExam(this.paperInfo, this.subjectIndex)
                             if (blobFile.blob) {
                                 // 试卷保存更新后需要重新生成答题卡
                                 /* paperItem.blob = blobFile.blob.split('/index.json')[0]

+ 6 - 2
TEAMModelOS/ClientApp/src/view/learnactivity/ExamMgt.vue

@@ -141,7 +141,7 @@
 				<!-- 作答详情 -->
 				<AnswerTable v-else-if="curBarIndex == 3" :examInfo="examDetaiInfo" :correctData="correctData" class="evaluation-base-info"></AnswerTable>
 				<!-- 评测试卷 -->
-				<ExamPaper v-else-if="curBarIndex == 1" :examInfo="examDetaiInfo" :activityIndex="curEvaIndex" class="evaluation-base-info"></ExamPaper>
+				<ExamPaper v-else-if="curBarIndex == 1" :examInfo="examDetaiInfo" :activityIndex="curEvaIndex" :refreshExam="refreshExam" class="evaluation-base-info"></ExamPaper>
 				<!-- 学情分析 -->
 				<CloudDAS v-else-if="curBarIndex == 4" :evInfo="examDetaiInfo"></CloudDAS>
 				<!-- 阅卷任务 -->
@@ -968,7 +968,11 @@
 				} else {
 					this.$Message.warning(this.$t("learnActivity.mgtScEv.endTimeHolder"));
 				}
-			}
+			},
+			refreshExam(info, subIndex) {
+				this.evaListShow[this.curEvaIndex].papers[subIndex] = info
+				this.examDetaiInfo = JSON.parse(JSON.stringify(this.evaListShow[this.curEvaIndex]))
+			},
 		},
 		watch: {
 			curBarIndex(n, o) {

+ 6 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/tabs/ExamPaper.vue

@@ -10,7 +10,7 @@
                 </RadioGroup>
             </div>
             <div class="paper-wrap" v-if="!examInfo.examPaperErr">
-                <TestPaper v-if="examInfo && examInfo.papers && examInfo.papers[curSubIndex] && examInfo.papers[curSubIndex].item" :paper="examInfo.papers[curSubIndex]" style="color:#515a6e;" :isShowTools="false" isExamPaper isExamInfoPaper :examId="examInfo.id" :activityIndex="activityIndex" :subjectIndex="curSubIndex" canFix></TestPaper>
+                <TestPaper v-if="examInfo && examInfo.papers && examInfo.papers[curSubIndex] && examInfo.papers[curSubIndex].item" :paper="examInfo.papers[curSubIndex]" style="color:#515a6e;" :isShowTools="false" isExamPaper isExamInfoPaper :examId="examInfo.id" :activityIndex="activityIndex" :subjectIndex="curSubIndex" :refreshExam="refreshExam" canFix></TestPaper>
                 <EmptyData v-else style="padding-top:60px;" :textContent="$t('learnActivity.simple.paperErr')"></EmptyData>
             </div>
             <div v-else class="paper-err-wrap">
@@ -37,6 +37,11 @@ export default {
             type: Number,
             default: 0
         },
+        refreshExam: {
+            type: Function,
+            require: true,
+            default: null
+        },
     },
     data() {
         return {