11wqe1 6 일 전
부모
커밋
4a4d0fb4cc
2개의 변경된 파일152개의 추가작업 그리고 62개의 파일을 삭제
  1. 148 58
      src/components/pages/components/lookWork.vue
  2. 4 4
      src/components/pages/components/studentReport.vue

+ 148 - 58
src/components/pages/components/lookWork.vue

@@ -1,5 +1,9 @@
 <template>
-  <div class="pbl" :style='{padding: isStu == 2 ? 0 : "0 50px 20px"}' v-loading="loading">
+  <div
+    class="pbl"
+    :style="{ padding: isStu == 2 ? 0 : '0 50px 20px' }"
+    v-loading="loading"
+  >
     <div class="titBri">
       <div class="claInfo">
         <img style="height: 100%;" src="../../../assets/avatar.png" alt="" />
@@ -10,7 +14,14 @@
         /> -->
         <span>{{ userName }}</span>
         <span>{{ courseName }}</span>
-        <el-button v-if="isStu != 2" size="small" type="primary" style="margin-left: 10px;height: 25px;line-height: 8px;" @click="expPdf">导出</el-button>
+        <el-button
+          v-if="isStu != 2"
+          size="small"
+          type="primary"
+          style="margin-left: 10px;height: 25px;line-height: 8px;"
+          @click="expPdf"
+          >导出</el-button
+        >
       </div>
 
       <div v-if="isStu == 0">
@@ -52,13 +63,12 @@
                 <el-menu-item
                   v-for="(k, kin) in i.taskList"
                   :key="k.id"
-                  :index="i.id+'-'+k.id"
+                  :index="i.id + '-' + k.id"
                   style="display: flex; align-items: center"
+                  @click="positT(k.id)"
                 >
-                  <div @click.stop="positT(k.id)" class="TitBti">
-                    任务{{ kin + 1 }}
-                  </div>
-                  <div @click.stop="positT(k.id)" class="eliP">
+                  <div class="TitBti">任务{{ kin + 1 }}</div>
+                  <div class="eliP">
                     {{ k.name }}
                   </div>
                 </el-menu-item>
@@ -76,7 +86,9 @@
             v-if="isStage(i.taskList)"
             class="stageCon"
           >
-            <div v-if="CState != 5" class="stageTit">阶段{{ i.id + 1 }}:{{ i.name }}</div>
+            <div v-if="CState != 5" class="stageTit">
+              阶段{{ i.id + 1 }}:{{ i.name }}
+            </div>
 
             <div
               v-for="(k, kIndex) in i.taskList"
@@ -307,7 +319,18 @@
                       v-for="(i, index) in l.content[0].testJson"
                       :key="index + 'm'"
                     >
-                      <div>题目:{{ i.teststitle }}</div>
+                      <div>
+                        题目:{{ i.teststitle }}
+                        <span
+                          v-if="
+                            JSON.stringify(l.content[0].radio[index]) ==
+                              JSON.stringify(i.answer)
+                          "
+                          style="color: #868ce4"
+                          >回答正确</span
+                        >
+                        <span v-else style="color: red">回答错误</span>
+                      </div>
                       <div
                         v-if="i.type == 1"
                         style="display: flex; flex-direction: column"
@@ -392,6 +415,7 @@
                   <div v-if="l.tool[0] == 41">
                     <div class="toolBlk">
                       <img
+                        class="toolImg"
                         src="../../../assets/icon/thirdToolList/select.png"
                         alt=""
                       />
@@ -417,9 +441,68 @@
                         >{{ item }}</span
                       >
                     </div>
+                    <div style="margin: 10px 0;">
+                      <span style="margin-right: 10px">回答:</span>
+
+                      <div
+                        style="margin-right: 10px"
+                        v-for="(item, itInd) in l.content[0]"
+                        :key="itInd"
+                      >
+                        选项{{ itInd + 1 }}:{{ l.selectJson.select[item] }}
+                        <span
+                          v-if="
+                            l.selectJson.answer[itInd] == l.content[0][itInd]
+                          "
+                          style="color: #868ce4"
+                          >回答正确</span
+                        >
+                        <span v-else style="color: red">回答错误</span>
+                      </div>
+                    </div>
                     <div>
                       <span style="margin-right: 10px">答案:</span>
 
+                      <span
+                        style="margin-right: 10px"
+                        v-for="(item, itInd) in l.selectJson.answer"
+                        :key="itInd"
+                        >选项{{ itInd + 1 }}:{{
+                          l.selectJson.select[item]
+                        }}</span
+                      >
+                    </div>
+                  </div>
+                  <!-- <div v-if="l.tool[0] == 41">
+                    <div class="toolBlk">
+                      <img
+                        src="../../../assets/icon/thirdToolList/select.png"
+                        alt=""
+                      />
+                      <div class="toolTit">
+                        <div>工具{{ lind + 1 }}:选择匹配</div>
+                        <div>
+                          根据前期的了解与实地调研对于项目的了解,进行思考与讨论提出问题。
+                        </div>
+                      </div>
+                    </div>
+                    <img
+                      @click.stop="previewImg(l.selectJson.url)"
+                      style="max-width: 200px"
+                      :src="l.selectJson.url"
+                      alt=""
+                    />
+                    <div>
+                      <span style="margin-right: 10px">选项:</span
+                      ><span
+                        style="margin-right: 10px"
+                        v-for="(item, itInd) in l.selectJson.select"
+                        :key="itInd"
+                        >{{ item }}</span
+                      >
+                    </div>
+                    <div>
+                      <span style="margin-right: 10px">学生回答:</span>
                       <span
                         style="margin-right: 10px"
                         v-for="(item, itInd) in l.content[0]"
@@ -427,7 +510,7 @@
                         >{{ itInd + 1 }}、{{ l.selectJson.select[item] }}</span
                       >
                     </div>
-                  </div>
+                  </div> -->
 
                   <!-- 排序 -->
                   <div v-if="l.tool[0] == 47">
@@ -519,10 +602,7 @@
                   <!-- 作业评分 -->
                   <div class="taskScoCon">
                     <!-- 分数详情与素养 -->
-                    <div
-                      v-if="l.eList"
-                      class="taskScoConEList"
-                    >
+                    <div v-if="l.eList" class="taskScoConEList">
                       <div style="width: 49%; margin: 0 20px 10px 0">
                         <div class="taskScoConTit">分数详情</div>
                         <div style="display: flex;flex-wrap: wrap;">
@@ -576,13 +656,14 @@
                       </div>
                     </div>
                   </div>
-                  
                 </div>
 
                 <!-- 阶段  -->
                 <div
                   class="taskSco"
-                  v-if="l.eList && CState != 5 && lind == k.toolEList.length - 1"
+                  v-if="
+                    l.eList && CState != 5 && lind == k.toolEList.length - 1
+                  "
                 >
                   <div class="taskScoTit">
                     <div>
@@ -597,10 +678,7 @@
                   <!-- 作业评分 -->
                   <div class="taskScoCon">
                     <!-- 分数详情与素养 -->
-                    <div
-                      v-if="l.eList"
-                      class="taskScoConEList"
-                    >
+                    <div v-if="l.eList" class="taskScoConEList">
                       <div style="width: 49%; margin: 0 20px 10px 0">
                         <div class="taskScoConTit">分数详情</div>
                         <div style="display: flex;flex-wrap: wrap;">
@@ -631,7 +709,11 @@
                         <div class="WorkConSY">
                           <div v-for="(wItem, ind) in l.eList" :key="ind + 's'">
                             <div class="RootImgBlockSy">
-                              <span v-if="wItem.target && wItem.target.length"> {{ wItem.target[wItem.target.length - 1] }}</span>
+                              <span v-if="wItem.target && wItem.target.length">
+                                {{
+                                  wItem.target[wItem.target.length - 1]
+                                }}</span
+                              >
                               <span v-else> {{ wItem.target }}</span>
                             </div>
                           </div>
@@ -654,9 +736,9 @@
                         {{ l.rate.content || l.rate.comment }}
                       </div>
                     </div>
-                  </div>      
+                  </div>
                 </div>
-              </div>  
+              </div>
             </div>
           </div>
         </div>
@@ -675,7 +757,8 @@ export default {
       type: String,
       default: ""
     },
-    isStu: {   // 0正常 1不显示上一个下一个 2不显示上一个下一个+导出
+    isStu: {
+      // 0正常 1不显示上一个下一个 2不显示上一个下一个+导出
       type: Number,
       default: 0
     }
@@ -700,7 +783,7 @@ export default {
       CState: 0,
       tableData: [],
       loading: false,
-      resData:{}
+      resData: {}
     };
   },
 
@@ -733,11 +816,11 @@ export default {
         return isShow;
       };
     },
-    isSU(){
+    isSU() {
       return function(val) {
         let isShow = false;
         // console.log('isSU',val);
-        
+
         val.forEach(e => {
           if (e.target) {
             isShow = true;
@@ -772,9 +855,9 @@ export default {
     this.uid = JSON.parse(JSON.stringify(this.studentId));
 
     // if (this.isStu == 0) {
-      this.getWorks1();
+    this.getWorks1();
     // } else {
-      // this.exportPdfSet();
+    // this.exportPdfSet();
     // }
   },
   watch: {
@@ -785,15 +868,15 @@ export default {
       this.uid = JSON.parse(JSON.stringify(this.studentId));
 
       // if (this.isStu == 0) {
-        this.getWorks1();
+      this.getWorks1();
       // } else {
-        // this.exportPdfSet();
+      // this.exportPdfSet();
       // }
     }
   },
   methods: {
-    expPdf(){
-      this.$emit('childExportPdfSetBtn',{uid:this.uid,con:this.resData});
+    expPdf() {
+      this.$emit("childExportPdfSetBtn", { uid: this.uid, con: this.resData });
     },
     // 下一个
     nxtPer() {
@@ -810,32 +893,30 @@ export default {
     // 提交分数
     updateRate(stage, task, tool) {
       // console.log('updateRate',this.workList[stage].taskList[task].toolEList[tool]);
-      let processedData = {}
+      let processedData = {};
 
-      let elist = this.workList[stage].taskList[task].toolEList[tool].eList
+      let elist = this.workList[stage].taskList[task].toolEList[tool].eList;
 
-      elist.forEach(e=>{
+      elist.forEach(e => {
         if (this.CState == 5) {
-          processedData[e.detail] = 0
-        }else{
-          processedData[e.value] = 0
+          processedData[e.detail] = 0;
+        } else {
+          processedData[e.value] = 0;
         }
-      })
-      
-      let RateData = this.workList[stage].taskList[task].toolEList[tool]
-        .rate;
+      });
+
+      let RateData = this.workList[stage].taskList[task].toolEList[tool].rate;
 
       for (const key in processedData) {
-        processedData[key] = RateData[key]
+        processedData[key] = RateData[key];
       }
       // console.log('processedData',JSON.parse(JSON.stringify(processedData)));
       // console.log('RateData',JSON.parse(JSON.stringify(RateData)));
 
-      processedData.content = RateData.content
+      processedData.content = RateData.content;
 
       // console.log("processedData", processedData);
 
-
       // console.log(stage, task, tool);
       // return
       let params = {
@@ -912,14 +993,13 @@ export default {
             this.workEvaList = res.data[13];
 
             // console.log('res.data[0][0]',res.data[0][0]);
-            this.resData = JSON.parse(JSON.stringify(res.data[0][0]))
-            
+            this.resData = JSON.parse(JSON.stringify(res.data[0][0]));
+
             this.courseName = res.data[0][0].course;
             this.CState = res.data[0][0].state;
 
             var dyJSON = JSON.parse(res.data[0][0].chapters);
             // console.log('dyJSON',JSON.parse(JSON.stringify(dyJSON)));
-            
 
             let dyList = [];
             for (var i = 0; i < dyJSON.length; i++) {
@@ -1069,18 +1149,28 @@ export default {
                   });
 
                   // 将没有提交作业,但是有评分标准的数据填上数据,防止报错
-                  if (!l.rate && l.eList && l.eList.length && this.CState == 5) {
+                  if (
+                    !l.rate &&
+                    l.eList &&
+                    l.eList.length &&
+                    this.CState == 5
+                  ) {
                     l.rate = { content: "" };
                     l.eList.forEach(elp => {
                       l.rate[elp.detail] = 0;
                     });
-                  }else if ((!l.rate && l.eList && l.eList.length && this.CState != 5)) {
-                      l.rate = { content: "" };
-                      l.eList.forEach(elp => {
-                        l.rate[elp.value] = 0;
-                      });
+                  } else if (
+                    !l.rate &&
+                    l.eList &&
+                    l.eList.length &&
+                    this.CState != 5
+                  ) {
+                    l.rate = { content: "" };
+                    l.eList.forEach(elp => {
+                      l.rate[elp.value] = 0;
+                    });
                   }
-                // }
+                  // }
                   // if (!l.rate && l.eList && l.eList.length) {
                   //   l.rate = { content: "" };
                   //   l.eList.forEach(elp => {
@@ -1109,8 +1199,8 @@ export default {
     },
     // 点击任务滑动跳转
     positT(val) {
-      console.log('666666');
-      
+      console.log("666666");
+
       let a = document.getElementById(val);
       if (a) {
         a.scrollIntoView({

+ 4 - 4
src/components/pages/components/studentReport.vue

@@ -269,9 +269,9 @@ export default {
   height: calc(100%);
   /* margin-bottom: 20px; */
 }
-.sr_second .second {
+/* .sr_second .second { */
   /* height: calc(100% / 3.5 * 1.5); */
-}
+/* } */
 .sr_third .first {
   height: calc(100% / 2.25 * 1.25);
   margin-bottom: 20px;
@@ -288,8 +288,8 @@ export default {
   width: 200px;
   margin: 0 auto;
 }
-.sub_title span {
-}
+/* .sub_title span {
+} */
 .sub_title::after {
   content: "";
   width: 20px;