Ver código fonte

修改文档评论和评分展示问题

zengyicheng 2 anos atrás
pai
commit
3bd62b69d8
1 arquivos alterados com 21 adições e 5 exclusões
  1. 21 5
      src/components/studyStudent.vue

+ 21 - 5
src/components/studyStudent.vue

@@ -5655,6 +5655,12 @@
           <img src="../assets/icon/codeFile.png" />
           <div>点击下载文件</div>
         </div>
+        <div
+          class="worksAnswer"
+          v-if="commentDetail.works && commentDetail.type == 13"
+        >
+          <div v-html="JSON.parse(commentDetail.works).text"></div>
+        </div>
         <div
           class="worksAnswer"
           v-if="commentDetail.works && commentDetail.type == 4"
@@ -6116,6 +6122,12 @@
           <img src="../assets/icon/codeFile.png" />
           <div>点击下载文件</div>
         </div>
+        <div
+          class="worksAnswer"
+          v-if="commentDetail.works && commentDetail.type == 13"
+        >
+          <div v-html="JSON.parse(commentDetail.works).text"></div>
+        </div>
         <div class="scoreBox">
           <span class="t">请输入分数</span>
           <el-input-number
@@ -7626,7 +7638,7 @@ export default {
         task: this.taskCount,
         tool: this.toolindex,
         content: JSON.stringify(this.wordJson).replaceAll(/%/g, "%25"),
-        type: 12,
+        type: 13,
         atool: 52,
       };
       console.log(params);
@@ -8185,14 +8197,14 @@ export default {
                     userid: b[j].userid,
                     wid: b[j].id,
                   });
-                } else if (b[j].type == 12 && a[i].atool[0] == 52) {
+                } else if (b[j].type == 13 && a[i].atool[0] == 52) {
                   //选择题
                   this.workStudent[i].push({
                     works: b[j].content,
                     sName: b[j].name,
                     score: b[j].score,
                     img: b[j].img,
-                    type: 12,
+                    type: 13,
                     time: b[j].time,
                     userid: b[j].userid,
                     wid: b[j].id,
@@ -8312,6 +8324,10 @@ export default {
           ].toolChoose[toolIndex].rateJson;
       } else if (w.works && w.type == 10) {
         this.commentDetail.works = JSON.parse(this.commentDetail.works);
+      } else if (w.works && w.type == 13) {
+        this.wordJson = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+            this.taskCount
+          ].toolChoose[toolIndex].wordJson;
       }
     },
     openScore(w) {
@@ -8942,7 +8958,7 @@ export default {
                     isLikes: isLikes,
                     commentJson: commentJson,
                   });
-                } else if (b[j].type == 12 && a[i].tool[0] == 52) {
+                } else if (b[j].type == 13 && a[i].tool[0] == 52) {
                   //选择题
                   this.worksStudent[i].push({
                     userid: b[j].userid,
@@ -8950,7 +8966,7 @@ export default {
                     wid: b[j].id,
                     works: b[j].content,
                     sName: b[j].name,
-                    type: 12,
+                    type: 13,
                     time: b[j].time,
                     score: b[j].score,
                     img: b[j].img,