Browse Source

Merge branch 'beta' into HK

lsc 2 years ago
parent
commit
e59a8526a9
100 changed files with 10648 additions and 2483 deletions
  1. 4 0
      dist/index.html
  2. 0 0
      dist/static/css/app.33f564a7527b2c5b2b008bcff132a2cf.css
  3. 0 0
      dist/static/css/app.33f564a7527b2c5b2b008bcff132a2cf.css.map
  4. BIN
      dist/static/img/clickNo.b60abf0.png
  5. BIN
      dist/static/img/formulaEdi.b6fd710.png
  6. BIN
      dist/static/img/molStr.a170f76.png
  7. BIN
      dist/static/img/networkPanel.f86c203.png
  8. BIN
      dist/static/img/pickPeople.bcaffba.png
  9. BIN
      dist/static/img/timeAxis.62ad5c1.png
  10. 0 0
      dist/static/js/app.5d0a2836b148a2e65bb9.js
  11. 1 0
      dist/static/js/app.5d0a2836b148a2e65bb9.js.map
  12. 0 0
      dist/static/js/app.78c4c72cbb5a4ccbd0cc.js.map
  13. 0 0
      dist/static/js/manifest.f583576dfec9dfc9a295.js.map
  14. 0 0
      dist/static/js/vendor.1b8e037bd3fbbd358d74.js
  15. 1 0
      dist/static/js/vendor.1b8e037bd3fbbd358d74.js.map
  16. 0 0
      dist/static/js/vendor.47326b7cf726c651fd28.js
  17. 0 0
      dist/static/js/vendor.47326b7cf726c651fd28.js.map
  18. 4 0
      src/App.vue
  19. 54 1
      src/assets/css/button.css
  20. BIN
      src/assets/icon/conSentences/clickNo.png
  21. BIN
      src/assets/icon/edit-icon.png
  22. BIN
      src/assets/icon/firstToolList/pickPeople.png
  23. BIN
      src/assets/icon/fourthToolList/interVideo.png
  24. 0 0
      src/assets/icon/fourthToolList/interVideo2.png
  25. BIN
      src/assets/icon/new/edit_u.png
  26. BIN
      src/assets/icon/new/template.png
  27. BIN
      src/assets/icon/new/template_none.png
  28. BIN
      src/assets/icon/new/u_picture.png
  29. BIN
      src/assets/icon/new/u_source.png
  30. BIN
      src/assets/icon/new/upload.png
  31. BIN
      src/assets/icon/secondToolList/formulaEdi.png
  32. BIN
      src/assets/icon/secondToolList/molStr.png
  33. BIN
      src/assets/icon/secondToolList/networkPanel.png
  34. 0 0
      src/assets/icon/secondToolList/networkPanel2.png
  35. BIN
      src/assets/icon/secondToolList/timeAxis.png
  36. 4 2
      src/common/axios.config.js
  37. 1 1
      src/components/pages/CaseDesignS.vue
  38. 541 409
      src/components/pages/addCourse.vue
  39. 5 5
      src/components/pages/addCourseGM.vue
  40. 1 1
      src/components/pages/class.vue
  41. 5 5
      src/components/pages/components/classStudentComponents/worksDetail3.vue
  42. 2 2
      src/components/pages/components/report.vue
  43. 8 8
      src/components/pages/components/studentWorksDetail.vue
  44. 8 8
      src/components/pages/components/worksDetail2.vue
  45. 5 5
      src/components/pages/components/worksDetail3.vue
  46. 110 13
      src/components/pages/course.vue
  47. 23 9
      src/components/pages/data.vue
  48. 104 0
      src/components/pages/dataBoard/course/chartList/cateRank.vue
  49. 126 0
      src/components/pages/dataBoard/course/chartList/courseAna.vue
  50. 233 0
      src/components/pages/dataBoard/course/chartList/courseTime.vue
  51. 141 0
      src/components/pages/dataBoard/course/chartList/teaFre.vue
  52. 122 0
      src/components/pages/dataBoard/course/chartList/toolUse.vue
  53. 146 0
      src/components/pages/dataBoard/course/chartList/workNum.vue
  54. 139 0
      src/components/pages/dataBoard/course/chartList/workTime.vue
  55. 731 0
      src/components/pages/dataBoard/course/index.vue
  56. 135 0
      src/components/pages/dataBoard/index.vue
  57. 91 0
      src/components/pages/dataBoard/school/cateRank/index.vue
  58. 137 0
      src/components/pages/dataBoard/school/courseInfo/index.vue
  59. 894 0
      src/components/pages/dataBoard/school/index.vue
  60. 153 0
      src/components/pages/dataBoard/school/loginCount/index.vue
  61. 202 0
      src/components/pages/dataBoard/school/loginTime/index.vue
  62. 146 0
      src/components/pages/dataBoard/school/studentInfo/index.vue
  63. 238 0
      src/components/pages/dataBoard/school/teacherInfo/index.vue
  64. 589 0
      src/components/pages/dataBoard/student/index.vue
  65. 135 0
      src/components/pages/dataBoard/student/loginCount/index.vue
  66. 92 0
      src/components/pages/dataBoard/student/loginTime/index.vue
  67. 103 0
      src/components/pages/dataBoard/student/stuAct/index.vue
  68. 107 0
      src/components/pages/dataBoard/student/studentInfo/index.vue
  69. 146 0
      src/components/pages/dataBoard/student/studentInfo2/index.vue
  70. 109 0
      src/components/pages/dataBoard/teacher/chartList/funPlot.vue
  71. 71 0
      src/components/pages/dataBoard/teacher/chartList/teaAct.vue
  72. 228 0
      src/components/pages/dataBoard/teacher/chartList/teaData.vue
  73. 138 0
      src/components/pages/dataBoard/teacher/chartList/teaFre.vue
  74. 142 0
      src/components/pages/dataBoard/teacher/chartList/workNum.vue
  75. 95 0
      src/components/pages/dataBoard/teacher/chartList/workTime.vue
  76. 666 0
      src/components/pages/dataBoard/teacher/index.vue
  77. 346 126
      src/components/pages/easy/addCourse.vue
  78. 229 136
      src/components/pages/evaluation.vue
  79. 1339 1116
      src/components/pages/grade/index.vue
  80. 1 1
      src/components/pages/liveRoom.vue
  81. 1 1
      src/components/pages/liveRoomKQ.vue
  82. 5 5
      src/components/pages/myReport/components/MyLookComponent/worksDetail3.vue
  83. 6 4
      src/components/pages/scourse.vue
  84. 182 470
      src/components/pages/student/addCourse.vue
  85. 1 1
      src/components/pages/student/checkCourse.vue
  86. 5 3
      src/components/pages/student/course.vue
  87. 105 8
      src/components/pages/studio/addCourse.vue
  88. 10 4
      src/components/pages/studio/course.vue
  89. 315 131
      src/components/pages/task/addCourse.vue
  90. 18 5
      src/components/pages/teacherSource/dialog.vue
  91. 2 2
      src/components/pages/teacherSource/index.vue
  92. 1 1
      src/components/pages/tencent/student.vue
  93. 0 0
      src/components/tools/hevue-img-preview/LICENSE
  94. 133 0
      src/components/tools/hevue-img-preview/README.md
  95. 131 0
      src/components/tools/hevue-img-preview/css/default.css
  96. 34 0
      src/components/tools/hevue-img-preview/css/theme-dark.css
  97. 41 0
      src/components/tools/hevue-img-preview/css/theme-light.css
  98. 536 0
      src/components/tools/hevue-img-preview/hevue-img-preview.vue
  99. 71 0
      src/components/tools/hevue-img-preview/iconfont/iconfont.css
  100. BIN
      src/components/tools/hevue-img-preview/iconfont/iconfont.ttf

+ 4 - 0
dist/index.html

@@ -25,7 +25,11 @@
       height: 100%;
       height: 100%;
       width: 100%;
       width: 100%;
       background: #e6eaf0;
       background: #e6eaf0;
+<<<<<<< HEAD
     }</style><link href=./static/css/app.fc27945d52119b78bb0a2fcf5b0c04bd.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.47326b7cf726c651fd28.js></script><script type=text/javascript src=./static/js/app.78c4c72cbb5a4ccbd0cc.js></script></body></html><script>function stopSafari() {
     }</style><link href=./static/css/app.fc27945d52119b78bb0a2fcf5b0c04bd.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.47326b7cf726c651fd28.js></script><script type=text/javascript src=./static/js/app.78c4c72cbb5a4ccbd0cc.js></script></body></html><script>function stopSafari() {
+=======
+    }</style><link href=./static/css/app.33f564a7527b2c5b2b008bcff132a2cf.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.5d0a2836b148a2e65bb9.js></script></body></html><script>function stopSafari() {
+>>>>>>> beta
     //阻止safari浏览器双击放大功能
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {
     document.documentElement.addEventListener("touchstart", function (event) {

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


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


BIN
dist/static/img/clickNo.b60abf0.png


BIN
dist/static/img/formulaEdi.b6fd710.png


BIN
dist/static/img/molStr.a170f76.png


BIN
dist/static/img/networkPanel.f86c203.png


BIN
dist/static/img/pickPeople.bcaffba.png


BIN
dist/static/img/timeAxis.62ad5c1.png


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


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


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


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


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.1b8e037bd3fbbd358d74.js


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


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.47326b7cf726c651fd28.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.47326b7cf726c651fd28.js.map


+ 4 - 0
src/App.vue

@@ -410,4 +410,8 @@ html::-webkit-scrollbar-thumb {
 .getOverView{
 .getOverView{
   overflow-x: auto;
   overflow-x: auto;
 }
 }
+
+.showtip{
+  z-index: 999999999 !important;
+}
 </style>
 </style>

+ 54 - 1
src/assets/css/button.css

@@ -72,7 +72,8 @@
 }
 }
 
 
 .c_pub_button_return:hover {
 .c_pub_button_return:hover {
-  background-color: #e1e5ea !important;
+  /* background-color: #e1e5ea !important; */
+  background-color: #dbdbdb !important;
 }
 }
 
 
 .c_pub_button_return + .c_pub_button_return {
 .c_pub_button_return + .c_pub_button_return {
@@ -163,3 +164,55 @@
 .pub_btn_delete_img::before {
 .pub_btn_delete_img::before {
   background-image: url(../icon/new/delete_u.png);
   background-image: url(../icon/new/delete_u.png);
 }
 }
+
+.r_pub_button_retrun {
+  color: #3681fc;
+  font-size: 14px;
+  cursor: pointer;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.r_pub_button_retrun::before {
+  content: "";
+  width: 14px;
+  height: 14px;
+  min-width: 14px;
+  min-height: 14px;
+  background-size: 100% 100%;
+  display: block;
+  margin-right: 7px;
+  background-image: url(../icon/new/icon_return.png);
+}
+
+.r_pub_button_course {
+  color: #fff;
+  background-color: #466b99;
+  font-size: 16px;
+  font-weight: 500;
+  border-radius: 4px;
+  box-sizing: border-box;
+  border: none;
+  cursor: pointer;
+  transition: all 0.2s ease-in-out;
+  padding: 12px 20px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  line-height: 1;
+  position: relative;
+}
+
+
+.r_pub_button_course::before {
+  content: "";
+  width: 14px;
+  height: 14px;
+  min-width: 14px;
+  min-height: 14px;
+  background-size: 100% 100%;
+  display: block;
+  margin-right: 7px;
+  background-image: url(../icon/new/upload.png);
+}

BIN
src/assets/icon/conSentences/clickNo.png


BIN
src/assets/icon/edit-icon.png


BIN
src/assets/icon/firstToolList/pickPeople.png


BIN
src/assets/icon/fourthToolList/interVideo.png


+ 0 - 0
dist/static/img/interVideo.384a822.png → src/assets/icon/fourthToolList/interVideo2.png


BIN
src/assets/icon/new/edit_u.png


BIN
src/assets/icon/new/template.png


BIN
src/assets/icon/new/template_none.png


BIN
src/assets/icon/new/u_picture.png


BIN
src/assets/icon/new/u_source.png


BIN
src/assets/icon/new/upload.png


BIN
src/assets/icon/secondToolList/formulaEdi.png


BIN
src/assets/icon/secondToolList/molStr.png


BIN
src/assets/icon/secondToolList/networkPanel.png


+ 0 - 0
dist/static/img/networkPanel.e06ca1d.png → src/assets/icon/secondToolList/networkPanel2.png


BIN
src/assets/icon/secondToolList/timeAxis.png


+ 4 - 2
src/common/axios.config.js

@@ -1,6 +1,6 @@
 import axios from "axios"
 import axios from "axios"
 import qs from "qs"
 import qs from "qs"
-axios.defaults.timeout = 30000   //响应时间
+axios.defaults.timeout = 90000   //响应时间
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';        //配置请求头
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';        //配置请求头
 axios.defaults.baseURL = process.env.NODE_HOST;   //配置接口地址
 axios.defaults.baseURL = process.env.NODE_HOST;   //配置接口地址
 console.log(process.env)
 console.log(process.env)
@@ -22,7 +22,9 @@ axios.interceptors.request.use((config) => {
     // } else if (config.method === 'post') {
     // } else if (config.method === 'post') {
     //     config.data = qs.stringify(config.data)//序列化post 参数
     //     config.data = qs.stringify(config.data)//序列化post 参数
     // }
     // }
-    if (config.data && config.data[0].post == '1' && config.method === 'post') {
+    if(config.url === 'https://gpt.cocorobo.cn/search') {
+        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 参数
         config.data = 'mode=' + (Object.values(config.data[0]).join(','))//序列化post 参数
     } else if(config.method === 'post') {
     } else if(config.method === 'post') {
         config.data = qs.stringify(config.data)//序列化post 参数
         config.data = qs.stringify(config.data)//序列化post 参数

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

@@ -737,7 +737,7 @@ export default {
             } else if (_tool[tool].tool == 6) {
             } else if (_tool[tool].tool == 6) {
               chapterHTML += `<h4>步骤${tool + 1}:协同文档</h4>`
               chapterHTML += `<h4>步骤${tool + 1}:协同文档</h4>`
             } else if (_tool[tool].tool == 15) {
             } else if (_tool[tool].tool == 15) {
-              chapterHTML += `<h4>步骤${tool + 1}:问答工具</h4>`
+              chapterHTML += `<h4>步骤${tool + 1}:问答</h4>`
             } else if (_tool[tool].tool == 53) {
             } else if (_tool[tool].tool == 53) {
               chapterHTML += `<h4>步骤${tool + 1}:文件上传</h4>`
               chapterHTML += `<h4>步骤${tool + 1}:文件上传</h4>`
             } else if (_tool[tool].tool == 54) {
             } else if (_tool[tool].tool == 54) {

File diff suppressed because it is too large
+ 541 - 409
src/components/pages/addCourse.vue


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

@@ -1032,7 +1032,7 @@
                             <div class="tool">
                             <div class="tool">
                               <div class="whiteBIcon" @click="openTools(itemTaskIndex, 15, toolIndex)">
                               <div class="whiteBIcon" @click="openTools(itemTaskIndex, 15, toolIndex)">
                                 <img src="../../assets/icon/thirdToolList/answer.png" alt />
                                 <img src="../../assets/icon/thirdToolList/answer.png" alt />
-                                <div style="margin: 5px 0">问答工具</div>
+                                <div style="margin: 5px 0">问答</div>
                               </div>
                               </div>
                               <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
                               <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
                                 <img src="../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(15) == -1" />
                                 <img src="../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(15) == -1" />
@@ -1071,7 +1071,7 @@
                                   src="../../assets/icon/thirdToolList/select.png"
                                   src="../../assets/icon/thirdToolList/select.png"
                                   alt
                                   alt
                                 />
                                 />
-                                <div style="margin: 5px 0">选择填空</div>
+                                <div style="margin: 5px 0">选择匹配</div>
                               </div>
                               </div>
                               <div
                               <div
                                 class="check"
                                 class="check"
@@ -1154,7 +1154,7 @@
                             <div class="tool">
                             <div class="tool">
                               <div class="whiteBIcon" @click="addTools(23, itemTaskIndex, toolIndex)">
                               <div class="whiteBIcon" @click="addTools(23, itemTaskIndex, toolIndex)">
                                 <img src="../../assets/icon/fourthToolList/Pythonprogram.png" alt />
                                 <img src="../../assets/icon/fourthToolList/Pythonprogram.png" alt />
-                                <div style="margin: 5px 0">Python</div>
+                                <div style="margin: 5px 0">AI Python</div>
                               </div>
                               </div>
                               <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
                               <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
                                 <img src="../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(23) == -1" />
                                 <img src="../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(23) == -1" />
@@ -1165,7 +1165,7 @@
                             <div class="tool">
                             <div class="tool">
                               <div class="whiteBIcon" @click="addTools(24, itemTaskIndex, toolIndex)">
                               <div class="whiteBIcon" @click="addTools(24, itemTaskIndex, toolIndex)">
                                 <img src="../../assets/icon/fourthToolList/AIprogram.png" alt />
                                 <img src="../../assets/icon/fourthToolList/AIprogram.png" alt />
-                                <div style="margin: 5px 0">AI平台</div>
+                                <div style="margin: 5px 0">AI Blockly</div>
                               </div>
                               </div>
                               <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
                               <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
                                 <img src="../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(24) == -1" />
                                 <img src="../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(24) == -1" />
@@ -1945,7 +1945,7 @@
         <el-button type="primary" class="confirm_button">确 定</el-button>
         <el-button type="primary" class="confirm_button">确 定</el-button>
       </span>
       </span>
     </el-dialog>
     </el-dialog>
-    <el-dialog title="选择填空" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px"
+    <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px"
       :before-close="handleClose" class="dialog_diy dialog_diy3">
       :before-close="handleClose" class="dialog_diy dialog_diy3">
       <div v-if="selectJson">
       <div v-if="selectJson">
         <div class="select_box1" v-if="selectSteps == 1">
         <div class="select_box1" v-if="selectSteps == 1">

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

@@ -40,7 +40,7 @@
             <template slot-scope="scope">
             <template slot-scope="scope">
               <el-button type="primary" size="small" @click="getStudent(scope.row.id)">查看学生</el-button>
               <el-button type="primary" size="small" @click="getStudent(scope.row.id)">查看学生</el-button>
               <el-button type="primary" size="small" @click="updateG(scope.row.pid, scope.row.id)">修改年级</el-button>
               <el-button type="primary" size="small" @click="updateG(scope.row.pid, scope.row.id)">修改年级</el-button>
-              <el-button type="primary" size="small" @click="openUpdate(scope.row.id, scope.row.name)">修改</el-button>
+              <el-button type="primary" size="small" @click="openUpdate(scope.row.id, scope.row.name)">修改名称</el-button>
               <el-button type="primary" size="small" @click="deleteClass(scope.row.id)">删除</el-button>
               <el-button type="primary" size="small" @click="deleteClass(scope.row.id)">删除</el-button>
             </template>
             </template>
           </el-table-column>
           </el-table-column>

+ 5 - 5
src/components/pages/components/classStudentComponents/worksDetail3.vue

@@ -202,7 +202,7 @@
                         margin-bottom: 10px;
                         margin-bottom: 10px;
                       "
                       "
                     >
                     >
-                      <div style="font-size: 16px">问答工具</div>
+                      <div style="font-size: 16px">问答</div>
                     </div>
                     </div>
                     <div class="answerbox">
                     <div class="answerbox">
                       <div style="min-width: 80px">问答标题</div>
                       <div style="min-width: 80px">问答标题</div>
@@ -624,7 +624,7 @@
                         flex-wrap: wrap;
                         flex-wrap: wrap;
                       "
                       "
                     >
                     >
-                      <div style="font-size: 16px">选择填空工具</div>
+                      <div style="font-size: 16px">选择匹配工具</div>
                     </div>
                     </div>
                     <div class="select_box2_box">
                     <div class="select_box2_box">
                       <div class="select_box2_img">
                       <div class="select_box2_img">
@@ -737,7 +737,7 @@
                           flex-wrap: wrap;
                           flex-wrap: wrap;
                         "
                         "
                       >
                       >
-                        <div style="font-size: 16px">连词成句工具</div>
+                        <div style="font-size: 16px">排序工具</div>
                       </div>
                       </div>
                       <div
                       <div
                         v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo"
                         v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo"
@@ -1528,8 +1528,8 @@ export default {
           var pptInfo = res.data[5];
           var pptInfo = res.data[5];
           var chooseInfo = res.data[6];
           var chooseInfo = res.data[6];
           var pjInfo = res.data[7]; //个人评价作业
           var pjInfo = res.data[7]; //个人评价作业
-          var xztkInfo = res.data[8]; //选择填空作业
-          var lccjInfo = res.data[9]; //连词成句作业
+          var xztkInfo = res.data[8]; //选择匹配作业
+          var lccjInfo = res.data[9]; //排序作业
           var bgInfo = res.data[10]; //表格作业
           var bgInfo = res.data[10]; //表格作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var wordInfo = res.data[12]; //文档作业
           var wordInfo = res.data[12]; //文档作业

+ 2 - 2
src/components/pages/components/report.vue

@@ -120,8 +120,8 @@ export default {
           this.wordList = res.data[5];
           this.wordList = res.data[5];
           this.chooseInfo = res.data[6];
           this.chooseInfo = res.data[6];
           this.pjInfo = res.data[7]; //个人评价作业
           this.pjInfo = res.data[7]; //个人评价作业
-          this.xztkInfo = res.data[8]; //选择填空作业
-          this.lccjInfo = res.data[9]; //连词成句作业
+          this.xztkInfo = res.data[8]; //选择匹配作业
+          this.lccjInfo = res.data[9]; //排序作业
           this.bgInfo = res.data[10]; //表格作业
           this.bgInfo = res.data[10]; //表格作业
           this.cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           this.cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           this.wordInfo = res.data[12]; //文档作业
           this.wordInfo = res.data[12]; //文档作业

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

@@ -437,7 +437,7 @@
                               margin-bottom: 10px;
                               margin-bottom: 10px;
                             "
                             "
                           >
                           >
-                            <div style="font-size: 16px">问答工具</div>
+                            <div style="font-size: 16px">问答</div>
                           </div>
                           </div>
                           <div class="answerbox">
                           <div class="answerbox">
                             <div style="min-width: 80px">问答标题</div>
                             <div style="min-width: 80px">问答标题</div>
@@ -878,7 +878,7 @@
                               flex-wrap: wrap;
                               flex-wrap: wrap;
                             "
                             "
                           >
                           >
-                            <div style="font-size: 16px">选择填空工具</div>
+                            <div style="font-size: 16px">选择匹配工具</div>
                           </div>
                           </div>
                           <div class="select_box2_box">
                           <div class="select_box2_box">
                             <div class="select_box2_img">
                             <div class="select_box2_img">
@@ -995,7 +995,7 @@
                                 flex-wrap: wrap;
                                 flex-wrap: wrap;
                               "
                               "
                             >
                             >
-                              <div style="font-size: 16px">连词成句工具</div>
+                              <div style="font-size: 16px">排序工具</div>
                             </div>
                             </div>
                             <div
                             <div
                               v-for="(st, stIndex) in worksDetail[sIndex]
                               v-for="(st, stIndex) in worksDetail[sIndex]
@@ -1902,8 +1902,8 @@ export default {
           var pptInfo = res.data[5];
           var pptInfo = res.data[5];
           var chooseInfo = res.data[6];
           var chooseInfo = res.data[6];
           var pjInfo = res.data[7]; //个人评价作业
           var pjInfo = res.data[7]; //个人评价作业
-          var xztkInfo = res.data[8]; //选择填空作业
-          var lccjInfo = res.data[9]; //连词成句作业
+          var xztkInfo = res.data[8]; //选择匹配作业
+          var lccjInfo = res.data[9]; //排序作业
           var bgInfo = res.data[10]; //表格作业
           var bgInfo = res.data[10]; //表格作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var wordInfo = res.data[12]; //文档作业
           var wordInfo = res.data[12]; //文档作业
@@ -2592,8 +2592,8 @@ export default {
           var linkInfo = res.data[5];
           var linkInfo = res.data[5];
           var chooseInfo = res.data[6];
           var chooseInfo = res.data[6];
           var pjInfo = res.data[7]; //个人评价作业
           var pjInfo = res.data[7]; //个人评价作业
-          var xztkInfo = res.data[8]; //选择填空作业
-          var lccjInfo = res.data[9]; //连词成句作业
+          var xztkInfo = res.data[8]; //选择匹配作业
+          var lccjInfo = res.data[9]; //排序作业
           var bgInfo = res.data[10]; //表格作业
           var bgInfo = res.data[10]; //表格作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var wordInfo = res.data[12]; //文档作业
           var wordInfo = res.data[12]; //文档作业
@@ -3081,7 +3081,7 @@ export default {
 
 
           var _lccjInfo = "";
           var _lccjInfo = "";
           if (workJson.lccjInfo.length > 0) {
           if (workJson.lccjInfo.length > 0) {
-            var _lccjInfo = "<h3>连词成句<h3>";
+            var _lccjInfo = "<h3>排序<h3>";
             for (var i = 0; i < workJson.lccjInfo.length; i++) {
             for (var i = 0; i < workJson.lccjInfo.length; i++) {
               var _div = document.createElement("div");
               var _div = document.createElement("div");
               _div.innerHTML = `<h4>第一题${workJson.lccjInfo[i].lccjInfo.sentenceTitle}</h4> `;
               _div.innerHTML = `<h4>第一题${workJson.lccjInfo[i].lccjInfo.sentenceTitle}</h4> `;

+ 8 - 8
src/components/pages/components/worksDetail2.vue

@@ -440,7 +440,7 @@
                               margin-bottom: 10px;
                               margin-bottom: 10px;
                             "
                             "
                           >
                           >
-                            <div style="font-size: 16px">问答工具</div>
+                            <div style="font-size: 16px">问答</div>
                           </div>
                           </div>
                           <div class="answerbox">
                           <div class="answerbox">
                             <div style="min-width: 80px">问答标题</div>
                             <div style="min-width: 80px">问答标题</div>
@@ -881,7 +881,7 @@
                               flex-wrap: wrap;
                               flex-wrap: wrap;
                             "
                             "
                           >
                           >
-                            <div style="font-size: 16px">选择填空工具</div>
+                            <div style="font-size: 16px">选择匹配工具</div>
                           </div>
                           </div>
                           <div class="select_box2_box">
                           <div class="select_box2_box">
                             <div class="select_box2_img">
                             <div class="select_box2_img">
@@ -998,7 +998,7 @@
                                 flex-wrap: wrap;
                                 flex-wrap: wrap;
                               "
                               "
                             >
                             >
-                              <div style="font-size: 16px">连词成句工具</div>
+                              <div style="font-size: 16px">排序工具</div>
                             </div>
                             </div>
                             <div
                             <div
                               v-for="(st, stIndex) in worksDetail[sIndex]
                               v-for="(st, stIndex) in worksDetail[sIndex]
@@ -1906,8 +1906,8 @@ export default {
           var pptInfo = res.data[5];
           var pptInfo = res.data[5];
           var chooseInfo = res.data[6];
           var chooseInfo = res.data[6];
           var pjInfo = res.data[7]; //个人评价作业
           var pjInfo = res.data[7]; //个人评价作业
-          var xztkInfo = res.data[8]; //选择填空作业
-          var lccjInfo = res.data[9]; //连词成句作业
+          var xztkInfo = res.data[8]; //选择匹配作业
+          var lccjInfo = res.data[9]; //排序作业
           var bgInfo = res.data[10]; //表格作业
           var bgInfo = res.data[10]; //表格作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var wordInfo = res.data[12]; //文档作业
           var wordInfo = res.data[12]; //文档作业
@@ -2891,8 +2891,8 @@ export default {
           var linkInfo = res.data[5];
           var linkInfo = res.data[5];
           var chooseInfo = res.data[6];
           var chooseInfo = res.data[6];
           var pjInfo = res.data[7]; //个人评价作业
           var pjInfo = res.data[7]; //个人评价作业
-          var xztkInfo = res.data[8]; //选择填空作业
-          var lccjInfo = res.data[9]; //连词成句作业
+          var xztkInfo = res.data[8]; //选择匹配作业
+          var lccjInfo = res.data[9]; //排序作业
           var bgInfo = res.data[10]; //表格作业
           var bgInfo = res.data[10]; //表格作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var wordInfo = res.data[12]; //文档作业
           var wordInfo = res.data[12]; //文档作业
@@ -3380,7 +3380,7 @@ export default {
 
 
           var _lccjInfo = "";
           var _lccjInfo = "";
           if (workJson.lccjInfo.length > 0) {
           if (workJson.lccjInfo.length > 0) {
-            var _lccjInfo = "<h3>连词成句<h3>";
+            var _lccjInfo = "<h3>排序<h3>";
             for (var i = 0; i < workJson.lccjInfo.length; i++) {
             for (var i = 0; i < workJson.lccjInfo.length; i++) {
               var _div = document.createElement("div");
               var _div = document.createElement("div");
               _div.innerHTML = `<h4>第一题${workJson.lccjInfo[i].lccjInfo.sentenceTitle}</h4> `;
               _div.innerHTML = `<h4>第一题${workJson.lccjInfo[i].lccjInfo.sentenceTitle}</h4> `;

+ 5 - 5
src/components/pages/components/worksDetail3.vue

@@ -202,7 +202,7 @@
                         margin-bottom: 10px;
                         margin-bottom: 10px;
                       "
                       "
                     >
                     >
-                      <div style="font-size: 16px">问答工具</div>
+                      <div style="font-size: 16px">问答</div>
                     </div>
                     </div>
                     <div class="answerbox">
                     <div class="answerbox">
                       <div style="min-width: 80px">问答标题</div>
                       <div style="min-width: 80px">问答标题</div>
@@ -624,7 +624,7 @@
                         flex-wrap: wrap;
                         flex-wrap: wrap;
                       "
                       "
                     >
                     >
-                      <div style="font-size: 16px">选择填空工具</div>
+                      <div style="font-size: 16px">选择匹配工具</div>
                     </div>
                     </div>
                     <div class="select_box2_box">
                     <div class="select_box2_box">
                       <div class="select_box2_img">
                       <div class="select_box2_img">
@@ -737,7 +737,7 @@
                           flex-wrap: wrap;
                           flex-wrap: wrap;
                         "
                         "
                       >
                       >
-                        <div style="font-size: 16px">连词成句工具</div>
+                        <div style="font-size: 16px">排序工具</div>
                       </div>
                       </div>
                       <div
                       <div
                         v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo"
                         v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo"
@@ -1528,8 +1528,8 @@ export default {
           var pptInfo = res.data[5];
           var pptInfo = res.data[5];
           var chooseInfo = res.data[6];
           var chooseInfo = res.data[6];
           var pjInfo = res.data[7]; //个人评价作业
           var pjInfo = res.data[7]; //个人评价作业
-          var xztkInfo = res.data[8]; //选择填空作业
-          var lccjInfo = res.data[9]; //连词成句作业
+          var xztkInfo = res.data[8]; //选择匹配作业
+          var lccjInfo = res.data[9]; //排序作业
           var bgInfo = res.data[10]; //表格作业
           var bgInfo = res.data[10]; //表格作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var wordInfo = res.data[12]; //文档作业
           var wordInfo = res.data[12]; //文档作业

+ 110 - 13
src/components/pages/course.vue

@@ -22,14 +22,22 @@
         </div>
         </div>
         <div class="student_button">
         <div class="student_button">
           <!-- <el-button type="primary" class="bgColor" @click="openCourse">协同编辑</el-button> -->
           <!-- <el-button type="primary" class="bgColor" @click="openCourse">协同编辑</el-button> -->
-          <el-button type="primary" class="bgColor" @click="goToCourse3()">创建极简式课程</el-button>
+          <!-- <el-button type="primary" class="bgColor" @click="goToCourse3()">创建极简式课程</el-button>
           <el-button type="primary" class="bgColor" @click="goToCourse2()">创建任务式课程</el-button>
           <el-button type="primary" class="bgColor" @click="goToCourse2()">创建任务式课程</el-button>
-          <el-button type="primary" class="bgColor" @click="goToCourse()">创建阶段式课程</el-button>
+          <el-button type="primary" class="bgColor" @click="goToCourse()">创建阶段式课程</el-button> -->
+          <button class="r_pub_button_course" @mouseenter="btnDisplay = true" @mouseleave="btnDisplay = false">
+            <span>创建课程</span>
+            <div v-show="btnDisplay" class="buttonBox">
+              <div type="primary" @click="goToCourse3()">极简式课程</div>
+              <div type="primary" @click="goToCourse2()">任务式课程</div>
+              <div type="primary" @click="goToCourse()">阶段式课程</div>
+            </div>
+          </button>
         </div>
         </div>
       </div>
       </div>
       <div class="reBox">
       <div class="reBox">
         <div class="reTop">
         <div class="reTop">
-          <div>分类筛选</div>
+          <!-- <div>分类筛选</div> -->
           <div class="reTopCh">
           <div class="reTopCh">
             <el-select v-model="groupA" @change="search" v-if="role == '1'">
             <el-select v-model="groupA" @change="search" v-if="role == '1'">
               <el-option value="4" label="全部"></el-option>
               <el-option value="4" label="全部"></el-option>
@@ -52,7 +60,7 @@
           </div>
           </div>
         </div>
         </div>
         <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
         <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
-          <span>类型</span>
+          <span><span>类型</span></span>
           <el-radio-group v-model="pTypeCheckName" style="display: flex; align-items: center">
           <el-radio-group v-model="pTypeCheckName" style="display: flex; align-items: center">
             <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2" :key="index">
             <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2" :key="index">
               <el-radio :label="item.name" @click.native.prevent="CourseType2Click(item.name)">{{ item.name }}</el-radio>
               <el-radio :label="item.name" @click.native.prevent="CourseType2Click(item.name)">{{ item.name }}</el-radio>
@@ -66,7 +74,7 @@
               (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
               (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
                 ? pTypeCheck.indexOf(item.id) != -1
                 ? pTypeCheck.indexOf(item.id) != -1
                 : true)
                 : true)
-              ">{{ item.name }}:</span>
+              "><span>{{ item.name }}</span></span>
             <div class="typeCss" v-if="CourseTypeJson[item.id].length &&
             <div class="typeCss" v-if="CourseTypeJson[item.id].length &&
               (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
               (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
                 ? pTypeCheck.indexOf(item.id) != -1
                 ? pTypeCheck.indexOf(item.id) != -1
@@ -87,6 +95,37 @@
               </div>
               </div>
             </div>
             </div>
           </div>
           </div>
+          <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>
+              <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2';search();">
+                我的课程
+              </div>
+              <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3';search();">
+                协同课程
+              </div>
+              <div class="cName" :class="groupA == '1' ? 'isCType' : ''" @click="groupA = '1';search();">
+                他人课程
+              </div>
+            </div>
+          </div>
+          <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>
+              <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2';search();">
+                我的课程
+              </div>
+              <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3';search();">
+                协同课程
+              </div>
+            </div>
+          </div>
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
@@ -154,8 +193,14 @@
               <div class="kc_time">{{ item.time }}</div>
               <div class="kc_time">{{ item.time }}</div>
             </div> -->
             </div> -->
             <div class="bottom_box">
             <div class="bottom_box">
-              <div>{{ item.title }}</div>
-              <div class="kc_t" v-if="item.isCourseType == 2 || groupA == 1">
+              <div>
+                <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
+                  <span>{{ item.title }}</span>
+                </el-tooltip>
+                <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
+              </div>
+              <!-- v-if="item.isCourseType == 2 || groupA == 1" -->
+              <div class="kc_t">
                 负责老师:{{ item.uname }}
                 负责老师:{{ item.uname }}
               </div>
               </div>
               <div class="kc_time">
               <div class="kc_time">
@@ -344,6 +389,7 @@ export default {
       typed: "",
       typed: "",
       pTypeCheck: [],
       pTypeCheck: [],
       pTypeCheckName: [],
       pTypeCheckName: [],
+      btnDisplay:false
     };
     };
   },
   },
   methods: {
   methods: {
@@ -1190,7 +1236,7 @@ export default {
 
 
 .student_button {
 .student_button {
   display: flex;
   display: flex;
-  overflow: hidden;
+  /* overflow: hidden; */
   height: 40px;
   height: 40px;
 }
 }
 
 
@@ -1390,12 +1436,29 @@ export default {
 
 
 .bottom_box>div:nth-child(1) {
 .bottom_box>div:nth-child(1) {
   width: 100%;
   width: 100%;
+  /* overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  font-weight: bold; */
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.bottom_box>div:nth-child(1) >span:nth-child(1){
+  max-width: 100%;
   overflow: hidden;
   overflow: hidden;
   text-overflow: ellipsis;
   text-overflow: ellipsis;
   white-space: nowrap;
   white-space: nowrap;
   font-weight: bold;
   font-weight: bold;
 }
 }
 
 
+.bottom_box>div:nth-child(1) >span:nth-child(2){
+  min-width:fit-content;
+  font-size:14px;
+  color:#8c8c8c;
+}
+
 .tup {
 .tup {
   width: 100%;
   width: 100%;
   height: 180px;
   height: 180px;
@@ -1573,7 +1636,7 @@ export default {
 
 
 .xtCourse {
 .xtCourse {
   position: absolute;
   position: absolute;
-  background: #41a5f0;
+  background: #466b99;
   width: 70px;
   width: 70px;
   height: 30px;
   height: 30px;
   border-radius: 5px;
   border-radius: 5px;
@@ -1746,11 +1809,18 @@ export default {
   margin: 2px 0;
   margin: 2px 0;
   width: 100%;
   width: 100%;
 }
 }
-
-.all_choose>span {
-  min-width: 80px;
+.all_choose>span{
+  display: flex;
+  margin-right: 5px;
+}
+.all_choose>span>span {
+  min-width: 65px;
+  max-width: 65px;
   display: block;
   display: block;
-  letter-spacing: 14px;
+  text-align-last: justify;
+}
+.all_choose>span::after{
+  content: ':';
 }
 }
 
 
 .all_choose>span:nth-child(1) {
 .all_choose>span:nth-child(1) {
@@ -1810,4 +1880,31 @@ export default {
   -webkit-box-shadow: none !important;
   -webkit-box-shadow: none !important;
   box-shadow: none !important;
   box-shadow: none !important;
 }
 }
+
+.buttonBox{
+  position: absolute;
+  bottom: -0;
+  transform: translateY(100%);
+  background: #fff;
+  border-radius: 5px;
+  box-shadow: 0 0 3px 1px #e3e3e3;
+  width: 100%;
+}
+
+.buttonBox > div{
+  height: 40px;
+  line-height: 40px;
+  width: 100%;
+  text-align: center;
+  color: #000;
+  box-sizing: border-box;
+}
+
+.buttonBox > div + div{
+  border-top: 1px solid #e0e0e0;
+}
+
+.buttonBox > div:hover{
+  background: #f6f8ff;
+}
 </style>
 </style>

+ 23 - 9
src/components/pages/data.vue

@@ -60,7 +60,13 @@
             </el-radio-group>
             </el-radio-group>
           </el-form-item>
           </el-form-item>
           <el-form-item label="教研室" v-if="ruleForm.type == '老师'">
           <el-form-item label="教研室" v-if="ruleForm.type == '老师'">
-            <div>{{ ccName ? ccName : '暂无' }}</div>
+            <el-select
+              v-model="ccName"
+              clearable
+              placeholder="暂无教研室"
+              disabled
+            >
+            </el-select>
           </el-form-item>
           </el-form-item>
           <el-form-item label="姓名" prop="name">
           <el-form-item label="姓名" prop="name">
             <el-input
             <el-input
@@ -135,7 +141,7 @@
               <!-- <el-option >学生 </el-option> -->
               <!-- <el-option >学生 </el-option> -->
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
-          <el-form-item label="个人简介" prop="intro">
+          <!-- <el-form-item label="个人简介" prop="intro">
             <el-input
             <el-input
               v-model="ruleForm.intro"
               v-model="ruleForm.intro"
               type="textarea"
               type="textarea"
@@ -144,10 +150,10 @@
               placeholder="想说点什么..."
               placeholder="想说点什么..."
               style="width: 300px"
               style="width: 300px"
             ></el-input>
             ></el-input>
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item>
           <el-form-item>
             <el-button type="primary" @click="submitForm('ruleForm')"
             <el-button type="primary" @click="submitForm('ruleForm')"
-              >修改</el-button
+              >保存</el-button
             >
             >
           </el-form-item>
           </el-form-item>
         </el-form>
         </el-form>
@@ -167,7 +173,7 @@
                 :type="isLook ? 'type' : 'password'"
                 :type="isLook ? 'type' : 'password'"
                 class="input"
                 class="input"
                 v-model="password"
                 v-model="password"
-                placeholder="请输入修改密码"
+                placeholder="请输入修改密码,长度为6-16位"
               ></el-input>
               ></el-input>
               <div class="eye" @click="changeEye">
               <div class="eye" @click="changeEye">
                 <img :src="isLook ? eye : eyeOff" alt="" />
                 <img :src="isLook ? eye : eyeOff" alt="" />
@@ -181,7 +187,7 @@
                 :type="isLook ? 'type' : 'password'"
                 :type="isLook ? 'type' : 'password'"
                 class="input"
                 class="input"
                 v-model="password1"
                 v-model="password1"
-                placeholder="请再次输入修改密码"
+                placeholder="请再次输入修改密码,长度为6-16位"
               ></el-input>
               ></el-input>
               <div class="eye" @click="changeEye">
               <div class="eye" @click="changeEye">
                 <img :src="isLook ? eye : eyeOff" alt="" />
                 <img :src="isLook ? eye : eyeOff" alt="" />
@@ -191,7 +197,7 @@
           <div class="input_box">
           <div class="input_box">
             <span></span>
             <span></span>
             <div class="input">
             <div class="input">
-              <el-button type="primary" @click="updatePassword">修改</el-button>
+              <el-button type="primary" @click="updatePassword">保存</el-button>
             </div>
             </div>
           </div>
           </div>
         </div>
         </div>
@@ -236,7 +242,7 @@ export default {
         org: "",
         org: "",
         headportrait: "",
         headportrait: "",
       },
       },
-      ccName:"",
+      ccName: "",
       opassword: "",
       opassword: "",
       password: "",
       password: "",
       password1: "",
       password1: "",
@@ -311,7 +317,8 @@ export default {
           type: this.ruleForm.type == "老师" ? 1 : 2,
           type: this.ruleForm.type == "老师" ? 1 : 2,
           oid: this.ruleForm.sBySchool,
           oid: this.ruleForm.sBySchool,
           phone: this.ruleForm.phone,
           phone: this.ruleForm.phone,
-          intro: this.ruleForm.intro,
+          // intro: this.ruleForm.intro,
+          intro: "",
           sex: this.ruleForm.sex == "男" ? "0" : "1",
           sex: this.ruleForm.sex == "男" ? "0" : "1",
         },
         },
       ];
       ];
@@ -398,6 +405,9 @@ export default {
       if (this.password.length < 6) {
       if (this.password.length < 6) {
         this.$message.error("密码长度不少于6位");
         this.$message.error("密码长度不少于6位");
         return;
         return;
+      } else if (this.password.length > 16) {
+        this.$message.error("密码长度不能大于16位");
+        return;
       } else if (this.password != this.password1) {
       } else if (this.password != this.password1) {
         this.$message.error("两次新密码不相同");
         this.$message.error("两次新密码不相同");
         return;
         return;
@@ -563,4 +573,8 @@ export default {
   width: 100%;
   width: 100%;
   height: 100%;
   height: 100%;
 }
 }
+
+.el-form-item >>> .el-select {
+  width: 300px;
+}
 </style>
 </style>

+ 104 - 0
src/components/pages/dataBoard/course/chartList/cateRank.vue

@@ -0,0 +1,104 @@
+<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-column prop="rank" label="排行" min-width="50" align="center">
+          <template slot-scope="scope">{{ scope.$index + 1 }}</template>
+        </el-table-column>
+        <el-table-column
+          prop="name"
+          label="类别名称"
+          min-width="80"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="sum"
+          label="课程数量"
+          min-width="80"
+          align="center"
+        >
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    courseNumberArray: {
+      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" },
+      ],
+    };
+  },
+  methods: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    setArray(array) {
+      this.tableData = [];
+      for (var i = 0; i < array.length; i++) {
+        this.tableData.push({
+          sum: array[i].course,
+          name: array[i].name,
+        });
+      }
+      this.tableData = this.tableData.sort(function (a, b) {
+        return b.sum - a.sum;
+      });
+    },
+  },
+  watch: {
+    courseNumberArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue);
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.courseNumberArray);
+  },
+};
+</script>
+
+<style scoped>
+.el-table >>> .even_row {
+  background-color: #f2f7ff !important;
+}
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

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

@@ -0,0 +1,126 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    courseNumberArray: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        data: [],
+      },
+      option: {
+        tooltip: {
+          trigger: "item",
+        },
+        series: [
+          {
+            type: "pie",
+            radius: ["35%", "70%"],
+            avoidLabelOverlap: false,
+            emphasis: {
+              label: {
+                show: true,
+                fontSize: 16,
+                fontWeight: "bold",
+              },
+            },
+            data: [
+              // { value: 123, name: "一年级" },
+              // { value: 200, name: "二年级" },
+              // { value: 250, name: "三年级" },
+              // { value: 450, name: "四年级" },
+              // { value: 300, name: "五年级" },
+              // { value: 100, name: "六年级" },
+            ],
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          //劳动课程
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.series[0].data = this.ooption.data;
+        chartObj.off('click')
+        let _this = this
+        chartObj.on('click', function (param) {
+          console.log(param);  //X轴的值
+          _this.$emit('openCourse', param.dataIndex)
+        });
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    setArray(array) {
+      this.ooption = {
+        data: [],
+      };
+      for (var i = 0; i < array.length; i++) {
+        this.ooption.data.push({ value: array[i].course, name: array[i].name });
+      }
+      if (!this.chartObj) {
+        this.setChart(this.ooption);
+      } else {
+        this.option.series[0].data = this.ooption.data;
+        this.chartObj.setOption(this.option);
+      }
+      this.$forceUpdate();
+    },
+  },
+  watch: {
+    courseNumberArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue);
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.courseNumberArray);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 233 - 0
src/components/pages/dataBoard/course/chartList/courseTime.vue

@@ -0,0 +1,233 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div
+        id="charts_canvas"
+        class="echart"
+        style="width: 100%; height: 100%"
+      ></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      chartObj: null,
+      option: {
+        singleAxis: {
+          top: 50,
+          bottom: 50,
+          axisTick: {},
+          axisLabel: {},
+          grid: {
+            top: "5%",
+            left: "5%",
+            right: "5%",
+            bottom: "5%",
+            containLabel: true,
+          },
+          type: "time",
+          axisPointer: {
+            animation: true,
+            label: {
+              show: true,
+            },
+          },
+          splitLine: {
+            show: true,
+            lineStyle: {
+              type: "dashed",
+              opacity: 0.2,
+            },
+          },
+        },
+        series: [
+          {
+            type: "themeRiver",
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 20,
+                shadowColor: "rgba(0, 0, 0, 0.8)",
+              },
+            },
+            data: [
+              ["2015/11/08", 10, "DQ"],
+              ["2015/11/09", 15, "DQ"],
+              ["2015/11/10", 35, "DQ"],
+              ["2015/11/11", 38, "DQ"],
+              ["2015/11/12", 22, "DQ"],
+              ["2015/11/13", 16, "DQ"],
+              ["2015/11/14", 7, "DQ"],
+              ["2015/11/15", 2, "DQ"],
+              ["2015/11/16", 17, "DQ"],
+              ["2015/11/17", 33, "DQ"],
+              ["2015/11/18", 40, "DQ"],
+              ["2015/11/19", 32, "DQ"],
+              ["2015/11/20", 26, "DQ"],
+              ["2015/11/21", 35, "DQ"],
+              ["2015/11/22", 40, "DQ"],
+              ["2015/11/23", 32, "DQ"],
+              ["2015/11/24", 26, "DQ"],
+              ["2015/11/25", 22, "DQ"],
+              ["2015/11/26", 16, "DQ"],
+              ["2015/11/27", 22, "DQ"],
+              ["2015/11/28", 10, "DQ"],
+              ["2015/11/08", 35, "TY"],
+              ["2015/11/09", 36, "TY"],
+              ["2015/11/10", 37, "TY"],
+              ["2015/11/11", 22, "TY"],
+              ["2015/11/12", 24, "TY"],
+              ["2015/11/13", 26, "TY"],
+              ["2015/11/14", 34, "TY"],
+              ["2015/11/15", 21, "TY"],
+              ["2015/11/16", 18, "TY"],
+              ["2015/11/17", 45, "TY"],
+              ["2015/11/18", 32, "TY"],
+              ["2015/11/19", 35, "TY"],
+              ["2015/11/20", 30, "TY"],
+              ["2015/11/21", 28, "TY"],
+              ["2015/11/22", 27, "TY"],
+              ["2015/11/23", 26, "TY"],
+              ["2015/11/24", 15, "TY"],
+              ["2015/11/25", 30, "TY"],
+              ["2015/11/26", 35, "TY"],
+              ["2015/11/27", 42, "TY"],
+              ["2015/11/28", 42, "TY"],
+              ["2015/11/08", 21, "SS"],
+              ["2015/11/09", 25, "SS"],
+              ["2015/11/10", 27, "SS"],
+              ["2015/11/11", 23, "SS"],
+              ["2015/11/12", 24, "SS"],
+              ["2015/11/13", 21, "SS"],
+              ["2015/11/14", 35, "SS"],
+              ["2015/11/15", 39, "SS"],
+              ["2015/11/16", 40, "SS"],
+              ["2015/11/17", 36, "SS"],
+              ["2015/11/18", 33, "SS"],
+              ["2015/11/19", 43, "SS"],
+              ["2015/11/20", 40, "SS"],
+              ["2015/11/21", 34, "SS"],
+              ["2015/11/22", 28, "SS"],
+              ["2015/11/23", 26, "SS"],
+              ["2015/11/24", 37, "SS"],
+              ["2015/11/25", 41, "SS"],
+              ["2015/11/26", 46, "SS"],
+              ["2015/11/27", 47, "SS"],
+              ["2015/11/28", 41, "SS"],
+              ["2015/11/08", 10, "QG"],
+              ["2015/11/09", 15, "QG"],
+              ["2015/11/10", 35, "QG"],
+              ["2015/11/11", 38, "QG"],
+              ["2015/11/12", 22, "QG"],
+              ["2015/11/13", 16, "QG"],
+              ["2015/11/14", 7, "QG"],
+              ["2015/11/15", 2, "QG"],
+              ["2015/11/16", 17, "QG"],
+              ["2015/11/17", 33, "QG"],
+              ["2015/11/18", 40, "QG"],
+              ["2015/11/19", 32, "QG"],
+              ["2015/11/20", 26, "QG"],
+              ["2015/11/21", 35, "QG"],
+              ["2015/11/22", 40, "QG"],
+              ["2015/11/23", 32, "QG"],
+              ["2015/11/24", 26, "QG"],
+              ["2015/11/25", 22, "QG"],
+              ["2015/11/26", 16, "QG"],
+              ["2015/11/27", 22, "QG"],
+              ["2015/11/28", 10, "QG"],
+              ["2015/11/08", 10, "SY"],
+              ["2015/11/09", 15, "SY"],
+              ["2015/11/10", 35, "SY"],
+              ["2015/11/11", 38, "SY"],
+              ["2015/11/12", 22, "SY"],
+              ["2015/11/13", 16, "SY"],
+              ["2015/11/14", 7, "SY"],
+              ["2015/11/15", 2, "SY"],
+              ["2015/11/16", 17, "SY"],
+              ["2015/11/17", 33, "SY"],
+              ["2015/11/18", 40, "SY"],
+              ["2015/11/19", 32, "SY"],
+              ["2015/11/20", 26, "SY"],
+              ["2015/11/21", 35, "SY"],
+              ["2015/11/22", 4, "SY"],
+              ["2015/11/23", 32, "SY"],
+              ["2015/11/24", 26, "SY"],
+              ["2015/11/25", 22, "SY"],
+              ["2015/11/26", 16, "SY"],
+              ["2015/11/27", 22, "SY"],
+              ["2015/11/28", 10, "SY"],
+              ["2015/11/08", 10, "DD"],
+              ["2015/11/09", 15, "DD"],
+              ["2015/11/10", 35, "DD"],
+              ["2015/11/11", 38, "DD"],
+              ["2015/11/12", 22, "DD"],
+              ["2015/11/13", 16, "DD"],
+              ["2015/11/14", 7, "DD"],
+              ["2015/11/15", 2, "DD"],
+              ["2015/11/16", 17, "DD"],
+              ["2015/11/17", 33, "DD"],
+              ["2015/11/18", 4, "DD"],
+              ["2015/11/19", 32, "DD"],
+              ["2015/11/20", 26, "DD"],
+              ["2015/11/21", 35, "DD"],
+              ["2015/11/22", 40, "DD"],
+              ["2015/11/23", 32, "DD"],
+              ["2015/11/24", 26, "DD"],
+              ["2015/11/25", 22, "DD"],
+              ["2015/11/26", 16, "DD"],
+              ["2015/11/27", 22, "DD"],
+              ["2015/11/28", 10, "DD"],
+            ],
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart() {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+  },
+  mounted() {
+    this.setChart(this.option);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+  created() {
+    this.setChart();
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 141 - 0
src/components/pages/dataBoard/course/chartList/teaFre.vue

@@ -0,0 +1,141 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div
+        id="charts_canvas"
+        class="echart"
+        style="width: 100%; height: 100%"
+      ></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    monthArray: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        xdata: [],
+        course: [],
+      },
+      option: {
+        tooltip: {
+          trigger: "axis",
+        },
+        xAxis: {
+          type: "category",
+          boundaryGap: true,
+          // data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月"],
+          data: [],
+        },
+        yAxis: {
+          type: "value",
+        },
+        grid: {
+          top: "5%",
+          left: "5%",
+          right: "5%",
+          bottom: "5%",
+          containLabel: true,
+        },
+        series: [
+          {
+            data:[],
+            // data: [400, 510, 510, 350, 320, 510],
+            symbolSize: 10,
+            type: "line",
+            lineStyle: {
+              width: 3, // 设置线宽度
+              color: "#0E65F7", // 设置线颜色
+            },
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.xAxis.data = option.xdata;
+        this.option.series[0].data = option.course;
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+  },
+  watch: {
+    monthArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.ooption = {
+          xdata: [],
+          course: [],
+        };
+        let _array = newValue;
+        for (var i = 0; i < _array.length; i++) {
+          this.ooption.xdata.push(_array[i].Month + "月");
+          this.ooption.course.push(_array[i].course);
+        }
+
+        if (!this.chartObj) {
+          this.setChart(this.ooption);
+        } else {
+          this.option.xAxis.data = this.ooption.xdata;
+          this.option.series[0].data = this.ooption.course;
+          this.chartObj.setOption(this.option);
+        }
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.ooption = {
+      xdata: [],
+      course: [],
+    };
+    let _array = this.monthArray;
+    for (var i = 0; i < _array.length; i++) {
+      this.ooption.xdata.push(_array[i].Month + "月");
+      this.ooption.course.push(_array[i].course);
+    }
+    this.setChart(this.ooption);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 122 - 0
src/components/pages/dataBoard/course/chartList/toolUse.vue

@@ -0,0 +1,122 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div
+        id="charts_canvas"
+        class="echart"
+        style="width: 100%; height: 100%"
+      ></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    toolArray: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      option: {
+        tooltip: {
+          trigger: "item",
+        },
+        grid: {
+          left: 0,
+          right: 0,
+          bottom: 0,
+          containLabel: true,
+        },
+        series: [
+          {
+            type: "pie",
+            radius: ["40%", "70%"],
+            emphasis: {
+              label: {
+                show: true,
+                fontSize: 14,
+                fontWeight: "bold",
+              },
+            },
+            labelLine: {
+              show: true,
+            },
+            // data: [
+            //   { value: 123, name: "思维类" },
+            //   { value: 200, name: "评价类" },
+            //   { value: 250, name: "学科类" },
+            //   { value: 450, name: "其他类" },
+            //   { value: 300, name: "逻辑类" },
+            //   { value: 100, name: "动作类" },
+            // ],
+            data: [],
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart(arrArray) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.series[0].data = arrArray;
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+  },
+  watch: {
+    toolArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        let _array = newValue;
+
+        if (!this.chartObj) {
+          this.setChart(_array);
+        } else {
+          this.option.series[0].data = _array;
+          this.chartObj.setOption(this.option);
+        }
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    let _array = this.toolArray;
+    this.setChart(_array);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 146 - 0
src/components/pages/dataBoard/course/chartList/workNum.vue

@@ -0,0 +1,146 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div
+        id="charts_canvas"
+        class="echart"
+        style="width: 100%; height: 100%"
+      ></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    workNumList: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        data: [],
+      },
+      option: {
+        xAxis: {
+          name: "任务数量",
+          nameTextStyle: {
+            padding: [25, 0, 0, 0],
+            verticalAlign:'top'
+          },
+          nameGap: -45
+        },
+        grid: {
+          top: "10%",
+          left: "5%",
+          right: "5%",
+          bottom: "6%",
+          containLabel: true,
+        },
+        yAxis: {
+          name: "作业提交数量",
+        },
+        color: ["#3681FC"],
+        tooltip: {
+          formatter: function (params) {
+            return (
+              params.marker +
+              params.data[2] +
+              "<br/>" +
+              "任务数量:" +
+              params.data[0] +
+              "<br/>" +
+              "作业提交数量:" +
+              params.data[1]
+            );
+          },
+        },
+        series: [
+          {
+            symbolSize: 8,
+            data: [],
+            type: "scatter",
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          //劳动课程
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.series[0].data = this.ooption.data;
+
+        chartObj.off('click')
+        let _this = this
+        chartObj.on('click', function (param) {
+          console.log(param);  //X轴的值
+          _this.$emit('openCourse', param.data[3])
+        });
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    setArray(array) {
+      this.ooption = {
+        data: [],
+      };
+      for (var i = 0; i < array.length; i++) {
+        this.ooption.data.push(array[i]);
+      }
+      if (!this.chartObj) {
+        this.setChart(this.ooption);
+      } else {
+        this.option.series[0].data = this.ooption.data;
+        this.chartObj.setOption(this.option);
+      }
+      this.$forceUpdate();
+    },
+  },
+  watch: {
+    workNumList: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue);
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.workNumList);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 139 - 0
src/components/pages/dataBoard/course/chartList/workTime.vue

@@ -0,0 +1,139 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div
+        id="charts_canvas"
+        class="echart"
+        style="width: 100%; height: 100%"
+      ></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    workList: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        xdata: [],
+        type: [],
+      },
+      option: {
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+          },
+        },
+        grid: {
+          top: "5%",
+          left: "5%",
+          right: "5%",
+          bottom: "5%",
+          containLabel: true,
+        },
+        xAxis: {
+          type: "value",
+          boundaryGap: [0, 0.01],
+        },
+        yAxis: {
+          type: "category",
+          // data: ["六年级", "五年级", "四年级", "三年级", "二年级", "一年级"],
+          data: [],
+        },
+        series: [
+          {
+            type: "bar",
+            // data: [60, 110, 25, 130, 65, 80],
+            data: [],
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.yAxis.data = option.xdata;
+        this.option.series[0].data = option.type;
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+  },
+  watch: {
+    workList: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.ooption = {
+          xdata: [],
+          type: [],
+        };
+        let _array = newValue;
+        for (var i = 0; i < _array.length; i++) {
+          this.ooption.xdata.push(_array[i].name);
+          this.ooption.type.push(_array[i].time);
+        }
+
+        if (!this.chartObj) {
+          this.setChart(this.ooption);
+        } else {
+          this.option.yAxis.data = this.ooption.xdata;
+          this.option.series[0].data = this.ooption.type;
+          this.chartObj.setOption(this.option);
+        }
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.ooption = {
+      xdata: [],
+      type: [],
+    };
+    let _array = this.workList;
+    for (var i = 0; i < _array.length; i++) {
+      this.ooption.xdata.push(_array[i].name);
+      this.ooption.type.push(_array[i].time);
+    }
+    this.setChart(this.ooption);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 731 - 0
src/components/pages/dataBoard/course/index.vue

@@ -0,0 +1,731 @@
+<template>
+  <div class="body1" v-loading="isLoading">
+    <!-- 课程数据 -->
+    <div class="left">
+      <div class="top">
+        <div class="titleBox">
+          <div class="title">授课频次</div>
+        </div>
+        <div class="dataBox">
+          <div class="teafre">
+            <div class="teaLeft">
+              <div>累计授课次数</div>
+              <div>{{ wCount }}</div>
+            </div>
+            <div class="teaLeft teaRigth">
+              <div>相对增幅百分比</div>
+              <div>{{ reInc }}%</div>
+            </div>
+          </div>
+          <TeaFre
+            style="height: calc(100% - 62px)"
+            :monthArray="groupedArrayByMonth"
+          ></TeaFre>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">工具使用</div>
+        </div>
+        <div class="dataBox">
+          <ToolUse
+            style="height: calc(100% - 40px)"
+            :toolArray="toolList"
+          ></ToolUse>
+        </div>
+      </div>
+    </div>
+    <div class="center">
+      <div class="top">
+        <div class="titleBox">
+          <div class="title">课程数量</div>
+        </div>
+        <div class="dataBox middleBox">
+          <div class="halfBox">
+            <div class="teafre">
+              <div class="teaMiddle cNum">
+                <div>课程总数</div>
+                <div>{{ cCount }}</div>
+              </div>
+              <div class="teaMiddle tNum">
+                <div>类别总数</div>
+                <div>{{ typeCount }}</div>
+              </div>
+              <div class="teaMiddle tSum">
+                <div>类别平均</div>
+                <div>{{ (cCount / typeCount).toFixed(0) }}</div>
+              </div>
+            </div>
+            <CateRank
+              style="
+                height: calc(100% - 72px);
+                margin-top: 10px;
+                overflow: auto;
+              "
+              :courseNumberArray="courseNumberArray"
+            ></CateRank>
+          </div>
+          <div class="halfBox middleBox" style="align-items: flex-start">
+            <WorkNum
+              style="height: calc(100% - 40px)"
+              :workNumList="workNumList"
+              @openCourse="openCourse"
+            ></WorkNum>
+          </div>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">课程时间分布</div>
+        </div>
+        <div class="dataBox">
+          <CourseTime style="height: calc(100% - 40px)"></CourseTime>
+        </div>
+      </div>
+    </div>
+    <div class="right">
+      <div class="top">
+        <div class="titleBox">
+          <div class="title">课程分析</div>
+          <el-select v-model="cType" @change="typeChange" class="selectBox">
+            <el-option label="全部" value=""></el-option>
+            <el-option label="年级" value="grade"></el-option>
+            <el-option label="主题" value="theme"></el-option>
+            <el-option label="学科" value="subject"></el-option>
+          </el-select>
+        </div>
+        <div class="dataBox">
+          <CourseAna
+            style="height: calc(100% - 40px)"
+            :courseNumberArray="courseNumberArray"
+            @openCourse="openCourse2"
+          ></CourseAna>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">授课时长</div>
+          <el-select v-model="lType" @change="typeChange1" class="selectBox">
+            <el-option label="年级" value="grade"></el-option>
+            <el-option label="主题" value="theme"></el-option>
+            <el-option label="学科" value="subject"></el-option>
+          </el-select>
+        </div>
+        <div class="dataBox">
+          <div class="teafre" style="margin: 10px 0 0 0">
+            <div class="teaLeft">
+              <div>累计时长</div>
+              <div>15624小时</div>
+            </div>
+            <div class="teaLeft teaRigth">
+              <div>学生在线平均时长</div>
+              <div>268小时</div>
+            </div>
+          </div>
+          <WorkTime
+            style="height: calc(100% - 72px)"
+            :workList="tedurArray"
+          ></WorkTime>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import TeaFre from "./chartList/teaFre.vue";
+import ToolUse from "./chartList/toolUse.vue";
+import CateRank from "./chartList/cateRank.vue";
+import WorkNum from "./chartList/workNum.vue";
+import CourseTime from "./chartList/courseTime.vue";
+import CourseAna from "./chartList/courseAna.vue";
+import WorkTime from "./chartList/workTime.vue";
+export default {
+  components: {
+    TeaFre,
+    ToolUse,
+    CateRank,
+    WorkNum,
+    CourseTime,
+    CourseAna,
+    WorkTime,
+  },
+  props: {
+    oid: {
+      type: String,
+    },
+    org: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      isLoading: false,
+      wCount: 0,
+      cCount: 0,
+      groupedArrayByMonth: [],
+      toolList: [],
+      reInc: 0,
+      cType: "",
+      lType: "grade",
+      tedurArray: [],
+      classList: [],
+      subjectList: [],
+      themeList: [],
+      typeCount: 0,
+      courseNumberArray: [],
+      gradeArray: [],
+      subjectArray: [],
+      themeArray: [],
+      allArray: [],
+      workNumList: [],
+    };
+  },
+  mounted() {
+    this.getData();
+  },
+  methods: {
+    openCourse(cid){
+      window.parent.postMessage({ cid: cid, screenType: "3" }, "*");
+    },
+    openCourse2(index){
+      console.log(index);
+      // console.log(this.courseNumberArray);
+      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
+      for (key in this.gradeArray) {
+        if (this.gradeArray.hasOwnProperty.call(this.gradeArray, key)) {
+          const element = this.gradeArray[key];
+          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
+          }
+        }
+      }
+      for (key in this.themeArray) {
+        if (this.themeArray.hasOwnProperty.call(this.themeArray, key)) {
+          const element = this.themeArray[key];
+          if(element.typeid == id){
+            typeb = id
+          }
+        }
+      }
+      window.parent.postMessage(
+        { 
+          tools: "openCourse",
+          typea: typea || "",
+          typeb: typeb || "",
+          typed: typed || "",
+        }, 
+        "*"
+      );
+    },
+    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;
+      }
+      this.$forceUpdate();
+    },
+    typeChange1() {
+      if (this.lType == "grade") {
+        this.tedurArray = this.classList;
+      } else if (this.lType == "subject") {
+        this.tedurArray = this.subjectList;
+      } else {
+        this.tedurArray = this.themeList;
+      }
+    },
+    getData() {
+      this.isLoading = true;
+      let params = [
+        {
+          oid: this.oid,
+          org: this.org,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "selectDataBoardCourse", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.wCount = res.data[0].length;
+          this.cCount = res.data[1].length;
+          var workArray = res.data[0];
+          var courseList = res.data[1];
+          var tList = res.data[2];
+          var classList = res.data[3]; //年级数组
+          var subjectList = res.data[4]; //学科数组
+          var themeList = res.data[5]; //主题数组
+          let _course = res.data[6]; //课程
+          let _grade = res.data[3]; //年级
+          let _subject = res.data[4]; //学科
+          var _workCourse = res.data[7]; //带作业的课程
+          _subject.push({ name: "其他" });
+          var cList = [];
+          //将数据根据time里面的月份分成多个数组
+          var groupedArrayByMonth = [];
+          const date = new Date();
+          var Month = date.getMonth() + 1;
+          var Year = date.getFullYear();
+          for (var i = Month; i > Month - 6; i--) {
+            if (i <= 0) {
+              groupedArrayByMonth.push({
+                Year: Year - 1,
+                Month: 12 + i,
+                course: 0,
+              });
+            } else {
+              groupedArrayByMonth.push({
+                Month: i,
+                Year: Year,
+                course: 0,
+              });
+            }
+          }
+          groupedArrayByMonth = groupedArrayByMonth.reverse();
+
+          for (var i = 0; i < workArray.length; i++) {
+            let _date = new Date(workArray[i].time);
+            var _month = _date.getMonth() + 1;
+            var _year = _date.getFullYear();
+            for (var j = 0; j < groupedArrayByMonth.length; j++) {
+              if (
+                _month == groupedArrayByMonth[j].Month &&
+                _year == groupedArrayByMonth[j].Year
+              ) {
+                groupedArrayByMonth[j].course++;
+                break;
+              }
+            }
+          }
+          if (
+            groupedArrayByMonth[groupedArrayByMonth.length - 1].course == 0 ||
+            groupedArrayByMonth[groupedArrayByMonth.length - 2].course == 0
+          ) {
+            this.reInc = 0;
+          } else {
+            this.reInc = (
+              (groupedArrayByMonth[groupedArrayByMonth.length - 1].course /
+                groupedArrayByMonth[groupedArrayByMonth.length - 2].course) *
+              100
+            ).toFixed(1);
+          }
+          this.groupedArrayByMonth = groupedArrayByMonth;
+          for (var i = 0; i < courseList.length; i++) {
+            cList.push(JSON.parse(courseList[i].chapters));
+          }
+          var toolList = [
+            [10, 65], //互动类
+            [7, 1, 52, 3, 48], //思维类
+            [49], //协作类
+            [4, 45, 15, 16, 50, 41, 47], //测评类
+            [40], //评价类
+            [18, 21, 22, 23, 24, 32, 57, 63], //编程类
+            [28, 31, 39, 66, 67, 68], //学科类
+          ];
+          var toolAllArray = [
+            { name: "互动类", value: 0 },
+            { name: "思维类", value: 0 },
+            { name: "协作类", value: 0 },
+            { name: "测评类", value: 0 },
+            { name: "评价类", value: 0 },
+            { name: "编程类", value: 0 },
+            { name: "学科类", value: 0 },
+          ];
+          for (var p = 0; p < toolList.length; p++) {
+            for (var i = 0; i < cList.length; i++) {
+              for (var j = 0; j < cList[i].length; j++) {
+                for (
+                  var k = 0;
+                  k < cList[i][j].chapterInfo[0].taskJson.length;
+                  k++
+                ) {
+                  for (
+                    var q = 0;
+                    q <
+                    cList[i][j].chapterInfo[0].taskJson[k].toolChoose.length;
+                    q++
+                  ) {
+                    if (
+                      toolList[p].indexOf(
+                        cList[i][j].chapterInfo[0].taskJson[k].toolChoose[q]
+                          .tool[0]
+                      ) != -1
+                    ) {
+                      toolAllArray[p].value++;
+                    }
+                  }
+                }
+              }
+            }
+          }
+          this.toolList = toolAllArray;
+          var courseJson = Object.values(
+            tList.reduce(function (acc, obj) {
+              if (!acc[obj.courseid]) {
+                acc[obj.courseid] = { ...obj };
+                acc[obj.courseid].typeid = [acc[obj.courseid].typeid];
+              } else {
+                if (!acc[obj.courseid].typeid.includes(obj.typeid)) {
+                  acc[obj.courseid].typeid.push(obj.typeid);
+                }
+                acc[obj.courseid].text =
+                  parseInt(acc[obj.courseid].text) + parseInt(obj.text);
+              }
+              return acc;
+            }, {})
+          ).map(function (obj) {
+            var totalTime = parseInt(obj.text);
+            obj.text = (totalTime / (60 * 60)).toFixed(2);
+            return obj;
+          });
+
+          for (var i = 0; i < courseJson.length; i++) {
+            for (var j = 0; j < classList.length; j++) {
+              if (courseJson[i].typeid.indexOf(classList[j].id) != -1) {
+                if (classList[j].time && courseJson[i].text) {
+                  classList[j].time += parseInt(courseJson[i].text);
+                } else if (courseJson[i].text) {
+                  classList[j].time = parseInt(courseJson[i].text);
+                }
+              }
+            }
+            for (var k = 0; k < subjectList.length; k++) {
+              if (courseJson[i].typeid.indexOf(subjectList[k].id) != -1) {
+                if (subjectList[k].time && courseJson[i].text) {
+                  subjectList[k].time += parseInt(courseJson[i].text);
+                } else if (courseJson[i].text) {
+                  subjectList[k].time = parseInt(courseJson[i].text);
+                }
+              }
+            }
+            for (var l = 0; l < themeList.length; l++) {
+              if (courseJson[i].typeid.indexOf(themeList[l].id) != -1) {
+                if (themeList[l].time && courseJson[i].text) {
+                  themeList[l].time += parseInt(courseJson[i].text);
+                } else if (courseJson[i].text) {
+                  themeList[l].time = parseInt(courseJson[i].text);
+                }
+              }
+            }
+          }
+          this.classList = classList;
+          this.subjectList = subjectList;
+          this.themeList = themeList;
+          if (this.lType == "grade") {
+            this.tedurArray = classList;
+          } else if (this.lType == "subject") {
+            this.tedurArray = subjectList;
+          } else {
+            this.tedurArray = themeList;
+          }
+          this.typeCount =
+            classList.length + subjectList.length + themeList.length;
+          let _gradeArray = [];
+          let _subjectArray = [];
+          let _themeArray = [];
+
+          for (var i = 0; i < _grade.length; i++) {
+            _gradeArray.push({
+              name: _grade[i].name,
+              typeid: _grade[i].id,
+              course: 0,
+            });
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _grade[i].id) {
+                _gradeArray[i].course++;
+              }
+            }
+          }
+
+          for (var i = 0; i < _subject.length; i++) {
+            _subjectArray.push({
+              name: _subject[i].name,
+              typeid: _subject[i].id,
+              course: 0,
+            });
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _subject[i].id) {
+                _subjectArray[i].course++;
+              }
+            }
+          }
+
+          for (var i = 0; i < themeList.length; i++) {
+            _themeArray.push({
+              name: themeList[i].name,
+              typeid: themeList[i].id,
+              course: 0,
+            });
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == themeList[i].id) {
+                _themeArray[i].course++;
+              }
+            }
+          }
+          this.gradeArray = _gradeArray;
+          this.subjectArray = _subjectArray;
+          this.themeArray = _themeArray;
+          this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray];
+          this.typeChange();
+          var wList = [];
+          for (var i = 0; i < _workCourse.length; i++) {
+            if (!wList[_workCourse[i].courseId]) {
+              wList[_workCourse[i].courseId] = {
+                cid: _workCourse[i].courseId,
+                title: _workCourse[i].title,
+                task: 0,
+                work: 0,
+              };
+              let chapters = JSON.parse(_workCourse[i].chapters);
+              for (var j = 0; j < chapters.length; j++) {
+                if (wList[_workCourse[i].courseId].task == 0) {
+                  wList[_workCourse[i].courseId].task =
+                    chapters[j].chapterInfo[0].taskJson.length;
+                } else {
+                  wList[_workCourse[i].courseId].task +=
+                    chapters[j].chapterInfo[0].taskJson.length;
+                }
+              }
+            }
+          }
+          for (var i = 0; i < _workCourse.length; i++) {
+            let a = Object.keys(wList);
+            for (var j = 0; j < Object.keys(wList).length; j++) {
+              if (_workCourse[i].courseId == wList[a[j]].cid) {
+                wList[a[j]].work++;
+              }
+            }
+          }
+          var workNumList = Object.values(wList).map((item) => [
+            item.task,
+            item.work,
+            item.title,
+            item.cid,
+          ]);
+          this.workNumList = workNumList;
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    // format(percentage) {
+    //   return percentage;
+    // },
+  },
+};
+</script>
+
+<style scoped>
+.body1 {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  padding: 20px;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.left {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+}
+
+.left > .top {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+  margin: 0 0 20px 0;
+}
+
+.left > .bottom {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.center {
+  width: calc(100% / 4 * 2 - 40px);
+  height: 100%;
+  margin: 0 20px;
+}
+
+.center > .top {
+  width: 100%;
+  height: calc(100% / 5 * 3 - 10px);
+  background: #fff;
+  border-radius: 5px;
+  margin: 0 0 20px 0;
+}
+
+.center > .bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.right {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+}
+
+.right > .top {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 16px;
+  margin: 0 0 20px 0;
+}
+
+.right > .bottom {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.titleBox {
+  height: 40px;
+  display: flex;
+  align-items: center;
+  padding: 0 15px;
+  width: 100%;
+}
+
+.dataBox {
+  height: calc(100% - 40px);
+  width: 100%;
+}
+
+.middleBox {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: flex-start;
+}
+
+.title {
+  font-weight: bold;
+  color: #060e17;
+  font-size: 18px;
+}
+
+.teafre {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  width: 100%;
+  justify-content: space-evenly;
+}
+
+.teaLeft,
+.teaMiddle {
+  width: calc(100% / 2 - 10px);
+  height: 60px;
+  border-radius: 8px;
+  /* border: 1px solid #e0eafb; */
+  display: flex;
+  flex-direction: column;
+  align-items: flex-start;
+  justify-content: center;
+  padding: 0 10px;
+  margin: 0 10px;
+}
+.teaMiddle {
+  width: calc(100% / 3 - 10px);
+}
+.teaLeft {
+  width: 95%;
+  background: linear-gradient(
+    180deg,
+    rgba(224, 234, 251, 0.2) 0%,
+    rgba(54, 130, 252, 0.3) 100%
+  );
+}
+.teaRigth {
+  background: linear-gradient(
+    180deg,
+    rgb(211, 246, 228, 0.2) 0%,
+    rgb(23, 196, 105, 0.3) 100%
+  ) !important;
+}
+
+.cNum {
+  background: linear-gradient(
+    180deg,
+    rgb(125, 227, 174, 0.2) 0%,
+    rgb(23, 196, 105, 0.3) 100%
+  ) !important;
+}
+
+.tNum {
+  background: linear-gradient(
+    180deg,
+    rgb(174, 204, 254, 0.2) 0%,
+    rgb(54, 129, 252, 0.3) 100%
+  ) !important;
+}
+
+.tSum {
+  background: linear-gradient(
+    180deg,
+    rgb(125, 227, 174, 0.2) 0%,
+    rgb(23, 196, 105, 0.3) 100%
+  ) !important;
+}
+
+.teaLeft > div:first-child,
+.teaMiddle > div:first-child {
+  font-size: 12px;
+  font-weight: 400;
+  color: #565e6a;
+}
+
+.teaLeft > div:last-child,
+.teaMiddle > div:last-child {
+  font-size: 22px;
+  font-weight: bold;
+  color: #060e17;
+}
+
+.halfBox {
+  width: 50%;
+  height: 100%;
+}
+.selectBox {
+  width: 80px;
+  margin-left: 10px;
+}
+
+.selectBox >>> .el-input__inner {
+  height: 30px;
+  line-height: 30px;
+}
+
+.selectBox >>> .el-input__icon {
+  line-height: 30px;
+}
+</style>

+ 135 - 0
src/components/pages/dataBoard/index.vue

@@ -0,0 +1,135 @@
+<template>
+  <div class="body">
+    <div class="db_header">
+      <!-- <div class="logoTop">Logo</div> -->
+      <div class="db_header_title">
+        <div v-if="type == 1">综合数据中心</div>
+        <div v-if="type == 2">课程数据中心</div>
+        <div v-if="type == 3">学生数据中心</div>
+        <div v-if="type == 4">教师数据中心</div>
+      </div>
+      <div class="db_check">
+        <div :class="{ active: type == 1 }" @click="setType(1)">综合数据</div>
+        <div :class="{ active: type == 2 }" @click="setType(2)">课程数据</div>
+        <div :class="{ active: type == 3 }" @click="setType(3)">学生数据</div>
+        <div :class="{ active: type == 4 }" @click="setType(4)">教师数据</div>
+      </div>
+    </div>
+    <div class="db_body">
+      <school v-if="type == 1" :oid="oid" :org="org"></school>
+      <course v-if="type == 2" :oid="oid" :org="org"></course>
+      <student v-if="type == 3" :oid="oid" :org="org"></student>
+      <teacher v-if="type == 4" :oid="oid" :org="org"></teacher>
+    </div>
+  </div>
+</template>
+
+<script>
+import school from "./school";
+import course from "./course";
+import student from "./student";
+import teacher from "./teacher";
+export default {
+  components: {
+    school,
+    course,
+    student,
+    teacher,
+  },
+  data() {
+    return {
+      type: 1,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+    };
+  },
+  methods: {
+    setType(type) {
+      this.type = type;
+    },
+  },
+};
+</script>
+
+<style scoped>
+.body {
+  height: 100%;
+  width: 100%;
+  min-width: 1200px;
+  min-height: 750px;
+}
+
+.db_header {
+  width: 100%;
+  height: 50px;
+  display: flex;
+  justify-content: center;
+  position: relative;
+  background: #fff;
+  align-items: center;
+}
+
+.logoTop {
+  position: absolute;
+  left: 30px;
+}
+
+.db_header_title {
+  font-weight: bold;
+  font-size: 20px;
+}
+.db_header_title > div {
+  position: relative;
+  z-index: 9;
+}
+.db_header_title > div:after {
+  content: "";
+  position: absolute;
+  width: 250px;
+  height: 10px;
+  bottom: -30px;
+  left: -85px;
+  border-top: 20px solid #fff;
+  border-left: 20px solid transparent;
+  border-right: 20px solid transparent;
+  -webkit-transform: skew(20deg);
+  transform: skew(359deg);
+  z-index: 1;
+}
+
+.db_check {
+  display: flex;
+  align-items: center;
+  position: absolute;
+  right: 30px;
+  height: 100%;
+}
+
+.db_check > div {
+  padding: 14px 20px;
+  cursor: pointer;
+}
+
+.db_check > div:hover {
+  background: #edf4ff;
+}
+
+.db_check > div.active {
+  font-weight: 700;
+  color: #297bff;
+  background: #edf4ff;
+  border-top: 2px solid #297bff;
+  box-sizing: border-box;
+}
+
+/* .db_check > div + div {
+  margin-left: 30px;
+} */
+
+.db_body {
+  height: calc(100% - 50px);
+  width: 100%;
+  overflow: auto;
+  background: rgb(231, 242, 252);
+}
+</style>

+ 91 - 0
src/components/pages/dataBoard/school/cateRank/index.vue

@@ -0,0 +1,91 @@
+<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-column label="排行" min-width="50" align="center">
+          <template slot-scope="scope">{{ scope.$index + 1 }}</template>
+        </el-table-column>
+        <el-table-column prop="name" label="类别名称" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="sum" label="课程数量" min-width="80" align="center">
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    courseNumberArray: {
+      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" },
+      ],
+    };
+  },
+  methods: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    setArray(array){
+      this.tableData = []
+      for(var i = 0;i<array.length;i++){
+        this.tableData.push({
+          sum:array[i].course,
+          name:array[i].name
+        })
+      }
+      this.tableData = this.tableData.sort(function(a,b){
+        return b.sum - a.sum;
+      })
+    }
+  },
+  watch: {
+    courseNumberArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.courseNumberArray)
+  },
+};
+</script>
+
+<style scoped>
+.el-table>>>.even_row {
+  background-color: #f2f7ff !important;
+}
+
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 137 - 0
src/components/pages/dataBoard/school/courseInfo/index.vue

@@ -0,0 +1,137 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    props: {
+        courseNumberArray: {
+            type: Array,
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                data: [],
+            },
+            option: {
+                tooltip: {
+                    trigger: 'item'
+                },
+                series: [
+                    {
+                        type: 'pie',
+                        radius: ['35%', '70%'],
+                        avoidLabelOverlap: false,
+                        emphasis: {
+                            label: {
+                                show: true,
+                                fontSize: 16,
+                                fontWeight: 'bold'
+                            }
+                        },
+
+                        data: [
+                            // { value: 1048, name: '一年级' },
+                            // { value: 735, name: '二年级' },
+                            // { value: 580, name: '三年级' },
+                            // { value: 484, name: '四年级' },
+                            // { value: 484, name: '五年级' },
+                            // { value: 300, name: '六年级' }
+                        ]
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+                this.option.series[0].data = this.ooption.data;
+                chartObj.off('click')
+                let _this = this
+                chartObj.on('click', function (param) {  
+                    //param参数包含的内容有: 
+                    //param.name:X轴的值 
+                    //param.data:Y轴的值 
+                    //param.value:Y轴的值 
+                    //param.type:点击事件均为click 
+                    //param.seriesName:legend的名称 
+                    //param.seriesIndex:系列序号(series中当前图形是第几个图形第几个) 
+                    //param.dataIndex:数值序列(X轴上当前点是第几个点)
+                    //alert(param.seriesName);  //legend的名称
+                    console.log(param);  //X轴的值
+                    _this.$emit('openCourse',param.dataIndex)
+                });
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+        setArray(array) {
+            this.ooption = {
+                data: [],
+            }
+            for (var i = 0; i < array.length; i++) {
+                this.ooption.data.push({ value: array[i].course, name: array[i].name})
+            }
+            if (!this.chartObj) {
+                this.setChart(this.ooption);
+            } else {
+                this.option.series[0].data = this.ooption.data;
+                this.chartObj.setOption(this.option);
+            }
+            this.$forceUpdate();
+        },
+    },
+    watch: {
+        courseNumberArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(newValue)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.setArray(this.courseNumberArray)
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    /* display: flex; */
+    position: relative;
+    border-radius: 5px;
+    /* border: 1px solid #eee; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 95%;
+    background: #fff;
+}
+</style>
+  

+ 894 - 0
src/components/pages/dataBoard/school/index.vue

@@ -0,0 +1,894 @@
+<template>
+  <div class="body1" v-loading="isLoading">
+    <!-- 综合数据 -->
+    <div class="left">
+      <div class="top">
+        <div class="titleBox">
+          <div class="title">基础概况</div>
+        </div>
+        <div class="dataBox">
+          <div class="info_box">
+            <div class="info blueBG">
+              <span>用户总数</span>
+              <span>{{ count }}</span>
+            </div>
+            <div class="info greenBG">
+              <span>周使用频次</span>
+              <span>{{ weekCount }}</span>
+            </div>
+            <div class="info blueBG">
+              <span>登录频次</span>
+              <span>{{ loginCount }}</span>
+            </div>
+            <div class="info greenBG">
+              <span>人均使用频次</span>
+              <span>{{ (loginCount / count).toFixed(0) }}</span>
+            </div>
+          </div>
+          <loginCount style="height: calc(100% - 140px)" :monthArray="loginCountMonthArray"></loginCount>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">在线时长</div>
+        </div>
+        <div class="dataBox">
+          <div class="info_box">
+            <div class="info blueBG">
+              <span>累计时长</span>
+              <span>{{ loginTime.toFixed(0) }}小时</span>
+            </div>
+            <div class="info greenBG">
+              <span>人均时长</span>
+              <span>{{ (loginTime / count).toFixed(0) }}小时</span>
+            </div>
+          </div>
+          <loginTime :yearArray="loginCountYearArray" style="height: calc(100% - 70px)"></loginTime>
+        </div>
+      </div>
+    </div>
+    <div class="center">
+      <div class="top">
+        <div class="titleBox">
+          <div class="title">教师行为数据</div>
+        </div>
+        <div class="dataBox">
+          <div class="info_box" style="width: 95%">
+            <div class="info2 blueBG">
+              <span>上传课程总数</span>
+              <span>{{ courseCount }}</span>
+            </div>
+            <div class="info2 greenBG">
+              <span>各年级平均课程数</span>
+              <span>{{ gradeCourse.toFixed(0) }}</span>
+            </div>
+            <div class="info2 blueBG">
+              <span>各学科平均课程数</span>
+              <span>{{ subjectCourse.toFixed(0) }}</span>
+            </div>
+            <div class="info2 greenBG">
+              <span>教师人均课程数</span>
+              <span>{{ (courseCount / teacherCount).toFixed(0) }}</span>
+            </div>
+          </div>
+          <teacherInfo style="height: calc(100% - 70px)" :courseArray="courseArray" @openCourse="openCourse"></teacherInfo>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">平台使用深度</div>
+        </div>
+        <div class="dataBox">
+          <div class="depth_box">
+            <div class="depth">
+              <span>上传课程</span>
+              <div>
+                <el-progress :width="80" type="circle"
+                  :percentage="lightJson.upCourseTeachers ? ((lightJson.upCourseTeachers / lightJson.teachers) * 100).toFixed(0) : 0"
+                  :stroke-width="15" :format="format" color="#106BFF"></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>上传项目</span>
+              <div>
+                <el-progress :width="80" type="circle" :percentage="lightJson.upCourseUsers ? ((lightJson.upCourseUsers / lightJson.users) * 100).toFixed(0) : 0" :stroke-width="15" :format="format"
+                  color="#106BFF"></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>使用工具</span>
+              <div>
+                <el-progress :width="80" type="circle" :percentage="lightJson.toolUsers ? ((lightJson.toolUsers / lightJson.users) * 100).toFixed(0) : 0" :stroke-width="15" :format="format"
+                  color="#106BFF"></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>课程评价</span>
+              <div>
+                <el-progress :width="80" type="circle" :percentage="lightJson.rateUser ? ((lightJson.rateUser / lightJson.users) * 100).toFixed(0) : 0" :stroke-width="15" :format="format"
+                  color="#106BFF"></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>互动交流</span>
+              <div>
+                <el-progress :width="80" type="circle" :percentage="lightJson.commentUsers ? ((lightJson.commentUsers / lightJson.users) * 100).toFixed(0) : 0" :stroke-width="15" :format="format"
+                  color="#106BFF"></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>参与课程</span>
+              <div>
+                <el-progress :width="80" type="circle" :percentage="lightJson.gCourseTeachers ? ((lightJson.gCourseTeachers / lightJson.teachers) * 100).toFixed(0) : 0" :stroke-width="15" :format="format"
+                  color="#106BFF"></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>参与项目</span>
+              <div>
+                <el-progress :width="80" type="circle" :percentage="lightJson.gCourseUsers ? ((lightJson.gCourseUsers / lightJson.users) * 100).toFixed(0) : 0" :stroke-width="15" :format="format"
+                  color="#106BFF"></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>使用工具</span>
+              <div>
+                <el-progress :width="80" type="circle" :percentage="25" :stroke-width="15" :format="format"
+                  color="#106BFF"></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>协同合作</span>
+              <div>
+                <el-progress :width="80" type="circle" :percentage="lightJson.upgCourseTeachers ? ((lightJson.upgCourseTeachers / lightJson.teachers) * 100).toFixed(0) : 0" :stroke-width="15" :format="format"
+                  color="#106BFF"></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>合作交流</span>
+              <div>
+                <el-progress :width="80" type="circle" :percentage="76" :stroke-width="15" :format="format"
+                  color="#106BFF"></el-progress>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="right">
+      <div class="top">
+        <div class="titleBox">
+          <div class="title">课程数量</div>
+          <el-select v-model="cType" @change="typeChange" class="selectBox">
+            <el-option label="全部" value=""></el-option>
+            <el-option label="年级" value="grade"></el-option>
+            <el-option label="主题" value="theme"></el-option>
+            <el-option label="学科" value="subject"></el-option>
+          </el-select>
+
+        </div>
+        <div class="dataBox">
+          <div class="course_box">
+            <div class="info_box">
+              <div class="info3 blueBG">
+                <span>课程总数</span>
+                <span>{{ courseCount }}</span>
+              </div>
+              <div class="info3 greenBG">
+                <span>类别总数</span>
+                <span>{{ typeCount }}</span>
+              </div>
+              <div class="info3 blueBG">
+                <span>类别平均</span>
+                <span>{{ (courseCount / typeCount).toFixed(0) }}</span>
+              </div>
+            </div>
+            <div class="course_box_p">
+              <courseInfo :courseNumberArray="courseNumberArray" @openCourse="openCourse2"></courseInfo>
+            </div>
+          </div>
+          <cateRank style="height: calc(100% - 50% - 10px); overflow: auto" :courseNumberArray="courseNumberArray">
+          </cateRank>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">学生综合评价</div>
+          <el-select v-model="eva" @change="typeChange2" @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>
+        <div class="dataBox">
+          <studentInfo :evCourseArray="evCourseArray" :eva="eva"></studentInfo>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import loginCount from "./loginCount";
+import loginTime from "./loginTime";
+import teacherInfo from "./teacherInfo";
+import courseInfo from "./courseInfo";
+import studentInfo from "./studentInfo";
+import cateRank from "./cateRank";
+export default {
+  components: {
+    loginCount,
+    loginTime,
+    teacherInfo,
+    courseInfo,
+    studentInfo,
+    cateRank,
+  },
+  props: {
+    oid: {
+      type: String,
+    },
+    org: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      isLoading: false,
+      count: 0,
+      loginCount: 0,
+      loginTime: 0,
+      courseCount: 0,
+      teacherCount: 0,
+      loginCountMonthArray: [],
+      weekCount: 0,
+      loginCountYearArray: [],
+      gradeCourse: 0,
+      subjectCourse: 0,
+      courseArray: [],
+      cType: '',
+      gradeArray: [],
+      subjectArray: [],
+      themeArray: [],
+      allArray: [],
+      courseNumberArray: [],
+      typeCount: 0,
+      lightJson: {
+        users: 0,
+        teachers: 0,
+        students: 0,
+        upCourseTeachers: 0,
+        gCourseTeachers: 0,
+        upCourseUsers: 0,
+        gCourseUsers: 0,
+        toolUsers: 0,
+        rateUser: 0,
+        upgCourseTeachers: 0,
+        commentUsers: 0,
+      },
+      evArray:[],
+      eva:'',
+      evCourseArray:[],
+      minWidth:0
+    }
+  },
+  mounted() {
+    this.getData();
+  },
+  methods: {
+    setMinWidth (val) {
+      this.minWidth = val.srcElement.clientWidth
+    },
+    openCourse(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 || '',
+        }, 
+        "*"
+      );
+    },
+    openCourse2(index){
+      console.log(index);
+      // console.log(this.courseNumberArray);
+      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
+      for (key in this.gradeArray) {
+        if (this.gradeArray.hasOwnProperty.call(this.gradeArray, key)) {
+          const element = this.gradeArray[key];
+          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
+          }
+        }
+      }
+      for (key in this.themeArray) {
+        if (this.themeArray.hasOwnProperty.call(this.themeArray, key)) {
+          const element = this.themeArray[key];
+          if(element.typeid == id){
+            typeb = id
+          }
+        }
+      }
+      window.parent.postMessage(
+        { 
+          tools: "openCourse",
+          typea: typea || "",
+          typeb: typeb || "",
+          typed: typed || "",
+        }, 
+        "*"
+      );
+    },
+    getData() {
+      this.isLoading = true;
+      let params = [
+        {
+          oid: this.oid,
+          org: this.org,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "selectDataBoardSchool", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.count = res.data[0][0].count
+          this.loginCount = res.data[1][0].loginCount
+          this.loginTime = parseInt(res.data[3][0].time) / 60 / 60
+          this.courseCount = res.data[5][0].courseCount
+          this.teacherCount = res.data[6][0].count
+
+          let loginCountMonthArray = []
+          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,
+                student: 0,
+                teacher: 0
+              })
+            } else {
+              loginCountMonthArray.push({
+                Month: i,
+                Year: Year,
+                student: 0,
+                teacher: 0
+              })
+            }
+          }
+          loginCountMonthArray = loginCountMonthArray.reverse()
+          let teacherLoginCountYear = res.data[7] // 老师半年登录次数统计
+          let studentLoginCountYear = res.data[8] // 学生半年登录次数统计
+
+          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()
+            for (var j = 0; j < loginCountMonthArray.length; j++) {
+              if (_month == loginCountMonthArray[j].Month && _year == loginCountMonthArray[j].Year) {
+                loginCountMonthArray[j].teacher++
+                break;
+              }
+            }
+          }
+          for (var i = 0; i < studentLoginCountYear.length; i++) {
+            let _date = new Date(studentLoginCountYear[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].student++
+                break;
+              }
+            }
+          }
+          console.log(loginCountMonthArray);
+          this.loginCountMonthArray = loginCountMonthArray
+
+          this.weekCount = res.data[9][0].count
+
+          let loginCountYear = res.data[10]
+          let loginCountYearArray = []
+          for (var i = Month; i > Month - 12; i--) {
+            if (i <= 0) {
+              loginCountYearArray.push({
+                Year: Year - 1,
+                Month: 12 + i,
+                mon: 0,
+                tue: 0,
+                wed: 0,
+                thur: 0,
+                fri: 0,
+                sat: 0,
+                sun: 0,
+              })
+            } else {
+              loginCountYearArray.push({
+                Month: i,
+                Year: Year,
+                mon: 0,
+                tue: 0,
+                wed: 0,
+                thur: 0,
+                fri: 0,
+                sat: 0,
+                sun: 0,
+              })
+            }
+          }
+          loginCountYearArray = loginCountYearArray.reverse()
+          for (var i = 0; i < loginCountYear.length; i++) {
+            let _date = new Date(loginCountYear[i].create_at)
+            var _month = _date.getMonth() + 1
+            var _year = _date.getFullYear()
+            var _day = _date.getDay()
+            let dayArray = ['sun', 'mon', 'tue', 'wed', 'thur', 'fri', 'sat']
+            for (var j = 0; j < loginCountYearArray.length; j++) {
+              if (_month == loginCountYearArray[j].Month && _year == loginCountYearArray[j].Year) {
+                loginCountYearArray[j][dayArray[_day]]++
+                break;
+              }
+            }
+          }
+          console.log(loginCountYearArray);
+          this.loginCountYearArray = loginCountYearArray
+
+          let _grade = res.data[11] //年级
+          let _subject = res.data[12]  //学科
+          let _course = res.data[13] //课程
+          let _gradeCourse = 0 //各年级上传课程
+          let _subjectCourse = 0 //各学科上传课程
+          let _courseArray = []
+          _subject.push({ name: '其他' })
+
+          for (var i = 0; i < _grade.length; i++) {
+            _courseArray.push({
+              name: _grade[i].name,
+              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)
+                }
+              }
+
+            }
+            for (var j = 0; j < _subject.length; j++) {
+              _courseArray[i].subject.push({
+                name: _subject[j].name,
+                id: _subject[j].id,
+                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++
+                }
+              }
+            }
+            let sum = 0
+            for (var j = 0; j < _courseArray[i].subject.length - 1; j++) {
+              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
+          }
+          for (var j = 0; j < _subject.length; j++) {
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _subject[j].id) {
+                _subjectCourse++
+              }
+            }
+          }
+          console.log(_courseArray);
+          this.gradeCourse = _gradeCourse / _grade.length
+          this.subjectCourse = _subjectCourse / _subject.length
+          this.courseArray = _courseArray
+
+          let _theme = res.data[14] //主题
+
+          this.typeCount = _grade.length + _subject.length + _theme.length
+          let _gradeArray = []
+          let _subjectArray = []
+          let _themeArray = []
+
+          for (var i = 0; i < _grade.length; i++) {
+            _gradeArray.push({
+              name: _grade[i].name,
+              typeid: _grade[i].id,
+              course: 0
+            })
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _grade[i].id) {
+                _gradeArray[i].course++
+              }
+            }
+          }
+
+          for (var i = 0; i < _subject.length; i++) {
+            _subjectArray.push({
+              name: _subject[i].name,
+              typeid: _subject[i].id,
+              course: 0
+            })
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _subject[i].id) {
+                _subjectArray[i].course++
+              }
+            }
+          }
+
+
+          for (var i = 0; i < _theme.length; i++) {
+            _themeArray.push({
+              name: _theme[i].name,
+              typeid: _theme[i].id,
+              course: 0
+            })
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _theme[i].id) {
+                _themeArray[i].course++
+              }
+            }
+          }
+
+
+
+          this.gradeArray = _gradeArray
+          this.subjectArray = _subjectArray
+          this.themeArray = _themeArray
+          this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray]
+          this.typeChange();
+
+          let _teachers = res.data[15][0].count //老师数量
+          let _students = res.data[16][0].count //学生数量
+          let _upCourseTeachers = res.data[17][0].count //上传课程老师的数量
+          let _gCourseTeachers = res.data[18][0].count //参与课程的老师
+          let _upCourseUsers = res.data[19][0].count //上传项目的用户
+          let _gCourseUsers = res.data[20][0].count //参与项目的用户
+          let _toolUsers = res.data[21][0].count //使用工具的用户
+          let _rateUser = res.data[22][0].count //被评价的用户
+          let _upgCourseTeachers = res.data[23][0].count //参与协同课程的老师
+          let _commentUsers = res.data[24][0].count //参与互动交流的用户
+
+          this.lightJson = {
+            users: this.count,
+            teachers: _teachers,
+            students: _students,
+            upCourseTeachers: _upCourseTeachers,
+            gCourseTeachers: _gCourseTeachers,
+            upCourseUsers: _upCourseUsers,
+            gCourseUsers: _gCourseUsers,
+            toolUsers: _toolUsers,
+            rateUser: _rateUser,
+            upgCourseTeachers: _upgCourseTeachers,
+            commentUsers: _commentUsers,
+          }
+
+
+          let _evArray = res.data[25] //目标数组
+          let _evWorkArray = res.data[26] //目标课程的作业
+          let _evCourseArray = [] //计算总分 
+          let _evCourse = [] //筛选有目标的数组 
+          for(var i = 0;i<_evWorkArray.length;i++){
+              let courseJson = JSON.parse(_evWorkArray[i].chapters)
+              let _rate = JSON.parse(_evWorkArray[i].rate)
+              delete _rate.content
+              if(courseJson[_evWorkArray[i].stage] && 
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task] && 
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList &&
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList.length){
+                let _elist = courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList
+                let _rateC = Object.keys(_rate)
+                let json = {}
+                for(var j = 0;j<_rateC.length;j++){
+                  for(var k = 0;k<_elist.length;k++){
+                    if(_elist[k].value == _rateC[j] && _elist[k].target){
+                      json[_elist[k].target[0]] = _rate[_rateC[j]]
+                      break;
+                    }
+                  }
+                }
+                if(Object.keys(json).length){
+                  _evCourse.push({
+                    evid:_evWorkArray[i].evaId,
+                    rateJson:json
+                  })
+                }
+              }
+          }
+          for(var i = 0;i<_evArray.length;i++){
+            _evCourseArray.push({
+              title:_evArray[i].title,
+              evid:_evArray[i].id,
+              evJson:{}
+            })
+            for(var j = 0;j<_evCourse.length;j++){
+              if(_evArray[i].id == _evCourse[j].evid){
+                let _rate = Object.keys(_evCourse[j].rateJson)
+                for(var k = 0;k<_rate.length;k++){
+                  if(_evCourseArray[i].evJson[_rate[k]]){
+                    _evCourseArray[i].evJson[_rate[k]].push(_evCourse[j].rateJson[_rate[k]])
+                  }else{
+                    _evCourseArray[i].evJson[_rate[k]] = [_evCourse[j].rateJson[_rate[k]]]
+                  }
+                }
+              }
+            }
+          }
+          for(var i = 0;i < _evCourseArray.length; i++){
+            _evCourseArray[i].indicator = []
+            _evCourseArray[i].value = []
+            let evJson = Object.keys(_evCourseArray[i].evJson)
+            for(var j = 0;j < evJson.length;j++){
+              _evCourseArray[i].indicator.push({
+                name:evJson[j],
+                max: 5 
+              })
+              let sum = 0
+              _evCourseArray[i].evJson[evJson[j]].forEach((value)=>{
+                sum+=value
+              })
+              _evCourseArray[i].value.push((sum / _evCourseArray[i].evJson[evJson[j]].length).toFixed(1))
+            }
+          }
+          this.evArray = _evArray
+          this.eva = _evArray[0].id
+          this.evCourseArray = _evCourseArray
+          this.$forceUpdate();
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    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
+      }
+      this.$forceUpdate();
+    },
+    typeChange2(){
+
+    },
+    format(percentage) {
+      return percentage;
+    },
+  },
+};
+</script>
+
+
+<style scoped>
+.body1 {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  padding: 20px;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.left {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+}
+
+.left>.top {
+  width: 100%;
+  height: calc(100% / 5 * 2.8 - 20px);
+  background: #fff;
+  border-radius: 5px;
+  margin: 0 0 20px 0;
+}
+
+.left>.bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2.2);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.center {
+  width: calc(100% / 4 * 2 - 40px);
+  height: 100%;
+  margin: 0 20px;
+}
+
+.center>.top {
+  width: 100%;
+  height: calc(100% / 5 * 2.8 - 20px);
+  background: #fff;
+  border-radius: 5px;
+  margin: 0 0 20px 0;
+}
+
+.center>.bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2.2);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.right {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+}
+
+.right>.top {
+  width: 100%;
+  height: calc(100% / 5 * 2.8 - 20px);
+  background: #fff;
+  border-radius: 5px;
+  margin: 0 0 20px 0;
+}
+
+.right>.bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2.2);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.titleBox {
+  height: 40px;
+  display: flex;
+  align-items: center;
+  padding: 0 15px;
+  width: 100%;
+}
+
+.titleBox>.title {
+  font-weight: 700;
+}
+
+.dataBox {
+  height: calc(100% - 40px);
+  width: 100%;
+}
+
+.info_box {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  justify-content: space-between;
+  width: 90%;
+  margin: 0 auto;
+}
+
+.info_box>.info2,
+.info_box>.info3,
+.info_box>.info {
+  width: calc(50% - 10px);
+  display: flex;
+  flex-direction: column;
+  height: 60px;
+  justify-content: center;
+  padding: 0 10px;
+  box-sizing: border-box;
+  margin-bottom: 10px;
+  border-radius: 5px;
+}
+
+.info_box>.info2 {
+  width: calc(100% / 4 - 10px);
+  align-items: flex-end;
+}
+
+.info_box>.info3 {
+  width: 100%;
+  margin-bottom: 5px;
+}
+
+.info_box>.info2>span:nth-child(1),
+.info_box>.info3>span:nth-child(1),
+.info_box>.info>span:nth-child(1) {
+  font-size: 12px;
+  /* margin: 0 0 5px 0; */
+  color: #565e6a;
+}
+
+.info_box>.info2>span:nth-child(2),
+.info_box>.info3>span:nth-child(2),
+.info_box>.info>span:nth-child(2) {
+  font-size: 22px;
+  font-weight: 700;
+}
+
+.blueBG {
+  background: linear-gradient(180deg,
+      rgba(224, 234, 251, 0.2) 0%,
+      rgba(54, 130, 252, 0.3) 100%);
+}
+
+.greenBG {
+  background: linear-gradient(180deg,
+      rgb(211, 246, 228, 0.2) 0%,
+      rgb(23, 196, 105, 0.3) 100%);
+}
+
+.depth_box {
+  display: flex;
+  flex-wrap: wrap;
+  height: 100%;
+  width: 95%;
+  margin: 0 auto;
+  overflow: hidden;
+  justify-content: space-between;
+}
+
+.depth {
+  width: calc(100% / 5 - 10px);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+
+.depth>span:nth-child(1) {
+  font-size: 14px;
+  font-weight: 700;
+  margin: 0 0 10px;
+}
+
+.depth>div:nth-child(1) {}
+
+.course_box {
+  display: flex;
+  height: 50%;
+  width: 90%;
+  margin: 0 auto;
+}
+
+.course_box .info_box {
+  height: 100%;
+  width: 100px;
+  flex-direction: column;
+  margin: 0;
+  flex-wrap: nowrap;
+}
+
+.course_box_p {
+  width: calc(100% - 100px);
+}
+
+.selectBox {
+  width: 80px;
+  margin-left: 10px;
+}
+
+.selectBox>>>.el-input__inner {
+  height: 30px;
+  line-height: 30px;
+}
+
+.selectBox>>>.el-input__icon {
+  line-height: 30px;
+}
+</style>

+ 153 - 0
src/components/pages/dataBoard/school/loginCount/index.vue

@@ -0,0 +1,153 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    props: {
+        monthArray: {
+            type: Array,
+            default:[]
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                teacher: [],
+                student: [],
+            },
+            option: {
+                tooltip: {
+                    trigger: 'axis'
+                },
+                legend: {
+                    data: ['老师', '学生'],
+                    right: '10'
+                },
+                grid: {
+                    top: '30',
+                    left: '5%',
+                    right: '5%',
+                    bottom: '5%',
+                    containLabel: true
+                },
+                xAxis: {
+                    type: 'category',
+                    boundaryGap: true,
+                    // data: ['1月', '2月', '3月', '4月', '5月', '6月']
+                    data: []
+                },
+                yAxis: {
+                    type: 'value'
+                },
+                series: [
+                    {
+                        name: '老师',
+                        type: 'line',
+                        // data: [120, 50, 101, 130, 110, 120]
+                        data: []
+                    },
+                    {
+                        name: '学生',
+                        type: 'line',
+                        // data: [220, 182, 191, 234, 290, 330]
+                        data: []
+                    },
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+                this.option.xAxis.data = option.xdata;
+                this.option.series[0].data = option.teacher;
+                this.option.series[1].data = option.student;
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+    },
+    watch: {
+        monthArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.ooption = {
+                    xdata: [],
+                    teacher: [],
+                    student: [],
+                }
+                let _array = newValue
+                for (var i = 0; i < _array.length; i++) {
+                    this.ooption.xdata.push(_array[i].Month + '月')
+                    this.ooption.teacher.push(_array[i].teacher)
+                    this.ooption.student.push(_array[i].student)
+                }
+
+                if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                } else {
+                    this.option.xAxis.data = this.ooption.xdata;
+                    this.option.series[0].data = this.ooption.teacher;
+                    this.option.series[1].data = this.ooption.student;
+                    this.chartObj.setOption(this.option);
+                }
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.ooption = {
+            xdata: [],
+            teacher: [],
+            student: [],
+        }
+        let _array = this.monthArray
+        for (var i = 0; i < _array.length; i++) {
+            this.ooption.xdata.push(_array[i].Month + '月')
+            this.ooption.teacher.push(_array[i].teacher)
+            this.ooption.student.push(_array[i].student)
+        }
+        this.setChart(this.ooption);
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    /* display: flex; */
+    position: relative;
+    border-radius: 5px;
+    /* border: 1px solid #eee; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 95%;
+    background: #fff;
+}
+</style>
+  

+ 202 - 0
src/components/pages/dataBoard/school/loginTime/index.vue

@@ -0,0 +1,202 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    props: {
+        yearArray: {
+            type: Array,
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                sdata: [],
+            },
+            option: {
+                tooltip: {
+                    position: 'top'
+                },
+                grid: {
+                    top: '50',
+                    left: '5%',
+                    right: '5%',
+                    bottom: '5%',
+                    containLabel: true
+                },
+                xAxis: {
+                    type: 'category',
+                    // data: [
+                    //     '1月', '2月', '3月', '4月', '5月', '6月', '7月',
+                    //     '8月', '9月', '10月', '11月', '12月'
+                    // ],
+                    data: [],
+                    splitArea: {
+                        show: true
+                    }
+                },
+                yAxis: {
+                    type: 'category',
+                    data: [
+                        '星期天', '星期一', '星期二', '星期三',
+                        '星期四', '星期五', '星期六',
+                    ],
+                    splitArea: {
+                        show: true
+                    }
+                },
+                visualMap: {
+                    min: 0,
+                    max: 10,
+                    calculable: true,
+                    orient: 'horizontal',
+                    right: '10',
+                    top: '0%'
+                },
+                series: [
+                    {
+                        name: '',
+                        type: 'heatmap',
+                        data: [],
+                        label: {
+                            show: true
+                        },
+                        emphasis: {
+                            itemStyle: {
+                                shadowBlur: 10,
+                                shadowColor: 'rgba(0, 0, 0, 0.5)'
+                            }
+                        }
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+
+                this.option.xAxis.data = option.xdata;
+                this.option.series[0].data = option.sdata;
+                this.option.visualMap.max = option.max ? option.max : 0;
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+    },
+    watch: {
+        yearArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.ooption = {
+                    xdata: [],
+                    sdata: [],
+                    max:0
+                }
+                let _array = newValue
+                let max = []
+                for (var i = 0; i < _array.length; i++) {
+                    this.ooption.xdata.push(_array[i].Month + '月')
+                    this.ooption.sdata.push([i, 0, _array[i].sun])
+                    this.ooption.sdata.push([i, 1, _array[i].mon])
+                    this.ooption.sdata.push([i, 2, _array[i].tue])
+                    this.ooption.sdata.push([i, 3, _array[i].wed])
+                    this.ooption.sdata.push([i, 4, _array[i].thur])
+                    this.ooption.sdata.push([i, 5, _array[i].fri])
+                    this.ooption.sdata.push([i, 6, _array[i].sat])
+                    // let _data = [_array[i].Month-1,] //[月份,星期,值]
+                    max.push(_array[i].sun)
+                    max.push(_array[i].mon)
+                    max.push(_array[i].tue)
+                    max.push(_array[i].wed)
+                    max.push(_array[i].thur)
+                    max.push(_array[i].fri)
+                    max.push(_array[i].sat)
+                }
+                this.ooption.max = max.sort(function(a,b){
+                    return b-a;
+                })[0];
+                if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                } else {
+                    this.option.xAxis.data = this.ooption.xdata;
+                    this.option.series[0].data = this.ooption.sdata;
+                    this.option.visualMap.max = this.ooption.max ? this.ooption.max : 0;
+                    this.chartObj.setOption(this.option);
+                }
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.ooption = {
+            xdata: [],
+            sdata: [],
+            max:0
+        }
+        let _array = this.yearArray
+        let max = []
+        for (var i = 0; i < _array.length; i++) {
+            this.ooption.xdata.push(_array[i].Month + '月')
+            this.ooption.sdata.push([i, 0, _array[i].sun])
+            this.ooption.sdata.push([i, 1, _array[i].mon])
+            this.ooption.sdata.push([i, 2, _array[i].tue])
+            this.ooption.sdata.push([i, 3, _array[i].wed])
+            this.ooption.sdata.push([i, 4, _array[i].thur])
+            this.ooption.sdata.push([i, 5, _array[i].fri])
+            this.ooption.sdata.push([i, 6, _array[i].sat])
+            // let _data = [_array[i].Month-1,] //[月份,星期,值]
+            max.push(_array[i].sun)
+            max.push(_array[i].mon)
+            max.push(_array[i].tue)
+            max.push(_array[i].wed)
+            max.push(_array[i].thur)
+            max.push(_array[i].fri)
+            max.push(_array[i].sat)
+        }
+        this.ooption.max = max.sort(function(a,b){
+                    return b-a;
+                })[0];
+                
+        this.setChart(this.ooption);
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    position: relative;
+    border-radius: 5px;
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 95%;
+    background: #fff;
+}
+</style>
+  

+ 146 - 0
src/components/pages/dataBoard/school/studentInfo/index.vue

@@ -0,0 +1,146 @@
+<template>
+    <div class="data_body">
+        <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>
+</template>
+  
+<script>
+export default {
+    props: {
+        evCourseArray: {
+            type: Array,
+            default: []
+        },
+        eva: {
+            type: String,
+            default: ''
+        }
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                sdata: [],
+            },
+            option: {
+                tooltip: {},
+                radar: {
+                    // shape: 'circle',
+                    indicator: [
+                        // { name: '目标一', max: 5 },
+                        // { name: '目标二', max: 5 },
+                        // { name: '目标三', max: 5 },
+                        // { name: '目标四', max: 5 },
+                        // { name: '目标五', max: 5 }
+                    ]
+                },
+                series: [
+                    {
+                        areaStyle: {},
+                        name: '学生综合评价',
+                        type: 'radar',
+                        data: [
+                            {
+                                // 5, 4, 3, 5, 5, 2
+                                value: [],
+                                name: ''
+                            }
+                        ]
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+                this.option.radar.indicator = option.xdata;
+                this.option.series[0].data[0].value = option.sdata;
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+        setArray(array) {
+            this.ooption = {
+                xdata: [],
+                sdata: [],
+            }
+            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;
+                }
+            }
+            setTimeout(() => {
+                // if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                // } else {
+                //     this.option.radar.indicator = this.ooption.xdata;
+                //     this.option.series[0].data[0].value = this.ooption.sdata;
+                //     this.chartObj.setOption(this.option);
+                // }
+            }, 100);
+            this.$forceUpdate();
+        },
+    },
+    watch: {
+        evCourseArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(newValue)
+                this.$forceUpdate();
+            },
+        },
+        eva: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(this.evCourseArray)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.setArray(this.evCourseArray)
+        // this.setChart(this.ooption);
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    /* display: flex; */
+    position: relative;
+    border-radius: 5px;
+    /* border: 1px solid #eee; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 95%;
+    background: #fff;
+}
+</style>
+  

+ 238 - 0
src/components/pages/dataBoard/school/teacherInfo/index.vue

@@ -0,0 +1,238 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    props: {
+        courseArray: {
+            type: Array,
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                hours: [],
+                days: [],
+                data: [],
+            },
+            option: {
+                tooltip: {
+                    position: 'top',
+                    formatter: function (params) {
+                        // console.log(params);
+                        return params.marker + params.name + ' ' + params.data[1];//params.seriesName + '<br>' + params.
+
+                    }
+                },
+                title: [],
+                singleAxis: [],
+                series: []
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+                const hours = option.hours
+                // [
+                //     // '语文', '数学', '英语', '科学', '体育', '音乐', '美术',
+                //     // '劳动', '其他',
+                // ];
+                // prettier-ignore
+                const days = option.days
+                // [
+                //     // '一年级', '二年级', '三年级', '四年级', '五年级', '六年级'
+                // ];
+                // prettier-ignore
+                const data = option.data
+                // [
+                //     // [0, 0, 2], [0, 1, 1], [0, 2, 3], [0, 3, 0], [0, 4, 5], [0, 5, 5], [0, 6, 7], [0, 7, 8], [0, 8, 1],
+                //     // [1, 0, 5], [1, 1, 1], [1, 2, 2], [1, 3, 0], [1, 4, 5], [1, 5, 7], [1, 6, 7], [1, 7, 8], [1, 8, 6],
+                //     // [2, 0, 5], [2, 1, 2], [2, 2, 0], [2, 3, 2], [2, 4, 1], [2, 5, 5], [2, 6, 4], [2, 7, 4], [2, 8, 1],
+                //     // [3, 0, 1], [3, 1, 1], [3, 2, 1], [3, 3, 0], [3, 4, 5], [3, 5, 2], [3, 6, 7], [3, 7, 8], [3, 8, 5],
+                //     // [4, 0, 5], [4, 1, 3], [4, 2, 0], [4, 3, 3], [4, 4, 4], [4, 5, 2], [4, 6, 3], [4, 7, 5], [4, 8, 1],
+                //     // [5, 0, 5], [5, 1, 1], [5, 2, 0], [5, 3, 0], [5, 4, 5], [5, 5, 5], [5, 6, 7], [5, 7, 8], [5, 8, 3],
+                // ];
+                const title = [];
+                const singleAxis = [];
+                const series = [];
+                days.forEach(function (day, idx) {
+                    title.push({
+                        textBaseline: 'middle',
+                        top: ((idx + 0.5) * 90) / days.length + '%',
+                        text: day,
+                        textStyle: {
+                            fontSize: 12,
+                        },
+                    });
+                    singleAxis.push({
+                        left: 70,
+                        type: 'category',
+                        boundaryGap: false,
+                        data: hours,
+                        top: (idx * 90) / days.length + 5 + '%',
+                        height: 90 / days.length - 10 + '%'
+                    });
+                    series.push({
+                        singleAxisIndex: idx,
+                        coordinateSystem: 'singleAxis',
+                        type: 'scatter',
+                        data: [],
+                        symbolSize: function (dataItem) {
+                            return dataItem[1] * 3;
+                        }
+                    });
+                });
+                data.forEach(function (dataItem) {
+                    series[dataItem[0]].data.push([dataItem[1], dataItem[2]]);
+                });
+                chartObj.off('click')
+                let _this = this
+                chartObj.on('click', function (param) {  
+                    //param参数包含的内容有: 
+                    //param.name:X轴的值 
+                    //param.data:Y轴的值 
+                    //param.value:Y轴的值 
+                    //param.type:点击事件均为click 
+                    //param.seriesName:legend的名称 
+                    //param.seriesIndex:系列序号(series中当前图形是第几个图形第几个) 
+                    //param.dataIndex:数值序列(X轴上当前点是第几个点)
+                    //alert(param.seriesName);  //legend的名称
+                    console.log(param);  //X轴的值
+                    _this.$emit('openCourse',param.componentIndex,param.data[0])
+                });
+
+                this.option.title = title
+                this.option.singleAxis = singleAxis
+                this.option.series = series
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+        setJson(array) {
+            if (array != undefined && array.length > 0) {
+                this.ooption = {
+                    hours: [],
+                    days: [],
+                    data: [],
+                }
+                let _grade = []
+                let _subject = []
+                let data = []
+
+                array.forEach(function (item, idx) {
+                    _grade.push(item.name)
+                })
+
+                array[0].subject.forEach(function (item, idx) {
+                    _subject.push(item.name)
+                })
+                array.forEach(function (item, idx) {
+                    item.subject.forEach(function (item2, idx2) {
+                        data.push([idx, idx2, item2.course])
+                    })
+                })
+                this.ooption.hours = _subject
+                this.ooption.days = _grade
+                this.ooption.data = data
+                if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                } else {
+                    const hours = this.ooption.hours;
+                    // prettier-ignore
+                    const days = this.ooption.days;
+                    // prettier-ignore
+                    const data = this.ooption.data;
+                    const title = [];
+                    const singleAxis = [];
+                    const series = [];
+                    days.forEach(function (day, idx) {
+                        title.push({
+                            textBaseline: 'middle',
+                            top: ((idx + 0.5) * 90) / days.length + '%',
+                            text: day,
+                            textStyle: {
+                                fontSize: 12,
+                            },
+                        });
+                        singleAxis.push({
+                            left: 70,
+                            type: 'category',
+                            boundaryGap: false,
+                            data: hours,
+                            top: (idx * 90) / days.length + 5 + '%',
+                            height: 90 / days.length - 10 + '%'
+                        });
+                        series.push({
+                            singleAxisIndex: idx,
+                            coordinateSystem: 'singleAxis',
+                            type: 'scatter',
+                            data: [],
+                            symbolSize: function (dataItem) {
+                                return dataItem[1] * 3;
+                            }
+                        });
+                    });
+                    data.forEach(function (dataItem) {
+                        series[dataItem[0]].data.push([dataItem[1], dataItem[2]]);
+                    });
+
+                    this.option.title = title
+                    this.option.singleAxis = singleAxis
+                    this.option.series = series
+                    this.chartObj.setOption(this.option);
+                }
+            }
+        }
+    },
+    watch: {
+        courseArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setJson(newValue)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.setJson(this.courseArray)
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    position: relative;
+    border-radius: 5px;
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 95%;
+    background: #fff;
+}
+</style>
+  

+ 589 - 0
src/components/pages/dataBoard/student/index.vue

@@ -0,0 +1,589 @@
+<template>
+  <div class="body1" v-loading="isLoading">
+    <!-- 学生数据 -->
+    <div class="left">
+      <div class="top">
+        <div class="titleBox">
+          <div class="title">基础概况</div>
+        </div>
+        <div class="dataBox">
+          <div class="info_box">
+            <div class="info blueBG">
+              <span>学生总数</span>
+              <span>{{ count }}</span>
+            </div>
+            <div class="info greenBG">
+              <span>周使用频次</span>
+              <span>{{weekCount}}</span>
+            </div>
+            <div class="info blueBG">
+              <span>登录频次</span>
+              <span>{{ loginCount }}</span>
+            </div>
+            <div class="info greenBG">
+              <span>人均使用频次</span>
+              <span>{{ (loginCount / count).toFixed(0) }}</span>
+            </div>
+          </div>
+          <loginCount :monthArray="loginCountMonthArray" style="height: calc(100% - 140px)"></loginCount>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">学生行为数据</div>
+        </div>
+        <div class="dataBox">
+          <stuAct style="height: calc(100% - 20px)" :courseClass="courseClass"></stuAct>
+        </div>
+      </div>
+    </div>
+    <div class="center">
+      <div class="top">
+        <div class="titleBox">
+          <div class="title">学生综合评价</div>
+        </div>
+        <div class="dataBox">
+          <div class="info_box" style="width: 95%; justify-content: flex-start">
+            <div class="info2 blueBG">
+              <span>学生总数</span>
+              <span>{{ count }}</span>
+            </div>
+            <div class="info2 greenBG">
+              <span>班级总数</span>
+              <span>{{classList.length}}</span>
+            </div>
+            <div class="info2 blueBG">
+              <span>平均得分</span>
+              <span>{{scoreJun}}</span>
+            </div>
+          </div>
+          <studentInfo style="height: calc(100% - 70px)"></studentInfo>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">平台使用深度</div>
+        </div>
+        <div class="dataBox">
+          <div class="depth_box">
+            <div class="depth">
+              <span>参与课程</span>
+              <div>
+                <el-progress
+                  :width="90"
+                  type="circle"
+                  :percentage="36"
+                  :stroke-width="15"
+                  :format="format"
+                  color="#106BFF"
+                ></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>参与项目</span>
+              <div>
+                <el-progress
+                  :width="90"
+                  type="circle"
+                  :percentage="76"
+                  :stroke-width="15"
+                  :format="format"
+                  color="#106BFF"
+                ></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>使用工具</span>
+              <div>
+                <el-progress
+                  :width="90"
+                  type="circle"
+                  :percentage="76"
+                  :stroke-width="15"
+                  :format="format"
+                  color="#106BFF"
+                ></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>协同合作</span>
+              <div>
+                <el-progress
+                  :width="90"
+                  type="circle"
+                  :percentage="76"
+                  :stroke-width="15"
+                  :format="format"
+                  color="#106BFF"
+                ></el-progress>
+              </div>
+            </div>
+            <div class="depth">
+              <span>互动交流</span>
+              <div>
+                <el-progress
+                  :width="90"
+                  type="circle"
+                  :percentage="76"
+                  :stroke-width="15"
+                  :format="format"
+                  color="#106BFF"
+                ></el-progress>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="right">
+      <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-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>
+        <div class="dataBox">
+          <studentInfo2 :evCourseArray="evCourseArray" :eva="eva"></studentInfo2>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">在线时长</div>
+        </div>
+        <div class="dataBox">
+          <div class="info_box">
+            <div class="info blueBG">
+              <span>累计在线时长</span>
+              <span>{{ loginTime.toFixed(0) }}小时</span>
+            </div>
+            <div class="info greenBG">
+              <span>学生在线平均时长</span>
+              <span>{{ (loginTime / count).toFixed(0) }}小时</span>
+            </div>
+          </div>
+          <loginTime style="height: calc(100% - 70px)"></loginTime>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import loginCount from "./loginCount";
+import studentInfo from "./studentInfo";
+import studentInfo2 from "./studentInfo2";
+import loginTime from "./loginTime";
+import stuAct from "./stuAct";
+export default {
+  props: {
+    oid: {
+      type: String,
+    },
+    org: {
+      type: String,
+    },
+  },
+  components: {
+    loginCount,
+    studentInfo,
+    studentInfo2,
+    loginTime,
+    stuAct,
+  },
+  data() {
+    return {
+      isLoading: false,
+      count: 0,
+      loginCount: 0,
+      loginTime: 0,
+      loginCountMonthArray:[],
+      weekCount:0,
+      classList:[],
+      scoreJun:0,
+      evArray:[],
+      eva:'',
+      evCourseArray:[],
+      minWidth:0,
+      courseClass:[]
+    };
+  },
+  mounted() {
+    this.getData();
+  },
+  methods: {
+    setMinWidth (val) {
+      this.minWidth = val.srcElement.clientWidth
+    },
+    getData() {
+      this.isLoading = true;
+      let params = [
+        {
+          oid: this.oid,
+          org: this.org,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "selectDataBoardStudent", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.count = res.data[0][0].count;
+          this.loginCount = res.data[1][0].loginCount;
+          this.loginTime = parseInt(res.data[2][0].time) / 60 / 60;
+
+
+
+          let loginCountMonthArray = []
+          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,
+                student: 0,
+              })
+            } else {
+              loginCountMonthArray.push({
+                Month: i,
+                Year: Year,
+                student: 0,
+              })
+            }
+          }
+
+          loginCountMonthArray = loginCountMonthArray.reverse()
+          let studentLoginCountYear = res.data[3] // 学生半年登录次数统计
+
+          for (var i = 0; i < studentLoginCountYear.length; i++) {
+            let _date = new Date(studentLoginCountYear[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].student++
+                break;
+              }
+            }
+          }
+          this.loginCountMonthArray = loginCountMonthArray;
+          console.log(loginCountMonthArray);
+
+          this.weekCount = res.data[4][0].count
+          let _classList = res.data[5]
+          this.classList = _classList
+          let _scoreArray = res.data[6]
+          let _sumScore = 0
+          for(var i = 0; i< _scoreArray.length;i++){
+            let _score = JSON.parse(_scoreArray[i].score)
+            _sumScore += _score.wScore
+          }
+          this.scoreJun = (_sumScore / _scoreArray.length).toFixed(0)
+
+
+          let _evArray = res.data[7] //目标数组
+          let _evWorkArray = res.data[8] //目标课程的作业
+          let _evCourseArray = [] //计算总分 
+          let _evCourse = [] //筛选有目标的数组 
+          for(var i = 0;i<_evWorkArray.length;i++){
+              let courseJson = JSON.parse(_evWorkArray[i].chapters)
+              let _rate = JSON.parse(_evWorkArray[i].rate)
+              delete _rate.content
+              if(courseJson[_evWorkArray[i].stage] && 
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task] && 
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList &&
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList.length){
+                let _elist = courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList
+                let _rateC = Object.keys(_rate)
+                let json = {}
+                for(var j = 0;j<_rateC.length;j++){
+                  for(var k = 0;k<_elist.length;k++){
+                    if(_elist[k].value == _rateC[j] && _elist[k].target){
+                      json[_elist[k].target[0]] = _rate[_rateC[j]]
+                      break;
+                    }
+                  }
+                }
+                if(Object.keys(json).length){
+                  _evCourse.push({
+                    evid:_evWorkArray[i].evaId,
+                    rateJson:json
+                  })
+                }
+              }
+          }
+          for(var i = 0;i<_evArray.length;i++){
+            _evCourseArray.push({
+              title:_evArray[i].title,
+              evid:_evArray[i].id,
+              evJson:{}
+            })
+            for(var j = 0;j<_evCourse.length;j++){
+              if(_evArray[i].id == _evCourse[j].evid){
+                let _rate = Object.keys(_evCourse[j].rateJson)
+                for(var k = 0;k<_rate.length;k++){
+                  if(_evCourseArray[i].evJson[_rate[k]]){
+                    _evCourseArray[i].evJson[_rate[k]].push(_evCourse[j].rateJson[_rate[k]])
+                  }else{
+                    _evCourseArray[i].evJson[_rate[k]] = [_evCourse[j].rateJson[_rate[k]]]
+                  }
+                }
+              }
+            }
+          }
+          for(var i = 0;i < _evCourseArray.length; i++){
+            _evCourseArray[i].indicator = []
+            _evCourseArray[i].value = []
+            let evJson = Object.keys(_evCourseArray[i].evJson)
+            for(var j = 0;j < evJson.length;j++){
+              _evCourseArray[i].indicator.push({
+                name:evJson[j],
+                max: 5 
+              })
+              let sum = 0
+              _evCourseArray[i].evJson[evJson[j]].forEach((value)=>{
+                sum+=value
+              })
+              _evCourseArray[i].value.push((sum / _evCourseArray[i].evJson[evJson[j]].length).toFixed(1))
+            }
+          }
+          this.evArray = _evArray
+          this.eva = _evArray[0].id
+          this.evCourseArray = _evCourseArray
+
+          let _courseClassArray = res.data[9] //作业带课程
+          let _courseClass = []
+          for(var i = 0;i<_classList.length;i++){
+            _courseClass.push({
+              name:_classList[i].name,
+              works:0,
+              id:_classList[i].id
+            })
+            for(var j = 0;j<_courseClassArray.length;j++){
+              if(_courseClassArray[j].classid.indexOf(_classList[i].id) != -1){
+                _courseClass[i].works++
+              }
+            }
+          }
+          this.courseClass = _courseClass
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    format(percentage) {
+      return percentage;
+    },
+  },
+};
+</script>
+
+
+<style scoped>
+.body1 {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  padding: 20px;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.left {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+}
+
+.left > .top {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+  margin: 0 0 20px 0;
+}
+
+.left > .bottom {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.center {
+  width: calc(100% / 4 * 2 - 40px);
+  height: 100%;
+  margin: 0 20px;
+}
+
+.center > .top {
+  width: 100%;
+  height: calc(100% / 5 * 3 - 10px);
+  background: #fff;
+  border-radius: 5px;
+  margin: 0 0 20px 0;
+}
+
+.center > .bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.right {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+}
+
+.right > .top {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+  margin: 0 0 20px 0;
+}
+
+.right > .bottom {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.titleBox {
+  height: 40px;
+  display: flex;
+  align-items: center;
+  padding: 0 15px;
+  width: 100%;
+}
+
+.dataBox {
+  height: calc(100% - 40px);
+  width: 100%;
+}
+
+.titleBox {
+  height: 40px;
+  display: flex;
+  align-items: center;
+  padding: 0 15px;
+  width: 100%;
+}
+
+.titleBox > .title {
+  font-weight: 700;
+}
+
+.dataBox {
+  height: calc(100% - 40px);
+  width: 100%;
+}
+
+.info_box {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  justify-content: space-between;
+  width: 90%;
+  margin: 0 auto;
+}
+
+.info_box > .info2,
+.info_box > .info3,
+.info_box > .info {
+  width: calc(50% - 10px);
+  display: flex;
+  flex-direction: column;
+  height: 60px;
+  justify-content: center;
+  padding: 0 10px;
+  box-sizing: border-box;
+  margin-bottom: 10px;
+  border-radius: 5px;
+}
+
+.info_box > .info2 {
+  width: calc(100% / 4 - 10px);
+  align-items: flex-end;
+  margin-right: 10px;
+}
+
+.info_box > .info3 {
+  width: 100%;
+  margin-bottom: 5px;
+}
+
+.info_box > .info2 > span:nth-child(1),
+.info_box > .info3 > span:nth-child(1),
+.info_box > .info > span:nth-child(1) {
+  font-size: 12px;
+  /* margin: 0 0 5px 0; */
+  color: #565e6a;
+}
+
+.info_box > .info2 > span:nth-child(2),
+.info_box > .info3 > span:nth-child(2),
+.info_box > .info > span:nth-child(2) {
+  font-size: 22px;
+  font-weight: 700;
+}
+
+.blueBG {
+  background: linear-gradient(
+    180deg,
+    rgba(224, 234, 251, 0.2) 0%,
+    rgba(54, 130, 252, 0.3) 100%
+  );
+}
+
+.greenBG {
+  background: linear-gradient(
+    180deg,
+    rgb(211, 246, 228, 0.2) 0%,
+    rgb(23, 196, 105, 0.3) 100%
+  );
+}
+
+.depth_box {
+  display: flex;
+  flex-wrap: wrap;
+  height: 100%;
+  width: 95%;
+  margin: 0 auto;
+  overflow: hidden;
+  justify-content: space-between;
+}
+
+.depth {
+  width: calc(100% / 5 - 10px);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+
+.depth > span:nth-child(1) {
+  font-size: 14px;
+  font-weight: 700;
+  margin: 0 0 10px;
+}
+.depth > div:nth-child(1) {
+}
+
+.selectBox {
+  width: 80px;
+  margin-left: 10px;
+}
+
+.selectBox>>>.el-input__inner {
+  height: 30px;
+  line-height: 30px;
+}
+
+.selectBox>>>.el-input__icon {
+  line-height: 30px;
+}
+</style>

+ 135 - 0
src/components/pages/dataBoard/student/loginCount/index.vue

@@ -0,0 +1,135 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    props: {
+        monthArray: {
+            type: Array,
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                student: [],
+            },
+            option: {
+                tooltip: {
+                    trigger: 'axis'
+                },
+                grid: {
+                    top:'5%',
+                    left: '5%',
+                    right: '5%',
+                    bottom: '5%',
+                    containLabel: true
+                },
+                xAxis: {
+                    type: 'category',
+                    boundaryGap: true,
+                    // data: ['1月', '2月', '3月', '4月', '5月', '6月']
+                    data: []
+                },
+                yAxis: {
+                    type: 'value'
+                },
+                series: [
+                    {
+                        name: '学生',
+                        type: 'line',
+                        // data: [220, 182, 191, 234, 290, 330]
+                        data: []
+                    },
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+                this.option.xAxis.data = option.xdata;
+                this.option.series[0].data = option.student;
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+    },
+    watch: {
+        monthArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.ooption = {
+                    xdata: [],
+                    student: [],
+                }
+                let _array = newValue
+                for (var i = 0; i < _array.length; i++) {
+                    this.ooption.xdata.push(_array[i].Month + '月')
+                    this.ooption.student.push(_array[i].student)
+                }
+
+                if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                } else {
+                    this.option.xAxis.data = this.ooption.xdata;
+                    this.option.series[0].data = this.ooption.student;
+                    this.chartObj.setOption(this.option);
+                }
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.ooption = {
+            xdata: [],
+            student: [],
+        }
+        let _array = this.monthArray
+        for (var i = 0; i < _array.length; i++) {
+            this.ooption.xdata.push(_array[i].Month + '月')
+            this.ooption.student.push(_array[i].student)
+        }
+        this.setChart(this.ooption);
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    /* display: flex; */
+    position: relative;
+    border-radius: 5px;
+    /* border: 1px solid #eee; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 95%;
+    background: #fff;
+}
+</style>
+  

+ 92 - 0
src/components/pages/dataBoard/student/loginTime/index.vue

@@ -0,0 +1,92 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                sdata: [],
+            },
+            option: {
+                tooltip: {},
+                grid: {
+                    top: '5%',
+                    left: '5%',
+                    right: '5%',
+                    bottom: '5%',
+                    containLabel: true
+                },
+                xAxis: {
+                    type: 'value',
+                    boundaryGap: [0, 0.01]
+                },
+                yAxis: {
+                    type: 'category',
+                    data: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
+                },
+                series: [
+                    {
+                        type: 'bar',
+                        data: [180, 50, 70, 90, 100, 130]
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+                //   this.option.xAxis.data = option.xdata;
+                //   this.option.series[0].data = data;
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+    },
+    watch: {
+
+    },
+    mounted() {
+
+        this.setChart(this.ooption);
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    position: relative;
+    border-radius: 5px;
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 95%;
+    background: #fff;
+}
+</style>
+  

+ 103 - 0
src/components/pages/dataBoard/student/stuAct/index.vue

@@ -0,0 +1,103 @@
+<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-column label="排行" min-width="50" align="center">
+          <template slot-scope="scope">{{ scope.$index + 1 }}</template>
+        </el-table-column>
+        <el-table-column
+          prop="name"
+          label="班级名称"
+          min-width="80"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column prop="sum" label="作业数量" min-width="80" align="center">
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    courseClass: {
+      type: Array,
+      default: []
+    },
+  },
+  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" },
+      ],
+    };
+  },
+  methods: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    setArray(array){
+      this.tableData = []
+      for(var i = 0;i<array.length;i++){
+        this.tableData.push({
+          sum:array[i].works,
+          name:array[i].name
+        })
+      }
+      this.tableData = this.tableData.sort(function(a,b){
+        return b.sum - a.sum;
+      })
+    }
+  },
+  watch: {
+    courseClass: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.courseClass)
+  },
+};
+</script>
+
+<style scoped>
+.el-table >>> .even_row {
+  background-color: #f2f7ff !important;
+}
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+  overflow: auto;
+}
+</style>

+ 107 - 0
src/components/pages/dataBoard/student/studentInfo/index.vue

@@ -0,0 +1,107 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                sdata: [],
+            },
+            option: {
+                xAxis: {
+                    data: ['一年级一班', '一年级二班', '一年级三班', '一年级四班', '一年级五班', '一年级六班', '一年级七班']
+                },
+                tooltip: {
+                    formatter: function (params, ticket, callback) {
+                        return `最高分:${params.value[2]}</br>最低分:${params.value[1]}`;
+                    }
+                },
+                yAxis: {},
+                grid: {
+                    top:'5%',
+                    left: '0%',
+                    right: '0%',
+                    bottom: '5%',
+                    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]
+                        ],
+                        itemStyle: {
+                            color: "#0DDE70",
+                            borderColor: null
+                        }
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+                //   this.option.xAxis.data = option.xdata;
+                //   this.option.series[0].data = option.sdata;
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+    },
+    watch: {
+
+    },
+    mounted() {
+
+        this.setChart(this.ooption);
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    /* display: flex; */
+    position: relative;
+    border-radius: 5px;
+    /* border: 1px solid #eee; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 95%;
+    background: #fff;
+}
+</style>
+  

+ 146 - 0
src/components/pages/dataBoard/student/studentInfo2/index.vue

@@ -0,0 +1,146 @@
+<template>
+    <div class="data_body">
+        <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>
+</template>
+  
+<script>
+export default {
+    props: {
+        evCourseArray: {
+            type: Array,
+            default: []
+        },
+        eva: {
+            type: String,
+            default: ''
+        }
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                sdata: [],
+            },
+            option: {
+                tooltip: {},
+                radar: {
+                    // shape: 'circle',
+                    indicator: [
+                        // { name: '目标一', max: 5 },
+                        // { name: '目标二', max: 5 },
+                        // { name: '目标三', max: 5 },
+                        // { name: '目标四', max: 5 },
+                        // { name: '目标五', max: 5 }
+                    ]
+                },
+                series: [
+                    {
+                        areaStyle: {},
+                        name: '学生综合评价',
+                        type: 'radar',
+                        data: [
+                            {
+                                // 5, 4, 3, 5, 5, 2
+                                value: [],
+                                name: ''
+                            }
+                        ]
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+                this.option.radar.indicator = option.xdata;
+                this.option.series[0].data[0].value = option.sdata;
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+        setArray(array) {
+            this.ooption = {
+                xdata: [],
+                sdata: [],
+            }
+            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;
+                }
+            }
+            setTimeout(() => {
+                // if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                // } else {
+                //     this.option.radar.indicator = this.ooption.xdata;
+                //     this.option.series[0].data[0].value = this.ooption.sdata;
+                //     this.chartObj.setOption(this.option);
+                // }
+            }, 100);
+            this.$forceUpdate();
+        },
+    },
+    watch: {
+        evCourseArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(newValue)
+                this.$forceUpdate();
+            },
+        },
+        eva: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(this.evCourseArray)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.setArray(this.evCourseArray)
+        // this.setChart(this.ooption);
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    /* display: flex; */
+    position: relative;
+    border-radius: 5px;
+    /* border: 1px solid #eee; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 95%;
+    background: #fff;
+}
+</style>
+  

+ 109 - 0
src/components/pages/dataBoard/teacher/chartList/funPlot.vue

@@ -0,0 +1,109 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div
+        id="charts_canvas"
+        class="echart"
+        style="width: 100%; height: 100%"
+      ></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      chartObj: null,
+      option: {
+        tooltip: {
+          trigger: "item",
+          formatter: "{b} : {c}%",
+        },
+        legend: {
+          data: ["评价", "授课", "创建", "登录"],
+        },
+        series: [
+          {
+            type: "funnel",
+            left: "10%",
+            top: 60,
+            bottom: 20,
+            width: "95%",
+            min: 0,
+            max: 100,
+            minSize: "0%",
+            maxSize: "100%",
+            sort: "descending",
+            label: {
+              show: true,
+              position: "inside",
+            },
+            labelLine: {
+              length: 10,
+              lineStyle: {
+                width: 1,
+                type: "solid",
+              },
+            },
+            itemStyle: {
+              borderColor: "#fff",
+              borderWidth: 1,
+            },
+            data: [
+              { value: 20, name: "登录" },
+              { value: 40, name: "创建" },
+              { value: 60, name: "授课" },
+              { value: 80, name: "评价" },
+            ],
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart() {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+  },
+  mounted() {
+    this.setChart(this.option);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+  created() {
+    this.setChart();
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 71 - 0
src/components/pages/dataBoard/teacher/chartList/teaAct.vue

@@ -0,0 +1,71 @@
+<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-column prop="rank" label="排行" min-width="50" align="center">
+        </el-table-column>
+        <el-table-column
+          prop="name"
+          label="类别名称"
+          min-width="80"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column prop="sum" label="授课次数" min-width="80" align="center">
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  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" },
+      ],
+    };
+  },
+  methods: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+  },
+};
+</script>
+
+<style scoped>
+.el-table >>> .even_row {
+  background-color: #f2f7ff !important;
+}
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+  overflow: auto;
+}
+</style>

+ 228 - 0
src/components/pages/dataBoard/teacher/chartList/teaData.vue

@@ -0,0 +1,228 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    courseArray: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        hours: [],
+        days: [],
+        data: [],
+      },
+      option: {
+        tooltip: {
+          position: "top",
+          formatter: function (params) {
+            // console.log(params);
+            return params.marker + params.name + " " + params.data[1]; //params.seriesName + '<br>' + params.
+          },
+        },
+        title: [],
+        singleAxis: [],
+        series: [],
+      },
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        // 初始化雷达图
+        const hours = option.hours;
+        // const hours = [
+        //   "语文",
+        //   "数学",
+        //   "英语",
+        //   "科学",
+        //   "体育",
+        //   "音乐",
+        //   "美术",
+        //   "劳动",
+        //   "其他",
+        // ];
+        // prettier-ignore
+        const days = option.days
+        // const days = [
+        //     '一年级', '二年级', '三年级',
+        //     '四年级', '五年级', '六年级'
+        // ];
+        // prettier-ignore
+        const data = option.data
+        // const data = [[0,0,3],[0,2,4],[0,3,8],[0,6,6],[0,8,4],[1,0,3],[1,2,4],[1,3,8],[1,6,6],[1,8,4],[2,1,13],[2,3,6],[2,4,3],[2,6,6],[2,8,4],[3,3,6],[3,4,3],[3,6,6],[3,7,4],[4,0,10],[4,2,13],[4,3,6],[4,4,3],[4,6,6],[4,7,3],[5,2,4],[5,3,6],[5,4,3],[5,5,10],[5,6,10],[5,7,3]];
+        const title = [];
+        const singleAxis = [];
+        const series = [];
+        days.forEach(function (day, idx) {
+          title.push({
+            textBaseline: "middle",
+            top: ((idx + 0.5) * 90) / days.length + "%",
+            text: day,
+            textStyle: {
+              fontSize: 12,
+            },
+          });
+          singleAxis.push({
+            left: 70,
+            type: "category",
+            boundaryGap: false,
+            data: hours,
+            top: (idx * 90) / days.length + 5 + "%",
+            height: 90 / days.length - 10 + "%",
+          });
+          series.push({
+            singleAxisIndex: idx,
+            coordinateSystem: "singleAxis",
+            type: "scatter",
+            data: [],
+            symbolSize: function (dataItem) {
+              return dataItem[1] * 3;
+            },
+          });
+        });
+        data.forEach(function (dataItem) {
+          series[dataItem[0]].data.push([dataItem[1], dataItem[2]]);
+        });
+        chartObj.off('click')
+        let _this = this
+        chartObj.on('click', function (param) {
+          console.log(param);  //X轴的值
+          _this.$emit('openCourse', param.componentIndex, param.data[0])
+        });
+        this.option.title = title;
+        this.option.singleAxis = singleAxis;
+        this.option.series = series;
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    setJson(array) {
+      if (array != undefined && array.length > 0) {
+        this.ooption = {
+          hours: [],
+          days: [],
+          data: [],
+        };
+        let _grade = [];
+        let _subject = [];
+        let data = [];
+
+        array.forEach(function (item, idx) {
+          _grade.push(item.name);
+        });
+
+        array[0].subject.forEach(function (item, idx) {
+          _subject.push(item.name);
+        });
+        array.forEach(function (item, idx) {
+          item.subject.forEach(function (item2, idx2) {
+            data.push([idx, idx2, item2.course]);
+          });
+        });
+        this.ooption.hours = _subject;
+        this.ooption.days = _grade;
+        this.ooption.data = data;
+        if (!this.chartObj) {
+          this.setChart(this.ooption);
+        } else {
+          const hours = this.ooption.hours;
+          // prettier-ignore
+          const days = this.ooption.days;
+          // prettier-ignore
+          const data = this.ooption.data;
+          const title = [];
+          const singleAxis = [];
+          const series = [];
+          days.forEach(function (day, idx) {
+            title.push({
+              textBaseline: "middle",
+              top: ((idx + 0.5) * 90) / days.length + "%",
+              text: day,
+              textStyle: {
+                fontSize: 12,
+              },
+            });
+            singleAxis.push({
+              left: 70,
+              type: "category",
+              boundaryGap: false,
+              data: hours,
+              top: (idx * 90) / days.length + 5 + "%",
+              height: 90 / days.length - 10 + "%",
+            });
+            series.push({
+              singleAxisIndex: idx,
+              coordinateSystem: "singleAxis",
+              type: "scatter",
+              data: [],
+              symbolSize: function (dataItem) {
+                return dataItem[1] * 3;
+              },
+            });
+          });
+          data.forEach(function (dataItem) {
+            series[dataItem[0]].data.push([dataItem[1], dataItem[2]]);
+          });
+
+          this.option.title = title;
+          this.option.singleAxis = singleAxis;
+          this.option.series = series;
+          this.chartObj.setOption(this.option);
+        }
+      }
+    },
+  },
+  watch: {
+    courseArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue);
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setJson(this.courseArray);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 138 - 0
src/components/pages/dataBoard/teacher/chartList/teaFre.vue

@@ -0,0 +1,138 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div
+        id="charts_canvas"
+        class="echart"
+        style="width: 100%; height: 100%"
+      ></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    monthArray: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        xdata: [],
+        teacher: [],
+      },
+      option: {
+        tooltip: {
+          trigger: "axis",
+        },
+        xAxis: {
+          type: "category",
+          boundaryGap: true,
+          // data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月"],
+          data: [],
+        },
+        yAxis: {
+          type: "value",
+        },
+        grid: {
+          top: "5%",
+          left: "5%",
+          right: "5%",
+          bottom: "5%",
+          containLabel: true,
+        },
+        series: [
+          {
+            name: "教师",
+            type: "line",
+            // data: [220, 182, 191, 234, 290, 330]
+            data: [],
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          //劳动课程
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.xAxis.data = option.xdata;
+        this.option.series[0].data = option.teacher;
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+  },
+  watch: {
+    monthArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.ooption = {
+          xdata: [],
+          teacher: [],
+        };
+        let _array = newValue;
+        for (var i = 0; i < _array.length; i++) {
+          this.ooption.xdata.push(_array[i].Month + "月");
+          this.ooption.teacher.push(_array[i].teacher);
+        }
+
+        if (!this.chartObj) {
+          this.setChart(this.ooption);
+        } else {
+          this.option.xAxis.data = this.ooption.xdata;
+          this.option.series[0].data = this.ooption.teacher;
+          this.chartObj.setOption(this.option);
+        }
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.ooption = {
+      xdata: [],
+      teacher: [],
+    };
+    let _array = this.monthArray;
+    for (var i = 0; i < _array.length; i++) {
+      this.ooption.xdata.push(_array[i].Month + "月");
+      this.ooption.teacher.push(_array[i].teacher);
+    }
+    this.setChart(this.ooption);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 142 - 0
src/components/pages/dataBoard/teacher/chartList/workNum.vue

@@ -0,0 +1,142 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    workNumList: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        data: [],
+      },
+      option: {
+        xAxis: {
+          name: "任务数量",
+          nameTextStyle: {
+            padding: [25, 0, 0, 0],
+            verticalAlign: 'top'
+          },
+          nameGap: -45
+        },
+        grid: {
+          top: "10%",
+          left: "5%",
+          right: "5%",
+          bottom: "8%",
+          containLabel: true,
+        },
+        yAxis: {
+          name: "作业提交数量",
+        },
+        color: ["#3681FC"],
+        tooltip: {
+          formatter: function (params) {
+            return (
+              params.marker +
+              params.data[2] +
+              "<br/>" +
+              "任务数量:" +
+              params.data[0] +
+              "<br/>" +
+              "作业提交数量:" +
+              params.data[1]
+            );
+          },
+        },
+        series: [
+          {
+            symbolSize: 8,
+            data: [],
+            type: "scatter",
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          //劳动课程
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.series[0].data = this.ooption.data;
+
+        chartObj.off('click')
+        let _this = this
+        chartObj.on('click', function (param) {
+          console.log(param);  //X轴的值
+          _this.$emit('openCourse', param.data[3])
+        });
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    setArray(array) {
+      this.ooption = {
+        data: [],
+      };
+      for (var i = 0; i < array.length; i++) {
+        this.ooption.data.push(array[i]);
+      }
+      if (!this.chartObj) {
+        this.setChart(this.ooption);
+      } else {
+        this.option.series[0].data = this.ooption.data;
+        this.chartObj.setOption(this.option);
+      }
+      this.$forceUpdate();
+    },
+  },
+  watch: {
+    workNumList: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue);
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.workNumList);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 95 - 0
src/components/pages/dataBoard/teacher/chartList/workTime.vue

@@ -0,0 +1,95 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div
+        id="charts_canvas"
+        class="echart"
+        style="width: 100%; height: 100%"
+      ></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      chartObj: null,
+      option: {
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+          },
+        },
+        grid: {
+          top: "5%",
+          left: "5%",
+          right: "5%",
+          bottom: "5%",
+          containLabel: true,
+        },
+        xAxis: {
+          type: "value",
+          boundaryGap: [0, 0.01],
+        },
+        yAxis: {
+          type: "category",
+          data: ["六年级", "五年级", "四年级", "三年级", "二年级", "一年级"],
+        },
+        series: [
+          {
+            name: "2011",
+            type: "bar",
+            data: [60, 110, 25, 130, 65, 80],
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart() {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+  },
+  mounted() {
+    this.setChart(this.option);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+  created() {
+    this.setChart();
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 666 - 0
src/components/pages/dataBoard/teacher/index.vue

@@ -0,0 +1,666 @@
+<template>
+  <div class="body1" v-loading="isLoading">
+    <!-- 教师数据 -->
+    <div class="left">
+      <div class="top">
+        <div class="titleBox">
+          <div class="title">基础概况</div>
+        </div>
+        <div class="dataBox">
+          <div class="teafre">
+            <div class="teaLeft">
+              <div>教师总数</div>
+              <div>{{ count }}</div>
+            </div>
+            <div class="teaLeft teaRigth">
+              <div>周使用频次</div>
+              <div>{{weekCount}}</div>
+            </div>
+          </div>
+          <div class="teafre" style="margin: 10px auto">
+            <div class="teaLeft">
+              <div>登录频次</div>
+              <div>{{ loginCount }}</div>
+            </div>
+            <div class="teaLeft teaRigth">
+              <div>人均使用频次</div>
+              <div>{{ (loginCount / count).toFixed(0) }}</div>
+            </div>
+          </div>
+          <TeaFre style="height: calc(100% - 150px)" :monthArray="loginCountMonthArray"></TeaFre>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">教师活跃度</div>
+        </div>
+        <div class="dataBox">
+          <TeaAct style="height: calc(100% - 20px)"></TeaAct>
+        </div>
+      </div>
+    </div>
+    <div class="center">
+      <div class="top">
+        <div class="titleBox">
+          <div class="title">教师行为数据</div>
+        </div>
+        <div class="dataBox">
+          <div class="teafre" style="justify-content: flex-start">
+            <div
+              class="teaLeft"
+              style="align-items: flex-end; width: calc(100% / 4 - 10px)"
+            >
+              <div>上传课程总数</div>
+              <div>{{ courseCount }}</div>
+            </div>
+            <div
+              class="teaLeft teaRigth"
+              style="align-items: flex-end; width: calc(100% / 4 - 10px)"
+            >
+              <div>各年级课程上传平均数</div>
+              <div>{{ gradeCourse.toFixed(0) }}</div>
+            </div>
+            <div
+              class="teaLeft"
+              style="align-items: flex-end; width: calc(100% / 4 - 10px)"
+            >
+              <div>各学科课程上传平均数</div>
+              <div>{{ subjectCourse.toFixed(0) }}</div>
+            </div>
+          </div>
+          <TeaData style="height: calc(100% - 62px)" :courseArray="courseArray" @openCourse="openCourse2"></TeaData>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">平台使用深度</div>
+        </div>
+        <div class="dataBox">
+          <div class="allBox">
+            <div class="allBox_left"><FunPlot></FunPlot></div>
+            <div class="allBox_right">
+              <div class="depth">
+                <span>上传课程</span>
+                <div>
+                  <el-progress
+                    :width="80"
+                    type="circle"
+                    :percentage="36"
+                    :stroke-width="15"
+                    :format="format"
+                    color="#106BFF"
+                  ></el-progress>
+                </div>
+              </div>
+              <div class="depth">
+                <span>创设项目</span>
+                <div>
+                  <el-progress
+                    :width="80"
+                    type="circle"
+                    :percentage="76"
+                    :stroke-width="15"
+                    :format="format"
+                    color="#106BFF"
+                  ></el-progress>
+                </div>
+              </div>
+              <div class="depth">
+                <span>协同合作</span>
+                <div>
+                  <el-progress
+                    :width="80"
+                    type="circle"
+                    :percentage="76"
+                    :stroke-width="15"
+                    :format="format"
+                    color="#106BFF"
+                  ></el-progress>
+                </div>
+              </div>
+              <div class="depth">
+                <span>互动交流</span>
+                <div>
+                  <el-progress
+                    :width="80"
+                    type="circle"
+                    :percentage="76"
+                    :stroke-width="15"
+                    :format="format"
+                    color="#106BFF"
+                  ></el-progress>
+                </div>
+              </div>
+              <div class="depth">
+                <span>添加目标</span>
+                <div>
+                  <el-progress
+                    :width="80"
+                    type="circle"
+                    :percentage="76"
+                    :stroke-width="15"
+                    :format="format"
+                    color="#106BFF"
+                  ></el-progress>
+                </div>
+              </div>
+              <div class="depth">
+                <span>使用工具</span>
+                <div>
+                  <el-progress
+                    :width="80"
+                    type="circle"
+                    :percentage="36"
+                    :stroke-width="15"
+                    :format="format"
+                    color="#106BFF"
+                  ></el-progress>
+                </div>
+              </div>
+              <div class="depth">
+                <span>设置评价</span>
+                <div>
+                  <el-progress
+                    :width="80"
+                    type="circle"
+                    :percentage="76"
+                    :stroke-width="15"
+                    :format="format"
+                    color="#106BFF"
+                  ></el-progress>
+                </div>
+              </div>
+              <div class="depth">
+                <span>学生评价</span>
+                <div>
+                  <el-progress
+                    :width="80"
+                    type="circle"
+                    :percentage="25"
+                    :stroke-width="15"
+                    :format="format"
+                    color="#106BFF"
+                  ></el-progress>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="right">
+      <div class="top">
+        <div class="titleBox">
+          <div class="title">教学活动</div>
+        </div>
+        <div class="dataBox">
+          <WorkNum :workNumList="workNumList" @openCourse="openCourse"></WorkNum>
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="titleBox">
+          <div class="title">在线时长</div>
+        </div>
+        <div class="dataBox">
+          <div class="teafre">
+            <div class="teaLeft">
+              <div>累计在线时长</div>
+              <div>{{ loginTime.toFixed(0) }}小时</div>
+            </div>
+            <div class="teaLeft teaRigth">
+              <div>师均时长</div>
+              <div>{{ (loginTime / count).toFixed(0) }}小时</div>
+            </div>
+          </div>
+          <WorkTime style="height: calc(100% - 62px)"></WorkTime>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import TeaFre from "./chartList/teaFre.vue";
+import TeaAct from "./chartList/teaAct.vue";
+import TeaData from "./chartList/teaData.vue";
+import FunPlot from "./chartList/funPlot.vue";
+import WorkNum from "./chartList/workNum.vue";
+import WorkTime from "./chartList/workTime.vue";
+export default {
+  components: {
+    TeaFre,
+    TeaAct,
+    TeaData,
+    FunPlot,
+    WorkNum,
+    WorkTime,
+  },
+  props: {
+    oid: {
+      type: String,
+    },
+    org: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      isLoading: false,
+      count: 0,
+      loginCount: 0,
+      loginTime: 0,
+      courseCount: 0,
+      loginCountMonthArray:[],
+      weekCount:0,
+      gradeCourse: 0,
+      subjectCourse: 0,
+      courseArray: [],
+      workNumList: [],
+      grade:[],
+      subject:[],
+      theme:[],
+    };
+  },
+  mounted() {
+    this.getData();
+  },
+  methods: {
+    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 || '',
+        }, 
+        "*"
+      );
+    },
+    openCourse(cid){
+      window.parent.postMessage({ cid: cid, screenType: "3" }, "*");
+    },
+    getData() {
+      this.isLoading = true;
+      let params = [
+        {
+          oid: this.oid,
+          org: this.org,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "selectDataBoardTeacher", params)
+        .then((res) => {
+          this.isLoading = false;
+          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
+
+
+
+          let loginCountMonthArray = [];
+          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] // 教师半年登录次数统计
+
+          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()
+            for (var j = 0; j < loginCountMonthArray.length; j++) {
+              if (_month == loginCountMonthArray[j].Month && _year == loginCountMonthArray[j].Year) {
+                loginCountMonthArray[j].teacher++
+                break;
+              }
+            }
+          }
+
+          this.loginCountMonthArray = loginCountMonthArray;
+          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: '其他' })
+
+          for (var i = 0; i < _grade.length; i++) {
+            _courseArray.push({
+              name: _grade[i].name,
+              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)
+                }
+              }
+
+            }
+            for (var j = 0; j < _subject.length; j++) {
+              _courseArray[i].subject.push({
+                name: _subject[j].name,
+                id: _subject[j].id,
+                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++
+                }
+              }
+            }
+            let sum = 0
+            for (var j = 0; j < _courseArray[i].subject.length - 1; j++) {
+              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 
+          }
+          for (var j = 0; j < _subject.length; j++) {
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _subject[j].id) {
+                _subjectCourse++
+              }
+            }
+          }
+          this.gradeCourse = _gradeCourse / _grade.length
+          this.subjectCourse = _subjectCourse / _subject.length
+          this.courseArray = _courseArray
+
+          this.grade = _grade;
+          this.subject = _subject;
+          this.theme = res.data[9];//主题
+          var _workCourse = res.data[10]; //带作业的课程
+          var wList = [];
+          for (var i = 0; i < _workCourse.length; i++) {
+            if (!wList[_workCourse[i].courseId]) {
+              wList[_workCourse[i].courseId] = {
+                cid: _workCourse[i].courseId,
+                title: _workCourse[i].title,
+                task: 0,
+                work: 0,
+              };
+              let chapters = JSON.parse(_workCourse[i].chapters);
+              for (var j = 0; j < chapters.length; j++) {
+                if (wList[_workCourse[i].courseId].task == 0) {
+                  wList[_workCourse[i].courseId].task =
+                    chapters[j].chapterInfo[0].taskJson.length;
+                } else {
+                  wList[_workCourse[i].courseId].task +=
+                    chapters[j].chapterInfo[0].taskJson.length;
+                }
+              }
+            }
+          }
+          for (var i = 0; i < _workCourse.length; i++) {
+            let a = Object.keys(wList);
+            for (var j = 0; j < Object.keys(wList).length; j++) {
+              if (_workCourse[i].courseId == wList[a[j]].cid) {
+                wList[a[j]].work++;
+              }
+            }
+          }
+          var workNumList = Object.values(wList).map((item) => [
+            item.task,
+            item.work,
+            item.title,
+            item.cid,
+          ]);
+          this.workNumList = workNumList;
+          this.$forceUpdate();
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    format(percentage) {
+      return percentage;
+    },
+  },
+};
+</script>
+
+
+<style scoped>
+.body1 {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  padding: 20px;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.left {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+}
+
+.left > .top {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+  margin: 0 0 20px 0;
+}
+
+.left > .bottom {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.center {
+  width: calc(100% / 4 * 2 - 40px);
+  height: 100%;
+  margin: 0 20px;
+}
+
+.center > .top {
+  width: 100%;
+  height: calc(100% / 5 * 3 - 10px);
+  background: #fff;
+  border-radius: 5px;
+  margin: 0 0 20px 0;
+}
+
+.center > .bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.right {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+}
+
+.right > .top {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+  margin: 0 0 20px 0;
+}
+
+.right > .bottom {
+  width: 100%;
+  height: calc(100% / 2 - 10px);
+  background: #fff;
+  border-radius: 5px;
+}
+
+.titleBox {
+  height: 40px;
+  display: flex;
+  align-items: center;
+  padding: 0 15px;
+  width: 100%;
+}
+
+.dataBox {
+  height: calc(100% - 40px);
+  width: 100%;
+}
+
+.middleBox {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+}
+
+.title {
+  font-weight: bold;
+  color: #060e17;
+  font-size: 18px;
+}
+
+.teafre {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  width: 95%;
+  margin: 0 auto;
+  justify-content: space-evenly;
+}
+
+.teaLeft,
+.teaMiddle {
+  width: calc(100% / 2 - 10px);
+  height: 60px;
+  border-radius: 8px;
+  /* border: 1px solid #e0eafb; */
+  display: flex;
+  flex-direction: column;
+  align-items: flex-start;
+  justify-content: center;
+  padding: 0 10px;
+  margin-right: 10px;
+}
+.teaMiddle {
+  width: calc(100% / 3 - 10px);
+}
+.teaLeft {
+  width: 95%;
+  background: linear-gradient(
+    180deg,
+    rgba(224, 234, 251, 0.2) 0%,
+    rgba(54, 130, 252, 0.3) 100%
+  );
+}
+.teaRigth {
+  background: linear-gradient(
+    180deg,
+    rgb(211, 246, 228, 0.2) 0%,
+    rgb(23, 196, 105, 0.3) 100%
+  ) !important;
+}
+
+.cNum {
+  background: linear-gradient(
+    180deg,
+    rgb(125, 227, 174, 0.2) 0%,
+    rgb(23, 196, 105, 0.3) 100%
+  ) !important;
+}
+
+.tNum {
+  background: linear-gradient(
+    180deg,
+    rgb(174, 204, 254, 0.2) 0%,
+    rgb(54, 129, 252, 0.3) 100%
+  ) !important;
+}
+
+.tSum {
+  background: linear-gradient(
+    180deg,
+    rgb(125, 227, 174, 0.2) 0%,
+    rgb(23, 196, 105, 0.3) 100%
+  ) !important;
+}
+
+.teaLeft > div:first-child,
+.teaMiddle > div:first-child {
+  font-size: 12px;
+  font-weight: 400;
+  color: #565e6a;
+}
+
+.teaLeft > div:last-child,
+.teaMiddle > div:last-child {
+  font-size: 22px;
+  font-weight: bold;
+  color: #060e17;
+}
+
+.halfBox {
+  width: 50%;
+}
+.allBox {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+}
+.allBox_left {
+  width: 30%;
+  height: 100%;
+}
+.allBox_right {
+  display: flex;
+  flex-wrap: wrap;
+  height: 100%;
+  width: 70%;
+  margin: 0 auto;
+  overflow: hidden;
+  justify-content: space-between;
+}
+
+.depth {
+  width: calc(100% / 4 - 10px);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+
+.depth > span:nth-child(1) {
+  font-size: 14px;
+  font-weight: 700;
+  margin: 0 0 10px;
+}
+.depth > div:nth-child(1) {
+}
+</style>

File diff suppressed because it is too large
+ 346 - 126
src/components/pages/easy/addCourse.vue


+ 229 - 136
src/components/pages/evaluation.vue

@@ -23,7 +23,7 @@
           <span>目标管理设置</span>
           <span>目标管理设置</span>
           <div class="student_button">
           <div class="student_button">
             <el-button type="primary" class="bgColor" @click="addED"
             <el-button type="primary" class="bgColor" @click="addED"
-              >添加目标管理</el-button
+              >添加目标</el-button
             >
             >
           </div>
           </div>
         </div>
         </div>
@@ -37,29 +37,65 @@
         </div>
         </div>
       </div>
       </div>
       <div class="pb_content_body" style="height: 100%">
       <div class="pb_content_body" style="height: 100%">
-        <div class="e_box">
-          <div class="e_card" v-for="(item, index) in dataArray" :key="index">
-            <div class="e_card_picture">
-              <img src="../../assets/e_picture.png" />
-            </div>
-            <div class="e_card_name">
-              <span>{{ item.title }}</span>
-            </div>
-            <div class="e_card_time">
-              <span>{{ item.time }}</span>
-            </div>
-            <div class="e_card_btn">
-              <span @click="checkE(item)">查看</span>
-              <span @click="deleteE(item.id)">删除</span>
-            </div>
-          </div>
-          <div
-            v-if="dataArray.length === 0"
-            style="margin: 0 auto; color: #6e6e6e"
+        <el-table
+          ref="table"
+          :data="dataArray"
+          border
+          :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="15"
+            align="center"
+            prop="title"
           >
           >
-            暂无数据
-          </div>
-        </div>
+          </el-table-column>
+          <el-table-column
+            prop="username"
+            label="负责人"
+            min-width="15"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="time"
+            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"
+                  @click="checkE(scope.row)"
+                  >查看</el-button
+                >
+                <el-button
+                  class="de_button"
+                  type="primary"
+                  size="small"
+                  @click="copyEva(scope.row.id)"
+                  >复制</el-button
+                >
+                <el-button
+                  class="de_button"
+                  type="primary"
+                  size="small"
+                  @click="deleteE(scope.row.id, scope.row.userid)"
+                  >删除</el-button
+                >
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
         <div class="student_page">
         <div class="student_page">
           <el-pagination
           <el-pagination
             v-if="dataArray.length"
             v-if="dataArray.length"
@@ -91,10 +127,17 @@
               @change="setMindData"
               @change="setMindData"
             ></el-input>
             ></el-input>
           </div>
           </div>
-          <el-button @click="addEJson" type="primary" v-if="!update"
-            >保存</el-button
-          >
-          <el-button @click="updateEJson" type="primary" v-else>保存</el-button>
+          <div>
+            <el-button @click="addEJson" type="primary" v-if="!update"
+              >保存</el-button
+            >
+            <el-button @click="updateEJson" type="primary" v-else
+              >保存</el-button
+            >
+            <el-button @click="dialogVisible = fasle" type="primary"
+              >不保存</el-button
+            >
+          </div>
         </div>
         </div>
         <div class="e_add_content">
         <div class="e_add_content">
           <div class="e_add_list">
           <div class="e_add_list">
@@ -361,6 +404,7 @@ export default {
   data() {
   data() {
     return {
     return {
       data: {
       data: {
+        isLoading: false,
         meta: {
         meta: {
           name: "example",
           name: "example",
           author: "dd@163.com",
           author: "dd@163.com",
@@ -396,10 +440,12 @@ export default {
       userid: this.$route.query.userid,
       userid: this.$route.query.userid,
       oid: this.$route.query.oid,
       oid: this.$route.query.oid,
       eTitle: "",
       eTitle: "",
+      eTitle1: "",
       eName: "",
       eName: "",
       eName1: "",
       eName1: "",
       mid: "",
       mid: "",
       eJson: {},
       eJson: {},
+      eJson1: {},
       fid: "", //一级
       fid: "", //一级
       sid: "", //二级
       sid: "", //二级
       tid: "", //二级
       tid: "", //二级
@@ -413,6 +459,13 @@ export default {
     };
     };
   },
   },
   methods: {
   methods: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
     guid() {
     guid() {
       var _num,
       var _num,
         i,
         i,
@@ -435,20 +488,27 @@ export default {
       done();
       done();
     },
     },
     handleClose1(done) {
     handleClose1(done) {
-      this.$confirm("是否保存该目标?", "提示", {
-        confirmButtonText: "保存并关闭",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          if (!this.update) {
-            this.addEJson();
-          } else {
-            this.updateEJson();
-          }
-          done();
+      if (
+        JSON.stringify(this.eJson) === JSON.stringify(this.eJson1) &&
+        this.eTitle === this.eTitle1
+      ) {
+        done();
+      } else {
+        this.$confirm("是否保存该目标?", "提示", {
+          confirmButtonText: "保存并关闭",
+          cancelButtonText: "取消",
+          type: "warning",
         })
         })
-        .catch(() => {});
+          .then(() => {
+            if (!this.update) {
+              this.addEJson();
+            } else {
+              this.updateEJson();
+            }
+            done();
+          })
+          .catch(() => {});
+      }
     },
     },
     addE(type) {
     addE(type) {
       this.type = type;
       this.type = type;
@@ -546,40 +606,63 @@ export default {
       this.dialogVisible4 = true;
       this.dialogVisible4 = true;
     },
     },
     deleteF(id) {
     deleteF(id) {
-      console.log(this.eJson);
       if (JSON.stringify(this.eJson[id].child) != "{}") {
       if (JSON.stringify(this.eJson[id].child) != "{}") {
         this.$message.error("请把所有子集删完才可以删除");
         this.$message.error("请把所有子集删完才可以删除");
         return;
         return;
       }
       }
-      if (this.fid == id) {
-        this.fid = "";
-      }
-      delete this.eJson[id];
-      this.eJSONNum++;
-      this.$forceUpdate();
-      this.setMindData();
+      this.$confirm("是否删除该子级?", "提示", {
+        confirmButtonText: "删除",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          if (this.fid == id) {
+            this.fid = "";
+          }
+          delete this.eJson[id];
+          this.eJSONNum++;
+          this.$forceUpdate();
+          this.setMindData();
+        })
+        .catch(() => {});
     },
     },
     deleteS(id) {
     deleteS(id) {
       if (JSON.stringify(this.eJson[this.fid].child[id].child) != "{}") {
       if (JSON.stringify(this.eJson[this.fid].child[id].child) != "{}") {
         this.$message.error("请把所有子集删完才可以删除");
         this.$message.error("请把所有子集删完才可以删除");
         return;
         return;
       }
       }
-      if (this.sid == id) {
-        this.sid = "";
-      }
-      delete this.eJson[this.fid].child[id];
-      this.eJSONNum++;
-      this.$forceUpdate();
-      this.setMindData();
+      this.$confirm("是否删除该子级?", "提示", {
+        confirmButtonText: "删除",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          if (this.sid == id) {
+            this.sid = "";
+          }
+          delete this.eJson[this.fid].child[id];
+          this.eJSONNum++;
+          this.$forceUpdate();
+          this.setMindData();
+        })
+        .catch(() => {});
     },
     },
     deleteT(id) {
     deleteT(id) {
-      if (this.tid == id) {
-        this.tid = "";
-      }
-      delete this.eJson[this.fid].child[this.sid].child[id];
-      this.eJSONNum++;
-      this.$forceUpdate();
-      this.setMindData();
+      this.$confirm("是否删除该子级?", "提示", {
+        confirmButtonText: "删除",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          if (this.tid == id) {
+            this.tid = "";
+          }
+          delete this.eJson[this.fid].child[this.sid].child[id];
+          this.eJSONNum++;
+          this.$forceUpdate();
+          this.setMindData();
+        })
+        .catch(() => {});
     },
     },
     addEJson() {
     addEJson() {
       if (this.eTitle == "") {
       if (this.eTitle == "") {
@@ -636,6 +719,7 @@ export default {
       this.getData();
       this.getData();
     },
     },
     getData() {
     getData() {
+      this.isLoading = true;
       let params = {
       let params = {
         oid: this.oid,
         oid: this.oid,
         n: this.sn,
         n: this.sn,
@@ -644,47 +728,80 @@ export default {
       this.ajax
       this.ajax
         .get(this.$store.state.api + "getEvaluation", params)
         .get(this.$store.state.api + "getEvaluation", params)
         .then((res) => {
         .then((res) => {
+          this.isLoading = false;
           this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
           this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
           this.dataArray = res.data[0];
           this.dataArray = res.data[0];
         })
         })
         .catch((err) => {
         .catch((err) => {
+          this.isLoading = false;
           console.error(err);
           console.error(err);
         });
         });
     },
     },
-    deleteE(id) {
-      this.$confirm("确定删除吗?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          let params = [
-            {
-              id: id,
-            },
-          ];
-          this.ajax
-            .post(this.$store.state.api + "deleteEvaluation", params)
-            .then((res) => {
-              this.$message.success("删除成功");
-              if (this.page != 1 && this.tableData.length == 1) {
-                this.page--;
-              }
-              this.getData();
+    deleteEva(id) {
+      let params = [
+        {
+          id: id,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "deleteEvaluation", params)
+        .then((res) => {
+          this.$message.success("删除成功");
+          if (this.page != 1 && this.tableData.length == 1) {
+            this.page--;
+          }
+          this.getData();
+        })
+        .catch((err) => {
+          this.$message.success("删除失败");
+          console.error(err);
+        });
+    },
+    deleteE(id, uid) {
+      if (this.$route.query.userid != uid) {
+        this.$message.error("不可以删除他人创建的目标!");
+        return;
+      }
+      let params = {
+        eid: id,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectCourseEva", params)
+        .then((res) => {
+          if (res.data[0].length == 0) {
+            this.$confirm("确定删除吗?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
             })
             })
-            .catch((err) => {
-              this.$message.success("添加失败");
-              console.error(err);
-            });
+              .then(() => {
+                this.deleteEva(id);
+              })
+              .catch(() => {});
+          } else {
+            this.$confirm("此目标已被引用,是否继续删除操作?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+            })
+              .then(() => {
+                this.deleteEva(id);
+              })
+              .catch(() => {});
+          }
         })
         })
-        .catch(() => {});
+        .catch((err) => {
+          console.error(err);
+        });
     },
     },
     init() {
     init() {
       this.eJson = {};
       this.eJson = {};
+      this.eJson1 = {};
       this.fid = "";
       this.fid = "";
       this.sid = "";
       this.sid = "";
       this.tid = "";
       this.tid = "";
       this.eTitle = "";
       this.eTitle = "";
+      this.eTitle1 = "";
     },
     },
     addED() {
     addED() {
       this.update = false;
       this.update = false;
@@ -696,6 +813,8 @@ export default {
     checkE(res) {
     checkE(res) {
       this.init();
       this.init();
       this.eJson = JSON.parse(res.content);
       this.eJson = JSON.parse(res.content);
+      this.eJson1 = JSON.parse(res.content);
+      this.eTitle1 = res.title;
       this.eTitle = res.title;
       this.eTitle = res.title;
       this.eid = res.id;
       this.eid = res.id;
       this.update = true;
       this.update = true;
@@ -741,6 +860,24 @@ export default {
       }
       }
       this.$forceUpdate();
       this.$forceUpdate();
     },
     },
+    copyEva(eid) {
+      let params = [
+        {
+          eid: eid,
+          uid: this.userid,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "copyEva", params)
+        .then((res) => {
+          this.page = 1;
+          this.$message.success("复制成功");
+          this.getData();
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
   },
   },
   created() {
   created() {
     this.getData();
     this.getData();
@@ -828,55 +965,6 @@ export default {
   background: #466b99;
   background: #466b99;
   border: none;
   border: none;
 }
 }
-.e_box {
-  display: flex;
-  flex-wrap: wrap;
-  align-items: flex-start;
-  min-height: 502px;
-}
-.e_card {
-  background: #fff;
-  margin-right: 20px;
-  width: 270px;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  border-radius: 5px;
-  margin-top: 10px;
-  text-align: center;
-}
-.e_card_picture {
-  margin: 20px 0;
-}
-.e_card_name {
-  width: 100%;
-  padding: 0 10px;
-  box-sizing: border-box;
-  margin-bottom: 5px;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-.e_card_time {
-  width: 100%;
-  padding: 0 10px;
-  box-sizing: border-box;
-  font-size: 15px;
-  color: #c3c3c3;
-  margin-bottom: 10px;
-}
-.e_card_btn {
-  height: 40px;
-  display: flex;
-  align-items: center;
-  width: 100%;
-  background: rgb(244, 244, 244);
-}
-.e_card_btn span {
-  flex: 1 1 auto;
-  text-align: center;
-  cursor: pointer;
-}
 .student_page {
 .student_page {
   margin-top: 10px;
   margin-top: 10px;
 }
 }
@@ -989,6 +1077,7 @@ export default {
 }
 }
 .e_add_list_child .active {
 .e_add_list_child .active {
   color: #409eff;
   color: #409eff;
+  font-weight: bold;
 }
 }
 .e_add_list_btn {
 .e_add_list_btn {
   position: absolute;
   position: absolute;
@@ -1069,4 +1158,8 @@ export default {
   width: 100%;
   width: 100%;
   background: #fff;
   background: #fff;
 }
 }
+
+.el-table >>> .even_row {
+  background-color: #f1f1f1 !important;
+}
 </style>
 </style>

+ 1339 - 1116
src/components/pages/grade/index.vue

@@ -1,1196 +1,1419 @@
 <template>
 <template>
-    <div class="pb_content" style="background: unset">
-      <div v-if="ctype == 1" class="pb_content_body" style="
-                background: #fff;
-                padding: 0px 25px;
-                box-sizing: border-box;
-                border-radius: 5px;
-              ">
-        <div class="pb_head top">
-          <span>年级管理</span>
-          <div class="student_button" style="border-radius: 4px;">
-            <el-button type="primary" class="bgColor" @click="dialogVisible = true">添加年级</el-button>
-          </div>
-        </div>
-        <div class="student_head">
-          <div class="student_search">
-            <span>
-              <el-input placeholder="请输入年级名称" v-model="sClassName" clearable>
-              </el-input>
-            </span>
-            <el-button type="primary" @click="searchClass">查询</el-button>
-          </div>
+  <div class="pb_content" style="background: unset">
+    <div
+      v-if="ctype == 1"
+      class="pb_content_body"
+      style="
+        background: #fff;
+        padding: 0px 25px;
+        box-sizing: border-box;
+        border-radius: 5px;
+      "
+    >
+      <div class="pb_head top">
+        <span>年级管理</span>
+        <div class="student_button" style="border-radius: 4px">
+          <el-button
+            type="primary"
+            class="bgColor"
+            @click="dialogVisible = true"
+            >添加年级</el-button
+          >
         </div>
         </div>
       </div>
       </div>
-      <div class="pb_content_body" v-if="ctype == 1">
-        <div class="student_table">
-          <el-table v-if="ctype == 1" ref="table" :key="1" :data="tableData" border :height="tableHeight" :fit="true"
-            v-loading="isLoading" style="width: 100%; height: 60%" :header-cell-style="{ background: '#f1f1f1' }"
-            :row-class-name="tableRowClassName">
-            <el-table-column prop="name" label="年级名称" min-width="40%" align="center">
-            </el-table-column>
-            <el-table-column prop="pnum" label="班级数" min-width="40%" align="center">
-            </el-table-column>
-            <el-table-column label="操作" min-width="20%">
-              <template slot-scope="scope">
-                <el-button type="primary" size="small" @click="getStudent(scope.row.id)">查看班级</el-button>
-                <el-button type="primary" size="small" @click="openUpdate(scope.row.id, scope.row.name)">修改</el-button>
-                <el-button type="primary" size="small" @click="deleteGrade(scope.row.id)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
+      <div class="student_head">
+        <div class="student_search">
+          <span>
+            <el-input
+              placeholder="请输入年级名称"
+              v-model="sClassName"
+              clearable
+            >
+            </el-input>
+          </span>
+          <el-button type="primary" @click="searchClass">查询</el-button>
         </div>
         </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>
+      </div>
+    </div>
+    <div class="pb_content_body" v-if="ctype == 1">
+      <div class="student_table">
+        <el-table
+          v-if="ctype == 1"
+          ref="table"
+          :key="1"
+          :data="tableData"
+          border
+          :height="tableHeight"
+          :fit="true"
+          v-loading="isLoading"
+          style="width: 100%; height: 60%"
+          :header-cell-style="{ background: '#f1f1f1' }"
+          :row-class-name="tableRowClassName"
+        >
+          <el-table-column
+            prop="name"
+            label="年级名称"
+            min-width="40%"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="pnum"
+            label="班级数"
+            min-width="40%"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column label="操作" min-width="20%">
+            <template slot-scope="scope">
+              <el-button
+                type="primary"
+                size="small"
+                @click="getStudent(scope.row.id)"
+                >查看班级</el-button
+              >
+              <el-button
+                type="primary"
+                size="small"
+                @click="openUpdate(scope.row.id, scope.row.name)"
+                >修改</el-button
+              >
+              <el-button
+                type="primary"
+                size="small"
+                @click="deleteGrade(scope.row.id)"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column>
+        </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>
+      </div>
+    </div>
+    <div
+      v-if="ctype == 2"
+      class="pb_content_body"
+      style="
+        background: #fff;
+        padding: 0px 25px;
+        box-sizing: border-box;
+        border-radius: 5px;
+      "
+    >
+      <div class="pb_head top">
+        <span>查看班级-{{ getGrade(cid) }} </span>
+        <div class="student_button" style="border-radius: 4px">
+          <el-button
+            type="primary"
+            class="bgColor"
+            @click="(ctype = 1), getClass()"
+            >返回</el-button
+          >
         </div>
         </div>
       </div>
       </div>
-      <div v-if="ctype == 2" class="pb_content_body" style="
-                background: #fff;
-                padding: 0px 25px;
-                box-sizing: border-box;
-                border-radius: 5px;
-              ">
-        <div class="pb_head top">
-          <span>查看班级-{{getGrade(cid)}} </span>
-          <div class="student_button" style="border-radius: 4px;">
-            <el-button type="primary" class="bgColor" @click="ctype = 1, getClass()">返回</el-button>
-          </div>
+      <div class="student_head">
+        <div class="student_search">
+          <span>
+            <el-input
+              v-model="sPhoneUser"
+              placeholder="请输入班级"
+              style="margin: 0 10px 0 0"
+            ></el-input>
+          </span>
+          <el-button class="student_button" @click="searchStudent"
+            >查询</el-button
+          >
         </div>
         </div>
-        <div class="student_head">
-          <div class="student_search">
-            <span>
-              <el-input v-model="sPhoneUser"  placeholder="请输入班级" style="margin:0 10px 0 0"></el-input>
-            </span>
-            <el-button class="student_button" @click="searchStudent">查询</el-button>
-          </div>
-          <div>
-            <el-button @click="addStudent" class="student_button">添加班级</el-button>
-          </div>
+        <div>
+          <el-button @click="addStudent" class="student_button"
+            >添加班级</el-button
+          >
         </div>
         </div>
       </div>
       </div>
-      <div class="pb_content_body" v-if="ctype == 2">
-        <div class="student_table">
-          <el-table v-if="ctype == 2" :key="2" ref="table2" :data="tableData2" 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>
-                    {{ scope.row.name }}
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="pnum" 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"
-                    @click="deleteClassStudent(scope.row.id)">移除</el-button>
-                  <!-- <div class="delete">
+    </div>
+    <div class="pb_content_body" v-if="ctype == 2">
+      <div class="student_table">
+        <el-table
+          v-if="ctype == 2"
+          :key="2"
+          ref="table2"
+          :data="tableData2"
+          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>
+                {{ scope.row.name }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="pnum"
+            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"
+                  @click="deleteClassStudent(scope.row.id)"
+                  >移除</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> -->
-                </div>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <div class="student_page">
-          <el-pagination background layout="prev, pager, next" :page-size="10" :total="total2" v-if="page2"
-            @current-change="handleCurrentChange2"></el-pagination>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div class="student_page">
+        <el-pagination
+          background
+          layout="prev, pager, next"
+          :page-size="10"
+          :total="total2"
+          v-if="page2"
+          @current-change="handleCurrentChange2"
+        ></el-pagination>
+      </div>
+    </div>
+    <el-dialog
+      :visible.sync="dialogVisibleAddStudent"
+      :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 />
         </div>
         </div>
+        <div class="title_add_student">添加学生</div>
       </div>
       </div>
-      <el-dialog :visible.sync="dialogVisibleAddStudent" :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 />
-          </div>
-          <div class="title_add_student">添加学生</div>
+      <el-form>
+        <el-form-item label="学生姓名" :label-width="formLabelWidth">
+          <span>
+            <el-input
+              placeholder="请输入学生姓名"
+              clearable
+              v-model="sName"
+              class="add_input"
+            ></el-input>
+          </span>
+        </el-form-item>
+        <el-form-item label="学生学号" :label-width="formLabelWidth">
+          <span>
+            <el-input
+              placeholder="请输入学生学号"
+              clearable
+              v-model="sId"
+              class="add_input"
+            ></el-input>
+          </span>
+        </el-form-item>
+        <el-form-item label="学生手机号" :label-width="formLabelWidth">
+          <span>
+            <el-input
+              placeholder="请输入学生手机号"
+              clearable
+              v-model="sPhone"
+              class="add_input"
+            ></el-input>
+          </span>
+        </el-form-item>
+        <el-form-item label="学生账号" :label-width="formLabelWidth">
+          <span>
+            <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-form-item>
+        <el-form-item label="班级" :label-width="formLabelWidth">
+          <el-select v-model="cid" placeholder="请选择班级" disabled>
+            <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">
+          注:添加学生的账号密码为123456
         </div>
         </div>
-        <el-form>
-          <el-form-item label="学生姓名" :label-width="formLabelWidth">
-            <span>
-              <el-input placeholder="请输入学生姓名" clearable v-model="sName" class="add_input"></el-input>
-            </span>
-          </el-form-item>
-          <el-form-item label="学生学号" :label-width="formLabelWidth">
-            <span>
-              <el-input placeholder="请输入学生学号" clearable v-model="sId" class="add_input"></el-input>
-            </span>
-          </el-form-item>
-          <el-form-item label="学生手机号" :label-width="formLabelWidth">
-            <span>
-              <el-input placeholder="请输入学生手机号" clearable v-model="sPhone" class="add_input"></el-input>
-            </span>
-          </el-form-item>
-          <el-form-item label="学生账号" :label-width="formLabelWidth">
-            <span>
-              <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-form-item>
-          <el-form-item label="班级" :label-width="formLabelWidth">
-            <el-select v-model="cid" placeholder="请选择班级" disabled>
-              <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">
-            注:添加学生的账号密码为123456
-          </div>
-        </el-form>
-        <span slot="footer" class="dialog-footer flex">
-          <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">
-        <div slot="title" class="header-title">
-          <div class="logoImg">
-            <img src="../../../assets/logo.png" alt />
-          </div>
-          <div class="title_add_student">修改学生</div>
+      </el-form>
+      <span slot="footer" class="dialog-footer flex">
+        <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"
+    >
+      <div slot="title" class="header-title">
+        <div class="logoImg">
+          <img src="../../../assets/logo.png" alt />
         </div>
         </div>
-        <el-form>
-          <el-form-item label="学生名称" :label-width="formLabelWidth">
-            <span>
-              <el-input placeholder="请输入学生姓名" clearable v-model="userinfo.name" class="add_input"></el-input>
-            </span>
-          </el-form-item>
-          <el-form-item label="学生学号" :label-width="formLabelWidth">
-            <span>
-              <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>
-            </span>
-          </el-form-item>
-          <el-form-item label="学生账号" :label-width="formLabelWidth">
-            <span>
-              <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-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>
-          </el-form-item>
-          <div style="text-align: center; color: #adb3b7">
-            注:添加学生的账号密码为123456
-          </div>
-        </el-form>
-        <span slot="footer" class="dialog-footer flex">
-          <el-button class="right" @click="updateStudent">修改</el-button>
-        </span>
-      </el-dialog>
-      <el-dialog title="添加年级" :visible.sync="dialogVisible" :append-to-body="true" width="400px" :before-close="handleClose"
-        class="dialog_diy">
-        <el-form>
-          <el-form-item label="添加年级" :label-width="formLabelWidth">
-            <el-input v-model="className" auto-complete="off" placeholder="请输入年级..."></el-input>
-          </el-form-item>
-        </el-form>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="insertGrade">确 定</el-button>
-        </span>
-      </el-dialog>
-      <el-dialog title="修改年级" :visible.sync="dialogVisible1" :append-to-body="true" width="25%" :before-close="handleClose"
-        class="dialog_diy">
-        <el-form>
-          <el-form-item label="年级名称" :label-width="formLabelWidth">
-            <el-input v-model="className1" auto-complete="off" placeholder="请输入年级..."></el-input>
-          </el-form-item>
-        </el-form>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="dialogVisible1 = false">取 消</el-button>
-          <el-button type="primary" @click="updateGrade">确 定</el-button>
-        </span>
-      </el-dialog>
-      <el-dialog title="选择班级" :visible.sync="dialogVisibleMember" :append-to-body="true" width="500px" height="80%"
-        :before-close="handleClose" class="addNewPP">
-        <div class="people">
-          <div class="people_top">
-            <div class="people_top_right">
-              <div class="people_search">
-                <el-input placeholder="搜索班级名称" v-model="searchTN" @keyup.enter.native="getClassStudent"></el-input>
-                <div class="search_img" @click="getClassStudent">
-                  <img src="../../../assets/icon/search.png" alt />
-                </div>
+        <div class="title_add_student">修改学生</div>
+      </div>
+      <el-form>
+        <el-form-item label="学生名称" :label-width="formLabelWidth">
+          <span>
+            <el-input
+              placeholder="请输入学生姓名"
+              clearable
+              v-model="userinfo.name"
+              class="add_input"
+            ></el-input>
+          </span>
+        </el-form-item>
+        <el-form-item label="学生学号" :label-width="formLabelWidth">
+          <span>
+            <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>
+          </span>
+        </el-form-item>
+        <el-form-item label="学生账号" :label-width="formLabelWidth">
+          <span>
+            <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-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>
+        </el-form-item>
+        <div style="text-align: center; color: #adb3b7">
+          注:添加学生的账号密码为123456
+        </div>
+      </el-form>
+      <span slot="footer" class="dialog-footer flex">
+        <el-button class="right" @click="updateStudent">修改</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="添加年级"
+      :visible.sync="dialogVisible"
+      :append-to-body="true"
+      width="400px"
+      :before-close="handleClose"
+      class="dialog_diy"
+    >
+      <el-form>
+        <el-form-item label="添加年级" :label-width="formLabelWidth">
+          <el-input
+            v-model="className"
+            auto-complete="off"
+            placeholder="请输入年级..."
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="insertGrade">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="修改年级"
+      :visible.sync="dialogVisible1"
+      :append-to-body="true"
+      width="25%"
+      :before-close="handleClose"
+      class="dialog_diy"
+    >
+      <el-form>
+        <el-form-item label="年级名称" :label-width="formLabelWidth">
+          <el-input
+            v-model="className1"
+            auto-complete="off"
+            placeholder="请输入年级..."
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible1 = false">取 消</el-button>
+        <el-button type="primary" @click="updateGrade">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="选择班级"
+      :visible.sync="dialogVisibleMember"
+      :append-to-body="true"
+      width="500px"
+      height="80%"
+      :before-close="handleClose"
+      class="addNewPP"
+    >
+      <div class="people">
+        <div class="people_top">
+          <div class="people_top_right">
+            <div class="people_search">
+              <el-input
+                placeholder="搜索班级名称"
+                v-model="searchTN"
+                @keyup.enter.native="getClassStudent"
+              ></el-input>
+              <div class="search_img" @click="getClassStudent">
+                <img src="../../../assets/icon/search.png" alt />
               </div>
               </div>
             </div>
             </div>
-            <div class="people_nav">选择班级</div>
           </div>
           </div>
-          <div class="t_j_box" style="
-                    padding: 20px 0 0 25px;
-                    width: calc(100% - 55px);
-                    margin-left: 25px;
-                  ">
-            <span>班级</span>
-          </div>
-          <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length" v-loading="isLoading2">
-            <el-checkbox v-for="item in teacherJuri" :key="item.id" :label="item.id">
-              <div class="t_j_box">
-                  <span>{{ item.name  }}</span>
-              </div>
-            </el-checkbox>
-          </el-checkbox-group>
-          <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
+          <div class="people_nav">选择班级</div>
         </div>
         </div>
-        <div style="margin-top: 10px;">
-          <el-pagination background layout="prev, pager, next" :page-size="pageSize3" :total="total3"
-            v-if="page3 && teacherJuri.length" style="padding-bottom: 20px"
-            @current-change="handleCurrentChange3"></el-pagination>
+        <div
+          class="t_j_box"
+          style="
+            padding: 20px 0 0 25px;
+            width: calc(100% - 55px);
+            margin-left: 25px;
+          "
+        >
+          <span>班级</span>
         </div>
         </div>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="dialogVisibleMember = false">取 消</el-button>
-          <el-button type="primary" @click="addClassStudent">确定</el-button>
-        </span>
-      </el-dialog>
-    </div>
-  </template>
+        <el-checkbox-group
+          v-model="checkboxList3"
+          class="people_name"
+          v-if="teacherJuri.length"
+          v-loading="isLoading2"
+        >
+          <el-checkbox
+            v-for="item in teacherJuri"
+            :key="item.id"
+            :label="item.id"
+          >
+            <div class="t_j_box">
+              <span>{{ item.name }}</span>
+            </div>
+          </el-checkbox>
+        </el-checkbox-group>
+        <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
+      </div>
+      <div style="margin-top: 10px">
+        <el-pagination
+          background
+          layout="prev, pager, next"
+          :page-size="pageSize3"
+          :total="total3"
+          v-if="page3 && teacherJuri.length"
+          style="padding-bottom: 20px"
+          @current-change="handleCurrentChange3"
+        ></el-pagination>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleMember = false">取 消</el-button>
+        <el-button type="primary" @click="addClassStudent">确定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
   
   
   <script>
   <script>
-  import TaskListHeader from 'gantt-elastic/src/components/TaskList/TaskListHeader.vue';
-  
-  export default {
-    data() {
-      return {
-        tableHeight: "500px",
-        isLoading: false,
-        formLabelWidth: "100px",
-        sClassName: "",
-        className: "",
-        className1: "",
-        classid: "",
-        dialogVisible: false,
-        dialogVisible1: false,
-        dialogVisibleUpdate: false,
-        dialogVisibleAddStudent: false,
-        tableData: [],
-        page: 1,
-        total: 0,
-        tableData2: [],
-        page2: 1,
-        total2: 0,
-        userid: this.$route.query.userid,
-        oid: this.$route.query.oid,
-        cid: "",
-        ctype: 1,
-        sName: "",
-        sPhone: "",
-        sId: "",
-        schoolName: "",
-        sByClass: "",
-        sMail: "",
-        classJuri: [],
-        userinfo: {},
-        userinfoA: {},
-        sPhoneUser: "",
-        tx: require("../../../assets/avatar.png"),
-        dialogVisibleMember: false,
-        checkboxList3: [],
-        teacherJuri: [],
-        pageSize3: 10,
-        total3: 0,
-        page3: 1,
-        isLoading2: false,
-        searchTN: "",
+import TaskListHeader from "gantt-elastic/src/components/TaskList/TaskListHeader.vue";
+
+export default {
+  data() {
+    return {
+      tableHeight: "500px",
+      isLoading: false,
+      formLabelWidth: "100px",
+      sClassName: "",
+      className: "",
+      className1: "",
+      classid: "",
+      dialogVisible: false,
+      dialogVisible1: false,
+      dialogVisibleUpdate: false,
+      dialogVisibleAddStudent: false,
+      tableData: [],
+      page: 1,
+      total: 0,
+      tableData2: [],
+      page2: 1,
+      total2: 0,
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      cid: "",
+      ctype: 1,
+      sName: "",
+      sPhone: "",
+      sId: "",
+      schoolName: "",
+      sByClass: "",
+      sMail: "",
+      classJuri: [],
+      userinfo: {},
+      userinfoA: {},
+      sPhoneUser: "",
+      tx: require("../../../assets/avatar.png"),
+      dialogVisibleMember: false,
+      checkboxList3: [],
+      teacherJuri: [],
+      pageSize3: 10,
+      total3: 0,
+      page3: 1,
+      isLoading2: false,
+      searchTN: "",
+    };
+  },
+  created() {
+    this.page = 1;
+    this.getClass();
+    this.getClass2();
+    this.getSchoolName();
+  },
+  computed: {
+    getGrade() {
+      return function (gid) {
+        let name = "";
+        this.classJuri.forEach((element) => {
+          if (element.id == gid) {
+            name = element.name;
+          }
+        });
+        return name ? name : "暂无";
       };
       };
     },
     },
-    created() {
-      this.page = 1;
-      this.getClass();
-      this.getClass2();
-      this.getSchoolName();
-    },
-    computed: {
-      getGrade() {
-        return function (gid) {
-          let name = ''
-          this.classJuri.forEach(element => {
-            if (element.id == gid) {
-              name = element.name
-            }
-          });
-          return name ? name : '暂无'
+  },
+  mounted() {
+    this.$nextTick(function () {
+      this.tableHeight =
+        window.innerHeight - this.$refs.table.$el.offsetTop - 200;
+      if (this.tableHeight <= 530) {
+        this.tableHeight = 530;
+      }
+      // 监听窗口大小变化
+      let self = this;
+      window.onresize = function () {
+        self.tableHeight =
+          window.innerHeight - self.$refs.table.$el.offsetTop - 200;
+        if (self.tableHeight <= 530) {
+          self.tableHeight = 530;
         }
         }
+      };
+    });
+  },
+  methods: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
       }
       }
     },
     },
-    mounted() {
-      this.$nextTick(function () {
-        this.tableHeight =
-          window.innerHeight - this.$refs.table.$el.offsetTop - 200;
-        if (this.tableHeight <= 530) {
-          this.tableHeight = 530;
-        }
-        // 监听窗口大小变化
-        let self = this;
-        window.onresize = function () {
-          self.tableHeight =
-            window.innerHeight - self.$refs.table.$el.offsetTop - 200;
-          if (self.tableHeight <= 530) {
-            self.tableHeight = 530;
-          }
-        };
-      });
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getClass();
     },
     },
-    methods: {
-      tableRowClassName({ row, rowIndex }) {
-        if ((rowIndex + 1) % 2 === 0) {
-          return "even_row";
-        } else {
-          return "";
-        }
-      },
-      handleCurrentChange(val) {
-        this.page = val;
-        this.getClass();
-      },
-      handleClose(done) {
-        done();
-      },
-      time() {
-        if (!this.now) {
-          this.now = new Date().getTime();
+    handleClose(done) {
+      done();
+    },
+    time() {
+      if (!this.now) {
+        this.now = new Date().getTime();
+        return true;
+      } else {
+        let time = new Date().getTime();
+        if (time - this.now > 3000) {
+          this.now = time;
           return true;
           return true;
         } else {
         } else {
-          let time = new Date().getTime();
-          if (time - this.now > 3000) {
-            this.now = time;
-            return true;
-          } else {
-            return false;
-          }
+          return false;
         }
         }
-      },
-      searchClass() {
-        this.page = 1;
-        this.getClass();
-      },
-      openUpdate(id, n) {
-        this.classid = id;
-        this.className1 = n;
-        this.dialogVisible1 = true;
-      },
-      //新增年级
-      insertGrade() {
-        let params = {
-          name: this.className,
-          oid: this.oid,
-          uid: this.userid,
-        };
-        this.ajax
-          .get(this.$store.state.api + "insertGrade", params)
-          .then((res) => {
-            if (res.data[0] && res.data[0][0].classname == 1) {
-              this.$message({
-                message: "不能与其他年级名称相同!",
-                type: "error",
-              });
-            } else {
-              this.$message({
-                message: "新增成功",
-                type: "success",
-              });
-              this.dialogVisible = false;
-              this.sClassName = "";
-              this.getClass();
-              this.className = "";
-            }
-          })
-          .catch((err) => {
-            this.$message({
-              message: "新增失败",
-              type: "error",
-            });
-            console.error(err);
-          });
-      },
-      //修改年级
-      updateGrade() {
-        let params = {
-          id: this.classid,
-          n: this.className1,
-          oid: this.oid,
-        };
-        this.ajax
-          .get(this.$store.state.api + "updateGrade", params)
-          .then((res) => {
-            if (res.data[0] && res.data[0][0].classname == 1) {
-              this.$message({
-                message: "不能与其他年级名称相同!",
-                type: "error",
-              });
-            } else {
-              this.$message({
-                message: "修改成功",
-                type: "success",
-              });
-              this.dialogVisible1 = false;
-              this.getClass();
-              this.classid = "";
-              this.className1 = "";
-            }
-          })
-          .catch((err) => {
+      }
+    },
+    searchClass() {
+      this.page = 1;
+      this.getClass();
+    },
+    openUpdate(id, n) {
+      this.classid = id;
+      this.className1 = n;
+      this.dialogVisible1 = true;
+    },
+    //新增年级
+    insertGrade() {
+      let params = {
+        name: this.className,
+        oid: this.oid,
+        uid: this.userid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "insertGrade", params)
+        .then((res) => {
+          if (res.data[0] && res.data[0][0].classname == 1) {
             this.$message({
             this.$message({
-              message: "修改失败",
+              message: "不能与其他年级名称相同!",
               type: "error",
               type: "error",
             });
             });
-            console.error(err);
-          });
-      },
-      //获取年级列表
-      getClass() {
-        this.isLoading = true;
-        let params = {
-          // username: this.$store.state.userInfo.userid,
-          cu: "",
-          oid: this.oid,
-          cn: this.sClassName,
-          page: this.page,
-        };
-        this.ajax
-          .get(this.$store.state.api + "selectGrade", params)
-          .then((res) => {
-            this.isLoading = false;
-            this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
-            this.tableData = res.data[0];
-          })
-          .catch((err) => {
-            this.isLoading = false;
-            console.error(err);
-          });
-      },
-      //删除年级
-      deleteGrade(id) {
-        let params = {
-          id: id,
-        };
-        if (this.time()) {
-          this.$confirm("确定删除此年级吗?", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning",
-          })
-            .then(() => {
-              this.ajax
-                .get(this.$store.state.api + "deleteGrade", params)
-                .then((res) => {
-                  this.$message({
-                    message: "删除成功",
-                    type: "success",
-                  });
-                  if (this.page != 1 && this.tableData.length == 1) {
-                    this.page - 1;
-                  }
-                  this.getClass();
-                })
-                .catch((err) => {
-                  this.$message.error("删除失败");
-                  console.error(err);
-                });
-            })
-            .catch(() => { });
-        }
-      },
-      addStudent() {
-        // this.dialogVisibleAddStudent = true;
-        // (this.sName = ""), (this.sPhone = ""), (this.sByClass = ""), this.sMail;
-        // this.getClass2();
-        this.dialogVisibleMember = true
-        this.searchTN = ""
-        this.getClassStudent();
-      },
-      //新增学生
-      insertStudent() {
-        if (this.sName === "") {
-          this.$message.error("学生姓名不能为空");
-          return;
-        } else if (
-          this.sPhone != "" &&
-          !/^[1][3,4,5,7,8][0-9]{9}$/.test(this.sPhone)
-        ) {
-          this.$message.error("手机号格式不正确");
-          return;
-        } else if (
-          !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)
-        ) {
-          this.$message.error("邮箱格式不正确");
-          return;
-        }
-  
-        if (this.time()) {
-          let params = { un: this.sMail };
-          this.ajax
-            .get(this.$store.state.api + "findMail", params)
-            .then((res) => {
-              if (res.data[0].length > 0) {
-                this.$message.error("此学生账号已被注册");
-              } else {
-                this.add_Student();
-              }
-            })
-            .catch((err) => {
-              console.error(err);
-            });
-        }
-      },
-      add_Student() {
-        let params = [
-          {
-            username: this.sMail,
-            userpassword: 123456,
-            alias: this.sName,
-            oid: this.oid,
-            ph: this.sPhone,
-            sid: this.sId,
-            cid: this.cid,
-          },
-        ];
-        this.ajax
-          .post(this.$store.state.api + "batchRegistration", params)
-          .then((res) => {
-  
-            let params = [
-              {
-                userid: res.data.uid,
-                username: this.sName,
-                sid: this.sId,
-                type: 2,
-                oid: res.data.oid,
-                phone: res.data.ph,
-                cid: res.data.cid,
-                intro: "",
-                sex: "0",
-              },
-            ];
-            this.ajax
-              .post(this.$store.state.api + "updateUserByEdu", params)
-              .then((res) => {
-                console.log(res);
-              })
-              .catch((err) => {
-                console.error(err);
-              });
+          } else {
             this.$message({
             this.$message({
               message: "新增成功",
               message: "新增成功",
               type: "success",
               type: "success",
             });
             });
-            this.dialogVisibleAddStudent = false;
-            this.sPhone = "";
-            this.sName = "";
-            this.sByClass = [];
-            this.sMail = "";
-            this.getStudent(this.cid);
-          })
-          .catch((err) => {
-            this.isLoading = false;
+            this.dialogVisible = false;
+            this.sClassName = "";
+            this.getClass();
+            this.className = "";
+          }
+        })
+        .catch((err) => {
+          this.$message({
+            message: "新增失败",
+            type: "error",
+          });
+          console.error(err);
+        });
+    },
+    //修改年级
+    updateGrade() {
+      let params = {
+        id: this.classid,
+        n: this.className1,
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "updateGrade", params)
+        .then((res) => {
+          if (res.data[0] && res.data[0][0].classname == 1) {
             this.$message({
             this.$message({
-              message: "新增失败",
+              message: "不能与其他年级名称相同!",
               type: "error",
               type: "error",
             });
             });
-            console.error(err);
-          });
-      },
-      updateStudentA(res) {
-        this.userinfo = JSON.parse(JSON.stringify(res));
-        this.userinfoA = JSON.parse(JSON.stringify(res));
-        this.userinfo.classid = this.userinfo.classid.split(",")
-        this.dialogVisibleUpdate = true;
-      },
-      updateStudent() {
-        if (this.userinfo.name === "") {
-          this.$message.error("学生姓名不能为空");
-          return;
-        } else if (!this.userinfo.classid) {
-          this.$message.error("请为学生选择年级");
-          return;
-        } else if (
-          this.userinfo.phonenumber &&
-          !/^[1][3,4,5,7,8][0-9]{9}$/.test(this.userinfo.phonenumber)
-        ) {
-          this.$message.error("手机号格式不正确");
-          return;
-        } else if (
-          !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(
-            this.userinfo.un
-          )
-        ) {
-          this.$message.error("邮箱格式不正确");
-          return;
-        }
-  
-        if (this.time()) {
-          if (this.userinfoA.un != this.userinfo.un) {
-            let params = { un: this.userinfo.un };
-            this.ajax
-              .get(this.$store.state.api + "findMail", params)
-              .then((res) => {
-                if (res.data[0].length > 0) {
-                  this.$message.error("此学生账号已被注册");
-                } else {
-                  this.update_Student();
-                }
-              })
-              .catch((err) => {
-                console.error(err);
-              });
           } else {
           } else {
-            this.update_Student();
-          }
-        }
-      },
-      update_Student() {
-        let params = [
-          {
-            userid: this.userinfo.userid,
-            username: this.userinfo.un,
-            alias: this.userinfo.name,
-            ph: this.userinfo.phonenumber,
-            sid: this.userinfo.studentid,
-            cid: this.userinfo.classid.join(","),
-          },
-        ];
-        this.ajax
-          .post(this.$store.state.api + "updateStudentInfo", params)
-          .then((res) => {
             this.$message({
             this.$message({
               message: "修改成功",
               message: "修改成功",
               type: "success",
               type: "success",
             });
             });
-            this.dialogVisibleUpdate = false;
-            this.getStudent(this.cid);
-          })
-          .catch((err) => {
-            this.isLoading = false;
-            this.$message({
-              message: "修改失败",
-              type: "error",
-            });
-            console.error(err);
+            this.dialogVisible1 = false;
+            this.getClass();
+            this.classid = "";
+            this.className1 = "";
+          }
+        })
+        .catch((err) => {
+          this.$message({
+            message: "修改失败",
+            type: "error",
           });
           });
-      },
-      deleteClassStudent(id) {
-        let params = [{ uid: id, cid: this.cid }];
-        this.$confirm("确定在本年级移除此班级吗?", "提示", {
+          console.error(err);
+        });
+    },
+    //获取年级列表
+    getClass() {
+      this.isLoading = true;
+      let params = {
+        // username: this.$store.state.userInfo.userid,
+        cu: "",
+        oid: this.oid,
+        cn: this.sClassName,
+        page: this.page,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectGrade", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    //删除年级
+    deleteGrade(id) {
+      let params = {
+        id: id,
+      };
+      if (this.time()) {
+        this.$confirm("确定删除此年级吗?", "提示", {
           confirmButtonText: "确定",
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           cancelButtonText: "取消",
           type: "warning",
           type: "warning",
         })
         })
           .then(() => {
           .then(() => {
             this.ajax
             this.ajax
-              .post(this.$store.state.api + "deleteGradeClass", params)
+              .get(this.$store.state.api + "deleteGrade", params)
               .then((res) => {
               .then((res) => {
                 this.$message({
                 this.$message({
-                  message: "操作成功",
+                  message: "删除成功",
                   type: "success",
                   type: "success",
                 });
                 });
-                this.getStudent(this.cid);
+                if (this.page != 1 && this.tableData.length == 1) {
+                  this.page - 1;
+                }
+                this.getClass();
               })
               })
               .catch((err) => {
               .catch((err) => {
-                this.$message.error("操作失败");
+                this.$message.error("删除失败");
                 console.error(err);
                 console.error(err);
               });
               });
           })
           })
-          .catch(() => { });
-      },
-      //获取班级列表
-      getClass2() {
-        this.isLoading = true;
-        let params = {
-          oid: this.oid,
-        };
+          .catch(() => {});
+      }
+    },
+    addStudent() {
+      // this.dialogVisibleAddStudent = true;
+      // (this.sName = ""), (this.sPhone = ""), (this.sByClass = ""), this.sMail;
+      // this.getClass2();
+      this.dialogVisibleMember = true;
+      this.searchTN = "";
+      this.getClassStudent();
+    },
+    //新增学生
+    insertStudent() {
+      if (this.sName === "") {
+        this.$message.error("学生姓名不能为空");
+        return;
+      } else if (
+        this.sPhone != "" &&
+        !/^[1][3,4,5,7,8][0-9]{9}$/.test(this.sPhone)
+      ) {
+        this.$message.error("手机号格式不正确");
+        return;
+      } else if (
+        !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)
+      ) {
+        this.$message.error("邮箱格式不正确");
+        return;
+      }
+
+      if (this.time()) {
+        let params = { un: this.sMail };
         this.ajax
         this.ajax
-          .get(this.$store.state.api + "selectGrageBySchool", params)
+          .get(this.$store.state.api + "findMail", params)
           .then((res) => {
           .then((res) => {
-            this.isLoading = false;
-            this.classJuri = res.data[0];
+            if (res.data[0].length > 0) {
+              this.$message.error("此学生账号已被注册");
+            } else {
+              this.add_Student();
+            }
           })
           })
           .catch((err) => {
           .catch((err) => {
-            this.isLoading = false;
             console.error(err);
             console.error(err);
           });
           });
-      },
-      getSchoolName() {
-        let params = {
+      }
+    },
+    add_Student() {
+      let params = [
+        {
+          username: this.sMail,
+          userpassword: 123456,
+          alias: this.sName,
           oid: this.oid,
           oid: this.oid,
-        };
-        this.ajax
-          .get(this.$store.state.api + "selectSchoolName2", params)
-          .then((res) => {
-            this.schoolName = res.data[0][0].name;
-          })
-          .catch((err) => {
-            console.error(err);
-          });
-      },
-      searchStudent() {
-        this.page2 = 1;
-        this.getStudent(this.cid);
-      },
-      handleCurrentChange2(val) {
-        this.page2 = val;
-        this.getStudent(this.cid);
-      },
-      handleCurrentChange3(val) {
-        this.page3 = val;
-        this.getClassStudent();
-      },
-      getStudent(cid) {
-        this.cid = cid
-        this.ctype = 2
-        this.isLoading = true;
-        let params = {
+          ph: this.sPhone,
+          sid: this.sId,
           cid: this.cid,
           cid: this.cid,
-          oid: this.oid,
-          cn: this.sPhoneUser,
-          page: this.page2,
-        };
-        this.ajax
-          .get(this.$store.state.api + "selectClass2", params)
-          .then((res) => {
-            this.isLoading = false;
-            this.total2 = res.data[0].length > 0 ? res.data[0][0].num : 0;
-            this.tableData2 = res.data[0];
-            this.getClass2();
-          })
-          .catch((err) => {
-            this.isLoading = false;
-            console.error(err);
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "batchRegistration", params)
+        .then((res) => {
+          let params = [
+            {
+              userid: res.data.uid,
+              username: this.sName,
+              sid: this.sId,
+              type: 2,
+              oid: res.data.oid,
+              phone: res.data.ph,
+              cid: res.data.cid,
+              intro: "",
+              sex: "0",
+            },
+          ];
+          this.ajax
+            .post(this.$store.state.api + "updateUserByEdu", params)
+            .then((res) => {
+              console.log(res);
+            })
+            .catch((err) => {
+              console.error(err);
+            });
+          this.$message({
+            message: "新增成功",
+            type: "success",
           });
           });
-      },
-      getClassStudent() {
-        this.isLoading2 = true;
-        let params = {
-          oid: this.oid,
-          cid: this.cid,
-          cn: this.searchTN,
-          page: this.page3,
-          num: this.pageSize3,
-        };
-        this.ajax
-          .get(this.$store.state.api + "getGradeClass", params)
-          .then((res) => {
-            this.isLoading2 = false;
-            this.total3 = res.data[0].length > 0 ? res.data[0][0].num : 0;
-            this.teacherJuri = res.data[0];
-          })
-          .catch((err) => {
-            this.isLoading2 = false;
-            console.error(err);
+          this.dialogVisibleAddStudent = false;
+          this.sPhone = "";
+          this.sName = "";
+          this.sByClass = [];
+          this.sMail = "";
+          this.getStudent(this.cid);
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          this.$message({
+            message: "新增失败",
+            type: "error",
           });
           });
-      },
-      addClassStudent() {
-        if (!this.checkboxList3.length) {
-          this.$message.error('请选择要添加的班级');
-          return;
+          console.error(err);
+        });
+    },
+    updateStudentA(res) {
+      this.userinfo = JSON.parse(JSON.stringify(res));
+      this.userinfoA = JSON.parse(JSON.stringify(res));
+      this.userinfo.classid = this.userinfo.classid.split(",");
+      this.dialogVisibleUpdate = true;
+    },
+    updateStudent() {
+      if (this.userinfo.name === "") {
+        this.$message.error("学生姓名不能为空");
+        return;
+      } else if (!this.userinfo.classid) {
+        this.$message.error("请为学生选择年级");
+        return;
+      } else if (
+        this.userinfo.phonenumber &&
+        !/^[1][3,4,5,7,8][0-9]{9}$/.test(this.userinfo.phonenumber)
+      ) {
+        this.$message.error("手机号格式不正确");
+        return;
+      } else if (
+        !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(
+          this.userinfo.un
+        )
+      ) {
+        this.$message.error("邮箱格式不正确");
+        return;
+      }
+
+      if (this.time()) {
+        if (this.userinfoA.un != this.userinfo.un) {
+          let params = { un: this.userinfo.un };
+          this.ajax
+            .get(this.$store.state.api + "findMail", params)
+            .then((res) => {
+              if (res.data[0].length > 0) {
+                this.$message.error("此学生账号已被注册");
+              } else {
+                this.update_Student();
+              }
+            })
+            .catch((err) => {
+              console.error(err);
+            });
+        } else {
+          this.update_Student();
         }
         }
-        let params = [{
-          cid: this.cid,
-          student: JSON.stringify(this.checkboxList3)
-        }];
-        this.ajax
-          .post(this.$store.state.api + "addGradeClass", params)
-          .then((res) => {
-            this.checkboxList3 = []
-            this.dialogVisibleMember = false
-            this.getStudent(this.cid)
-          })
-          .catch((err) => {
-            console.error(err);
+      }
+    },
+    update_Student() {
+      let params = [
+        {
+          userid: this.userinfo.userid,
+          username: this.userinfo.un,
+          alias: this.userinfo.name,
+          ph: this.userinfo.phonenumber,
+          sid: this.userinfo.studentid,
+          cid: this.userinfo.classid.join(","),
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "updateStudentInfo", params)
+        .then((res) => {
+          this.$message({
+            message: "修改成功",
+            type: "success",
           });
           });
-      },
-      iniPassword(id) {
-        this.$confirm("确定" + "初始化" + "此学生的密码吗?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
+          this.dialogVisibleUpdate = false;
+          this.getStudent(this.cid);
         })
         })
-          .then(() => {
-            let params = [
-              {
-                uid: id,
-                pa: 123456,
-              },
-            ];
-            this.ajax
-              .post(this.$store.state.api + "iniPassword", params)
-              .then((res) => {
-                this.$message({
-                  message: "初始化密码成功!",
-                  type: "success",
-                });
-              })
-              .catch((err) => {
-                console.error(err);
+        .catch((err) => {
+          this.isLoading = false;
+          this.$message({
+            message: "修改失败",
+            type: "error",
+          });
+          console.error(err);
+        });
+    },
+    deleteClassStudent(id) {
+      let params = [{ uid: id, cid: this.cid }];
+      this.$confirm("确定在本年级移除此班级吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.ajax
+            .post(this.$store.state.api + "deleteGradeClass", params)
+            .then((res) => {
+              this.$message({
+                message: "操作成功",
+                type: "success",
               });
               });
-          })
-          .catch(() => { });
-      },
+              this.getStudent(this.cid);
+            })
+            .catch((err) => {
+              this.$message.error("操作失败");
+              console.error(err);
+            });
+        })
+        .catch(() => {});
+    },
+    //获取班级列表
+    getClass2() {
+      this.isLoading = true;
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectGrageBySchool", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.classJuri = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    getSchoolName() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSchoolName2", params)
+        .then((res) => {
+          this.schoolName = res.data[0][0].name;
+        })
+        .catch((err) => {
+          console.error(err);
+        });
     },
     },
-  };
-  </script>
+    searchStudent() {
+      this.page2 = 1;
+      this.getStudent(this.cid);
+    },
+    handleCurrentChange2(val) {
+      this.page2 = val;
+      this.getStudent(this.cid);
+    },
+    handleCurrentChange3(val) {
+      this.page3 = val;
+      this.getClassStudent();
+    },
+    getStudent(cid) {
+      this.cid = cid;
+      this.ctype = 2;
+      this.isLoading = true;
+      let params = {
+        cid: this.cid,
+        oid: this.oid,
+        cn: this.sPhoneUser,
+        page: this.page2,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectClass2", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.total2 = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData2 = res.data[0];
+          this.getClass2();
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    getClassStudent() {
+      this.isLoading2 = true;
+      let params = {
+        oid: this.oid,
+        cid: this.cid,
+        cn: this.searchTN,
+        page: this.page3,
+        num: this.pageSize3,
+      };
+      this.ajax
+        .get(this.$store.state.api + "getGradeClass", params)
+        .then((res) => {
+          this.isLoading2 = false;
+          this.total3 = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.teacherJuri = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading2 = false;
+          console.error(err);
+        });
+    },
+    addClassStudent() {
+      if (!this.checkboxList3.length) {
+        this.$message.error("请选择要添加的班级");
+        return;
+      }
+      let params = [
+        {
+          cid: this.cid,
+          student: JSON.stringify(this.checkboxList3),
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "addGradeClass", params)
+        .then((res) => {
+          this.checkboxList3 = [];
+          this.dialogVisibleMember = false;
+          this.getStudent(this.cid);
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    iniPassword(id) {
+      this.$confirm("确定" + "初始化" + "此学生的密码吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let params = [
+            {
+              uid: id,
+              pa: 123456,
+            },
+          ];
+          this.ajax
+            .post(this.$store.state.api + "iniPassword", params)
+            .then((res) => {
+              this.$message({
+                message: "初始化密码成功!",
+                type: "success",
+              });
+            })
+            .catch((err) => {
+              console.error(err);
+            });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
   
   
   <style scoped>
   <style scoped>
-  .dialog_diy>>>.el-dialog__header {
-    background: #3d67bc !important;
-    padding: 15px 20px;
-  }
-  
-  .dialog_diy>>>.el-dialog__title {
-    color: #fff;
-  }
-  
-  .student_table>>>.el-table--border td {
-    border-right: 0px !important;
-  }
-  
-  .dialog_diy>>>.el-dialog__headerbtn {
-    top: 19px;
-  }
-  
-  .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
-    color: #fff;
-  }
-  
-  .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
-    color: #fff;
-  }
-  
-  .student_head>>>.el-button--primary {
-    background-color: #2268bc;
-  }
-  
-  .xls_button {
-    font-size: 14px;
-    cursor: pointer;
-    text-decoration: underline;
-    color: rgb(34, 104, 188);
-  }
-  
-  .pb_head {
-    margin: 0 !important;
-    width: 100% !important;
-  }
-  
-  .student_page {
-    margin-top: 10px;
-  }
-  
-  .student_head {
-    margin-top: 10px;
-    padding-bottom: 15px;
-    display: flex;
-    justify-content: space-between;
-  }
-  
-  .student_search {
-    display: flex;
-    width: 300px;
-  }
-  
-  .student_search span {
-    margin: 0 10px 0 0;
-  }
-  
-  .student_button {
-    display: flex;
-    height: 40px;
-  }
-  
-  .student_button .el-button--primary {
-    /* margin-right: 10px; */
-  }
-  
-  .upload-demo {
-    display: flex;
-    flex-direction: column;
-    align-items: end;
-    /* position: relative; */
-    width: 100px;
-    overflow: hidden;
-  }
-  
-  .student_table {
-    margin: 20px 0;
-  }
-  
-  .el-table>>>.even_row {
-    background-color: #f1f1f1;
-  }
-  
-  .top {
-    display: flex;
-    justify-content: space-between;
-  }
-  
-  .bgColor {
-    background: #2167bc;
-  }
-  
-  .student_table>>>.el-table,
-  .student_table>>>.el-table__body-wrapper {
-    height: auto !important;
-  }
-  
-  .student_head {
-    margin-top: 10px;
-    padding-bottom: 10px;
-    display: flex;
-    justify-content: space-between;
-  }
-  
-  .head_left {
-    display: flex;
-    align-items: center;
-  }
-  
-  .head_right {
-    display: flex;
-    flex-direction: row;
-    flex-wrap: nowrap;
-    align-items: baseline;
-  }
-  
-  .student_input>>>.el-input__inner {
-    width: 190px;
-    font-size: 13px;
-    padding: 0 10px;
-  }
-  
-  .student_button {
-    color: #fff;
-    background: #2268bc;
-  }
-  
-  .head_right>button:nth-child(1) {
-    color: #fff;
-    background: #2268bc;
-  }
-  
-  
-  .head_right>div {
-    line-height: 40px;
-    margin-left: 10px;
-    color: #2a6dbe;
-    text-decoration: underline;
-    cursor: pointer;
-  }
-  
-  .userImg {
-    display: flex;
-    flex-direction: row;
-    justify-content: center;
-    align-items: center;
-  }
-  
-  .tx {
-    width: 40px;
-    margin-right: 10px;
-  }
-  
-  .delete {
-    width: 25px;
-    height: 25px;
-    cursor: pointer;
-    margin-left: 10px;
-  }
-  
-  .tx>img,
-  .delete>img {
-    width: 100%;
-    height: 100%;
-  }
-  
-  .btnBox {
-    display: flex;
-    align-items: center;
-  }
-  
-  .add_student>>>.el-dialog__header {
-    padding: 20px 20px 10px;
-    text-align: center;
-    background: #32455b;
-  }
-  
-  .add_student>>>.el-dialog__title {
-    font-size: 14px !important;
-    color: #fff !important;
-  }
-  
-  .add_student>>>.el-dialog__headerbtn {
-    font-size: 20px !important;
-  }
-  
-  .add_student>>>.el-form-item__label {
-    margin-left: 65px;
-  }
-  
-  .add_student>>>.el-form-item {
-    display: flex;
-  }
-  
-  .add_student>>>.el-form-item__content {
-    margin: 0 !important;
-  }
-  
-  .add_input {
-    width: 365px;
-  }
-  
-  .add_student>>>.el-dialog__footer {
-    text-align: center !important;
-  }
-  
-  .right {
-    width: 250px;
-    color: #fff;
-    background: #0e72e6;
-    margin-bottom: 20px;
-  }
-  
-  .header-title {
-    display: flex;
-  }
-  
-  .logoImg {
-    width: 30px;
-  }
-  
-  .logoImg>img {
-    width: 100%;
-    height: 100%;
-  }
-  
-  .title_add_student {
-    margin: 0 auto;
-    color: #fff;
-  }
-  
-  .upload-demo {
-    line-height: 0px !important;
-  }
-  
-  .upload-demo>>>.el-button {
-    color: #fff;
-    background: #2268bc;
-    width: 70px;
-    height: 30px;
-    padding: 0 !important;
-    font-size: 12px;
-    line-height: 0 !important;
-  }
-  
-  .people {
-    border: 1px solid rgb(229 229 229);
-    height: 495px;
-    border-radius: 5px;
-    width: 100%;
-    overflow: auto;
-  }
-  
-  .people_top {
-    display: flex;
-    width: 100%;
-    /* justify-content: space-between; */
-    /* align-items: center; */
-    flex-direction: column;
-    padding: 10px 25px 0;
-    box-sizing: border-box;
-  }
-  
-  .people_nav,
-  .people_top_right {
-    /* padding: 20px 0 0 20px; */
-  }
-  
-  .people_top_right {
-    height: 40px;
-    margin-bottom: 10px;
-  }
-  
-  .people_search {
-    display: flex;
-    position: relative;
-  }
-  
-  .people_search>>>.el-input__inner {
-    /* height: 25px; */
-    width: 95%;
-  }
-  
-  .search_img {
-    width: 20px;
-    height: 20px;
-    position: absolute;
-    right: 30px;
-    top: 50%;
-    transform: translateY(-50%);
-  }
-  
-  .search_img>img {
-    width: 100%;
-    height: 100%;
-  }
-  
-  .people_name {
-    display: flex;
-    justify-content: flex-start;
-    padding: 10px 0 0 25px;
-    flex-direction: column;
-    flex-wrap: nowrap;
-    height: calc(100% - 140px);
-    overflow-y: auto;
-    overflow-x: hidden;
-    flex-direction: column;
-  }
-  
-  .people_name>>>.el-checkbox {
-    width: 100%;
-    display: flex;
-    align-items: center;
-    margin-bottom: 10px;
-  }
-  
-  .people_name>>>.el-checkbox__label {
-    text-overflow: ellipsis;
-    overflow: hidden;
-    width: 100%;
-  }
-  
-  .addNewPP>>>.el-dialog__body {
-    padding: 5px 20px;
-  }
-  
-  .t_j_box {
-    display: flex;
-  }
-  
-  .t_j_box span:nth-child(1) {
-    width: 100%;
-    overflow: hidden;
-    margin-right: 10px;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-  }
-  
-  .t_j_box span:nth-child(2) {
-    width: 50%;
-    overflow: hidden;
-    margin-right: 10px;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-  }
-  </style>
+.dialog_diy >>> .el-dialog__header {
+  background: #3d67bc !important;
+  padding: 15px 20px;
+}
+
+.dialog_diy >>> .el-dialog__title {
+  color: #fff;
+}
+
+.student_table >>> .el-table--border td {
+  border-right: 0px !important;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn {
+  top: 19px;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
+  color: #fff;
+}
+
+.student_head >>> .el-button--primary {
+  background-color: #2268bc;
+}
+
+.xls_button {
+  font-size: 14px;
+  cursor: pointer;
+  text-decoration: underline;
+  color: rgb(34, 104, 188);
+}
+
+.pb_head {
+  margin: 0 !important;
+  width: 100% !important;
+}
+
+.student_page {
+  margin-top: 10px;
+}
+
+.student_head {
+  margin-top: 10px;
+  padding-bottom: 15px;
+  display: flex;
+  justify-content: space-between;
+}
+
+.student_search {
+  display: flex;
+  width: 300px;
+}
+
+.student_search span {
+  margin: 0 10px 0 0;
+}
+
+.student_button {
+  display: flex;
+  height: 40px;
+}
+
+.student_button .el-button--primary {
+  /* margin-right: 10px; */
+}
+
+.upload-demo {
+  display: flex;
+  flex-direction: column;
+  align-items: end;
+  /* position: relative; */
+  width: 100px;
+  overflow: hidden;
+}
+
+.student_table {
+  margin: 20px 0;
+}
+
+.el-table >>> .even_row {
+  background-color: #f1f1f1;
+}
+
+.top {
+  display: flex;
+  justify-content: space-between;
+}
+
+.bgColor {
+  background: #2167bc;
+}
+
+.student_table >>> .el-table,
+.student_table >>> .el-table__body-wrapper {
+  height: auto !important;
+}
+
+.student_head {
+  margin-top: 10px;
+  padding-bottom: 10px;
+  display: flex;
+  justify-content: space-between;
+}
+
+.head_left {
+  display: flex;
+  align-items: center;
+}
+
+.head_right {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: baseline;
+}
+
+.student_input >>> .el-input__inner {
+  width: 190px;
+  font-size: 13px;
+  padding: 0 10px;
+}
+
+.student_button {
+  color: #fff;
+  background: #2268bc;
+}
+
+.head_right > button:nth-child(1) {
+  color: #fff;
+  background: #2268bc;
+}
+
+.head_right > div {
+  line-height: 40px;
+  margin-left: 10px;
+  color: #2a6dbe;
+  text-decoration: underline;
+  cursor: pointer;
+}
+
+.userImg {
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+}
+
+.tx {
+  width: 40px;
+  margin-right: 10px;
+}
+
+.delete {
+  width: 25px;
+  height: 25px;
+  cursor: pointer;
+  margin-left: 10px;
+}
+
+.tx > img,
+.delete > img {
+  width: 100%;
+  height: 100%;
+}
+
+.btnBox {
+  display: flex;
+  align-items: center;
+}
+
+.add_student >>> .el-dialog__header {
+  padding: 20px 20px 10px;
+  text-align: center;
+  background: #32455b;
+}
+
+.add_student >>> .el-dialog__title {
+  font-size: 14px !important;
+  color: #fff !important;
+}
+
+.add_student >>> .el-dialog__headerbtn {
+  font-size: 20px !important;
+}
+
+.add_student >>> .el-form-item__label {
+  margin-left: 65px;
+}
+
+.add_student >>> .el-form-item {
+  display: flex;
+}
+
+.add_student >>> .el-form-item__content {
+  margin: 0 !important;
+}
+
+.add_input {
+  width: 365px;
+}
+
+.add_student >>> .el-dialog__footer {
+  text-align: center !important;
+}
+
+.right {
+  width: 250px;
+  color: #fff;
+  background: #0e72e6;
+  margin-bottom: 20px;
+}
+
+.header-title {
+  display: flex;
+}
+
+.logoImg {
+  width: 30px;
+}
+
+.logoImg > img {
+  width: 100%;
+  height: 100%;
+}
+
+.title_add_student {
+  margin: 0 auto;
+  color: #fff;
+}
+
+.upload-demo {
+  line-height: 0px !important;
+}
+
+.upload-demo >>> .el-button {
+  color: #fff;
+  background: #2268bc;
+  width: 70px;
+  height: 30px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 0 !important;
+}
+
+.people {
+  border: 1px solid rgb(229 229 229);
+  height: 450px;
+  border-radius: 5px;
+  width: 100%;
+  overflow: auto;
+}
+
+.people_top {
+  display: flex;
+  width: 100%;
+  /* justify-content: space-between; */
+  /* align-items: center; */
+  flex-direction: column;
+  padding: 10px 25px 0;
+  box-sizing: border-box;
+}
+
+.people_nav,
+.people_top_right {
+  /* padding: 20px 0 0 20px; */
+}
+
+.people_top_right {
+  height: 40px;
+  margin-bottom: 10px;
+}
+
+.people_search {
+  display: flex;
+  position: relative;
+}
+
+.people_search >>> .el-input__inner {
+  /* height: 25px; */
+  width: 95%;
+}
+
+.search_img {
+  width: 20px;
+  height: 20px;
+  position: absolute;
+  right: 30px;
+  top: 50%;
+  transform: translateY(-50%);
+}
+
+.search_img > img {
+  width: 100%;
+  height: 100%;
+}
+
+.people_name {
+  display: flex;
+  justify-content: flex-start;
+  padding: 10px 0 0 25px;
+  flex-direction: column;
+  flex-wrap: nowrap;
+  height: calc(100% - 140px);
+  overflow-y: auto;
+  overflow-x: hidden;
+  flex-direction: column;
+}
+
+.people_name >>> .el-checkbox {
+  width: 100%;
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+}
+
+.people_name >>> .el-checkbox__label {
+  text-overflow: ellipsis;
+  overflow: hidden;
+  width: 100%;
+}
+
+.addNewPP >>> .el-dialog {
+  margin-top: 5vh !important;
+}
+
+.addNewPP >>> .el-dialog__body {
+  padding: 5px 20px;
+}
+
+.t_j_box {
+  display: flex;
+}
+
+.t_j_box span:nth-child(1) {
+  width: 100%;
+  overflow: hidden;
+  margin-right: 10px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.t_j_box span:nth-child(2) {
+  width: 50%;
+  overflow: hidden;
+  margin-right: 10px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+</style>
   
   

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

@@ -1266,7 +1266,7 @@ export default {
       //   "",
       //   "",
       //   "",
       //   "",
       handle: {page: 1, type: 0, userid: '', isPlay: 0},
       handle: {page: 1, type: 0, userid: '', isPlay: 0},
-      //1、电子白板 2、便签 3、思维导图 4、问卷调查 5、量规评分 6、协同文档 7、思维网格 8、素材库 9、选择题 10、倒计时 11、问答题 12、选人回答 13、分小组 14、老师对提交作业进行评价 15、问答 16、作业提交 17、学习资料 18、训练平台 19、目标管理 20、课程设计 21、编程平台 22、AI体验 23、python 24、AI平台
+      //1、电子白板 2、便签 3、思维导图 4、问卷调查 5、量规评分 6、协同文档 7、思维网格 8、素材库 9、选择题 10、倒计时 11、问答题 12、选人回答 13、分小组 14、老师对提交作业进行评价 15、问答 16、作业提交 17、学习资料 18、训练平台 19、目标管理 20、课程设计 21、编程平台 22、AI体验 23、python 24、AI Blockly
       howTools: 0,
       howTools: 0,
       worksDetail: [],
       worksDetail: [],
       worksList: [],
       worksList: [],

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

@@ -1266,7 +1266,7 @@ export default {
       //   "",
       //   "",
       //   "",
       //   "",
       handle: {page: 1, type: 0, userid: '', isPlay: 0},
       handle: {page: 1, type: 0, userid: '', isPlay: 0},
-      //1、电子白板 2、便签 3、思维导图 4、问卷调查 5、量规评分 6、协同文档 7、思维网格 8、素材库 9、选择题 10、倒计时 11、问答题 12、选人回答 13、分小组 14、老师对提交作业进行评价 15、问答 16、作业提交 17、学习资料 18、训练平台 19、目标管理 20、课程设计 21、编程平台 22、AI体验 23、python 24、AI平台
+      //1、电子白板 2、便签 3、思维导图 4、问卷调查 5、量规评分 6、协同文档 7、思维网格 8、素材库 9、选择题 10、倒计时 11、问答题 12、选人回答 13、分小组 14、老师对提交作业进行评价 15、问答 16、作业提交 17、学习资料 18、训练平台 19、目标管理 20、课程设计 21、编程平台 22、AI体验 23、python 24、AI Blockly
       howTools: 0,
       howTools: 0,
       worksDetail: [],
       worksDetail: [],
       worksList: [],
       worksList: [],

+ 5 - 5
src/components/pages/myReport/components/MyLookComponent/worksDetail3.vue

@@ -202,7 +202,7 @@
                         margin-bottom: 10px;
                         margin-bottom: 10px;
                       "
                       "
                     >
                     >
-                      <div style="font-size: 16px">问答工具</div>
+                      <div style="font-size: 16px">问答</div>
                     </div>
                     </div>
                     <div class="answerbox">
                     <div class="answerbox">
                       <div style="min-width: 80px">问答标题</div>
                       <div style="min-width: 80px">问答标题</div>
@@ -624,7 +624,7 @@
                         flex-wrap: wrap;
                         flex-wrap: wrap;
                       "
                       "
                     >
                     >
-                      <div style="font-size: 16px">选择填空工具</div>
+                      <div style="font-size: 16px">选择匹配工具</div>
                     </div>
                     </div>
                     <div class="select_box2_box">
                     <div class="select_box2_box">
                       <div class="select_box2_img">
                       <div class="select_box2_img">
@@ -737,7 +737,7 @@
                           flex-wrap: wrap;
                           flex-wrap: wrap;
                         "
                         "
                       >
                       >
-                        <div style="font-size: 16px">连词成句工具</div>
+                        <div style="font-size: 16px">排序工具</div>
                       </div>
                       </div>
                       <div
                       <div
                         v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo"
                         v-for="(st, stIndex) in worksDetail[sIndex].lccjInfo"
@@ -1527,8 +1527,8 @@ export default {
           var pptInfo = res.data[5];
           var pptInfo = res.data[5];
           var chooseInfo = res.data[6];
           var chooseInfo = res.data[6];
           var pjInfo = res.data[7]; //个人评价作业
           var pjInfo = res.data[7]; //个人评价作业
-          var xztkInfo = res.data[8]; //选择填空作业
-          var lccjInfo = res.data[9]; //连词成句作业
+          var xztkInfo = res.data[8]; //选择匹配作业
+          var lccjInfo = res.data[9]; //排序作业
           var bgInfo = res.data[10]; //表格作业
           var bgInfo = res.data[10]; //表格作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var cocopiInfo = res.data[11]; //cocopi或源码编辑作业
           var wordInfo = res.data[12]; //文档作业
           var wordInfo = res.data[12]; //文档作业

+ 6 - 4
src/components/pages/scourse.vue

@@ -382,8 +382,10 @@ export default {
       this.getCourse();
       this.getCourse();
     },
     },
     clear() {
     clear() {
-      for (var i = 0; i < this.CourseType[0].length; i++) {
-        this.courseTypeId[this.CourseType[0][i].id] = "";
+      if(this.CourseType.length){
+        for (var i = 0; i < this.CourseType[0].length; i++) {
+          this.courseTypeId[this.CourseType[0][i].id] = "";
+        }
       }
       }
       this.getCourse();
       this.getCourse();
     },
     },
@@ -680,7 +682,7 @@ export default {
           if (this.role == "1") {
           if (this.role == "1") {
             this.groupA = "4";
             this.groupA = "4";
           } else {
           } else {
-            this.groupA = "0";
+            this.groupA = "3";
           }
           }
           this.$message.success("复制成功")
           this.$message.success("复制成功")
           this.clear()
           this.clear()
@@ -1112,7 +1114,7 @@ export default {
 
 
 .xtCourse {
 .xtCourse {
   position: absolute;
   position: absolute;
-  background: #41a5f0;
+  background: #466b99;
   width: 70px;
   width: 70px;
   height: 30px;
   height: 30px;
   border-radius: 30px;
   border-radius: 30px;

File diff suppressed because it is too large
+ 182 - 470
src/components/pages/student/addCourse.vue


+ 1 - 1
src/components/pages/student/checkCourse.vue

@@ -966,7 +966,7 @@ export default {
 
 
 .xtCourse {
 .xtCourse {
   position: absolute;
   position: absolute;
-  background: #41a5f0;
+  background: #466b99;
   width: 70px;
   width: 70px;
   height: 30px;
   height: 30px;
   border-radius: 30px;
   border-radius: 30px;

+ 5 - 3
src/components/pages/student/course.vue

@@ -393,8 +393,10 @@ export default {
       this.getCourse();
       this.getCourse();
     },
     },
     clear() {
     clear() {
-      for (var i = 0; i < this.CourseType[0].length; i++) {
-        this.courseTypeId[this.CourseType[0][i].id] = "";
+      if(this.CourseType.length){
+        for (var i = 0; i < this.CourseType[0].length; i++) {
+          this.courseTypeId[this.CourseType[0][i].id] = "";
+        }
       }
       }
       this.getCourse();
       this.getCourse();
     },
     },
@@ -1113,7 +1115,7 @@ export default {
 
 
 .xtCourse {
 .xtCourse {
   position: absolute;
   position: absolute;
-  background: #41a5f0;
+  background: #466b99;
   width: 70px;
   width: 70px;
   height: 30px;
   height: 30px;
   border-radius: 30px;
   border-radius: 30px;

+ 105 - 8
src/components/pages/studio/addCourse.vue

@@ -1241,7 +1241,7 @@
                             <span v-if="itemTool.tool == 1"> 电子白板 </span>
                             <span v-if="itemTool.tool == 1"> 电子白板 </span>
                             <span v-if="itemTool.tool == 3"> 思维导图 </span>
                             <span v-if="itemTool.tool == 3"> 思维导图 </span>
                             <span v-if="itemTool.tool == 6"> 协同文档 </span>
                             <span v-if="itemTool.tool == 6"> 协同文档 </span>
-                            <span v-if="itemTool.tool == 15"> 问答工具 </span>
+                            <span v-if="itemTool.tool == 15"> 问答 </span>
                             <span v-if="itemTool.tool == 48"> 表格 </span>
                             <span v-if="itemTool.tool == 48"> 表格 </span>
                             <span v-if="itemTool.tool == 51"> 资源库 </span>
                             <span v-if="itemTool.tool == 51"> 资源库 </span>
                             <span v-if="itemTool.tool == 52"> 文档 </span>
                             <span v-if="itemTool.tool == 52"> 文档 </span>
@@ -1318,7 +1318,7 @@
                                 src="../../../assets/icon/thirdToolList/answer.png"
                                 src="../../../assets/icon/thirdToolList/answer.png"
                                 alt
                                 alt
                               />
                               />
-                              <div style="margin: 5px 0">问答工具</div>
+                              <div style="margin: 5px 0">问答</div>
                             </div>
                             </div>
                           </div>
                           </div>
                           <div
                           <div
@@ -2716,7 +2716,7 @@
       </span>
       </span>
     </el-dialog>
     </el-dialog>
     <el-dialog
     <el-dialog
-      title="选择填空"
+      title="选择匹配"
       :visible.sync="dialogVisibleSelect"
       :visible.sync="dialogVisibleSelect"
       :append-to-body="true"
       :append-to-body="true"
       width="800px"
       width="800px"
@@ -2899,7 +2899,7 @@
       </span>
       </span>
     </el-dialog>
     </el-dialog>
     <el-dialog
     <el-dialog
-      title="连词成句设置"
+      title="排序设置"
       :visible.sync="dialogVisibleSentence"
       :visible.sync="dialogVisibleSentence"
       :append-to-body="true"
       :append-to-body="true"
       width="1000px"
       width="1000px"
@@ -3184,7 +3184,7 @@
                 <!-- <div class="tool">
                 <!-- <div class="tool">
                                     <div class="whiteBIcon" @click="addToolFun(15)">
                                     <div class="whiteBIcon" @click="addToolFun(15)">
                                         <img src="../../../assets/icon/thirdToolList/answer.png" alt />
                                         <img src="../../../assets/icon/thirdToolList/answer.png" alt />
-                                        <div style="margin: 5px 0">问答工具</div>
+                                        <div style="margin: 5px 0">问答</div>
                                     </div>
                                     </div>
                                 </div> -->
                                 </div> -->
                 <div class="tool">
                 <div class="tool">
@@ -5852,7 +5852,97 @@ export default {
                   );
                   );
                 }
                 }
               } else if (type == 3) {
               } else if (type == 3) {
-                _this.addCourseWorksS(tool, 13, data.Location, task, toolindex);
+                let _type = 13
+                var imgA = [
+                  "png",
+                  "jpg",
+                  "jpeg",
+                  "bmp",
+                  "gif",
+                  "webp",
+                  "psd",
+                  "svg",
+                  "tiff",
+                ];
+                var fileA = [
+                  "PDF",
+                  "DOC",
+                  "DOCX",
+                  "DOCM",
+                  "DOTM",
+                  "DOTX",
+                  "PPTX",
+                  "PPSX",
+                  "PPT",
+                  "PPS",
+                  "PPTM",
+                  "POTM",
+                  "PPAM",
+                  "POTX",
+                  "PPSM",
+                  "XLSX",
+                  "XLS",
+                ];
+                var videoA = [
+                  "AVI",
+                  "NAVI",
+                  "MPEG",
+                  "ASF",
+                  "MOV",
+                  "WMV",
+                  "3GP",
+                  "RM",
+                  "RMVB",
+                  "FLV",
+                  "F4V",
+                  "H.264",
+                  "H.265",
+                  "REAL VIDEO",
+                  "MKV",
+                  "WebM",
+                  "HDDVD",
+                  "MP4",
+                  "MPG",
+                  "M4V",
+                  "MGV",
+                  "OGV",
+                  "QTM",
+                  "STR",
+                  "AMC",
+                  "DVX",
+                  "EVO",
+                  "DAT",
+                  "OGG",
+                  "OGM",
+                ];
+                if (
+                  fileA.indexOf(
+                    data.Location.split(".")[
+                      data.Location.split(".").length - 1
+                    ].toLocaleUpperCase()
+                  ) != -1
+                ) {
+                  _type = 4;
+                } else if (
+                  videoA.indexOf(
+                    data.Location.split(".")[
+                      data.Location.split(".").length - 1
+                    ].toLocaleUpperCase()
+                  ) != -1
+                ) {
+                  _type = 5;
+                } else if (
+                  imgA.indexOf(
+                    data.Location.split(".")[
+                      data.Location.split(".").length - 1
+                    ].toLocaleLowerCase()
+                  ) != -1
+                ) {
+                  _type = 1;
+                } else {
+                  _type = 13;
+                }
+                _this.addCourseWorksS(tool, _type, data.Location, task, toolindex);
               }
               }
               console.log(data.Location);
               console.log(data.Location);
               // _this.$message.success('上传成功'+data.Location)
               // _this.$message.success('上传成功'+data.Location)
@@ -6557,6 +6647,7 @@ export default {
       var a = this.sourcesData[ic - 1];
       var a = this.sourcesData[ic - 1];
       this.sourcesData[ic - 1] = this.sourcesData[ic];
       this.sourcesData[ic - 1] = this.sourcesData[ic];
       this.sourcesData[ic] = a;
       this.sourcesData[ic] = a;
+      this.$forceUpdate();
     },
     },
     downCd2(e, ic) {
     downCd2(e, ic) {
       e.stopPropagation();
       e.stopPropagation();
@@ -6566,6 +6657,7 @@ export default {
       var a = this.sourcesData[ic + 1];
       var a = this.sourcesData[ic + 1];
       this.sourcesData[ic + 1] = this.sourcesData[ic];
       this.sourcesData[ic + 1] = this.sourcesData[ic];
       this.sourcesData[ic] = a;
       this.sourcesData[ic] = a;
+      this.$forceUpdate();
     },
     },
     addWork() {
     addWork() {
       let cPan = 1;
       let cPan = 1;
@@ -9389,10 +9481,10 @@ export default {
 .wordTeacher {
 .wordTeacher {
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
-  width: 20%;
+  width: 145px;
   text-align: center;
   text-align: center;
   font-size: 14px;
   font-size: 14px;
-  margin: 30px 30px 0 10px;
+  margin: 30px 0 0 10px;
   background: #fff;
   background: #fff;
   position: relative;
   position: relative;
   border-radius: 5px;
   border-radius: 5px;
@@ -10217,6 +10309,11 @@ ol {
   text-overflow: ellipsis;
   text-overflow: ellipsis;
 }
 }
 
 
+.upCss>>>.el-upload-list__item .el-icon-close {
+  font-size: 20px;
+    z-index: 9999;
+}
+
 .addStageImg {
 .addStageImg {
   min-width: 25px;
   min-width: 25px;
   min-height: 25px;
   min-height: 25px;

+ 10 - 4
src/components/pages/studio/course.vue

@@ -381,8 +381,10 @@ export default {
       this.getCourse();
       this.getCourse();
     },
     },
     clear() {
     clear() {
-      for (var i = 0; i < this.CourseType[0].length; i++) {
-        this.courseTypeId[this.CourseType[0][i].id] = "";
+      if(this.CourseType.length){
+        for (var i = 0; i < this.CourseType[0].length; i++) {
+          this.courseTypeId[this.CourseType[0][i].id] = "";
+        }
       }
       }
       this.getCourse();
       this.getCourse();
     },
     },
@@ -659,7 +661,11 @@ export default {
         .post(this.$store.state.api + "copyCourse", params)
         .post(this.$store.state.api + "copyCourse", params)
         .then((res) => {
         .then((res) => {
           this.page = 1
           this.page = 1
-          this.groupA = '0'
+          if (this.role == "1") {
+            this.groupA = "4";
+          } else {
+            this.groupA = "3";
+          }
           this.clear()
           this.clear()
         })
         })
         .catch((err) => {
         .catch((err) => {
@@ -1089,7 +1095,7 @@ export default {
 
 
 .xtCourse {
 .xtCourse {
   position: absolute;
   position: absolute;
-  background: #41a5f0;
+  background: #466b99;
   width: 70px;
   width: 70px;
   height: 30px;
   height: 30px;
   border-radius: 30px;
   border-radius: 30px;

File diff suppressed because it is too large
+ 315 - 131
src/components/pages/task/addCourse.vue


+ 18 - 5
src/components/pages/teacherSource/dialog.vue

@@ -123,6 +123,10 @@ export default {
         sourceData: {
         sourceData: {
             type: Object,
             type: Object,
         },
         },
+        updateSourcePan:{
+            type: Boolean,
+            default: false
+        }
     },
     },
     data() {
     data() {
         return {
         return {
@@ -164,7 +168,7 @@ export default {
                 }else{
                 }else{
                     if(this.typea == 'b107f98f-1dc4-4ede-80b4-178ba22b6a59'){
                     if(this.typea == 'b107f98f-1dc4-4ede-80b4-178ba22b6a59'){
                         return this.CourseTypeJson[tid].filter(e => {
                         return this.CourseTypeJson[tid].filter(e => {
-                            return ['fd7fc4a9-e934-47d5-9edf-f478a59010f0','5143a350-b20f-4a07-9d19-5ad305fefaac','3777ef66-96ff-4f08-8e6d-a7b6acc6c789'].indexOf(e.id) != -1 
+                            return ['fd7fc4a9-e934-47d5-9edf-f478a59010f0','5143a350-b20f-4a07-9d19-5ad305fefaac'].indexOf(e.id) != -1 
                         })
                         })
                     }else if(this.typea == '3b12e8d9-866f-46bb-aa22-76cb3b7788b3'){
                     }else if(this.typea == '3b12e8d9-866f-46bb-aa22-76cb3b7788b3'){
                         return this.CourseTypeJson[tid].filter(e => {
                         return this.CourseTypeJson[tid].filter(e => {
@@ -180,7 +184,7 @@ export default {
                         })
                         })
                     }else if(this.typea == '8b21473c-eac2-4a40-8fb5-ac38985e8952'){
                     }else if(this.typea == '8b21473c-eac2-4a40-8fb5-ac38985e8952'){
                         return this.CourseTypeJson[tid].filter(e => {
                         return this.CourseTypeJson[tid].filter(e => {
-                            return  ['e3365b81-49bb-4de9-a1c2-060e9dc593f3','5670c02b-7cbc-4788-8241-cf6e53dd61fd','25b66132-a125-4c51-8bbe-2653f8be4f0a','da94e547-ba90-4fd5-b95e-d13efca1e248','ba1db98a-0613-4568-92d2-59d53b600675'].indexOf(e.id) != -1 
+                            return  ['e3365b81-49bb-4de9-a1c2-060e9dc593f3','5670c02b-7cbc-4788-8241-cf6e53dd61fd','25b66132-a125-4c51-8bbe-2653f8be4f0a','da94e547-ba90-4fd5-b95e-d13efca1e248','ba1db98a-0613-4568-92d2-59d53b600675','3777ef66-96ff-4f08-8e6d-a7b6acc6c789'].indexOf(e.id) != -1 
                         })
                         })
                     }else if(this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') != -1){
                     }else if(this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') != -1){
                         return this.CourseTypeJson[tid]
                         return this.CourseTypeJson[tid]
@@ -194,10 +198,19 @@ export default {
     methods: {
     methods: {
         checka(item){
         checka(item){
             let _sourceData = this.sourceData
             let _sourceData = this.sourceData
-            if(_sourceData[item.id]){
-                delete _sourceData[item.id]
+            if(this.updateSourcePan){
+                if(_sourceData[item.id]){
+                    delete _sourceData[item.id]
+                }else{
+                    _sourceData = {}
+                    _sourceData[item.id] = item
+                }
             }else{
             }else{
-                _sourceData[item.id] = item
+                if(_sourceData[item.id]){
+                    delete _sourceData[item.id]
+                }else{
+                    _sourceData[item.id] = item
+                }
             }
             }
             this.$forceUpdate()
             this.$forceUpdate()
             this.$emit("update:sourceData",_sourceData)
             this.$emit("update:sourceData",_sourceData)

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

@@ -166,7 +166,7 @@ export default {
                 }else{
                 }else{
                     if(this.typea == 'b107f98f-1dc4-4ede-80b4-178ba22b6a59'){
                     if(this.typea == 'b107f98f-1dc4-4ede-80b4-178ba22b6a59'){
                         return this.CourseTypeJson[tid].filter(e => {
                         return this.CourseTypeJson[tid].filter(e => {
-                            return ['fd7fc4a9-e934-47d5-9edf-f478a59010f0','5143a350-b20f-4a07-9d19-5ad305fefaac','3777ef66-96ff-4f08-8e6d-a7b6acc6c789'].indexOf(e.id) != -1 
+                            return ['fd7fc4a9-e934-47d5-9edf-f478a59010f0','5143a350-b20f-4a07-9d19-5ad305fefaac'].indexOf(e.id) != -1 
                         })
                         })
                     }else if(this.typea == '3b12e8d9-866f-46bb-aa22-76cb3b7788b3'){
                     }else if(this.typea == '3b12e8d9-866f-46bb-aa22-76cb3b7788b3'){
                         return this.CourseTypeJson[tid].filter(e => {
                         return this.CourseTypeJson[tid].filter(e => {
@@ -182,7 +182,7 @@ export default {
                         })
                         })
                     }else if(this.typea == '8b21473c-eac2-4a40-8fb5-ac38985e8952'){
                     }else if(this.typea == '8b21473c-eac2-4a40-8fb5-ac38985e8952'){
                         return this.CourseTypeJson[tid].filter(e => {
                         return this.CourseTypeJson[tid].filter(e => {
-                            return  ['e3365b81-49bb-4de9-a1c2-060e9dc593f3','5670c02b-7cbc-4788-8241-cf6e53dd61fd','25b66132-a125-4c51-8bbe-2653f8be4f0a','da94e547-ba90-4fd5-b95e-d13efca1e248','ba1db98a-0613-4568-92d2-59d53b600675'].indexOf(e.id) != -1 
+                            return  ['e3365b81-49bb-4de9-a1c2-060e9dc593f3','5670c02b-7cbc-4788-8241-cf6e53dd61fd','25b66132-a125-4c51-8bbe-2653f8be4f0a','da94e547-ba90-4fd5-b95e-d13efca1e248','ba1db98a-0613-4568-92d2-59d53b600675','3777ef66-96ff-4f08-8e6d-a7b6acc6c789'].indexOf(e.id) != -1 
                         })
                         })
                     }else if(this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') != -1){
                     }else if(this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') != -1){
                         return this.CourseTypeJson[tid]
                         return this.CourseTypeJson[tid]

+ 1 - 1
src/components/pages/tencent/student.vue

@@ -33,7 +33,7 @@
         </div>
         </div>
         <div class="head_right">
         <div class="head_right">
           <el-button @click="addStudent">添加学生</el-button>
           <el-button @click="addStudent">添加学生</el-button>
-          <el-upload v-show="false" class="upload-demo newCss" :http-request="handleChange" :on-remove="handleRemove" action="#"
+          <el-upload v-show="false"  class="upload-demo newCss" :http-request="handleChange" :on-remove="handleRemove" action="#"
             :file-list="fileListUpload" accept=".xlsx">
             :file-list="fileListUpload" accept=".xlsx">
             <el-button size="primary" type="primary">批量添加</el-button>
             <el-button size="primary" type="primary">批量添加</el-button>
             <div slot="tip" class="el-upload__tip" style="margin-left:10px;">只能上传xlsx文件,且不超过500kb</div>
             <div slot="tip" class="el-upload__tip" style="margin-left:10px;">只能上传xlsx文件,且不超过500kb</div>

+ 0 - 0
src/components/tools/hevue-img-preview/LICENSE


+ 133 - 0
src/components/tools/hevue-img-preview/README.md

@@ -0,0 +1,133 @@
+## hevue-img-preview 简介
+
+
+[![](https://img.shields.io/npm/dm/hevue-img-preview.svg)](https://www.npmjs.com/package/hevue-img-preview)
+[![](https://img.shields.io/github/v/release/heyongsheng/hevue-img-preview)](https://www.npmjs.com/package/hevue-img-preview)
+[![](https://img.shields.io/badge/License-MIT-green)](https://www.npmjs.com/package/hevue-img-preview)
+
+> 本组件是一个基于 vue 编写的 vue 图片预览组件,支持 pc 和手机端,支持单图和多图预览,仅传入一个图片地址,即可实现图片预览效果。手机端支持单指拖拽和双指缩放。如果能帮上你,希望可以移步 [GitHub](https://github.com/heyongsheng/hevue-img-preview) ,或者[码云](https://gitee.com/ihope_top/hevue-img-preview) 给个小星星,如果有任何使用意见或建议,也欢迎回复或者提交 issue
+
+## 官方文档
+
+> 官方使用文档请访问 [https://heyongsheng.github.io/#/](https://heyongsheng.github.io/#/)
+
+## 安装
+
+使用npm进行安装
+``` bash
+npm install hevue-img-preview
+```
+
+在main.js进行全局引入
+```javascript
+import hevueImgPreview from 'hevue-img-preview'
+Vue.use(hevueImgPreview)
+```
+
+在组件中进行使用
+```html
+<img :src="url" @click="previewImg(url)">
+```
+```javascript
+methods: {
+	previewImg (url) {
+		this.$hevueImgPreview(url)
+	}
+}
+```
+
+## 使用
+
+> this.\$hevueImgPreview() 方法可以接收一个字符串类型的 url,或者对象类型的配置,具体使用方法如下
+
+- 接收一个地址字符串`this.$hevueImgPreview(url)`
+
+```Javascript
+this.$hevueImgPreview('https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg') // 线上地址
+this.$hevueImgPreview('./img/logo.jpeg') // 本地地址
+```
+
+- 接收一个对象`this.$hevueImgPreview(options)`
+
+```Javascript
+# 单图预览
+this.$hevueImgPreview({
+    url: 'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
+})
+
+# 多图预览
+this.$hevueImgPreview({
+    multiple: true, // 开启多图预览模式
+    nowImgIndex: 1, // 多图预览,默认展示第二张图片
+    imgList: ['1.png', '2.png', '3.png'], // 需要预览的多图数组
+})
+```
+
+### 配置项
+
+| 字段              | 类型    | 默认值               | 备注                           |
+| ----------------- | ------- | -------------------- | ------------------------------ |
+| url               | String  | 无                   | 预览的图片地址,多图预览时省略 |
+| multiple          | Boolean | false                | 是否多图预览                   |
+| nowImgIndex       | Number  | 0                    | 多图预览时默认显示的图片下标   |
+| imgList           | Array   | 无                   | 多图预览时传入的图片数组       |
+| keyboard          | Boolean | false                | 是否开启键盘控制               |
+| clickMaskCLose    | Boolean | false                | 是否可以点击遮罩层关闭         |
+| controlBar        | Boolean | true                 | 是否显示控制条及页码         |
+| closeBtn          | Boolean | true                 | 是否显示关闭按钮         |
+| arrowBtn          | Boolean | true                | 是否显示左右翻页按钮         |
+
+#### 全局配置
+
+对于某些配置,例如开启键盘事件,点击遮罩层关闭,我们可能要全局保持统一,但却需要在每一次调用时重复配置,为了解决这个问题,我们提供了全局配置项,您可以在引入插件的时候,将全局配置项作为第二个参数传入即可,以免再每次调用的时候重复配置。
+
+```javascript
+// main.js
+import hevueImgPreview from 'hevueImgPreview'
+Vue.use(hevueImgPreview, {
+  keyboard: true,
+  clickMaskCLose: true
+  ...
+})
+```
+
+
+如开启键盘控制事件后,相对应功能控制按键如下
+
+| 按键 | 功能
+| ----------------- | ----------------------------------------
+| w | 放大
+| s | 缩小
+| a | 上一张
+| d | 下一张
+| q | 逆时针旋转
+| e | 顺时针旋转
+| r | 图片复位
+| esc | 关闭图片预览
+
+*如不考虑兼容性问题,上述的背景颜色均可接收渐变色*
+
+## 更新日志
+
+### 5.0.2
+
+组件支持实例化,调用组件将返回组件实例,支持直接通过实例关闭弹窗
+```javascript
+const hevueImgPreviewEl = this.$hevueImgPreview(...)
+hevueImgPreviewEl.close()
+```
+
+## 作者注
+
+> 本人前端小白一枚,工作经验较少,所写东西尽量保证没 bug,但性能界面什么的可能没办法做到最优,如果您有什么使用中的建议或意见,欢迎反馈给我,可以加联系方式,也可以直接回复,或者到`GitHub`提个`issue`[建议此方法],如果对您有所帮助,万分期待您能给个赞并且到`GitHub`给个小星星
+
+> GitHub 链接:[https://github.com/heyongsheng/hevue-img-preview](https://github.com/heyongsheng/hevue-img-preview)
+
+> 码云链接:[https://gitee.com/ihope_top/hevue-img-preview](https://gitee.com/ihope_top/hevue-img-preview)
+
+作者 QQ:1378431028
+
+QQ 群:595472617
+
+作者微信:heyongsheng1996
+![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/57478efc7ace4a8c9e27081a26f2c8cf~tplv-k3u1fbpfcp-zoom-1.image)

+ 131 - 0
src/components/tools/hevue-img-preview/css/default.css

@@ -0,0 +1,131 @@
+.hevue-imgpreview-wrap {
+  position: fixed;
+  top: 0;
+  bottom: 0;
+  right: 0;
+  left: 0;
+  user-select: none;
+  -moz-user-select: none;
+  -webkit-user-select: none;
+  -ms-user-select: none;
+  z-index: 9999;
+  color: rgba(255,255,255,.6);
+}
+.hevue-imgpreview-wrap .he-img-wrap {
+  width: 100%;
+  height: 100%;
+  text-align: center;
+  vertical-align: middle;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  background: rgba(0, 0, 0, .3);
+}
+.hevue-imgpreview-wrap .he-img-view {
+  /* transition: transform 0.3s; */
+}
+.hevue-imgpreview-wrap .arrow {
+  width: 42px;
+  height: 42px;
+  text-align: center;
+  line-height: 42px;
+  position: absolute;
+  top: 50%;
+  border-radius: 50%;
+  transform: translateY(-50%);
+  -ms-transform: translateY(-50%);
+  font-size: 24px;
+  cursor: pointer;
+  transition: all 0.2s;
+  background: rgba(0,0,0,.3);
+}
+.hevue-imgpreview-wrap .arrow:hover {
+  opacity: 0.8;
+  transform: translateY(-50%) scale(1.2);
+}
+.hevue-imgpreview-wrap .arrow-left {
+  left: 50px;
+}
+.hevue-imgpreview-wrap .arrow-right {
+  right: 50px;
+}
+/* 关闭按钮 */
+.hevue-imgpreview-wrap .he-close-icon {
+  position: absolute;
+  right: 50px;
+  top: 50px;
+  width: 36px;
+  height: 36px;
+  font-size: 22px;
+  line-height: 36px;
+  text-align: center;
+  border-radius: 50%;
+  cursor: pointer;
+  transition: all 0.2s;
+  background: rgba(0,0,0,.3);
+}
+.hevue-imgpreview-wrap .he-close-icon:hover {
+  transform: rotate(90deg);
+}
+.hevue-imgpreview-wrap .he-control-bar-wrap {
+  display: flex;
+  position: absolute;
+  width: 100%;
+  bottom: 10%;
+  left: 0;
+}
+.hevue-imgpreview-wrap .he-control-bar {
+  height: 44px;
+  bottom: 10%;
+  padding: 0 22px;
+  display: flex;
+  border-radius: 22px;
+  margin: 0 auto;
+  background: rgba(0,0,0,.3);
+}
+.hevue-imgpreview-wrap .he-control-num {
+  position: absolute;
+  bottom: 5%;
+  left: 50%;
+  transform: translateX(-50%);
+  -ms-transform: translateX(-50%);
+  padding: 0 22px;
+  font-size: 16px;
+  border-radius: 15px;
+  background: rgba(0,0,0,.3);
+}
+.hevue-imgpreview-wrap .he-control-btn {
+  line-height: 44px;
+  font-size: 24px;
+  cursor: pointer;
+  padding: 0 9px;
+  /* display: inline-block; */
+  transition: all 0.2s;
+}
+.hevue-imgpreview-wrap .he-control-btn:hover {
+  transform: scale(1.2);
+}
+
+.hevue-imgpreview-wrap .fade-enter-active,
+.hevue-imgpreview-wrap .fade-leave-active {
+  transition: opacity 0.3s;
+}
+.hevue-imgpreview-wrap .fade-enter, .hevue-imgpreview-wrap .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
+  opacity: 0;
+}
+.hevue-imgpreview-wrap .hevue-img-status-icon {
+  font-size: 56px;
+}
+
+.hevue-imgpreview-wrap .rotate-animation {
+  animation: rotate 1.5s linear infinite;
+}
+@keyframes rotate {
+  from {
+    transform: rotate(0deg);
+  }
+  to {
+    transform: rotate(360deg);
+  }
+}

+ 34 - 0
src/components/tools/hevue-img-preview/css/theme-dark.css

@@ -0,0 +1,34 @@
+
+.hevue-imgpreview-wrap {
+  color: rgba(255,255,255,.6);
+}
+
+/* 遮罩层 */
+.hevue-imgpreview-wrap .he-img-wrap {
+  background: rgba(0, 0, 0, .8);
+  backdrop-filter: blur(8px);
+}
+
+/* 控制条 */
+.hevue-imgpreview-wrap .he-control-bar {
+  background: rgba(0,0,0,.3);
+  backdrop-filter: blur(5px);
+}
+
+/* 左右箭头 */
+.hevue-imgpreview-wrap .arrow {
+  background: rgba(0,0,0,.3);
+  backdrop-filter: blur(5px);
+}
+
+/* 关闭按钮 */
+.he-close-icon {
+  background: rgba(0,0,0,.3);
+  backdrop-filter: blur(5px);
+}
+
+/* 页码指示器 */
+.he-control-num {
+  background: rgba(0,0,0,.3);
+  backdrop-filter: blur(5px);
+}

+ 41 - 0
src/components/tools/hevue-img-preview/css/theme-light.css

@@ -0,0 +1,41 @@
+.hevue-imgpreview-wrap {
+  color: rgba(52, 52, 52, 0.6);
+}
+
+/* 遮罩层 */
+.hevue-imgpreview-wrap .he-img-wrap {
+  background: rgba(70, 70, 70, 0.3);
+  backdrop-filter: blur(8px);
+}
+
+/* 控制条 */
+.hevue-imgpreview-wrap .he-control-bar {
+  background: rgba(255, 255, 255, .8);
+  backdrop-filter: blur(5px);
+  /* box-shadow: 0 0 5px 1px rgb(0 0 0 / 10%); */
+  /* border: 1px solid rgba(160, 160, 160, .15); */
+}
+
+/* 左右箭头 */
+.hevue-imgpreview-wrap .arrow {
+  background: rgba(255, 255, 255, .8);
+  backdrop-filter: blur(5px);
+  /* box-shadow: 0 0 5px 1px rgb(0 0 0 / 10%); */
+  /* border: 1px solid rgba(160, 160, 160, .15); */
+}
+
+/* 关闭按钮 */
+.hevue-imgpreview-wrap .he-close-icon {
+  background: rgba(255, 255, 255, .8);
+  backdrop-filter: blur(5px);
+  /* box-shadow: 0 0 5px 1px rgb(0 0 0 / 10%); */
+  /* border: 1px solid rgba(160, 160, 160, .15); */
+}
+
+/* 页码指示器 */
+.hevue-imgpreview-wrap .he-control-num {
+  background: rgba(255, 255, 255, .8);
+  backdrop-filter: blur(5px);
+  /* box-shadow: 0 0 5px 1px rgb(0 0 0 / 10%); */
+  /* border: 1px solid rgba(160, 160, 160, .15); */
+}

+ 536 - 0
src/components/tools/hevue-img-preview/hevue-img-preview.vue

@@ -0,0 +1,536 @@
+<!--
+ * @Author: 贺永胜
+ * @Date: 2021-04-19 16:39:30
+ * @email: 1378431028@qq.com
+ * @LastEditors: 贺永胜
+ * @LastEditTime: 2021-10-28 11:15:41
+ * @Description: file content
+-->
+
+<!--
+ *                                                     __----~~~~~~~~~~~------___
+ *                                    .  .   ~~//====......          __--~ ~~
+ *                    -.            \_|//     |||\\  ~~~~~~::::... /~
+ *                 ___-==_       _-~o~  \/    |||  \\            _/~~-
+ *         __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+ *     _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+ *   .~       .~       |   \\ -_    /  /-   /   ||      \   /
+ *  /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+ *  |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+ *           '         ~-|      /|    |-~\~~       __--~~
+ *                       |-~~-_/ |    |   ~\_   _-~            /\
+ *                            /  \     \__   \/~                \__
+ *                        _--~ _/ | .-~~____--~-/                  ~~==.
+ *                       ((->/~   '.|||' -_|    ~~-/ ,              . _||
+ *                                  -_     ~\      ~~---l__i__i__i--~~_/
+ *                                  _-~-__   ~)  \--______________--~~
+ *                                //.-~~~-~_--~- |-------~~~~~~~~
+ *                                       //.-~~~--\
+ *                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ * 
+ *                               神兽保佑            永无BUG
+ -->
+
+<template>
+  <transition name="fade">
+    <div
+      class="hevue-imgpreview-wrap"
+      id="hevue-imgpreview-wrap"
+      v-if="show"
+      ref="heImg"
+      @mouseup="removeMove('pc')"
+      @touchend="removeMove('mobile')"
+      @click.stop="clickMask"
+    >
+      <div class="he-img-wrap">
+        <div
+          class="heimgfont hevue-img-status-icon rotate-animation"
+          v-show="imgState === 1"
+        >
+          &#xe6b1;
+        </div>
+        <!-- <div class="heimgfont loading">&#xe6b1;</div> -->
+        <img
+          :src="imgurl"
+          ref="heImView"
+          @click.stop=""
+          v-show="imgState === 2"
+          class="he-img-view"
+          :style="
+            'transform: scale(' +
+              imgScale +
+              ') rotate(' +
+              imgRotate +
+              'deg);margin-top:' +
+              imgTop +
+              'px;margin-left:' +
+              imgLeft +
+              'px;' +
+              maxWH
+          "
+          @mousedown="addMove"
+          @touchstart="addMoveMobile"
+        />
+        <!-- 图片加载失败 -->
+        <div
+          class="heimgfont hevue-img-status-icon"
+          v-show="imgState === 3"
+        >
+          &#xec0d;
+        </div>
+        <!-- 关闭按钮 -->
+        <div
+          class="heimgfont he-close-icon"
+          @click.stop="close"
+          v-if="closeBtn"
+        >
+          &#xe608;
+        </div>
+        <!-- 左箭头 -->
+        <div
+          class="arrow arrow-left heimgfont"
+          @click.stop="toogleImg(false)"
+          v-if="arrowBtn && multiple"
+        >
+          &#xe620;
+        </div>
+        <!-- 右箭头 -->
+        <div
+          class="arrow arrow-right heimgfont"
+          @click.stop="toogleImg(true)"
+          v-if="arrowBtn && multiple"
+        >
+          &#xe60d;
+        </div>
+        <!-- 控制条 -->
+        <div class="he-control-bar-wrap" v-if="controlBar">
+          <div
+            class="he-control-bar"
+            @click.stop
+          >
+            <!-- 缩小 -->
+            <el-tooltip content="缩小" popper-class="showtip" placement="top" effect="dark">
+              <div class="he-control-btn heimgfont" @click.stop="scaleFunc(-0.15)">
+                &#xe65e;
+              </div>
+            </el-tooltip>
+            <!-- 放大 -->
+            <el-tooltip content="放大" popper-class="showtip" placement="top" effect="dark">
+              <div class="he-control-btn heimgfont" @click.stop="scaleFunc(0.15)">
+                &#xe65d;
+              </div>
+            </el-tooltip>
+            <!-- 复位 -->
+            <el-tooltip content="复位" popper-class="showtip" placement="top" effect="dark">
+              <div
+                class="he-control-btn heimgfont"
+                v-show="isFull"
+                @click.stop="imgToggle"
+              >
+                &#xe698;
+              </div>
+            </el-tooltip>
+            <!-- 复位 -->
+            <el-tooltip content="复位" popper-class="showtip" placement="top" effect="dark">
+              <div
+                class="he-control-btn heimgfont"
+                v-show="!isFull"
+                @click.stop="imgToggle"
+              >
+                &#xe86b;
+              </div>
+            </el-tooltip>
+            <!-- 左转 -->
+            <el-tooltip content="左转90度" popper-class="showtip" placement="top" effect="dark">
+              <div class="he-control-btn heimgfont" @click.stop="rotateFunc(-90)">
+                &#xe670;
+              </div>
+            </el-tooltip>
+            <!-- 右转 -->
+            <el-tooltip content="右转90度" popper-class="showtip" placement="top" effect="dark">
+              <div class="he-control-btn heimgfont" @click.stop="rotateFunc(90)">
+                &#xe66f;
+              </div>
+            </el-tooltip>
+            <!-- 下载 -->
+            <!-- <div class="he-control-btn heimgfont" @click.stop="downloadIamge">
+              &#xe694;
+            </div> -->
+          </div>
+        </div>
+        <!-- 页码指示器 -->
+        <div
+          class="he-control-num"
+          v-if="controlBar && multiple"
+        >
+          {{ imgIndex + 1 }} / {{ imgList.length }}
+        </div>
+      </div>
+    </div>
+  </transition>
+</template>
+
+<script>
+export default {
+  name: 'hevue-img-preview',
+  data() {
+    return {
+      // imgWidth: 0,
+      // imgHeight: 0,
+      imgScale: 1,
+      imgTop: 0,
+      imgLeft: 0,
+      imgRotate: 0,
+      isFull: false,
+      maxWH: 'max-width:100%;max-height:100%;',
+      clientX: 0,
+      clientY: 0,
+      imgIndex: 0,
+      canRun: true,
+      imgurl: '',
+      imgState: 1,
+      start: [{}, {}],
+      mobileScale: 0, // 手指离开时图片的缩放比例
+      // 以下内容为用户传入配置
+      show: false, // 插件显示,默认为false
+      url: '', // 预览图片的地址
+      nowImgIndex: 0,
+      multiple: false,
+      imgList: [],
+      // 以下为可全局配置
+      controlBar: true,
+      closeBtn: true,
+      arrowBtn: true,
+      keyboard: false,
+      clickMaskCLose: false, // 是否点击遮罩关闭,默认false
+    }
+  },
+  mounted() {
+    this.initImg()
+  },
+  watch: {
+    url() {
+      this.initImg()
+    },
+    show: {
+      handler(newV) {
+        if (newV) {
+          this.$nextTick(() => {
+            let _dom = document.getElementById('hevue-imgpreview-wrap')
+            _dom.onmousewheel = this.scrollFunc
+            // 火狐浏览器没有onmousewheel事件,用DOMMouseScroll代替(滚轮事件)
+            document.body.addEventListener('DOMMouseScroll', this.scrollFunc)
+            // 禁止火狐浏览器下拖拽图片的默认事件
+            document.ondragstart = function() {
+              return false
+            }
+            // 判断是否多图
+            if (this.multiple) {
+              if (Array.isArray(this.imgList) && this.imgList.length > 0) {
+                this.imgIndex = Number(this.nowImgIndex) || 0
+                // this.url = this.imgList[this.imgIndex]
+                this.changeUrl(this.imgList[this.imgIndex], this.imgIndex)
+              } else {
+                // console.error("imgList 为空或格式不正确");
+              }
+            } else {
+              this.changeUrl(this.url)
+            }
+            // 判断是否开启键盘事件
+            if (this.keyboard) {
+              document.addEventListener('keydown', this.keyHandleDebounce)
+            }
+          })
+        }
+      },
+      immediate: true,
+    },
+  },
+  methods: {
+    close() {
+      // this.initImg();
+      // this.maxWH = "max-width:100%;max-height:100%;";
+      // this.isFull = false;
+      // 移除火狐浏览器下的鼠标滚动事件
+      document.body.removeEventListener('DOMMouseScroll', this.scrollFunc)
+      //恢复火狐及Safari浏览器下的图片拖拽
+      document.ondragstart = null
+      // 移除键盘事件
+      if (this.keyboard) {
+        document.removeEventListener('keydown', this.keyHandleDebounce)
+      }
+      this.show = false
+    },
+    initImg() {
+      this.mobileScale = 1
+      this.imgScale = 1
+      this.imgRotate = 0
+      this.imgTop = 0
+      this.imgLeft = 0
+    },
+    /**
+     * 切换图片
+     * true 下一张
+     * false 上一张
+     */
+    toogleImg(bool) {
+      if (bool) {
+        this.imgIndex++
+        if (this.imgIndex > this.imgList.length - 1) {
+          this.imgIndex = 0
+        }
+      } else {
+        this.imgIndex--
+        if (this.imgIndex < 0) {
+          this.imgIndex = this.imgList.length - 1
+        }
+      }
+      // this.url = this.imgList[this.imgIndex]
+      this.changeUrl(this.imgList[this.imgIndex], this.imgIndex)
+    },
+    // 改变图片地址
+    /**
+     * @description:
+     * @param {String} url 要显示的图片的url
+     * @param {Number} index 当前显示当图片下标,防止用户点击切换图片过快
+     * @return {*}
+     */
+    changeUrl(url, index) {
+      this.imgState = 1
+      let img = new Image()
+      img.src = url
+      img.onload = () => {
+        // 如果加载出来图片当下标不是当前显示图片当下标,则不予显示(用户点击过快当时候,会出现用户点到第三张了,此时第一张图片才加载完当情况)
+        if (index != undefined && index == this.imgIndex) {
+          this.imgState = 2
+          this.imgurl = url
+        } else if (index == undefined) {
+          this.imgState = 2
+          this.imgurl = url
+        }
+      }
+      img.onerror = () => {
+        if (index != undefined && index == this.imgIndex) {
+          this.imgState = 3
+        } else if (index == undefined) {
+          this.imgState = 3
+        }
+      }
+    },
+    // 旋转图片
+    rotateFunc(deg) {
+      this.imgRotate += deg
+    },
+    // 图片缩放
+    scaleFunc(num, bool) {
+      if (this.imgScale <= 0.2 && num < 0) return
+      if (bool) {
+        this.imgScale = num
+      } else {
+        this.imgScale += num
+      }
+    },
+    // 图片原尺寸切换
+    imgToggle() {
+      this.initImg()
+      if (this.isFull) {
+        this.maxWH = 'max-width:100%;max-height:100%;'
+      } else {
+        this.maxWH = ''
+      }
+      this.isFull = !this.isFull
+    },
+    // 鼠标滚轮缩放
+    scrollFunc(e) {
+      e = e || window.event
+      // e.returnValue = false // ie
+      // 火狐下没有wheelDelta,用detail代替,由于detail值的正负和wheelDelta相反,所以取反
+      e.delta = e.wheelDelta || -e.detail
+
+      e.preventDefault()
+      if (e.delta > 0) {
+        //当滑轮向上滚动时
+        this.scaleFunc(0.05)
+      }
+      if (e.delta < 0) {
+        //当滑轮向下滚动时
+        this.scaleFunc(-0.05)
+      }
+    },
+    // 鼠标按下
+    addMove(e) {
+      e = e || window.event
+      this.clientX = e.clientX
+      this.clientY = e.clientY
+      this.$refs.heImg.onmousemove = this.moveFunc
+    },
+    // 手指按下事件
+    addMoveMobile(e) {
+      e.preventDefault()
+      e = e || window.event
+      if (e.touches.length > 1) {
+        this.start = e.touches
+      } else {
+        this.clientX = e.touches[0].pageX
+        this.clientY = e.touches[0].pageY
+      }
+      // 添加手指拖动事件
+      this.$refs.heImg.ontouchmove = this.moveFuncMobile
+    },
+    // 鼠标拖动
+    moveFunc(e) {
+      e = e || window.event
+      e.preventDefault()
+      let movementX = e.clientX - this.clientX
+      let movementY = e.clientY - this.clientY
+      // event.clientY;
+      this.imgLeft += movementX * 2
+      this.imgTop += movementY * 2
+      this.clientX = e.clientX
+      this.clientY = e.clientY
+    },
+    // 手指拖动
+    moveFuncMobile(e) {
+      e = e || window.event
+      // console.log(e);
+      if (e.touches.length > 1) {
+        var now = e.touches
+        var scale =
+          this.getDistance(now[0], now[1]) /
+          this.getDistance(this.start[0], this.start[1])
+        // 判断是否手指缩放过,如果缩放过,要在上次缩放的比例基础上进行缩放
+        if (this.mobileScale) {
+          if (scale > 1) {
+            // 放大
+            this.scaleFunc(scale + this.mobileScale - 1, true)
+          } else {
+            // 缩小
+            this.scaleFunc(scale * this.mobileScale, true)
+          }
+        } else {
+          this.scaleFunc(scale, true)
+        }
+      } else {
+        let touch = e.touches[0]
+        e.preventDefault()
+        let movementX = touch.pageX - this.clientX
+        let movementY = touch.pageY - this.clientY
+        // event.clientY;
+        this.imgLeft += movementX * 2
+        this.imgTop += movementY * 2
+        this.clientX = touch.pageX
+        this.clientY = touch.pageY
+      }
+    },
+    // 移除拖动事件
+    removeMove(type) {
+      if (type === 'pc') {
+        this.$refs.heImg.onmousemove = null
+      } else {
+        this.mobileScale = this.imgScale
+        this.$refs.heImg.ontouchmove = null
+      }
+    },
+    keyHandleDebounce(e) {
+      if (this.canRun) {
+        // 如果this.canRun为true证明当前可以执行函数
+        this.keyHandle(e)
+        this.canRun = false // 执行函数后一段时间内不可再次执行
+        setTimeout(() => {
+          this.canRun = true // 等到了我们设定的时间之后,把this.canRun改为true,可以再次执行函数
+        }, 300)
+      }
+    },
+    // 键盘事件
+    keyHandle(e) {
+      e = window.event || e
+      var key = e.keyCode || e.which || e.charCode
+      switch (key) {
+        case 27: // esc
+          this.close()
+          break
+        case 65: // a键-上一张
+          if (this.multiple) {
+            this.toogleImg(false)
+          }
+          break
+        case 68: // d键-下一张
+          if (this.multiple) {
+            this.toogleImg(true)
+          }
+          break
+        case 87: // w键-放大
+          this.scaleFunc(0.15)
+          break
+        case 83: // s键-缩小
+          this.scaleFunc(-0.15)
+          break
+        case 81: // q键-逆时针旋转
+          this.rotateFunc(-90)
+          break
+        case 69: // e键-顺时针旋转
+          this.rotateFunc(90)
+          break
+        case 82: // r键-复位键
+          this.initImg()
+          break
+
+        default:
+          break
+      }
+    },
+    // 点击遮罩层
+    clickMask() {
+      // console.log("hello");
+      if (this.clickMaskCLose) {
+        this.close()
+      }
+    },
+    //缩放 勾股定理方法-求两点之间的距离
+    getDistance(p1, p2) {
+      var x = p2.pageX - p1.pageX,
+        y = p2.pageY - p1.pageY
+      return Math.sqrt(x * x + y * y)
+    },
+    /**
+     * @description:
+     * @param {String} imgsrc
+     * @param {*} name
+     * @return {*}
+     */
+    downloadIamge() {
+      //下载图片地址和图片名
+      let image = new Image()
+      // 解决跨域 Canvas 污染问题
+      image.setAttribute('crossOrigin', 'anonymous')
+      image.onload = function() {
+        let canvas = document.createElement('canvas')
+        canvas.width = image.width
+        canvas.height = image.height
+        let context = canvas.getContext('2d')
+        context.drawImage(image, 0, 0, image.width, image.height)
+        let url = canvas.toDataURL('image/png') //得到图片的base64编码数据
+        let a = document.createElement('a') // 生成一个a元素
+        let event = new MouseEvent('click') // 创建一个单击事件
+        a.download = 'photo' + +new Date() // 设置图片名称
+        a.href = url // 将生成的URL设置为a.href属性
+        a.dispatchEvent(event) // 触发a的单击事件
+      }
+      image.onerror = function(err) {
+        console.log('图片信息不正确或图片服务器禁止访问')
+        console.log(err)
+      }
+      if (this.multiple) {
+        image.src = this.imgList[this.imgIndex]
+      } else {
+        image.src = this.url
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+@import './iconfont/iconfont.css';
+@import './css/default.css';
+</style>

+ 71 - 0
src/components/tools/hevue-img-preview/iconfont/iconfont.css

@@ -0,0 +1,71 @@
+@font-face {
+  font-family: "heimgfont"; /* Project id 1776686 */
+  src: url('iconfont.woff2?t=1635390861127') format('woff2'),
+       url('iconfont.woff?t=1635390861127') format('woff'),
+       url('iconfont.ttf?t=1635390861127') format('truetype');
+}
+
+.heimgfont {
+  font-family: "heimgfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.heimg-iconguanbi1:before {
+  content: "\e608";
+}
+
+.heimg-iconiconfontzhizuobiaozhun023146:before {
+  content: "\e694";
+}
+
+.heimg-iconhelp:before {
+  content: "\e626";
+}
+
+.heimg-iconjiazaizhong:before {
+  content: "\e6b1";
+}
+
+.heimg-icontupianjiazaishibai:before {
+  content: "\ec0d";
+}
+
+.heimg-iconicon_arrow_right:before {
+  content: "\e60d";
+}
+
+.heimg-iconjiantouzuo:before {
+  content: "\e620";
+}
+
+.heimg-iconxuanzhuan:before {
+  content: "\e66f";
+}
+
+.heimg-iconxuanzhuan1:before {
+  content: "\e670";
+}
+
+.heimg-iconyuanshibili:before {
+  content: "\e86b";
+}
+
+.heimg-iconfangda:before {
+  content: "\e65d";
+}
+
+.heimg-iconsuoxiao:before {
+  content: "\e65e";
+}
+
+.heimg-iconquanping:before {
+  content: "\e698";
+}
+
+.heimg-iconguanbi:before {
+  content: "\e764";
+}
+

BIN
src/components/tools/hevue-img-preview/iconfont/iconfont.ttf


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