11wqe1 hace 4 meses
padre
commit
af821250ef

+ 145 - 140
src/components/pages/components/exportDataDialog.vue

@@ -2402,7 +2402,7 @@ export default {
           realData[5].per += `任务${index + 1}:${e},`;
         });
         this.claScoFoldLineData.forEach((e, index) => {
-          realData[5].cla += `任务${index + 1}:${e[2]},`;
+          realData[5].cla += `任务${index + 1}:${e},`;
         });
 
         // console.log("realData", realData);
@@ -2749,7 +2749,7 @@ export default {
         realData[5].per += `任务${index + 1}:${e},`;
       });
       this.claScoFoldLineData.forEach((e, index) => {
-        realData[5].cla += `任务${index + 1}:${e[2]},`;
+        realData[5].cla += `任务${index + 1}:${e},`;
       });
 
       console.log("realData", realData);
@@ -3044,7 +3044,7 @@ export default {
 
       this.stageList.forEach((e, index) => {
         repeatWorkCopy[index] = [];
-        scoList[index] = [index,0];
+        scoList[index] = 0;
       });
 
       // 将作业进行阶段分类
@@ -3054,12 +3054,12 @@ export default {
 
       repeatWorkCopy.forEach((e, index) => {
         e.forEach(k => {
-          scoList[index][1] += k.sco * 1;
+          scoList[index] += k.sco * 1;
         });
-        if (scoList[index][1] == 0) {
-          scoList[index][1] = 0;
+        if (scoList[index] == 0) {
+          scoList[index] = 0;
         } else {
-          scoList[index][1] = (scoList[index][1] / e.length).toFixed(1);
+          scoList[index] = (scoList[index] / e.length).toFixed(1);
         }
       });
 
@@ -3067,7 +3067,7 @@ export default {
 
       let zSco = 0;
       this.scoFoldLineData.forEach(e => {
-        zSco += e[1] * 1;
+        zSco += e * 1;
       });
 
       this.star = (zSco / this.scoFoldLineData.length).toFixed(1);
@@ -3108,45 +3108,45 @@ export default {
 
       let repeatWorkCopy = []; // 任务分类作业容器
       let scoList = []; //分数每个任务的所有任务分的集合
-      let blockData = []; //盒须图数据
-      this.claScoFoldLineData = []
-      let scoNum = []// 每个任务下的分数集合
+      // let blockData = []; //盒须图数据
+      // this.claScoFoldLineData = []
+      // let scoNum = []// 每个任务下的分数集合
 
       this.stageList.forEach((e, index) => {
         repeatWorkCopy[index] = [];
         scoList[index] = 0;
-        blockData[index] = []
-        scoNum[index] = []
-        this.claScoFoldLineData[index] = [0,0,0,0,0]
+        // blockData[index] = []
+        // scoNum[index] = []
+        // this.claScoFoldLineData[index] = [0,0,0,0,0]
       });
 
 
       // 将作业进行阶段分类
       repeatWork.forEach(e => {
         repeatWorkCopy[e.task].push(e);
-        scoNum[e.task].push(e.sco * 1);
+        // scoNum[e.task].push(e.sco * 1);
       });
 
       console.log('repeatWorkCopy',JSON.parse(JSON.stringify(repeatWorkCopy)));
 
-      scoNum.forEach((e,i)=>{
-        if (e.length < (toolNum[i].length * this.data12[0].num)) {
-          e = this.padArrayWithZeros(e,(toolNum[i].length * this.data12[0].num))
-        }
-        e = e.sort((a, b) => a - b);
-        console.log('scoNum',e);
+      // scoNum.forEach((e,i)=>{
+      //   if (e.length < (toolNum[i].length * this.data12[0].num)) {
+      //     e = this.padArrayWithZeros(e,(toolNum[i].length * this.data12[0].num))
+      //   }
+      //   e = e.sort((a, b) => a - b);
+      //   console.log('scoNum',e);
         
 
-        let sco2 = (e.length * 0.25).toFixed(0)
-        let sco3 = (e.length * 0.75).toFixed(0)
-        console.log(sco2,sco3);
+      //   let sco2 = (e.length * 0.25).toFixed(0)
+      //   let sco3 = (e.length * 0.75).toFixed(0)
+      //   console.log(sco2,sco3);
         
 
-        this.claScoFoldLineData[i][0] = e[0]
-        this.claScoFoldLineData[i][1] = e[sco2]
-        this.claScoFoldLineData[i][3] = e[sco3] //
-        this.claScoFoldLineData[i][4] = e[e.length-1]
-      })
+      //   this.claScoFoldLineData[i][0] = e[0]
+      //   this.claScoFoldLineData[i][1] = e[sco2]
+      //   this.claScoFoldLineData[i][3] = e[sco3] //
+      //   this.claScoFoldLineData[i][4] = e[e.length-1]
+      // })
 
 
       repeatWorkCopy.forEach((e, index) => {
@@ -3160,12 +3160,12 @@ export default {
         } else {
         
           //所有任务得分 =  任务得分 / 人数
-          scoList[index] = (scoList[index] / (this.data12[0].num * toolNum[index].length).toFixed(1));
+          scoList[index] = (scoList[index] / (this.data12[0].num * toolNum[index].length));
         }
       });
 
       scoList.forEach((e,i)=>{
-        this.claScoFoldLineData[i][2] = e
+        this.claScoFoldLineData[i] = e.toFixed(1)
       })
 
       console.log('this.claScoFoldLineData',this.claScoFoldLineData);
@@ -3389,76 +3389,15 @@ export default {
     // 任务成绩
     initChart2() {
       const chart = echarts.init(this.$refs.cScoEcharts);
-      let boxData =this.claScoFoldLineData;
+      // let boxData =this.claScoFoldLineData;
 
-      let scatterData = this.scoFoldLineData;
+      // let scatterData = this.scoFoldLineData;
 
       // console.log('boxData', boxData);
       // console.log('scatterData', scatterData);
 
       
-      // const option = {
-      //   title: {
-      //     text: "任务成绩",
-      //     left: "left",
-      //     textStyle: {
-      //       color: "rgba(140, 140, 140, 1)", // 标题颜色
-      //       fontSize: 10, // 标题字体大小
-      //       fontWeight: "bold" // 加粗样式
-      //     }
-      //   },
-      //   tooltip: {
-      //     trigger: "axis"
-      //     // formatter: "{b} : {c}"
-      //   },
-      //   legend: {
-      //     data: ["个人数据", "班级平均值"],
-      //     // align: "right",
-      //     orient: "vertical", // 设置为垂直排列
-      //     right: 10
-      //   },
-      //   xAxis: {
-      //     type: "category",
-      //     data: this.stageList.map(item => item),
-      //     axisTick: {
-      //       alignWithLabel: true // 使刻度线和标签对齐
-      //     }
-      //   },
-      //   yAxis: {
-      //     type: "value",
-      //     axisLabel: {
-      //       formatter: "{value}"
-      //     },
-      //     max: 5
-      //   },
-      //   series: [
-      //     {
-      //       name: "个人数据",
-      //       data: this.scoFoldLineData.map(item => item),
-      //       type: "line",
-      //       symbol: "circle",
-      //       symbolSize: 5,
-      //       lineStyle: {
-      //         opacity: 1 // 设置透明度为1,即不透明
-      //       }
-      //     },
-      //     {
-      //       name: "班级平均值",
-      //       data: this.claScoFoldLineData.map(item => item),
-      //       type: "line",
-      //       symbol: "circle",
-      //       symbolSize: 5,
-      //       lineStyle: {
-      //         opacity: 1 // 设置透明度为1,即不透明
-      //       }
-      //     }
-      //     // {
-      //     //   data: this.scoFoldLineData.map(item => item),
-      //     //   type: "line"
-      //     // }
-      //   ]
-      // };
-      let option = {
+      const option = {
         title: {
           text: "任务成绩",
           left: "left",
@@ -3468,62 +3407,123 @@ export default {
             fontWeight: "bold" // 加粗样式
           }
         },
+        tooltip: {
+          trigger: "axis"
+          // formatter: "{b} : {c}"
+        },
         legend: {
-          data: ["个人数据", "班级数据"],
+          data: ["个人数据", "班级平均值"],
           // align: "right",
-          orient:  "vertical", // 设置为垂直排列
+          orient: "vertical", // 设置为垂直排列
           right: 10
         },
-        tooltip: {
-          trigger: "item",
-          axisPointer: {
-            type: "shadow",
-          },
+        xAxis: {
+          type: "category",
+          data: this.stageList.map(item => item),
+          axisTick: {
+            alignWithLabel: true // 使刻度线和标签对齐
+          }
         },
-        xAxis: [
-          {
-            type: "category",
-            data: this.stageList.map(item => item),
-          },
-          
-        ],
-        yAxis: [
-          {
-            type: "value",
-            max: 5
+        yAxis: {
+          type: "value",
+          axisLabel: {
+            formatter: "{value}"
           },
-        ],
+          max: 5
+        },
         series: [
-          {
-            name: "班级数据",
-            type: "boxplot",
-            data: boxData,
-          },
           {
             name: "个人数据",
-            type: "scatter",
-            data: scatterData,
-            itemStyle: {
-              color: function (params) {
-                // 获取当前散点的 X 轴值
-                let xValue = params.value[0];
-                // 获取相应 X 轴位置的盒须图数据的最小值
-                let boxMinValue = boxData[xValue][1];
-                let boxMinValue2 = boxData[xValue][3];
-
-                // 判断散点是否低于盒须图的最小值,低于的话显示红色
-                if (params.value[1] < boxMinValue) {
-                  return "red";
-                } else if( params.value[1] >= boxMinValue2 ){
-                  return "green";
-                }else{
-                  return "yellow";
-                }
-              },
-            },
+            data: this.scoFoldLineData.map(item => item),
+            type: "line",
+            symbol: "circle",
+            symbolSize: 5,
+            lineStyle: {
+              opacity: 1 // 设置透明度为1,即不透明
+            }
           },
-        ],
+          {
+            name: "班级平均值",
+            data: this.claScoFoldLineData.map(item => item),
+            type: "line",
+            symbol: "circle",
+            symbolSize: 5,
+            lineStyle: {
+              opacity: 1 // 设置透明度为1,即不透明
+            }
+          }
+          // {
+          //   data: this.scoFoldLineData.map(item => item),
+          //   type: "line"
+          // }
+        ]
       };
+      // let option = {
+      //   title: {
+      //     text: "任务成绩",
+      //     left: "left",
+      //     textStyle: {
+      //       color: "rgba(140, 140, 140, 1)", // 标题颜色
+      //       fontSize: 10, // 标题字体大小
+      //       fontWeight: "bold" // 加粗样式
+      //     }
+      //   },
+      //   legend: {
+      //     data: ["个人数据", "班级数据"],
+      //     // align: "right",
+      //     orient:  "vertical", // 设置为垂直排列
+      //     right: 10
+      //   },
+      //   tooltip: {
+      //     trigger: "item",
+      //     axisPointer: {
+      //       type: "shadow",
+      //     },
+      //   },
+      //   xAxis: [
+      //     {
+      //       type: "category",
+      //       data: this.stageList.map(item => item),
+      //     },
+          
+      //   ],
+      //   yAxis: [
+      //     {
+      //       type: "value",
+      //       max: 5
+      //     },
+      //   ],
+      //   series: [
+      //     {
+      //       name: "班级数据",
+      //       type: "boxplot",
+      //       data: boxData,
+      //     },
+      //     {
+      //       name: "个人数据",
+      //       type: "scatter",
+      //       data: scatterData,
+      //       itemStyle: {
+      //         color: function (params) {
+      //           // 获取当前散点的 X 轴值
+      //           let xValue = params.value[0];
+      //           // 获取相应 X 轴位置的盒须图数据的最小值
+      //           let boxMinValue = boxData[xValue][1];
+      //           let boxMinValue2 = boxData[xValue][3];
+
+      //           // 判断散点是否低于盒须图的最小值,低于的话显示红色
+      //           if (params.value[1] < boxMinValue) {
+      //             return "red";
+      //           } else if( params.value[1] >= boxMinValue2 ){
+      //             return "green";
+      //           }else{
+      //             return "yellow";
+      //           }
+      //         },
+      //       },
+      //     },
+      //   ],
+      // };
 
       chart.setOption(option);
 
@@ -4095,6 +4095,7 @@ export default {
 .coverPage {
   /* height: 840pt; */
   padding: 185px 8% 0;
+  box-sizing: border-box;
   background-color: #ccc;
   position: relative;
   background-image: url("../../../assets/icon/exportPdfworks/bcg1.svg"),
@@ -4164,10 +4165,14 @@ export default {
 }
 .txt >>> .el-select {
   width: 100%;
+  height: 100%;
 }
 .txt >>> .el-input__icon {
   line-height: 0;
 }
+.txt >>> .el-select>.el-input{
+  height: 100%;
+}
 .txt >>> .el-input--suffix .el-input__inner {
   text-align: center;
   color: #000;

+ 56 - 41
src/components/pages/components/exportWorksDialog.vue

@@ -584,68 +584,77 @@
                   </div>
                 </div>
               </div>
-              <!-- 阶段作业得分  -->
+             
+              <!-- 阶段  -->
               <div
-                class="taskSco"
                 v-if="
-                  k.toolEList[0].content &&
-                    k.toolEList[0].content.length &&
-                    k.toolEList[0].eList &&
-                    CState != 5
+                    l.eList &&
+                    l.eList.length &&
+                    CState != 5 && 
+                    lind == k.toolEList.length - 1
                 "
+                class="taskSco"
               >
                 <div class="taskScoTit">
                   <div>
-                    任务得分:<span style="color: rgba(242, 161, 75, 1)">{{
+                    作业得分:<span style="color: rgba(242, 161, 75, 1)">{{
                       totalScore(k.toolEList[0].rate)
                     }}</span>
                   </div>
-                  <div>提交时间:{{ k.toolEList[0].time }}</div>
+                  <div>提交时间:{{ l.time }}</div>
                 </div>
 
                 <!-- 作业评分 -->
                 <div class="taskScoCon">
                   <!-- 分数详情与素养 -->
-                  <div
-                    v-if="k.toolEList[0].eList"
-                    class="taskScoConEList"
-                    style="flex: 1;display: flex;"
-                  >
-                    <div style="width: 49%; margin: 0 20px 10px 0">
+                  <div style="flex: 1; display: flex; flex-wrap: wrap">
+                    <div style="width: 375px; margin:0 20px 10px 0">
                       <div class="taskScoConTit">分数详情</div>
-                      <div style="display: flex;flex-wrap: wrap;">
+                      <div
+                        v-for="(wItem, ind) in l.eList"
+                        :key="ind + 's'"
+                        class="score_box"
+                        style="width: 100%"
+                      >
                         <div
-                          v-for="(wItem, ind) in k.toolEList[0].eList"
-                          :key="ind + 's'"
-                          class="score_box"
+                          style="
+                                display: flex;
+                                justify-content: space-between;
+                                align-items: center;
+                                width: 100%;
+                                min-width: 48%;
+                              "
                         >
                           <div class="RootImgBlock">
-                            <div>{{ wItem.value }}</div>
+                            {{ wItem.value }}
                           </div>
+
                           <el-rate
                             class="rate_size"
-                            style="width: 120px;display: flex;flex-shrink: 0;"
+                            disabled-void-color="#ccc"
+                            disabled
+                            style="width: 130px"
                             v-model="k.toolEList[0].rate[wItem.value]"
-                            @change="updateRate(i.id, k.task, 0)"
                           ></el-rate>
                         </div>
                       </div>
                     </div>
 
-                    <div
-                      v-if="k.toolEList[0].eList"
-                      style="width: 49%;display: flex;flex-direction: column;"
-                    >
+                    <div style="flex: 1">
                       <div class="taskScoConTit">素养</div>
                       <div class="WorkConSY">
-                        <div
-                          v-for="(wItem, ind) in k.toolEList[0].eList"
-                          :key="ind + 's'"
-                        >
-                          <div class="RootImgBlockSy">
-                            {{ wItem.target[wItem.target.length - 1] }}
-                          </div>
+                        <div v-for="(wItem, ind) in l.eList" :key="ind + 's'">
+                          <el-tooltip
+                            class="item"
+                            effect="dark"
+                            :content="wItem.target[wItem.target.length - 1]"
+                            placement="top-start"
+                          >
+                            <div class="RootImgBlockSy">
+                              {{ wItem.target[wItem.target.length - 1] }}
+                            </div>
+                          </el-tooltip>
                         </div>
                       </div>
                     </div>
@@ -654,26 +663,24 @@
                   <!-- 评语 -->
                   <div
                     style="
-                          width: 48%;
+                          flex: 1;
+                          flex-shrink: 0;
                           display: flex;
                           flex-direction: column;
                           margin-left: 10px;
                         "
-                    v-if="
-                      k.toolEList[0].rate.content || k.toolEList[0].rate.comment
-                    "
+                    v-if="l.rate.content"
                   >
                     <div class="taskScoConTit">评语</div>
                     <div class="WorkCon">
-                      {{
-                        k.toolEList[0].rate.content ||
-                          k.toolEList[0].rate.comment
-                      }}
+                      {{ l.rate.content }}
                     </div>
                   </div>
                 </div>
               </div>
+
             </div>
+          
             <!-- 思维导图 -->
             <div v-if="CState == 5" class="taskTitInd">
               <div></div>
@@ -780,12 +787,15 @@ export default {
     totalScore() {
       return function(val) {
         let valT = JSON.parse(JSON.stringify(val));
+        
         if (!valT) return "0.0";
 
         delete valT.content;
         delete valT.comment;
+        console.log('valT',JSON.parse(JSON.stringify(val)));
 
         let data = Object.values(valT);
+        console.log('data',JSON.parse(JSON.stringify(data)));
 
         let new1 = data.reduce(function(pre, next, index) {
           return pre + next * 1;
@@ -1023,11 +1033,16 @@ export default {
                     }
                   });
                   // 将没有提交作业,但是有评分标准的数据填上数据,防止报错
-                  if (!l.rate && l.eList && l.eList.length) {
+                  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;
+                      });
                   }
                   // 将素养添加进treeData中
                   if (l.eList && l.eList.length) {

+ 95 - 91
src/components/pages/components/lookWork.vue

@@ -2,12 +2,12 @@
   <div class="pbl" v-loading="loading">
     <div class="titBri">
       <div class="claInfo">
-        <img v-if="userImg" :src="userImg" alt="" />
-        <img
+        <img style="height: 100%;" src="../../../assets/avatar.png" alt="" />
+        <!-- <img
           v-else
           src="https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/static/img/portal.b3cf7fa.png"
           alt=""
-        />
+        /> -->
         <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>
@@ -576,97 +576,86 @@
                       </div>
                     </div>
                   </div>
+                  
                 </div>
-              </div>
-              <!-- 阶段作业得分  -->
-              <div
-                class="taskSco"
-                v-if="
-                  k.toolEList[0].content &&
-                    k.toolEList[0].content.length &&
-                    k.toolEList[0].eList &&
-                    CState != 5
-                "
-              >
-                <div class="taskScoTit">
-                  <div>
-                    任务得分:<span style="color: rgba(242, 161, 75, 1)">{{
-                      totalScore(k.toolEList[0].rate)
-                    }}</span>
-                    分
+
+                <!-- 阶段  -->
+                <div
+                  class="taskSco"
+                  v-if="l.eList && CState != 5 && lind == k.toolEList.length - 1"
+                >
+                  <div class="taskScoTit">
+                    <div>
+                      作业得分:<span style="color: rgba(242, 161, 75, 1)">{{
+                        totalScore(k.toolEList[0].rate)
+                      }}</span>
+                      分
+                    </div>
+                    <div>提交时间:{{ l.time }}</div>
                   </div>
-                  <div>提交时间:{{ k.toolEList[0].time }}</div>
-                </div>
 
-                <!-- 作业评分 -->
-                <div class="taskScoCon">
-                  <!-- 分数详情与素养 -->
-                  <div
-                    v-if="k.toolEList[0].eList"
-                    class="taskScoConEList"
-                    style="width:100%"
-                  >
-                    <div style="width: 49%; margin: 0 20px 10px 0">
-                      <div class="taskScoConTit">分数详情</div>
-                      <div style="display: flex;flex-wrap: wrap;">
-                        <div
-                          v-for="(wItem, ind) in k.toolEList[0].eList"
-                          :key="ind + 's'"
-                          class="score_box"
-                        >
-                          <div class="RootImgBlock">
-                            <div>{{ wItem.value }}</div>
+                  <!-- 作业评分 -->
+                  <div class="taskScoCon">
+                    <!-- 分数详情与素养 -->
+                    <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;">
+                          <div
+                            v-for="(wItem, ind) in l.eList"
+                            :key="ind + 's'"
+                            class="score_box"
+                          >
+                            <div class="RootImgBlock">
+                              <div>{{ wItem.value }}</div>
+                            </div>
+
+                            <el-rate
+                              class="rate_size"
+                              style="width: 120px;display: flex;flex-shrink: 0;"
+                              v-model="k.toolEList[0].rate[wItem.value]"
+                              @change="updateRate(i.id, k.task, 0)"
+                            ></el-rate>
                           </div>
-                          <el-rate
-                            class="rate_size"
-                            style="width: 120px;display: flex;flex-shrink: 0;"
-                            v-model="k.toolEList[0].rate[wItem.value]"
-                            @change="updateRate(i.id, k.task, 0)"
-                          ></el-rate>
                         </div>
                       </div>
-                    </div>
 
-                    <div
-                      v-if="k.toolEList[0].eList"
-                      style="width: 49%;display: flex;flex-direction: column;"
-                    >
-                      <div class="taskScoConTit">素养</div>
-                      <div class="WorkConSY">
-                        <div
-                          v-for="(wItem, ind) in k.toolEList[0].eList"
-                          :key="ind + 's'"
-                        >
-                          <div class="RootImgBlockSy">
-                            {{ wItem.target[wItem.target.length - 1] }}
+                      <div
+                        v-if="l.eList"
+                        style="width: 49%;display: flex;flex-direction: column;"
+                      >
+                        <div class="taskScoConTit">素养</div>
+                        <div class="WorkConSY">
+                          <div v-for="(wItem, ind) in l.eList" :key="ind + 's'">
+                            <div class="RootImgBlockSy">
+                              <span> {{ wItem.target[wItem.target.length - 1] }}</span>
+                            </div>
                           </div>
                         </div>
                       </div>
                     </div>
-                  </div>
 
-                  <!-- 评语 -->
-                  <div
-                    style="
+                    <!-- 评语 -->
+                    <div
+                      style="
                           width: 40%;
                           display: flex;
                           flex-direction: column;
                           margin-left: 10px;
                         "
-                    v-if="
-                      k.toolEList[0].rate.content || k.toolEList[0].rate.comment
-                    "
-                  >
-                    <div class="taskScoConTit">评语</div>
-                    <div class="WorkCon">
-                      {{
-                        k.toolEList[0].rate.content ||
-                          k.toolEList[0].rate.comment
-                      }}
+                      v-if="l.rate.content || l.rate.comment"
+                    >
+                      <div class="taskScoConTit">评语</div>
+                      <div class="WorkCon">
+                        {{ l.rate.content || l.rate.comment }}
+                      </div>
                     </div>
-                  </div>
+                  </div>      
                 </div>
-              </div>
+              </div>  
             </div>
           </div>
         </div>
@@ -746,6 +735,7 @@ export default {
     totalScore() {
       return function(val) {
         let valT = JSON.parse(JSON.stringify(val));
+
         if (!valT) return "0.0";
 
         delete valT.content;
@@ -767,11 +757,11 @@ export default {
     this.cid = JSON.parse(JSON.stringify(this.id));
     this.uid = JSON.parse(JSON.stringify(this.studentId));
 
-    if (this.isStu == 0) {
+    // if (this.isStu == 0) {
       this.getWorks1();
-    } else {
-      this.exportPdfSet();
-    }
+    // } else {
+      // this.exportPdfSet();
+    // }
   },
   watch: {
     studentId(newL, oldL) {
@@ -780,11 +770,11 @@ export default {
       this.cid = JSON.parse(JSON.stringify(this.id));
       this.uid = JSON.parse(JSON.stringify(this.studentId));
 
-      if (this.isStu == 0) {
+      // if (this.isStu == 0) {
         this.getWorks1();
-      } else {
-        this.exportPdfSet();
-      }
+      // } else {
+        // this.exportPdfSet();
+      // }
     }
   },
   methods: {
@@ -808,8 +798,7 @@ export default {
       let processedData = this.workList[stage].taskList[task].toolEList[tool]
         .rate;
       console.log("processedData", processedData);
-
-      console.log(stage, task, tool);
+      // console.log(stage, task, tool);
       let params = {
         cid: this.cid,
         s: stage,
@@ -883,13 +872,15 @@ export default {
             var wordInfo = res.data[12]; //文档作业
             this.workEvaList = res.data[13];
 
-            console.log('res.data[0][0]',res.data[0][0]);
+            // console.log('res.data[0][0]',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++) {
@@ -904,14 +895,14 @@ export default {
               }
             }
             this.dyList = dyList;
-            console.log("this.dyList", this.dyList);
+            // console.log("this.dyList", this.dyList);
 
             // console.log("this.workEvaList", this.workEvaList);
 
             let framework = [];
             if (res.data[0].length) {
               let elistData = JSON.parse(res.data[0][0].chapters);
-              console.log("elistData", JSON.parse(JSON.stringify(elistData)));
+              // console.log("elistData", JSON.parse(JSON.stringify(elistData)));
 
               elistData.forEach((e, i) => {
                 framework[i] = {
@@ -996,7 +987,7 @@ export default {
             AreaAllWork.sort(function(a, b) {
               return a.stage - b.stage; //从小到大排序
             });
-            console.log("AreaAllWork", JSON.parse(JSON.stringify(AreaAllWork)));
+            // console.log("AreaAllWork", JSON.parse(JSON.stringify(AreaAllWork)));
 
             framework.forEach(e => {
               e.taskList.forEach((k, kin) => {
@@ -1027,7 +1018,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") {
@@ -1038,12 +1029,25 @@ export default {
                     }
                   });
 
-                  if (!l.rate && l.eList && l.eList.length) {
+                  // 将没有提交作业,但是有评分标准的数据填上数据,防止报错
+                  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;
+                      });
                   }
+                // }
+                  // if (!l.rate && l.eList && l.eList.length) {
+                  //   l.rate = { content: "" };
+                  //   l.eList.forEach(elp => {
+                  //     l.rate[elp.detail] = 0;
+                  //   });
+                  // }
                 });
               });
             });

+ 8 - 0
src/components/pages/course.vue

@@ -263,6 +263,14 @@
                 " @click="goToCourse5(item.courseId)">
 									<img src="../../assets/icon/course/edit.svg">
 								</div>
+
+                <div class="t_b_Item" v-if="((item.userid == userid) ||
+                (item.course_teacher &&
+                  item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                item.state == 6
+                " @click="goToCourse3(item.courseId)">
+									<img src="../../assets/icon/course/edit.svg">
+								</div>
     					</el-tooltip>
 
 							<el-tooltip effect="dark" content="删除" placement="top" v-if="item.isCourseType == 1 || role == '1'">