Browse Source

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

lsc 1 year ago
parent
commit
4a06ed18c3

+ 257 - 78
src/components/pages/components/classStudentComponents/worksDetail3.vue

@@ -126,6 +126,12 @@
                     }"
                     v-if="worksDetail[sIndex].img.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="bigImg"
                       v-if="
@@ -178,16 +184,27 @@
                     }"
                     v-if="worksDetail[sIndex].answerInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div class="answerbox">
                       <div style="min-width: 80px">问答标题</div>
                       <div>
-                        {{ worksDetail[sIndex].answerInfo[0].answerTitle }}
+                        {{
+                          worksDetail[sIndex].answerInfo[0].answerInfo
+                            .answerTitle
+                        }}
                       </div>
                     </div>
                     <div class="answerbox1">
                       <div>学生回答</div>
                       <div>
-                        {{ worksDetail[sIndex].answerInfo[0].answer }}
+                        {{
+                          worksDetail[sIndex].answerInfo[0].answerInfo.answer
+                        }}
                       </div>
                     </div>
                   </div>
@@ -199,6 +216,12 @@
                     v-if="worksDetail[sIndex].askInfo.length > 0"
                   >
                     <div>
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -223,7 +246,10 @@
                       >
                         <div style="margin-right: 20px">标题:</div>
                         <div style="font-size: 20px">
-                          {{ worksDetail[sIndex].askInfo[0].askJson.askTitle }}
+                          {{
+                            worksDetail[sIndex].askInfo[0].askInfo.askJson
+                              .askTitle
+                          }}
                         </div>
                       </div>
                       <div class="a_addBox">
@@ -231,7 +257,7 @@
                         <div
                           class="a_add_box"
                           v-for="(item1, index1) in worksDetail[sIndex]
-                            .askInfo[0].askJson.askCount"
+                            .askInfo[0].askInfo.askJson.askCount"
                           :key="index1"
                         >
                           <div class="a_add_head">
@@ -239,7 +265,7 @@
                               {{ index1 + 1 + "、" }}
                               <div>
                                 题目:{{
-                                  worksDetail[sIndex].askInfo[0].askJson
+                                  worksDetail[sIndex].askInfo[0].askInfo.askJson
                                     .askJson[index1].askstitle
                                 }}
                               </div>
@@ -249,19 +275,21 @@
                             <div class="a_add_input">
                               <el-radio-group
                                 v-if="
-                                  worksDetail[sIndex].askInfo[0].askJson
+                                  worksDetail[sIndex].askInfo[0].askInfo.askJson
                                     .askJson[index1].type == '1' ||
-                                  !worksDetail[sIndex].askInfo[0].askJson
-                                    .askJson[index1].type
+                                  !worksDetail[sIndex].askInfo[0].askInfo
+                                    .askJson.askJson[index1].type
                                 "
                                 v-model="
-                                  worksDetail[sIndex].askInfo[0].anwer[index1]
+                                  worksDetail[sIndex].askInfo[0].askInfo.anwer[
+                                    index1
+                                  ]
                                 "
                               >
                                 <el-radio
                                   v-for="(item2, checkIndex) in worksDetail[
                                     sIndex
-                                  ].askInfo[0].askJson.askJson[index1]
+                                  ].askInfo[0].askInfo.askJson.askJson[index1]
                                     .checkList"
                                   :key="checkIndex"
                                   :label="checkIndex"
@@ -272,17 +300,19 @@
                               </el-radio-group>
                               <el-checkbox-group
                                 v-model="
-                                  worksDetail[sIndex].askInfo[0].anwer[index1]
+                                  worksDetail[sIndex].askInfo[0].askInfo.anwer[
+                                    index1
+                                  ]
                                 "
                                 v-if="
-                                  worksDetail[sIndex].askInfo[0].askJson
+                                  worksDetail[sIndex].askInfo[0].askInfo.askJson
                                     .askJson[index1].type == '2'
                                 "
                               >
                                 <el-checkbox
                                   v-for="(item2, checkIndex1) in worksDetail[
                                     sIndex
-                                  ].askInfo[0].askJson.askJson[index1]
+                                  ].askInfo[0].askInfo.askJson.askJson[index1]
                                     .checkList"
                                   :key="checkIndex1"
                                   :label="checkIndex1"
@@ -305,6 +335,12 @@
                     v-if="worksDetail[sIndex].chooseInfo.length > 0"
                   >
                     <div>
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -324,7 +360,7 @@
                         <div
                           class="a_add_box"
                           v-for="(item1, index1) in worksDetail[sIndex]
-                            .chooseInfo[0].testCount"
+                            .chooseInfo[0].chooseInfo.testCount"
                           :key="index1"
                         >
                           <div class="a_add_head">
@@ -332,22 +368,19 @@
                               {{ index1 + 1 + "、" }}
                               <div>
                                 题目:{{
-                                  worksDetail[sIndex].chooseInfo[0].testJson[
-                                    index1
-                                  ].teststitle
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .testJson[index1].teststitle
                                 }}
                               </div>
                             </div>
                             <img
                               v-if="
-                                worksDetail[sIndex].chooseInfo[0].testJson[
-                                  index1
-                                ].img
+                                worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                  .testJson[index1].img
                               "
                               :src="
-                                worksDetail[sIndex].chooseInfo[0].testJson[
-                                  index1
-                                ].img
+                                worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                  .testJson[index1].img
                               "
                               style="
                                 height: 300px;
@@ -360,21 +393,20 @@
                             <div class="a_add_input">
                               <el-radio-group
                                 v-model="
-                                  worksDetail[sIndex].chooseInfo[0].radio[
-                                    index1
-                                  ]
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .radio[index1]
                                 "
                                 v-if="
-                                  worksDetail[sIndex].chooseInfo[0].testJson[
-                                    index1
-                                  ].type == '1'
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .testJson[index1].type == '1'
                                 "
                               >
                                 <div class="radioBox">
                                   <el-radio
                                     v-for="(item2, checkIndex) in worksDetail[
                                       sIndex
-                                    ].chooseInfo[0].testJson[index1].checkList"
+                                    ].chooseInfo[0].chooseInfo.testJson[index1]
+                                      .checkList"
                                     :key="checkIndex"
                                     :label="checkIndex"
                                     disabled
@@ -401,21 +433,20 @@
                               </el-radio-group>
                               <el-checkbox-group
                                 v-model="
-                                  worksDetail[sIndex].chooseInfo[0].radio[
-                                    index1
-                                  ]
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .radio[index1]
                                 "
                                 v-if="
-                                  worksDetail[sIndex].chooseInfo[0].testJson[
-                                    index1
-                                  ].type == '2'
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .testJson[index1].type == '2'
                                 "
                               >
                                 <div class="radioBox">
                                   <el-checkbox
                                     v-for="(item2, checkIndex) in worksDetail[
                                       sIndex
-                                    ].chooseInfo[0].testJson[index1].checkList"
+                                    ].chooseInfo[0].chooseInfo.testJson[index1]
+                                      .checkList"
                                     :key="checkIndex"
                                     :label="checkIndex"
                                     disabled
@@ -453,12 +484,22 @@
                     }"
                     v-if="worksDetail[sIndex].wpptInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       style="height: 238px"
-                      @click="openFile(worksDetail[sIndex].wpptInfo[0])"
+                      @click="
+                        openFile(worksDetail[sIndex].wpptInfo[0].wpptInfo)
+                      "
                     >
                       <div
-                        @click="openFile(worksDetail[sIndex].wpptInfo[0])"
+                        @click="
+                          openFile(worksDetail[sIndex].wpptInfo[0].wpptInfo)
+                        "
                         style="
                           width: 300px;
                           height: 300px;
@@ -468,12 +509,12 @@
                       ></div>
                       <pdf
                         v-if="showPDF"
-                        :pdfUrl="worksDetail[sIndex].wpptInfo[0]"
+                        :pdfUrl="worksDetail[sIndex].wpptInfo[0].wpptInfo"
                         style="width: 100%; height: 520px; overflow: auto"
                       ></pdf>
                       <iframe
                         v-else
-                        :src="worksDetail[sIndex].wpptInfo[0]"
+                        :src="worksDetail[sIndex].wpptInfo[0].wpptInfo"
                         frameborder="0"
                         width="100%"
                         height="100%"
@@ -488,6 +529,12 @@
                     v-if="worksDetail[sIndex].pjInfo.length > 0"
                   >
                     <div style="width: 100%">
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -554,6 +601,12 @@
                     }"
                     v-if="worksDetail[sIndex].xztkInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -664,6 +717,12 @@
                     v-if="worksDetail[sIndex].lccjInfo.length > 0"
                   >
                     <div class="sentenBox">
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -677,7 +736,8 @@
                         <div style="font-size: 16px">连词成句工具</div>
                       </div>
                       <div
-                        v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo"
+                        v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo
+                          .lccjInfo"
                         :key="stIndex"
                         style="padding-bottom: 20px"
                       >
@@ -788,6 +848,12 @@
                     }"
                     v-if="worksDetail[sIndex].bgInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -804,7 +870,7 @@
                     <el-form>
                       <div
                         class="cont"
-                        v-html="worksDetail[sIndex].bgInfo[0].text"
+                        v-html="worksDetail[sIndex].bgInfo[0].bgInfo.text"
                       ></div>
                     </el-form>
                   </div>
@@ -815,6 +881,12 @@
                     }"
                     v-if="worksDetail[sIndex].cocopiInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -854,12 +926,20 @@
                       </div>
                       <div v-if="c.type == 2">
                         <div class="workImg">
-                          <img :src="word2" alt />
+                          <img
+                            :src="word2"
+                            @click="openFile(c.url, c.type)"
+                            alt
+                          />
                         </div>
                       </div>
                       <div v-if="c.type == 3">
                         <div class="workImg">
-                          <img :src="word2" alt />
+                          <img
+                            :src="word2"
+                            @click="openFile(c.url, c.type)"
+                            alt
+                          />
                         </div>
                       </div>
                     </div>
@@ -871,6 +951,12 @@
                     }"
                     v-if="worksDetail[sIndex].wordInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -887,7 +973,7 @@
                     <el-form>
                       <div
                         class="cont"
-                        v-html="worksDetail[sIndex].wordInfo[0].text"
+                        v-html="worksDetail[sIndex].wordInfo[0].wordInfo.text"
                       ></div>
                     </el-form>
                   </div>
@@ -1441,6 +1527,7 @@ export default {
           var wordInfo = res.data[12]; //文档作业
           var workEvaList = res.data[13];
           var workJson = [];
+
           for (var k = 0; k < res.data[0].length; k++) {
             this.allWorks = res.data[0][k];
             if (this.chapInfo.length == 0) {
@@ -1504,7 +1591,11 @@ export default {
                 res.data[0][k].stage == worksDetail[i].stage &&
                 res.data[0][k].task == worksDetail[i].task
               ) {
-                workJson[k].img.push({ src: worksDetail[i].content, id: i });
+                workJson[k].img.push({
+                  src: worksDetail[i].content,
+                  id: i,
+                  score: worksDetail[i].score,
+                });
               }
             }
             for (var i = 0; i < askInfo.length; i++) {
@@ -1517,13 +1608,16 @@ export default {
                 let e = [];
                 for (var y = 0; y < a.askJson.length; y++) {
                   if (a.askJson[y].type == "2") {
-                    e.push(JSON.parse(chooseInfo[i].content)[0].anwer[y]);
+                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
                   } else {
-                    e.push(JSON.parse(chooseInfo[i].content)[0].anwer[y]);
+                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
                   }
                 }
                 a.radio = e;
-                workJson[k].askInfo.push(a);
+                workJson[k].askInfo.push({
+                  askInfo: a,
+                  score: askInfo[i].score,
+                });
                 this.checkJson[k].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < a.radio.length; p++) {
@@ -1542,7 +1636,7 @@ export default {
                   }
                   if (a.radio[p] instanceof Array) {
                     if (
-                      workJson[k].askInfo[0].askJson[p].answer
+                      workJson[k].askInfo[0].askInfo.askJson[p].answer
                         .sort()
                         .join(",") == a.radio[p].sort().join(",")
                     ) {
@@ -1570,7 +1664,8 @@ export default {
                     }
                   } else {
                     if (
-                      workJson[k].askInfo[0].askJson[p].answer == a.radio[p]
+                      workJson[k].askInfo[0].askInfo.askJson[p].answer ==
+                      a.radio[p]
                     ) {
                       this.checkJson[k][p].right = 100;
                       isCount += this.checkJson[k][p].right;
@@ -1615,7 +1710,10 @@ export default {
                   }
                 }
                 t.radio = e;
-                workJson[k].chooseInfo.push(t);
+                workJson[k].chooseInfo.push({
+                  chooseInfo: t,
+                  score: chooseInfo[i].score,
+                });
                 this.checkJson[k].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < t.radio.length; p++) {
@@ -1634,7 +1732,7 @@ export default {
                   }
                   if (t.radio[p] instanceof Array) {
                     if (
-                      workJson[k].chooseInfo[0].testJson[p].answer
+                      workJson[k].chooseInfo[0].chooseInfo.testJson[p].answer
                         .sort()
                         .join(",") == t.radio[p].sort().join(",")
                     ) {
@@ -1662,7 +1760,8 @@ export default {
                     }
                   } else {
                     if (
-                      workJson[k].chooseInfo[0].testJson[p].answer == t.radio[p]
+                      workJson[k].chooseInfo[0].chooseInfo.testJson[p].answer ==
+                      t.radio[p]
                     ) {
                       this.checkJson[k][p].right = 100;
                       isCount += this.checkJson[k][p].right;
@@ -1709,7 +1808,10 @@ export default {
                   var a =
                     "https://view.officeapps.live.com/op/view.aspx?src=" +
                     pptInfo[i].content;
-                  workJson[k].wpptInfo.push(a);
+                  workJson[k].wpptInfo.push({
+                    wpptInfo: a,
+                    score: pptInfo[i].score,
+                  });
                   this.showPDF = false;
                 } else if (
                   pptInfo[i].content
@@ -1718,7 +1820,10 @@ export default {
                       pptInfo[i].content.split(".").length - 1
                     ].toLocaleUpperCase() == "PDF"
                 ) {
-                  workJson[k].wpptInfo.push(pptInfo[i].content);
+                  workJson[k].wpptInfo.push({
+                    wpptInfo: pptInfo[i].content,
+                    score: pptInfo[i].score,
+                  });
                   this.showPDF = true;
                 }
               }
@@ -1730,7 +1835,10 @@ export default {
                 res.data[0][k].task == answerInfo[i].task
               ) {
                 const element = answerInfo[i];
-                workJson[k].answerInfo.push(JSON.parse(element.content)[0]);
+                workJson[k].answerInfo.push({
+                  answerInfo: JSON.parse(element.content)[0],
+                  score: answerInfo[i].score,
+                });
               }
             }
             for (var i = 0; i < pjInfo.length; i++) {
@@ -1752,6 +1860,7 @@ export default {
                 workJson[k].pjInfo.push({
                   answer: JSON.parse(pj.content),
                   rateJson: rateJson,
+                  score: pjInfo[i].score,
                 });
               }
             }
@@ -1776,6 +1885,7 @@ export default {
                   workJson[k].xztkInfo.push({
                     answer: xztk.content.split(",").map(Number),
                     selectJson: selectJson,
+                    score: xztkInfo[i].score,
                   });
                 }
               }
@@ -1787,7 +1897,11 @@ export default {
                 res.data[0][k].task == lccjInfo[i].task
               ) {
                 var lccj = lccjInfo[i];
-                workJson[k].lccjInfo.push(JSON.parse(lccj.content)[0]);
+                workJson[k].lccjInfo.push({
+                  lccjInfo: JSON.parse(lccj.content)[0],
+                  score: lccjInfo[i].score,
+                });
+                workJson[k].lccjInfo[i].score = lccjInfo[i].score;
               }
             }
 
@@ -1797,7 +1911,10 @@ export default {
                 res.data[0][k].task == bgInfo[i].task
               ) {
                 var bg = bgInfo[i];
-                workJson[k].bgInfo.push(JSON.parse(bg.content));
+                workJson[k].bgInfo.push({
+                  bgInfo: JSON.parse(bg.content),
+                  score: bgInfo[i].score,
+                });
               }
             }
 
@@ -1831,7 +1948,11 @@ export default {
                   ) != -1
                 ) {
                   t = 1;
-                  workJson[k].cocopiInfo.push({ url: cocopi.content, type: t });
+                  workJson[k].cocopiInfo.push({
+                    url: cocopi.content,
+                    type: t,
+                    score: cocopiInfo[i].score,
+                  });
                 } else if (
                   c.indexOf(
                     cocopi.content
@@ -1846,10 +1967,15 @@ export default {
                   workJson[k].cocopiInfo.push({
                     url: a,
                     type: t,
+                    score: cocopiInfo[i].score,
                   });
                 } else {
                   t = 3;
-                  workJson[k].cocopiInfo.push({ url: cocopi.content, type: t });
+                  workJson[k].cocopiInfo.push({
+                    url: cocopi.content,
+                    type: t,
+                    score: cocopiInfo[i].score,
+                  });
                 }
               }
             }
@@ -1860,7 +1986,10 @@ export default {
                 res.data[0][k].task == wordInfo[i].task
               ) {
                 var word = wordInfo[i];
-                workJson[k].wordInfo.push(JSON.parse(word.content));
+                workJson[k].wordInfo.push({
+                  wordInfo: JSON.parse(word.content),
+                  score: wordInfo[i].score,
+                });
               }
             }
           }
@@ -1871,16 +2000,69 @@ export default {
             );
           });
           for (var l = 0; l < b.length; l++) {
-            for (var p = 0; p < workEvaList.length; p++) {
-              if (
-                b[l].stage == workEvaList[p].stage &&
-                b[l].task == workEvaList[p].task
-              ) {
-                var eListOld =
-                  chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
-                    .eList;
+            if (workEvaList.length > 0) {
+              for (var p = 0; p < workEvaList.length; p++) {
+                if (
+                  b[l].stage == workEvaList[p].stage &&
+                  b[l].task == workEvaList[p].task
+                ) {
+                  var eListOld =
+                    chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
+                      .eList;
+                  var eListNew = Object.keys(eListOld).map(function (key) {
+                    return {
+                      detail: eListOld[key].detail,
+                      score: eListOld[key].score,
+                      value: eListOld[key].value,
+                    };
+                  });
+                  eList = eListNew;
+                  if (eList && eList.length) {
+                    _ooption = [];
+                    result[l].eList = eList;
+                    for (var i = 0; i < eList.length; i++) {
+                      _ooption.push({ value: 0, name: eList[i].value });
+                      result[l].rateList[eList[i].value] = 0;
+                    }
+                    result[l].rateList.content = "";
+                    this.ooption[l] = _ooption;
+                  }
+                  if (workEvaList[p].rate && eList && eList.length) {
+                    _rate[l] = JSON.parse(workEvaList[p].rate);
+                    _rateList[l] = Object.keys(JSON.parse(workEvaList[p].rate));
+                    for (var i = 0; i < _rateList[l].length; i++) {
+                      var _c = Object.keys(result[l].rateList);
+                      if (_c.indexOf(_rateList[l][i]) != -1) {
+                        result[l].rateList[_rateList[l][i]] =
+                          _rate[l][_rateList[l][i]];
+                      }
+                    }
+                    for (var i = 0; i < this.ooption[l].length; i++) {
+                      if (_rateList[l].indexOf(this.ooption[l][i].name) != -1) {
+                        this.ooption[l][i].value =
+                          _rate[l][this.ooption[l][i].name];
+                      }
+                    }
+                  } else {
+                    _rate[l] = [];
+                    _rateList[l] = [];
+                  }
+                } else {
+                  _rate[l] = [];
+                  _rateList[l] = [];
+                }
+              }
+            } else {
+              var eListOld =
+                chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
+                  .eList;
+              if (eListOld && eListOld.length) {
                 var eListNew = Object.keys(eListOld).map(function (key) {
-                  return { detail: eListOld[key].detail, score: eListOld[key].score, value: eListOld[key].value };
+                  return {
+                    detail: eListOld[key].detail,
+                    score: eListOld[key].score,
+                    value: eListOld[key].value,
+                  };
                 });
                 eList = eListNew;
                 if (eList && eList.length) {
@@ -1893,9 +2075,9 @@ export default {
                   result[l].rateList.content = "";
                   this.ooption[l] = _ooption;
                 }
-                if (workEvaList[p].rate && eList && eList.length) {
-                  _rate[l] = JSON.parse(workEvaList[p].rate);
-                  _rateList[l] = Object.keys(JSON.parse(workEvaList[p].rate));
+                if (b[l].rate && eList && eList.length) {
+                  _rate[l] = JSON.parse(b[l].rate);
+                  _rateList[l] = Object.keys(JSON.parse(b[l].rate));
                   for (var i = 0; i < _rateList[l].length; i++) {
                     var _c = Object.keys(result[l].rateList);
                     if (_c.indexOf(_rateList[l][i]) != -1) {
@@ -1913,9 +2095,6 @@ export default {
                   _rate[l] = [];
                   _rateList[l] = [];
                 }
-              } else {
-                _rate[l] = [];
-                _rateList[l] = [];
               }
             }
           }

+ 257 - 75
src/components/pages/components/studentWorksDetail.vue

@@ -360,6 +360,12 @@
                           }"
                           v-if="worksDetail[sIndex].img.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             class="bigImg"
                             v-if="
@@ -417,18 +423,28 @@
                           }"
                           v-if="worksDetail[sIndex].answerInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div class="answerbox">
                             <div style="min-width: 80px">问答标题</div>
                             <div>
                               {{
-                                worksDetail[sIndex].answerInfo[0].answerTitle
+                                worksDetail[sIndex].answerInfo[0].answerInfo
+                                  .answerTitle
                               }}
                             </div>
                           </div>
                           <div class="answerbox1">
                             <div>学生回答</div>
                             <div>
-                              {{ worksDetail[sIndex].answerInfo[0].answer }}
+                              {{
+                                worksDetail[sIndex].answerInfo[0].answerInfo
+                                  .answer
+                              }}
                             </div>
                           </div>
                         </div>
@@ -442,6 +458,12 @@
                           v-if="worksDetail[sIndex].askInfo.length > 0"
                         >
                           <div>
+                            <div
+                              v-if="worksDetail[sIndex].img.score"
+                              style="float: right"
+                            >
+                              评分:{{ worksDetail[sIndex].img.score }}
+                            </div>
                             <div
                               class="a_add_title"
                               style="
@@ -467,7 +489,7 @@
                               <div style="margin-right: 20px">标题:</div>
                               <div style="font-size: 20px">
                                 {{
-                                  worksDetail[sIndex].askInfo[0].askJson
+                                  worksDetail[sIndex].askInfo[0].askInfo.askJson
                                     .askTitle
                                 }}
                               </div>
@@ -479,7 +501,7 @@
                               <div
                                 class="a_add_box"
                                 v-for="(item1, index1) in worksDetail[sIndex]
-                                  .askInfo[0].askJson.askCount"
+                                  .askInfo[0].askInfo.askJson.askCount"
                                 :key="index1"
                               >
                                 <div class="a_add_head">
@@ -487,8 +509,8 @@
                                     {{ index1 + 1 + "、" }}
                                     <div>
                                       题目:{{
-                                        worksDetail[sIndex].askInfo[0].askJson
-                                          .askJson[index1].askstitle
+                                        worksDetail[sIndex].askInfo[0].askInfo
+                                          .askJson.askJson[index1].askstitle
                                       }}
                                     </div>
                                   </div>
@@ -497,22 +519,23 @@
                                   <div class="a_add_input">
                                     <el-radio-group
                                       v-if="
-                                        worksDetail[sIndex].askInfo[0].askJson
-                                          .askJson[index1].type == '1' ||
-                                        !worksDetail[sIndex].askInfo[0].askJson
-                                          .askJson[index1].type
+                                        worksDetail[sIndex].askInfo[0].askInfo
+                                          .askJson.askJson[index1].type ==
+                                          '1' ||
+                                        !worksDetail[sIndex].askInfo[0].askInfo
+                                          .askJson.askJson[index1].type
                                       "
                                       v-model="
-                                        worksDetail[sIndex].askInfo[0].anwer[
-                                          index1
-                                        ]
+                                        worksDetail[sIndex].askInfo[0].askInfo
+                                          .anwer[index1]
                                       "
                                     >
                                       <el-radio
                                         v-for="(
                                           item2, checkIndex
                                         ) in worksDetail[sIndex].askInfo[0]
-                                          .askJson.askJson[index1].checkList"
+                                          .askInfo.askJson.askJson[index1]
+                                          .checkList"
                                         :key="checkIndex"
                                         :label="checkIndex"
                                         disabled
@@ -522,20 +545,20 @@
                                     </el-radio-group>
                                     <el-checkbox-group
                                       v-model="
-                                        worksDetail[sIndex].askInfo[0].anwer[
-                                          index1
-                                        ]
+                                        worksDetail[sIndex].askInfo[0].askInfo
+                                          .anwer[index1]
                                       "
                                       v-if="
-                                        worksDetail[sIndex].askInfo[0].askJson
-                                          .askJson[index1].type == '2'
+                                        worksDetail[sIndex].askInfo[0].askInfo
+                                          .askJson.askJson[index1].type == '2'
                                       "
                                     >
                                       <el-checkbox
                                         v-for="(
                                           item2, checkIndex1
                                         ) in worksDetail[sIndex].askInfo[0]
-                                          .askJson.askJson[index1].checkList"
+                                          .askInfo.askJson.askJson[index1]
+                                          .checkList"
                                         :key="checkIndex1"
                                         :label="checkIndex1"
                                         disabled
@@ -557,6 +580,12 @@
                           v-if="worksDetail[sIndex].chooseInfo.length > 0"
                         >
                           <div>
+                            <div
+                              v-if="worksDetail[sIndex].img.score"
+                              style="float: right"
+                            >
+                              评分:{{ worksDetail[sIndex].img.score }}
+                            </div>
                             <div
                               class="a_add_title"
                               style="
@@ -576,7 +605,7 @@
                               <div
                                 class="a_add_box"
                                 v-for="(item1, index1) in worksDetail[sIndex]
-                                  .chooseInfo[0].testCount"
+                                  .chooseInfo[0].chooseInfo.testCount"
                                 :key="index1"
                               >
                                 <div class="a_add_head">
@@ -585,18 +614,19 @@
                                     <div>
                                       题目:{{
                                         worksDetail[sIndex].chooseInfo[0]
-                                          .testJson[index1].teststitle
+                                          .chooseInfo.testJson[index1]
+                                          .teststitle
                                       }}
                                     </div>
                                   </div>
                                   <img
                                     v-if="
                                       worksDetail[sIndex].chooseInfo[0]
-                                        .testJson[index1].img
+                                        .chooseInfo.testJson[index1].img
                                     "
                                     :src="
                                       worksDetail[sIndex].chooseInfo[0]
-                                        .testJson[index1].img
+                                        .chooseInfo.testJson[index1].img
                                     "
                                     style="
                                       height: 300px;
@@ -609,13 +639,13 @@
                                   <div class="a_add_input">
                                     <el-radio-group
                                       v-model="
-                                        worksDetail[sIndex].chooseInfo[0].radio[
-                                          index1
-                                        ]
+                                        worksDetail[sIndex].chooseInfo[0]
+                                          .chooseInfo.radio[index1]
                                       "
                                       v-if="
                                         worksDetail[sIndex].chooseInfo[0]
-                                          .testJson[index1].type == '1'
+                                          .chooseInfo.testJson[index1].type ==
+                                        '1'
                                       "
                                     >
                                       <div class="radioBox">
@@ -623,7 +653,8 @@
                                           v-for="(
                                             item2, checkIndex
                                           ) in worksDetail[sIndex].chooseInfo[0]
-                                            .testJson[index1].checkList"
+                                            .chooseInfo.testJson[index1]
+                                            .checkList"
                                           :key="checkIndex"
                                           :label="checkIndex"
                                           disabled
@@ -652,13 +683,13 @@
                                     </el-radio-group>
                                     <el-checkbox-group
                                       v-model="
-                                        worksDetail[sIndex].chooseInfo[0].radio[
-                                          index1
-                                        ]
+                                        worksDetail[sIndex].chooseInfo[0]
+                                          .chooseInfo.radio[index1]
                                       "
                                       v-if="
                                         worksDetail[sIndex].chooseInfo[0]
-                                          .testJson[index1].type == '2'
+                                          .chooseInfo.testJson[index1].type ==
+                                        '2'
                                       "
                                     >
                                       <div class="radioBox">
@@ -666,7 +697,8 @@
                                           v-for="(
                                             item2, checkIndex
                                           ) in worksDetail[sIndex].chooseInfo[0]
-                                            .testJson[index1].checkList"
+                                            .chooseInfo.testJson[index1]
+                                            .checkList"
                                           :key="checkIndex"
                                           :label="checkIndex"
                                           disabled
@@ -708,12 +740,24 @@
                           }"
                           v-if="worksDetail[sIndex].wpptInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             style="height: 238px"
-                            @click="openFile(worksDetail[sIndex].wpptInfo[0])"
+                            @click="
+                              openFile(worksDetail[sIndex].wpptInfo[0].wpptInfo)
+                            "
                           >
                             <div
-                              @click="openFile(worksDetail[sIndex].wpptInfo[0])"
+                              @click="
+                                openFile(
+                                  worksDetail[sIndex].wpptInfo[0].wpptInfo
+                                )
+                              "
                               style="
                                 width: 300px;
                                 height: 300px;
@@ -723,12 +767,12 @@
                             ></div>
                             <pdf
                               v-if="showPDF"
-                              :pdfUrl="worksDetail[sIndex].wpptInfo[0]"
+                              :pdfUrl="worksDetail[sIndex].wpptInfo[0].wpptInfo"
                               style="width: 100%; height: 520px; overflow: auto"
                             ></pdf>
                             <iframe
                               v-else
-                              :src="worksDetail[sIndex].wpptInfo[0]"
+                              :src="worksDetail[sIndex].wpptInfo[0].wpptInfo"
                               frameborder="0"
                               width="100%"
                               height="100%"
@@ -745,6 +789,12 @@
                           v-if="worksDetail[sIndex].pjInfo.length > 0"
                         >
                           <div style="width: 100%">
+                            <div
+                              v-if="worksDetail[sIndex].img.score"
+                              style="float: right"
+                            >
+                              评分:{{ worksDetail[sIndex].img.score }}
+                            </div>
                             <div
                               class="a_add_title"
                               style="
@@ -815,6 +865,12 @@
                           }"
                           v-if="worksDetail[sIndex].xztkInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             class="a_add_title"
                             style="
@@ -931,6 +987,12 @@
                           v-if="worksDetail[sIndex].lccjInfo.length > 0"
                         >
                           <div class="sentenBox">
+                            <div
+                              v-if="worksDetail[sIndex].img.score"
+                              style="float: right"
+                            >
+                              评分:{{ worksDetail[sIndex].img.score }}
+                            </div>
                             <div
                               class="a_add_title"
                               style="
@@ -945,7 +1007,7 @@
                             </div>
                             <div
                               v-for="(st, stIndex) in worksDetail[sIndex]
-                                .lccjInfo"
+                                .lccjInfo.lccjInfo"
                               :key="stIndex"
                               style="padding-bottom: 20px"
                             >
@@ -1063,6 +1125,12 @@
                           }"
                           v-if="worksDetail[sIndex].bgInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             class="a_add_title"
                             style="
@@ -1079,7 +1147,7 @@
                           <el-form>
                             <div
                               class="cont"
-                              v-html="worksDetail[sIndex].bgInfo[0].text"
+                              v-html="worksDetail[sIndex].bgInfo[0].bgInfo.text"
                             ></div>
                           </el-form>
                         </div>
@@ -1092,6 +1160,12 @@
                           }"
                           v-if="worksDetail[sIndex].cocopiInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             class="a_add_title"
                             style="
@@ -1136,12 +1210,20 @@
                             </div>
                             <div v-if="c.type == 2">
                               <div class="workImg">
-                                <img :src="word2" alt />
+                                <img
+                                  :src="word2"
+                                  @click="openFile(c.url, c.type)"
+                                  alt
+                                />
                               </div>
                             </div>
                             <div v-if="c.type == 3">
                               <div class="workImg">
-                                <img :src="word2" alt />
+                                <img
+                                  :src="word2"
+                                  @click="openFile(c.url, c.type)"
+                                  alt
+                                />
                               </div>
                             </div>
                           </div>
@@ -1155,6 +1237,12 @@
                           }"
                           v-if="worksDetail[sIndex].wordInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             class="a_add_title"
                             style="
@@ -1171,7 +1259,9 @@
                           <el-form>
                             <div
                               class="cont"
-                              v-html="worksDetail[sIndex].wordInfo[0].text"
+                              v-html="
+                                worksDetail[sIndex].wordInfo[0].wordInfo.text
+                              "
                             ></div>
                           </el-form>
                         </div>
@@ -1890,7 +1980,11 @@ export default {
                 res.data[0][k].stage == worksDetail[i].stage &&
                 res.data[0][k].task == worksDetail[i].task
               ) {
-                workJson[k].img.push({ src: worksDetail[i].content, id: i });
+                workJson[k].img.push({
+                  src: worksDetail[i].content,
+                  id: i,
+                  score: worksDetail[i].score,
+                });
               }
             }
             for (var i = 0; i < askInfo.length; i++) {
@@ -1903,13 +1997,16 @@ export default {
                 let e = [];
                 for (var y = 0; y < a.askJson.length; y++) {
                   if (a.askJson[y].type == "2") {
-                    e.push(JSON.parse(chooseInfo[i].content)[0].anwer[y]);
+                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
                   } else {
-                    e.push(JSON.parse(chooseInfo[i].content)[0].anwer[y]);
+                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
                   }
                 }
                 a.radio = e;
-                workJson[k].askInfo.push(a);
+                workJson[k].askInfo.push({
+                  askInfo: a,
+                  score: askInfo[i].score,
+                });
                 this.checkJson[k].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < a.radio.length; p++) {
@@ -1928,7 +2025,7 @@ export default {
                   }
                   if (a.radio[p] instanceof Array) {
                     if (
-                      workJson[k].askInfo[0].askJson[p].answer
+                      workJson[k].askInfo[0].askInfo.askJson[p].answer
                         .sort()
                         .join(",") == a.radio[p].sort().join(",")
                     ) {
@@ -1956,7 +2053,8 @@ export default {
                     }
                   } else {
                     if (
-                      workJson[k].askInfo[0].askJson[p].answer == a.radio[p]
+                      workJson[k].askInfo[0].askInfo.askJson[p].answer ==
+                      a.radio[p]
                     ) {
                       this.checkJson[k][p].right = 100;
                       isCount += this.checkJson[k][p].right;
@@ -2001,7 +2099,10 @@ export default {
                   }
                 }
                 t.radio = e;
-                workJson[k].chooseInfo.push(t);
+                workJson[k].chooseInfo.push({
+                  chooseInfo: t,
+                  score: chooseInfo[i].score,
+                });
                 this.checkJson[k].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < t.radio.length; p++) {
@@ -2020,7 +2121,7 @@ export default {
                   }
                   if (t.radio[p] instanceof Array) {
                     if (
-                      workJson[k].chooseInfo[0].testJson[p].answer
+                      workJson[k].chooseInfo[0].chooseInfo.testJson[p].answer
                         .sort()
                         .join(",") == t.radio[p].sort().join(",")
                     ) {
@@ -2048,7 +2149,8 @@ export default {
                     }
                   } else {
                     if (
-                      workJson[k].chooseInfo[0].testJson[p].answer == t.radio[p]
+                      workJson[k].chooseInfo[0].chooseInfo.testJson[p].answer ==
+                      t.radio[p]
                     ) {
                       this.checkJson[k][p].right = 100;
                       isCount += this.checkJson[k][p].right;
@@ -2095,7 +2197,10 @@ export default {
                   var a =
                     "https://view.officeapps.live.com/op/view.aspx?src=" +
                     pptInfo[i].content;
-                  workJson[k].wpptInfo.push(a);
+                  workJson[k].wpptInfo.push({
+                    wpptInfo: a,
+                    score: pptInfo[i].score,
+                  });
                   this.showPDF = false;
                 } else if (
                   pptInfo[i].content
@@ -2104,7 +2209,10 @@ export default {
                       pptInfo[i].content.split(".").length - 1
                     ].toLocaleUpperCase() == "PDF"
                 ) {
-                  workJson[k].wpptInfo.push(pptInfo[i].content);
+                  workJson[k].wpptInfo.push({
+                    wpptInfo: pptInfo[i].content,
+                    score: pptInfo[i].score,
+                  });
                   this.showPDF = true;
                 }
               }
@@ -2116,7 +2224,10 @@ export default {
                 res.data[0][k].task == answerInfo[i].task
               ) {
                 const element = answerInfo[i];
-                workJson[k].answerInfo.push(JSON.parse(element.content)[0]);
+                workJson[k].answerInfo.push({
+                  answerInfo: JSON.parse(element.content)[0],
+                  score: answerInfo[i].score,
+                });
               }
             }
             for (var i = 0; i < pjInfo.length; i++) {
@@ -2138,6 +2249,7 @@ export default {
                 workJson[k].pjInfo.push({
                   answer: JSON.parse(pj.content),
                   rateJson: rateJson,
+                  score: pjInfo[i].score,
                 });
               }
             }
@@ -2162,6 +2274,7 @@ export default {
                   workJson[k].xztkInfo.push({
                     answer: xztk.content.split(",").map(Number),
                     selectJson: selectJson,
+                    score: xztkInfo[i].score,
                   });
                 }
               }
@@ -2173,7 +2286,11 @@ export default {
                 res.data[0][k].task == lccjInfo[i].task
               ) {
                 var lccj = lccjInfo[i];
-                workJson[k].lccjInfo.push(JSON.parse(lccj.content)[0]);
+                workJson[k].lccjInfo.push({
+                  lccjInfo: JSON.parse(lccj.content)[0],
+                  score: lccjInfo[i].score,
+                });
+                workJson[k].lccjInfo[i].score = lccjInfo[i].score;
               }
             }
 
@@ -2183,7 +2300,10 @@ export default {
                 res.data[0][k].task == bgInfo[i].task
               ) {
                 var bg = bgInfo[i];
-                workJson[k].bgInfo.push(JSON.parse(bg.content));
+                workJson[k].bgInfo.push({
+                  bgInfo: JSON.parse(bg.content),
+                  score: bgInfo[i].score,
+                });
               }
             }
 
@@ -2217,7 +2337,11 @@ export default {
                   ) != -1
                 ) {
                   t = 1;
-                  workJson[k].cocopiInfo.push({ url: cocopi.content, type: t });
+                  workJson[k].cocopiInfo.push({
+                    url: cocopi.content,
+                    type: t,
+                    score: cocopiInfo[i].score,
+                  });
                 } else if (
                   c.indexOf(
                     cocopi.content
@@ -2232,10 +2356,15 @@ export default {
                   workJson[k].cocopiInfo.push({
                     url: a,
                     type: t,
+                    score: cocopiInfo[i].score,
                   });
                 } else {
                   t = 3;
-                  workJson[k].cocopiInfo.push({ url: cocopi.content, type: t });
+                  workJson[k].cocopiInfo.push({
+                    url: cocopi.content,
+                    type: t,
+                    score: cocopiInfo[i].score,
+                  });
                 }
               }
             }
@@ -2246,7 +2375,10 @@ export default {
                 res.data[0][k].task == wordInfo[i].task
               ) {
                 var word = wordInfo[i];
-                workJson[k].wordInfo.push(JSON.parse(word.content));
+                workJson[k].wordInfo.push({
+                  wordInfo: JSON.parse(word.content),
+                  score: wordInfo[i].score,
+                });
               }
             }
           }
@@ -2257,16 +2389,69 @@ export default {
             );
           });
           for (var l = 0; l < b.length; l++) {
-            for (var p = 0; p < workEvaList.length; p++) {
-              if (
-                b[l].stage == workEvaList[p].stage &&
-                b[l].task == workEvaList[p].task
-              ) {
-                var eListOld =
-                  chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
-                    .eList;
+            if (workEvaList.length > 0) {
+              for (var p = 0; p < workEvaList.length; p++) {
+                if (
+                  b[l].stage == workEvaList[p].stage &&
+                  b[l].task == workEvaList[p].task
+                ) {
+                  var eListOld =
+                    chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
+                      .eList;
+                  var eListNew = Object.keys(eListOld).map(function (key) {
+                    return {
+                      detail: eListOld[key].detail,
+                      score: eListOld[key].score,
+                      value: eListOld[key].value,
+                    };
+                  });
+                  eList = eListNew;
+                  if (eList && eList.length) {
+                    _ooption = [];
+                    result[l].eList = eList;
+                    for (var i = 0; i < eList.length; i++) {
+                      _ooption.push({ value: 0, name: eList[i].value });
+                      result[l].rateList[eList[i].value] = 0;
+                    }
+                    result[l].rateList.content = "";
+                    this.ooption[l] = _ooption;
+                  }
+                  if (workEvaList[p].rate && eList && eList.length) {
+                    _rate[l] = JSON.parse(workEvaList[p].rate);
+                    _rateList[l] = Object.keys(JSON.parse(workEvaList[p].rate));
+                    for (var i = 0; i < _rateList[l].length; i++) {
+                      var _c = Object.keys(result[l].rateList);
+                      if (_c.indexOf(_rateList[l][i]) != -1) {
+                        result[l].rateList[_rateList[l][i]] =
+                          _rate[l][_rateList[l][i]];
+                      }
+                    }
+                    for (var i = 0; i < this.ooption[l].length; i++) {
+                      if (_rateList[l].indexOf(this.ooption[l][i].name) != -1) {
+                        this.ooption[l][i].value =
+                          _rate[l][this.ooption[l][i].name];
+                      }
+                    }
+                  } else {
+                    _rate[l] = [];
+                    _rateList[l] = [];
+                  }
+                } else {
+                  _rate[l] = [];
+                  _rateList[l] = [];
+                }
+              }
+            } else {
+              var eListOld =
+                chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
+                  .eList;
+              if (eListOld && eListOld.length) {
                 var eListNew = Object.keys(eListOld).map(function (key) {
-                  return { detail: eListOld[key].detail, score: eListOld[key].score, value: eListOld[key].value };
+                  return {
+                    detail: eListOld[key].detail,
+                    score: eListOld[key].score,
+                    value: eListOld[key].value,
+                  };
                 });
                 eList = eListNew;
                 if (eList && eList.length) {
@@ -2279,9 +2464,9 @@ export default {
                   result[l].rateList.content = "";
                   this.ooption[l] = _ooption;
                 }
-                if (workEvaList[p].rate && eList && eList.length) {
-                  _rate[l] = JSON.parse(workEvaList[p].rate);
-                  _rateList[l] = Object.keys(JSON.parse(workEvaList[p].rate));
+                if (b[l].rate && eList && eList.length) {
+                  _rate[l] = JSON.parse(b[l].rate);
+                  _rateList[l] = Object.keys(JSON.parse(b[l].rate));
                   for (var i = 0; i < _rateList[l].length; i++) {
                     var _c = Object.keys(result[l].rateList);
                     if (_c.indexOf(_rateList[l][i]) != -1) {
@@ -2299,9 +2484,6 @@ export default {
                   _rate[l] = [];
                   _rateList[l] = [];
                 }
-              } else {
-                _rate[l] = [];
-                _rateList[l] = [];
               }
             }
           }

+ 247 - 75
src/components/pages/components/worksDetail2.vue

@@ -361,6 +361,12 @@
                           }"
                           v-if="worksDetail[sIndex].img.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             class="bigImg"
                             v-if="
@@ -418,18 +424,28 @@
                           }"
                           v-if="worksDetail[sIndex].answerInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div class="answerbox">
                             <div style="min-width: 80px">问答标题</div>
                             <div>
                               {{
-                                worksDetail[sIndex].answerInfo[0].answerTitle
+                                worksDetail[sIndex].answerInfo[0].answerInfo
+                                  .answerTitle
                               }}
                             </div>
                           </div>
                           <div class="answerbox1">
                             <div>学生回答</div>
                             <div>
-                              {{ worksDetail[sIndex].answerInfo[0].answer }}
+                              {{
+                                worksDetail[sIndex].answerInfo[0].answerInfo
+                                  .answer
+                              }}
                             </div>
                           </div>
                         </div>
@@ -443,6 +459,12 @@
                           v-if="worksDetail[sIndex].askInfo.length > 0"
                         >
                           <div>
+                            <div
+                              v-if="worksDetail[sIndex].img.score"
+                              style="float: right"
+                            >
+                              评分:{{ worksDetail[sIndex].img.score }}
+                            </div>
                             <div
                               class="a_add_title"
                               style="
@@ -468,7 +490,7 @@
                               <div style="margin-right: 20px">标题:</div>
                               <div style="font-size: 20px">
                                 {{
-                                  worksDetail[sIndex].askInfo[0].askJson
+                                  worksDetail[sIndex].askInfo[0].askInfo.askJson
                                     .askTitle
                                 }}
                               </div>
@@ -480,7 +502,7 @@
                               <div
                                 class="a_add_box"
                                 v-for="(item1, index1) in worksDetail[sIndex]
-                                  .askInfo[0].askJson.askCount"
+                                  .askInfo[0].askInfo.askJson.askCount"
                                 :key="index1"
                               >
                                 <div class="a_add_head">
@@ -488,8 +510,8 @@
                                     {{ index1 + 1 + "、" }}
                                     <div>
                                       题目:{{
-                                        worksDetail[sIndex].askInfo[0].askJson
-                                          .askJson[index1].askstitle
+                                        worksDetail[sIndex].askInfo[0].askInfo
+                                          .askJson.askJson[index1].askstitle
                                       }}
                                     </div>
                                   </div>
@@ -498,22 +520,23 @@
                                   <div class="a_add_input">
                                     <el-radio-group
                                       v-if="
-                                        worksDetail[sIndex].askInfo[0].askJson
-                                          .askJson[index1].type == '1' ||
-                                        !worksDetail[sIndex].askInfo[0].askJson
-                                          .askJson[index1].type
+                                        worksDetail[sIndex].askInfo[0].askInfo
+                                          .askJson.askJson[index1].type ==
+                                          '1' ||
+                                        !worksDetail[sIndex].askInfo[0].askInfo
+                                          .askJson.askJson[index1].type
                                       "
                                       v-model="
-                                        worksDetail[sIndex].askInfo[0].anwer[
-                                          index1
-                                        ]
+                                        worksDetail[sIndex].askInfo[0].askInfo
+                                          .anwer[index1]
                                       "
                                     >
                                       <el-radio
                                         v-for="(
                                           item2, checkIndex
                                         ) in worksDetail[sIndex].askInfo[0]
-                                          .askJson.askJson[index1].checkList"
+                                          .askInfo.askJson.askJson[index1]
+                                          .checkList"
                                         :key="checkIndex"
                                         :label="checkIndex"
                                         disabled
@@ -523,20 +546,20 @@
                                     </el-radio-group>
                                     <el-checkbox-group
                                       v-model="
-                                        worksDetail[sIndex].askInfo[0].anwer[
-                                          index1
-                                        ]
+                                        worksDetail[sIndex].askInfo[0].askInfo
+                                          .anwer[index1]
                                       "
                                       v-if="
-                                        worksDetail[sIndex].askInfo[0].askJson
-                                          .askJson[index1].type == '2'
+                                        worksDetail[sIndex].askInfo[0].askInfo
+                                          .askJson.askJson[index1].type == '2'
                                       "
                                     >
                                       <el-checkbox
                                         v-for="(
                                           item2, checkIndex1
                                         ) in worksDetail[sIndex].askInfo[0]
-                                          .askJson.askJson[index1].checkList"
+                                          .askInfo.askJson.askJson[index1]
+                                          .checkList"
                                         :key="checkIndex1"
                                         :label="checkIndex1"
                                         disabled
@@ -558,6 +581,12 @@
                           v-if="worksDetail[sIndex].chooseInfo.length > 0"
                         >
                           <div>
+                            <div
+                              v-if="worksDetail[sIndex].img.score"
+                              style="float: right"
+                            >
+                              评分:{{ worksDetail[sIndex].img.score }}
+                            </div>
                             <div
                               class="a_add_title"
                               style="
@@ -577,7 +606,7 @@
                               <div
                                 class="a_add_box"
                                 v-for="(item1, index1) in worksDetail[sIndex]
-                                  .chooseInfo[0].testCount"
+                                  .chooseInfo[0].chooseInfo.testCount"
                                 :key="index1"
                               >
                                 <div class="a_add_head">
@@ -586,18 +615,19 @@
                                     <div>
                                       题目:{{
                                         worksDetail[sIndex].chooseInfo[0]
-                                          .testJson[index1].teststitle
+                                          .chooseInfo.testJson[index1]
+                                          .teststitle
                                       }}
                                     </div>
                                   </div>
                                   <img
                                     v-if="
                                       worksDetail[sIndex].chooseInfo[0]
-                                        .testJson[index1].img
+                                        .chooseInfo.testJson[index1].img
                                     "
                                     :src="
                                       worksDetail[sIndex].chooseInfo[0]
-                                        .testJson[index1].img
+                                        .chooseInfo.testJson[index1].img
                                     "
                                     style="
                                       height: 300px;
@@ -610,13 +640,13 @@
                                   <div class="a_add_input">
                                     <el-radio-group
                                       v-model="
-                                        worksDetail[sIndex].chooseInfo[0].radio[
-                                          index1
-                                        ]
+                                        worksDetail[sIndex].chooseInfo[0]
+                                          .chooseInfo.radio[index1]
                                       "
                                       v-if="
                                         worksDetail[sIndex].chooseInfo[0]
-                                          .testJson[index1].type == '1'
+                                          .chooseInfo.testJson[index1].type ==
+                                        '1'
                                       "
                                     >
                                       <div class="radioBox">
@@ -624,7 +654,8 @@
                                           v-for="(
                                             item2, checkIndex
                                           ) in worksDetail[sIndex].chooseInfo[0]
-                                            .testJson[index1].checkList"
+                                            .chooseInfo.testJson[index1]
+                                            .checkList"
                                           :key="checkIndex"
                                           :label="checkIndex"
                                           disabled
@@ -653,13 +684,13 @@
                                     </el-radio-group>
                                     <el-checkbox-group
                                       v-model="
-                                        worksDetail[sIndex].chooseInfo[0].radio[
-                                          index1
-                                        ]
+                                        worksDetail[sIndex].chooseInfo[0]
+                                          .chooseInfo.radio[index1]
                                       "
                                       v-if="
                                         worksDetail[sIndex].chooseInfo[0]
-                                          .testJson[index1].type == '2'
+                                          .chooseInfo.testJson[index1].type ==
+                                        '2'
                                       "
                                     >
                                       <div class="radioBox">
@@ -667,7 +698,8 @@
                                           v-for="(
                                             item2, checkIndex
                                           ) in worksDetail[sIndex].chooseInfo[0]
-                                            .testJson[index1].checkList"
+                                            .chooseInfo.testJson[index1]
+                                            .checkList"
                                           :key="checkIndex"
                                           :label="checkIndex"
                                           disabled
@@ -709,12 +741,24 @@
                           }"
                           v-if="worksDetail[sIndex].wpptInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             style="height: 238px"
-                            @click="openFile(worksDetail[sIndex].wpptInfo[0])"
+                            @click="
+                              openFile(worksDetail[sIndex].wpptInfo[0].wpptInfo)
+                            "
                           >
                             <div
-                              @click="openFile(worksDetail[sIndex].wpptInfo[0])"
+                              @click="
+                                openFile(
+                                  worksDetail[sIndex].wpptInfo[0].wpptInfo
+                                )
+                              "
                               style="
                                 width: 300px;
                                 height: 300px;
@@ -724,12 +768,12 @@
                             ></div>
                             <pdf
                               v-if="showPDF"
-                              :pdfUrl="worksDetail[sIndex].wpptInfo[0]"
+                              :pdfUrl="worksDetail[sIndex].wpptInfo[0].wpptInfo"
                               style="width: 100%; height: 520px; overflow: auto"
                             ></pdf>
                             <iframe
                               v-else
-                              :src="worksDetail[sIndex].wpptInfo[0]"
+                              :src="worksDetail[sIndex].wpptInfo[0].wpptInfo"
                               frameborder="0"
                               width="100%"
                               height="100%"
@@ -746,6 +790,12 @@
                           v-if="worksDetail[sIndex].pjInfo.length > 0"
                         >
                           <div style="width: 100%">
+                            <div
+                              v-if="worksDetail[sIndex].img.score"
+                              style="float: right"
+                            >
+                              评分:{{ worksDetail[sIndex].img.score }}
+                            </div>
                             <div
                               class="a_add_title"
                               style="
@@ -816,6 +866,12 @@
                           }"
                           v-if="worksDetail[sIndex].xztkInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             class="a_add_title"
                             style="
@@ -932,6 +988,12 @@
                           v-if="worksDetail[sIndex].lccjInfo.length > 0"
                         >
                           <div class="sentenBox">
+                            <div
+                              v-if="worksDetail[sIndex].img.score"
+                              style="float: right"
+                            >
+                              评分:{{ worksDetail[sIndex].img.score }}
+                            </div>
                             <div
                               class="a_add_title"
                               style="
@@ -946,7 +1008,7 @@
                             </div>
                             <div
                               v-for="(st, stIndex) in worksDetail[sIndex]
-                                .lccjInfo"
+                                .lccjInfo.lccjInfo"
                               :key="stIndex"
                               style="padding-bottom: 20px"
                             >
@@ -1064,6 +1126,12 @@
                           }"
                           v-if="worksDetail[sIndex].bgInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             class="a_add_title"
                             style="
@@ -1080,7 +1148,7 @@
                           <el-form>
                             <div
                               class="cont"
-                              v-html="worksDetail[sIndex].bgInfo[0].text"
+                              v-html="worksDetail[sIndex].bgInfo[0].bgInfo.text"
                             ></div>
                           </el-form>
                         </div>
@@ -1093,6 +1161,12 @@
                           }"
                           v-if="worksDetail[sIndex].cocopiInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             class="a_add_title"
                             style="
@@ -1164,6 +1238,12 @@
                           }"
                           v-if="worksDetail[sIndex].wordInfo.length > 0"
                         >
+                          <div
+                            v-if="worksDetail[sIndex].img.score"
+                            style="float: right"
+                          >
+                            评分:{{ worksDetail[sIndex].img.score }}
+                          </div>
                           <div
                             class="a_add_title"
                             style="
@@ -1180,7 +1260,9 @@
                           <el-form>
                             <div
                               class="cont"
-                              v-html="worksDetail[sIndex].wordInfo[0].text"
+                              v-html="
+                                worksDetail[sIndex].wordInfo[0].wordInfo.text
+                              "
                             ></div>
                           </el-form>
                         </div>
@@ -1799,8 +1881,6 @@ export default {
       let params = {
         uid: uid,
         cid: this.id,
-        stage: stage,
-        task: task,
       };
       this.ajax
         .get(this.$store.state.api + "selectAllWorksDetail", params)
@@ -1900,7 +1980,11 @@ export default {
                 res.data[0][k].stage == worksDetail[i].stage &&
                 res.data[0][k].task == worksDetail[i].task
               ) {
-                workJson[k].img.push({ src: worksDetail[i].content, id: i });
+                workJson[k].img.push({
+                  src: worksDetail[i].content,
+                  id: i,
+                  score: worksDetail[i].score,
+                });
               }
             }
             for (var i = 0; i < askInfo.length; i++) {
@@ -1913,13 +1997,16 @@ export default {
                 let e = [];
                 for (var y = 0; y < a.askJson.length; y++) {
                   if (a.askJson[y].type == "2") {
-                    e.push(JSON.parse(chooseInfo[i].content)[0].anwer[y]);
+                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
                   } else {
-                    e.push(JSON.parse(chooseInfo[i].content)[0].anwer[y]);
+                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
                   }
                 }
                 a.radio = e;
-                workJson[k].askInfo.push(a);
+                workJson[k].askInfo.push({
+                  askInfo: a,
+                  score: askInfo[i].score,
+                });
                 this.checkJson[k].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < a.radio.length; p++) {
@@ -1938,7 +2025,7 @@ export default {
                   }
                   if (a.radio[p] instanceof Array) {
                     if (
-                      workJson[k].askInfo[0].askJson[p].answer
+                      workJson[k].askInfo[0].askInfo.askJson[p].answer
                         .sort()
                         .join(",") == a.radio[p].sort().join(",")
                     ) {
@@ -1966,7 +2053,8 @@ export default {
                     }
                   } else {
                     if (
-                      workJson[k].askInfo[0].askJson[p].answer == a.radio[p]
+                      workJson[k].askInfo[0].askInfo.askJson[p].answer ==
+                      a.radio[p]
                     ) {
                       this.checkJson[k][p].right = 100;
                       isCount += this.checkJson[k][p].right;
@@ -2011,7 +2099,10 @@ export default {
                   }
                 }
                 t.radio = e;
-                workJson[k].chooseInfo.push(t);
+                workJson[k].chooseInfo.push({
+                  chooseInfo: t,
+                  score: chooseInfo[i].score,
+                });
                 this.checkJson[k].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < t.radio.length; p++) {
@@ -2030,7 +2121,7 @@ export default {
                   }
                   if (t.radio[p] instanceof Array) {
                     if (
-                      workJson[k].chooseInfo[0].testJson[p].answer
+                      workJson[k].chooseInfo[0].chooseInfo.testJson[p].answer
                         .sort()
                         .join(",") == t.radio[p].sort().join(",")
                     ) {
@@ -2058,7 +2149,8 @@ export default {
                     }
                   } else {
                     if (
-                      workJson[k].chooseInfo[0].testJson[p].answer == t.radio[p]
+                      workJson[k].chooseInfo[0].chooseInfo.testJson[p].answer ==
+                      t.radio[p]
                     ) {
                       this.checkJson[k][p].right = 100;
                       isCount += this.checkJson[k][p].right;
@@ -2105,7 +2197,10 @@ export default {
                   var a =
                     "https://view.officeapps.live.com/op/view.aspx?src=" +
                     pptInfo[i].content;
-                  workJson[k].wpptInfo.push(a);
+                  workJson[k].wpptInfo.push({
+                    wpptInfo: a,
+                    score: pptInfo[i].score,
+                  });
                   this.showPDF = false;
                 } else if (
                   pptInfo[i].content
@@ -2114,7 +2209,10 @@ export default {
                       pptInfo[i].content.split(".").length - 1
                     ].toLocaleUpperCase() == "PDF"
                 ) {
-                  workJson[k].wpptInfo.push(pptInfo[i].content);
+                  workJson[k].wpptInfo.push({
+                    wpptInfo: pptInfo[i].content,
+                    score: pptInfo[i].score,
+                  });
                   this.showPDF = true;
                 }
               }
@@ -2126,7 +2224,10 @@ export default {
                 res.data[0][k].task == answerInfo[i].task
               ) {
                 const element = answerInfo[i];
-                workJson[k].answerInfo.push(JSON.parse(element.content)[0]);
+                workJson[k].answerInfo.push({
+                  answerInfo: JSON.parse(element.content)[0],
+                  score: answerInfo[i].score,
+                });
               }
             }
             for (var i = 0; i < pjInfo.length; i++) {
@@ -2148,6 +2249,7 @@ export default {
                 workJson[k].pjInfo.push({
                   answer: JSON.parse(pj.content),
                   rateJson: rateJson,
+                  score: pjInfo[i].score,
                 });
               }
             }
@@ -2172,6 +2274,7 @@ export default {
                   workJson[k].xztkInfo.push({
                     answer: xztk.content.split(",").map(Number),
                     selectJson: selectJson,
+                    score: xztkInfo[i].score,
                   });
                 }
               }
@@ -2183,7 +2286,11 @@ export default {
                 res.data[0][k].task == lccjInfo[i].task
               ) {
                 var lccj = lccjInfo[i];
-                workJson[k].lccjInfo.push(JSON.parse(lccj.content)[0]);
+                workJson[k].lccjInfo.push({
+                  lccjInfo: JSON.parse(lccj.content)[0],
+                  score: lccjInfo[i].score,
+                });
+                workJson[k].lccjInfo[i].score = lccjInfo[i].score;
               }
             }
 
@@ -2193,7 +2300,10 @@ export default {
                 res.data[0][k].task == bgInfo[i].task
               ) {
                 var bg = bgInfo[i];
-                workJson[k].bgInfo.push(JSON.parse(bg.content));
+                workJson[k].bgInfo.push({
+                  bgInfo: JSON.parse(bg.content),
+                  score: bgInfo[i].score,
+                });
               }
             }
 
@@ -2227,7 +2337,11 @@ export default {
                   ) != -1
                 ) {
                   t = 1;
-                  workJson[k].cocopiInfo.push({ url: cocopi.content, type: t });
+                  workJson[k].cocopiInfo.push({
+                    url: cocopi.content,
+                    type: t,
+                    score: cocopiInfo[i].score,
+                  });
                 } else if (
                   c.indexOf(
                     cocopi.content
@@ -2242,10 +2356,15 @@ export default {
                   workJson[k].cocopiInfo.push({
                     url: a,
                     type: t,
+                    score: cocopiInfo[i].score,
                   });
                 } else {
                   t = 3;
-                  workJson[k].cocopiInfo.push({ url: cocopi.content, type: t });
+                  workJson[k].cocopiInfo.push({
+                    url: cocopi.content,
+                    type: t,
+                    score: cocopiInfo[i].score,
+                  });
                 }
               }
             }
@@ -2256,7 +2375,10 @@ export default {
                 res.data[0][k].task == wordInfo[i].task
               ) {
                 var word = wordInfo[i];
-                workJson[k].wordInfo.push(JSON.parse(word.content));
+                workJson[k].wordInfo.push({
+                  wordInfo: JSON.parse(word.content),
+                  score: wordInfo[i].score,
+                });
               }
             }
           }
@@ -2267,16 +2389,69 @@ export default {
             );
           });
           for (var l = 0; l < b.length; l++) {
-            for (var p = 0; p < workEvaList.length; p++) {
-              if (
-                b[l].stage == workEvaList[p].stage &&
-                b[l].task == workEvaList[p].task
-              ) {
-                var eListOld =
-                  chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
-                    .eList;
+            if (workEvaList.length > 0) {
+              for (var p = 0; p < workEvaList.length; p++) {
+                if (
+                  b[l].stage == workEvaList[p].stage &&
+                  b[l].task == workEvaList[p].task
+                ) {
+                  var eListOld =
+                    chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
+                      .eList;
+                  var eListNew = Object.keys(eListOld).map(function (key) {
+                    return {
+                      detail: eListOld[key].detail,
+                      score: eListOld[key].score,
+                      value: eListOld[key].value,
+                    };
+                  });
+                  eList = eListNew;
+                  if (eList && eList.length) {
+                    _ooption = [];
+                    result[l].eList = eList;
+                    for (var i = 0; i < eList.length; i++) {
+                      _ooption.push({ value: 0, name: eList[i].value });
+                      result[l].rateList[eList[i].value] = 0;
+                    }
+                    result[l].rateList.content = "";
+                    this.ooption[l] = _ooption;
+                  }
+                  if (workEvaList[p].rate && eList && eList.length) {
+                    _rate[l] = JSON.parse(workEvaList[p].rate);
+                    _rateList[l] = Object.keys(JSON.parse(workEvaList[p].rate));
+                    for (var i = 0; i < _rateList[l].length; i++) {
+                      var _c = Object.keys(result[l].rateList);
+                      if (_c.indexOf(_rateList[l][i]) != -1) {
+                        result[l].rateList[_rateList[l][i]] =
+                          _rate[l][_rateList[l][i]];
+                      }
+                    }
+                    for (var i = 0; i < this.ooption[l].length; i++) {
+                      if (_rateList[l].indexOf(this.ooption[l][i].name) != -1) {
+                        this.ooption[l][i].value =
+                          _rate[l][this.ooption[l][i].name];
+                      }
+                    }
+                  } else {
+                    _rate[l] = [];
+                    _rateList[l] = [];
+                  }
+                } else {
+                  _rate[l] = [];
+                  _rateList[l] = [];
+                }
+              }
+            } else {
+              var eListOld =
+                chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
+                  .eList;
+              if (eListOld && eListOld.length) {
                 var eListNew = Object.keys(eListOld).map(function (key) {
-                  return { detail: eListOld[key].detail, score: eListOld[key].score, value: eListOld[key].value };
+                  return {
+                    detail: eListOld[key].detail,
+                    score: eListOld[key].score,
+                    value: eListOld[key].value,
+                  };
                 });
                 eList = eListNew;
                 if (eList && eList.length) {
@@ -2289,9 +2464,9 @@ export default {
                   result[l].rateList.content = "";
                   this.ooption[l] = _ooption;
                 }
-                if (workEvaList[p].rate && eList && eList.length) {
-                  _rate[l] = JSON.parse(workEvaList[p].rate);
-                  _rateList[l] = Object.keys(JSON.parse(workEvaList[p].rate));
+                if (b[l].rate && eList && eList.length) {
+                  _rate[l] = JSON.parse(b[l].rate);
+                  _rateList[l] = Object.keys(JSON.parse(b[l].rate));
                   for (var i = 0; i < _rateList[l].length; i++) {
                     var _c = Object.keys(result[l].rateList);
                     if (_c.indexOf(_rateList[l][i]) != -1) {
@@ -2309,9 +2484,6 @@ export default {
                   _rate[l] = [];
                   _rateList[l] = [];
                 }
-              } else {
-                _rate[l] = [];
-                _rateList[l] = [];
               }
             }
           }

+ 257 - 78
src/components/pages/components/worksDetail3.vue

@@ -126,6 +126,12 @@
                     }"
                     v-if="worksDetail[sIndex].img.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="bigImg"
                       v-if="
@@ -178,16 +184,27 @@
                     }"
                     v-if="worksDetail[sIndex].answerInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div class="answerbox">
                       <div style="min-width: 80px">问答标题</div>
                       <div>
-                        {{ worksDetail[sIndex].answerInfo[0].answerTitle }}
+                        {{
+                          worksDetail[sIndex].answerInfo[0].answerInfo
+                            .answerTitle
+                        }}
                       </div>
                     </div>
                     <div class="answerbox1">
                       <div>学生回答</div>
                       <div>
-                        {{ worksDetail[sIndex].answerInfo[0].answer }}
+                        {{
+                          worksDetail[sIndex].answerInfo[0].answerInfo.answer
+                        }}
                       </div>
                     </div>
                   </div>
@@ -199,6 +216,12 @@
                     v-if="worksDetail[sIndex].askInfo.length > 0"
                   >
                     <div>
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -223,7 +246,10 @@
                       >
                         <div style="margin-right: 20px">标题:</div>
                         <div style="font-size: 20px">
-                          {{ worksDetail[sIndex].askInfo[0].askJson.askTitle }}
+                          {{
+                            worksDetail[sIndex].askInfo[0].askInfo.askJson
+                              .askTitle
+                          }}
                         </div>
                       </div>
                       <div class="a_addBox">
@@ -231,7 +257,7 @@
                         <div
                           class="a_add_box"
                           v-for="(item1, index1) in worksDetail[sIndex]
-                            .askInfo[0].askJson.askCount"
+                            .askInfo[0].askInfo.askJson.askCount"
                           :key="index1"
                         >
                           <div class="a_add_head">
@@ -239,7 +265,7 @@
                               {{ index1 + 1 + "、" }}
                               <div>
                                 题目:{{
-                                  worksDetail[sIndex].askInfo[0].askJson
+                                  worksDetail[sIndex].askInfo[0].askInfo.askJson
                                     .askJson[index1].askstitle
                                 }}
                               </div>
@@ -249,19 +275,21 @@
                             <div class="a_add_input">
                               <el-radio-group
                                 v-if="
-                                  worksDetail[sIndex].askInfo[0].askJson
+                                  worksDetail[sIndex].askInfo[0].askInfo.askJson
                                     .askJson[index1].type == '1' ||
-                                  !worksDetail[sIndex].askInfo[0].askJson
-                                    .askJson[index1].type
+                                  !worksDetail[sIndex].askInfo[0].askInfo
+                                    .askJson.askJson[index1].type
                                 "
                                 v-model="
-                                  worksDetail[sIndex].askInfo[0].anwer[index1]
+                                  worksDetail[sIndex].askInfo[0].askInfo.anwer[
+                                    index1
+                                  ]
                                 "
                               >
                                 <el-radio
                                   v-for="(item2, checkIndex) in worksDetail[
                                     sIndex
-                                  ].askInfo[0].askJson.askJson[index1]
+                                  ].askInfo[0].askInfo.askJson.askJson[index1]
                                     .checkList"
                                   :key="checkIndex"
                                   :label="checkIndex"
@@ -272,17 +300,19 @@
                               </el-radio-group>
                               <el-checkbox-group
                                 v-model="
-                                  worksDetail[sIndex].askInfo[0].anwer[index1]
+                                  worksDetail[sIndex].askInfo[0].askInfo.anwer[
+                                    index1
+                                  ]
                                 "
                                 v-if="
-                                  worksDetail[sIndex].askInfo[0].askJson
+                                  worksDetail[sIndex].askInfo[0].askInfo.askJson
                                     .askJson[index1].type == '2'
                                 "
                               >
                                 <el-checkbox
                                   v-for="(item2, checkIndex1) in worksDetail[
                                     sIndex
-                                  ].askInfo[0].askJson.askJson[index1]
+                                  ].askInfo[0].askInfo.askJson.askJson[index1]
                                     .checkList"
                                   :key="checkIndex1"
                                   :label="checkIndex1"
@@ -305,6 +335,12 @@
                     v-if="worksDetail[sIndex].chooseInfo.length > 0"
                   >
                     <div>
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -324,7 +360,7 @@
                         <div
                           class="a_add_box"
                           v-for="(item1, index1) in worksDetail[sIndex]
-                            .chooseInfo[0].testCount"
+                            .chooseInfo[0].chooseInfo.testCount"
                           :key="index1"
                         >
                           <div class="a_add_head">
@@ -332,22 +368,19 @@
                               {{ index1 + 1 + "、" }}
                               <div>
                                 题目:{{
-                                  worksDetail[sIndex].chooseInfo[0].testJson[
-                                    index1
-                                  ].teststitle
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .testJson[index1].teststitle
                                 }}
                               </div>
                             </div>
                             <img
                               v-if="
-                                worksDetail[sIndex].chooseInfo[0].testJson[
-                                  index1
-                                ].img
+                                worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                  .testJson[index1].img
                               "
                               :src="
-                                worksDetail[sIndex].chooseInfo[0].testJson[
-                                  index1
-                                ].img
+                                worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                  .testJson[index1].img
                               "
                               style="
                                 height: 300px;
@@ -360,21 +393,20 @@
                             <div class="a_add_input">
                               <el-radio-group
                                 v-model="
-                                  worksDetail[sIndex].chooseInfo[0].radio[
-                                    index1
-                                  ]
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .radio[index1]
                                 "
                                 v-if="
-                                  worksDetail[sIndex].chooseInfo[0].testJson[
-                                    index1
-                                  ].type == '1'
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .testJson[index1].type == '1'
                                 "
                               >
                                 <div class="radioBox">
                                   <el-radio
                                     v-for="(item2, checkIndex) in worksDetail[
                                       sIndex
-                                    ].chooseInfo[0].testJson[index1].checkList"
+                                    ].chooseInfo[0].chooseInfo.testJson[index1]
+                                      .checkList"
                                     :key="checkIndex"
                                     :label="checkIndex"
                                     disabled
@@ -401,21 +433,20 @@
                               </el-radio-group>
                               <el-checkbox-group
                                 v-model="
-                                  worksDetail[sIndex].chooseInfo[0].radio[
-                                    index1
-                                  ]
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .radio[index1]
                                 "
                                 v-if="
-                                  worksDetail[sIndex].chooseInfo[0].testJson[
-                                    index1
-                                  ].type == '2'
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .testJson[index1].type == '2'
                                 "
                               >
                                 <div class="radioBox">
                                   <el-checkbox
                                     v-for="(item2, checkIndex) in worksDetail[
                                       sIndex
-                                    ].chooseInfo[0].testJson[index1].checkList"
+                                    ].chooseInfo[0].chooseInfo.testJson[index1]
+                                      .checkList"
                                     :key="checkIndex"
                                     :label="checkIndex"
                                     disabled
@@ -453,12 +484,22 @@
                     }"
                     v-if="worksDetail[sIndex].wpptInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       style="height: 238px"
-                      @click="openFile(worksDetail[sIndex].wpptInfo[0])"
+                      @click="
+                        openFile(worksDetail[sIndex].wpptInfo[0].wpptInfo)
+                      "
                     >
                       <div
-                        @click="openFile(worksDetail[sIndex].wpptInfo[0])"
+                        @click="
+                          openFile(worksDetail[sIndex].wpptInfo[0].wpptInfo)
+                        "
                         style="
                           width: 300px;
                           height: 300px;
@@ -468,12 +509,12 @@
                       ></div>
                       <pdf
                         v-if="showPDF"
-                        :pdfUrl="worksDetail[sIndex].wpptInfo[0]"
+                        :pdfUrl="worksDetail[sIndex].wpptInfo[0].wpptInfo"
                         style="width: 100%; height: 520px; overflow: auto"
                       ></pdf>
                       <iframe
                         v-else
-                        :src="worksDetail[sIndex].wpptInfo[0]"
+                        :src="worksDetail[sIndex].wpptInfo[0].wpptInfo"
                         frameborder="0"
                         width="100%"
                         height="100%"
@@ -488,6 +529,12 @@
                     v-if="worksDetail[sIndex].pjInfo.length > 0"
                   >
                     <div style="width: 100%">
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -554,6 +601,12 @@
                     }"
                     v-if="worksDetail[sIndex].xztkInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -664,6 +717,12 @@
                     v-if="worksDetail[sIndex].lccjInfo.length > 0"
                   >
                     <div class="sentenBox">
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -677,7 +736,8 @@
                         <div style="font-size: 16px">连词成句工具</div>
                       </div>
                       <div
-                        v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo"
+                        v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo
+                          .lccjInfo"
                         :key="stIndex"
                         style="padding-bottom: 20px"
                       >
@@ -788,6 +848,12 @@
                     }"
                     v-if="worksDetail[sIndex].bgInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -804,7 +870,7 @@
                     <el-form>
                       <div
                         class="cont"
-                        v-html="worksDetail[sIndex].bgInfo[0].text"
+                        v-html="worksDetail[sIndex].bgInfo[0].bgInfo.text"
                       ></div>
                     </el-form>
                   </div>
@@ -815,6 +881,12 @@
                     }"
                     v-if="worksDetail[sIndex].cocopiInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -854,12 +926,20 @@
                       </div>
                       <div v-if="c.type == 2">
                         <div class="workImg">
-                          <img :src="word2" alt />
+                          <img
+                            :src="word2"
+                            @click="openFile(c.url, c.type)"
+                            alt
+                          />
                         </div>
                       </div>
                       <div v-if="c.type == 3">
                         <div class="workImg">
-                          <img :src="word2" alt />
+                          <img
+                            :src="word2"
+                            @click="openFile(c.url, c.type)"
+                            alt
+                          />
                         </div>
                       </div>
                     </div>
@@ -871,6 +951,12 @@
                     }"
                     v-if="worksDetail[sIndex].wordInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -887,7 +973,7 @@
                     <el-form>
                       <div
                         class="cont"
-                        v-html="worksDetail[sIndex].wordInfo[0].text"
+                        v-html="worksDetail[sIndex].wordInfo[0].wordInfo.text"
                       ></div>
                     </el-form>
                   </div>
@@ -1441,6 +1527,7 @@ export default {
           var wordInfo = res.data[12]; //文档作业
           var workEvaList = res.data[13];
           var workJson = [];
+
           for (var k = 0; k < res.data[0].length; k++) {
             this.allWorks = res.data[0][k];
             if (this.chapInfo.length == 0) {
@@ -1504,7 +1591,11 @@ export default {
                 res.data[0][k].stage == worksDetail[i].stage &&
                 res.data[0][k].task == worksDetail[i].task
               ) {
-                workJson[k].img.push({ src: worksDetail[i].content, id: i });
+                workJson[k].img.push({
+                  src: worksDetail[i].content,
+                  id: i,
+                  score: worksDetail[i].score,
+                });
               }
             }
             for (var i = 0; i < askInfo.length; i++) {
@@ -1517,13 +1608,16 @@ export default {
                 let e = [];
                 for (var y = 0; y < a.askJson.length; y++) {
                   if (a.askJson[y].type == "2") {
-                    e.push(JSON.parse(chooseInfo[i].content)[0].anwer[y]);
+                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
                   } else {
-                    e.push(JSON.parse(chooseInfo[i].content)[0].anwer[y]);
+                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
                   }
                 }
                 a.radio = e;
-                workJson[k].askInfo.push(a);
+                workJson[k].askInfo.push({
+                  askInfo: a,
+                  score: askInfo[i].score,
+                });
                 this.checkJson[k].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < a.radio.length; p++) {
@@ -1542,7 +1636,7 @@ export default {
                   }
                   if (a.radio[p] instanceof Array) {
                     if (
-                      workJson[k].askInfo[0].askJson[p].answer
+                      workJson[k].askInfo[0].askInfo.askJson[p].answer
                         .sort()
                         .join(",") == a.radio[p].sort().join(",")
                     ) {
@@ -1570,7 +1664,8 @@ export default {
                     }
                   } else {
                     if (
-                      workJson[k].askInfo[0].askJson[p].answer == a.radio[p]
+                      workJson[k].askInfo[0].askInfo.askJson[p].answer ==
+                      a.radio[p]
                     ) {
                       this.checkJson[k][p].right = 100;
                       isCount += this.checkJson[k][p].right;
@@ -1615,7 +1710,10 @@ export default {
                   }
                 }
                 t.radio = e;
-                workJson[k].chooseInfo.push(t);
+                workJson[k].chooseInfo.push({
+                  chooseInfo: t,
+                  score: chooseInfo[i].score,
+                });
                 this.checkJson[k].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < t.radio.length; p++) {
@@ -1634,7 +1732,7 @@ export default {
                   }
                   if (t.radio[p] instanceof Array) {
                     if (
-                      workJson[k].chooseInfo[0].testJson[p].answer
+                      workJson[k].chooseInfo[0].chooseInfo.testJson[p].answer
                         .sort()
                         .join(",") == t.radio[p].sort().join(",")
                     ) {
@@ -1662,7 +1760,8 @@ export default {
                     }
                   } else {
                     if (
-                      workJson[k].chooseInfo[0].testJson[p].answer == t.radio[p]
+                      workJson[k].chooseInfo[0].chooseInfo.testJson[p].answer ==
+                      t.radio[p]
                     ) {
                       this.checkJson[k][p].right = 100;
                       isCount += this.checkJson[k][p].right;
@@ -1709,7 +1808,10 @@ export default {
                   var a =
                     "https://view.officeapps.live.com/op/view.aspx?src=" +
                     pptInfo[i].content;
-                  workJson[k].wpptInfo.push(a);
+                  workJson[k].wpptInfo.push({
+                    wpptInfo: a,
+                    score: pptInfo[i].score,
+                  });
                   this.showPDF = false;
                 } else if (
                   pptInfo[i].content
@@ -1718,7 +1820,10 @@ export default {
                       pptInfo[i].content.split(".").length - 1
                     ].toLocaleUpperCase() == "PDF"
                 ) {
-                  workJson[k].wpptInfo.push(pptInfo[i].content);
+                  workJson[k].wpptInfo.push({
+                    wpptInfo: pptInfo[i].content,
+                    score: pptInfo[i].score,
+                  });
                   this.showPDF = true;
                 }
               }
@@ -1730,7 +1835,10 @@ export default {
                 res.data[0][k].task == answerInfo[i].task
               ) {
                 const element = answerInfo[i];
-                workJson[k].answerInfo.push(JSON.parse(element.content)[0]);
+                workJson[k].answerInfo.push({
+                  answerInfo: JSON.parse(element.content)[0],
+                  score: answerInfo[i].score,
+                });
               }
             }
             for (var i = 0; i < pjInfo.length; i++) {
@@ -1752,6 +1860,7 @@ export default {
                 workJson[k].pjInfo.push({
                   answer: JSON.parse(pj.content),
                   rateJson: rateJson,
+                  score: pjInfo[i].score,
                 });
               }
             }
@@ -1776,6 +1885,7 @@ export default {
                   workJson[k].xztkInfo.push({
                     answer: xztk.content.split(",").map(Number),
                     selectJson: selectJson,
+                    score: xztkInfo[i].score,
                   });
                 }
               }
@@ -1787,7 +1897,11 @@ export default {
                 res.data[0][k].task == lccjInfo[i].task
               ) {
                 var lccj = lccjInfo[i];
-                workJson[k].lccjInfo.push(JSON.parse(lccj.content)[0]);
+                workJson[k].lccjInfo.push({
+                  lccjInfo: JSON.parse(lccj.content)[0],
+                  score: lccjInfo[i].score,
+                });
+                workJson[k].lccjInfo[i].score = lccjInfo[i].score;
               }
             }
 
@@ -1797,7 +1911,10 @@ export default {
                 res.data[0][k].task == bgInfo[i].task
               ) {
                 var bg = bgInfo[i];
-                workJson[k].bgInfo.push(JSON.parse(bg.content));
+                workJson[k].bgInfo.push({
+                  bgInfo: JSON.parse(bg.content),
+                  score: bgInfo[i].score,
+                });
               }
             }
 
@@ -1831,7 +1948,11 @@ export default {
                   ) != -1
                 ) {
                   t = 1;
-                  workJson[k].cocopiInfo.push({ url: cocopi.content, type: t });
+                  workJson[k].cocopiInfo.push({
+                    url: cocopi.content,
+                    type: t,
+                    score: cocopiInfo[i].score,
+                  });
                 } else if (
                   c.indexOf(
                     cocopi.content
@@ -1846,10 +1967,15 @@ export default {
                   workJson[k].cocopiInfo.push({
                     url: a,
                     type: t,
+                    score: cocopiInfo[i].score,
                   });
                 } else {
                   t = 3;
-                  workJson[k].cocopiInfo.push({ url: cocopi.content, type: t });
+                  workJson[k].cocopiInfo.push({
+                    url: cocopi.content,
+                    type: t,
+                    score: cocopiInfo[i].score,
+                  });
                 }
               }
             }
@@ -1860,7 +1986,10 @@ export default {
                 res.data[0][k].task == wordInfo[i].task
               ) {
                 var word = wordInfo[i];
-                workJson[k].wordInfo.push(JSON.parse(word.content));
+                workJson[k].wordInfo.push({
+                  wordInfo: JSON.parse(word.content),
+                  score: wordInfo[i].score,
+                });
               }
             }
           }
@@ -1871,16 +2000,69 @@ export default {
             );
           });
           for (var l = 0; l < b.length; l++) {
-            for (var p = 0; p < workEvaList.length; p++) {
-              if (
-                b[l].stage == workEvaList[p].stage &&
-                b[l].task == workEvaList[p].task
-              ) {
-                var eListOld =
-                  chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
-                    .eList;
+            if (workEvaList.length > 0) {
+              for (var p = 0; p < workEvaList.length; p++) {
+                if (
+                  b[l].stage == workEvaList[p].stage &&
+                  b[l].task == workEvaList[p].task
+                ) {
+                  var eListOld =
+                    chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
+                      .eList;
+                  var eListNew = Object.keys(eListOld).map(function (key) {
+                    return {
+                      detail: eListOld[key].detail,
+                      score: eListOld[key].score,
+                      value: eListOld[key].value,
+                    };
+                  });
+                  eList = eListNew;
+                  if (eList && eList.length) {
+                    _ooption = [];
+                    result[l].eList = eList;
+                    for (var i = 0; i < eList.length; i++) {
+                      _ooption.push({ value: 0, name: eList[i].value });
+                      result[l].rateList[eList[i].value] = 0;
+                    }
+                    result[l].rateList.content = "";
+                    this.ooption[l] = _ooption;
+                  }
+                  if (workEvaList[p].rate && eList && eList.length) {
+                    _rate[l] = JSON.parse(workEvaList[p].rate);
+                    _rateList[l] = Object.keys(JSON.parse(workEvaList[p].rate));
+                    for (var i = 0; i < _rateList[l].length; i++) {
+                      var _c = Object.keys(result[l].rateList);
+                      if (_c.indexOf(_rateList[l][i]) != -1) {
+                        result[l].rateList[_rateList[l][i]] =
+                          _rate[l][_rateList[l][i]];
+                      }
+                    }
+                    for (var i = 0; i < this.ooption[l].length; i++) {
+                      if (_rateList[l].indexOf(this.ooption[l][i].name) != -1) {
+                        this.ooption[l][i].value =
+                          _rate[l][this.ooption[l][i].name];
+                      }
+                    }
+                  } else {
+                    _rate[l] = [];
+                    _rateList[l] = [];
+                  }
+                } else {
+                  _rate[l] = [];
+                  _rateList[l] = [];
+                }
+              }
+            } else {
+              var eListOld =
+                chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
+                  .eList;
+              if (eListOld && eListOld.length) {
                 var eListNew = Object.keys(eListOld).map(function (key) {
-                  return { detail: eListOld[key].detail, score: eListOld[key].score, value: eListOld[key].value };
+                  return {
+                    detail: eListOld[key].detail,
+                    score: eListOld[key].score,
+                    value: eListOld[key].value,
+                  };
                 });
                 eList = eListNew;
                 if (eList && eList.length) {
@@ -1893,9 +2075,9 @@ export default {
                   result[l].rateList.content = "";
                   this.ooption[l] = _ooption;
                 }
-                if (workEvaList[p].rate && eList && eList.length) {
-                  _rate[l] = JSON.parse(workEvaList[p].rate);
-                  _rateList[l] = Object.keys(JSON.parse(workEvaList[p].rate));
+                if (b[l].rate && eList && eList.length) {
+                  _rate[l] = JSON.parse(b[l].rate);
+                  _rateList[l] = Object.keys(JSON.parse(b[l].rate));
                   for (var i = 0; i < _rateList[l].length; i++) {
                     var _c = Object.keys(result[l].rateList);
                     if (_c.indexOf(_rateList[l][i]) != -1) {
@@ -1913,9 +2095,6 @@ export default {
                   _rate[l] = [];
                   _rateList[l] = [];
                 }
-              } else {
-                _rate[l] = [];
-                _rateList[l] = [];
               }
             }
           }

+ 257 - 78
src/components/pages/myReport/components/MyLookComponent/worksDetail3.vue

@@ -126,6 +126,12 @@
                     }"
                     v-if="worksDetail[sIndex].img.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="bigImg"
                       v-if="
@@ -178,16 +184,27 @@
                     }"
                     v-if="worksDetail[sIndex].answerInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div class="answerbox">
                       <div style="min-width: 80px">问答标题</div>
                       <div>
-                        {{ worksDetail[sIndex].answerInfo[0].answerTitle }}
+                        {{
+                          worksDetail[sIndex].answerInfo[0].answerInfo
+                            .answerTitle
+                        }}
                       </div>
                     </div>
                     <div class="answerbox1">
                       <div>学生回答</div>
                       <div>
-                        {{ worksDetail[sIndex].answerInfo[0].answer }}
+                        {{
+                          worksDetail[sIndex].answerInfo[0].answerInfo.answer
+                        }}
                       </div>
                     </div>
                   </div>
@@ -199,6 +216,12 @@
                     v-if="worksDetail[sIndex].askInfo.length > 0"
                   >
                     <div>
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -223,7 +246,10 @@
                       >
                         <div style="margin-right: 20px">标题:</div>
                         <div style="font-size: 20px">
-                          {{ worksDetail[sIndex].askInfo[0].askJson.askTitle }}
+                          {{
+                            worksDetail[sIndex].askInfo[0].askInfo.askJson
+                              .askTitle
+                          }}
                         </div>
                       </div>
                       <div class="a_addBox">
@@ -231,7 +257,7 @@
                         <div
                           class="a_add_box"
                           v-for="(item1, index1) in worksDetail[sIndex]
-                            .askInfo[0].askJson.askCount"
+                            .askInfo[0].askInfo.askJson.askCount"
                           :key="index1"
                         >
                           <div class="a_add_head">
@@ -239,7 +265,7 @@
                               {{ index1 + 1 + "、" }}
                               <div>
                                 题目:{{
-                                  worksDetail[sIndex].askInfo[0].askJson
+                                  worksDetail[sIndex].askInfo[0].askInfo.askJson
                                     .askJson[index1].askstitle
                                 }}
                               </div>
@@ -249,19 +275,21 @@
                             <div class="a_add_input">
                               <el-radio-group
                                 v-if="
-                                  worksDetail[sIndex].askInfo[0].askJson
+                                  worksDetail[sIndex].askInfo[0].askInfo.askJson
                                     .askJson[index1].type == '1' ||
-                                  !worksDetail[sIndex].askInfo[0].askJson
-                                    .askJson[index1].type
+                                  !worksDetail[sIndex].askInfo[0].askInfo
+                                    .askJson.askJson[index1].type
                                 "
                                 v-model="
-                                  worksDetail[sIndex].askInfo[0].anwer[index1]
+                                  worksDetail[sIndex].askInfo[0].askInfo.anwer[
+                                    index1
+                                  ]
                                 "
                               >
                                 <el-radio
                                   v-for="(item2, checkIndex) in worksDetail[
                                     sIndex
-                                  ].askInfo[0].askJson.askJson[index1]
+                                  ].askInfo[0].askInfo.askJson.askJson[index1]
                                     .checkList"
                                   :key="checkIndex"
                                   :label="checkIndex"
@@ -272,17 +300,19 @@
                               </el-radio-group>
                               <el-checkbox-group
                                 v-model="
-                                  worksDetail[sIndex].askInfo[0].anwer[index1]
+                                  worksDetail[sIndex].askInfo[0].askInfo.anwer[
+                                    index1
+                                  ]
                                 "
                                 v-if="
-                                  worksDetail[sIndex].askInfo[0].askJson
+                                  worksDetail[sIndex].askInfo[0].askInfo.askJson
                                     .askJson[index1].type == '2'
                                 "
                               >
                                 <el-checkbox
                                   v-for="(item2, checkIndex1) in worksDetail[
                                     sIndex
-                                  ].askInfo[0].askJson.askJson[index1]
+                                  ].askInfo[0].askInfo.askJson.askJson[index1]
                                     .checkList"
                                   :key="checkIndex1"
                                   :label="checkIndex1"
@@ -305,6 +335,12 @@
                     v-if="worksDetail[sIndex].chooseInfo.length > 0"
                   >
                     <div>
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -324,7 +360,7 @@
                         <div
                           class="a_add_box"
                           v-for="(item1, index1) in worksDetail[sIndex]
-                            .chooseInfo[0].testCount"
+                            .chooseInfo[0].chooseInfo.testCount"
                           :key="index1"
                         >
                           <div class="a_add_head">
@@ -332,22 +368,19 @@
                               {{ index1 + 1 + "、" }}
                               <div>
                                 题目:{{
-                                  worksDetail[sIndex].chooseInfo[0].testJson[
-                                    index1
-                                  ].teststitle
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .testJson[index1].teststitle
                                 }}
                               </div>
                             </div>
                             <img
                               v-if="
-                                worksDetail[sIndex].chooseInfo[0].testJson[
-                                  index1
-                                ].img
+                                worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                  .testJson[index1].img
                               "
                               :src="
-                                worksDetail[sIndex].chooseInfo[0].testJson[
-                                  index1
-                                ].img
+                                worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                  .testJson[index1].img
                               "
                               style="
                                 height: 300px;
@@ -360,21 +393,20 @@
                             <div class="a_add_input">
                               <el-radio-group
                                 v-model="
-                                  worksDetail[sIndex].chooseInfo[0].radio[
-                                    index1
-                                  ]
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .radio[index1]
                                 "
                                 v-if="
-                                  worksDetail[sIndex].chooseInfo[0].testJson[
-                                    index1
-                                  ].type == '1'
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .testJson[index1].type == '1'
                                 "
                               >
                                 <div class="radioBox">
                                   <el-radio
                                     v-for="(item2, checkIndex) in worksDetail[
                                       sIndex
-                                    ].chooseInfo[0].testJson[index1].checkList"
+                                    ].chooseInfo[0].chooseInfo.testJson[index1]
+                                      .checkList"
                                     :key="checkIndex"
                                     :label="checkIndex"
                                     disabled
@@ -401,21 +433,20 @@
                               </el-radio-group>
                               <el-checkbox-group
                                 v-model="
-                                  worksDetail[sIndex].chooseInfo[0].radio[
-                                    index1
-                                  ]
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .radio[index1]
                                 "
                                 v-if="
-                                  worksDetail[sIndex].chooseInfo[0].testJson[
-                                    index1
-                                  ].type == '2'
+                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
+                                    .testJson[index1].type == '2'
                                 "
                               >
                                 <div class="radioBox">
                                   <el-checkbox
                                     v-for="(item2, checkIndex) in worksDetail[
                                       sIndex
-                                    ].chooseInfo[0].testJson[index1].checkList"
+                                    ].chooseInfo[0].chooseInfo.testJson[index1]
+                                      .checkList"
                                     :key="checkIndex"
                                     :label="checkIndex"
                                     disabled
@@ -453,12 +484,22 @@
                     }"
                     v-if="worksDetail[sIndex].wpptInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       style="height: 238px"
-                      @click="openFile(worksDetail[sIndex].wpptInfo[0])"
+                      @click="
+                        openFile(worksDetail[sIndex].wpptInfo[0].wpptInfo)
+                      "
                     >
                       <div
-                        @click="openFile(worksDetail[sIndex].wpptInfo[0])"
+                        @click="
+                          openFile(worksDetail[sIndex].wpptInfo[0].wpptInfo)
+                        "
                         style="
                           width: 300px;
                           height: 300px;
@@ -468,12 +509,12 @@
                       ></div>
                       <pdf
                         v-if="showPDF"
-                        :pdfUrl="worksDetail[sIndex].wpptInfo[0]"
+                        :pdfUrl="worksDetail[sIndex].wpptInfo[0].wpptInfo"
                         style="width: 100%; height: 520px; overflow: auto"
                       ></pdf>
                       <iframe
                         v-else
-                        :src="worksDetail[sIndex].wpptInfo[0]"
+                        :src="worksDetail[sIndex].wpptInfo[0].wpptInfo"
                         frameborder="0"
                         width="100%"
                         height="100%"
@@ -488,6 +529,12 @@
                     v-if="worksDetail[sIndex].pjInfo.length > 0"
                   >
                     <div style="width: 100%">
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -554,6 +601,12 @@
                     }"
                     v-if="worksDetail[sIndex].xztkInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -664,6 +717,12 @@
                     v-if="worksDetail[sIndex].lccjInfo.length > 0"
                   >
                     <div class="sentenBox">
+                      <div
+                        v-if="worksDetail[sIndex].img.score"
+                        style="float: right"
+                      >
+                        评分:{{ worksDetail[sIndex].img.score }}
+                      </div>
                       <div
                         class="a_add_title"
                         style="
@@ -677,7 +736,8 @@
                         <div style="font-size: 16px">连词成句工具</div>
                       </div>
                       <div
-                        v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo"
+                        v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo
+                          .lccjInfo"
                         :key="stIndex"
                         style="padding-bottom: 20px"
                       >
@@ -788,6 +848,12 @@
                     }"
                     v-if="worksDetail[sIndex].bgInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -804,7 +870,7 @@
                     <el-form>
                       <div
                         class="cont"
-                        v-html="worksDetail[sIndex].bgInfo[0].text"
+                        v-html="worksDetail[sIndex].bgInfo[0].bgInfo.text"
                       ></div>
                     </el-form>
                   </div>
@@ -815,6 +881,12 @@
                     }"
                     v-if="worksDetail[sIndex].cocopiInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -854,12 +926,20 @@
                       </div>
                       <div v-if="c.type == 2">
                         <div class="workImg">
-                          <img :src="word2" alt />
+                          <img
+                            :src="word2"
+                            @click="openFile(c.url, c.type)"
+                            alt
+                          />
                         </div>
                       </div>
                       <div v-if="c.type == 3">
                         <div class="workImg">
-                          <img :src="word2" alt />
+                          <img
+                            :src="word2"
+                            @click="openFile(c.url, c.type)"
+                            alt
+                          />
                         </div>
                       </div>
                     </div>
@@ -871,6 +951,12 @@
                     }"
                     v-if="worksDetail[sIndex].wordInfo.length > 0"
                   >
+                    <div
+                      v-if="worksDetail[sIndex].img.score"
+                      style="float: right"
+                    >
+                      评分:{{ worksDetail[sIndex].img.score }}
+                    </div>
                     <div
                       class="a_add_title"
                       style="
@@ -887,7 +973,7 @@
                     <el-form>
                       <div
                         class="cont"
-                        v-html="worksDetail[sIndex].wordInfo[0].text"
+                        v-html="worksDetail[sIndex].wordInfo[0].wordInfo.text"
                       ></div>
                     </el-form>
                   </div>
@@ -1440,6 +1526,7 @@ export default {
           var wordInfo = res.data[12]; //文档作业
           var workEvaList = res.data[13];
           var workJson = [];
+
           for (var k = 0; k < res.data[0].length; k++) {
             this.allWorks = res.data[0][k];
             if (this.chapInfo.length == 0) {
@@ -1503,7 +1590,11 @@ export default {
                 res.data[0][k].stage == worksDetail[i].stage &&
                 res.data[0][k].task == worksDetail[i].task
               ) {
-                workJson[k].img.push({ src: worksDetail[i].content, id: i });
+                workJson[k].img.push({
+                  src: worksDetail[i].content,
+                  id: i,
+                  score: worksDetail[i].score,
+                });
               }
             }
             for (var i = 0; i < askInfo.length; i++) {
@@ -1516,13 +1607,16 @@ export default {
                 let e = [];
                 for (var y = 0; y < a.askJson.length; y++) {
                   if (a.askJson[y].type == "2") {
-                    e.push(JSON.parse(chooseInfo[i].content)[0].anwer[y]);
+                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
                   } else {
-                    e.push(JSON.parse(chooseInfo[i].content)[0].anwer[y]);
+                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
                   }
                 }
                 a.radio = e;
-                workJson[k].askInfo.push(a);
+                workJson[k].askInfo.push({
+                  askInfo: a,
+                  score: askInfo[i].score,
+                });
                 this.checkJson[k].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < a.radio.length; p++) {
@@ -1541,7 +1635,7 @@ export default {
                   }
                   if (a.radio[p] instanceof Array) {
                     if (
-                      workJson[k].askInfo[0].askJson[p].answer
+                      workJson[k].askInfo[0].askInfo.askJson[p].answer
                         .sort()
                         .join(",") == a.radio[p].sort().join(",")
                     ) {
@@ -1569,7 +1663,8 @@ export default {
                     }
                   } else {
                     if (
-                      workJson[k].askInfo[0].askJson[p].answer == a.radio[p]
+                      workJson[k].askInfo[0].askInfo.askJson[p].answer ==
+                      a.radio[p]
                     ) {
                       this.checkJson[k][p].right = 100;
                       isCount += this.checkJson[k][p].right;
@@ -1614,7 +1709,10 @@ export default {
                   }
                 }
                 t.radio = e;
-                workJson[k].chooseInfo.push(t);
+                workJson[k].chooseInfo.push({
+                  chooseInfo: t,
+                  score: chooseInfo[i].score,
+                });
                 this.checkJson[k].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < t.radio.length; p++) {
@@ -1633,7 +1731,7 @@ export default {
                   }
                   if (t.radio[p] instanceof Array) {
                     if (
-                      workJson[k].chooseInfo[0].testJson[p].answer
+                      workJson[k].chooseInfo[0].chooseInfo.testJson[p].answer
                         .sort()
                         .join(",") == t.radio[p].sort().join(",")
                     ) {
@@ -1661,7 +1759,8 @@ export default {
                     }
                   } else {
                     if (
-                      workJson[k].chooseInfo[0].testJson[p].answer == t.radio[p]
+                      workJson[k].chooseInfo[0].chooseInfo.testJson[p].answer ==
+                      t.radio[p]
                     ) {
                       this.checkJson[k][p].right = 100;
                       isCount += this.checkJson[k][p].right;
@@ -1708,7 +1807,10 @@ export default {
                   var a =
                     "https://view.officeapps.live.com/op/view.aspx?src=" +
                     pptInfo[i].content;
-                  workJson[k].wpptInfo.push(a);
+                  workJson[k].wpptInfo.push({
+                    wpptInfo: a,
+                    score: pptInfo[i].score,
+                  });
                   this.showPDF = false;
                 } else if (
                   pptInfo[i].content
@@ -1717,7 +1819,10 @@ export default {
                       pptInfo[i].content.split(".").length - 1
                     ].toLocaleUpperCase() == "PDF"
                 ) {
-                  workJson[k].wpptInfo.push(pptInfo[i].content);
+                  workJson[k].wpptInfo.push({
+                    wpptInfo: pptInfo[i].content,
+                    score: pptInfo[i].score,
+                  });
                   this.showPDF = true;
                 }
               }
@@ -1729,7 +1834,10 @@ export default {
                 res.data[0][k].task == answerInfo[i].task
               ) {
                 const element = answerInfo[i];
-                workJson[k].answerInfo.push(JSON.parse(element.content)[0]);
+                workJson[k].answerInfo.push({
+                  answerInfo: JSON.parse(element.content)[0],
+                  score: answerInfo[i].score,
+                });
               }
             }
             for (var i = 0; i < pjInfo.length; i++) {
@@ -1751,6 +1859,7 @@ export default {
                 workJson[k].pjInfo.push({
                   answer: JSON.parse(pj.content),
                   rateJson: rateJson,
+                  score: pjInfo[i].score,
                 });
               }
             }
@@ -1775,6 +1884,7 @@ export default {
                   workJson[k].xztkInfo.push({
                     answer: xztk.content.split(",").map(Number),
                     selectJson: selectJson,
+                    score: xztkInfo[i].score,
                   });
                 }
               }
@@ -1786,7 +1896,11 @@ export default {
                 res.data[0][k].task == lccjInfo[i].task
               ) {
                 var lccj = lccjInfo[i];
-                workJson[k].lccjInfo.push(JSON.parse(lccj.content)[0]);
+                workJson[k].lccjInfo.push({
+                  lccjInfo: JSON.parse(lccj.content)[0],
+                  score: lccjInfo[i].score,
+                });
+                workJson[k].lccjInfo[i].score = lccjInfo[i].score;
               }
             }
 
@@ -1796,7 +1910,10 @@ export default {
                 res.data[0][k].task == bgInfo[i].task
               ) {
                 var bg = bgInfo[i];
-                workJson[k].bgInfo.push(JSON.parse(bg.content));
+                workJson[k].bgInfo.push({
+                  bgInfo: JSON.parse(bg.content),
+                  score: bgInfo[i].score,
+                });
               }
             }
 
@@ -1830,7 +1947,11 @@ export default {
                   ) != -1
                 ) {
                   t = 1;
-                  workJson[k].cocopiInfo.push({ url: cocopi.content, type: t });
+                  workJson[k].cocopiInfo.push({
+                    url: cocopi.content,
+                    type: t,
+                    score: cocopiInfo[i].score,
+                  });
                 } else if (
                   c.indexOf(
                     cocopi.content
@@ -1845,10 +1966,15 @@ export default {
                   workJson[k].cocopiInfo.push({
                     url: a,
                     type: t,
+                    score: cocopiInfo[i].score,
                   });
                 } else {
                   t = 3;
-                  workJson[k].cocopiInfo.push({ url: cocopi.content, type: t });
+                  workJson[k].cocopiInfo.push({
+                    url: cocopi.content,
+                    type: t,
+                    score: cocopiInfo[i].score,
+                  });
                 }
               }
             }
@@ -1859,7 +1985,10 @@ export default {
                 res.data[0][k].task == wordInfo[i].task
               ) {
                 var word = wordInfo[i];
-                workJson[k].wordInfo.push(JSON.parse(word.content));
+                workJson[k].wordInfo.push({
+                  wordInfo: JSON.parse(word.content),
+                  score: wordInfo[i].score,
+                });
               }
             }
           }
@@ -1870,16 +1999,69 @@ export default {
             );
           });
           for (var l = 0; l < b.length; l++) {
-            for (var p = 0; p < workEvaList.length; p++) {
-              if (
-                b[l].stage == workEvaList[p].stage &&
-                b[l].task == workEvaList[p].task
-              ) {
-                var eListOld =
-                  chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
-                    .eList;
+            if (workEvaList.length > 0) {
+              for (var p = 0; p < workEvaList.length; p++) {
+                if (
+                  b[l].stage == workEvaList[p].stage &&
+                  b[l].task == workEvaList[p].task
+                ) {
+                  var eListOld =
+                    chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
+                      .eList;
+                  var eListNew = Object.keys(eListOld).map(function (key) {
+                    return {
+                      detail: eListOld[key].detail,
+                      score: eListOld[key].score,
+                      value: eListOld[key].value,
+                    };
+                  });
+                  eList = eListNew;
+                  if (eList && eList.length) {
+                    _ooption = [];
+                    result[l].eList = eList;
+                    for (var i = 0; i < eList.length; i++) {
+                      _ooption.push({ value: 0, name: eList[i].value });
+                      result[l].rateList[eList[i].value] = 0;
+                    }
+                    result[l].rateList.content = "";
+                    this.ooption[l] = _ooption;
+                  }
+                  if (workEvaList[p].rate && eList && eList.length) {
+                    _rate[l] = JSON.parse(workEvaList[p].rate);
+                    _rateList[l] = Object.keys(JSON.parse(workEvaList[p].rate));
+                    for (var i = 0; i < _rateList[l].length; i++) {
+                      var _c = Object.keys(result[l].rateList);
+                      if (_c.indexOf(_rateList[l][i]) != -1) {
+                        result[l].rateList[_rateList[l][i]] =
+                          _rate[l][_rateList[l][i]];
+                      }
+                    }
+                    for (var i = 0; i < this.ooption[l].length; i++) {
+                      if (_rateList[l].indexOf(this.ooption[l][i].name) != -1) {
+                        this.ooption[l][i].value =
+                          _rate[l][this.ooption[l][i].name];
+                      }
+                    }
+                  } else {
+                    _rate[l] = [];
+                    _rateList[l] = [];
+                  }
+                } else {
+                  _rate[l] = [];
+                  _rateList[l] = [];
+                }
+              }
+            } else {
+              var eListOld =
+                chapters[0][b[l].stage].chapterInfo[0].taskJson[b[l].task]
+                  .eList;
+              if (eListOld && eListOld.length) {
                 var eListNew = Object.keys(eListOld).map(function (key) {
-                  return { detail: eListOld[key].detail, score: eListOld[key].score, value: eListOld[key].value };
+                  return {
+                    detail: eListOld[key].detail,
+                    score: eListOld[key].score,
+                    value: eListOld[key].value,
+                  };
                 });
                 eList = eListNew;
                 if (eList && eList.length) {
@@ -1892,9 +2074,9 @@ export default {
                   result[l].rateList.content = "";
                   this.ooption[l] = _ooption;
                 }
-                if (workEvaList[p].rate && eList && eList.length) {
-                  _rate[l] = JSON.parse(workEvaList[p].rate);
-                  _rateList[l] = Object.keys(JSON.parse(workEvaList[p].rate));
+                if (b[l].rate && eList && eList.length) {
+                  _rate[l] = JSON.parse(b[l].rate);
+                  _rateList[l] = Object.keys(JSON.parse(b[l].rate));
                   for (var i = 0; i < _rateList[l].length; i++) {
                     var _c = Object.keys(result[l].rateList);
                     if (_c.indexOf(_rateList[l][i]) != -1) {
@@ -1912,9 +2094,6 @@ export default {
                   _rate[l] = [];
                   _rateList[l] = [];
                 }
-              } else {
-                _rate[l] = [];
-                _rateList[l] = [];
               }
             }
           }