Browse Source

Merge branch 'beta' into HK

lsc 2 years ago
parent
commit
bc0649f573
55 changed files with 2346 additions and 1485 deletions
  1. 4 0
      dist/index.html
  2. 0 0
      dist/static/css/app.3815a4a692c444965add2e87d0f6e3e4.css
  3. 0 0
      dist/static/css/app.3815a4a692c444965add2e87d0f6e3e4.css.map
  4. 0 0
      dist/static/css/app.e6c97e386e1561b245c665250e97aceb.css.map
  5. 0 0
      dist/static/js/app.a452c3f1991fdd1989fc.js.map
  6. 0 0
      dist/static/js/app.fe23acd2793afb703c0a.js
  7. 1 0
      dist/static/js/app.fe23acd2793afb703c0a.js.map
  8. 0 0
      dist/static/js/manifest.f583576dfec9dfc9a295.js.map
  9. 1 1
      src/common/axios.config.js
  10. 76 81
      src/components/pages/addCourse.vue
  11. 4 4
      src/components/pages/addCourseGM.vue
  12. 2 2
      src/components/pages/choice/index.vue
  13. 4 1
      src/components/pages/components/classReport.vue
  14. 159 137
      src/components/pages/components/classStudentComponents/worksDetail3.vue
  15. 7 1
      src/components/pages/components/courseReport.vue
  16. 7 1
      src/components/pages/components/evaReport.vue
  17. 7 1
      src/components/pages/components/stReport.vue
  18. 159 135
      src/components/pages/components/studentWorksDetail.vue
  19. 163 138
      src/components/pages/components/worksDetail2.vue
  20. 158 136
      src/components/pages/components/worksDetail3.vue
  21. 66 43
      src/components/pages/course.vue
  22. 6 1
      src/components/pages/dataBoard/course/chartList/cateRank.vue
  23. 3 3
      src/components/pages/dataBoard/course/chartList/courseAna.vue
  24. 9 1
      src/components/pages/dataBoard/course/chartList/teaFre.vue
  25. 17 6
      src/components/pages/dataBoard/course/chartList/workTime.vue
  26. 50 21
      src/components/pages/dataBoard/course/index.vue
  27. 6 2
      src/components/pages/dataBoard/school/cateRank/index.vue
  28. 25 7
      src/components/pages/dataBoard/school/courseInfo/index.vue
  29. 28 9
      src/components/pages/dataBoard/school/index.vue
  30. 17 1
      src/components/pages/dataBoard/school/loginCount/index.vue
  31. 8 1
      src/components/pages/dataBoard/school/loginTime/index.vue
  32. 18 5
      src/components/pages/dataBoard/school/studentInfo/index.vue
  33. 91 12
      src/components/pages/dataBoard/student/index.vue
  34. 9 1
      src/components/pages/dataBoard/student/loginCount/index.vue
  35. 75 11
      src/components/pages/dataBoard/student/loginTime/index.vue
  36. 6 1
      src/components/pages/dataBoard/student/stuAct/index.vue
  37. 64 18
      src/components/pages/dataBoard/student/studentInfo/index.vue
  38. 13 1
      src/components/pages/dataBoard/student/studentInfo2/index.vue
  39. 32 6
      src/components/pages/dataBoard/teacher/chartList/funPlot.vue
  40. 52 13
      src/components/pages/dataBoard/teacher/chartList/teaAct.vue
  41. 10 2
      src/components/pages/dataBoard/teacher/chartList/teaFre.vue
  42. 69 9
      src/components/pages/dataBoard/teacher/chartList/workTime.vue
  43. 241 67
      src/components/pages/dataBoard/teacher/index.vue
  44. 75 81
      src/components/pages/easy/addCourse.vue
  45. 228 75
      src/components/pages/evaluation.vue
  46. 1 0
      src/components/pages/inviteLogin/inviteLogin.vue
  47. 159 137
      src/components/pages/myReport/components/MyLookComponent/worksDetail3.vue
  48. 89 208
      src/components/pages/student.vue
  49. 4 4
      src/components/pages/student/addCourse.vue
  50. 4 4
      src/components/pages/studio/addCourse.vue
  51. 76 82
      src/components/pages/task/addCourse.vue
  52. 7 1
      src/components/pages/worksReport.vue
  53. 4 0
      src/components/tools/jsmind.vue
  54. 4 0
      src/components/tools/jsmind2.vue
  55. 28 14
      src/components/tools/time.vue

+ 4 - 0
dist/index.html

@@ -25,7 +25,11 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
+<<<<<<< HEAD
     }</style><link href=./static/css/app.e6c97e386e1561b245c665250e97aceb.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.f583576dfec9dfc9a295.js></script><script type=text/javascript src=./static/js/vendor.88e838fb9ceb45f00767.js></script><script type=text/javascript src=./static/js/app.a452c3f1991fdd1989fc.js></script></body></html><script>function stopSafari() {
+=======
+    }</style><link href=./static/css/app.3815a4a692c444965add2e87d0f6e3e4.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.1b8e037bd3fbbd358d74.js></script><script type=text/javascript src=./static/js/app.fe23acd2793afb703c0a.js></script></body></html><script>function stopSafari() {
+>>>>>>> beta
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.3815a4a692c444965add2e87d0f6e3e4.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.3815a4a692c444965add2e87d0f6e3e4.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.e6c97e386e1561b245c665250e97aceb.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.a452c3f1991fdd1989fc.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.fe23acd2793afb703c0a.js


File diff suppressed because it is too large
+ 1 - 0
dist/static/js/app.fe23acd2793afb703c0a.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.f583576dfec9dfc9a295.js.map


+ 1 - 1
src/common/axios.config.js

@@ -22,7 +22,7 @@ axios.interceptors.request.use((config) => {
     // } else if (config.method === 'post') {
     //     config.data = qs.stringify(config.data)//序列化post 参数
     // }
-    if(config.url === 'https://gpt.cocorobo.cn/search') {
+    if(config.url === 'https://gpt.cocorobo.cn/search_image') {
         config.data = config.data//序列化post 参数
     } else if (config.data && config.data[0].post == '1' && config.method === 'post') {
         config.data = 'mode=' + (Object.values(config.data[0]).join(','))//序列化post 参数

+ 76 - 81
src/components/pages/addCourse.vue

@@ -2554,7 +2554,7 @@
             </div>
             <div class="a_add_head">
               <div style="display: flex;align-items: center;width: 100%;margin-right: 20px;">
-                {{ index1 + 1 + "、" }}
+                <span style="min-width:fit-content">{{ index1 + 1 + "、" }}</span>
                 <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-model="askJson.askJson[index1].askstitle
                   " placeholder="请输入题目" @change="()=>{$forceUpdate()}"></textarea>
               </div>
@@ -2634,7 +2634,7 @@
             <div class="a_add_head">
               <div class="timuUpImg">
                 <div style="display: flex;align-items: center;">
-                  {{ index1 + 1 + "、" }}
+                  <span style="min-width:fit-content">{{ index1 + 1 + "、" }}</span>
                   <!-- <el-input class="a_add_head_input"  v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
                     placeholder="请输入题目">
                   </el-input> -->
@@ -3007,7 +3007,7 @@
             <div class="spanName">选择系统文件</div>
           </div>
           <div>
-            <el-button @click="searchImageValue = '',searchImage()" v-if="isSysPic2 == false">选择网络文件</el-button>
+            <el-button @click="searchImageValue = courseName,resetImage()" v-if="isSysPic2 == false">选择网络文件</el-button>
             <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
               <img :src="cover[0].url" alt="" />
               <div class="deletePic" @click="deleteSysPic">
@@ -3050,13 +3050,17 @@
     <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
       :before-close="handleClose" class="dialog_diy">
       <div>
-        <div class="people_top_right" style="position: relative;">
-          <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue" @keyup.enter.native="searchImage()"></el-input>
-          <div class="search_img" @click="searchImage" style="right: 10px;">
-            <img src="../../assets/icon/search.png" alt />
+        <div class="people_top_right" style="display: flex;align-items: center;">
+          <div style="position: relative; width: 100%;">
+            <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue" @keyup.enter.native="resetImage()"></el-input>
+            <div class="search_img" @click="resetImage" style="right: 10px;">
+              <img src="../../assets/icon/search.png" alt />
+            </div>
           </div>
+          <el-button type="primary" size="default" style="margin-left: 10px;" @click="changePicture">换一组</el-button>
         </div>
         <div class="sysPicBox" v-loading="imageloading">
+          <div class="picNone" v-if="!imageList.length">请输入关键词搜索图片</div>
           <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
             <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
           </div>
@@ -3174,8 +3178,8 @@
                   <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle"></el-input>
                 </div>
                 <div @click="addSen(stIndex)">添加</div>
+                <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
               </div>
-              <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
             </div>
 
             <div class="cardList">
@@ -3291,7 +3295,7 @@
         <el-button type="primary" @click="addInvite">确定</el-button>
       </span>
     </el-dialog>
-    <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="30%"
+    <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
       :before-close="handleClose" class="dialog_diy">
       <div>
         <div style="margin-bottom: 20px;color: #999;">提示:点击“+”或“-”修改倒计时时长。</div>
@@ -3369,8 +3373,8 @@
           <div class="groupTitle">请设置每组人数</div>
           <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
             style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
-          <el-input-number v-model="groupJson.number" :controls="false" :min="2" :max="10"
-            placeholder="请输入2-10的数字"></el-input-number>
+            <el-input v-model="groupJson.number" style="width:150px"
+            placeholder="请输入2-10的数字" @change="numberPan"></el-input>
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -3669,6 +3673,7 @@ export default {
       imageList: [],
       imageloading: false,
       searchImageValue:"",
+      ppage:1,
     };
   },
   directives: {
@@ -3946,6 +3951,17 @@ export default {
       el.getElementsByTagName("input")[0].click();
     },
     change(val) {
+      if(this.dialogVisible1){
+        this.tdetail = val
+      }else if(this.dialogVisible6){
+        this.AttText.text = val
+      }else if(this.dialogVisible2){
+        this.cTemplate = val
+      }else if(this.dialogVisibleTable){
+        this.tableJson.text = val
+      }
+      this.$forceUpdate();
+
       console.log(val);
     },
     change2(val) {
@@ -6984,7 +7000,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -7005,7 +7021,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
               for (var z2 = z+1; z2 < aj[i].checkList.length; z2++) {  
@@ -7059,7 +7075,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -7080,7 +7096,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
               for (var z2 = z+1; z2 < aj[i].checkList.length; z2++) {  
@@ -7100,7 +7116,7 @@ export default {
               (aj[i].type == "2" && !aj[i].answer.length) ||
               (aj[i].type == "1" && ((typeof aj[i].answer == 'object' && !aj[i].answer.length) || (aj[i].answer !== 0 && !aj[i].answer)))
             ) {
-              this.$message.error(`题目${i+1},未设置正确选项,请设置。`);
+              this.$message.error(`请将题目${i+1}的正确选项设置完整`);
               return;
             }
           }
@@ -8202,6 +8218,10 @@ export default {
         this.$message.error("请填写卡片内容!");
         return;
       }
+      if(this.sentenceList[i].sentenceTitle.length > 10){
+        this.$message.error("卡片内容字数不能超过10位");
+        return;
+      }
       if(this.sentenceList[i].addSentence.indexOf(this.sentenceList[i].sentenceTitle) !== -1){
         this.$message.error("不能添加重复的卡片内容!");
         return;
@@ -8221,14 +8241,14 @@ export default {
     addSentenceTool() {
       for (var i = 0; i < this.sentenceList.length; i++) {
         if (this.sentenceList[i].rightAnswer.length == 0) {
-          this.$message.error("请将信息填写完整!");
+          this.$message.error(`请将题目${i+1}设置完整。`);
           return;
         }
         if (
           this.sentenceList[i].addSentence.length !=
           this.sentenceList[i].rightAnswer.length
         ) {
-          this.$message.error("请将信息填写完整!");
+          this.$message.error(`请将题目${i+1}设置完整。`);
           return;
         }
       }
@@ -8425,6 +8445,12 @@ export default {
     deleteGroup(i) {
       this.groupJson.group.splice(i, 1);
     },
+    numberPan(){
+      if(/[^\d]/.test(this.groupJson.number) || this.groupJson.number < 2 || this.groupJson.number > 10){ 
+        this.$message.error('请输入2-10的数字')
+        this.groupJson.number = ''
+      }
+    },
     addGroupJson() {
       for (var i = 0; i < this.groupJson.group.length; i++) {
         if (!this.groupJson.group[i].name) {
@@ -8634,76 +8660,34 @@ export default {
     searchImage() {
       var _this = this;
       _this.imageList = []
+      if(!_this.searchImageValue){
+        _this.sysPicVisible2 = true
+        return
+      }
       _this.imageloading = true
-      _this.ajax.post('https://gpt.cocorobo.cn/search', {
-        page: 1,
-        pageSize: 21,
-        keywords: '',
-        category: 'unsplash',
-        isNeedTranslate: true
+      _this.ajax.post('https://gpt.cocorobo.cn/search_image', {
+        page: _this.ppage,
+        pagesize: 9,
+        query: _this.searchImageValue
       }).then(function (response) {
         // console.log(response.data.data);
-        var data = response.data.data;
+        var data = response.data.FunctionResponse.result;
         for (var i = 0; i < data.length; i++) {
-          _this.imageList.push(data[i].small_img_path)
+          _this.imageList.push({url:data[i].image})
         }
         _this.imageloading = false
       }).catch(function (error) {
         console.log(error);
       });
       _this.sysPicVisible2 = true
-
-      // _this.ajax.post('https://gpt.cocorobo.cn/search', {
-      //   page: 1,
-      //   pageSize: 4,
-      //   keywords: '',
-      //   category: 'pexels',
-      //   isNeedTranslate: true
-      // }).then(function (response) {
-      //   // console.log(response.data.data);
-      //   var data = response.data.data;
-      //   for (var i = 0; i < data.length; i++) {
-      //     _this.imageList.push(data[i].small_img_path)
-      //   }
-      //   _this.imageloading = false
-      // }).catch(function (error) {
-      //   console.log(error);
-      // });
-
-      // _this.ajax.post('https://gpt.cocorobo.cn/search', {
-      //   page: 1,
-      //   pageSize: 4,
-      //   keywords: '',
-      //   category: 'pixabay',
-      //   isNeedTranslate: false
-      // }).then(function (response) {
-      //   // console.log(response.data.data);
-      //   var data = response.data.data;
-      //   for (var i = 0; i < data.length; i++) {
-      //     _this.imageList.push(data[i].small_img_path)
-      //   }
-      //   _this.imageloading = false
-      // }).catch(function (error) {
-      //   console.log(error);
-      // });
-
-      // _this.ajax.post('https://gpt.cocorobo.cn/search', {
-      //   page: 1,
-      //   pageSize: 4,
-      //   keywords: '',
-      //   category: '500px',
-      //   isNeedTranslate: true
-      // }).then(function (response) {
-      //   // console.log(response.data.data);
-      //   var data = response.data.data;
-      //   for (var i = 0; i < data.length; i++) {
-      //     _this.imageList.push(data[i].small_img_path)
-      //   }
-      //   _this.imageloading = false
-      // }).catch(function (error) {
-      //   console.log(error);
-      // });
-
+    },
+    changePicture(){
+      this.ppage++
+      this.searchImage()
+    },
+    resetImage(){
+      this.ppage = 1
+      this.searchImage()
     }
   },
   beforeDestroy() {
@@ -9249,6 +9233,7 @@ export default {
   width: 40px;
   height: 50px;
   cursor: pointer;
+  margin-left: 10px;
 }
 
 .binfo_input {
@@ -11299,6 +11284,16 @@ ol {
   align-content: flex-start;
   height: 435px;
   overflow: auto;
+  position: relative;
+}
+
+.picNone {
+  position: absolute;
+  left: 50%;
+  top: 45%;
+  transform: translate(-50%, -50%);
+  width:fit-content;
+  color: #9c9c9c;
 }
 
 .sysPic {
@@ -11642,14 +11637,14 @@ ol {
 
 .isCard,
 .isCard1 {
-  width: 140px;
+  width: 200px;
   height: 65px;
   text-align: center;
   line-height: 65px;
-  font-size: 20px;
+  font-size: 14px;
   cursor: pointer;
   background-image: url("../../assets/icon/conSentences/titleBorder.png");
-  background-size: cover;
+  background-size: 100% 100%;
   position: relative;
   z-index: 99;
 }

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

@@ -4161,7 +4161,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -4182,7 +4182,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
             }
@@ -4229,7 +4229,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -4250,7 +4250,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
             }

+ 2 - 2
src/components/pages/choice/index.vue

@@ -402,7 +402,7 @@ export default {
                             : "";
                         if (element != "") {
                             b++;
-                            this.$message.error("填写了选项,题目不能为空!");
+                            this.$message.error(`请将题目${i+1}填写完整。`);
                             return;
                         } else {
                             a++;
@@ -423,7 +423,7 @@ export default {
                             if (checkC != "") {
                                 index++;
                             } else {
-                                this.$message.error("选项不能为空!");
+                                this.$message.error(`题目${i+1}选项不能为空!`);
                                 return;
                             }
                         }

+ 4 - 1
src/components/pages/components/classReport.vue

@@ -107,7 +107,7 @@
 
 <script>
 export default {
-  props: ["ooid"],
+  props: ["ooid","checkid"],
   data() {
     return {
       sName: "",
@@ -235,6 +235,9 @@ export default {
     },
   },
   created() {
+    if(this.checkid){
+          this.classChoose = this.checkid
+        }
     this.getClass();
     this.getCData();
   },

+ 159 - 137
src/components/pages/components/classStudentComponents/worksDetail3.vue

@@ -1024,10 +1024,10 @@
                 </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].img.length == 0 &&
+                    // worksDetail[sIndex].askInfo.length == 0 &&
+                    // worksDetail[sIndex].answerInfo.length == 0 &&
+                    // worksDetail[sIndex].wpptInfo.length == 0 &&
                     worksDetail[sIndex].chooseInfo.length > 0
                   "
                 >
@@ -1040,7 +1040,7 @@
                     <div
                       class="tool_right_box"
                       v-for="(tItem, tIndex) in worksDetail[sIndex]
-                        .chooseInfo[0].testJson"
+                              .chooseInfo[0].chooseInfo.testJson"
                       :key="tIndex"
                     >
                       <div>
@@ -1057,15 +1057,17 @@
                     </div>
                   </div>
                   <div class="allRightBox">
-                    <span>全部题的正确率:</span
+                    <span>全部题的正确率:</span
                     ><span>{{ checkJson[sIndex].allRight + "%" }}</span>
                   </div>
                 </div>
-                <div v-else>
+                <div v-if="
+                            worksDetail[sIndex].eList.length
+                          ">
                   <div class="ech" style="margin-left: 23px">
                     <img src="../../../../assets/icon/pj/score.png" alt="" />
                   </div>
-                  <div style="height: 80%">
+                  <div>
                     <div
                       class="score_box"
                       v-for="(item, index) in worksDetail[sIndex].eList"
@@ -1535,6 +1537,7 @@ export default {
           var wordInfo = res.data[12]; //文档作业
           var workEvaList = res.data[13];
           var workJson = {};
+          let checkJson = {}
 
           for (var k = 0; k < res.data[0].length; k++) {
             this.allWorks = res.data[0][k];
@@ -1570,7 +1573,7 @@ export default {
               continue;
             }
 
-            this.checkJson[k] = {};
+            // checkJson[stagetask] = {};
 
             let stagetask = res.data[0][k].stage + "-" + res.data[0][k].task;
             if (!workJson[stagetask]) {
@@ -1593,107 +1596,110 @@ export default {
                 stagetask: stagetask,
                 time: "",
               };
-            }
-            workJson[stagetask].time = res.data[0][k].time;
-            for (var i = 0; i < askInfo.length; i++) {
-              if (
-                res.data[0][k].stage == askInfo[i].stage &&
-                res.data[0][k].task == askInfo[i].task &&
-                res.data[0][k].tool == askInfo[i].tool
-              ) {
-                const element = askInfo[i];
-                let a = JSON.parse(element.content)[0];
-                let e = [];
-                for (var y = 0; y < a.askJson.length; y++) {
-                  if (a.askJson[y].type == "2") {
-                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
-                  } else {
-                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
-                  }
-                }
-                a.radio = e;
-                workJson[stagetask].askInfo.push({
-                  askInfo: a,
-                  score: askInfo[i].score
-                    ? JSON.parse(askInfo[i].score).wScore
-                    : askInfo[i].score,
-                });
-                this.checkJson[k].allRight = 0;
-                var isCount = 0;
-                for (var p = 0; p < a.radio.length; p++) {
-                  if (!this.checkJson[k][p]) {
-                    this.checkJson[k][p] = {
-                      checkCount: [],
-                      checkPerson: [],
-                    };
-                  }
-                  if (!this.checkJson[k][p].checkCount.length) {
-                    this.checkJson[k][p].checkCount = [];
-                    let _askItemCount = a.askJson[p].askCount;
-                    for (var aic = 0; aic < _askItemCount; aic++) {
-                      this.checkJson[k][p].checkCount.push(0);
-                    }
-                  }
-                  if (a.radio[p] instanceof Array) {
-                    if (
-                      workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
-                        .sort()
-                        .join(",") == a.radio[p].sort().join(",")
-                    ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
-                    } else {
-                      this.checkJson[k][p].right = 0;
-                      isCount += 0;
-                    }
-                    for (var q = 0; q < a.radio[p].length; q++) {
-                      this.checkJson[k][p].checkPerson[parseInt(a.radio[p][q])]
-                        ? this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p][q])
-                          ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p][q])
-                          ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(a.radio[p][q])]
-                        ? this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p][q])
-                          ]++
-                        : (this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p][q])
-                          ] = 1);
-                    }
-                  } else {
-                    if (
-                      workJson[stagetask].askInfo[0].askInfo.askJson[p]
-                        .answer == a.radio[p]
-                    ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
-                    } else {
-                      this.checkJson[k][p].right = 0;
-                      isCount += 0;
-                    }
-                    if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
-                      this.checkJson[k][p].checkPerson[parseInt(a.radio[p])]
-                        ? this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p])
-                          ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p])
-                          ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(a.radio[p])]
-                        ? this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p])
-                          ]++
-                        : (this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p])
-                          ] = 1);
-                    }
-                  }
-                }
-                this.checkJson[k].allRight = isCount / a.radio.length;
+              checkJson[stagetask] = {
+                stagetask: stagetask,
               }
             }
+            workJson[stagetask].time = res.data[0][k].time;
+            // for (var i = 0; i < askInfo.length; i++) {
+            //   if (
+            //     res.data[0][k].stage == askInfo[i].stage &&
+            //     res.data[0][k].task == askInfo[i].task &&
+            //     res.data[0][k].tool == askInfo[i].tool
+            //   ) {
+            //     const element = askInfo[i];
+            //     let a = JSON.parse(element.content)[0];
+            //     let e = [];
+            //     for (var y = 0; y < a.askJson.length; y++) {
+            //       if (a.askJson[y].type == "2") {
+            //         e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
+            //       } else {
+            //         e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
+            //       }
+            //     }
+            //     a.radio = e;
+            //     workJson[stagetask].askInfo.push({
+            //       askInfo: a,
+            //       score: askInfo[i].score
+            //         ? JSON.parse(askInfo[i].score).wScore
+            //         : askInfo[i].score,
+            //     });
+            //     checkJson[stagetask].allRight = 0;
+            //     var isCount = 0;
+            //     for (var p = 0; p < a.radio.length; p++) {
+            //       if (!checkJson[stagetask][p]) {
+            //         checkJson[stagetask][p] = {
+            //           checkCount: [],
+            //           checkPerson: [],
+            //         };
+            //       }
+            //       if (!checkJson[stagetask][p].checkCount.length) {
+            //         checkJson[stagetask][p].checkCount = [];
+            //         let _askItemCount = a.askJson[p].askCount;
+            //         for (var aic = 0; aic < _askItemCount; aic++) {
+            //           checkJson[stagetask][p].checkCount.push(0);
+            //         }
+            //       }
+            //       if (a.radio[p] instanceof Array) {
+            //         if (
+            //           workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
+            //             .sort()
+            //             .join(",") == a.radio[p].sort().join(",")
+            //         ) {
+            //           checkJson[stagetask][p].right = 100;
+            //           isCount += checkJson[stagetask][p].right;
+            //         } else {
+            //           checkJson[stagetask][p].right = 0;
+            //           isCount += 0;
+            //         }
+            //         for (var q = 0; q < a.radio[p].length; q++) {
+            //           checkJson[stagetask][p].checkPerson[parseInt(a.radio[p][q])]
+            //             ? checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p][q])
+            //               ].push(res.data[0][k].sName)
+            //             : (checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p][q])
+            //               ] = [res.data[0][k].sName]);
+            //           checkJson[stagetask][p].checkCount[parseInt(a.radio[p][q])]
+            //             ? checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p][q])
+            //               ]++
+            //             : (checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p][q])
+            //               ] = 1);
+            //         }
+            //       } else {
+            //         if (
+            //           workJson[stagetask].askInfo[0].askInfo.askJson[p]
+            //             .answer == a.radio[p]
+            //         ) {
+            //           checkJson[stagetask][p].right = 100;
+            //           isCount += checkJson[stagetask][p].right;
+            //         } else {
+            //           checkJson[stagetask][p].right = 0;
+            //           isCount += 0;
+            //         }
+            //         if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
+            //           checkJson[stagetask][p].checkPerson[parseInt(a.radio[p])]
+            //             ? checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p])
+            //               ].push(res.data[0][k].sName)
+            //             : (checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p])
+            //               ] = [res.data[0][k].sName]);
+            //           checkJson[stagetask][p].checkCount[parseInt(a.radio[p])]
+            //             ? checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p])
+            //               ]++
+            //             : (checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p])
+            //               ] = 1);
+            //         }
+            //       }
+            //     }
+            //     checkJson[stagetask].allRight = isCount / a.radio.length;
+            //   }
+            // }
             for (var i = 0; i < chooseInfo.length; i++) {
               if (
                 res.data[0][k].stage == chooseInfo[i].stage &&
@@ -1717,20 +1723,20 @@ export default {
                     ? JSON.parse(chooseInfo[i].score).wScore
                     : chooseInfo[i].score,
                 });
-                this.checkJson[k].allRight = 0;
+                checkJson[stagetask].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < t.radio.length; p++) {
-                  if (!this.checkJson[k][p]) {
-                    this.checkJson[k][p] = {
+                  if (!checkJson[stagetask][p]) {
+                    checkJson[stagetask][p] = {
                       checkCount: [],
                       checkPerson: [],
                     };
                   }
-                  if (!this.checkJson[k][p].checkCount.length) {
-                    this.checkJson[k][p].checkCount = [];
+                  if (!checkJson[stagetask][p].checkCount.length) {
+                    checkJson[stagetask][p].checkCount = [];
                     let _askItemCount = t.testJson[p].testItem;
                     for (var aic = 0; aic < _askItemCount; aic++) {
-                      this.checkJson[k][p].checkCount.push(0);
+                      checkJson[stagetask][p].checkCount.push(0);
                     }
                   }
                   if (t.radio[p] instanceof Array) {
@@ -1738,55 +1744,55 @@ export default {
                       t.testJson[p].answer.sort().join(",") ==
                       t.radio[p].sort().join(",")
                     ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
+                      checkJson[stagetask][p].right = 100;
+                      isCount += checkJson[stagetask][p].right;
                     } else {
-                      this.checkJson[k][p].right = 0;
+                      checkJson[stagetask][p].right = 0;
                       isCount += 0;
                     }
                     for (var q = 0; q < t.radio[p].length; q++) {
-                      this.checkJson[k][p].checkPerson[parseInt(t.radio[p][q])]
-                        ? this.checkJson[k][p].checkPerson[
+                      checkJson[stagetask][p].checkPerson[parseInt(t.radio[p][q])]
+                        ? checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                           ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
+                        : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                           ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(t.radio[p][q])]
-                        ? this.checkJson[k][p].checkCount[
+                      checkJson[stagetask][p].checkCount[parseInt(t.radio[p][q])]
+                        ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p][q])
                           ]++
-                        : (this.checkJson[k][p].checkCount[
+                        : (checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p][q])
                           ] = 1);
                     }
                   } else {
                     if (t.testJson[p].answer == t.radio[p]) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
+                      checkJson[stagetask][p].right = 100;
+                      isCount += checkJson[stagetask][p].right;
                     } else {
-                      this.checkJson[k][p].right = 0;
+                      checkJson[stagetask][p].right = 0;
                       isCount += 0;
                     }
                     if (parseInt(t.radio[p]) || parseInt(t.radio[p]) == 0) {
-                      this.checkJson[k][p].checkPerson[parseInt(t.radio[p])]
-                        ? this.checkJson[k][p].checkPerson[
+                      checkJson[stagetask][p].checkPerson[parseInt(t.radio[p])]
+                        ? checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p])
                           ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
+                        : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p])
                           ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(t.radio[p])]
-                        ? this.checkJson[k][p].checkCount[
+                      checkJson[stagetask][p].checkCount[parseInt(t.radio[p])]
+                        ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p])
                           ]++
-                        : (this.checkJson[k][p].checkCount[
+                        : (checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p])
                           ] = 1);
                     }
                   }
                 }
-                this.checkJson[k].allRight = isCount / t.radio.length;
+                checkJson[stagetask].allRight = isCount / t.radio.length;
               }
             }
           }
@@ -2006,8 +2012,10 @@ export default {
           //   );
           // });
           let result = [];
+          let checkJsonArray = []
           for (var wi = 0; wi < Object.keys(workJson).length; wi++) {
             result.push(workJson[Object.keys(workJson)[wi]]);
+            checkJsonArray.push(checkJson[Object.keys(checkJson)[wi]])
           }
           var resultNewArray = result.sort(function (x, y) {
             // 以stagetask字段为排序依据
@@ -2022,7 +2030,22 @@ export default {
             // 如果第一个数字相同,则比较第二个数字
             return parseInt(x_parts[1]) - parseInt(y_parts[1]);
           });
+          var checkJsonNewArray = checkJsonArray.sort(function (x, y) {
+            // 以stagetask字段为排序依据
+            var x_parts = x.stagetask.split("-");
+            var y_parts = y.stagetask.split("-");
+
+            // 首先比较第一个数字
+            if (x_parts[0] !== y_parts[0]) {
+              return parseInt(x_parts[0]) - parseInt(y_parts[0]);
+            }
+
+            // 如果第一个数字相同,则比较第二个数字
+            return parseInt(x_parts[1]) - parseInt(y_parts[1]);
+          });
           result = resultNewArray;
+          checkJsonArray = checkJsonNewArray;
+          this.checkJson = checkJsonArray
           for (var l = 0; l < b.length; l++) {
             if (workEvaList.length > 0) {
               for (var p = 0; p < workEvaList.length; p++) {
@@ -2227,14 +2250,12 @@ export default {
     },
     //获取班级列表
     getClass() {
-      this.isLoading = true;
       let params = {
         oid: this.oid,
       };
       this.ajax
         .get(this.$store.state.api + "selectClassBySchool", params)
         .then((res) => {
-          this.isLoading = false;
           this.grade = res.data[0];
         })
         .catch((err) => {
@@ -2310,6 +2331,7 @@ export default {
           this.dyList = dyList;
           this.userAarray = res.data[1];
           this.lookWork();
+          this.getWorks();
         })
         .catch((err) => {
           console.error(err);
@@ -2706,18 +2728,18 @@ export default {
   },
   watch: {
     uid(newValue, oldValue) {
+      this.isLoading = true
       this.getCourseDetail();
       this.getClass();
       this.getGroup();
-      this.getWorks();
       // this.lookWork();
     },
   },
   mounted() {
+    this.isLoading = true
     this.getCourseDetail();
     this.getClass();
     this.getGroup();
-    this.getWorks();
     // this.lookWork();
   },
 };

+ 7 - 1
src/components/pages/components/courseReport.vue

@@ -79,7 +79,7 @@
 
 <script>
 export default {
-  props: ["ooid"],
+  props: ["ooid","checkid"],
   data() {
     return {
       sName: "",
@@ -99,6 +99,9 @@ export default {
       immediate: true,
       deep: true,
       handler(newValue, oldValue) {
+        if(this.checkid){
+          this.classChoose = this.checkid
+        }
         this.getClass();
         this.getCourse();
         this.getCourseData();
@@ -191,6 +194,9 @@ export default {
     },
   },
   created() {
+    if(this.checkid){
+          this.classChoose = this.checkid
+        }
     this.getClass();
     this.getCourse();
     this.getCourseData();

+ 7 - 1
src/components/pages/components/evaReport.vue

@@ -128,7 +128,7 @@
 
 <script>
 export default {
-  props: ["ooid"],
+  props: ["ooid","checkid"],
   data() {
     return {
       sName: "",
@@ -153,6 +153,9 @@ export default {
       immediate: true,
       deep: true,
       handler(newValue, oldValue) {
+        if(this.checkid){
+          this.classChoose = this.checkid
+        }
         this.getClass();
         this.getCourse();
         this.getCourseData();
@@ -290,6 +293,9 @@ export default {
     },
   },
   created() {
+    if(this.checkid){
+          this.classChoose = this.checkid
+        }
     this.getClass();
     this.getCourse();
     this.getCourseData();

+ 7 - 1
src/components/pages/components/stReport.vue

@@ -124,7 +124,7 @@
 
 <script>
 export default {
-  props: ["ooid", "ccid"],
+  props: ["ooid", "ccid","checkid"],
   data() {
     return {
       sName: "",
@@ -146,6 +146,9 @@ export default {
       immediate: true,
       deep: true,
       handler(newValue, oldValue) {
+        if(this.checkid){
+          this.classChoose = this.checkid
+        }
         this.getClass();
         this.getSData();
         this.$forceUpdate();
@@ -259,6 +262,9 @@ export default {
     },
   },
   created() {
+    if(this.checkid){
+      this.classChoose = this.checkid
+    }
     this.getClass();
     this.getSData();
   },

+ 159 - 135
src/components/pages/components/studentWorksDetail.vue

@@ -1354,10 +1354,10 @@
                       </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].img.length == 0 &&
+                          // worksDetail[sIndex].askInfo.length == 0 &&
+                          // worksDetail[sIndex].answerInfo.length == 0 &&
+                          // worksDetail[sIndex].wpptInfo.length == 0 &&
                           worksDetail[sIndex].chooseInfo.length > 0
                         "
                       >
@@ -1374,7 +1374,7 @@
                           <div
                             class="tool_right_box"
                             v-for="(tItem, tIndex) in worksDetail[sIndex]
-                              .chooseInfo[0].testJson"
+                              .chooseInfo[0].chooseInfo.testJson"
                             :key="tIndex"
                           >
                             <div>
@@ -1393,15 +1393,17 @@
                           </div>
                         </div>
                         <div class="allRightBox">
-                          <span>全部题的正确率:</span
+                          <span>全部题的正确率:</span
                           ><span>{{ checkJson[sIndex].allRight + "%" }}</span>
                         </div>
                       </div>
-                      <div v-else>
+                      <div v-if="
+                           worksDetail[sIndex].eList.length
+                          ">
                         <div class="ech" style="margin-left: 23px">
                           <img src="../../../assets/icon/pj/score.png" alt="" />
                         </div>
-                        <div style="height: 80%; overflow: auto">
+                        <div>
                           <div
                             class="score_box"
                             v-for="(item, index) in worksDetail[sIndex].eList"
@@ -1909,7 +1911,8 @@ export default {
           var wordInfo = res.data[12]; //文档作业
           var workEvaList = res.data[13];
           var workJson = {};
-
+          let checkJson = {}
+          
           for (var k = 0; k < res.data[0].length; k++) {
             this.allWorks = res.data[0][k];
             if (this.chapInfo.length == 0) {
@@ -1944,7 +1947,7 @@ export default {
               continue;
             }
 
-            this.checkJson[k] = {};
+            // checkJson[stagetask] = {};
 
             let stagetask = res.data[0][k].stage + "-" + res.data[0][k].task;
             if (!workJson[stagetask]) {
@@ -1967,107 +1970,110 @@ export default {
                 stagetask: stagetask,
                 time: "",
               };
-            }
-            workJson[stagetask].time = res.data[0][k].time;
-            for (var i = 0; i < askInfo.length; i++) {
-              if (
-                res.data[0][k].stage == askInfo[i].stage &&
-                res.data[0][k].task == askInfo[i].task &&
-                res.data[0][k].tool == askInfo[i].tool
-              ) {
-                const element = askInfo[i];
-                let a = JSON.parse(element.content)[0];
-                let e = [];
-                for (var y = 0; y < a.askJson.length; y++) {
-                  if (a.askJson[y].type == "2") {
-                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
-                  } else {
-                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
-                  }
-                }
-                a.radio = e;
-                workJson[stagetask].askInfo.push({
-                  askInfo: a,
-                  score: askInfo[i].score
-                    ? JSON.parse(askInfo[i].score).wScore
-                    : askInfo[i].score,
-                });
-                this.checkJson[k].allRight = 0;
-                var isCount = 0;
-                for (var p = 0; p < a.radio.length; p++) {
-                  if (!this.checkJson[k][p]) {
-                    this.checkJson[k][p] = {
-                      checkCount: [],
-                      checkPerson: [],
-                    };
-                  }
-                  if (!this.checkJson[k][p].checkCount.length) {
-                    this.checkJson[k][p].checkCount = [];
-                    let _askItemCount = a.askJson[p].askCount;
-                    for (var aic = 0; aic < _askItemCount; aic++) {
-                      this.checkJson[k][p].checkCount.push(0);
-                    }
-                  }
-                  if (a.radio[p] instanceof Array) {
-                    if (
-                      workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
-                        .sort()
-                        .join(",") == a.radio[p].sort().join(",")
-                    ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
-                    } else {
-                      this.checkJson[k][p].right = 0;
-                      isCount += 0;
-                    }
-                    for (var q = 0; q < a.radio[p].length; q++) {
-                      this.checkJson[k][p].checkPerson[parseInt(a.radio[p][q])]
-                        ? this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p][q])
-                          ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p][q])
-                          ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(a.radio[p][q])]
-                        ? this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p][q])
-                          ]++
-                        : (this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p][q])
-                          ] = 1);
-                    }
-                  } else {
-                    if (
-                      workJson[stagetask].askInfo[0].askInfo.askJson[p]
-                        .answer == a.radio[p]
-                    ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
-                    } else {
-                      this.checkJson[k][p].right = 0;
-                      isCount += 0;
-                    }
-                    if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
-                      this.checkJson[k][p].checkPerson[parseInt(a.radio[p])]
-                        ? this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p])
-                          ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p])
-                          ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(a.radio[p])]
-                        ? this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p])
-                          ]++
-                        : (this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p])
-                          ] = 1);
-                    }
-                  }
-                }
-                this.checkJson[k].allRight = isCount / a.radio.length;
+              checkJson[stagetask] = {
+                stagetask: stagetask,
               }
             }
+            workJson[stagetask].time = res.data[0][k].time;
+            // for (var i = 0; i < askInfo.length; i++) {
+            //   if (
+            //     res.data[0][k].stage == askInfo[i].stage &&
+            //     res.data[0][k].task == askInfo[i].task &&
+            //     res.data[0][k].tool == askInfo[i].tool
+            //   ) {
+            //     const element = askInfo[i];
+            //     let a = JSON.parse(element.content)[0];
+            //     let e = [];
+            //     for (var y = 0; y < a.askJson.length; y++) {
+            //       if (a.askJson[y].type == "2") {
+            //         e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
+            //       } else {
+            //         e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
+            //       }
+            //     }
+            //     a.radio = e;
+            //     workJson[stagetask].askInfo.push({
+            //       askInfo: a,
+            //       score: askInfo[i].score
+            //         ? JSON.parse(askInfo[i].score).wScore
+            //         : askInfo[i].score,
+            //     });
+            //     checkJson[stagetask].allRight = 0;
+            //     var isCount = 0;
+            //     for (var p = 0; p < a.radio.length; p++) {
+            //       if (!checkJson[stagetask][p]) {
+            //         checkJson[stagetask][p] = {
+            //           checkCount: [],
+            //           checkPerson: [],
+            //         };
+            //       }
+            //       if (!checkJson[stagetask][p].checkCount.length) {
+            //         checkJson[stagetask][p].checkCount = [];
+            //         let _askItemCount = a.askJson[p].askCount;
+            //         for (var aic = 0; aic < _askItemCount; aic++) {
+            //           checkJson[stagetask][p].checkCount.push(0);
+            //         }
+            //       }
+            //       if (a.radio[p] instanceof Array) {
+            //         if (
+            //           workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
+            //             .sort()
+            //             .join(",") == a.radio[p].sort().join(",")
+            //         ) {
+            //           checkJson[stagetask][p].right = 100;
+            //           isCount += checkJson[stagetask][p].right;
+            //         } else {
+            //           checkJson[stagetask][p].right = 0;
+            //           isCount += 0;
+            //         }
+            //         for (var q = 0; q < a.radio[p].length; q++) {
+            //           checkJson[stagetask][p].checkPerson[parseInt(a.radio[p][q])]
+            //             ? checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p][q])
+            //               ].push(res.data[0][k].sName)
+            //             : (checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p][q])
+            //               ] = [res.data[0][k].sName]);
+            //           checkJson[stagetask][p].checkCount[parseInt(a.radio[p][q])]
+            //             ? checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p][q])
+            //               ]++
+            //             : (checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p][q])
+            //               ] = 1);
+            //         }
+            //       } else {
+            //         if (
+            //           workJson[stagetask].askInfo[0].askInfo.askJson[p]
+            //             .answer == a.radio[p]
+            //         ) {
+            //           checkJson[stagetask][p].right = 100;
+            //           isCount += checkJson[stagetask][p].right;
+            //         } else {
+            //           checkJson[stagetask][p].right = 0;
+            //           isCount += 0;
+            //         }
+            //         if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
+            //           checkJson[stagetask][p].checkPerson[parseInt(a.radio[p])]
+            //             ? checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p])
+            //               ].push(res.data[0][k].sName)
+            //             : (checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p])
+            //               ] = [res.data[0][k].sName]);
+            //           checkJson[stagetask][p].checkCount[parseInt(a.radio[p])]
+            //             ? checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p])
+            //               ]++
+            //             : (checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p])
+            //               ] = 1);
+            //         }
+            //       }
+            //     }
+            //     checkJson[stagetask].allRight = isCount / a.radio.length;
+            //   }
+            // }
             for (var i = 0; i < chooseInfo.length; i++) {
               if (
                 res.data[0][k].stage == chooseInfo[i].stage &&
@@ -2091,20 +2097,20 @@ export default {
                     ? JSON.parse(chooseInfo[i].score).wScore
                     : chooseInfo[i].score,
                 });
-                this.checkJson[k].allRight = 0;
+                checkJson[stagetask].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < t.radio.length; p++) {
-                  if (!this.checkJson[k][p]) {
-                    this.checkJson[k][p] = {
+                  if (!checkJson[stagetask][p]) {
+                    checkJson[stagetask][p] = {
                       checkCount: [],
                       checkPerson: [],
                     };
                   }
-                  if (!this.checkJson[k][p].checkCount.length) {
-                    this.checkJson[k][p].checkCount = [];
+                  if (!checkJson[stagetask][p].checkCount.length) {
+                    checkJson[stagetask][p].checkCount = [];
                     let _askItemCount = t.testJson[p].testItem;
                     for (var aic = 0; aic < _askItemCount; aic++) {
-                      this.checkJson[k][p].checkCount.push(0);
+                      checkJson[stagetask][p].checkCount.push(0);
                     }
                   }
                   if (t.radio[p] instanceof Array) {
@@ -2112,55 +2118,55 @@ export default {
                       t.testJson[p].answer.sort().join(",") ==
                       t.radio[p].sort().join(",")
                     ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
+                      checkJson[stagetask][p].right = 100;
+                      isCount += checkJson[stagetask][p].right;
                     } else {
-                      this.checkJson[k][p].right = 0;
+                      checkJson[stagetask][p].right = 0;
                       isCount += 0;
                     }
                     for (var q = 0; q < t.radio[p].length; q++) {
-                      this.checkJson[k][p].checkPerson[parseInt(t.radio[p][q])]
-                        ? this.checkJson[k][p].checkPerson[
+                      checkJson[stagetask][p].checkPerson[parseInt(t.radio[p][q])]
+                        ? checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                           ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
+                        : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                           ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(t.radio[p][q])]
-                        ? this.checkJson[k][p].checkCount[
+                      checkJson[stagetask][p].checkCount[parseInt(t.radio[p][q])]
+                        ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p][q])
                           ]++
-                        : (this.checkJson[k][p].checkCount[
+                        : (checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p][q])
                           ] = 1);
                     }
                   } else {
                     if (t.testJson[p].answer == t.radio[p]) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
+                      checkJson[stagetask][p].right = 100;
+                      isCount += checkJson[stagetask][p].right;
                     } else {
-                      this.checkJson[k][p].right = 0;
+                      checkJson[stagetask][p].right = 0;
                       isCount += 0;
                     }
                     if (parseInt(t.radio[p]) || parseInt(t.radio[p]) == 0) {
-                      this.checkJson[k][p].checkPerson[parseInt(t.radio[p])]
-                        ? this.checkJson[k][p].checkPerson[
+                      checkJson[stagetask][p].checkPerson[parseInt(t.radio[p])]
+                        ? checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p])
                           ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
+                        : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p])
                           ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(t.radio[p])]
-                        ? this.checkJson[k][p].checkCount[
+                      checkJson[stagetask][p].checkCount[parseInt(t.radio[p])]
+                        ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p])
                           ]++
-                        : (this.checkJson[k][p].checkCount[
+                        : (checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p])
                           ] = 1);
                     }
                   }
                 }
-                this.checkJson[k].allRight = isCount / t.radio.length;
+                checkJson[stagetask].allRight = isCount / t.radio.length;
               }
             }
           }
@@ -2380,8 +2386,10 @@ export default {
           //   );
           // });
           let result = [];
+          let checkJsonArray = []
           for (var wi = 0; wi < Object.keys(workJson).length; wi++) {
             result.push(workJson[Object.keys(workJson)[wi]]);
+            checkJsonArray.push(checkJson[Object.keys(checkJson)[wi]])
           }
           var resultNewArray = result.sort(function (x, y) {
             // 以stagetask字段为排序依据
@@ -2396,7 +2404,22 @@ export default {
             // 如果第一个数字相同,则比较第二个数字
             return parseInt(x_parts[1]) - parseInt(y_parts[1]);
           });
+          var checkJsonNewArray = checkJsonArray.sort(function (x, y) {
+            // 以stagetask字段为排序依据
+            var x_parts = x.stagetask.split("-");
+            var y_parts = y.stagetask.split("-");
+
+            // 首先比较第一个数字
+            if (x_parts[0] !== y_parts[0]) {
+              return parseInt(x_parts[0]) - parseInt(y_parts[0]);
+            }
+
+            // 如果第一个数字相同,则比较第二个数字
+            return parseInt(x_parts[1]) - parseInt(y_parts[1]);
+          });
           result = resultNewArray;
+          checkJsonArray = checkJsonNewArray;
+          this.checkJson = checkJsonArray
           for (var l = 0; l < b.length; l++) {
             if (workEvaList.length > 0) {
               for (var p = 0; p < workEvaList.length; p++) {
@@ -3233,6 +3256,7 @@ export default {
           }
           this.dyList = dyList;
           this.userAarray = res.data[1];
+          this.getWorks();
         })
         .catch((err) => {
           console.error(err);
@@ -3419,8 +3443,8 @@ export default {
   },
   created() {
     this.page = 1;
+    this.isLoading = true
     this.getCourseDetail();
-    this.getWorks();
   },
 };
 </script>

+ 163 - 138
src/components/pages/components/worksDetail2.vue

@@ -1357,10 +1357,10 @@
                       </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].img.length == 0 &&
+                          // worksDetail[sIndex].askInfo.length == 0 &&
+                          // worksDetail[sIndex].answerInfo.length == 0 &&
+                          // worksDetail[sIndex].wpptInfo.length == 0 &&
                           worksDetail[sIndex].chooseInfo.length > 0
                         "
                       >
@@ -1377,7 +1377,7 @@
                           <div
                             class="tool_right_box"
                             v-for="(tItem, tIndex) in worksDetail[sIndex]
-                              .chooseInfo[0].testJson"
+                              .chooseInfo[0].chooseInfo.testJson"
                             :key="tIndex"
                           >
                             <div>
@@ -1396,15 +1396,18 @@
                           </div>
                         </div>
                         <div class="allRightBox">
-                          <span>全部道题的正确率:</span
-                          ><span>{{ checkJson[sIndex].allRight + "%" }}</span>
+                          <span>全部题的正确率:</span
+                          >
+                          <span>{{ checkJson[sIndex].allRight + "%" }}</span>
                         </div>
                       </div>
-                      <div v-else>
+                      <div v-if="
+                            worksDetail[sIndex].eList.length
+                          ">
                         <div class="ech" style="margin-left: 23px">
                           <img src="../../../assets/icon/pj/score.png" alt="" />
                         </div>
-                        <div style="height: 80%; overflow: auto">
+                        <div>
                           <div
                             class="score_box"
                             v-for="(item, index) in worksDetail[sIndex].eList"
@@ -1796,6 +1799,7 @@ export default {
   watch: {
     typeCheck(newValue, oldValue) {
       this.loading = true;
+      this.isLoading = true
       this.tableData = [];
       if (newValue) {
         this.getWorks1();
@@ -1913,6 +1917,7 @@ export default {
           var wordInfo = res.data[12]; //文档作业
           var workEvaList = res.data[13];
           var workJson = {};
+          let checkJson = {}
 
           for (var k = 0; k < res.data[0].length; k++) {
             this.allWorks = res.data[0][k];
@@ -1948,8 +1953,7 @@ export default {
               continue;
             }
 
-            this.checkJson[k] = {};
-
+            // checkJson[stagetask] = {};
             let stagetask = res.data[0][k].stage + "-" + res.data[0][k].task;
             if (!workJson[stagetask]) {
               workJson[stagetask] = {
@@ -1971,107 +1975,112 @@ export default {
                 stagetask: stagetask,
                 time: "",
               };
-            }
-            workJson[stagetask].time = res.data[0][k].time;
-            for (var i = 0; i < askInfo.length; i++) {
-              if (
-                res.data[0][k].stage == askInfo[i].stage &&
-                res.data[0][k].task == askInfo[i].task &&
-                res.data[0][k].tool == askInfo[i].tool
-              ) {
-                const element = askInfo[i];
-                let a = JSON.parse(element.content)[0];
-                let e = [];
-                for (var y = 0; y < a.askJson.length; y++) {
-                  if (a.askJson[y].type == "2") {
-                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
-                  } else {
-                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
-                  }
-                }
-                a.radio = e;
-                workJson[stagetask].askInfo.push({
-                  askInfo: a,
-                  score: askInfo[i].score
-                    ? JSON.parse(askInfo[i].score).wScore
-                    : askInfo[i].score,
-                });
-                this.checkJson[k].allRight = 0;
-                var isCount = 0;
-                for (var p = 0; p < a.radio.length; p++) {
-                  if (!this.checkJson[k][p]) {
-                    this.checkJson[k][p] = {
-                      checkCount: [],
-                      checkPerson: [],
-                    };
-                  }
-                  if (!this.checkJson[k][p].checkCount.length) {
-                    this.checkJson[k][p].checkCount = [];
-                    let _askItemCount = a.askJson[p].askCount;
-                    for (var aic = 0; aic < _askItemCount; aic++) {
-                      this.checkJson[k][p].checkCount.push(0);
-                    }
-                  }
-                  if (a.radio[p] instanceof Array) {
-                    if (
-                      workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
-                        .sort()
-                        .join(",") == a.radio[p].sort().join(",")
-                    ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
-                    } else {
-                      this.checkJson[k][p].right = 0;
-                      isCount += 0;
-                    }
-                    for (var q = 0; q < a.radio[p].length; q++) {
-                      this.checkJson[k][p].checkPerson[parseInt(a.radio[p][q])]
-                        ? this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p][q])
-                          ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p][q])
-                          ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(a.radio[p][q])]
-                        ? this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p][q])
-                          ]++
-                        : (this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p][q])
-                          ] = 1);
-                    }
-                  } else {
-                    if (
-                      workJson[stagetask].askInfo[0].askInfo.askJson[p]
-                        .answer == a.radio[p]
-                    ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
-                    } else {
-                      this.checkJson[k][p].right = 0;
-                      isCount += 0;
-                    }
-                    if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
-                      this.checkJson[k][p].checkPerson[parseInt(a.radio[p])]
-                        ? this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p])
-                          ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p])
-                          ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(a.radio[p])]
-                        ? this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p])
-                          ]++
-                        : (this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p])
-                          ] = 1);
-                    }
-                  }
-                }
-                this.checkJson[k].allRight = isCount / a.radio.length;
+              checkJson[stagetask] = {
+                stagetask: stagetask,
               }
             }
+            workJson[stagetask].time = res.data[0][k].time;
+            // for (var i = 0; i < askInfo.length; i++) {
+            //   if (
+            //     res.data[0][k].stage == askInfo[i].stage &&
+            //     res.data[0][k].task == askInfo[i].task &&
+            //     res.data[0][k].tool == askInfo[i].tool
+            //   ) {
+            //     const element = askInfo[i];
+            //     let a = JSON.parse(element.content)[0];
+            //     let e = [];
+            //     for (var y = 0; y < a.askJson.length; y++) {
+            //       if (a.askJson[y].type == "2") {
+            //         e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
+            //       } else {
+            //         e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
+            //       }
+            //     }
+            //     a.radio = e;
+            //     workJson[stagetask].askInfo.push({
+            //       askInfo: a,
+            //       score: askInfo[i].score
+            //         ? JSON.parse(askInfo[i].score).wScore
+            //         : askInfo[i].score,
+            //     });
+            //     // checkJson[stagetask].allRight = 0;
+            //     checkJson[stagetask].allRight = 0
+            //     var isCount = 0;
+            //     for (var p = 0; p < a.radio.length; p++) {
+            //       if (!checkJson[stagetask][p]) {
+            //         checkJson[stagetask][p] = {
+            //           checkCount: [],
+            //           checkPerson: [],
+            //         };
+            //       }
+            //       if (!checkJson[stagetask][p].checkCount.length) {
+            //         checkJson[stagetask][p].checkCount = [];
+            //         let _askItemCount = a.askJson[p].askCount;
+            //         for (var aic = 0; aic < _askItemCount; aic++) {
+            //           checkJson[stagetask][p].checkCount.push(0);
+            //         }
+            //       }
+            //       if (a.radio[p] instanceof Array) {
+            //         if (
+            //           workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
+            //             .sort()
+            //             .join(",") == a.radio[p].sort().join(",")
+            //         ) {
+            //           checkJson[stagetask][p].right = 100;
+            //           isCount += checkJson[stagetask][p].right;
+            //         } else {
+            //           checkJson[stagetask][p].right = 0;
+            //           isCount += 0;
+            //         }
+            //         for (var q = 0; q < a.radio[p].length; q++) {
+            //           checkJson[stagetask][p].checkPerson[parseInt(a.radio[p][q])]
+            //             ? checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p][q])
+            //               ].push(res.data[0][k].sName)
+            //             : (checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p][q])
+            //               ] = [res.data[0][k].sName]);
+            //               checkJson[stagetask][p].checkCount[parseInt(a.radio[p][q])]
+            //             ? checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p][q])
+            //               ]++
+            //             : (checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p][q])
+            //               ] = 1);
+            //         }
+            //       } else {
+            //         if (
+            //           workJson[stagetask].askInfo[0].askInfo.askJson[p]
+            //             .answer == a.radio[p]
+            //         ) {
+            //           checkJson[stagetask][p].right = 100;
+            //           isCount += checkJson[stagetask][p].right;
+            //         } else {
+            //           checkJson[stagetask][p].right = 0;
+            //           isCount += 0;
+            //         }
+            //         if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
+            //           checkJson[stagetask][p].checkPerson[parseInt(a.radio[p])]
+            //             ? checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p])
+            //               ].push(res.data[0][k].sName)
+            //             : (checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p])
+            //               ] = [res.data[0][k].sName]);
+            //               checkJson[stagetask][p].checkCount[parseInt(a.radio[p])]
+            //             ? checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p])
+            //               ]++
+            //             : (checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p])
+            //               ] = 1);
+            //         }
+            //       }
+            //     }
+            //     checkJson[stagetask].allRight = isCount / a.radio.length;
+            //   }
+            // }
+            console.log(checkJson);
             for (var i = 0; i < chooseInfo.length; i++) {
               if (
                 res.data[0][k].stage == chooseInfo[i].stage &&
@@ -2095,20 +2104,20 @@ export default {
                     ? JSON.parse(chooseInfo[i].score).wScore
                     : chooseInfo[i].score,
                 });
-                this.checkJson[k].allRight = 0;
+                checkJson[stagetask].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < t.radio.length; p++) {
-                  if (!this.checkJson[k][p]) {
-                    this.checkJson[k][p] = {
+                  if (!checkJson[stagetask][p]) {
+                    checkJson[stagetask][p] = {
                       checkCount: [],
                       checkPerson: [],
                     };
                   }
-                  if (!this.checkJson[k][p].checkCount.length) {
-                    this.checkJson[k][p].checkCount = [];
+                  if (!checkJson[stagetask][p].checkCount.length) {
+                    checkJson[stagetask][p].checkCount = [];
                     let _askItemCount = t.testJson[p].testItem;
                     for (var aic = 0; aic < _askItemCount; aic++) {
-                      this.checkJson[k][p].checkCount.push(0);
+                      checkJson[stagetask][p].checkCount.push(0);
                     }
                   }
                   if (t.radio[p] instanceof Array) {
@@ -2116,55 +2125,55 @@ export default {
                       t.testJson[p].answer.sort().join(",") ==
                       t.radio[p].sort().join(",")
                     ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
+                      checkJson[stagetask][p].right = 100;
+                      isCount += checkJson[stagetask][p].right;
                     } else {
-                      this.checkJson[k][p].right = 0;
+                      checkJson[stagetask][p].right = 0;
                       isCount += 0;
                     }
                     for (var q = 0; q < t.radio[p].length; q++) {
-                      this.checkJson[k][p].checkPerson[parseInt(t.radio[p][q])]
-                        ? this.checkJson[k][p].checkPerson[
+                      checkJson[stagetask][p].checkPerson[parseInt(t.radio[p][q])]
+                        ? checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                           ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
+                        : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                           ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(t.radio[p][q])]
-                        ? this.checkJson[k][p].checkCount[
+                          checkJson[stagetask][p].checkCount[parseInt(t.radio[p][q])]
+                        ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p][q])
                           ]++
-                        : (this.checkJson[k][p].checkCount[
+                        : (checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p][q])
                           ] = 1);
                     }
                   } else {
                     if (t.testJson[p].answer == t.radio[p]) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
+                      checkJson[stagetask][p].right = 100;
+                      isCount += checkJson[stagetask][p].right;
                     } else {
-                      this.checkJson[k][p].right = 0;
+                      checkJson[stagetask][p].right = 0;
                       isCount += 0;
                     }
                     if (parseInt(t.radio[p]) || parseInt(t.radio[p]) == 0) {
-                      this.checkJson[k][p].checkPerson[parseInt(t.radio[p])]
-                        ? this.checkJson[k][p].checkPerson[
+                      checkJson[stagetask][p].checkPerson[parseInt(t.radio[p])]
+                        ? checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p])
                           ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
+                        : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p])
                           ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(t.radio[p])]
-                        ? this.checkJson[k][p].checkCount[
+                          checkJson[stagetask][p].checkCount[parseInt(t.radio[p])]
+                        ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p])
                           ]++
-                        : (this.checkJson[k][p].checkCount[
+                        : (checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p])
                           ] = 1);
                     }
                   }
                 }
-                this.checkJson[k].allRight = isCount / t.radio.length;
+                checkJson[stagetask].allRight = isCount / t.radio.length;
               }
             }
           }
@@ -2384,8 +2393,10 @@ export default {
           //   );
           // });
           let result = [];
+          let checkJsonArray = []
           for (var wi = 0; wi < Object.keys(workJson).length; wi++) {
             result.push(workJson[Object.keys(workJson)[wi]]);
+            checkJsonArray.push(checkJson[Object.keys(checkJson)[wi]])
           }
           var resultNewArray = result.sort(function (x, y) {
             // 以stagetask字段为排序依据
@@ -2400,7 +2411,22 @@ export default {
             // 如果第一个数字相同,则比较第二个数字
             return parseInt(x_parts[1]) - parseInt(y_parts[1]);
           });
+          var checkJsonNewArray = checkJsonArray.sort(function (x, y) {
+            // 以stagetask字段为排序依据
+            var x_parts = x.stagetask.split("-");
+            var y_parts = y.stagetask.split("-");
+
+            // 首先比较第一个数字
+            if (x_parts[0] !== y_parts[0]) {
+              return parseInt(x_parts[0]) - parseInt(y_parts[0]);
+            }
+
+            // 如果第一个数字相同,则比较第二个数字
+            return parseInt(x_parts[1]) - parseInt(y_parts[1]);
+          });
           result = resultNewArray;
+          checkJsonArray = checkJsonNewArray;
+          this.checkJson = checkJsonArray
           for (var l = 0; l < b.length; l++) {
             if (workEvaList.length > 0) {
               for (var p = 0; p < workEvaList.length; p++) {
@@ -2628,14 +2654,12 @@ export default {
     },
     //获取班级列表
     getClass() {
-      this.isLoading = true;
       let params = {
         oid: this.oid,
       };
       this.ajax
         .get(this.$store.state.api + "selectClassBySchool", params)
         .then((res) => {
-          this.isLoading = false;
           this.grade = res.data[0];
         })
         .catch((err) => {
@@ -2730,6 +2754,7 @@ export default {
           }
           this.dyList = dyList;
           this.userAarray = res.data[1];
+          this.getWorks();
         })
         .catch((err) => {
           console.error(err);
@@ -3545,10 +3570,10 @@ export default {
   },
   created() {
     this.page = 1;
+    this.isLoading = true
     this.getCourseDetail();
     this.getClass();
     this.getGroup();
-    this.getWorks();
   },
 };
 </script>

+ 158 - 136
src/components/pages/components/worksDetail3.vue

@@ -1024,10 +1024,10 @@
                 </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].img.length == 0 &&
+                    // worksDetail[sIndex].askInfo.length == 0 &&
+                    // worksDetail[sIndex].answerInfo.length == 0 &&
+                    // worksDetail[sIndex].wpptInfo.length == 0 &&
                     worksDetail[sIndex].chooseInfo.length > 0
                   "
                 >
@@ -1040,7 +1040,7 @@
                     <div
                       class="tool_right_box"
                       v-for="(tItem, tIndex) in worksDetail[sIndex]
-                        .chooseInfo[0].testJson"
+                              .chooseInfo[0].chooseInfo.testJson"
                       :key="tIndex"
                     >
                       <div>
@@ -1057,11 +1057,13 @@
                     </div>
                   </div>
                   <div class="allRightBox">
-                    <span>全部题的正确率:</span
+                    <span>全部题的正确率:</span
                     ><span>{{ checkJson[sIndex].allRight + "%" }}</span>
                   </div>
                 </div>
-                <div v-else>
+                <div v-if="
+                            worksDetail[sIndex].eList.length
+                          ">
                   <div class="ech" style="margin-left: 23px">
                     <img src="../../../assets/icon/pj/score.png" alt="" />
                   </div>
@@ -1535,6 +1537,7 @@ export default {
           var wordInfo = res.data[12]; //文档作业
           var workEvaList = res.data[13];
           var workJson = {};
+          let checkJson = {}
 
           for (var k = 0; k < res.data[0].length; k++) {
             this.allWorks = res.data[0][k];
@@ -1570,7 +1573,7 @@ export default {
               continue;
             }
 
-            this.checkJson[k] = {};
+            // checkJson[stagetask] = {};
 
             let stagetask = res.data[0][k].stage + "-" + res.data[0][k].task;
             if (!workJson[stagetask]) {
@@ -1593,107 +1596,110 @@ export default {
                 stagetask: stagetask,
                 time: "",
               };
-            }
-            workJson[stagetask].time = res.data[0][k].time;
-            for (var i = 0; i < askInfo.length; i++) {
-              if (
-                res.data[0][k].stage == askInfo[i].stage &&
-                res.data[0][k].task == askInfo[i].task &&
-                res.data[0][k].tool == askInfo[i].tool
-              ) {
-                const element = askInfo[i];
-                let a = JSON.parse(element.content)[0];
-                let e = [];
-                for (var y = 0; y < a.askJson.length; y++) {
-                  if (a.askJson[y].type == "2") {
-                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
-                  } else {
-                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
-                  }
-                }
-                a.radio = e;
-                workJson[stagetask].askInfo.push({
-                  askInfo: a,
-                  score: askInfo[i].score
-                    ? JSON.parse(askInfo[i].score).wScore
-                    : askInfo[i].score,
-                });
-                this.checkJson[k].allRight = 0;
-                var isCount = 0;
-                for (var p = 0; p < a.radio.length; p++) {
-                  if (!this.checkJson[k][p]) {
-                    this.checkJson[k][p] = {
-                      checkCount: [],
-                      checkPerson: [],
-                    };
-                  }
-                  if (!this.checkJson[k][p].checkCount.length) {
-                    this.checkJson[k][p].checkCount = [];
-                    let _askItemCount = a.askJson[p].askCount;
-                    for (var aic = 0; aic < _askItemCount; aic++) {
-                      this.checkJson[k][p].checkCount.push(0);
-                    }
-                  }
-                  if (a.radio[p] instanceof Array) {
-                    if (
-                      workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
-                        .sort()
-                        .join(",") == a.radio[p].sort().join(",")
-                    ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
-                    } else {
-                      this.checkJson[k][p].right = 0;
-                      isCount += 0;
-                    }
-                    for (var q = 0; q < a.radio[p].length; q++) {
-                      this.checkJson[k][p].checkPerson[parseInt(a.radio[p][q])]
-                        ? this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p][q])
-                          ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p][q])
-                          ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(a.radio[p][q])]
-                        ? this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p][q])
-                          ]++
-                        : (this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p][q])
-                          ] = 1);
-                    }
-                  } else {
-                    if (
-                      workJson[stagetask].askInfo[0].askInfo.askJson[p]
-                        .answer == a.radio[p]
-                    ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
-                    } else {
-                      this.checkJson[k][p].right = 0;
-                      isCount += 0;
-                    }
-                    if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
-                      this.checkJson[k][p].checkPerson[parseInt(a.radio[p])]
-                        ? this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p])
-                          ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p])
-                          ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(a.radio[p])]
-                        ? this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p])
-                          ]++
-                        : (this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p])
-                          ] = 1);
-                    }
-                  }
-                }
-                this.checkJson[k].allRight = isCount / a.radio.length;
+              checkJson[stagetask] = {
+                stagetask: stagetask,
               }
             }
+            workJson[stagetask].time = res.data[0][k].time;
+            // for (var i = 0; i < askInfo.length; i++) {
+            //   if (
+            //     res.data[0][k].stage == askInfo[i].stage &&
+            //     res.data[0][k].task == askInfo[i].task &&
+            //     res.data[0][k].tool == askInfo[i].tool
+            //   ) {
+            //     const element = askInfo[i];
+            //     let a = JSON.parse(element.content)[0];
+            //     let e = [];
+            //     for (var y = 0; y < a.askJson.length; y++) {
+            //       if (a.askJson[y].type == "2") {
+            //         e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
+            //       } else {
+            //         e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
+            //       }
+            //     }
+            //     a.radio = e;
+            //     workJson[stagetask].askInfo.push({
+            //       askInfo: a,
+            //       score: askInfo[i].score
+            //         ? JSON.parse(askInfo[i].score).wScore
+            //         : askInfo[i].score,
+            //     });
+            //     checkJson[stagetask].allRight = 0;
+            //     var isCount = 0;
+            //     for (var p = 0; p < a.radio.length; p++) {
+            //       if (!checkJson[stagetask][p]) {
+            //         checkJson[stagetask][p] = {
+            //           checkCount: [],
+            //           checkPerson: [],
+            //         };
+            //       }
+            //       if (!checkJson[stagetask][p].checkCount.length) {
+            //         checkJson[stagetask][p].checkCount = [];
+            //         let _askItemCount = a.askJson[p].askCount;
+            //         for (var aic = 0; aic < _askItemCount; aic++) {
+            //           checkJson[stagetask][p].checkCount.push(0);
+            //         }
+            //       }
+            //       if (a.radio[p] instanceof Array) {
+            //         if (
+            //           workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
+            //             .sort()
+            //             .join(",") == a.radio[p].sort().join(",")
+            //         ) {
+            //           checkJson[stagetask][p].right = 100;
+            //           isCount += checkJson[stagetask][p].right;
+            //         } else {
+            //           checkJson[stagetask][p].right = 0;
+            //           isCount += 0;
+            //         }
+            //         for (var q = 0; q < a.radio[p].length; q++) {
+            //           checkJson[stagetask][p].checkPerson[parseInt(a.radio[p][q])]
+            //             ? checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p][q])
+            //               ].push(res.data[0][k].sName)
+            //             : (checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p][q])
+            //               ] = [res.data[0][k].sName]);
+            //           checkJson[stagetask][p].checkCount[parseInt(a.radio[p][q])]
+            //             ? checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p][q])
+            //               ]++
+            //             : (checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p][q])
+            //               ] = 1);
+            //         }
+            //       } else {
+            //         if (
+            //           workJson[stagetask].askInfo[0].askInfo.askJson[p]
+            //             .answer == a.radio[p]
+            //         ) {
+            //           checkJson[stagetask][p].right = 100;
+            //           isCount += checkJson[stagetask][p].right;
+            //         } else {
+            //           checkJson[stagetask][p].right = 0;
+            //           isCount += 0;
+            //         }
+            //         if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
+            //           checkJson[stagetask][p].checkPerson[parseInt(a.radio[p])]
+            //             ? checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p])
+            //               ].push(res.data[0][k].sName)
+            //             : (checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p])
+            //               ] = [res.data[0][k].sName]);
+            //           checkJson[stagetask][p].checkCount[parseInt(a.radio[p])]
+            //             ? checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p])
+            //               ]++
+            //             : (checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p])
+            //               ] = 1);
+            //         }
+            //       }
+            //     }
+            //     checkJson[stagetask].allRight = isCount / a.radio.length;
+            //   }
+            // }
             for (var i = 0; i < chooseInfo.length; i++) {
               if (
                 res.data[0][k].stage == chooseInfo[i].stage &&
@@ -1717,20 +1723,20 @@ export default {
                     ? JSON.parse(chooseInfo[i].score).wScore
                     : chooseInfo[i].score,
                 });
-                this.checkJson[k].allRight = 0;
+                checkJson[stagetask].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < t.radio.length; p++) {
-                  if (!this.checkJson[k][p]) {
-                    this.checkJson[k][p] = {
+                  if (!checkJson[stagetask][p]) {
+                    checkJson[stagetask][p] = {
                       checkCount: [],
                       checkPerson: [],
                     };
                   }
-                  if (!this.checkJson[k][p].checkCount.length) {
-                    this.checkJson[k][p].checkCount = [];
+                  if (!checkJson[stagetask][p].checkCount.length) {
+                    checkJson[stagetask][p].checkCount = [];
                     let _askItemCount = t.testJson[p].testItem;
                     for (var aic = 0; aic < _askItemCount; aic++) {
-                      this.checkJson[k][p].checkCount.push(0);
+                      checkJson[stagetask][p].checkCount.push(0);
                     }
                   }
                   if (t.radio[p] instanceof Array) {
@@ -1738,55 +1744,55 @@ export default {
                       t.testJson[p].answer.sort().join(",") ==
                       t.radio[p].sort().join(",")
                     ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
+                      checkJson[stagetask][p].right = 100;
+                      isCount += checkJson[stagetask][p].right;
                     } else {
-                      this.checkJson[k][p].right = 0;
+                      checkJson[stagetask][p].right = 0;
                       isCount += 0;
                     }
                     for (var q = 0; q < t.radio[p].length; q++) {
-                      this.checkJson[k][p].checkPerson[parseInt(t.radio[p][q])]
-                        ? this.checkJson[k][p].checkPerson[
+                      checkJson[stagetask][p].checkPerson[parseInt(t.radio[p][q])]
+                        ? checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                           ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
+                        : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                           ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(t.radio[p][q])]
-                        ? this.checkJson[k][p].checkCount[
+                      checkJson[stagetask][p].checkCount[parseInt(t.radio[p][q])]
+                        ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p][q])
                           ]++
-                        : (this.checkJson[k][p].checkCount[
+                        : (checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p][q])
                           ] = 1);
                     }
                   } else {
                     if (t.testJson[p].answer == t.radio[p]) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
+                      checkJson[stagetask][p].right = 100;
+                      isCount += checkJson[stagetask][p].right;
                     } else {
-                      this.checkJson[k][p].right = 0;
+                      checkJson[stagetask][p].right = 0;
                       isCount += 0;
                     }
                     if (parseInt(t.radio[p]) || parseInt(t.radio[p]) == 0) {
-                      this.checkJson[k][p].checkPerson[parseInt(t.radio[p])]
-                        ? this.checkJson[k][p].checkPerson[
+                      checkJson[stagetask][p].checkPerson[parseInt(t.radio[p])]
+                        ? checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p])
                           ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
+                        : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p])
                           ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(t.radio[p])]
-                        ? this.checkJson[k][p].checkCount[
+                      checkJson[stagetask][p].checkCount[parseInt(t.radio[p])]
+                        ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p])
                           ]++
-                        : (this.checkJson[k][p].checkCount[
+                        : (checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p])
                           ] = 1);
                     }
                   }
                 }
-                this.checkJson[k].allRight = isCount / t.radio.length;
+                checkJson[stagetask].allRight = isCount / t.radio.length;
               }
             }
           }
@@ -2006,8 +2012,10 @@ export default {
           //   );
           // });
           let result = [];
+          let checkJsonArray = []
           for (var wi = 0; wi < Object.keys(workJson).length; wi++) {
             result.push(workJson[Object.keys(workJson)[wi]]);
+            checkJsonArray.push(checkJson[Object.keys(checkJson)[wi]])
           }
           var resultNewArray = result.sort(function (x, y) {
             // 以stagetask字段为排序依据
@@ -2022,7 +2030,22 @@ export default {
             // 如果第一个数字相同,则比较第二个数字
             return parseInt(x_parts[1]) - parseInt(y_parts[1]);
           });
+          var checkJsonNewArray = checkJsonArray.sort(function (x, y) {
+            // 以stagetask字段为排序依据
+            var x_parts = x.stagetask.split("-");
+            var y_parts = y.stagetask.split("-");
+
+            // 首先比较第一个数字
+            if (x_parts[0] !== y_parts[0]) {
+              return parseInt(x_parts[0]) - parseInt(y_parts[0]);
+            }
+
+            // 如果第一个数字相同,则比较第二个数字
+            return parseInt(x_parts[1]) - parseInt(y_parts[1]);
+          });
           result = resultNewArray;
+          checkJsonArray = checkJsonNewArray;
+          this.checkJson = checkJsonArray
           for (var l = 0; l < b.length; l++) {
             if (workEvaList.length > 0) {
               for (var p = 0; p < workEvaList.length; p++) {
@@ -2229,14 +2252,12 @@ export default {
     },
     //获取班级列表
     getClass() {
-      this.isLoading = true;
       let params = {
         oid: this.oid,
       };
       this.ajax
         .get(this.$store.state.api + "selectClassBySchool", params)
         .then((res) => {
-          this.isLoading = false;
           this.grade = res.data[0];
         })
         .catch((err) => {
@@ -2312,6 +2333,7 @@ export default {
           this.dyList = dyList;
           this.userAarray = res.data[1];
           this.lookWork();
+          this.getWorks();
         })
         .catch((err) => {
           console.error(err);
@@ -2710,18 +2732,18 @@ export default {
   },
   watch: {
     uid(newValue, oldValue) {
+      this.isLoading = true
       this.getCourseDetail();
       this.getClass();
       this.getGroup();
-      this.getWorks();
       // this.lookWork();
     },
   },
   mounted() {
+    this.isLoading = true
     this.getCourseDetail();
     this.getClass();
     this.getGroup();
-    this.getWorks();
     // this.lookWork();
   },
 };

+ 66 - 43
src/components/pages/course.vue

@@ -57,6 +57,7 @@
               </div>
               <input class="sInput" type="text" placeholder="请输入关键字" v-model="courseName" @input="getCourse()" />
             </div>
+            <el-button type="primary" class="bgColor" style="margin-left: 10px;" @click="reset">重置</el-button>
           </div>
         </div>
         <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
@@ -87,27 +88,27 @@
               <div v-for="(item1, index1) in CourseTypeJson[item.id]" :key="index + '-' + index1" :label="item1.id"
                 @click="getCourse2(item.name, item.id, item1.id, 2)">
                 <div class="cName" :class="typea == item1.id || typeb == item1.id || typed == item1.id
-                    ? 'isCType'
-                    : ''
+                  ? 'isCType'
+                  : ''
                   ">
                   {{ item1.name }}
                 </div>
               </div>
             </div>
           </div>
-          <div class="all_choose"  v-if="role == '1'">
+          <div class="all_choose" v-if="role == '1'">
             <span><span>所有者</span></span>
             <div class="typeCss">
-              <div class="cName" :class="groupA == '4' ? 'isCType' : ''" @click="groupA = '4';search();">
+              <div class="cName" :class="groupA == '4' ? 'isCType' : ''" @click="groupA = '4'; search();">
                 全部
               </div>
-              <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2';search();">
+              <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
                 我的课程
               </div>
-              <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3';search();">
+              <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
                 协同课程
               </div>
-              <div class="cName" :class="groupA == '1' ? 'isCType' : ''" @click="groupA = '1';search();">
+              <div class="cName" :class="groupA == '1' ? 'isCType' : ''" @click="groupA = '1'; search();">
                 他人课程
               </div>
             </div>
@@ -115,13 +116,13 @@
           <div class="all_choose" v-else>
             <span><span>所有者</span></span>
             <div class="typeCss">
-              <div class="cName" :class="groupA == '0' ? 'isCType' : ''" @click="groupA = '0';search();">
+              <div class="cName" :class="groupA == '0' ? 'isCType' : ''" @click="groupA = '0'; search();">
                 全部
               </div>
-              <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2';search();">
+              <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
                 我的课程
               </div>
-              <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3';search();">
+              <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
                 协同课程
               </div>
             </div>
@@ -179,10 +180,10 @@
             <div class="xtCourse" v-else>协同课程</div>
             <div class="tup">
               <img :src="item.cover != null && item.cover != ''
-                  ? JSON.parse(item.cover).length > 0
-                    ? JSON.parse(item.cover)[0].url
-                    : mr
+                ? JSON.parse(item.cover).length > 0
+                  ? JSON.parse(item.cover)[0].url
                   : mr
+                : mr
                 " alt />
             </div>
             <!-- <div class="bottom_box">
@@ -215,22 +216,22 @@
               <div @click="get(item)">预览</div>
               <!-- <div @click="jump(item.courseId)" v-else>评课</div> -->
               <div v-if="((item.userid == userid) ||
-                  (item.course_teacher &&
-                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                (item.course_teacher &&
+                  item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
                 item.state == 1
                 " @click="goToCourse(item.courseId)">
                 修改
               </div>
               <div v-if="((item.userid == userid) ||
-                  (item.course_teacher &&
-                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                (item.course_teacher &&
+                  item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
                 item.state == 2
                 " @click="goToCourse2(item.courseId)">
                 修改
               </div>
               <div v-if="((item.userid == userid) ||
-                  (item.course_teacher &&
-                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                (item.course_teacher &&
+                  item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
                 item.state == 3
                 " @click="goToCourse3(item.courseId)">
                 修改
@@ -296,10 +297,10 @@
         <div class="out_box" v-for="(item, index) in courseTeam" :key="index" style="margin-left: 15px">
           <div class="tup">
             <img :src="item.cover != null && item.cover != ''
-                ? JSON.parse(item.cover).length > 0
-                  ? JSON.parse(item.cover)[0].url
-                  : mr
+              ? JSON.parse(item.cover).length > 0
+                ? JSON.parse(item.cover)[0].url
                 : mr
+              : mr
               " alt />
           </div>
           <div class="bottom_box">
@@ -389,7 +390,7 @@ export default {
       typed: "",
       pTypeCheck: [],
       pTypeCheckName: [],
-      btnDisplay:false
+      btnDisplay: false
     };
   },
   methods: {
@@ -484,6 +485,19 @@ export default {
       }
       // this.$router.push(path);
     },
+    reset() {
+      this.typeE = []
+      this.typea = ''
+      this.typeb = ''
+      this.typed = ''
+      this.courseName = ''
+      if (this.role == "1") {
+        this.groupA = "4";
+      } else {
+        this.groupA = "0";
+      }
+      this.getCourse();
+    },
     goToCourse2(courseId) {
       if (courseId) {
         this.$router.push(
@@ -1146,10 +1160,12 @@ export default {
   .out_box {
     width: calc(100% / 4 - (15px * 3) / 4) !important;
   }
-  .out_box:nth-child(5n){
+
+  .out_box:nth-child(5n) {
     margin-right: 15px !important;
   }
-  .out_box:nth-child(4n){
+
+  .out_box:nth-child(4n) {
     margin-right: 0 !important;
   }
 }
@@ -1158,13 +1174,16 @@ export default {
   .out_box {
     width: calc(100% / 3 - (15px * 2) / 3) !important;
   }
-  .out_box:nth-child(5n){
+
+  .out_box:nth-child(5n) {
     margin-right: 15px !important;
   }
-  .out_box:nth-child(4n){
+
+  .out_box:nth-child(4n) {
     margin-right: 15px !important;
   }
-  .out_box:nth-child(3n){
+
+  .out_box:nth-child(3n) {
     margin-right: 0 !important;
   }
 }
@@ -1420,7 +1439,7 @@ export default {
   border: 1px solid #3681FC;
 }
 
-.out_box:nth-child(5n){
+.out_box:nth-child(5n) {
   margin-right: 0;
 }
 
@@ -1445,7 +1464,7 @@ export default {
   justify-content: space-between;
 }
 
-.bottom_box>div:nth-child(1) >span:nth-child(1){
+.bottom_box>div:nth-child(1)>span:nth-child(1) {
   max-width: 100%;
   overflow: hidden;
   text-overflow: ellipsis;
@@ -1453,10 +1472,10 @@ export default {
   font-weight: bold;
 }
 
-.bottom_box>div:nth-child(1) >span:nth-child(2){
-  min-width:fit-content;
-  font-size:14px;
-  color:#8c8c8c;
+.bottom_box>div:nth-child(1)>span:nth-child(2) {
+  min-width: fit-content;
+  font-size: 14px;
+  color: #8c8c8c;
 }
 
 .tup {
@@ -1746,9 +1765,11 @@ export default {
   color: #205cc6;
   /* font-size: 20px; */
 }
-.reTop .reTopCh{
+
+.reTop .reTopCh {
   display: flex;
 }
+
 .reTop .searchI {
   display: flex;
   flex-direction: row;
@@ -1809,17 +1830,20 @@ export default {
   margin: 2px 0;
   width: 100%;
 }
-.all_choose>span{
+
+.all_choose>span {
   display: flex;
   margin-right: 5px;
 }
+
 .all_choose>span>span {
   min-width: 65px;
   max-width: 65px;
   display: block;
   text-align-last: justify;
 }
-.all_choose>span::after{
+
+.all_choose>span::after {
   content: ':';
 }
 
@@ -1881,7 +1905,7 @@ export default {
   box-shadow: none !important;
 }
 
-.buttonBox{
+.buttonBox {
   position: absolute;
   bottom: -0;
   transform: translateY(100%);
@@ -1891,7 +1915,7 @@ export default {
   width: 100%;
 }
 
-.buttonBox > div{
+.buttonBox>div {
   height: 40px;
   line-height: 40px;
   width: 100%;
@@ -1900,11 +1924,10 @@ export default {
   box-sizing: border-box;
 }
 
-.buttonBox > div + div{
+.buttonBox>div+div {
   border-top: 1px solid #e0e0e0;
 }
 
-.buttonBox > div:hover{
+.buttonBox>div:hover {
   background: #f6f8ff;
-}
-</style>
+}</style>

+ 6 - 1
src/components/pages/dataBoard/course/chartList/cateRank.vue

@@ -4,8 +4,9 @@
       <el-table
         :data="tableData"
         style="width: 100%"
-        :header-cell-style="{ background: '#E0EAFB' }"
+        :header-cell-style="{ background: '#E0EAFB', color: '#000' }"
         :row-class-name="tableRowClassName"
+        class="tableClass"
       >
         <el-table-column prop="rank" label="排行" min-width="50" align="center">
           <template slot-scope="scope">{{ scope.$index + 1 }}</template>
@@ -101,4 +102,8 @@ export default {
   width: 95%;
   background: #fff;
 }
+
+.tableClass >>> td, .tableClass >>> th{
+  padding: 5px 0;
+}
 </style>

+ 3 - 3
src/components/pages/dataBoard/course/chartList/courseAna.vue

@@ -26,8 +26,8 @@ export default {
         series: [
           {
             type: "pie",
-            radius: ["35%", "70%"],
-            avoidLabelOverlap: false,
+            radius: '50%',
+            avoidLabelOverlap: true,
             emphasis: {
               label: {
                 show: true,
@@ -60,7 +60,7 @@ export default {
           //劳动课程
           this.$el.querySelector("#charts_canvas")
         );
-        this.option.series[0].data = this.ooption.data;
+        this.option.series[0].data = this.ooption.data.filter(item => item.value !== 0);
         chartObj.off('click')
         let _this = this
         chartObj.on('click', function (param) {

+ 9 - 1
src/components/pages/dataBoard/course/chartList/teaFre.vue

@@ -25,6 +25,13 @@ export default {
         course: [],
       },
       option: {
+        title: {
+          text: '授课频次',
+          textStyle: {
+            fontSize: 12,
+          },
+          padding: [10, 0, 0, 10]
+        },
         tooltip: {
           trigger: "axis",
         },
@@ -38,7 +45,7 @@ export default {
           type: "value",
         },
         grid: {
-          top: "5%",
+          top: "15%",
           left: "5%",
           right: "5%",
           bottom: "5%",
@@ -54,6 +61,7 @@ export default {
               width: 3, // 设置线宽度
               color: "#0E65F7", // 设置线颜色
             },
+            areaStyle: {}
           },
         ],
       },

+ 17 - 6
src/components/pages/dataBoard/course/chartList/workTime.vue

@@ -1,11 +1,7 @@
 <template>
   <div class="data_body">
     <div style="width: 100%; height: 100%">
-      <div
-        id="charts_canvas"
-        class="echart"
-        style="width: 100%; height: 100%"
-      ></div>
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
     </div>
   </div>
 </template>
@@ -25,6 +21,13 @@ export default {
         type: [],
       },
       option: {
+        title: {
+          text: '授课时长',
+          textStyle: {
+            fontSize: 12,
+          },
+          padding: [10, 0, 0, 10]
+        },
         tooltip: {
           trigger: "axis",
           axisPointer: {
@@ -32,7 +35,7 @@ export default {
           },
         },
         grid: {
-          top: "5%",
+          top: "10%",
           left: "5%",
           right: "5%",
           bottom: "5%",
@@ -49,9 +52,17 @@ export default {
         },
         series: [
           {
+            name: "授课时长(时)",
             type: "bar",
             // data: [60, 110, 25, 130, 65, 80],
             data: [],
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return "#106bff";
+                },
+              },
+            },
           },
         ],
       },

+ 50 - 21
src/components/pages/dataBoard/course/index.vue

@@ -45,7 +45,7 @@
             <div class="teafre">
               <div class="teaMiddle cNum">
                 <div>课程总数</div>
-                <div>{{ cCount }}</div>
+                <div>{{ typeCourseCount }}</div>
               </div>
               <div class="teaMiddle tNum">
                 <div>类别总数</div>
@@ -53,7 +53,7 @@
               </div>
               <div class="teaMiddle tSum">
                 <div>类别平均</div>
-                <div>{{ (cCount / typeCount).toFixed(0) }}</div>
+                <div>{{ (typeCourseCount / typeCount).toFixed(0) }}</div>
               </div>
             </div>
             <CateRank
@@ -62,7 +62,7 @@
                 margin-top: 10px;
                 overflow: auto;
               "
-              :courseNumberArray="courseNumberArray"
+              :courseNumberArray="courseNumberArray2"
             ></CateRank>
           </div>
           <div class="halfBox middleBox" style="align-items: flex-start">
@@ -84,7 +84,7 @@
       </div>
     </div>
     <div class="right">
-      <div class="top">
+      <div class="top" style="border-radius: 5px">
         <div class="titleBox">
           <div class="title">课程分析</div>
           <el-select v-model="cType" @change="typeChange" class="selectBox">
@@ -173,7 +173,9 @@ export default {
       subjectList: [],
       themeList: [],
       typeCount: 0,
+      typeCourseCount: 0,
       courseNumberArray: [],
+      courseNumberArray2: [],
       gradeArray: [],
       subjectArray: [],
       themeArray: [],
@@ -185,63 +187,78 @@ export default {
     this.getData();
   },
   methods: {
-    openCourse(cid){
+    openCourse(cid) {
       window.parent.postMessage({ cid: cid, screenType: "3" }, "*");
     },
-    openCourse2(index){
+    openCourse2(index) {
       console.log(index);
       // console.log(this.courseNumberArray);
-      let id = this.courseNumberArray[index].typeid
-      let typea = ""
-      let typeb = ""
-      let typed = ""
+      let id = this.courseNumberArray[index].typeid;
+      let typea = "";
+      let typeb = "";
+      let typed = "";
       // console.log(this.gradeArray);
       // console.log(this.subjectArray);
       // console.log(this.themeArray);
-      let key = 0
+      let key = 0;
       for (key in this.gradeArray) {
         if (this.gradeArray.hasOwnProperty.call(this.gradeArray, key)) {
           const element = this.gradeArray[key];
-          if(element.typeid == id){
-            typea = id
+          if (element.typeid == id) {
+            typea = id;
           }
         }
       }
       for (key in this.subjectArray) {
         if (this.subjectArray.hasOwnProperty.call(this.subjectArray, key)) {
           const element = this.subjectArray[key];
-          if(element.typeid == id){
-            typed = id
+          if (element.typeid == id) {
+            typed = id;
           }
         }
       }
       for (key in this.themeArray) {
         if (this.themeArray.hasOwnProperty.call(this.themeArray, key)) {
           const element = this.themeArray[key];
-          if(element.typeid == id){
-            typeb = id
+          if (element.typeid == id) {
+            typeb = id;
           }
         }
       }
       window.parent.postMessage(
-        { 
+        {
           tools: "openCourse",
           typea: typea || "",
           typeb: typeb || "",
           typed: typed || "",
-        }, 
+        },
         "*"
       );
     },
+    typeCourseCountCalu() {
+      this.courseNumberArray2 = this.allArray;
+      this.typeCount = this.courseNumberArray2.length;
+      let course = [];
+      for (var i = 0; i < this.courseNumberArray2.length; i++) {
+        let _array = this.courseNumberArray2[i].array;
+        for (var j = 0; j < _array.length; j++) {
+          console.log(_array[j]);
+          if (course.indexOf(_array[j]) == -1) {
+            course.push(_array[j]);
+          }
+        }
+      }
+      this.typeCourseCount = course.length;
+    },
     typeChange() {
       if (this.cType === "") {
         this.courseNumberArray = this.allArray;
       } else if (this.cType === "grade") {
         this.courseNumberArray = this.gradeArray;
       } else if (this.cType === "theme") {
-        this.courseNumberArray = this.subjectArray;
-      } else if (this.cType === "subject") {
         this.courseNumberArray = this.themeArray;
+      } else if (this.cType === "subject") {
+        this.courseNumberArray = this.subjectArray;
       }
       this.$forceUpdate();
     },
@@ -377,6 +394,11 @@ export default {
               }
             }
           }
+          for(var i = 0;i<toolAllArray.length;i++){
+            if(toolAllArray[i].value == 0){
+              toolAllArray.splice(i,1)
+            }
+          }
           this.toolList = toolAllArray;
           var courseJson = Object.values(
             tList.reduce(function (acc, obj) {
@@ -448,10 +470,12 @@ export default {
               name: _grade[i].name,
               typeid: _grade[i].id,
               course: 0,
+              array: [],
             });
             for (var z = 0; z < _course.length; z++) {
               if (_course[z].typeid == _grade[i].id) {
                 _gradeArray[i].course++;
+                _gradeArray[i].array.push(_course[z].courseid);
               }
             }
           }
@@ -461,10 +485,12 @@ export default {
               name: _subject[i].name,
               typeid: _subject[i].id,
               course: 0,
+              array: [],
             });
             for (var z = 0; z < _course.length; z++) {
               if (_course[z].typeid == _subject[i].id) {
                 _subjectArray[i].course++;
+                _subjectArray[i].array.push(_course[z].courseid);
               }
             }
           }
@@ -474,10 +500,12 @@ export default {
               name: themeList[i].name,
               typeid: themeList[i].id,
               course: 0,
+              array: [],
             });
             for (var z = 0; z < _course.length; z++) {
               if (_course[z].typeid == themeList[i].id) {
                 _themeArray[i].course++;
+                _themeArray[i].array.push(_course[z].courseid);
               }
             }
           }
@@ -485,6 +513,7 @@ export default {
           this.subjectArray = _subjectArray;
           this.themeArray = _themeArray;
           this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray];
+          this.typeCourseCountCalu();
           this.typeChange();
           var wList = [];
           for (var i = 0; i < _workCourse.length; i++) {

+ 6 - 2
src/components/pages/dataBoard/school/cateRank/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="data_body">
     <div style="width: 100%; height: 100%">
-      <el-table :data="tableData" style="width: 100%" :header-cell-style="{ background: '#E0EAFB' }"
-        :row-class-name="tableRowClassName">
+      <el-table :data="tableData" style="width: 100%" :header-cell-style="{ background: '#E0EAFB',color: '#000' }"
+        :row-class-name="tableRowClassName" class="tableClass">
         <el-table-column label="排行" min-width="50" align="center">
           <template slot-scope="scope">{{ scope.$index + 1 }}</template>
         </el-table-column>
@@ -88,4 +88,8 @@ export default {
   width: 95%;
   background: #fff;
 }
+
+.tableClass >>> td, .tableClass >>> th{
+  padding: 5px 0;
+}
 </style>

+ 25 - 7
src/components/pages/dataBoard/school/courseInfo/index.vue

@@ -20,22 +20,40 @@ export default {
                 data: [],
             },
             option: {
+                title: {
+                    text: '课程数量',
+                    textStyle:{
+                        fontSize: 12,
+                    },
+                    padding: [5, 0, 0, 10]
+                },
                 tooltip: {
                     trigger: 'item'
                 },
                 series: [
                     {
+                        avoidLabelOverlap: true,  //是否启用防止标签重叠策略
+                        labelLine: { // 设置指示线的长度
+                            length: 8,
+                            length2: 5
+                        },
+                        label: {
+                            fontSize: 12,
+                            position:'outer',
+                            // alignTo:'labelLine'
+                        },
+                        labelLayout: {
+                            hideOverlap: false
+                        },
                         type: 'pie',
                         radius: ['35%', '70%'],
-                        avoidLabelOverlap: false,
                         emphasis: {
                             label: {
                                 show: true,
-                                fontSize: 16,
+                                fontSize: 13,
                                 fontWeight: 'bold'
                             }
                         },
-
                         data: [
                             // { value: 1048, name: '一年级' },
                             // { value: 735, name: '二年级' },
@@ -61,10 +79,10 @@ export default {
                     //劳动课程
                     this.$el.querySelector("#charts_canvas")
                 );
-                this.option.series[0].data = this.ooption.data;
+                this.option.series[0].data = this.ooption.data.filter(item => item.value !== 0);
                 chartObj.off('click')
                 let _this = this
-                chartObj.on('click', function (param) {  
+                chartObj.on('click', function (param) {
                     //param参数包含的内容有: 
                     //param.name:X轴的值 
                     //param.data:Y轴的值 
@@ -75,7 +93,7 @@ export default {
                     //param.dataIndex:数值序列(X轴上当前点是第几个点)
                     //alert(param.seriesName);  //legend的名称
                     console.log(param);  //X轴的值
-                    _this.$emit('openCourse',param.dataIndex)
+                    _this.$emit('openCourse', param.dataIndex)
                 });
                 // 初始化雷达图
                 this.chartObj = chartObj;
@@ -87,7 +105,7 @@ export default {
                 data: [],
             }
             for (var i = 0; i < array.length; i++) {
-                this.ooption.data.push({ value: array[i].course, name: array[i].name})
+                this.ooption.data.push({ value: array[i].course, name: array[i].name })
             }
             if (!this.chartObj) {
                 this.setChart(this.ooption);

+ 28 - 9
src/components/pages/dataBoard/school/index.vue

@@ -172,7 +172,7 @@
             <div class="info_box">
               <div class="info3 blueBG">
                 <span>课程总数</span>
-                <span>{{ courseCount }}</span>
+                <span>{{ typeCourseCount }}</span>
               </div>
               <div class="info3 greenBG">
                 <span>类别总数</span>
@@ -180,7 +180,7 @@
               </div>
               <div class="info3 blueBG">
                 <span>类别平均</span>
-                <span>{{ (courseCount / typeCount).toFixed(0) }}</span>
+                <span>{{ (typeCourseCount / typeCount).toFixed(0) }}</span>
               </div>
             </div>
             <div class="course_box_p">
@@ -251,6 +251,7 @@ export default {
       allArray: [],
       courseNumberArray: [],
       typeCount: 0,
+      typeCourseCount: 0,
       lightJson: {
         users: 0,
         teachers: 0,
@@ -516,11 +517,13 @@ export default {
             _gradeArray.push({
               name: _grade[i].name,
               typeid: _grade[i].id,
-              course: 0
+              course: 0,
+              array:[]
             })
             for (var z = 0; z < _course.length; z++) {
               if (_course[z].typeid == _grade[i].id) {
                 _gradeArray[i].course++
+                _gradeArray[i].array.push(_course[z].courseid)
               }
             }
           }
@@ -529,11 +532,13 @@ export default {
             _subjectArray.push({
               name: _subject[i].name,
               typeid: _subject[i].id,
-              course: 0
+              course: 0,
+              array: []
             })
             for (var z = 0; z < _course.length; z++) {
               if (_course[z].typeid == _subject[i].id) {
                 _subjectArray[i].course++
+                _subjectArray[i].array.push(_course[z].courseid)
               }
             }
           }
@@ -543,11 +548,13 @@ export default {
             _themeArray.push({
               name: _theme[i].name,
               typeid: _theme[i].id,
-              course: 0
+              course: 0,
+              array: []
             })
             for (var z = 0; z < _course.length; z++) {
               if (_course[z].typeid == _theme[i].id) {
                 _themeArray[i].course++
+                _themeArray[i].array.push(_course[z].courseid)
               }
             }
           }
@@ -668,17 +675,29 @@ export default {
       } else if (this.cType === 'grade') {
         this.courseNumberArray = this.gradeArray
       } else if (this.cType === 'theme') {
-        this.courseNumberArray = this.subjectArray
-      } else if (this.cType === 'subject') {
         this.courseNumberArray = this.themeArray
+      } else if (this.cType === 'subject') {
+        this.courseNumberArray = this.subjectArray
       }
+      let course = []
+      for(var i = 0;i<this.courseNumberArray.length;i++){
+        let _array = this.courseNumberArray[i].array
+        for(var j = 0; j <_array.length;j++){
+          console.log(_array[j]);
+          if(course.indexOf(_array[j]) == -1){
+            course.push(_array[j])
+          }
+        }
+      }
+      this.typeCount = this.courseNumberArray.length
+      this.typeCourseCount = course.length
       this.$forceUpdate();
     },
     typeChange2(){
 
     },
     format(percentage) {
-      return percentage;
+      return percentage + '%';
     },
   },
 };
@@ -862,7 +881,7 @@ export default {
 .course_box {
   display: flex;
   height: 50%;
-  width: 90%;
+  width: 95%;
   margin: 0 auto;
 }
 

+ 17 - 1
src/components/pages/dataBoard/school/loginCount/index.vue

@@ -23,6 +23,13 @@ export default {
                 student: [],
             },
             option: {
+                title: {
+                    text: '登录频次',
+                    textStyle:{
+                        fontSize: 12,
+                    },
+                    padding: [0, 0, 0, 10]
+                },
                 tooltip: {
                     trigger: 'axis'
                 },
@@ -51,11 +58,20 @@ export default {
                         name: '老师',
                         type: 'line',
                         // data: [120, 50, 101, 130, 110, 120]
-                        data: []
+                        areaStyle: {},
+                        data: [],
+                        itemStyle: {
+                            normal: {
+                                color: function (params) {
+                                    return "#106bff";
+                                    },
+                                }, 
+                        },
                     },
                     {
                         name: '学生',
                         type: 'line',
+                        areaStyle: {},
                         // data: [220, 182, 191, 234, 290, 330]
                         data: []
                     },

+ 8 - 1
src/components/pages/dataBoard/school/loginTime/index.vue

@@ -21,6 +21,13 @@ export default {
                 sdata: [],
             },
             option: {
+                title: {
+                    text: '在线时长',
+                    textStyle:{
+                        fontSize: 12,
+                    },
+                    padding: [10, 0, 0, 10]
+                },
                 tooltip: {
                     position: 'top'
                 },
@@ -50,7 +57,7 @@ export default {
                     ],
                     splitArea: {
                         show: true
-                    }
+                    },
                 },
                 visualMap: {
                     min: 0,

+ 18 - 5
src/components/pages/dataBoard/school/studentInfo/index.vue

@@ -3,7 +3,8 @@
         <div style="width: 100%; height: 100%" v-if="this.ooption.xdata.length">
             <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
         </div>
-        <div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;" v-show="!this.ooption.xdata.length">暂无数据</div>
+        <div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;"
+            v-show="!this.ooption.xdata.length">暂无数据</div>
     </div>
 </template>
   
@@ -29,6 +30,9 @@ export default {
             option: {
                 tooltip: {},
                 radar: {
+                    axisName: {
+                        color: "#000"
+                    },
                     // shape: 'circle',
                     indicator: [
                         // { name: '目标一', max: 5 },
@@ -40,11 +44,20 @@ export default {
                 },
                 series: [
                     {
-                        areaStyle: {},
                         name: '学生综合评价',
                         type: 'radar',
                         data: [
                             {
+                                areaStyle: {
+                                    opacity: 0.2,
+                                    color: '#0061FF'
+                                },
+                                itemStyle: {
+                                    color: '#0061FF',
+                                    lineStyle: {
+                                    color: '#0061FF'
+                                    }
+                                },
                                 // 5, 4, 3, 5, 5, 2
                                 value: [],
                                 name: ''
@@ -79,8 +92,8 @@ export default {
                 xdata: [],
                 sdata: [],
             }
-            for(var i = 0;i<array.length;i++){
-                if(array[i].evid == this.eva){
+            for (var i = 0; i < array.length; i++) {
+                if (array[i].evid == this.eva) {
                     this.ooption.xdata = array[i].indicator
                     this.ooption.sdata = array[i].value
                     break;
@@ -88,7 +101,7 @@ export default {
             }
             setTimeout(() => {
                 // if (!this.chartObj) {
-                    this.setChart(this.ooption);
+                this.setChart(this.ooption);
                 // } else {
                 //     this.option.radar.indicator = this.ooption.xdata;
                 //     this.option.series[0].data[0].value = this.ooption.sdata;

+ 91 - 12
src/components/pages/dataBoard/student/index.vue

@@ -57,7 +57,7 @@
               <span>{{scoreJun}}</span>
             </div>
           </div>
-          <studentInfo style="height: calc(100% - 70px)"></studentInfo>
+          <studentInfo style="height: calc(100% - 70px)" :EscoreArray2="EscoreArray2" @openDataClass="openDataClass"></studentInfo>
         </div>
       </div>
       <div class="bottom">
@@ -72,7 +72,7 @@
                 <el-progress
                   :width="90"
                   type="circle"
-                  :percentage="36"
+                  :percentage="lightJson.course ? ((lightJson.course / count) * 100).toFixed(0) : 0"
                   :stroke-width="15"
                   :format="format"
                   color="#106BFF"
@@ -85,7 +85,7 @@
                 <el-progress
                   :width="90"
                   type="circle"
-                  :percentage="76"
+                  :percentage="lightJson.scourse ? ((lightJson.scourse / count) * 100).toFixed(0) : 0"
                   :stroke-width="15"
                   :format="format"
                   color="#106BFF"
@@ -98,7 +98,7 @@
                 <el-progress
                   :width="90"
                   type="circle"
-                  :percentage="76"
+                  :percentage="lightJson.tools ? ((lightJson.tools / count) * 100).toFixed(0) : 0"
                   :stroke-width="15"
                   :format="format"
                   color="#106BFF"
@@ -111,7 +111,7 @@
                 <el-progress
                   :width="90"
                   type="circle"
-                  :percentage="76"
+                  :percentage="lightJson.xcourse ? ((lightJson.xcourse / count) * 100).toFixed(0) : 0"
                   :stroke-width="15"
                   :format="format"
                   color="#106BFF"
@@ -124,7 +124,7 @@
                 <el-progress
                   :width="90"
                   type="circle"
-                  :percentage="76"
+                  :percentage="lightJson.exchange ? ((lightJson.exchange / count) * 100).toFixed(0) : 0"
                   :stroke-width="15"
                   :format="format"
                   color="#106BFF"
@@ -139,7 +139,7 @@
       <div class="top">
         <div class="titleBox">
           <div class="title">学生综合评价</div>
-          <el-select v-model="eva" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 150px;">
+          <el-select v-model="eva" @focus="setMinWidth" class="selectBox" style="width: 150px;">
             <el-option v-for="item in evArray" :key="item.id" :label="item.title" :value="item.id" :style="{'width': minWidth + 2 + 'px'}"></el-option>
           </el-select>
         </div>
@@ -162,7 +162,7 @@
               <span>{{ (loginTime / count).toFixed(0) }}小时</span>
             </div>
           </div>
-          <loginTime style="height: calc(100% - 70px)"></loginTime>
+          <loginTime style="height: calc(100% - 70px)" :EloginTimeArray="EloginTimeArray"></loginTime>
         </div>
       </div>
     </div>
@@ -205,13 +205,33 @@ export default {
       eva:'',
       evCourseArray:[],
       minWidth:0,
-      courseClass:[]
+      courseClass:[],
+      lightJson: {
+        course:0,
+        scourse:0,
+        tools:0,
+        xcourse:0,
+        exchange:0,
+      },
+      EloginTimeArray:[],
+      EscoreArray2:[],
     };
   },
   mounted() {
     this.getData();
   },
   methods: {
+    openDataClass(classIndex){
+      console.log(classIndex);
+      console.log(this.EscoreArray2[classIndex]);
+      window.parent.postMessage(
+        { 
+          tools: "openDataClass",
+          classid: this.EscoreArray2[classIndex].id,
+        }, 
+        "*"
+      );
+    },
     setMinWidth (val) {
       this.minWidth = val.srcElement.clientWidth
     },
@@ -367,6 +387,65 @@ export default {
             }
           }
           this.courseClass = _courseClass
+
+          let _lcourse = res.data[10][0].num //参与课程数量
+          let _lscourse = res.data[11][0].num //参与项目
+          let _ltools = res.data[12][0].num //使用工具
+          let _lxcourse = res.data[13][0].num //协同合作
+          let _lexchange = res.data[14][0].num //互动交流
+
+          this.lightJson = {
+            course:_lcourse,
+            scourse:_lscourse,
+            tools:_ltools,
+            xcourse:_lxcourse,
+            exchange:_lexchange,
+          }
+
+          let _loginTimeArray = res.data[15] //在线时间
+          let _scoreArray2 = res.data[16] //得分
+
+
+          let _EloginTimeArray = []
+          for (let i = 0; i < _classList.length; i++) {
+            _EloginTimeArray.push({
+              id:_classList[i].id,
+              name:_classList[i].name,
+              loginTime:0
+            })
+            for (let j = 0; j < _loginTimeArray.length; j++) {
+              const _user = _loginTimeArray[j];
+              if(_user.classid.indexOf(_classList[i].id) != -1){
+                _EloginTimeArray[i].loginTime += _user.time
+              }
+            }
+            _EloginTimeArray[i].loginTime = (_EloginTimeArray[i].loginTime / 60).toFixed(2) //换算成小时
+          }
+          this.EloginTimeArray = _EloginTimeArray
+          let _EscoreArray2 = []
+          for (let i = 0; i < _classList.length; i++) {
+            _EscoreArray2.push({
+              id:_classList[i].id,
+              name:_classList[i].name,
+              max:0,
+              min:0,
+              score:[]
+            })
+            for (let j = 0; j < _scoreArray2.length; j++) {
+              const _user = _scoreArray2[j];
+              if(_user.classid.indexOf(_classList[i].id) != -1){
+                _EscoreArray2[i].score.push(_user.score)
+              }
+            }
+            if(_EscoreArray2[i].score.length){
+              _EscoreArray2[i].score = _EscoreArray2[i].score.sort((i, j) => {
+                return i-j; 
+              })
+              _EscoreArray2[i].max = _EscoreArray2[i].score[_EscoreArray2[i].score.length-1]
+              _EscoreArray2[i].min = _EscoreArray2[i].score[0]
+            }
+          }
+          this.EscoreArray2 = _EscoreArray2
         })
         .catch((err) => {
           this.isLoading = false;
@@ -374,7 +453,7 @@ export default {
         });
     },
     format(percentage) {
-      return percentage;
+      return percentage + '%';
     },
   },
 };
@@ -419,7 +498,7 @@ export default {
 
 .center > .top {
   width: 100%;
-  height: calc(100% / 5 * 3 - 10px);
+  height: calc(100% / 6 * 4 - 10px);
   background: #fff;
   border-radius: 5px;
   margin: 0 0 20px 0;
@@ -427,7 +506,7 @@ export default {
 
 .center > .bottom {
   width: 100%;
-  height: calc(100% / 5 * 2 - 10px);
+  height: calc(100% / 6 * 2 - 10px);
   background: #fff;
   border-radius: 5px;
 }

+ 9 - 1
src/components/pages/dataBoard/student/loginCount/index.vue

@@ -21,11 +21,18 @@ export default {
                 student: [],
             },
             option: {
+                title: {
+                    text: '登录频次',
+                    textStyle:{
+                        fontSize: 12,
+                    },
+                    padding: [0, 0, 0, 10]
+                },
                 tooltip: {
                     trigger: 'axis'
                 },
                 grid: {
-                    top:'5%',
+                    top:'15%',
                     left: '5%',
                     right: '5%',
                     bottom: '5%',
@@ -44,6 +51,7 @@ export default {
                     {
                         name: '学生',
                         type: 'line',
+                        areaStyle:{},
                         // data: [220, 182, 191, 234, 290, 330]
                         data: []
                     },

+ 75 - 11
src/components/pages/dataBoard/student/loginTime/index.vue

@@ -8,19 +8,47 @@
   
 <script>
 export default {
+    props: {
+        EloginTimeArray: {
+            type: Array,
+        },
+    },
     data() {
         return {
             chartObj: null,
             ooption: {
                 xdata: [],
-                sdata: [],
+                data: [],
             },
             option: {
-                tooltip: {},
+                title: {
+                    text: '在线时长',
+                    textStyle: {
+                        fontSize: 12,
+                    },
+                    padding: [5, 0, 0, 10]
+                },
+                tooltip: {
+                    trigger: "axis",
+                    axisPointer: {
+                        type: "shadow",
+                    },
+                },
+                dataZoom: [
+                    {
+                        // start: 50,
+                        type: 'inside',
+                        yAxisIndex: 0
+                    },
+                    {
+                        type: 'slider',
+                        yAxisIndex: 0
+                    }
+                ],
                 grid: {
-                    top: '5%',
+                    top: '10%',
                     left: '5%',
-                    right: '5%',
+                    right: '10%',
                     bottom: '5%',
                     containLabel: true
                 },
@@ -28,14 +56,25 @@ export default {
                     type: 'value',
                     boundaryGap: [0, 0.01]
                 },
+
                 yAxis: {
                     type: 'category',
-                    data: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
+                    // data: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
+                    data: []
                 },
                 series: [
                     {
+                        name: "在线时长(时)",
                         type: 'bar',
-                        data: [180, 50, 70, 90, 100, 130]
+                        // data: [180, 50, 70, 90, 100, 130],
+                        data: [],
+                        itemStyle: {
+                            normal: {
+                                color: function (params) {
+                                    return "#106bff";
+                                },
+                            },
+                        },
                     }
                 ]
             },
@@ -53,20 +92,45 @@ export default {
                     //劳动课程
                     this.$el.querySelector("#charts_canvas")
                 );
-                //   this.option.xAxis.data = option.xdata;
-                //   this.option.series[0].data = data;
+                this.option.yAxis.data = option.xdata;
+                this.option.series[0].data = option.data;
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
             });
         },
+        setArray(Array) {
+            this.ooption = {
+                xdata: [],
+                data: [],
+            }
+            let _array = Array
+            for (var i = 0; i < _array.length; i++) {
+                this.ooption.xdata.push(_array[i].name)
+                this.ooption.data.push(_array[i].loginTime)
+            }
+
+            if (!this.chartObj) {
+                this.setChart(this.ooption);
+            } else {
+                this.option.yAxis.data = this.ooption.xdata;
+                this.option.series[0].data = this.ooption.data;
+                this.chartObj.setOption(this.option);
+            }
+        }
     },
     watch: {
-
+        EloginTimeArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(newValue)
+                this.$forceUpdate();
+            },
+        },
     },
     mounted() {
-
-        this.setChart(this.ooption);
+        this.setArray(this.EloginTimeArray)
         var _this = this;
         window.addEventListener("resize", () => {
             if (_this.chartObj) {

+ 6 - 1
src/components/pages/dataBoard/student/stuAct/index.vue

@@ -4,8 +4,9 @@
       <el-table
         :data="tableData"
         style="width: 100%;"
-        :header-cell-style="{ background: '#E0EAFB' }"
+        :header-cell-style="{ background: '#E0EAFB', color:'#000' }"
         :row-class-name="tableRowClassName"
+        class="tableClass"
       >
       <el-table-column label="排行" min-width="50" align="center">
           <template slot-scope="scope">{{ scope.$index + 1 }}</template>
@@ -100,4 +101,8 @@ export default {
   background: #fff;
   overflow: auto;
 }
+
+.tableClass >>> td, .tableClass >>> th{
+  padding: 5px 0;
+}
 </style>

+ 64 - 18
src/components/pages/dataBoard/student/studentInfo/index.vue

@@ -8,6 +8,11 @@
   
 <script>
 export default {
+    props: {
+        EscoreArray2: {
+            type: Array,
+        },
+    },
     data() {
         return {
             chartObj: null,
@@ -17,36 +22,46 @@ export default {
             },
             option: {
                 xAxis: {
-                    data: ['一年级一班', '一年级二班', '一年级三班', '一年级四班', '一年级五班', '一年级六班', '一年级七班']
+                    // data: ['一年级一班', '一年级二班', '一年级三班', '一年级四班', '一年级五班', '一年级六班', '一年级七班']
+                    data: []
                 },
                 tooltip: {
                     formatter: function (params, ticket, callback) {
-                        return `最高分:${params.value[2]}</br>最低分:${params.value[1]}`;
+                        return `${params.marker + params.name}</br>最高分:${params.value[2]}</br>最低分:${params.value[1]}`;
                     }
                 },
+                dataZoom: [
+                    {
+                        // start: 50,
+                        type: 'inside',
+                    },
+                    {
+                        type: 'slider',
+                    }
+                ],
                 yAxis: {},
                 grid: {
-                    top:'5%',
+                    top: '5%',
                     left: '0%',
                     right: '0%',
-                    bottom: '5%',
+                    bottom: '13%',
                     containLabel: true
                 },
                 series: [
                     {
                         type: 'candlestick',
                         data: [
-                            [70, 80, 70, 80],
-                            [60, 90, 60, 90],
-                            [50, 80, 50, 80],
-                            [78, 88, 78, 88],
-                            [85, 98, 85, 98],
-                            [75, 95, 75, 95],
-                            [65, 100, 65, 100],
-                            [55, 99, 55, 99]
+                            // [70, 80, 70, 80],
+                            // [60, 90, 60, 90],
+                            // [50, 80, 50, 80],
+                            // [78, 88, 78, 88],
+                            // [85, 98, 85, 98],
+                            // [75, 95, 75, 95],
+                            // [65, 100, 65, 100],
+                            // [55, 99, 55, 99]
                         ],
                         itemStyle: {
-                            color: "#0DDE70",
+                            color: '#17C469',
                             borderColor: null
                         }
                     }
@@ -66,20 +81,51 @@ export default {
                     //劳动课程
                     this.$el.querySelector("#charts_canvas")
                 );
-                //   this.option.xAxis.data = option.xdata;
-                //   this.option.series[0].data = option.sdata;
+                this.option.xAxis.data = option.xdata;
+                this.option.series[0].data = option.sdata;
+                chartObj.off('click')
+                let _this = this
+                chartObj.on('click', function (param) {
+                    console.log(param);  //X轴的值
+                    _this.$emit('openDataClass', param.dataIndex)
+                });
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
             });
         },
+        setArray(Array) {
+            this.ooption = {
+                xdata: [],
+                sdata: [],
+            }
+            let _array = Array
+            for (var i = 0; i < _array.length; i++) {
+                this.ooption.xdata.push(_array[i].name)
+                this.ooption.sdata.push([_array[i].min, _array[i].max, _array[i].min, _array[i].max])
+            }
+
+            if (!this.chartObj) {
+                this.setChart(this.ooption);
+            } else {
+                this.option.xAxis.data = this.ooption.xdata;
+                this.option.series[0].data = this.ooption.sdata;
+                this.chartObj.setOption(this.option);
+            }
+        }
     },
     watch: {
-
+        EscoreArray2: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(newValue)
+                this.$forceUpdate();
+            },
+        },
     },
     mounted() {
-
-        this.setChart(this.ooption);
+        this.setArray(this.EscoreArray2)
         var _this = this;
         window.addEventListener("resize", () => {
             if (_this.chartObj) {

+ 13 - 1
src/components/pages/dataBoard/student/studentInfo2/index.vue

@@ -29,6 +29,9 @@ export default {
             option: {
                 tooltip: {},
                 radar: {
+                    axisName: {
+                        color: "#000"
+                    },
                     // shape: 'circle',
                     indicator: [
                         // { name: '目标一', max: 5 },
@@ -40,11 +43,20 @@ export default {
                 },
                 series: [
                     {
-                        areaStyle: {},
                         name: '学生综合评价',
                         type: 'radar',
                         data: [
                             {
+                                areaStyle: {
+                                    opacity: 0.2,
+                                    color: '#0061FF'
+                                },
+                                itemStyle: {
+                                    color: '#0061FF',
+                                    lineStyle: {
+                                    color: '#0061FF'
+                                    }
+                                },
                                 // 5, 4, 3, 5, 5, 2
                                 value: [],
                                 name: ''

+ 32 - 6
src/components/pages/dataBoard/teacher/chartList/funPlot.vue

@@ -12,6 +12,11 @@
 
 <script>
 export default {
+  props: {
+    pusaDep: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -51,10 +56,10 @@ export default {
               borderWidth: 1,
             },
             data: [
-              { value: 20, name: "登录" },
-              { value: 40, name: "创建" },
-              { value: 60, name: "授课" },
-              { value: 80, name: "评价" },
+              // { value: 20, name: "登录" },
+              // { value: 40, name: "创建" },
+              // { value: 60, name: "授课" },
+              // { value: 80, name: "评价" },
             ],
           },
         ],
@@ -62,7 +67,7 @@ export default {
     };
   },
   methods: {
-    setChart() {
+    setChart(array) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -73,13 +78,34 @@ export default {
           this.$el.querySelector("#charts_canvas")
         );
         // 初始化雷达图
+        this.option.series[0].data = array;
         this.chartObj = chartObj;
         this.chartObj.setOption(this.option);
       });
     },
+    setArray(array){
+        let _array = array;
+
+        if (!this.chartObj) {
+          this.setChart(_array);
+        } else {
+          this.option.series[0].data = _array;
+          this.chartObj.setOption(this.option);
+        }
+        this.$forceUpdate();
+    },
+  },
+  watch: {
+    pusaDep: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+      },
+    },
   },
   mounted() {
-    this.setChart(this.option);
+    this.setArray(this.pusaDep)
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

+ 52 - 13
src/components/pages/dataBoard/teacher/chartList/teaAct.vue

@@ -4,19 +4,23 @@
       <el-table
         :data="tableData"
         style="width: 100%; "
-        :header-cell-style="{ background: '#E0EAFB' }"
+        :header-cell-style="{ background: '#E0EAFB', color: '#000' }"
         :row-class-name="tableRowClassName"
+        class="tableClass"
       >
-        <el-table-column prop="rank" label="排行" min-width="50" align="center">
+        <el-table-column label="排行" min-width="50" align="center">
+          <template slot-scope="scope">{{ scope.$index + 1 }}</template>
         </el-table-column>
         <el-table-column
           prop="name"
-          label="类别名称"
+          label="课程名称"
           min-width="80"
           align="center"
         >
         </el-table-column>
-        <el-table-column prop="sum" label="授课次数" min-width="80" align="center">
+        <el-table-column prop="sum" label="作业数量" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="teacher" label="创建老师" min-width="80" align="center">
         </el-table-column>
       </el-table>
     </div>
@@ -25,21 +29,26 @@
 
 <script>
 export default {
+  props: {
+    cWorkSum: {
+      type: Array,
+    },
+  },
   data() {
     return {
       tableData: [
-        { rank: "1", name: "一年级", sum: "2356" },
-        { rank: "2", name: "二年级", sum: "2256" },
-        { rank: "3", name: "三年级", sum: "2156" },
-        { rank: "4", name: "四年级", sum: "1356" },
-        { rank: "5", name: "五年级", sum: "1256" },
-        { rank: "6", name: "六年级", sum: "1056" },
-        { rank: "7", name: "七年级", sum: "956" },
-        { rank: "8", name: "八年级", sum: "856" },
+        // { rank: "1", name: "一年级", sum: "2356" },
+        // { rank: "2", name: "二年级", sum: "2256" },
+        // { rank: "3", name: "三年级", sum: "2156" },
+        // { rank: "4", name: "四年级", sum: "1356" },
+        // { rank: "5", name: "五年级", sum: "1256" },
+        // { rank: "6", name: "六年级", sum: "1056" },
+        // { rank: "7", name: "七年级", sum: "956" },
+        // { rank: "8", name: "八年级", sum: "856" },
       ],
     };
   },
-  methods: {
+  methods:{
     tableRowClassName({ row, rowIndex }) {
       if ((rowIndex + 1) % 2 === 0) {
         return "even_row";
@@ -47,6 +56,32 @@ export default {
         return "";
       }
     },
+    setArray(array){
+      this.tableData = []
+      for(var i = 0;i<array.length;i++){
+        this.tableData.push({
+          sum:array[i].count,
+          name:array[i].title,
+          teacher:array[i].teacher
+        })
+      }
+      this.tableData = this.tableData.sort(function(a,b){
+        return b.sum - a.sum;
+      })
+    }
+  },
+  watch: {
+    cWorkSum: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.cWorkSum)
   },
 };
 </script>
@@ -68,4 +103,8 @@ export default {
   background: #fff;
   overflow: auto;
 }
+
+.tableClass >>> td, .tableClass >>> th{
+  padding: 5px 0;
+}
 </style>

+ 10 - 2
src/components/pages/dataBoard/teacher/chartList/teaFre.vue

@@ -25,6 +25,13 @@ export default {
         teacher: [],
       },
       option: {
+        title: {
+          text: '登录频次',
+          textStyle: {
+            fontSize: 12,
+          },
+          padding: [0, 0, 0, 10]
+        },
         tooltip: {
           trigger: "axis",
         },
@@ -38,10 +45,10 @@ export default {
           type: "value",
         },
         grid: {
-          top: "5%",
+          top: "15%",
           left: "5%",
           right: "5%",
-          bottom: "5%",
+          bottom: "0%",
           containLabel: true,
         },
         series: [
@@ -50,6 +57,7 @@ export default {
             type: "line",
             // data: [220, 182, 191, 234, 290, 330]
             data: [],
+            areaStyle: {}
           },
         ],
       },

+ 69 - 9
src/components/pages/dataBoard/teacher/chartList/workTime.vue

@@ -12,10 +12,26 @@
 
 <script>
 export default {
+  props: {
+    workTime: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
+      ooption: {
+        ydata: [],
+        teacher: [],
+      },
       option: {
+        title: {
+          text: '在线时长',
+          textStyle: {
+            fontSize: 12,
+          },
+          padding: [10, 0, 0, 10]
+        },
         tooltip: {
           trigger: "axis",
           axisPointer: {
@@ -23,7 +39,7 @@ export default {
           },
         },
         grid: {
-          top: "5%",
+          top: "10%",
           left: "5%",
           right: "5%",
           bottom: "5%",
@@ -35,20 +51,29 @@ export default {
         },
         yAxis: {
           type: "category",
-          data: ["六年级", "五年级", "四年级", "三年级", "二年级", "一年级"],
+          // data: ["六年级", "五年级", "四年级", "三年级", "二年级", "一年级"],
+          data:[]
         },
         series: [
           {
-            name: "2011",
+            name: "在线时长(时)",
             type: "bar",
-            data: [60, 110, 25, 130, 65, 80],
+            // data: [60, 110, 25, 130, 65, 80],
+            data:[],
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return "#106bff";
+                },
+              },
+            },
           },
         ],
       },
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -56,16 +81,54 @@ export default {
       //然后异步执行echarts的初始化函数
       newPromise.then(() => {
         const chartObj = this.$echarts.init(
+          //劳动课程
           this.$el.querySelector("#charts_canvas")
         );
+        this.option.yAxis.data = option.ydata;
+        this.option.series[0].data = option.teacher;
         // 初始化雷达图
         this.chartObj = chartObj;
         this.chartObj.setOption(this.option);
       });
     },
   },
+  watch: {
+    workTime: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.ooption = {
+          ydata: [],
+          teacher: [],
+        };
+        let _array = newValue;
+        for (var i = 0; i < _array.length; i++) {
+          this.ooption.ydata.push(_array[i].name);
+          this.ooption.teacher.push(_array[i].text);
+        }
+
+        if (!this.chartObj) {
+          this.setChart(this.ooption);
+        } else {
+          this.option.yAxis.data = this.ooption.ydata;
+          this.option.series[0].data = this.ooption.teacher;
+          this.chartObj.setOption(this.option);
+        }
+        this.$forceUpdate();
+      },
+    },
+  },
   mounted() {
-    this.setChart(this.option);
+    this.ooption = {
+      ydata: [],
+      teacher: [],
+    };
+    let _array = this.workTime;
+    for (var i = 0; i < _array.length; i++) {
+      this.ooption.ydata.push(_array[i].name);
+          this.ooption.teacher.push(_array[i].text + "小时");
+    }
+    this.setChart(this.ooption);
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {
@@ -73,9 +136,6 @@ export default {
       }
     });
   },
-  created() {
-    this.setChart();
-  },
 };
 </script>
 

+ 241 - 67
src/components/pages/dataBoard/teacher/index.vue

@@ -14,7 +14,7 @@
             </div>
             <div class="teaLeft teaRigth">
               <div>周使用频次</div>
-              <div>{{weekCount}}</div>
+              <div>{{ weekCount }}</div>
             </div>
           </div>
           <div class="teafre" style="margin: 10px auto">
@@ -27,7 +27,10 @@
               <div>{{ (loginCount / count).toFixed(0) }}</div>
             </div>
           </div>
-          <TeaFre style="height: calc(100% - 150px)" :monthArray="loginCountMonthArray"></TeaFre>
+          <TeaFre
+            style="height: calc(100% - 150px)"
+            :monthArray="loginCountMonthArray"
+          ></TeaFre>
         </div>
       </div>
       <div class="bottom">
@@ -35,7 +38,10 @@
           <div class="title">教师活跃度</div>
         </div>
         <div class="dataBox">
-          <TeaAct style="height: calc(100% - 20px)"></TeaAct>
+          <TeaAct
+            style="height: calc(100% - 20px)"
+            :cWorkSum="cWorkSum"
+          ></TeaAct>
         </div>
       </div>
     </div>
@@ -68,7 +74,11 @@
               <div>{{ subjectCourse.toFixed(0) }}</div>
             </div>
           </div>
-          <TeaData style="height: calc(100% - 62px)" :courseArray="courseArray" @openCourse="openCourse2"></TeaData>
+          <TeaData
+            style="height: calc(100% - 62px)"
+            :courseArray="courseArray"
+            @openCourse="openCourse2"
+          ></TeaData>
         </div>
       </div>
       <div class="bottom">
@@ -77,7 +87,9 @@
         </div>
         <div class="dataBox">
           <div class="allBox">
-            <div class="allBox_left"><FunPlot></FunPlot></div>
+            <div class="allBox_left">
+              <FunPlot :pusaDep="pusaDep"></FunPlot>
+            </div>
             <div class="allBox_right">
               <div class="depth">
                 <span>上传课程</span>
@@ -85,7 +97,14 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="36"
+                    :percentage="
+                      lightJson.upCourseTeachers
+                        ? (
+                            (lightJson.upCourseTeachers / lightJson.teachers) *
+                            100
+                          ).toFixed(0)
+                        : 0
+                    "
                     :stroke-width="15"
                     :format="format"
                     color="#106BFF"
@@ -98,7 +117,14 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="76"
+                    :percentage="
+                      lightJson.upCourseUsers
+                        ? (
+                            (lightJson.upCourseUsers / lightJson.teachers) *
+                            100
+                          ).toFixed(0)
+                        : 0
+                    "
                     :stroke-width="15"
                     :format="format"
                     color="#106BFF"
@@ -111,7 +137,14 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="76"
+                    :percentage="
+                      lightJson.upgCourseTeachers
+                        ? (
+                            (lightJson.upgCourseTeachers / lightJson.teachers) *
+                            100
+                          ).toFixed(0)
+                        : 0
+                    "
                     :stroke-width="15"
                     :format="format"
                     color="#106BFF"
@@ -124,7 +157,14 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="76"
+                    :percentage="
+                      lightJson.commentUsers
+                        ? (
+                            (lightJson.commentUsers / lightJson.teachers) *
+                            100
+                          ).toFixed(0)
+                        : 0
+                    "
                     :stroke-width="15"
                     :format="format"
                     color="#106BFF"
@@ -137,7 +177,14 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="76"
+                    :percentage="
+                      lightJson.evaTeachers
+                        ? (
+                            (lightJson.evaTeachers / lightJson.teachers) *
+                            100
+                          ).toFixed(0)
+                        : 0
+                    "
                     :stroke-width="15"
                     :format="format"
                     color="#106BFF"
@@ -150,7 +197,14 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="36"
+                    :percentage="
+                      lightJson.toolUsers
+                        ? (
+                            (lightJson.toolUsers / lightJson.teachers) *
+                            100
+                          ).toFixed(0)
+                        : 0
+                    "
                     :stroke-width="15"
                     :format="format"
                     color="#106BFF"
@@ -163,7 +217,14 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="76"
+                    :percentage="
+                      lightJson.tevaTeachers
+                        ? (
+                            (lightJson.tevaTeachers / lightJson.teachers) *
+                            100
+                          ).toFixed(0)
+                        : 0
+                    "
                     :stroke-width="15"
                     :format="format"
                     color="#106BFF"
@@ -176,7 +237,14 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="25"
+                    :percentage="
+                      lightJson.sevaTeachers
+                        ? (
+                            (lightJson.sevaTeachers / lightJson.teachers) *
+                            100
+                          ).toFixed(0)
+                        : 0
+                    "
                     :stroke-width="15"
                     :format="format"
                     color="#106BFF"
@@ -194,7 +262,10 @@
           <div class="title">教学活动</div>
         </div>
         <div class="dataBox">
-          <WorkNum :workNumList="workNumList" @openCourse="openCourse"></WorkNum>
+          <WorkNum
+            :workNumList="workNumList"
+            @openCourse="openCourse"
+          ></WorkNum>
         </div>
       </div>
       <div class="bottom">
@@ -212,7 +283,10 @@
               <div>{{ (loginTime / count).toFixed(0) }}小时</div>
             </div>
           </div>
-          <WorkTime style="height: calc(100% - 62px)"></WorkTime>
+          <WorkTime
+            style="height: calc(100% - 62px)"
+            :workTime="workTime"
+          ></WorkTime>
         </div>
       </div>
     </div>
@@ -250,35 +324,56 @@ export default {
       loginCount: 0,
       loginTime: 0,
       courseCount: 0,
-      loginCountMonthArray:[],
-      weekCount:0,
+      loginCountMonthArray: [],
+      weekCount: 0,
       gradeCourse: 0,
       subjectCourse: 0,
       courseArray: [],
       workNumList: [],
-      grade:[],
-      subject:[],
-      theme:[],
+      grade: [],
+      subject: [],
+      theme: [],
+      lightJson: {
+        users: 0,
+        teachers: 0,
+        students: 0,
+        upCourseTeachers: 0,
+        upCourseUsers: 0,
+        toolUsers: 0,
+        upgCourseTeachers: 0,
+        commentUsers: 0,
+        evaTeachers: 0,
+        tevaTeachers: 0,
+        sevaTeachers: 0,
+      },
+      pusaDep: [
+        { value: 0, name: "登录" },
+        { value: 0, name: "创建" },
+        { value: 0, name: "授课" },
+        { value: 0, name: "评价" },
+      ],
+      cWorkSum: [],
+      workTime: [],
     };
   },
   mounted() {
     this.getData();
   },
   methods: {
-    openCourse2(classIndex,subIndex){
-      console.log(classIndex,subIndex);
+    openCourse2(classIndex, subIndex) {
+      console.log(classIndex, subIndex);
       // console.log(this.courseArray);
       // console.log(this.courseArray[classIndex].id,this.courseArray[classIndex].subject[subIndex].id || '');
       window.parent.postMessage(
-        { 
+        {
           tools: "openCourse",
           typea: this.courseArray[classIndex].id,
-          typed: this.courseArray[classIndex].subject[subIndex].id || '',
-        }, 
+          typed: this.courseArray[classIndex].subject[subIndex].id || "",
+        },
         "*"
       );
     },
-    openCourse(cid){
+    openCourse(cid) {
       window.parent.postMessage({ cid: cid, screenType: "3" }, "*");
     },
     getData() {
@@ -296,55 +391,56 @@ export default {
           this.count = res.data[0][0].count;
           this.loginCount = res.data[1][0].loginCount;
           this.loginTime = parseInt(res.data[2][0].time) / 60 / 60;
-          this.courseCount = res.data[5][0].courseCount
-
-
+          this.courseCount = res.data[5][0].courseCount;
 
           let loginCountMonthArray = [];
-          const date = new Date()
-          var Month = date.getMonth() + 1
-          var Year = date.getFullYear()
+          const date = new Date();
+          var Month = date.getMonth() + 1;
+          var Year = date.getFullYear();
           for (var i = Month; i > Month - 6; i--) {
             if (i <= 0) {
               loginCountMonthArray.push({
                 Year: Year - 1,
                 Month: 12 + i,
                 teacher: 0,
-              })
+              });
             } else {
               loginCountMonthArray.push({
                 Month: i,
                 Year: Year,
                 teacher: 0,
-              })
+              });
             }
           }
 
-          loginCountMonthArray = loginCountMonthArray.reverse()
-          let teacherLoginCountYear = res.data[3] // 教师半年登录次数统计
+          loginCountMonthArray = loginCountMonthArray.reverse();
+          let teacherLoginCountYear = res.data[3]; // 教师半年登录次数统计
 
           for (var i = 0; i < teacherLoginCountYear.length; i++) {
-            let _date = new Date(teacherLoginCountYear[i].create_at)
-            var _month = _date.getMonth() + 1
-            var _year = _date.getFullYear()
+            let _date = new Date(teacherLoginCountYear[i].create_at);
+            var _month = _date.getMonth() + 1;
+            var _year = _date.getFullYear();
             for (var j = 0; j < loginCountMonthArray.length; j++) {
-              if (_month == loginCountMonthArray[j].Month && _year == loginCountMonthArray[j].Year) {
-                loginCountMonthArray[j].teacher++
+              if (
+                _month == loginCountMonthArray[j].Month &&
+                _year == loginCountMonthArray[j].Year
+              ) {
+                loginCountMonthArray[j].teacher++;
                 break;
               }
             }
           }
 
           this.loginCountMonthArray = loginCountMonthArray;
-          this.weekCount = res.data[4][0].count
+          this.weekCount = res.data[4][0].count;
 
-          let _grade = res.data[6] //年级
-          let _subject = res.data[7]  //学科
-          let _course = res.data[8] //课程
-          let _gradeCourse = 0 //各年级上传课程
-          let _subjectCourse = 0 //各学科上传课程
-          let _courseArray = []
-          _subject.push({ name: '其他' })
+          let _grade = res.data[6]; //年级
+          let _subject = res.data[7]; //学科
+          let _course = res.data[8]; //课程
+          let _gradeCourse = 0; //各年级上传课程
+          let _subjectCourse = 0; //各学科上传课程
+          let _courseArray = [];
+          _subject.push({ name: "其他" });
 
           for (var i = 0; i < _grade.length; i++) {
             _courseArray.push({
@@ -352,48 +448,55 @@ export default {
               id: _grade[i].id,
               courseid: [],
               subject: [],
-            })
+            });
             for (var z = 0; z < _course.length; z++) {
               if (_course[z].typeid == _grade[i].id) {
-                _gradeCourse++
-                if (_courseArray[i].courseid.indexOf(_course[z].courseid) === -1) {
-                  _courseArray[i].courseid.push(_course[z].courseid)
+                _gradeCourse++;
+                if (
+                  _courseArray[i].courseid.indexOf(_course[z].courseid) === -1
+                ) {
+                  _courseArray[i].courseid.push(_course[z].courseid);
                 }
               }
-
             }
             for (var j = 0; j < _subject.length; j++) {
               _courseArray[i].subject.push({
                 name: _subject[j].name,
                 id: _subject[j].id,
-                course: 0
-              })
+                course: 0,
+              });
               for (var z = 0; z < _course.length; z++) {
-                if (_course[z].typeid == _subject[j].id && _courseArray[i].courseid.indexOf(_course[z].courseid) !== -1) {
-                  _courseArray[i].subject[j].course++
+                if (
+                  _course[z].typeid == _subject[j].id &&
+                  _courseArray[i].courseid.indexOf(_course[z].courseid) !== -1
+                ) {
+                  _courseArray[i].subject[j].course++;
                 }
               }
             }
-            let sum = 0
+            let sum = 0;
             for (var j = 0; j < _courseArray[i].subject.length - 1; j++) {
-              sum += _courseArray[i].subject[j].course
+              sum += _courseArray[i].subject[j].course;
             }
-            _courseArray[i].subject[_courseArray[i].subject.length - 1].course = (_courseArray[i].courseid.length - sum) < 0 ? 0 : _courseArray[i].courseid.length - sum 
+            _courseArray[i].subject[_courseArray[i].subject.length - 1].course =
+              _courseArray[i].courseid.length - sum < 0
+                ? 0
+                : _courseArray[i].courseid.length - sum;
           }
           for (var j = 0; j < _subject.length; j++) {
             for (var z = 0; z < _course.length; z++) {
               if (_course[z].typeid == _subject[j].id) {
-                _subjectCourse++
+                _subjectCourse++;
               }
             }
           }
-          this.gradeCourse = _gradeCourse / _grade.length
-          this.subjectCourse = _subjectCourse / _subject.length
-          this.courseArray = _courseArray
+          this.gradeCourse = _gradeCourse / _grade.length;
+          this.subjectCourse = _subjectCourse / _subject.length;
+          this.courseArray = _courseArray;
 
           this.grade = _grade;
           this.subject = _subject;
-          this.theme = res.data[9];//主题
+          this.theme = res.data[9]; //主题
           var _workCourse = res.data[10]; //带作业的课程
           var wList = [];
           for (var i = 0; i < _workCourse.length; i++) {
@@ -431,6 +534,77 @@ export default {
             item.cid,
           ]);
           this.workNumList = workNumList;
+
+          let _teachers = res.data[11][0].count; //老师数量
+          let _students = res.data[12][0].count; //学生数量
+          let _upCourseTeachers = res.data[13][0].count; //上传课程老师的数量
+          let _upCourseUsers = res.data[14][0].count; //上传项目的用户
+          let _toolUsers = res.data[15][0].count; //使用工具的用户
+          let _upgCourseTeachers = res.data[16][0].count; //参与协同课程的老师
+          let _commentUsers = res.data[17][0].count; //参与互动交流的用户
+          let _evaTeachers = res.data[18][0].count; //查询添加目标的老师
+          let _tevaTeachers = res.data[19][0].count; //查询创建课程有添加目标的老师
+          let _sevaTeachers = res.data[20][0].count; //查询对作业评价的老师
+
+          this.lightJson = {
+            users: this.count,
+            teachers: _teachers,
+            students: _students,
+            upCourseTeachers: _upCourseTeachers,
+            upCourseUsers: _upCourseUsers,
+            toolUsers: _toolUsers,
+            upgCourseTeachers: _upgCourseTeachers,
+            commentUsers: _commentUsers,
+            evaTeachers: _evaTeachers,
+            tevaTeachers: _tevaTeachers,
+            sevaTeachers: _sevaTeachers,
+          };
+
+          let _loginCount = res.data[21][0].count; //漏斗图查询登录
+          let _workTeaCount = res.data[22][0].count; //漏斗图查询有交作业的课程老师数量
+          // let allCount = _loginCount + _upCourseTeachers + _workTeaCount + _sevaTeachers;
+          for (var i = 0; i < this.pusaDep.length; i++) {
+            if (this.pusaDep[i].name == "登录") {
+              this.pusaDep[i].value = ((_loginCount / _teachers) * 100).toFixed(
+                0
+              );
+            } else if (this.pusaDep[i].name == "创建") {
+              this.pusaDep[i].value = (
+                (_upCourseTeachers / _teachers) *
+                100
+              ).toFixed(0);
+            } else if (this.pusaDep[i].name == "授课") {
+              this.pusaDep[i].value = (
+                (_workTeaCount / _teachers) *
+                100
+              ).toFixed(0);
+            } else if (this.pusaDep[i].name == "评价") {
+              this.pusaDep[i].value = (
+                (_sevaTeachers / _teachers) *
+                100
+              ).toFixed(0);
+            }
+          }
+
+          let _cWorkSum = res.data[23]; //查询课程名称和作业数量
+          this.cWorkSum = _cWorkSum;
+
+          let _workTime = res.data[24]; //查询教研室在线时长
+          var mergedArray = [];
+          _workTime.forEach((obj) => {
+            var foundItem = mergedArray.find((item) => item.name === obj.name);
+            if (foundItem) {
+              foundItem.text = String(
+                Number(foundItem.text) + Number(obj.text)
+              );
+            } else {
+              mergedArray.push({ name: obj.name, text: obj.text });
+            }
+          });
+          mergedArray.forEach((obj) => {
+            obj.text = (Number(obj.text) / 3600).toFixed(2); // 秒转小时,并保留两位小数
+          });
+          this.workTime = mergedArray;
           this.$forceUpdate();
         })
         .catch((err) => {
@@ -439,7 +613,7 @@ export default {
         });
     },
     format(percentage) {
-      return percentage;
+      return percentage + '%';
     },
   },
 };

+ 75 - 81
src/components/pages/easy/addCourse.vue

@@ -3471,7 +3471,7 @@
             </div>
             <div class="a_add_head">
               <div style="display: flex;align-items: center;width: 100%;margin-right: 20px;">
-                {{ index1 + 1 + "、" }}
+                <span style="min-width:fit-content">{{ index1 + 1 + "、" }}</span>
                 <textarea class="a_add_head_input textarea_css"  v-autoHeight="40" v-model="askJson.askJson[index1].askstitle
                         " placeholder="请输入题目" @change="()=>{$forceUpdate()}"></textarea>
               </div>
@@ -3549,7 +3549,7 @@
             <div class="a_add_head">
               <div class="timuUpImg">
                 <div style="display: flex;align-items: center;">
-                  {{ index1 + 1 + "、" }}
+                  <span style="min-width:fit-content">{{ index1 + 1 + "、" }}</span>
                   <!-- <el-input class="a_add_head_input"  v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
                     placeholder="请输入题目">
                   </el-input> -->
@@ -3920,7 +3920,7 @@
             <div class="spanName">选择系统文件</div>
           </div>
           <div>
-            <el-button @click="searchImageValue = '',searchImage()" v-if="isSysPic2 == false">选择网络文件</el-button>
+            <el-button @click="searchImageValue = courseName,resetImage()" v-if="isSysPic2 == false">选择网络文件</el-button>
             <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
               <img :src="cover[0].url" alt="" />
               <div class="deletePic" @click="deleteSysPic">
@@ -3965,13 +3965,17 @@
     <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
       :before-close="handleClose" class="dialog_diy">
       <div>
-        <div class="people_top_right" style="position: relative;">
-          <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue" @keyup.enter.native="searchImage()"></el-input>
-          <div class="search_img" @click="searchImage" style="right: 10px;">
-            <img src="../../../assets/icon/search.png" alt />
+        <div class="people_top_right" style="display: flex;align-items: center;">
+          <div style="position: relative; width: 100%;">
+            <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue" @keyup.enter.native="resetImage()"></el-input>
+            <div class="search_img" @click="resetImage" style="right: 10px;">
+              <img src="../../../assets/icon/search.png" alt />
+            </div>
           </div>
+          <el-button type="primary" size="default" style="margin-left: 10px;" @click="changePicture">换一组</el-button>
         </div>
         <div class="sysPicBox" v-loading="imageloading">
+          <div class="picNone" v-if="!imageList.length">请输入关键词搜索图片</div>
           <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
             <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
           </div>
@@ -4089,8 +4093,8 @@
                   <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle"></el-input>
                 </div>
                 <div @click="addSen(stIndex)">添加</div>
+                <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
               </div>
-              <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
             </div>
 
             <div class="cardList">
@@ -4206,7 +4210,7 @@
         <el-button type="primary" @click="addInvite">确定</el-button>
       </span>
     </el-dialog>
-    <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="30%"
+    <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
       :before-close="handleClose" class="dialog_diy">
       <div>
         <div style="margin-bottom: 20px;color: #999;">提示:点击“+”或“-”修改倒计时时长。</div>
@@ -4284,8 +4288,8 @@
           <div class="groupTitle">请设置每组人数</div>
           <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
             style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
-          <el-input-number v-model="groupJson.number" :controls="false" :min="2" :max="10"
-            placeholder="请输入2-10的数字"></el-input-number>
+          <el-input v-model="groupJson.number" style="width:150px"
+            placeholder="请输入2-10的数字" @change="numberPan"></el-input>
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -4554,6 +4558,7 @@ export default {
       sysPicVisible2: false,
       imageloading: false,
       searchImageValue:"",
+      ppage:1,
       imageList: [],
       heightPx:'100%'
     };
@@ -4820,6 +4825,16 @@ export default {
       el.getElementsByTagName("input")[0].click();
     },
     change(val) {
+      if(this.dialogVisible1){
+        this.tdetail = val
+      }else if(this.dialogVisible6){
+        this.AttText.text = val
+      }else if(this.dialogVisible2){
+        this.cTemplate = val
+      }else if(this.dialogVisibleTable){
+        this.tableJson.text = val
+      }
+      this.$forceUpdate();
       console.log(val);
     },
     change2(val) {
@@ -7704,7 +7719,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -7725,7 +7740,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
 
@@ -7780,7 +7795,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -7801,7 +7816,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
 
@@ -7822,7 +7837,7 @@ export default {
               (aj[i].type == "2" && !aj[i].answer.length) ||
               (aj[i].type == "1" && ((typeof aj[i].answer == 'object' && !aj[i].answer.length) || (aj[i].answer !== 0 && !aj[i].answer)))
             ) {
-              this.$message.error(`题目${i+1},未设置正确选项,请设置。`);
+              this.$message.error(`请将题目${i+1}的正确选项设置完整`);
               return;
             }
           }
@@ -8901,6 +8916,10 @@ export default {
         this.$message.error("请填写卡片内容!");
         return;
       }
+      if(this.sentenceList[i].sentenceTitle.length > 10){
+        this.$message.error("卡片内容字数不能超过10位");
+        return;
+      }
       if(this.sentenceList[i].addSentence.indexOf(this.sentenceList[i].sentenceTitle) !== -1){
         this.$message.error("不能添加重复的卡片内容!");
         return;
@@ -8920,14 +8939,14 @@ export default {
     addSentenceTool() {
       for (var i = 0; i < this.sentenceList.length; i++) {
         if (this.sentenceList[i].rightAnswer.length == 0) {
-          this.$message.error("请将信息填写完整!");
+          this.$message.error(`请将题目${i+1}设置完整。`);
           return;
         }
         if (
           this.sentenceList[i].addSentence.length !=
           this.sentenceList[i].rightAnswer.length
         ) {
-          this.$message.error("请将信息填写完整!");
+          this.$message.error(`请将题目${i+1}设置完整。`);
           return;
         }
       }
@@ -9106,6 +9125,12 @@ export default {
     deleteGroup(i) {
       this.groupJson.group.splice(i, 1);
     },
+    numberPan(){
+      if(/[^\d]/.test(this.groupJson.number) || this.groupJson.number < 2 || this.groupJson.number > 10){ 
+        this.$message.error('请输入2-10的数字')
+        this.groupJson.number = ''
+      }
+    },
     addGroupJson() {
       for (var i = 0; i < this.groupJson.group.length; i++) {
         if (!this.groupJson.group[i].name) {
@@ -9315,76 +9340,34 @@ export default {
     searchImage() {
       var _this = this;
       _this.imageList = []
+      if(!_this.searchImageValue){
+        _this.sysPicVisible2 = true
+        return
+      }
       _this.imageloading = true
-      _this.ajax.post('https://gpt.cocorobo.cn/search', {
-        page: 1,
-        pageSize: 21,
-        keywords: this.searchImageValue,
-        category: 'unsplash',
-        isNeedTranslate: true
+      _this.ajax.post('https://gpt.cocorobo.cn/search_image', {
+        page: _this.ppage,
+        pagesize: 9,
+        query: _this.searchImageValue
       }).then(function (response) {
         // console.log(response.data.data);
-        var data = response.data.data;
+        var data = response.data.FunctionResponse.result;
         for (var i = 0; i < data.length; i++) {
-          _this.imageList.push(data[i].small_img_path)
+          _this.imageList.push({url:data[i].image})
         }
         _this.imageloading = false
       }).catch(function (error) {
         console.log(error);
       });
       _this.sysPicVisible2 = true
-
-      // _this.ajax.post('https://gpt.cocorobo.cn/search', {
-      //   page: 1,
-      //   pageSize: 4,
-      //   keywords: '',
-      //   category: 'pexels',
-      //   isNeedTranslate: true
-      // }).then(function (response) {
-      //   // console.log(response.data.data);
-      //   var data = response.data.data;
-      //   for (var i = 0; i < data.length; i++) {
-      //     _this.imageList.push(data[i].small_img_path)
-      //   }
-      //   _this.imageloading = false
-      // }).catch(function (error) {
-      //   console.log(error);
-      // });
-
-      // _this.ajax.post('https://gpt.cocorobo.cn/search', {
-      //   page: 1,
-      //   pageSize: 4,
-      //   keywords: '',
-      //   category: 'pixabay',
-      //   isNeedTranslate: false
-      // }).then(function (response) {
-      //   // console.log(response.data.data);
-      //   var data = response.data.data;
-      //   for (var i = 0; i < data.length; i++) {
-      //     _this.imageList.push(data[i].small_img_path)
-      //   }
-      //   _this.imageloading = false
-      // }).catch(function (error) {
-      //   console.log(error);
-      // });
-
-      // _this.ajax.post('https://gpt.cocorobo.cn/search', {
-      //   page: 1,
-      //   pageSize: 4,
-      //   keywords: '',
-      //   category: '500px',
-      //   isNeedTranslate: true
-      // }).then(function (response) {
-      //   // console.log(response.data.data);
-      //   var data = response.data.data;
-      //   for (var i = 0; i < data.length; i++) {
-      //     _this.imageList.push(data[i].small_img_path)
-      //   }
-      //   _this.imageloading = false
-      // }).catch(function (error) {
-      //   console.log(error);
-      // });
-
+    },
+    changePicture(){
+      this.ppage++
+      this.searchImage()
+    },
+    resetImage(){
+      this.ppage = 1
+      this.searchImage()
     }
   },
   beforeDestroy() {
@@ -9933,6 +9916,7 @@ export default {
   width: 40px;
   height: 50px;
   cursor: pointer;
+  margin-left: 10px;
 }
 
 
@@ -11884,6 +11868,16 @@ ol {
   align-content: flex-start;
   height: 435px;
   overflow: auto;
+  position: relative;
+}
+
+.picNone {
+  position: absolute;
+  left: 50%;
+  top: 45%;
+  transform: translate(-50%, -50%);
+  width:fit-content;
+  color: #9c9c9c;
 }
 
 .sysPic {
@@ -12223,14 +12217,14 @@ ol {
 
 .isCard,
 .isCard1 {
-  width: 140px;
+  width: 200px;
   height: 65px;
   text-align: center;
   line-height: 65px;
-  font-size: 20px;
+  font-size: 14px;
   cursor: pointer;
   background-image: url("../../../assets/icon/conSentences/titleBorder.png");
-  background-size: cover;
+  background-size: 100% 100%;
   position: relative;
   z-index: 99;
 }

+ 228 - 75
src/components/pages/evaluation.vue

@@ -86,10 +86,11 @@
                   >复制</el-button
                 >
                 <el-button
+                  v-if="$route.query.userid == scope.row.userid"
                   class="de_button"
                   type="primary"
                   size="small"
-                  @click="deleteE(scope.row.id, scope.row.userid)"
+                  @click="deleteE(scope.row.id)"
                   >删除</el-button
                 >
               </div>
@@ -115,9 +116,9 @@
       :append-to-body="true"
       width="100%"
       :before-close="handleClose1"
-      class="dialog_diy mubiao_diy"
+      class="dialog_diy mubiao_diy fullStyle"
     >
-      <div>
+      <div style="width: 100%; height: calc(100% - 80px)">
         <div class="e_add_top">
           <div class="e_add_title">
             <span>目标管理名称</span>
@@ -146,36 +147,54 @@
               <img src="../../assets/add.png" @click="addE(1)" alt />
             </div>
             <div class="e_add_list_body">
+              <div class="e_add_input">
+                <el-input v-model="evaObject.fName" />
+                <el-button @click="addInputName(1)" type="primary"
+                  >确 定</el-button
+                >
+              </div>
               <div
                 class="e_add_list_child"
                 v-for="(item, index) in eJson"
                 :key="index"
               >
-                <span
-                  :class="{ active: item.id == fid }"
-                  v-if="item.name.length < 8"
-                  @click="checkF(item.id)"
-                  >{{ item.name }}</span
-                >
-                <el-tooltip
-                  v-else
-                  class="item"
-                  effect="dark"
-                  :content="item.name"
-                  placement="top-start"
-                >
+                <div v-if="!evaObject.isFInput">
                   <span
                     :class="{ active: item.id == fid }"
+                    v-if="item.name.length < 8"
                     @click="checkF(item.id)"
                     >{{ item.name }}</span
                   >
-                </el-tooltip>
-                <img
-                  style="right: 40px"
-                  src="../../assets/autorUp.png"
-                  @click="updateF(item.id, item.name, 1)"
-                  alt
-                />
+                  <el-tooltip
+                    v-else
+                    class="item"
+                    effect="dark"
+                    :content="item.name"
+                    placement="top-start"
+                  >
+                    <span
+                      :class="{ active: item.id == fid }"
+                      @click="checkF(item.id)"
+                      >{{ item.name }}</span
+                    >
+                  </el-tooltip>
+                  <img
+                    style="right: 40px"
+                    src="../../assets/autorUp.png"
+                    @click="
+                      (evaObject.isFInput = true),
+                        (evaObject.fName1 = item.name)
+                    "
+                    alt
+                  />
+                  <!-- @click="updateF(item.id, item.name, 1)" -->
+                </div>
+                <div v-else>
+                  <el-input
+                    v-model="evaObject.fName1"
+                    @change="noInput(item.id, evaObject.fName1, 1)"
+                  />
+                </div>
                 <img
                   src="../../assets/delete.png"
                   @click="deleteF(item.id)"
@@ -202,36 +221,53 @@
               />
             </div>
             <div class="e_add_list_body">
+              <div class="e_add_input" v-if="fid != ''">
+                <el-input v-model="evaObject.sName" />
+                <el-button @click="addInputName(2)" type="primary"
+                  >确 定</el-button
+                >
+              </div>
               <div
                 class="e_add_list_child"
                 v-for="(item, index) in fid && eJson[fid].child"
                 :key="index"
               >
-                <span
-                  :class="{ active: item.id == sid }"
-                  v-if="item.name.length < 8"
-                  @click="checkS(item.id)"
-                  >{{ item.name }}</span
-                >
-                <el-tooltip
-                  v-else
-                  class="item"
-                  effect="dark"
-                  :content="item.name"
-                  placement="top-start"
-                >
+                <div v-if="!evaObject.isSInput">
                   <span
                     :class="{ active: item.id == sid }"
+                    v-if="item.name.length < 8"
                     @click="checkS(item.id)"
                     >{{ item.name }}</span
                   >
-                </el-tooltip>
-                <img
-                  style="right: 40px"
-                  src="../../assets/autorUp.png"
-                  @click="updateF(item.id, item.name, 2)"
-                  alt
-                />
+                  <el-tooltip
+                    v-else
+                    class="item"
+                    effect="dark"
+                    :content="item.name"
+                    placement="top-start"
+                  >
+                    <span
+                      :class="{ active: item.id == sid }"
+                      @click="checkS(item.id)"
+                      >{{ item.name }}</span
+                    >
+                  </el-tooltip>
+                  <img
+                    style="right: 40px"
+                    src="../../assets/autorUp.png"
+                    @click="
+                      (evaObject.isSInput = true),
+                        (evaObject.sName1 = item.name)
+                    "
+                    alt
+                  />
+                </div>
+                <div v-else>
+                  <el-input
+                    v-model="evaObject.sName1"
+                    @change="noInput(item.id, evaObject.sName1, 2)"
+                  />
+                </div>
                 <img
                   src="../../assets/delete.png"
                   @click="deleteS(item.id)"
@@ -258,6 +294,12 @@
               />
             </div>
             <div class="e_add_list_body">
+              <div class="e_add_input" v-if="sid != ''">
+                <el-input v-model="evaObject.tName" />
+                <el-button @click="addInputName(3)" type="primary"
+                  >确 定</el-button
+                >
+              </div>
               <div
                 class="e_add_list_child"
                 v-for="(item, index) in fid &&
@@ -265,31 +307,42 @@
                 eJson[fid].child[sid].child"
                 :key="index"
               >
-                <span
-                  :class="{ active: item.id == tid }"
-                  v-if="item.name.length < 8"
-                  @click="checkT(item.id)"
-                  >{{ item.name }}</span
-                >
-                <el-tooltip
-                  v-else
-                  class="item"
-                  effect="dark"
-                  :content="item.name"
-                  placement="top-start"
-                >
+                <div v-if="!evaObject.isTInput">
                   <span
                     :class="{ active: item.id == tid }"
+                    v-if="item.name.length < 8"
                     @click="checkT(item.id)"
                     >{{ item.name }}</span
                   >
-                </el-tooltip>
-                <img
-                  style="right: 40px"
-                  src="../../assets/autorUp.png"
-                  @click="updateF(item.id, item.name, 3)"
-                  alt
-                />
+                  <el-tooltip
+                    v-else
+                    class="item"
+                    effect="dark"
+                    :content="item.name"
+                    placement="top-start"
+                  >
+                    <span
+                      :class="{ active: item.id == tid }"
+                      @click="checkT(item.id)"
+                      >{{ item.name }}</span
+                    >
+                  </el-tooltip>
+                  <img
+                    style="right: 40px"
+                    src="../../assets/autorUp.png"
+                    @click="
+                      (evaObject.isTInput = true),
+                        (evaObject.tName1 = item.name)
+                    "
+                    alt
+                  />
+                </div>
+                <div v-else>
+                  <el-input
+                    v-model="evaObject.tName1"
+                    @change="noInput(item.id, evaObject.tName1, 3)"
+                  />
+                </div>
                 <img
                   src="../../assets/delete.png"
                   @click="deleteT(item.id)"
@@ -315,7 +368,10 @@
                 <span :class="{ active: typeMode == 2 }" @click="typeMode = 2"
                   >目标罗盘</span
                 >
-                <span :class="{ active: typeMode == 3 }" @click="typeMode = 3"
+                <span
+                  :class="{ active: typeMode == 3 }"
+                  @click="typeMode = 3"
+                  v-if="!update"
                   >目标看板</span
                 >
               </div>
@@ -456,6 +512,17 @@ export default {
       eid: "",
       typeMode: 1,
       eJSONNum: 0,
+      evaObject: {
+        fName: "",
+        fName1: "",
+        isFInput: false,
+        sName: "",
+        sName1: "",
+        isSInput: false,
+        tName: "",
+        tName1: "",
+        isTInput: false,
+      },
     };
   },
   methods: {
@@ -514,6 +581,61 @@ export default {
       this.type = type;
       this.dialogVisible3 = true;
     },
+    addInputName(t) {
+      let _id = this.guid();
+      if (t == 1) {
+        if (this.evaObject.fName == "") {
+          this.$message.error("请输入目标");
+          return;
+        }
+        this.eJson[_id] = {
+          id: _id,
+          name: this.evaObject.fName,
+          detail: "",
+          child: {},
+        };
+        this.evaObject.fName = "";
+        this.checkF(_id);
+      } else if (t == 2) {
+        if (this.evaObject.sName == "") {
+          this.$message.error("请输入目标");
+          return;
+        }
+        this.eJson[this.fid].child[_id] = {
+          id: _id,
+          name: this.evaObject.sName,
+          detail: "",
+          child: {},
+        };
+        this.evaObject.sName = "";
+        this.checkS(_id);
+      } else if (t == 3) {
+        this.eJson[this.fid].child[this.sid].child[_id] = {
+          id: _id,
+          name: this.evaObject.tName,
+          detail: "",
+          child: [],
+        };
+        this.evaObject.tName = "";
+        this.checkT(_id);
+      }
+      this.eJSONNum++;
+      this.setMindData();
+    },
+    noInput(id, n, t) {
+      if (t == 1) {
+        this.eJson[id].name = n;
+        this.evaObject.isFInput = false;
+      } else if (t == 2) {
+        this.eJson[this.fid].child[id].name = n;
+        this.evaObject.isSInput = false;
+      } else if (t == 3) {
+        this.eJson[this.fid].child[this.sid].child[id].name = n;
+        this.evaObject.isTInput = false;
+      }
+      this.eJSONNum++;
+      this.setMindData();
+    },
     addEName() {
       if (this.eName == "") {
         this.$message.error("请输入目标");
@@ -599,6 +721,7 @@ export default {
         this.tid = id;
       }
     },
+
     updateF(id, n, t) {
       this.eName1 = n;
       this.mid = id;
@@ -757,11 +880,7 @@ export default {
           console.error(err);
         });
     },
-    deleteE(id, uid) {
-      if (this.$route.query.userid != uid) {
-        this.$message.error("不可以删除他人创建的目标!");
-        return;
-      }
+    deleteE(id) {
       let params = {
         eid: id,
       };
@@ -1004,13 +1123,12 @@ export default {
 .e_add_content {
   display: flex;
   width: 100%;
-  overflow: auto;
-  height: 530px;
+  height: 100%;
 }
 .e_add_list {
   background: #fff;
-  height: 500px;
-  width: 210px;
+  height: 100%;
+  width: calc(50% / 3);
   position: relative;
   margin: 15px 10px 0 0;
   flex-shrink: 0;
@@ -1048,6 +1166,20 @@ export default {
   height: calc(100% - 187px);
   overflow: auto;
 }
+.e_add_input {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  justify-content: center;
+  padding: 10px 0;
+}
+.e_add_input > .el-input {
+  width: 200px;
+}
+.e_add_input > .el-button {
+  margin-left: 10px;
+}
 .e_add_list_child {
   width: 100%;
   display: flex;
@@ -1115,9 +1247,10 @@ export default {
 
 .e_add_list_pbox {
   margin: 15px 0 0 0;
-  width: 500px;
+  width: 50%;
   min-width: 500px;
-  height: 500px;
+  height: 100%;
+  min-height: 500px;
 }
 .e_add_list_pbox_title {
   height: 50px;
@@ -1162,4 +1295,24 @@ export default {
 .el-table >>> .even_row {
   background-color: #f1f1f1 !important;
 }
+
+.fullStyle >>> .el-dialog__body {
+  height: calc(100% - 125px) !important;
+  box-sizing: border-box;
+  min-height: 500px;
+}
+
+.fullStyle >>> .el-dialog {
+  width: 100% !important;
+  max-width: 100% !important;
+  height: 100% !important;
+  margin: 0 !important;
+}
+
+.fullStyle {
+  width: 100% !important;
+  max-width: 100% !important;
+  height: 100% !important;
+  margin: 0 auto !important;
+}
 </style>

+ 1 - 0
src/components/pages/inviteLogin/inviteLogin.vue

@@ -177,6 +177,7 @@ export default {
     overflow: auto;
     padding-bottom: 10px;
     box-sizing: border-box;
+    align-content: flex-start;
 }
 
 .i_box_login2 div{

+ 159 - 137
src/components/pages/myReport/components/MyLookComponent/worksDetail3.vue

@@ -1024,10 +1024,10 @@
                 </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].img.length == 0 &&
+                    // worksDetail[sIndex].askInfo.length == 0 &&
+                    // worksDetail[sIndex].answerInfo.length == 0 &&
+                    // worksDetail[sIndex].wpptInfo.length == 0 &&
                     worksDetail[sIndex].chooseInfo.length > 0
                   "
                 >
@@ -1040,7 +1040,7 @@
                     <div
                       class="tool_right_box"
                       v-for="(tItem, tIndex) in worksDetail[sIndex]
-                        .chooseInfo[0].testJson"
+                              .chooseInfo[0].chooseInfo.testJson"
                       :key="tIndex"
                     >
                       <div>
@@ -1057,15 +1057,17 @@
                     </div>
                   </div>
                   <div class="allRightBox">
-                    <span>全部题的正确率:</span
+                    <span>全部题的正确率:</span
                     ><span>{{ checkJson[sIndex].allRight + "%" }}</span>
                   </div>
                 </div>
-                <div v-else>
+                <div v-if="
+                            worksDetail[sIndex].eList.length
+                          ">
                   <div class="ech" style="margin-left: 23px">
                     <img src="../../../../../assets/icon/pj/score.png" alt="" />
                   </div>
-                  <div style="height: 80%">
+                  <div>
                     <div
                       class="score_box"
                       v-for="(item, index) in worksDetail[sIndex].eList"
@@ -1534,6 +1536,7 @@ export default {
           var wordInfo = res.data[12]; //文档作业
           var workEvaList = res.data[13];
           var workJson = {};
+          let checkJson = {}
 
           for (var k = 0; k < res.data[0].length; k++) {
             this.allWorks = res.data[0][k];
@@ -1569,7 +1572,7 @@ export default {
               continue;
             }
 
-            this.checkJson[k] = {};
+            // checkJson[stagetask] = {};
 
             let stagetask = res.data[0][k].stage + "-" + res.data[0][k].task;
             if (!workJson[stagetask]) {
@@ -1592,107 +1595,110 @@ export default {
                 stagetask: stagetask,
                 time: "",
               };
-            }
-            workJson[stagetask].time = res.data[0][k].time;
-            for (var i = 0; i < askInfo.length; i++) {
-              if (
-                res.data[0][k].stage == askInfo[i].stage &&
-                res.data[0][k].task == askInfo[i].task &&
-                res.data[0][k].tool == askInfo[i].tool
-              ) {
-                const element = askInfo[i];
-                let a = JSON.parse(element.content)[0];
-                let e = [];
-                for (var y = 0; y < a.askJson.length; y++) {
-                  if (a.askJson[y].type == "2") {
-                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
-                  } else {
-                    e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
-                  }
-                }
-                a.radio = e;
-                workJson[stagetask].askInfo.push({
-                  askInfo: a,
-                  score: askInfo[i].score
-                    ? JSON.parse(askInfo[i].score).wScore
-                    : askInfo[i].score,
-                });
-                this.checkJson[k].allRight = 0;
-                var isCount = 0;
-                for (var p = 0; p < a.radio.length; p++) {
-                  if (!this.checkJson[k][p]) {
-                    this.checkJson[k][p] = {
-                      checkCount: [],
-                      checkPerson: [],
-                    };
-                  }
-                  if (!this.checkJson[k][p].checkCount.length) {
-                    this.checkJson[k][p].checkCount = [];
-                    let _askItemCount = a.askJson[p].askCount;
-                    for (var aic = 0; aic < _askItemCount; aic++) {
-                      this.checkJson[k][p].checkCount.push(0);
-                    }
-                  }
-                  if (a.radio[p] instanceof Array) {
-                    if (
-                      workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
-                        .sort()
-                        .join(",") == a.radio[p].sort().join(",")
-                    ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
-                    } else {
-                      this.checkJson[k][p].right = 0;
-                      isCount += 0;
-                    }
-                    for (var q = 0; q < a.radio[p].length; q++) {
-                      this.checkJson[k][p].checkPerson[parseInt(a.radio[p][q])]
-                        ? this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p][q])
-                          ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p][q])
-                          ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(a.radio[p][q])]
-                        ? this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p][q])
-                          ]++
-                        : (this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p][q])
-                          ] = 1);
-                    }
-                  } else {
-                    if (
-                      workJson[stagetask].askInfo[0].askInfo.askJson[p]
-                        .answer == a.radio[p]
-                    ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
-                    } else {
-                      this.checkJson[k][p].right = 0;
-                      isCount += 0;
-                    }
-                    if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
-                      this.checkJson[k][p].checkPerson[parseInt(a.radio[p])]
-                        ? this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p])
-                          ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
-                            parseInt(a.radio[p])
-                          ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(a.radio[p])]
-                        ? this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p])
-                          ]++
-                        : (this.checkJson[k][p].checkCount[
-                            parseInt(a.radio[p])
-                          ] = 1);
-                    }
-                  }
-                }
-                this.checkJson[k].allRight = isCount / a.radio.length;
+              checkJson[stagetask] = {
+                stagetask: stagetask,
               }
             }
+            workJson[stagetask].time = res.data[0][k].time;
+            // for (var i = 0; i < askInfo.length; i++) {
+            //   if (
+            //     res.data[0][k].stage == askInfo[i].stage &&
+            //     res.data[0][k].task == askInfo[i].task &&
+            //     res.data[0][k].tool == askInfo[i].tool
+            //   ) {
+            //     const element = askInfo[i];
+            //     let a = JSON.parse(element.content)[0];
+            //     let e = [];
+            //     for (var y = 0; y < a.askJson.length; y++) {
+            //       if (a.askJson[y].type == "2") {
+            //         e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
+            //       } else {
+            //         e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
+            //       }
+            //     }
+            //     a.radio = e;
+            //     workJson[stagetask].askInfo.push({
+            //       askInfo: a,
+            //       score: askInfo[i].score
+            //         ? JSON.parse(askInfo[i].score).wScore
+            //         : askInfo[i].score,
+            //     });
+            //     checkJson[stagetask].allRight = 0;
+            //     var isCount = 0;
+            //     for (var p = 0; p < a.radio.length; p++) {
+            //       if (!checkJson[stagetask][p]) {
+            //         checkJson[stagetask][p] = {
+            //           checkCount: [],
+            //           checkPerson: [],
+            //         };
+            //       }
+            //       if (!checkJson[stagetask][p].checkCount.length) {
+            //         checkJson[stagetask][p].checkCount = [];
+            //         let _askItemCount = a.askJson[p].askCount;
+            //         for (var aic = 0; aic < _askItemCount; aic++) {
+            //           checkJson[stagetask][p].checkCount.push(0);
+            //         }
+            //       }
+            //       if (a.radio[p] instanceof Array) {
+            //         if (
+            //           workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
+            //             .sort()
+            //             .join(",") == a.radio[p].sort().join(",")
+            //         ) {
+            //           checkJson[stagetask][p].right = 100;
+            //           isCount += checkJson[stagetask][p].right;
+            //         } else {
+            //           checkJson[stagetask][p].right = 0;
+            //           isCount += 0;
+            //         }
+            //         for (var q = 0; q < a.radio[p].length; q++) {
+            //           checkJson[stagetask][p].checkPerson[parseInt(a.radio[p][q])]
+            //             ? checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p][q])
+            //               ].push(res.data[0][k].sName)
+            //             : (checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p][q])
+            //               ] = [res.data[0][k].sName]);
+            //           checkJson[stagetask][p].checkCount[parseInt(a.radio[p][q])]
+            //             ? checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p][q])
+            //               ]++
+            //             : (checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p][q])
+            //               ] = 1);
+            //         }
+            //       } else {
+            //         if (
+            //           workJson[stagetask].askInfo[0].askInfo.askJson[p]
+            //             .answer == a.radio[p]
+            //         ) {
+            //           checkJson[stagetask][p].right = 100;
+            //           isCount += checkJson[stagetask][p].right;
+            //         } else {
+            //           checkJson[stagetask][p].right = 0;
+            //           isCount += 0;
+            //         }
+            //         if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
+            //           checkJson[stagetask][p].checkPerson[parseInt(a.radio[p])]
+            //             ? checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p])
+            //               ].push(res.data[0][k].sName)
+            //             : (checkJson[stagetask][p].checkPerson[
+            //                 parseInt(a.radio[p])
+            //               ] = [res.data[0][k].sName]);
+            //           checkJson[stagetask][p].checkCount[parseInt(a.radio[p])]
+            //             ? checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p])
+            //               ]++
+            //             : (checkJson[stagetask][p].checkCount[
+            //                 parseInt(a.radio[p])
+            //               ] = 1);
+            //         }
+            //       }
+            //     }
+            //     checkJson[stagetask].allRight = isCount / a.radio.length;
+            //   }
+            // }
             for (var i = 0; i < chooseInfo.length; i++) {
               if (
                 res.data[0][k].stage == chooseInfo[i].stage &&
@@ -1716,20 +1722,20 @@ export default {
                     ? JSON.parse(chooseInfo[i].score).wScore
                     : chooseInfo[i].score,
                 });
-                this.checkJson[k].allRight = 0;
+                checkJson[stagetask].allRight = 0;
                 var isCount = 0;
                 for (var p = 0; p < t.radio.length; p++) {
-                  if (!this.checkJson[k][p]) {
-                    this.checkJson[k][p] = {
+                  if (!checkJson[stagetask][p]) {
+                    checkJson[stagetask][p] = {
                       checkCount: [],
                       checkPerson: [],
                     };
                   }
-                  if (!this.checkJson[k][p].checkCount.length) {
-                    this.checkJson[k][p].checkCount = [];
+                  if (!checkJson[stagetask][p].checkCount.length) {
+                    checkJson[stagetask][p].checkCount = [];
                     let _askItemCount = t.testJson[p].testItem;
                     for (var aic = 0; aic < _askItemCount; aic++) {
-                      this.checkJson[k][p].checkCount.push(0);
+                      checkJson[stagetask][p].checkCount.push(0);
                     }
                   }
                   if (t.radio[p] instanceof Array) {
@@ -1737,55 +1743,55 @@ export default {
                       t.testJson[p].answer.sort().join(",") ==
                       t.radio[p].sort().join(",")
                     ) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
+                      checkJson[stagetask][p].right = 100;
+                      isCount += checkJson[stagetask][p].right;
                     } else {
-                      this.checkJson[k][p].right = 0;
+                      checkJson[stagetask][p].right = 0;
                       isCount += 0;
                     }
                     for (var q = 0; q < t.radio[p].length; q++) {
-                      this.checkJson[k][p].checkPerson[parseInt(t.radio[p][q])]
-                        ? this.checkJson[k][p].checkPerson[
+                      checkJson[stagetask][p].checkPerson[parseInt(t.radio[p][q])]
+                        ? checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                           ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
+                        : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                           ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(t.radio[p][q])]
-                        ? this.checkJson[k][p].checkCount[
+                      checkJson[stagetask][p].checkCount[parseInt(t.radio[p][q])]
+                        ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p][q])
                           ]++
-                        : (this.checkJson[k][p].checkCount[
+                        : (checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p][q])
                           ] = 1);
                     }
                   } else {
                     if (t.testJson[p].answer == t.radio[p]) {
-                      this.checkJson[k][p].right = 100;
-                      isCount += this.checkJson[k][p].right;
+                      checkJson[stagetask][p].right = 100;
+                      isCount += checkJson[stagetask][p].right;
                     } else {
-                      this.checkJson[k][p].right = 0;
+                      checkJson[stagetask][p].right = 0;
                       isCount += 0;
                     }
                     if (parseInt(t.radio[p]) || parseInt(t.radio[p]) == 0) {
-                      this.checkJson[k][p].checkPerson[parseInt(t.radio[p])]
-                        ? this.checkJson[k][p].checkPerson[
+                      checkJson[stagetask][p].checkPerson[parseInt(t.radio[p])]
+                        ? checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p])
                           ].push(res.data[0][k].sName)
-                        : (this.checkJson[k][p].checkPerson[
+                        : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p])
                           ] = [res.data[0][k].sName]);
-                      this.checkJson[k][p].checkCount[parseInt(t.radio[p])]
-                        ? this.checkJson[k][p].checkCount[
+                      checkJson[stagetask][p].checkCount[parseInt(t.radio[p])]
+                        ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p])
                           ]++
-                        : (this.checkJson[k][p].checkCount[
+                        : (checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p])
                           ] = 1);
                     }
                   }
                 }
-                this.checkJson[k].allRight = isCount / t.radio.length;
+                checkJson[stagetask].allRight = isCount / t.radio.length;
               }
             }
           }
@@ -2005,8 +2011,10 @@ export default {
           //   );
           // });
           let result = [];
+          let checkJsonArray = []
           for (var wi = 0; wi < Object.keys(workJson).length; wi++) {
             result.push(workJson[Object.keys(workJson)[wi]]);
+            checkJsonArray.push(checkJson[Object.keys(checkJson)[wi]])
           }
           var resultNewArray = result.sort(function (x, y) {
             // 以stagetask字段为排序依据
@@ -2021,7 +2029,22 @@ export default {
             // 如果第一个数字相同,则比较第二个数字
             return parseInt(x_parts[1]) - parseInt(y_parts[1]);
           });
+          var checkJsonNewArray = checkJsonArray.sort(function (x, y) {
+            // 以stagetask字段为排序依据
+            var x_parts = x.stagetask.split("-");
+            var y_parts = y.stagetask.split("-");
+
+            // 首先比较第一个数字
+            if (x_parts[0] !== y_parts[0]) {
+              return parseInt(x_parts[0]) - parseInt(y_parts[0]);
+            }
+
+            // 如果第一个数字相同,则比较第二个数字
+            return parseInt(x_parts[1]) - parseInt(y_parts[1]);
+          });
           result = resultNewArray;
+          checkJsonArray = checkJsonNewArray;
+          this.checkJson = checkJsonArray
           for (var l = 0; l < b.length; l++) {
             if (workEvaList.length > 0) {
               for (var p = 0; p < workEvaList.length; p++) {
@@ -2228,14 +2251,12 @@ export default {
     },
     //获取班级列表
     getClass() {
-      this.isLoading = true;
       let params = {
         oid: this.oid,
       };
       this.ajax
         .get(this.$store.state.api + "selectClassBySchool", params)
         .then((res) => {
-          this.isLoading = false;
           this.grade = res.data[0];
         })
         .catch((err) => {
@@ -2311,6 +2332,7 @@ export default {
           this.dyList = dyList;
           this.userAarray = res.data[1];
           this.lookWork();
+          this.getWorks();
         })
         .catch((err) => {
           console.error(err);
@@ -2709,18 +2731,18 @@ export default {
   },
   watch: {
     uid(newValue, oldValue) {
+      this.isLoading = true
       this.getCourseDetail();
       this.getClass();
       this.getGroup();
-      this.getWorks();
       // this.lookWork();
     },
   },
   mounted() {
+    this.isLoading = true
     this.getCourseDetail();
     this.getClass();
     this.getGroup();
-    this.getWorks();
     // this.lookWork();
   },
 };

+ 89 - 208
src/components/pages/student.vue

@@ -1,53 +1,27 @@
 <template>
   <div class="pb_content" style="background: unset">
-    <div
-      class="pb_content_body"
-      style="
+    <div class="pb_content_body" style="
         background: #fff;
         padding: 0px 25px;
         box-sizing: border-box;
         border-radius: 5px;
-      "
-    >
+      ">
       <div class="pb_head">
         <span>学生管理</span>
       </div>
       <div class="student_head">
         <div class="head_left">
-          <el-input
-            v-model="sPhoneUser"
-            class="student_input"
-            placeholder="请输入用户名"
-          ></el-input>
-          <el-select
-            v-model="cid"
-            placeholder="请选择班级"
-            class="student_input"
-            @change="searchStudent"
-          >
+          <el-input v-model="sPhoneUser" class="student_input" placeholder="请输入用户名"></el-input>
+          <el-select v-model="cid" placeholder="请选择班级" class="student_input" @change="searchStudent">
             <el-option label="所有人" value=""></el-option>
-            <el-option
-              v-for="(item, index) in classJuri"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
+            <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
           </el-select>
-          <el-button class="student_button" @click="searchStudent"
-            >查询</el-button
-          >
+          <el-button class="student_button" @click="searchStudent">查询</el-button>
         </div>
         <div class="head_right">
           <el-button @click="addStudent">添加学生</el-button>
-          <el-upload
-            v-show="false"
-            class="upload-demo newCss"
-            :http-request="handleChange"
-            :on-remove="handleRemove"
-            action="#"
-            :file-list="fileListUpload"
-            accept=".xlsx"
-          >
+          <el-upload v-show="false" class="upload-demo newCss" :http-request="handleChange" :on-remove="handleRemove"
+            action="#" :file-list="fileListUpload" accept=".xlsx">
             <el-button size="primary" type="primary">批量添加</el-button>
             <div slot="tip" class="el-upload__tip" style="margin-left: 10px">
               只能上传xlsx文件,且不超过500kb
@@ -60,39 +34,25 @@
     </div>
     <div class="pb_content_body">
       <div class="student_table">
-        <el-table
-          ref="table"
-          :data="tableData"
-          border
-          :height="tableHeight"
-          :fit="true"
-          v-loading="isLoading"
-          style="width: 100%"
-          :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
-          :row-class-name="tableRowClassName"
-        >
+        <el-table ref="table" :data="tableData" border :height="tableHeight" :fit="true" v-loading="isLoading"
+          style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+          :row-class-name="tableRowClassName">
           <el-table-column label="姓名" min-width="10" align="center">
             <template slot-scope="scope">
               <div class="userImg">
                 <div class="tx">
-                  <img
-                    :src="
-                      scope.row.headportrait != null
-                        ? scope.row.headportrait
-                        : tx
-                    "
-                    alt
-                  />
+                  <img :src="scope.row.headportrait != null
+                      ? scope.row.headportrait
+                      : tx
+                    " alt />
                 </div>
-                <div
-                  style="
+                <div style="
                     width: 150px;
                     text-align: left;
                     white-space: nowrap;
                     overflow: hidden;
                     text-overflow: ellipsis;
-                  "
-                >
+                  ">
                   {{ scope.row.name }}
                 </div>
               </div>
@@ -116,41 +76,19 @@
             align="center"
           >
           </el-table-column>-->
-          <el-table-column
-            prop="classname2"
-            label="班级"
-            min-width="15"
-            align="center"
-          >
+          <el-table-column prop="classname2" label="班级" min-width="15" align="center">
           </el-table-column>
           <el-table-column label="操作" width="250px">
             <template slot-scope="scope">
               <div class="btnBox">
-                <el-button
-                  class="de_button"
-                  type="primary"
-                  size="small"
-                  style="
+                <el-button class="de_button" type="primary" size="small" style="
                     width: auto;
                     padding: 5px !important;
                     line-height: 15px;
-                  "
-                  @click="iniPassword(scope.row.userid)"
-                  >初始化密码</el-button
-                >
-                <el-button
-                  class="de_button"
-                  type="primary"
-                  size="small"
-                  @click="updateStudentA(scope.row)"
-                  >修改</el-button
-                >
+                  " @click="iniPassword(scope.row.userid)">初始化密码</el-button>
+                <el-button class="de_button" type="primary" size="small" @click="updateStudentA(scope.row)">修改</el-button>
                 <div class="delete">
-                  <img
-                    src="../../assets/remove.png"
-                    alt
-                    @click="deleteStudent(scope.row.userid, scope.row.state)"
-                  />
+                  <img src="../../assets/remove.png" alt @click="deleteStudent(scope.row.userid, scope.row.state)" />
                 </div>
               </div>
             </template>
@@ -158,23 +96,12 @@
         </el-table>
       </div>
       <div class="student_page">
-        <el-pagination
-          background
-          layout="prev, pager, next"
-          :page-size="10"
-          :total="total"
-          v-if="page"
-          @current-change="handleCurrentChange"
-        ></el-pagination>
+        <el-pagination background layout="prev, pager, next" :page-size="10" :total="total" v-if="page"
+          @current-change="handleCurrentChange"></el-pagination>
       </div>
     </div>
-    <el-dialog
-      :visible.sync="dialogVisible"
-      :append-to-body="true"
-      width="700px"
-      :before-close="handleClose"
-      class="add_student"
-    >
+    <el-dialog :visible.sync="dialogVisible" :append-to-body="true" width="700px" :before-close="handleClose"
+      class="add_student">
       <div slot="title" class="header-title">
         <div class="logoImg">
           <img src="../../assets/logo.png" alt />
@@ -184,15 +111,10 @@
       <el-form>
         <el-form-item label="学生姓名" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生姓名"
-              clearable
-              v-model="sName"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生姓名" clearable v-model="sName" class="add_input"></el-input>
           </span>
         </el-form-item>
-        <el-form-item label="学生学号" :label-width="formLabelWidth">
+        <!-- <el-form-item label="学生学号" :label-width="formLabelWidth">
           <span>
             <el-input
               placeholder="请输入学生学号"
@@ -211,37 +133,18 @@
               class="add_input"
             ></el-input>
           </span>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="学生账号" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生账号"
-              clearable
-              v-model="sMail"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生账号" clearable v-model="sMail" class="add_input"></el-input>
           </span>
         </el-form-item>
         <el-form-item label="所属学校" :label-width="formLabelWidth">
-          <el-input
-            disabled
-            style="width: 300px"
-            v-model="schoolName"
-          ></el-input>
+          <el-input disabled style="width: 300px" v-model="schoolName"></el-input>
         </el-form-item>
         <el-form-item label="班级" :label-width="formLabelWidth">
-          <el-select
-            multiple
-            collapse-tags
-            v-model="sByClass"
-            placeholder="请选择班级"
-          >
-            <el-option
-              v-for="(item, index) in classJuri"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
+          <el-select multiple collapse-tags v-model="sByClass" placeholder="请选择班级">
+            <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
           </el-select>
         </el-form-item>
         <div style="text-align: center; color: #adb3b7">
@@ -252,13 +155,8 @@
         <el-button class="right" @click="insertStudent">确认</el-button>
       </span>
     </el-dialog>
-    <el-dialog
-      :visible.sync="dialogVisibleUpdate"
-      :append-to-body="true"
-      width="700px"
-      :before-close="handleClose"
-      class="add_student"
-    >
+    <el-dialog :visible.sync="dialogVisibleUpdate" :append-to-body="true" width="700px" :before-close="handleClose"
+      class="add_student">
       <div slot="title" class="header-title">
         <div class="logoImg">
           <img src="../../assets/logo.png" alt />
@@ -268,64 +166,30 @@
       <el-form>
         <el-form-item label="学生名称" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生姓名"
-              clearable
-              v-model="userinfo.name"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生姓名" clearable v-model="userinfo.name" class="add_input"></el-input>
           </span>
         </el-form-item>
-        <el-form-item label="学生学号" :label-width="formLabelWidth">
+        <!-- <el-form-item label="学生学号" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生学号"
-              clearable
-              v-model="userinfo.studentid"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生学号" clearable v-model="userinfo.studentid" class="add_input"></el-input>
           </span>
         </el-form-item>
         <el-form-item label="学生手机号" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生手机号"
-              clearable
-              v-model="userinfo.phonenumber"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生手机号" clearable v-model="userinfo.phonenumber" class="add_input"></el-input>
           </span>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="学生账号" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生账号"
-              clearable
-              v-model="userinfo.un"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生账号" clearable v-model="userinfo.un" class="add_input"></el-input>
           </span>
         </el-form-item>
         <el-form-item label="所属学校" :label-width="formLabelWidth">
-          <el-input
-            disabled
-            style="width: 300px"
-            v-model="schoolName"
-          ></el-input>
+          <el-input disabled style="width: 300px" v-model="schoolName"></el-input>
         </el-form-item>
         <el-form-item label="班级" :label-width="formLabelWidth">
-          <el-select
-            multiple
-            collapse-tags
-            v-model="userinfo.classid"
-            placeholder="请选择班级"
-          >
-            <el-option
-              v-for="(item, index) in classJuri"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
+          <el-select multiple collapse-tags v-model="userinfo.classid" placeholder="请选择班级">
+            <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
           </el-select>
         </el-form-item>
         <div style="text-align: center; color: #adb3b7">
@@ -372,10 +236,12 @@ export default {
       org: this.$route.query.org,
       cid: "",
       tx: require("../../assets/avatar.png"),
+      userSuffix:""
     };
   },
   mounted() {
     this.$nextTick(function () {
+      this.getUser()
       this.tableHeight =
         window.innerHeight - this.$refs.table.$el.offsetTop - 200;
       if (this.tableHeight <= 530) {
@@ -393,6 +259,19 @@ export default {
     });
   },
   methods: {
+    getUser() {
+      let params = {
+        userid: this.userid
+      }
+      this.ajax
+        .get(this.$store.state.api + "selectUser", params)
+        .then((res) => {
+          this.userSuffix = res.data[0][0].accountNumber.split("@")[1]
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
     tableRowClassName({ row, rowIndex }) {
       if ((rowIndex + 1) % 2 === 0) {
         return "even_row";
@@ -455,9 +334,11 @@ export default {
         this.$message.error("手机号格式不正确");
         return;
       } else if (
-        !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)
+        // !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)
+        this.sMail === ""
       ) {
-        this.$message.error("邮箱格式不正确");
+        // this.$message.error("邮箱格式不正确");
+        this.$message.error("学生账号不能为空");
         return;
       }
 
@@ -476,7 +357,7 @@ export default {
         //     if (res.data[0].length > 0) {
         //       this.$message.error("此学生手机号码已被注册");
         //     } else {
-        let params = { un: this.sMail };
+        let params = { un: this.sMail + '@' + this.userSuffix };
         this.ajax
           .get(this.$store.state.api + "findMail", params)
           .then((res) => {
@@ -511,7 +392,7 @@ export default {
     add_Student() {
       let params = [
         {
-          username: this.sMail,
+          username: this.sMail + '@' + this.userSuffix,
           userpassword: 123456,
           alias: this.sName,
           oid: this.oid,
@@ -630,7 +511,7 @@ export default {
       if (this.fileTemp) {
         if (
           this.fileTemp.type ==
-            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
+          "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
           this.fileTemp.type == "application/vnd.ms-excel"
         ) {
           this.importCount = 1;
@@ -1104,7 +985,7 @@ export default {
               console.error(err);
             });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     iniPassword(id) {
       this.$confirm("确定" + "初始化" + "此学生的密码吗?", "提示", {
@@ -1131,7 +1012,7 @@ export default {
               console.error(err);
             });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     updateStudentA(res) {
       this.userinfo = JSON.parse(JSON.stringify(res));
@@ -1222,7 +1103,7 @@ export default {
 </script>
 
 <style scoped>
-.pb_head > span:nth-child(2) {
+.pb_head>span:nth-child(2) {
   font-size: 20px;
   margin-left: 5px;
   color: #828282;
@@ -1256,7 +1137,7 @@ export default {
   align-items: baseline;
 }
 
-.student_input >>> .el-input__inner {
+.student_input>>>.el-input__inner {
   height: 30px;
   width: 190px;
   font-size: 13px;
@@ -1273,7 +1154,7 @@ export default {
   line-height: 30px;
 }
 
-.head_right > button:nth-child(1) {
+.head_right>button:nth-child(1) {
   color: #fff;
   background: #2268bc;
   width: 70px;
@@ -1283,7 +1164,7 @@ export default {
   line-height: 30px;
 }
 
-.head_right > button:nth-child(2) {
+.head_right>button:nth-child(2) {
   color: #fff;
   background: #2268bc;
   width: 70px;
@@ -1293,7 +1174,7 @@ export default {
   line-height: 30px;
 }
 
-.head_right > div {
+.head_right>div {
   font-size: 12px;
   line-height: 40px;
   margin-left: 10px;
@@ -1302,16 +1183,16 @@ export default {
   cursor: pointer;
 }
 
-.student_table >>> .el-table--border td {
+.student_table>>>.el-table--border td {
   border-right: 0px !important;
 }
 
-.student_table >>> .el-table,
-.student_table >>> .el-table__body-wrapper {
+.student_table>>>.el-table,
+.student_table>>>.el-table__body-wrapper {
   height: auto !important;
 }
 
-.el-table >>> .even_row {
+.el-table>>>.even_row {
   background-color: #f1f1f1 !important;
 }
 
@@ -1325,30 +1206,30 @@ export default {
   line-height: 25px;
 }
 
-.add_student >>> .el-dialog__header {
+.add_student>>>.el-dialog__header {
   padding: 20px 20px 10px;
   text-align: center;
   background: #32455b;
 }
 
-.add_student >>> .el-dialog__title {
+.add_student>>>.el-dialog__title {
   font-size: 14px !important;
   color: #fff !important;
 }
 
-.add_student >>> .el-dialog__headerbtn {
+.add_student>>>.el-dialog__headerbtn {
   font-size: 20px !important;
 }
 
-.add_student >>> .el-form-item__label {
+.add_student>>>.el-form-item__label {
   margin-left: 65px;
 }
 
-.add_student >>> .el-form-item {
+.add_student>>>.el-form-item {
   display: flex;
 }
 
-.add_student >>> .el-form-item__content {
+.add_student>>>.el-form-item__content {
   margin: 0 !important;
 }
 
@@ -1356,7 +1237,7 @@ export default {
   width: 365px;
 }
 
-.add_student >>> .el-dialog__footer {
+.add_student>>>.el-dialog__footer {
   text-align: center !important;
 }
 
@@ -1375,7 +1256,7 @@ export default {
   width: 30px;
 }
 
-.logoImg > img {
+.logoImg>img {
   width: 100%;
   height: 100%;
 }
@@ -1389,7 +1270,7 @@ export default {
   line-height: 0px !important;
 }
 
-.upload-demo >>> .el-button {
+.upload-demo>>>.el-button {
   color: #fff;
   background: #2268bc;
   width: 70px;
@@ -1418,8 +1299,8 @@ export default {
   margin-left: 10px;
 }
 
-.tx > img,
-.delete > img {
+.tx>img,
+.delete>img {
   width: 100%;
   height: 100%;
 }
@@ -1439,7 +1320,7 @@ export default {
   margin-right: 10px;
 }
 
-.student_input >>> .el-input__icon {
+.student_input>>>.el-input__icon {
   line-height: unset;
 }
 

+ 4 - 4
src/components/pages/student/addCourse.vue

@@ -6824,7 +6824,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -6845,7 +6845,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
             }
@@ -6893,7 +6893,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -6914,7 +6914,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
             }

+ 4 - 4
src/components/pages/studio/addCourse.vue

@@ -7849,7 +7849,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -7870,7 +7870,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
             }
@@ -7918,7 +7918,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -7939,7 +7939,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
             }

+ 76 - 82
src/components/pages/task/addCourse.vue

@@ -5554,7 +5554,7 @@
             </div>
             <div class="a_add_head">
               <div style="display: flex;align-items: center;width: 100%;margin-right: 20px;">
-                {{ index1 + 1 + "、" }}
+                <span style="min-width:fit-content">{{ index1 + 1 + "、" }}</span>
                 <textarea class="a_add_head_input textarea_css"  v-autoHeight="40" v-model="askJson.askJson[index1].askstitle
                         " placeholder="请输入题目" @change="()=>{$forceUpdate()}"></textarea>
               </div>
@@ -5665,7 +5665,7 @@
             <div class="a_add_head">
               <div class="timuUpImg">
                 <div style="display: flex;align-items: center;">
-                  {{ index1 + 1 + "、" }}
+                  <span style="min-width:fit-content">{{ index1 + 1 + "、" }}</span>
                   <!-- <el-input class="a_add_head_input"  v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
                     placeholder="请输入题目">
                   </el-input> -->
@@ -6252,7 +6252,7 @@
             <div class="spanName">选择系统文件</div>
           </div>
           <div>
-            <el-button @click="searchImageValue = '',searchImage()" v-if="isSysPic2 == false">选择网络文件</el-button>
+            <el-button @click="searchImageValue = courseName,resetImage()" v-if="isSysPic2 == false">选择网络文件</el-button>
             <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
               <img :src="cover[0].url" alt="" />
               <div class="deletePic" @click="deleteSysPic">
@@ -6321,13 +6321,17 @@
     <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
       :before-close="handleClose" class="dialog_diy">
       <div>
-        <div class="people_top_right" style="position: relative;">
-          <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue" @keyup.enter.native="searchImage()"></el-input>
-          <div class="search_img" @click="searchImage" style="right: 10px;">
-            <img src="../../../assets/icon/search.png" alt />
+        <div class="people_top_right" style="display: flex;align-items: center;">
+          <div style="position: relative; width: 100%;">
+            <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue" @keyup.enter.native="resetImage()"></el-input>
+            <div class="search_img" @click="resetImage" style="right: 10px;">
+              <img src="../../../assets/icon/search.png" alt />
+            </div>
           </div>
+          <el-button type="primary" size="default" style="margin-left: 10px;" @click="changePicture">换一组</el-button>
         </div>
         <div class="sysPicBox" v-loading="imageloading">
+          <div class="picNone" v-if="!imageList.length">请输入关键词搜索图片</div>
           <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
             <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
           </div>
@@ -6541,12 +6545,12 @@
                   ></el-input>
                 </div>
                 <div @click="addSen(stIndex)">添加</div>
-              </div>
-              <div
+                <div
                 class="remove1"
                 v-if="sentenceList.length > 1"
                 @click="deleteSentence(stIndex)"
               ></div>
+              </div>
             </div>
 
             <div class="cardList">
@@ -6736,7 +6740,7 @@
       title="添加预设时间"
       :visible.sync="dialogVisiblePreTime"
       :append-to-body="true"
-      width="30%"
+      width="450px"
       :before-close="handleClose"
       class="dialog_diy"
     >
@@ -6839,8 +6843,8 @@
           <div class="groupTitle">请设置每组人数</div>
           <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
             style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
-          <el-input-number v-model="groupJson.number" :controls="false" :min="2" :max="10"
-            placeholder="请输入2-10的数字"></el-input-number>
+            <el-input v-model="groupJson.number" style="width:150px"
+            placeholder="请输入2-10的数字" @change="numberPan"></el-input>
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -7113,6 +7117,7 @@ export default {
       sysPicVisible2: false,
       imageloading: false,
       searchImageValue:"",
+      ppage:1,
       imageList: [],
       heightPx:'100%'
     };
@@ -7379,6 +7384,16 @@ export default {
       el.getElementsByTagName("input")[0].click();
     },
     change(val) {
+      if(this.dialogVisible1){
+        this.tdetail = val
+      }else if(this.dialogVisible6){
+        this.AttText.text = val
+      }else if(this.dialogVisible2){
+        this.cTemplate = val
+      }else if(this.dialogVisibleTable){
+        this.tableJson.text = val
+      }
+      this.$forceUpdate();
       console.log(val);
     },
     change2(val) {
@@ -10249,7 +10264,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -10270,7 +10285,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
               for (var z2 = z+1; z2 < aj[i].checkList.length; z2++) {  
@@ -10324,7 +10339,7 @@ export default {
               : "";
             if (element != "") {
               b++;
-              this.$message.error("填写了选项,题目不能为空!");
+              this.$message.error(`请将题目${i+1}填写完整。`);
               return;
             } else {
               a++;
@@ -10345,7 +10360,7 @@ export default {
               if (checkC != "") {
                 index++;
               } else {
-                this.$message.error("选项不能为空!");
+                this.$message.error(`题目${i+1}选项不能为空!`);
                 return;
               }
               for (var z2 = z+1; z2 < aj[i].checkList.length; z2++) {  
@@ -10365,7 +10380,7 @@ export default {
               (aj[i].type == "2" && !aj[i].answer.length) ||
               (aj[i].type == "1" && ((typeof aj[i].answer == 'object' && !aj[i].answer.length) || (aj[i].answer !== 0 && !aj[i].answer)))
             ) {
-              this.$message.error(`题目${i+1},未设置正确选项,请设置。`);
+              this.$message.error(`请将题目${i+1}的正确选项设置完整`);
               return;
             }
           }
@@ -11444,6 +11459,10 @@ export default {
         this.$message.error("请填写卡片内容!");
         return;
       }
+      if(this.sentenceList[i].sentenceTitle.length > 10){
+        this.$message.error("卡片内容字数不能超过10位");
+        return;
+      }
       if(this.sentenceList[i].addSentence.indexOf(this.sentenceList[i].sentenceTitle) !== -1){
         this.$message.error("不能添加重复的卡片内容!");
         return;
@@ -11463,14 +11482,14 @@ export default {
     addSentenceTool() {
       for (var i = 0; i < this.sentenceList.length; i++) {
         if (this.sentenceList[i].rightAnswer.length == 0) {
-          this.$message.error("请将信息填写完整!");
+          this.$message.error(`请将题目${i+1}设置完整。`);
           return;
         }
         if (
           this.sentenceList[i].addSentence.length !=
           this.sentenceList[i].rightAnswer.length
         ) {
-          this.$message.error("请将信息填写完整!");
+          this.$message.error(`请将题目${i+1}设置完整。`);
           return;
         }
       }
@@ -11622,6 +11641,12 @@ export default {
     deleteGroup(i) {
       this.groupJson.group.splice(i, 1);
     },
+    numberPan(){
+      if(/[^\d]/.test(this.groupJson.number) || this.groupJson.number < 2 || this.groupJson.number > 10){ 
+        this.$message.error('请输入2-10的数字')
+        this.groupJson.number = ''
+      }
+    },
     addGroupJson() {
       for (var i = 0; i < this.groupJson.group.length; i++) {
         if (!this.groupJson.group[i].name) {
@@ -11831,76 +11856,34 @@ export default {
     searchImage() {
       var _this = this;
       _this.imageList = []
+      if(!_this.searchImageValue){
+        _this.sysPicVisible2 = true
+        return
+      }
       _this.imageloading = true
-      _this.ajax.post('https://gpt.cocorobo.cn/search', {
-        page: 1,
-        pageSize: 21,
-        keywords: '',
-        category: 'unsplash',
-        isNeedTranslate: true
+      _this.ajax.post('https://gpt.cocorobo.cn/search_image', {
+        page: _this.ppage,
+        pagesize: 9,
+        query: _this.searchImageValue
       }).then(function (response) {
         // console.log(response.data.data);
-        var data = response.data.data;
+        var data = response.data.FunctionResponse.result;
         for (var i = 0; i < data.length; i++) {
-          _this.imageList.push(data[i].small_img_path)
+          _this.imageList.push({url:data[i].image})
         }
         _this.imageloading = false
       }).catch(function (error) {
         console.log(error);
       });
       _this.sysPicVisible2 = true
-
-      // _this.ajax.post('https://gpt.cocorobo.cn/search', {
-      //   page: 1,
-      //   pageSize: 4,
-      //   keywords: '',
-      //   category: 'pexels',
-      //   isNeedTranslate: true
-      // }).then(function (response) {
-      //   // console.log(response.data.data);
-      //   var data = response.data.data;
-      //   for (var i = 0; i < data.length; i++) {
-      //     _this.imageList.push(data[i].small_img_path)
-      //   }
-      //   _this.imageloading = false
-      // }).catch(function (error) {
-      //   console.log(error);
-      // });
-
-      // _this.ajax.post('https://gpt.cocorobo.cn/search', {
-      //   page: 1,
-      //   pageSize: 4,
-      //   keywords: '',
-      //   category: 'pixabay',
-      //   isNeedTranslate: false
-      // }).then(function (response) {
-      //   // console.log(response.data.data);
-      //   var data = response.data.data;
-      //   for (var i = 0; i < data.length; i++) {
-      //     _this.imageList.push(data[i].small_img_path)
-      //   }
-      //   _this.imageloading = false
-      // }).catch(function (error) {
-      //   console.log(error);
-      // });
-
-      // _this.ajax.post('https://gpt.cocorobo.cn/search', {
-      //   page: 1,
-      //   pageSize: 4,
-      //   keywords: '',
-      //   category: '500px',
-      //   isNeedTranslate: true
-      // }).then(function (response) {
-      //   // console.log(response.data.data);
-      //   var data = response.data.data;
-      //   for (var i = 0; i < data.length; i++) {
-      //     _this.imageList.push(data[i].small_img_path)
-      //   }
-      //   _this.imageloading = false
-      // }).catch(function (error) {
-      //   console.log(error);
-      // });
-
+    },
+    changePicture(){
+      this.ppage++
+      this.searchImage()
+    },
+    resetImage(){
+      this.ppage = 1
+      this.searchImage()
     }
   },
   beforeDestroy() {
@@ -12449,6 +12432,7 @@ export default {
   width: 40px;
   height: 50px;
   cursor: pointer;
+  margin-left: 10px;
 }
 
 
@@ -14402,6 +14386,16 @@ ol {
   align-content: flex-start;
   height: 435px;
   overflow: auto;
+  position: relative;
+}
+
+.picNone {
+  position: absolute;
+  left: 50%;
+  top: 45%;
+  transform: translate(-50%, -50%);
+  width:fit-content;
+  color: #9c9c9c;
 }
 
 .sysPic {
@@ -14744,14 +14738,14 @@ ol {
 
 .isCard,
 .isCard1 {
-  width: 140px;
+  width: 200px;
   height: 65px;
   text-align: center;
   line-height: 65px;
-  font-size: 20px;
+  font-size: 14px;
   cursor: pointer;
   background-image: url("../../../assets/icon/conSentences/titleBorder.png");
-  background-size: cover;
+  background-size: 100% 100%;
   position: relative;
   z-index: 99;
 }

+ 7 - 1
src/components/pages/worksReport.vue

@@ -59,19 +59,24 @@
             :uuid="userid"
             :ooid="oid"
             :ccid="cid"
+            :checkid="checkid"
             @getStReport="getOneReport"
           ></StReport>
           <ClassReport
             v-if="wrType == 1"
             :ooid="oid"
+            :checkid="checkid"
             @getCStReport="getSecondReport"
           ></ClassReport>
           <CourseReport
             v-if="wrType == 2"
             :ooid="oid"
+            :checkid="checkid"
             @getCourseReport="getThirdReport"
           ></CourseReport>
-          <EvaReport v-if="wrType == 3" :ooid="oid" @getEvaReport="getFourReport"></EvaReport>
+          <EvaReport v-if="wrType == 3" :ooid="oid" @getEvaReport="getFourReport" 
+          :checkid="checkid"
+          ></EvaReport>
         </div>
       </div>
     </div>
@@ -120,6 +125,7 @@ export default {
       org: this.$route.query.org,
       oid: this.$route.query.oid,
       cid: this.$route.query.classid,
+      checkid: this.$route.query.checkid,
       wrType: 0,
       reportVisible: false,
       reportVisible1: false,

+ 4 - 0
src/components/tools/jsmind.vue

@@ -535,6 +535,10 @@ export default {
 .jsmind_layout .pad-left {
   margin-left: 10px;
 }
+.jsmind_layout >>> jmnode{
+  white-space: break-spaces;
+    word-wrap: break-word;
+}
 .jsmind_layout >>> jmnode.selected {
   background-color: #b9b9b9;
   color: #fff;

+ 4 - 0
src/components/tools/jsmind2.vue

@@ -446,6 +446,10 @@ export default {
 .jsmind_layout .pad-left {
   margin-left: 10px;
 }
+.jsmind_layout >>> jmnode{
+  white-space: break-spaces;
+    word-wrap: break-word;
+}
 .jsmind_layout >>> jmnode.selected {
   background-color: #b9b9b9;
   color: #fff;

+ 28 - 14
src/components/tools/time.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="container">
-    <div class="setters">
+    <div class="setters" :style="{width:cwidth}">
       <div class="minutes-set">
         <button
           data-setter="minutes-plus"
@@ -83,6 +83,7 @@ export default {
       isStarted: false,
       displayString: "",
       isWhole:false,
+      cwidth: '162px'
     };
   },
   methods: {
@@ -196,6 +197,11 @@ export default {
     // this.update(this.wholeTime, this.wholeTime);
     // this.displayTimeLeft(this.wholeTime);
     this.getValue();
+    this.$nextTick(()=>{
+      setTimeout(() => {
+        this.cwidth = document.querySelector(".controlls") ? (document.querySelector(".controlls").offsetWidth + 'px') : 'fit-content'
+      }, 600);
+    })
   },
   beforeDestroy() {
     clearInterval(this.intervalTimer);
@@ -230,31 +236,39 @@ button[data-setter]:hover {
 }
 .setters {
   position: absolute;
-  /* left: 85px;
-  top: 75px; */
-  left: 78px;
-  top: 75px;
+  left: 50%;
+    top: 75px;
+    transform: translateX(-50%);
+    display: flex;
+    justify-content: space-between;
 }
 .minutes-set {
-  float: left;
+  /* float: left; */
   /* margin-right: 28px; */
-  margin-right: 20px;
+  /* margin-right: 20px; */
 }
 .seconds-set {
-  float: right;
+  /* float: right; */
 }
 .controlls {
   position: absolute;
-  left: 70px;
   top: 105px;
-  text-align: center;
-  width: 170px;
+    text-align: center;
+    min-width: fit-content;
+    width: fit-content;
+    left: 50%;
+    transform: translateX(-50%);
 }
 .display-remain-time {
   font-family: "Roboto";
-  font-weight: 100;
-  font-size: 65px;
-  color: #409eff;
+    font-weight: 100;
+    font-size: 66px;
+    color: #409eff;
+    display: flex;
+    flex-wrap: nowrap;
+    min-width: fit-content;
+    justify-content: center;
+    white-space: nowrap;
 }
 #pause {
   outline: none;

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