Ver Fonte

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

lzw11 há 8 meses atrás
pai
commit
4c5b4c52e0

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.100060ff2a0824aab44652c7b967bf2b.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.ee476e38463461edca63.js></script><script type=text/javascript src=./static/js/app.5e61a734a246f8feb33a.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.463950828fc2e85596f824ff1a75968f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.ee476e38463461edca63.js></script><script type=text/javascript src=./static/js/app.609ea2d3e3a2ec41fb73.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.100060ff2a0824aab44652c7b967bf2b.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.100060ff2a0824aab44652c7b967bf2b.css.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.463950828fc2e85596f824ff1a75968f.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.463950828fc2e85596f824ff1a75968f.css.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.609ea2d3e3a2ec41fb73.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.609ea2d3e3a2ec41fb73.js.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


Diff do ficheiro suprimidas por serem muito extensas
+ 435 - 87
src/components/pages/aiAddCourse/addCourse.vue


Diff do ficheiro suprimidas por serem muito extensas
+ 556 - 715
src/components/pages/aiAddCourse/addCourse3.vue


+ 1 - 0
src/components/pages/classroomObservation/components/analysisItem.vue

@@ -256,6 +256,7 @@ export default {
 					session_name: uuidv4(),
 					userId: this.userId,
 					file_ids: this.fileId?[this.fileId]:'',
+					model: "gpt-4o-2024-08-06",
 				};
 
 				// 👇

+ 1 - 0
src/components/pages/classroomObservation/components/baseMessage.vue

@@ -659,6 +659,7 @@ ${this.data.editorBarData?this.data.editorBarData.content:""}
 					uid: _uuid,
 					mind_map_question: "",
 					stream: false,
+					model: "gpt-4o-2024-08-06",
 				};
 				this.ajax
 					.post("https://gpt4.cocorobo.cn/chat", params)

+ 3 - 1
src/components/pages/classroomObservation/components/chatArea.vue

@@ -1198,6 +1198,7 @@ export default {
             session_name: `${this.tid}-classroomObservation`,
             uid: _uid,
             file_ids: this.fileId ? [this.fileId] : [],
+						model: "gpt-4o-2024-08-06",
           };
           this.ajax
             .post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", params)
@@ -1238,7 +1239,7 @@ export default {
         // })
         _historyMessage.push({ role: "user", content: _text });
         let params = JSON.stringify({
-          model: "gpt-3.5-turbo",
+          model: "gpt-4o-2024-08-06",
           temperature: 0,
           max_tokens: 4096,
           top_p: 1,
@@ -1617,6 +1618,7 @@ ${JSON.stringify(_list)}
           session_name: _uuid,
           // uid: _uuid,
           file_ids: [],
+					model: "gpt-4o-2024-08-06",
         };
 
         this.ajax

+ 1 - 1
src/components/pages/components/workData.vue

@@ -158,7 +158,7 @@
             ></div>
           </div>
           <div style="width: 100%">
-            <div style="width:94%;margin: 0 auto;font-size: 26px;">作业查看</div>
+            <div style="width:94%;margin: 0 auto;font-size: 26px;">{{ dataJson.title }}</div>
             <WorksDetail2 :cid="cid" :uid="uid" :ooid="ooid"></WorksDetail2>
             <!-- <el-table
               ref="table"

+ 242 - 109
src/components/pages/components/worksDetail2.vue

@@ -129,14 +129,14 @@
               <div>{{ scope.row.class ? scope.row.class : "暂无班级" }}</div>
             </template>
           </el-table-column>
-          <el-table-column
+          <!-- <el-table-column
             prop="course"
             label="课程"
             min-width="20"
             align="center"
             show-overflow-tooltip
           >
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column
             prop="course"
             label="阶段"
@@ -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
                       : ""
                     : ""
                 }}
@@ -175,7 +175,7 @@
             width="100px"
             align="center"
           ></el-table-column>
-          <el-table-column label="操作" width="200px">
+          <el-table-column align="center" label="操作" width="260px">
             <template slot-scope="scope">
               <el-button
                 type="primary"
@@ -183,7 +183,7 @@
                 @click="
                   lookWork(scope.row.id, scope.row.userid, 0, scope.$index)
                 "
-                >查看作业</el-button
+                >查看&修改</el-button
               >
               <!-- <el-button
                 type="primary"
@@ -197,7 +197,7 @@
                 @click="
                   lookWork2(scope.row.id, scope.row.userid, scope.row.courseid)
                 "
-                >导出报告</el-button
+                >导出作业</el-button
               >
               <!-- <el-button
                 class="de_button"
@@ -216,6 +216,7 @@
           width="100%"
           class="dialog_diy2 max_diy"
           :class="{ fullStyle: full }"
+          v-loading="worksLoading"
         >
           <div slot="title" class="header-title">
             <div style="color: #fff">查看作业</div>
@@ -239,7 +240,7 @@
                   size="mini"
                   style="margin-left: 15px;"
                   @click="getPdf"
-                  >导出pdf</el-button
+                  >导出作业集</el-button
                 >
               </div>
 
@@ -618,13 +619,13 @@
                           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
@@ -637,7 +638,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">
@@ -649,29 +650,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;
@@ -680,33 +676,28 @@
                                     "
                                   />
                                 </div>
+
                                 <div class="a_add_body">
                                   <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"
+                                          ) in item1.checkList"
+                                          :key="checkIndex + 'b'"
                                           :label="checkIndex"
                                           disabled
-                                          class="redioStyle"
+                                          :class="[item1.answer ==  checkIndex ? 'redioStyle5':'redioStyle2']"
                                         >
                                           <div
-                                            style="margin-right: 10px"
                                             v-if="
                                               item2 &&
                                               item2.imgType &&
@@ -726,28 +717,24 @@
                                         </el-radio>
                                       </div>
                                     </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"
+                                          ) in item1.checkList"
+                                          :key="checkIndex + 'c'"
                                           :label="checkIndex"
                                           disabled
-                                          class="redioStyle"
+                                          :class="[item1.answer.includes(checkIndex) ? 'redioStyle3':'redioStyle4']"
                                         >
                                           <div
                                             style="margin-right: 10px"
@@ -776,6 +763,7 @@
                             </div>
                           </div>
                         </div>
+
                         <div
                           class="left_top"
                           v-if="worksDetail[sIndex].wpptInfo.length > 0"
@@ -819,6 +807,7 @@
                             ></iframe>
                           </div>
                         </div>
+
                         <div
                           class="left_top"
                           v-if="worksDetail[sIndex].pjInfo.length > 0"
@@ -1011,12 +1000,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"
@@ -1031,9 +1020,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
@@ -1047,13 +1035,12 @@
                               <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"
-                                      :key="sIndex"
+                                      v-for="(s, sIndex) in st.chooseSenList"
+                                      :key="sIndex+'f'"
                                     >
                                       <el-tooltip
                                         class="item"
@@ -1069,15 +1056,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">
@@ -1091,8 +1078,8 @@
                                 <div
                                   class="answerRight isTj"
                                   v-if="
-                                    st.lccjInfo.chooseSenList.toString() !=
-                                    st.lccjInfo.rightAnswer.toString()
+                                    st.chooseSenList.toString() !=
+                                    st.rightAnswer.toString()
                                   "
                                 >
                                   <div class="isTjImg">
@@ -1106,8 +1093,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">
@@ -1115,7 +1102,7 @@
                                 </div>
                                 <div
                                   class="cardList"
-                                  v-if="st.lccjInfo.rightAnswer"
+                                  v-if="st.rightAnswer"
                                   style="
                                     border: none;
                                     padding: 10px 0 10px 10px;
@@ -1124,9 +1111,8 @@
                                 >
                                   <div class="cardBox">
                                     <div
-                                      v-for="(r, rIndex) in st.lccjInfo
-                                        .rightAnswer"
-                                      :key="rIndex"
+                                      v-for="(r, rIndex) in st.rightAnswer"
+                                      :key="rIndex + 'g'"
                                     >
                                       <el-tooltip
                                         class="item"
@@ -1142,7 +1128,7 @@
                                   </div>
                                   <div class="cardAnswerBox">
                                     组成句子:{{
-                                      st.lccjInfo.rightAnswer.join(" ")
+                                      st.rightAnswer.join(" ")
                                     }}
                                   </div>
                                 </div>
@@ -1380,12 +1366,20 @@
                         position: relative;
                       "
                     >
+                    <div class="worksTimeBlack">
+                      <div class="worksTimeBlackTit">
+                        <div>
+                          任务得分: <span style="color: rgba(54, 129, 252, 1);margin-left: 5px;">{{ totalScore(worksDetail[sIndex].rateList) }}</span>分
+                        </div>
+                      </div>
                       <div class="worksTime">
                         作业提交时间:<span style="width: auto"
                           >{{ worksDetail[sIndex].time }}
                         </span>
                       </div>
-                      <div
+                    </div>
+                     
+                      <!-- <div
                         v-if="
                           // worksDetail[sIndex].img.length == 0 &&
                           // worksDetail[sIndex].askInfo.length == 0 &&
@@ -1429,12 +1423,13 @@
                           <span>全部题的正确率:</span>
                           <span>{{ checkJson[sIndex].allRight + "%" }}</span>
                         </div>
-                      </div>
+                      </div> -->
                       <div v-if="worksDetail[sIndex].eList.length">
-                        <div class="ech" style="margin-left: 23px">
+                        <!-- <div class="ech" style="margin-left: 23px">
                           <img src="../../../assets/icon/pj/score.png" alt="" />
-                        </div>
+                        </div> -->
                         <div>
+                          <div class="score_boxTit"><span>分数详情</span></div>
                           <div
                             class="score_box"
                             v-for="(item, index) in worksDetail[sIndex].eList"
@@ -1456,6 +1451,13 @@
                             ></el-rate>
                           </div>
                         </div>
+                        <div class="worksTarget" v-if="worksDetail[sIndex].eList[0].target"><span>目标</span></div>
+                        <!-- {{ worksDetail[sIndex] }}  -->
+                        <div class="worksTargetCon" v-if="worksDetail[sIndex].eList[0].target">
+                            <div v-for="(item,tarIndex) in worksDetail[sIndex].eList" :key="tarIndex">
+                              <span v-if="item.target"> {{ item.target }}</span>
+                            </div>
+                        </div>
                       </div>
                     </div>
                   </div>
@@ -1826,8 +1828,25 @@ export default {
       checkJson: [],
       typeCheck: false,
       word2: require("../../../assets/icon/word2.png"),
+      worksLoading:false
     };
   },
+  computed: {
+    totalScore(){
+      return function (val) {
+        let sco = 0
+        let num = 0
+
+        for (const key in val) {
+          if (val[key]  || val[key] == 0) {
+            sco+= val[key] * 1
+          }
+          num+=1
+        }
+        return (sco / (num - 1)).toFixed(1)
+      }
+    }
+  },
   watch: {
     typeCheck(newValue, oldValue) {
       this.loading = true;
@@ -1861,6 +1880,7 @@ export default {
   },
   methods: {
     getPdf(){
+      this.worksLoading = true
       let domHeight = this.$refs.reportPdf.offsetHeight;
       console.log('this.$refs.reportPdf',this.$refs.reportPdf.offsetHeight);
       let maxHeight = 64257;
@@ -1889,8 +1909,12 @@ export default {
         pdf.addImage(pageData, 'JPEG', 10, 0, imgWidth-20, imgHeight-20 );
        
         pdf.save( this.allWorks.course+'-'+ this.allWorks.sName+'.pdf')
-
+        this.worksLoading = false
     })
+    .catch((err) => {
+      this.worksLoading = false
+      console.log(err);
+    });
 
     },
 		changeClass(){//切换班级
@@ -1971,7 +1995,10 @@ export default {
             _ooption = [],
             _rate = [],
             _rateList = [];
+            console.log('res.data',res.data);
           var worksDetail = res.data[1];
+          // let worksDetailCopy = JSON.parse(JSON.stringify(worksDetail))
+          // console.log('worksDetailCopy',worksDetailCopy);
           // this.scopeId = res.data[2][0].id;
           // var scopeId = res.data[2][0].id;
           var askInfo = res.data[3];
@@ -2356,10 +2383,11 @@ 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,
@@ -2510,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;
@@ -2559,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;
@@ -2606,6 +2638,8 @@ export default {
           }
 
           this.worksDetail = result;
+          console.log('this.worksDetail',this.worksDetail);
+
 
           this.courseDetail = res.data[0][0];
 
@@ -3198,6 +3232,7 @@ export default {
             });
           }
 
+          //#region 
           // for (var i = 0; i < pptInfo.length; i++) {
           //   var a = ["PPT", "PPTX", "XLSX", "XLS", "DOC", "DOCX"];
           //   if (
@@ -3231,7 +3266,7 @@ export default {
           //     });
           //   }
           // }
-
+//#endregion
           for (var i = 0; i < answerInfo.length; i++) {
             const element = answerInfo[i];
             workJson.answerInfo.push({
@@ -3286,15 +3321,20 @@ export default {
             }
           }
 
-          for (var i = 0; i < lccjInfo.length; i++) {
-            var lccj = lccjInfo[i];
-            workJson.lccjInfo.push({
-              lccjInfo: JSON.parse(lccj.content)[0],
-              score: lccjInfo[i].score
-                ? JSON.parse(lccjInfo[i].score).wScore
-                : lccjInfo[i].score,
-            });
+          // console.log('lccjInfo',lccjInfo);
+          
+          if (lccjInfo.length > 0) {
+            for (var i = 0; i < lccjInfo.length; i++) {
+              var lccj = lccjInfo[i];
+              workJson.lccjInfo.push({
+                lccjInfo: JSON.parse(lccj.content),
+                score: lccjInfo[i].score
+                  ? JSON.parse(lccjInfo[i].score).wScore
+                  : lccjInfo[i].score,
+              });
+            }
           }
+          
 
           for (var i = 0; i < bgInfo.length; i++) {
             var bg = bgInfo[i];
@@ -3495,6 +3535,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 (
@@ -3504,7 +3546,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>`;
                 }
@@ -3526,27 +3568,38 @@ export default {
           //   }
           // }
 
+            //  console.log(workJson.lccjInfo)
+          
           var _lccjInfo = "";
-          if (workJson.lccjInfo.length > 0) {
+          // console.log('workJson.lccjInfo',workJson.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++) {
-              var _div = document.createElement("div");
-              _div.innerHTML = `<h4>第一题${workJson.lccjInfo[i].lccjInfo.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 i = 0; i < workJson.lccjInfo[0].lccjInfo.length; i++) {
+                var _div = document.createElement("div");
+                _div.innerHTML = `<h4>第${i+1}题${workJson.lccjInfo[0].lccjInfo[i].sentenceTitle}</h4> `;
+                var _div2 = document.createElement("div");
+                // 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>`;
               }
-
-              _div.innerHTML += `<div>${_div2.innerHTML}</div>`;
-              _lccjInfo += `<div>${_div.innerHTML}</div>`;
             }
           }
+          
 
           var _bg = "";
           if (workJson.bgInfo.length > 0) {
@@ -4032,25 +4085,43 @@ export default {
   font-size: 15px;
   background: #fff;
   height: 100%;
-  padding-top: 40px;
+  /* padding-top: 40px; */
+  padding: 40px 30px 0;
   border-radius: 5px;
   width: 90%;
   box-shadow: 2px 2px 5px #909090;
   /* overflow: auto; */
 }
+.sd_score .score_boxTit{
+  margin-top: 20px;
+  /* padding: 0 30px; */
+  box-sizing: border-box;
+  font-size: 16px;
+  font-weight: 600;
+  color: rgba(0, 0, 0, 0.9);
+}
+
+.sd_score .score_boxTit > span{
+  border-left: 3px solid rgba(54, 129, 252, 1);
+  padding-left: 5px;
+}
 
 .sd_score .score_box {
   display: flex;
   align-items: center;
-  justify-content: flex-start;
+  font-size: 14px !important;
+  /* justify-content: flex-start; */
+  justify-content: space-between;
   margin-bottom: 15px;
-  margin: 10px 0 0 30px;
+  /* margin: 10px 0 0 30px; */
+  margin: 10px 0;
+
 }
 .sd_score .score_box > span:nth-child(1) {
   margin-right: 20px;
-  text-align-last: justify;
-  max-width: 120px;
-  width: 80px;
+  /* text-align-last: justify; */
+  /* max-width: 300px; */
+  width: 150px;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
@@ -4061,7 +4132,7 @@ export default {
 }
 
 .rate_size >>> .el-rate__icon {
-  font-size: 25px;
+  font-size: 22px;
 }
 
 .rate_size >>> .el-icon-star-off {
@@ -4079,7 +4150,30 @@ export default {
   text-overflow: ellipsis;
   font-size: 16px;
 }
-
+.worksTarget {
+  margin: 15px 0;
+  border-left: 3px solid rgba(54, 129, 252, 1);
+  font-size: 16px;
+  font-weight: 600;
+  color: rgba(0, 0, 0, 0.9);
+}
+.worksTarget > span {
+  margin-left: 5px;
+}
+.worksTargetCon {
+  background: rgba(243, 247, 253, 1);
+  margin: 0 30;
+  padding: 10px;
+  border-radius: 5px;
+  box-sizing: border-box;
+  margin-bottom: 10px;
+}
+.worksTargetCon > div {
+  margin-bottom: 10px;
+}
+.worksTargetCon > div:last-child{
+  margin: 0 !important;
+}
 .moreSay {
   margin: 0px 0 5px 20px;
 }
@@ -4258,6 +4352,7 @@ export default {
   flex-wrap: nowrap;
   align-items: flex-start;
   overflow: hidden;
+  border-radius: 5px;
 }
 
 .zyBoxC + .zyBoxC {
@@ -4436,10 +4531,27 @@ export default {
   flex-wrap: wrap;
 }
 
+
 .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;
@@ -4630,6 +4742,7 @@ export default {
   /* height: 500px; */
   /* height: 100%; */
   min-height: 800px;
+  border-radius: 5px;
 }
 
 .cTitle {
@@ -4884,7 +4997,7 @@ export default {
 }
 
 .fullStyle >>> .el-dialog__body {
-  height: 100% !important;
+  height: calc(100% - 68px) !important;
   overflow: auto;
 }
 
@@ -4895,11 +5008,23 @@ export default {
   height: 100% !important;
   margin: 0 !important;
 }
+.worksTimeBlack{
+  /* padding: 0 30px; */
+  box-sizing: border-box;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  color: rgba(0, 0, 0, 0.9);
+}
+.worksTimeBlack > .worksTimeBlackTit{
+  font-size: 18px;
+  font-weight: 600;
+}
 
 .worksTime {
-  position: absolute;
+  /* position: absolute;
   top: 10px;
-  right: 20px;
+  right: 20px; */
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
@@ -4940,6 +5065,14 @@ export default {
   flex-wrap: wrap;
   /* align-items: center; */
 }
+.radioBox >>> .el-radio {
+  margin-bottom: 5px;
+}
+
+.radioBox >>> .el-checkbox {
+  margin-bottom: 5px;
+}
+
 .radioBox > div {
   margin: 10px 0 0 10px;
 }

+ 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;

+ 5 - 0
src/components/pages/test/index.vue

@@ -1321,6 +1321,11 @@ export default {
             this.getCourse2();
         }
         this.selectTestType();
+        window.onbeforeunload = function(event) {
+            event.preventDefault();
+            event.returnValue = false;
+            return false
+        }
     },
 };
 </script>

+ 9 - 9
src/components/pages/works.vue

@@ -78,7 +78,7 @@
                 :label="c.name"
               ></el-option>
             </el-select>
-            <div
+            <!-- <div
               style="
                 line-height: 35px;
                 font-size: 14px;
@@ -87,8 +87,8 @@
               "
             >
               目标筛选
-            </div>
-            <el-select v-model="eChoose" @change="search" clear="mbCss">
+            </div> -->
+            <!-- <el-select v-model="eChoose" @change="search" clear="mbCss">
               <el-option label="全部" value="">全部</el-option>
               <el-option
                 v-for="(e, eIndex) in evaJuri"
@@ -96,7 +96,7 @@
                 :value="e.id"
                 :label="e.title"
               ></el-option>
-            </el-select>
+            </el-select> -->
             <el-input
               v-model="cn"
               placeholder="筛选项目名称"
@@ -135,7 +135,7 @@
           >
             <el-table-column
               prop="title"
-              label="项目"
+              label="课程"
               min-width="30"
               align="center"
             ></el-table-column>
@@ -154,7 +154,7 @@
               min-width="30"
               align="center"
             ></el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               prop="evaTitle"
               label="目标名称"
               min-width="30"
@@ -169,8 +169,8 @@
               label="时间"
               min-width="20"
               align="center"
-            ></el-table-column>
-            <el-table-column label="操作" width="200px">
+            ></el-table-column> -->
+            <el-table-column align="center" label="操作" width="200px">
               <template slot-scope="scope">
                 <!-- <el-button
                 type="primary"
@@ -191,7 +191,7 @@
                   type="primary"
                   size="small"
                   @click="getWorkData(scope.row)"
-                  >查看课程</el-button
+                  >查看作业</el-button
                 >
                 <el-button
                   type="primary"

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff