11wqe1 4 months ago
parent
commit
429991b728

+ 48 - 9
src/components/pages/components/lookWork.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="pbl" 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 +10,7 @@
         /> -->
         <span>{{ userName }}</span>
         <span>{{ courseName }}</span>
-        <el-button 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">
@@ -76,7 +76,7 @@
             v-if="isStage(i.taskList)"
             class="stageCon"
           >
-            <div v-if="CState != 5" class="stageTit">阶段{{ i.id + 1 }}</div>
+            <div v-if="CState != 5" class="stageTit">阶段{{ i.id + 1 }}:{{ i.name }}</div>
 
             <div
               v-for="(k, kIndex) in i.taskList"
@@ -624,7 +624,7 @@
                       </div>
 
                       <div
-                        v-if="l.eList"
+                        v-if="isSU(l.eList)"
                         style="width: 49%;display: flex;flex-direction: column;"
                       >
                         <div class="taskScoConTit">素养</div>
@@ -675,7 +675,7 @@ export default {
       type: String,
       default: ""
     },
-    isStu: {
+    isStu: {   // 0正常 1不显示上一个下一个 2不显示上一个下一个+导出
       type: Number,
       default: 0
     }
@@ -733,6 +733,20 @@ export default {
         return isShow;
       };
     },
+    isSU(){
+      return function(val) {
+        let isShow = false;
+        // console.log('isSU',val);
+        
+        val.forEach(e => {
+          if (e.target) {
+            isShow = true;
+          }
+        });
+
+        return isShow;
+      };
+    },
     totalScore() {
       return function(val) {
         let valT = JSON.parse(JSON.stringify(val));
@@ -795,10 +809,35 @@ export default {
     },
     // 提交分数
     updateRate(stage, task, tool) {
-      let processedData = this.workList[stage].taskList[task].toolEList[tool]
+      // console.log('updateRate',this.workList[stage].taskList[task].toolEList[tool]);
+      let processedData = {}
+
+      let elist = this.workList[stage].taskList[task].toolEList[tool].eList
+
+      elist.forEach(e=>{
+        if (this.CState == 5) {
+          processedData[e.detail] = 0
+        }else{
+          processedData[e.value] = 0
+        }
+      })
+      
+      let RateData = this.workList[stage].taskList[task].toolEList[tool]
         .rate;
-      console.log("processedData", processedData);
+
+      for (const key in processedData) {
+        processedData[key] = RateData[key]
+      }
+      // console.log('processedData',JSON.parse(JSON.stringify(processedData)));
+      // console.log('RateData',JSON.parse(JSON.stringify(RateData)));
+
+      processedData.content = RateData.content
+
+      // console.log("processedData", processedData);
+
+
       // console.log(stage, task, tool);
+      // return
       let params = {
         cid: this.cid,
         s: stage,
@@ -907,7 +946,7 @@ export default {
               elistData.forEach((e, i) => {
                 framework[i] = {
                   id: i,
-                  name: i.dyName ? i.dyName : "",
+                  name: e.dyName ? e.dyName : "",
                   taskList: []
                 };
                 e.chapterInfo[0].taskJson.forEach((k, kin) => {
@@ -1018,7 +1057,7 @@ export default {
                       k.task == p.task &&
                       lIndex == p.tool
                     ) {
-                      console.log("JSON.parse(p.rate)", JSON.parse(p.rate));
+                      // console.log("JSON.parse(p.rate)", JSON.parse(p.rate));
                       let rateCopy = JSON.parse(p.rate);
                       for (const key in rateCopy) {
                         if (key != "content") {

+ 8 - 3
src/components/pages/components/studentReport.vue

@@ -5,7 +5,7 @@
       <div class="sr_headBtnS">
         <el-button v-if="seatNum > 0 && typeNum !=1" type="primary" size="small" @click="upStu">上一位</el-button>
         <el-button  style="margin-left: 10px;" v-if="seatNum < studentList.length-1 && typeNum !=1" type="primary" size="small" @click="nextStu">下一位</el-button>
-        <el-button style="margin-left: 10px;" type="primary" size="small" @click="downloadFile('https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/student01-%E5%AD%A6%E7%94%9F%E6%88%90%E9%95%BF%E6%8A%A5%E5%91%8A1719315423787.pdf');">导出报告</el-button>
+        <!-- <el-button style="margin-left: 10px;" type="primary" size="small" @click="downloadFile('https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/student01-%E5%AD%A6%E7%94%9F%E6%88%90%E9%95%BF%E6%8A%A5%E5%91%8A1719315423787.pdf');">导出报告</el-button> -->
         <el-button style="margin-left: 10px;" @click="pageBack" type="primary" size="small">返回</el-button>
       </div>
       
@@ -44,7 +44,9 @@
         </div>
       </div>
       <div style="height:100%;min-width: 1100px;">
-        <worksDetail3 class="r_box" :cid="courseid" :uid="userid" :ooid="scoid"></worksDetail3>
+        <LookWorks :id="courseid" :isStu="2" :studentId="userid" :key="userid.toString"></LookWorks>
+
+        <!-- <worksDetail3 class="r_box" :cid="courseid" :uid="userid" :ooid="scoid"></worksDetail3> -->
       </div>
     </div>
   </div>
@@ -58,6 +60,8 @@ import CourseRadar from "./report/courseRadar.vue";
 import CoursePie from "./report/coursePie.vue";
 import CourseDetailReport from "./report/courseDetailReport.vue";
 import worksDetail3 from "./worksDetail3.vue";
+import LookWorks from "./lookWork.vue";
+
 export default {
   // props: ["checkCourse", "checkStudent","oid","typeNum"],
   props: {
@@ -85,7 +89,8 @@ export default {
     CourseRadar,
     CoursePie,
     CourseDetailReport,
-    worksDetail3
+    worksDetail3,
+    LookWorks
   },
   data() {
     return {