11wqe1 3 月之前
父节点
当前提交
359a5e3b9d

+ 28 - 16
src/components/pages/components/exportDataDialog.vue

@@ -902,7 +902,7 @@
                     l.content.length &&
                     l.eList &&
                     l.eList.length &&
-                    CState == 5
+                    (CState == 5 || CState == 6)
                 "
                 class="taskSco"
               >
@@ -995,7 +995,7 @@
                 v-if="
                     l.eList &&
                     l.eList.length &&
-                    CState != 5 && CState != '' &&
+                    CState != 5 && CState != 6 && CState != '' &&
                     lind == k.toolEList.length - 1
                 "
                 class="taskSco"
@@ -1230,9 +1230,9 @@ export default {
       cp: [4, 45, 15, 16, 50, 41, 47],
       pj: [40],
       bc: [18, 21, 23, 24, 32, 57, 63, 71],
-      xk: [28, 31, 39, 66, , 68, 69, 70],
+      xk: [28, 31, 39, 66, 68, 69, 70],
       // 师生互动工具list
-      TeaStuInt: [ 1, 52, 3, 48, 16],
+      TeaStuInt: [ 52,48,3,1,16,45,47,41],
       // 处理过的分组,师生互动数据
       // TeaStuInt2: [1, 3, 52, 4, 10, 11, 13, 15],
 
@@ -1351,10 +1351,10 @@ export default {
           }
         })
 
-        // console.log('TimeList',TimeList);
         TimeList.sort(function(a,b){
           return a-b;//从小到大排序
         })
+        // console.log('TimeList',TimeList[0]);
 
 
         return this.convertToTimestamp(TimeList[0]);
@@ -1697,12 +1697,12 @@ export default {
                     }
                   });
                   // 将没有提交作业,但是有评分标准的数据填上数据,防止报错
-                  if (!l.rate && l.eList && l.eList.length && this.CState == 5) {
+                  if (!l.rate && l.eList && l.eList.length && (this.CState == 5 || this.CState == 6)) {
                     l.rate = { content: "" };
                     l.eList.forEach(elp => {
                       l.rate[elp.detail] = 0;
                     });
-                  }else if ((!l.rate && l.eList && l.eList.length && this.CState != 5)) {
+                  }else if ((!l.rate && l.eList && l.eList.length && this.CState != 5&& this.CState != 6)) {
                       l.rate = { content: "" };
                       l.eList.forEach(elp => {
                         l.rate[elp.value] = 0;
@@ -2616,10 +2616,10 @@ export default {
             if (
               data.choices &&
               data.choices.length &&
-              data.choices[0].message
+              data.choices[0].messagea
             ) {
               let content = data.choices[0].message.content;
-              this.AiAnalysisCon2.allFx = content.replaceAll("<br>", "");
+              this.AiAnlysisCon2.allFx = content.replaceAll("<br>", "");
             }
 
             this.loading = false;
@@ -2637,10 +2637,10 @@ export default {
     },
     async getAiAnalysisCon3() {
       await this.getAiAnalysisCon2();
-      console.log("666");
+      // console.log("666");
       await this.updateFx();
 
-      console.log("111");
+      // console.log("111");
     },
     // 处理学习行为记录ai分析数据
     async getAiAnalysisCon2() {
@@ -2931,7 +2931,7 @@ export default {
           });
         });
       });
-      console.log("this.toolData", this.toolData);
+      // console.log("this.toolData", this.toolData);
 
       // 环形图占比
       this.toolRatio[0].value = this.toolData[0].length;
@@ -3380,6 +3380,18 @@ export default {
         repeatWorkCopy[e.task].push(e);
       });
 
+      // 获取任务下的可评分工具数量
+      let toolNum = []
+
+      this.toolPercentage.forEach((e,i) => {
+        toolNum[i] = []
+        e.forEach(k=>{
+          if (this.TeaStuInt.indexOf(k) != -1) {
+            toolNum[i].push(k)
+          }
+        })
+      });
+
       repeatWorkCopy.forEach((e, index) => {
         e.forEach(k => {
           scoList[index] += k.sco * 1;
@@ -3387,7 +3399,7 @@ export default {
         if (scoList[index] == 0) {
           scoList[index] = 0;
         } else {
-          scoList[index] = (scoList[index] / e.length).toFixed(1);
+          scoList[index] = (scoList[index] / toolNum[index].length).toFixed(1);
         }
       });
 
@@ -3422,8 +3434,8 @@ export default {
       });
 
 
-         // 获取任务下的可评分工具数量
-         let toolNum = []
+        // 获取任务下的可评分工具数量
+        let toolNum = []
 
         this.toolPercentage.forEach((e,i) => {
           toolNum[i] = []
@@ -3455,7 +3467,7 @@ export default {
         // scoNum[e.task].push(e.sco * 1);
       });
 
-      console.log('repeatWorkCopy',JSON.parse(JSON.stringify(repeatWorkCopy)));
+      // console.log('repeatWorkCopy',JSON.parse(JSON.stringify(repeatWorkCopy)));
 
       // scoNum.forEach((e,i)=>{
       //   if (e.length < (toolNum[i].length * this.data12[0].num)) {

+ 7 - 6
src/components/pages/components/exportWorksDialog.vue

@@ -88,7 +88,7 @@
           v-if="isStage(i.taskList)"
           class="stageCon"
         >
-          <div v-if="CState != 5" class="stageTit">
+          <div v-if="CState != 5 && CState != 6" class="stageTit">
             第{{ i.id * 1 + 1 }}阶段<span v-if="i.name">:{{ i.name }}</span>
           </div>
           <div
@@ -568,7 +568,7 @@
                     l.content.length &&
                     l.eList &&
                     l.eList.length &&
-                    CState == 5
+                    (CState == 5 || CState == 6)
                 "
                 class="taskSco"
               >
@@ -662,6 +662,7 @@
                     l.eList &&
                     l.eList.length &&
                     CState != 5 && 
+                    CState != 6 && 
                     lind == k.toolEList.length - 1
                 "
                 class="taskSco"
@@ -754,12 +755,12 @@
             </div>
           
             <!-- 思维导图 -->
-            <div v-if="CState == 5" class="taskTitInd">
+            <div v-if="CState == 5 || CState == 6" class="taskTitInd">
               <div></div>
               <span>任务评价体系</span>
             </div>
             <exjsmind
-              v-if="CState == 5"
+              v-if="CState == 5 || CState == 6"
               :treeData="k.treeData"
               :keyL="k.task.toString()"
             ></exjsmind>
@@ -1161,12 +1162,12 @@ export default {
                     }
                   });
                   // 将没有提交作业,但是有评分标准的数据填上数据,防止报错
-                  if (!l.rate && l.eList && l.eList.length && this.CState == 5) {
+                  if (!l.rate && l.eList && l.eList.length && (this.CState == 5 || this.CState == 6)) {
                     l.rate = { content: "" };
                     l.eList.forEach(elp => {
                       l.rate[elp.detail] = 0;
                     });
-                  }else if ((!l.rate && l.eList && l.eList.length && this.CState != 5)) {
+                  }else if ((!l.rate && l.eList && l.eList.length && this.CState != 5 && this.CState != 6)) {
                       l.rate = { content: "" };
                       l.eList.forEach(elp => {
                         l.rate[elp.value] = 0;

+ 6 - 6
src/components/pages/components/lookReport.vue

@@ -28,14 +28,14 @@
       </div>
       <div class="JsonTitBtn">
         <el-button
-          v-if="checkCourse.state == 5"
+          v-if="checkCourse.state == 5 || checkCourse.state == 6"
           @click="exportWorkPdf"
           type="primary"
           size="small"
           >一键导出</el-button
         >
         <el-button
-          v-if="checkCourse.state == 5"
+          v-if="checkCourse.state == 5 || checkCourse.state == 6"
           @click="batchExportPdf"
           :type="multipleSelection.length < 2 ? 'info' : 'primary'"
           :disabled="multipleSelection.length < 2"
@@ -112,7 +112,7 @@
         @selection-change="handleSelectionChange"
       >
         <el-table-column
-          v-if="checkCourse.state == 5"
+          v-if="checkCourse.state == 5 || checkCourse.state == 6"
           key="1"
           type="selection"
           width="55"
@@ -139,7 +139,7 @@
         <el-table-column align="center" label="操作" min-width="20">
           <template slot-scope="scope">
             <el-button
-              v-if="checkCourse.state == 5"
+              v-if="checkCourse.state == 5 || checkCourse.state == 6"
               type="primary"
               size="small"
               @click="lookPdf(scope.row)"
@@ -153,7 +153,7 @@
               >查看报告</el-button
             >
             <el-button
-              v-if="checkCourse.state == 5"
+              v-if="checkCourse.state == 5 || checkCourse.state == 6"
               type="primary"
               size="small"
               @click="getPdf(scope.row)"
@@ -192,7 +192,7 @@
         </div>
       </div>
       <exportDataDialog
-        v-if="checkCourse.state == 5"
+        v-if="checkCourse.state == 5 || checkCourse.state == 6"
         :key="exportW"
         :digNum="digNum"
         :oid="oid"

+ 7 - 7
src/components/pages/components/lookWork.vue

@@ -86,7 +86,7 @@
             v-if="isStage(i.taskList)"
             class="stageCon"
           >
-            <div v-if="CState != 5" class="stageTit">
+            <div v-if="CState != 5 && CState != 6" class="stageTit">
               阶段{{ i.id + 1 }}:{{ i.name }}
             </div>
 
@@ -587,7 +587,7 @@
                 <!-- ai作业得分  -->
                 <div
                   class="taskSco"
-                  v-if="l.content && l.content.length && l.eList && CState == 5"
+                  v-if="l.content && l.content.length && l.eList && (CState == 5 || CState == 6)"
                 >
                   <div class="taskScoTit">
                     <div>
@@ -662,7 +662,7 @@
                 <div
                   class="taskSco"
                   v-if="
-                    l.eList && CState != 5 && lind == k.toolEList.length - 1
+                    l.eList && CState != 5 && CState != 6 && lind == k.toolEList.length - 1
                   "
                 >
                   <div class="taskScoTit">
@@ -935,7 +935,7 @@ export default {
       let elist = this.workList[stage].taskList[task].toolEList[tool].eList;
 
       elist.forEach(e => {
-        if (this.CState == 5) {
+        if (this.CState == 5 ||this.CState == 6) {
           processedData[e.detail] = 0;
         } else {
           processedData[e.value] = 0;
@@ -1190,8 +1190,8 @@ export default {
                     !l.rate &&
                     l.eList &&
                     l.eList.length &&
-                    this.CState == 5
-                  ) {
+                    (this.CState == 5 || this.CState == 6)
+                  ) {                    
                     l.rate = { content: "" };
                     l.eList.forEach(elp => {
                       l.rate[elp.detail] = 0;
@@ -1200,7 +1200,7 @@ export default {
                     !l.rate &&
                     l.eList &&
                     l.eList.length &&
-                    this.CState != 5
+                    (this.CState != 5 && this.CState != 6)
                   ) {
                     l.rate = { content: "" };
                     l.eList.forEach(elp => {

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

@@ -1472,7 +1472,7 @@
     <div class="report_box" v-if="reportVisible">
 
     <el-dialog
-      v-if="exportData.state == 5"
+      v-if="exportData.state == 5 || exportData.state == 6"
       :visible.sync="reportVisible"
       :before-close="handleClose"
       class="worksDialogCSSExp"