瀏覽代碼

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

SanHQin 9 月之前
父節點
當前提交
fa54d02b6c

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

@@ -1,10 +1,15 @@
 <template>
   <div class="pbl">
-    <div class="pdfCon" ref="reportPdf" v-loading="loading" element-loading-text="小可正在生成报告,请稍等。"
-    element-loading-spinner="el-icon-loading">
+    <div
+      class="pdfCon"
+      ref="reportPdf"
+      v-loading="loading"
+      element-loading-text="小可正在生成报告,请稍等。"
+      element-loading-spinner="el-icon-loading"
+    >
       <div class="AiBtn" v-if="isDown">
         <div style="display: flex;">
-          <el-button type="primary" size="small" @click="getAiAnalysisCon2"
+          <el-button type="primary" size="small" @click="getAiAnalysisCon3"
             >AI分析</el-button
           >
           <el-button type="primary" @click="isGetPdf" size="small"
@@ -1562,13 +1567,17 @@ export default {
                 JSON.stringify(this.AiAnalysisCon2)
               );
             }
+            // else{
+
+            //   await this.getAiAnalysisCon2()
+            // }
             // }
 
-            setTimeout(() => {
+            // setTimeout(() => {
               this.loading = false;
 
-              return resolve();
-            }, 1500);
+              return resolve(1);
+            // }, 1500);
           })
           .catch(err => {
             console.error(err);
@@ -1810,22 +1819,32 @@ export default {
         this.loading = false;
         return this.$message.info("请选择数据后,再进行导出");
       }
+console.log('this.tableData',this.tableData);
 
       if (this.tableData.length == 1) {
         this.uid2 = this.tableData[0].userid;
         this.worksDialogCon2 = this.tableData[0];
         await this.getData();
+        console.log('8888');
+        
 
         if (this.data10 && this.data10.length) {
+
           this.loading = false;
           this.isDown = false;
           setTimeout(() => {
             this.getPdf();
           }, 500);
         }else{
-          await this.getAiAnalysisCon2()
-        }
+          console.log('getAiAnalysisCon33333333333333333333');
 
+          await this.getAiAnalysisCon3()
+          this.loading = false;
+          this.isDown = false;
+          setTimeout(() => {
+            this.getPdf();
+          }, 500);
+        }
       } else {
         this.circulatePdf();
       }
@@ -2118,7 +2137,7 @@ export default {
         uid: this.userid,
         mind_map_question: ""
       };
-   
+
       return new Promise((resolve, reject) => {
         this.ajax
           .post("https://gpt4.cocorobo.cn/chat", params)
@@ -2263,123 +2282,132 @@ export default {
       };
       return new Promise((resolve, reject) => {
         this.ajax
-        .post("https://gpt4.cocorobo.cn/chat", params)
-        .then(response => {
-
-          let data = response.data.FunctionResponse;
-          console.log("data", data);
-
-          if (data.choices && data.choices.length && data.choices[0].message) {
-            let content = data.choices[0].message.content;
-            this.AiAnalysisCon2.allFx = content.replaceAll("<br>", "");
-          }
+          .post("https://gpt4.cocorobo.cn/chat", params)
+          .then(response => {
+            let data = response.data.FunctionResponse;
+            console.log("data", data);
 
-          this.loading = false;
-          this.canvasLing.splice(6, 1, false);
+            if (
+              data.choices &&
+              data.choices.length &&
+              data.choices[0].message
+            ) {
+              let content = data.choices[0].message.content;
+              this.AiAnalysisCon2.allFx = content.replaceAll("<br>", "");
+            }
 
-          if (this.digNum == 0) {
             this.loading = false;
-            this.isDown = false;
-            setTimeout(() => {
-              this.getPdf();
-            }, 500);
-          }
-         
+            this.canvasLing.splice(6, 1, false);
+
+            // if (this.digNum == 0) {
+            //   this.loading = false;
+            //   this.isDown = false;
+            //   setTimeout(() => {
+            //     this.getPdf();
+            //   }, 500);
+            // }
 
-          this.uploadData();
-          return resolve(1)
-        })
-        .catch(error => {
-          this.canvasLing.splice(6, 1, false);
+            this.uploadData();
+            return resolve(1);
+          })
+          .catch(error => {
+            this.canvasLing.splice(6, 1, false);
 
-          console.log(error);
-        });
-      })
-      
+            console.log(error);
+          });
+      });
+    },
+    async getAiAnalysisCon3() {
+      await this.getAiAnalysisCon2();
+      console.log("666");
+      await this.updateFx();
+
+      console.log("111");
     },
     // 处理学习行为记录ai分析数据
     async getAiAnalysisCon2() {
-      this.$message.info("开始分析中...");
-      let realData = [
-        { per: "", cla: "", nam: "zy" },
-        { per: "", cla: "", nam: "zb" },
-        { per: "", cla: "", nam: "shd" },
-        { per: "", cla: "", nam: "sshZ" },
-        { per: "", cla: "", nam: "sshB" },
-        { per: "", cla: "", nam: "ach" }
-      ];
-      for (let index = 0; index < this.canvasLing.length; index++) {
-        this.canvasLing.splice(index, 1, true);
-      }
-      // 作业提交率
-      this.stageListPer.forEach((e, index) => {
-        realData[0].per += `任务${index + 1}:${e},`;
-      });
-      this.classStageListPer.forEach((e, index) => {
-        realData[0].cla += `任务${index + 1}:${e},`;
-      });
+      return new Promise((resolve, reject) => {
+        this.$message.info("开始分析中...");
+        let realData = [
+          { per: "", cla: "", nam: "zy" },
+          { per: "", cla: "", nam: "zb" },
+          { per: "", cla: "", nam: "shd" },
+          { per: "", cla: "", nam: "sshZ" },
+          { per: "", cla: "", nam: "sshB" },
+          { per: "", cla: "", nam: "ach" }
+        ];
+        for (let index = 0; index < this.canvasLing.length; index++) {
+          this.canvasLing.splice(index, 1, true);
+        }
+        // 作业提交率
+        this.stageListPer.forEach((e, index) => {
+          realData[0].per += `任务${index + 1}:${e},`;
+        });
+        this.classStageListPer.forEach((e, index) => {
+          realData[0].cla += `任务${index + 1}:${e},`;
+        });
 
-      // 完成任务方式占比
-      this.columnData[0].data.forEach((e, index) => {
-        realData[1].per += `任务${index + 1}:${e},`;
-      });
-      this.columnData[1].data.forEach((e, index) => {
-        realData[1].cla += `任务${index + 1}:${e},`;
-      });
+        // 完成任务方式占比
+        this.columnData[0].data.forEach((e, index) => {
+          realData[1].per += `任务${index + 1}:${e},`;
+        });
+        this.columnData[1].data.forEach((e, index) => {
+          realData[1].cla += `任务${index + 1}:${e},`;
+        });
 
-      // 师生互动
-      this.interactWork.forEach((e, index) => {
-        realData[2].per += `任务${index + 1}:${e},`;
-      });
-      this.claInteractWork.forEach((e, index) => {
-        realData[2].cla += `任务${index + 1}:${e},`;
-      });
+        // 师生互动
+        this.interactWork.forEach((e, index) => {
+          realData[2].per += `任务${index + 1}:${e},`;
+        });
+        this.claInteractWork.forEach((e, index) => {
+          realData[2].cla += `任务${index + 1}:${e},`;
+        });
 
-      // 生生互动(主动)
-      this.stuInterAllLike.forEach((e, index) => {
-        realData[3].per += `任务${index + 1}:${e.length},`;
-      });
-      this.claAtuInterAllLike.forEach((e, index) => {
-        realData[3].cla += `任务${index + 1}:${e},`;
-      });
+        // 生生互动(主动)
+        this.stuInterAllLike.forEach((e, index) => {
+          realData[3].per += `任务${index + 1}:${e.length},`;
+        });
+        this.claAtuInterAllLike.forEach((e, index) => {
+          realData[3].cla += `任务${index + 1}:${e},`;
+        });
 
-      // 生生互动(被动)
-      this.bdStuInterAllLike.forEach((e, index) => {
-        realData[4].per += `任务${index + 1}:${e.length},`;
-      });
-      this.claAtuInterAllLike.forEach((e, index) => {
-        realData[4].cla += `任务${index + 1}:${e},`;
-      });
+        // 生生互动(被动)
+        this.bdStuInterAllLike.forEach((e, index) => {
+          realData[4].per += `任务${index + 1}:${e.length},`;
+        });
+        this.claAtuInterAllLike.forEach((e, index) => {
+          realData[4].cla += `任务${index + 1}:${e},`;
+        });
 
-      // 任务成绩
-      this.scoFoldLineData.forEach((e, index) => {
-        realData[5].per += `任务${index + 1}:${e},`;
-      });
-      this.claScoFoldLineData.forEach((e, index) => {
-        realData[5].cla += `任务${index + 1}:${e},`;
-      });
+        // 任务成绩
+        this.scoFoldLineData.forEach((e, index) => {
+          realData[5].per += `任务${index + 1}:${e},`;
+        });
+        this.claScoFoldLineData.forEach((e, index) => {
+          realData[5].cla += `任务${index + 1}:${e},`;
+        });
 
-      // console.log("realData", realData);
-      this.realData = realData;
+        // console.log("realData", realData);
+        this.realData = realData;
 
-      let forAllList = [];
+        let forAllList = [];
 
-      for (let i = 0; i < realData.length; i++) {
-        let mkAwit = this.AIPdfComment(realData[i]);
-        forAllList.push(mkAwit);
-      }
-      Promise.all(forAllList)
-      .then(async values => {
-        // console.log(" this.AiAnalysisCon2", this.AiAnalysisCon2);
-        for (let index = 0; index < values.length; index++) {
-          this.canvasLing.splice(index, 1, false);
+        for (let i = 0; i < realData.length; i++) {
+          let mkAwit = this.AIPdfComment(realData[i]);
+          forAllList.push(mkAwit);
         }
-         this.updateFx();
-      })
-      .catch(reason => {
-        console.error("reason", reason);
+        Promise.all(forAllList)
+          .then(async values => {
+            // console.log(" this.AiAnalysisCon2", this.AiAnalysisCon2);
+            for (let index = 0; index < values.length; index++) {
+              this.canvasLing.splice(index, 1, false);
+            }
+            return resolve(1)
+          })
+          .catch(reason => {
+            console.error("reason", reason);
+          });
       });
-     
     },
     // 上传ai分析
     uploadData() {
@@ -2461,6 +2489,8 @@ export default {
     },
     // 一键打包所有作业
     async circulatePdf() {
+      console.log('circulatePdf');
+      
       let _this = this;
       var zip = new JSZip();
       let pdfList = [];
@@ -2479,12 +2509,16 @@ export default {
           ClaNam = this.tableData[i].class.split(",");
           this.claV = stuCla[0];
           this.claOptions.push({ value: stuCla[0], label: ClaNam[0] });
-        } 
+        }
         this.uid2 = this.tableData[i].userid;
         this.worksDialogCon2 = this.tableData[i];
 
         // await this.exportPdfSet();
         await this.getData();
+        if (this.data10 && this.data10.length) {
+        }else{
+          await this.getAiAnalysisCon3();
+        }
 
         let a = await this.getPdf2();
         pdfList.push(a);
@@ -4219,10 +4253,10 @@ export default {
   border-radius: 10px;
   position: relative;
 }
-.pbl >>> .el-loading-spinner{
+.pbl >>> .el-loading-spinner {
   top: 500px !important;
 }
-.zxt >>> .el-loading-spinner{
+.zxt >>> .el-loading-spinner {
   top: 50% !important;
 }
 .pdfCon {

File diff suppressed because it is too large
+ 532 - 506
src/components/pages/components/exportWorksDialog.vue


+ 15 - 3
src/components/pages/components/lookReport.vue

@@ -259,9 +259,21 @@ export default {
     },
     // 一键导出
     exportWorkPdf() {
-        this.worksDialog = true;
-        this.digNum = 1
-        this.exportW++
+      this
+        .$confirm("一键导出所有报告需要占用您大量时间,是否导出?", "提示", {
+          confirmButtonText: "确认",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+        .then(() => {
+          this.worksDialog = true;
+          this.digNum = 1
+          this.exportW++
+        })
+        .catch((err) => {
+            console.log(err);
+        });
+     
     },
     // 导出报告
     getPdf(val) {

+ 18 - 5
src/components/pages/components/lookWork.vue

@@ -111,7 +111,18 @@
                 >
                   <div class="JSCo" v-if="l.score">
                     <div>评分:{{ JSON.parse(l.score).wScore }}</div>
-                    <div>评语:{{ JSON.parse(l.score).detail }}</div>
+                    <div class="JSCoTxt">
+                      <el-tooltip
+                        class="item"
+                        effect="dark"
+                        :content="JSON.parse(l.score).detail"
+                        placement="top"
+                      >
+                        <div>
+                          {{ JSON.parse(l.score).detail }}
+                        </div>
+                      </el-tooltip>
+                    </div>
                   </div>
                   <div v-if="l.tool[0] == 15">
                     <div class="toolBlk">
@@ -509,7 +520,6 @@
                     <div
                       v-if="l.eList"
                       class="taskScoConEList"
-                      style="width:49%"
                     >
                       <div style="width: 49%; margin: 0 20px 10px 0">
                         <div class="taskScoConTit">分数详情</div>
@@ -551,7 +561,7 @@
                     <!-- 评语 -->
                     <div
                       style="
-                          width: 48%;
+                          width: 60%;
                           display: flex;
                           flex-direction: column;
                           margin-left: 10px;
@@ -636,7 +646,7 @@
                   <!-- 评语 -->
                   <div
                     style="
-                          width: 48%;
+                          width: 60%;
                           display: flex;
                           flex-direction: column;
                           margin-left: 10px;
@@ -1107,7 +1117,7 @@ export default {
   flex-direction: column;
   align-items: flex-start;
 }
-.JSCoTxt{
+.JSCoTxt {
   width: 300px;
   overflow: hidden;
   white-space: nowrap;
@@ -1493,4 +1503,7 @@ export default {
 .WorkConSY div:last-child {
   margin-bottom: 0;
 }
+.item {
+  margin: 4px;
+}
 </style>

+ 47 - 196
src/components/pages/components/studentWorksDetail.vue

@@ -200,9 +200,9 @@
             <div style="color: #fff">查看&批改</div>
           </div>
 
-          <LookWorks v-if="DState == 5" :id="cid" :isStu="1" :studentId="studentId" :key="studentId"></LookWorks>
+          <LookWorks :id="checkCourse" :isStu="1" :studentId="studentId" :key="countM"></LookWorks>
 
-          <div v-else class="zyBoxC" ref="reportPdf">
+          <!-- <div v-else class="zyBoxC" ref="reportPdf">
             <div class="courseTitle" v-if="allWorks.course">
               <div class="txName">
                 <div class="tx"><img :src="tx" alt="" /></div>
@@ -216,16 +216,6 @@
                   >导出作业</el-button
                 >
               </div>
-
-              <!-- <div class="topButton" v-if="tableData.length > 1">
-                <div>学生切换:</div>
-                <el-button @click="preStep" v-if="isPre == false"
-                  >上一位</el-button
-                >
-                <el-button @click="nextStep" v-if="isNext == false"
-                  >下一位</el-button
-                >
-              </div> -->
             </div>
             <div class="cBox">
               <div class="pb_left">
@@ -353,11 +343,7 @@
                     </div>
                     <div class="contentBox">
                       <div class="contentAuto">
-                        <!-- :style="{
-                            width: worksDetail[sIndex].eList.length
-                              ? '95%'
-                              : '95%',
-                          }" -->
+                     
                         <div
                           class="left_top"
                           v-if="worksDetail[sIndex].img.length > 0"
@@ -495,7 +481,6 @@
                                 display: flex;
                                 flex-direction: row;
                                 align-items: center;
-                                /* justify-content: center; */
                                 flex-wrap: wrap;
                                 margin-top: 10px;
                                 font-size: 16px;
@@ -1243,92 +1228,11 @@
                           </el-form>
                         </div>
                       </div>
-                      <!-- <div
-                        class="right_top"
-                        v-show="
-                          worksDetail[sIndex].eList.length &&
-                          (worksDetail[sIndex].img.length > 0 ||
-                            worksDetail[sIndex].askInfo.length > 0 ||
-                            worksDetail[sIndex].answerInfo.length > 0 ||
-                            worksDetail[sIndex].wpptInfo.length > 0 ||
-                            worksDetail[sIndex].pjInfo.length > 0 ||
-                            worksDetail[sIndex].xztkInfo.length > 0 ||
-                            worksDetail[sIndex].lccjInfo.length > 0 ||
-                            worksDetail[sIndex].bgInfo.length > 0 ||
-                            worksDetail[sIndex].cocopiInfo.length > 0 ||
-                            worksDetail[sIndex].wordInfo.length > 0)
-                        "
-                      >
-                        <div class="ech">
-                          <img src="../../../assets/icon/pj/ech.png" alt="" />
-                        </div>
-                        <div class="data_body">
-                          <div style="width: 100%">
-                            <div
-                              class="echart charts_canvas"
-                              style="
-                                width: 100%;
-                                height: 100%;
-                                margin: 0 0 0 1rem;
-                              "
-                            ></div>
-                          </div>
-                        </div>
-                      </div> -->
+                     
                     </div>
                   </div>
                   <div class="right_score" :class="{ rightScoreFullBox: full }">
-                    <!-- <div
-                      v-if="
-                        tType &&
-                        ((tType == 2 && sIsOpen == true) ||
-                          tType == 1 ||
-                          tType == 4) &&
-                        tool.tool.indexOf(45) != -1 &&
-                        (tool.testJson.testJson[0].answer ||
-                          tool.testJson.testJson[0].answer === 0) &&
-                        checkJson[toolIndex].length
-                      "
-                      class="xuan_right_box"
-                    >
-                      <div
-                        class="tool_right_box"
-                        v-for="(item, index) in tool.testJson.testJson"
-                        :key="index"
-                      >
-                        <div>
-                          <span>{{ index + 1 + "、" + item.teststitle }}</span>
-                        </div>
-                        <div class="right_box_xuan">
-                          <span>正确率</span>
-                          <span>{{
-                            (checkJson[toolIndex][index].right
-                              ? checkJson[toolIndex][index].right
-                              : 0) + "%"
-                          }}</span>
-                        </div>
-                      </div>
-                    </div>
-                    <div
-                      class="xuan_right_box"
-                      style="background: unset"
-                      v-if="
-                        tType &&
-                        ((tType == 2 && sIsOpen == true) ||
-                          tType == 1 ||
-                          tType == 4) &&
-                        tool.tool.indexOf(45) != -1
-                      "
-                    >
-                      <AskStatic2
-                        v-if="
-                          worksStudent.length &&
-                          worksStudent[toolIndex].length > 0
-                        "
-                        :askJSON="tool"
-                        :checkJson="checkJson[toolIndex]"
-                      ></AskStatic2>
-                    </div> -->
+                   
                     <div
                       class="sd_score"
                       style="
@@ -1357,55 +1261,9 @@
                         </div>
                       </div>
 
-                      <!-- <div
-                        v-if="
-                          // worksDetail[sIndex].img.length == 0 &&
-                          // worksDetail[sIndex].askInfo.length == 0 &&
-                          // worksDetail[sIndex].answerInfo.length == 0 &&
-                          // worksDetail[sIndex].wpptInfo.length == 0 &&
-                          worksDetail[sIndex].chooseInfo.length > 0
-                        "
-                      >
-                        <div
-                          style="
-                            font-size: 16px;
-                            color: #c7c7c7;
-                            margin-left: 15px;
-                          "
-                        >
-                          题目统计
-                        </div>
-                        <div class="xuan_right_box">
-                          <div
-                            class="tool_right_box"
-                            v-for="(tItem, tIndex) in worksDetail[sIndex]
-                              .chooseInfo[0].chooseInfo.testJson"
-                            :key="tIndex"
-                          >
-                            <div>
-                              <span>{{
-                                tIndex + 1 + "、" + tItem.teststitle
-                              }}</span>
-                            </div>
-                            <div class="right_box_xuan">
-                              <span>正确率</span>
-                              <span>{{
-                                (checkJson[sIndex][tIndex].right
-                                  ? checkJson[sIndex][tIndex].right
-                                  : 0) + "%"
-                              }}</span>
-                            </div>
-                          </div>
-                        </div>
-                        <div class="allRightBox">
-                          <span>全部题的正确率:</span>
-                          <span>{{ checkJson[sIndex].allRight + "%" }}</span>
-                        </div>
-                      </div> -->
+                   
                       <div v-if="worksDetail[sIndex].eList && worksDetail[sIndex].eList.length">
-                        <!-- <div class="ech" style="margin-left: 23px">
-                          <img src="../../../assets/icon/pj/score.png" alt="" />
-                        </div> -->
+                      
                         <div>
                           <div class="score_boxTit"><span>分数详情</span></div>
                           <div
@@ -1447,12 +1305,7 @@
                                 {{ item.value }}
                               </div>
                             </el-tooltip>
-                            <!-- <el-rate
-                              class="rate_size"
-                              style="min-width: 120px"
-                              v-model="worksDetail[sIndex].rateList[item.detail]"
-                              @change="getStar(sIndex)"
-                            ></el-rate> -->
+
                             <el-rate
                               class="rate_size"
                               v-if="worksDetail[sIndex].state == 5"
@@ -1476,7 +1329,6 @@
                         >
                           <span>目标</span>
                         </div>
-                        <!-- {{ worksDetail[sIndex] }}  -->
                         <div
                           class="worksTargetCon"
                           v-if="isShow(worksDetail[sIndex]
@@ -1502,7 +1354,7 @@
                 >保存评分</el-button
               >
             </div>
-          </div>
+          </div> -->
         </el-dialog>
       </div>
       <div class="student_page">
@@ -1905,7 +1757,9 @@ export default {
       checkJson: [],
       worksLoading: false,
       exportData:'',
-      DState:''
+      DState:'',
+      cid:'',
+      countM: 0
     };
   },
   mounted() {
@@ -2010,39 +1864,36 @@ export default {
       this.getWorks();
     },
     lookWork(cid, uid,worksData) {
-      this.cid = cid
+      this.checkCourse = cid
       this.studentId = uid;
       this.DState = worksData.state
+      this.countM++
+      this.$nextTick(()=>{
+        this.dialogVisible3 = true
+      })
 
-      if (this.DState == 5) {
-        this.$nextTick(()=>{
-          this.dialogVisible3 = true
-        })
-        return
-      }
-
-      let params = {
-        cid: cid,
-      };
-      this.ajax
-        .get(this.$store.state.api + "getCourseWorksDyList", params)//getCourseWorksReport
-        .then((res) => {
-          var dyJSON = JSON.parse(res.data[0][0].chapters);
-          let dyList = [];
-          for (var i = 0; i < dyJSON.length; i++) {
-            dyList.push({ name: dyJSON[i].dyName, id: i, taskList: [] });
-            var a = dyJSON[i].chapterInfo[0].taskJson;
-            for (var j = 0; j < a.length; j++) {
-              dyList[i].taskList.push({ name: a[j].task, id: j });
-            }
-          }
-          this.dyList = dyList;
-          this.lookDyList(cid,uid,worksData)
+      // let params = {
+      //   cid: cid,
+      // };
+      // this.ajax
+      //   .get(this.$store.state.api + "getCourseWorksDyList", params)//getCourseWorksReport
+      //   .then((res) => {
+      //     var dyJSON = JSON.parse(res.data[0][0].chapters);
+      //     let dyList = [];
+      //     for (var i = 0; i < dyJSON.length; i++) {
+      //       dyList.push({ name: dyJSON[i].dyName, id: i, taskList: [] });
+      //       var a = dyJSON[i].chapterInfo[0].taskJson;
+      //       for (var j = 0; j < a.length; j++) {
+      //         dyList[i].taskList.push({ name: a[j].task, id: j });
+      //       }
+      //     }
+      //     this.dyList = dyList;
+      //     this.lookDyList(cid,uid,worksData)
         
-        })
-        .catch((err) => {
-          console.error(err);
-        });
+      //   })
+      //   .catch((err) => {
+      //     console.error(err);
+      //   });
     },
     lookDyList(cid, uid,worksData){
       let params = {
@@ -3619,7 +3470,7 @@ export default {
     updateWorks(stagetask, rateList, i) {
       var arr = stagetask.split("-");
       let params = {
-        cid: this.cid,
+        cid: this.checkCourse,
         s: arr[0],
         t: arr[1],
         rate: rateList,
@@ -4321,10 +4172,10 @@ export default {
   margin-left: 10px;
 }
 
-.courseTitle span:nth-child(2) {
+/* .courseTitle span:nth-child(2) { */
   /* font-size: 14px;
   cursor: pointer; */
-}
+/* } */
 
 .bigImg {
   margin-top: 10px;
@@ -4593,9 +4444,9 @@ font-size: 14px !important;
 }
 
 
-.ask_Answer {
+/* .ask_Answer { */
   /* margin-top: 10px; */
-}
+/* } */
 
 .ask_Answer_title {
   font-size: 18px;
@@ -5021,8 +4872,8 @@ font-size: 14px !important;
 /* code 样式 */
 .cont >>> code {
   display: inline-block;
-  *display: inline;
-  *zoom: 1;
+  /* *display: inline;
+  *zoom: 1; */
   background-color: #f1f1f1;
   border-radius: 3px;
   padding: 3px 5px;
@@ -5363,10 +5214,10 @@ ol {
   margin: 0 !important;
 }
 
-.fullBox {
+/* .fullBox { */
   /* overflow: unset !important;
   height: auto !important; */
-}
+/* } */
 
 .fullZyBox {
   width: 60% !important;

+ 23 - 26
src/components/pages/components/workData.vue

@@ -158,7 +158,7 @@
             ></div>
           </div>
           <div style="width: 100%">
-            <div style="display: flex;align-items: center;padding-bottom: 15px;font-size: 14px;color: rgba(0, 0, 0, 0.4);">
+            <!-- <div style="display: flex;align-items: center;padding-bottom: 15px;font-size: 14px;color: rgba(0, 0, 0, 0.4);">
               <span @click="pageBack" style="height: 100%;cursor: pointer;">评价管理</span>
               <span style="margin: 0 5px;">
                 <i class="el-icon-arrow-right"></i>
@@ -171,33 +171,21 @@
             </div>
             <div class="JsonTit">
               <div style="width:94%;margin: 0 auto;font-size: 26px;">{{ dataJson.title }}</div>
-              <div class="JsonTitBtn" v-if="dialogVisible">
+              <div class="JsonTitBtn">
                 <el-button @click="exportWorkPdf" type="primary" size="small"
                   >一键导出</el-button
                 >
-                <el-button @click="exportData" type="primary" size="small"
-                  >自定义导出</el-button
+                <el-button @click="exportData" 
+                  type="primary" 
+                  size="small"
+                  >批量导出</el-button
                 >
                 <el-button style="margin-left: 20px;" @click="retPage" type="primary" size="small">返回</el-button>
-                <!-- <el-button
-                  type="primary"
-                  size="small"
-                  @click="
-                    goTo(
-                      '/worksDetail?cid=' +
-                        dataJson.courseId +
-                        '&userid=' +
-                        userid +
-                        '&oid=' +
-                        oid
-                    )
-                  "
-                  >查看作业</el-button
-                >-->
+              
               </div>
-            </div>
+            </div> -->
             <!-- <div style="width:94%;margin: 0 auto;font-size: 26px;">{{ dataJson.title }}</div> -->
-            <WorksDetail2 ref="WorksDetail2Ref" :DState="dataJson.state" :cid="cid" :uid="uid" :ooid="ooid"></WorksDetail2>
+            <WorksDetail2 ref="WorksDetail2Ref" @pageBack="pageBack" @retPage="retPage" :dataJson="dataJson" :DState="dataJson.state" :cid="cid" :uid="uid" :ooid="ooid"></WorksDetail2>
             <!-- <el-table
               ref="table"
               :data="tableData"
@@ -579,11 +567,11 @@ export default {
       }
     },
     retPage(){
-      console.log('666');
+      // console.log('666');
       this.$emit('cancel');
     },
     exportWorkPdf(){
-      this.$confirm("是否导出全部学生作业?批量导出需要等待一会儿哦~", "提示", {
+      this.$confirm("是否导出全部学生作业?一键导出需要等待一会儿哦~", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
@@ -594,11 +582,20 @@ export default {
       .catch(() => {
         return;
       });
-
-
     },
     exportData(){
-      this.$emit("update:dialogVisibleBao", true);
+      // this.$emit("update:dialogVisibleBao", true);
+      this.$confirm("是否批量导出学生作业?批量导出需要等待一会儿哦~", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+      .then(() => {
+        this.$refs.WorksDetail2Ref.exportPdfSetBatchWork()
+      })
+      .catch(() => {
+        return;
+      });
     },
     pageBack(){
       // console.log('666');

+ 113 - 28
src/components/pages/components/worksDetail2.vue

@@ -1,5 +1,38 @@
 <template>
   <div class="pb_content" style="background: unset">
+    <div style="display: flex;align-items: center;padding-bottom: 15px;font-size: 14px;color: rgba(0, 0, 0, 0.4);">
+      <span @click="pageBack" style="height: 100%;cursor: pointer;">评价管理</span>
+      <span style="margin: 0 5px;">
+        <i class="el-icon-arrow-right"></i>
+      </span>
+      <span @click="pageBack" style="height: 100%;cursor: pointer;">查看课程</span>
+      <span style="margin: 0 5px;">
+        <i class="el-icon-arrow-right"></i>
+      </span>
+      <div style="font-weight: 600;color: rgba(0, 0, 0, 0.9);">{{ dataJson.title }}-查看作业</div>
+    </div>
+    <div class="JsonTit">
+      <div style="width:94%;margin: 0 auto;font-size: 26px;">{{ dataJson.title }}</div>
+      <div class="JsonTitBtn">
+        <el-button @click="exportWorkPdf" type="primary" size="small"
+          >一键导出</el-button
+        >
+        <el-button @click="exportData" 
+          v-if="cutTabNum == 0 && multipleSelection.length > 1"
+          type="primary" 
+          size="small"
+          >批量导出</el-button
+        >
+        <el-button @click="exportData" 
+          v-if="cutTabNum == 0 && multipleSelection.length < 2"
+          type="info" 
+          disabled
+          size="small"
+          >批量导出</el-button
+        >
+        <el-button style="margin-left: 20px;" @click="retPage" type="primary" size="small">返回</el-button>
+      </div>
+    </div>
     <div
       class="pb_content_body"
       style="
@@ -8,32 +41,16 @@
         border-radius: 5px;
       "
     >
+
       <div class="student_head">
-        <!-- <div class="student_search">
-          <div>班级筛选</div>
-          <el-select v-model="sClass" placeholder="请选择班级" @change="searchWork">
-            <el-option label="所有班级" value></el-option>
-            <el-option
-              v-for="(item, index) in grade"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-        </div>-->
-        <!-- chooseDy
-        chooseTask-->
         <div class="student_search">
           <div>筛选</div>
           <div style="display: flex; width: 90%">
-
-
 						<el-select
               class="r_select"
               v-model="choseClass"
               placeholder="请选择班级"
 							@change="changeClass"
-
             >
               <el-option label="所有班级" value></el-option>
               <el-option
@@ -139,7 +156,13 @@
           :header-cell-style="{ background: '#f1f1f1' }"
           :row-class-name="tableRowClassName"
           stripe
+          @selection-change="handleSelectionChange"
         >
+          <el-table-column
+            v-show="cutTabNum == 0"
+            type="selection"
+            width="55">
+          </el-table-column>
           <el-table-column
             prop="sName"
             label="姓名"
@@ -176,7 +199,7 @@
             <template slot-scope="scope">
               <div>
                 <div v-if="scope.row.stage < dyList.length">
-                 任务:{{ scope.row.stage }} {{ dyList[scope.row.stage].name }}
+                 阶段:{{ scope.row.stage+1 }} {{ dyList[scope.row.stage].name }}
                 </div>
 
                 <!-- {{ dyList.length > 0 ? dyList[!scope.row.stage ? 0 : scope.row.stage ].name : "" }} -->
@@ -1551,7 +1574,7 @@
       <div slot="title" class="header-title">
         <div style="color: #fff">导出作业集</div>
       </div>
-      <exportWorksDialog  :key="exportW" :digNum="digNum" :oid="oid" :worksDialog.sync="worksDialog" :worksDialogCon="worksDialogCon" :uid="exportPdfSetUid" :cid="id"></exportWorksDialog>
+      <exportWorksDialog  :key="exportW" :multipleSelection="multipleSelection" :digNum="digNum" :oid="oid" :worksDialog.sync="worksDialog" :worksDialogCon="worksDialogCon" :uid="exportPdfSetUid" :cid="id"></exportWorksDialog>
     </el-dialog>
   </div>
 </template>
@@ -1573,7 +1596,7 @@ export default {
     pdf,
     exportWorksDialog,
   },
-  props: ["cid", "uid", "ooid","DState"],
+  props: ["cid", "uid", "ooid","DState","dataJson"],
   data() {
     return {
       tableHeight: "500px",
@@ -1810,7 +1833,8 @@ export default {
       worksDialogCon : {},
       exportPdfSetUid:'',
       exportW:0,
-      digNum:0
+      digNum:0,
+      multipleSelection:[]
     };
   },
   computed: {
@@ -1893,14 +1917,47 @@ export default {
     });
   },
   methods: {
-    // 导出所有作业
-    exportPdfSetAllWork(){
-      this.worksDialog = true;
-      this.digNum = 1
-      this.exportW++
-      
+    // 一键导出
+    exportWorkPdf(){
+      this.$confirm("是否导出全部学生作业?全部导出需要等待一会儿哦~", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+      .then(() => {
+        this.exportPdfSetAllWork()
+      })
+      .catch(() => {
+        return;
+      });
+    },
+    // 批量导出
+    exportData(){
+      // this.$emit("update:dialogVisibleBao", true);
+      this.$confirm("批量导出报告需要占用您较多时间,是否导出?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+      .then(() => {
+        this.exportPdfSetBatchWork()
+      })
+      .catch(() => {
+        return;
+      });
+    },
+    // 返回到评价管理页面
+    retPage(){
+      // console.log('666');
+      this.$emit('retPage');
+    },
+    pageBack(){
+      this.$emit('pageBack');
+    },
+    // 批量选择作业
+    handleSelectionChange(val) {
+        this.multipleSelection = val;
     },
-   
     // 按任务查看导出作业集
     exportPdfSetBtn(uid, con) {
       this.worksDialog = true;
@@ -1910,9 +1967,25 @@ export default {
 
       this.exportW++
     },
+    // 导出所有作业
+    exportPdfSetAllWork(){
+      this.worksDialog = true;
+      this.digNum = 1
+      this.exportW++
+    },
+   // 批量导出作业
+   exportPdfSetBatchWork(){
+      if (!this.multipleSelection.length) return
+      this.worksDialog = true;
+      this.digNum = 2
+      this.exportW++
+    },
+   
+ 
     cutTabData(val){
       this.cutTabNum = val;
       this.page = 1;
+      this.multipleSelection = []
       
       if (this.typeCheck) {
         if (val==0) {
@@ -5729,4 +5802,16 @@ ol {
   padding: 5px 0;
   color: #409EFF;
 }
+.JsonTit{
+  width: 100%;
+  padding: 20px 0 0;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+
+}
+.JsonTitBtn{
+  display: flex;
+  align-items: center;
+}
 </style>

Some files were not shown because too many files changed in this diff