Sfoglia il codice sorgente

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

lsc 1 anno fa
parent
commit
9163df95cf

+ 45 - 26
src/components/pages/components/worksDetail2.vue

@@ -146,7 +146,7 @@
           >
             <template slot-scope="scope">
               <div>
-                {{ dyList.length > 0 ? dyList[scope.row.stage].name : "" }}
+                {{ dyList.length > 0 ? dyList[!scope.row.stage ? 0 : scope.row.stage ].name : "" }}
               </div>
             </template>
           </el-table-column>
@@ -161,8 +161,8 @@
               <div>
                 {{
                   dyList.length > 0
-                    ? dyList[scope.row.stage].taskList[scope.row.task]
-                      ? dyList[scope.row.stage].taskList[scope.row.task].name
+                    ? dyList[!scope.row.stage ? 0 : scope.row.stage].taskList[!scope.row.task ? 0 : scope.row.task]
+                      ? dyList[!scope.row.stage ? 0 : scope.row.stage].taskList[!scope.row.task ? 0 : scope.row.task].name
                       : ""
                     : ""
                 }}
@@ -695,7 +695,7 @@
                                           :key="checkIndex + 'b'"
                                           :label="checkIndex"
                                           disabled
-                                          :class="[item1.answer ==  checkIndex ? 'redioStyle':'redioStyle2']"
+                                          :class="[item1.answer ==  checkIndex ? 'redioStyle5':'redioStyle2']"
                                         >
                                           <div
                                             v-if="
@@ -1452,9 +1452,10 @@
                           </div>
                         </div>
                         <div class="worksTarget"><span>目标</span></div>
+                        <!-- {{ worksDetail[sIndex] }}  -->
                         <div class="worksTargetCon">
-                            <div v-for="item in worksDetail[sIndex].eList" :key="item">
-                              <span v-if="!item.target"> {{ item.target }}</span>
+                            <div v-for="(item,tarIndex) in worksDetail[sIndex].eList" :key="tarIndex">
+                              <span v-if="item.target"> {{ item.target }}</span>
                             </div>
                         </div>
                       </div>
@@ -2537,6 +2538,8 @@ export default {
                   detail: eListOld[key].detail,
                   score: eListOld[key].score,
                   value: eListOld[key].value,
+                  isai: eListOld[key].isai,
+                  target: eListOld[key].target
                 };
               });
               eList = eListNew;
@@ -2586,6 +2589,8 @@ export default {
                         detail: eListOld[key].detail,
                         score: eListOld[key].score,
                         value: eListOld[key].value,
+                        isai: eListOld[key].isai,
+                        target: eListOld[key].target
                       };
                     });
                     eList = eListNew;
@@ -3227,6 +3232,7 @@ export default {
             });
           }
 
+          //#region 
           // for (var i = 0; i < pptInfo.length; i++) {
           //   var a = ["PPT", "PPTX", "XLSX", "XLS", "DOC", "DOCX"];
           //   if (
@@ -3260,7 +3266,7 @@ export default {
           //     });
           //   }
           // }
-
+//#endregion
           for (var i = 0; i < answerInfo.length; i++) {
             const element = answerInfo[i];
             workJson.answerInfo.push({
@@ -3318,7 +3324,7 @@ export default {
           for (var i = 0; i < lccjInfo.length; i++) {
             var lccj = lccjInfo[i];
             workJson.lccjInfo.push({
-              lccjInfo: JSON.parse(lccj.content)[0],
+              lccjInfo: JSON.parse(lccj.content),
               score: lccjInfo[i].score
                 ? JSON.parse(lccjInfo[i].score).wScore
                 : lccjInfo[i].score,
@@ -3524,6 +3530,8 @@ export default {
                   workJson.chooseInfo[i].chooseInfo.testJson[j].teststitle
                 }  选择:${
                   workJson.chooseInfo[i].chooseInfo.testJson[j].answer
+                } 答案:${
+                  workJson.chooseInfo[i].chooseInfo.testJson[j].type == 1 ? workJson.chooseInfo[i].chooseInfo.radio[j] : workJson.chooseInfo[i].chooseInfo.radio[j].join(',')
                 }</h5> `;
                 var _div3 = document.createElement("div");
                 for (
@@ -3533,7 +3541,7 @@ export default {
                     .length;
                   z++
                 ) {
-                  _div3.innerHTML += `<span style="margin-right:5px">${z + 1}.${
+                  _div3.innerHTML += `<span style="margin-right:5px">${z}.${
                     workJson.chooseInfo[i].chooseInfo.testJson[j].checkList[z]
                   }</span>`;
                 }
@@ -3555,23 +3563,29 @@ export default {
           //   }
           // }
 
+            //  console.log(workJson.lccjInfo)
+          
           var _lccjInfo = "";
-          if (workJson.lccjInfo.length > 0) {
+          if (workJson.lccjInfo[0].lccjInfo.length > 0) {
             var _lccjInfo = "<h3>排序<h3>";
-            for (var i = 0; i < workJson.lccjInfo.length; i++) {
+            for (var i = 0; i < workJson.lccjInfo[0].lccjInfo.length; i++) {
               var _div = document.createElement("div");
-              _div.innerHTML = `<h4>第一题${workJson.lccjInfo[i].lccjInfo.sentenceTitle}</h4> `;
+              _div.innerHTML = `<h4>第${i+1}题${workJson.lccjInfo[0].lccjInfo[i].sentenceTitle}</h4> `;
               var _div2 = document.createElement("div");
-              for (
-                var j = 0;
-                j < workJson.lccjInfo[i].lccjInfo.chooseSenList.length;
-                j++
-              ) {
-                _div2.innerHTML += ` 句子 ${j + 1} : ${
-                  workJson.lccjInfo[i].lccjInfo.chooseSenList[j]
-                }`;
-              }
-
+              // for (
+              //   var j = 0;
+              //   j < workJson.lccjInfo[0][lccjInfo][i].chooseSenList.length;
+              //   j++
+              // ) {
+              //   _div2.innerHTML += ` 句子 ${j + 1} : ${
+              //     workJson.lccjInfo[0][lccjInfo][i].chooseSenList[j]
+              //   }`;
+              // }
+              _div2.innerHTML+= ` 句子 ${i + 1}:${ workJson.lccjInfo[0].lccjInfo[i].addSentence.join(',')} 选择:${
+                  workJson.lccjInfo[0].lccjInfo[i].chooseSenList.join(',') 
+                } 答案:${
+                  workJson.lccjInfo[0].lccjInfo[i].rightAnswer.join(',') 
+                }`
               _div.innerHTML += `<div>${_div2.innerHTML}</div>`;
               _lccjInfo += `<div>${_div.innerHTML}</div>`;
             }
@@ -4108,7 +4122,7 @@ export default {
 }
 
 .rate_size >>> .el-rate__icon {
-  font-size: 25px;
+  font-size: 22px;
 }
 
 .rate_size >>> .el-icon-star-off {
@@ -4142,12 +4156,13 @@ export default {
   padding: 10px;
   border-radius: 5px;
   box-sizing: border-box;
+  margin-bottom: 10px;
 }
 .worksTargetCon > div {
   margin-bottom: 10px;
 }
-.worksTargetCon :nth-child(-1){
-  margin-bottom: 0;
+.worksTargetCon > div:last-child{
+  margin: 0 !important;
 }
 .moreSay {
   margin: 0px 0 5px 20px;
@@ -4506,10 +4521,14 @@ export default {
   flex-wrap: wrap;
 }
 
+
 .redioStyle >>> .el-radio__label {
   font-size: 18px;
-  color: #06a7ff !important;
+}
 
+.redioStyle5 >>> .el-radio__label {
+  font-size: 18px;
+  color: #06a7ff !important;
 }
 .redioStyle2 >>> .el-radio__label {
   font-size: 18px;

+ 54 - 51
src/components/pages/components/worksDetail3.vue

@@ -346,12 +346,12 @@
                     class="left_top"
                     v-if="worksDetail[sIndex].chooseInfo.length > 0"
                   >
-                    <div>
+                    <div  v-for="(lcc, lccindex) in worksDetail[sIndex].chooseInfo" :key="lccindex + 'a'">
                       <div
-                        v-if="worksDetail[sIndex].chooseInfo[0].score"
+                        v-if="lcc.score"
                         style="float: right; margin-right: 10px"
                       >
-                        评分:{{ worksDetail[sIndex].chooseInfo[0].score }}
+                        评分:{{ lcc.score }}
                       </div>
                       <div
                         class="a_add_title"
@@ -363,7 +363,7 @@
                           flex-wrap: wrap;
                         "
                       >
-                        <div style="font-size: 16px">选择题工具</div>
+                        <div style="font-size: 16px">选择题工具{{ lccindex + 1 }}</div>
                       </div>
                       <div class="a_addBox">
                         <div style="font-size: 16px; color: #c7c7c7">
@@ -375,28 +375,24 @@
                               ? 'a_add_box'
                               : 'isAddBox'
                           "
-                          v-for="(item1, index1) in worksDetail[sIndex]
-                            .chooseInfo[0].chooseInfo.testCount"
-                          :key="index1"
+                          v-for="(item1, index1) in lcc.chooseInfo.testJson"
+                          :key="index1+ 'a'"
                         >
                           <div class="a_add_head">
                             <div style="display: flex">
                               {{ index1 + 1 + "、" }}
                               <div>
                                 题目:{{
-                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
-                                    .testJson[index1].teststitle
+                                   item1.teststitle
                                 }}
                               </div>
                             </div>
                             <img
                               v-if="
-                                worksDetail[sIndex].chooseInfo[0].chooseInfo
-                                  .testJson[index1].img
+                                item1.img
                               "
                               :src="
-                                worksDetail[sIndex].chooseInfo[0].chooseInfo
-                                  .testJson[index1].img
+                                item1.img
                               "
                               style="
                                 height: 300px;
@@ -409,24 +405,19 @@
                             <div class="a_add_input">
                               <el-radio-group
                                 v-model="
-                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
-                                    .radio[index1]
+                                 lcc.chooseInfo.radio[index1]
                                 "
                                 v-if="
-                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
-                                    .testJson[index1].type == '1'
+                                 item1.type == '1'
                                 "
                               >
                                 <div class="radioBox">
                                   <el-radio
-                                    v-for="(item2, checkIndex) in worksDetail[
-                                      sIndex
-                                    ].chooseInfo[0].chooseInfo.testJson[index1]
-                                      .checkList"
-                                    :key="checkIndex"
+                                    v-for="(item2, checkIndex) in item1.checkList"
+                                    :key="checkIndex + 'b'"
                                     :label="checkIndex"
                                     disabled
-                                    class="redioStyle"
+                                    :class="[item1.answer ==  checkIndex ? 'redioStyle5':'redioStyle2']"
                                   >
                                     <div
                                       style="margin-right: 10px"
@@ -449,24 +440,19 @@
                               </el-radio-group>
                               <el-checkbox-group
                                 v-model="
-                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
-                                    .radio[index1]
+                                  lcc.chooseInfo.radio[index1]
                                 "
                                 v-if="
-                                  worksDetail[sIndex].chooseInfo[0].chooseInfo
-                                    .testJson[index1].type == '2'
+                                 item1.type == '2'
                                 "
                               >
                                 <div class="radioBox">
                                   <el-checkbox
-                                    v-for="(item2, checkIndex) in worksDetail[
-                                      sIndex
-                                    ].chooseInfo[0].chooseInfo.testJson[index1]
-                                      .checkList"
-                                    :key="checkIndex"
+                                    v-for="(item2, checkIndex) in item1.checkList"
+                                    :key="checkIndex+ 'c'"
                                     :label="checkIndex"
                                     disabled
-                                    class="redioStyle"
+                                    :class="[item1.answer.includes(checkIndex) ? 'redioStyle3':'redioStyle4']"
                                   >
                                     <div
                                       style="margin-right: 10px"
@@ -720,12 +706,12 @@
                     class="left_top"
                     v-if="worksDetail[sIndex].lccjInfo.length > 0"
                   >
-                    <div class="sentenBox">
+                    <div class="sentenBox" v-for="(lcc, lccindex) in worksDetail[sIndex].lccjInfo" :key="lccindex +'d'">
                       <div
-                        v-if="worksDetail[sIndex].lccjInfo[0].score"
+                        v-if="lcc.score"
                         style="float: right; margin-right: 10px"
                       >
-                        评分:{{ worksDetail[sIndex].lccjInfo[0].score }}
+                        评分:{{lcc.score }}
                       </div>
                       <div
                         class="a_add_title"
@@ -740,8 +726,8 @@
                         <div style="font-size: 16px">排序工具</div>
                       </div>
                       <div
-                        v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo"
-                        :key="stIndex"
+                        v-for="(st, stIndex) in lcc.lccjInfo"
+                        :key="stIndex+'e'"
                         style="padding-bottom: 20px"
                       >
                         <div style="padding: 15px 0 10px 20px; font-size: 20px">
@@ -750,11 +736,11 @@
                         <div class="isWrong">
                           <div
                             class="cardList1"
-                            v-if="st.lccjInfo.chooseSenList"
+                            v-if="st.chooseSenList"
                           >
                             <div class="cardBox">
                               <div
-                                v-for="(s, sIndex) in st.lccjInfo.chooseSenList"
+                                v-for="(s, sIndex) in st.chooseSenList"
                                 :key="sIndex"
                               >
                                 <el-tooltip
@@ -771,15 +757,15 @@
                             </div>
                             <div class="cardAnswerBox">
                               组成句子:{{
-                                st.lccjInfo.chooseSenList.join(" ")
+                                st.chooseSenList.join(" ")
                               }}
                             </div>
                           </div>
                           <div
                             class="answerRight isTj"
                             v-if="
-                              st.lccjInfo.chooseSenList.toString() ==
-                              st.lccjInfo.rightAnswer.toString()
+                              st.chooseSenList.toString() ==
+                              st.rightAnswer.toString()
                             "
                           >
                             <div class="isTjImg">
@@ -793,8 +779,8 @@
                           <div
                             class="answerRight isTj"
                             v-if="
-                              st.lccjInfo.chooseSenList.toString() !=
-                              st.lccjInfo.rightAnswer.toString()
+                              st.chooseSenList.toString() !=
+                              st.rightAnswer.toString()
                             "
                           >
                             <div class="isTjImg">
@@ -808,8 +794,8 @@
                         </div>
                         <div
                           v-if="
-                            st.lccjInfo.chooseSenList.toString() !=
-                            st.lccjInfo.rightAnswer.toString()
+                            st.chooseSenList.toString() !=
+                            st.rightAnswer.toString()
                           "
                         >
                           <div style="padding: 15px 0 10px 20px">
@@ -817,7 +803,7 @@
                           </div>
                           <div
                             class="cardList"
-                            v-if="st.lccjInfo.rightAnswer"
+                            v-if="st.rightAnswer"
                             style="
                               border: none;
                               padding: 10px 0 10px 10px;
@@ -826,7 +812,7 @@
                           >
                             <div class="cardBox">
                               <div
-                                v-for="(r, rIndex) in st.lccjInfo.rightAnswer"
+                                v-for="(r, rIndex) in st.rightAnswer"
                                 :key="rIndex"
                               >
                                 <el-tooltip
@@ -842,7 +828,7 @@
                               </div>
                             </div>
                             <div class="cardAnswerBox">
-                              组成句子:{{ st.lccjInfo.rightAnswer.join(" ") }}
+                              组成句子:{{ st.rightAnswer.join(" ") }}
                             </div>
                           </div>
                         </div>
@@ -1599,6 +1585,7 @@ export default {
               };
             }
             workJson[stagetask].time = res.data[0][k].time;
+            //#region 
             // for (var i = 0; i < askInfo.length; i++) {
             //   if (
             //     res.data[0][k].stage == askInfo[i].stage &&
@@ -1698,6 +1685,7 @@ export default {
             //     checkJson[stagetask].allRight = isCount / a.radio.length;
             //   }
             // }
+            //#endregion
             for (var i = 0; i < chooseInfo.length; i++) {
               if (
                 res.data[0][k].stage == chooseInfo[i].stage &&
@@ -1907,7 +1895,7 @@ export default {
           for (var i = 0; i < lccjInfo.length; i++) {
             var lccj = lccjInfo[i];
             workJson[lccjInfo[i].stage + "-" + lccjInfo[i].task].lccjInfo.push({
-              lccjInfo: JSON.parse(lccj.content)[0],
+              lccjInfo: JSON.parse(lccj.content),
               score: lccjInfo[i].score
                 ? JSON.parse(lccjInfo[i].score).wScore
                 : lccjInfo[i].score,
@@ -3521,7 +3509,22 @@ export default {
 .redioStyle >>> .el-radio__label {
   font-size: 18px;
 }
+.redioStyle5 >>> .el-radio__label {
+  font-size: 18px;
+  color: #06a7ff !important;
+
+}
+.redioStyle2 >>> .el-radio__label {
+  font-size: 18px;
+}
 
+.redioStyle3 >>> .el-checkbox__label {
+  font-size: 18px;
+  color: #06a7ff !important;
+}
+.redioStyle4 >>> .el-checkbox__label {
+  font-size: 18px;
+}
 .task_title {
   font-size: 18px;
   font-weight: 700;