Forráskód Böngészése

Merge branch 'beta' into HK

lsc 1 éve
szülő
commit
4e6ece8099
100 módosított fájl, 9474 hozzáadás és 3307 törlés
  1. 4 0
      dist/index.html
  2. 0 0
      dist/static/css/app.858ab99d180883df91741dbad60fc7be.css
  3. 0 0
      dist/static/css/app.858ab99d180883df91741dbad60fc7be.css.map
  4. BIN
      dist/static/img/download.5a3bba5.png
  5. BIN
      dist/static/img/icon_course_drag_active2.c14a724.png
  6. BIN
      dist/static/img/isWord.a2e3b0c.png
  7. 0 0
      dist/static/js/app.0636562cc50d51b3d89c.js
  8. 1 0
      dist/static/js/app.0636562cc50d51b3d89c.js.map
  9. 0 0
      dist/static/js/app.870450c5d20300a69d98.js.map
  10. 0 0
      dist/static/js/manifest.f583576dfec9dfc9a295.js.map
  11. 11 4
      src/App.vue
  12. BIN
      src/assets/icon/fileIcon/deleteworks.png
  13. BIN
      src/assets/icon/fileIcon/download.png
  14. BIN
      src/assets/icon/fileIcon/isVideo.png
  15. BIN
      src/assets/icon/fileIcon/isWord.png
  16. BIN
      src/assets/icon/fileIcon/word2.png
  17. BIN
      src/assets/icon/new/icon_course_drag_active2.png
  18. 0 1
      src/common/axios.config.js
  19. 1 1
      src/components/pages/GM/examine.vue
  20. 400 140
      src/components/pages/addCourse.vue
  21. 2 2
      src/components/pages/addCourseGM.vue
  22. 2 2
      src/components/pages/addCoursejiu.vue
  23. 2 2
      src/components/pages/components/classStudentComponents/worksDetail3.vue
  24. 293 23
      src/components/pages/components/englishRight.vue
  25. 3 3
      src/components/pages/components/studentWorksDetail.vue
  26. 1 1
      src/components/pages/components/vpdf.vue
  27. 3 3
      src/components/pages/components/worksDetail2.vue
  28. 1 1
      src/components/pages/components/worksDetail2GM.vue
  29. 2 2
      src/components/pages/components/worksDetail3.vue
  30. 1 1
      src/components/pages/components/worksDetail3GM.vue
  31. 2 2
      src/components/pages/course.vue
  32. 4 4
      src/components/pages/courseGM.vue
  33. 0 5
      src/components/pages/dataBoard/course/index.vue
  34. 2 2
      src/components/pages/dataBoard/student/index.vue
  35. 165 0
      src/components/pages/dataBoardNew/course/chartList/bar2.vue
  36. 128 72
      src/components/pages/dataBoardNew/course/chartList/cateRank.vue
  37. 20 3
      src/components/pages/dataBoardNew/course/chartList/courseNum.vue
  38. 14 14
      src/components/pages/dataBoardNew/course/chartList/courseTime.vue
  39. 67 47
      src/components/pages/dataBoardNew/course/chartList/subjuect.vue
  40. 2 1
      src/components/pages/dataBoardNew/course/chartList/teaFre.vue
  41. 206 0
      src/components/pages/dataBoardNew/course/chartList/toolUse2.vue
  42. 2 2
      src/components/pages/dataBoardNew/course/chartList/workNum.vue
  43. 412 245
      src/components/pages/dataBoardNew/course/index.vue
  44. 28 2
      src/components/pages/dataBoardNew/index.vue
  45. 7 0
      src/components/pages/dataBoardNew/project/chartList/bar.vue
  46. 141 0
      src/components/pages/dataBoardNew/project/chartList/bar/cCourse.vue
  47. 141 0
      src/components/pages/dataBoardNew/project/chartList/bar/finish.vue
  48. 141 0
      src/components/pages/dataBoardNew/project/chartList/bar/teacherStudent.vue
  49. 144 0
      src/components/pages/dataBoardNew/project/chartList/bar/time.vue
  50. 147 180
      src/components/pages/dataBoardNew/project/chartList/cateRank.vue
  51. 107 62
      src/components/pages/dataBoardNew/project/chartList/courseAna.vue
  52. 126 33
      src/components/pages/dataBoardNew/project/chartList/courseNum.vue
  53. 139 0
      src/components/pages/dataBoardNew/project/chartList/subjuect.vue
  54. 54 8
      src/components/pages/dataBoardNew/project/chartList/teaFre.vue
  55. 44 14
      src/components/pages/dataBoardNew/project/chartList/toolChart.vue
  56. 127 235
      src/components/pages/dataBoardNew/project/chartList/toolUse.vue
  57. 70 36
      src/components/pages/dataBoardNew/project/chartList/workNum.vue
  58. 44 15
      src/components/pages/dataBoardNew/project/chartList/workTime.vue
  59. 538 177
      src/components/pages/dataBoardNew/project/index.vue
  60. 2 2
      src/components/pages/dataBoardNew/school/bar/index.vue
  61. 209 0
      src/components/pages/dataBoardNew/school/barToolUser/index.vue
  62. 67 47
      src/components/pages/dataBoardNew/school/cateRank/index.vue
  63. 20 3
      src/components/pages/dataBoardNew/school/courseNum/index.vue
  64. 244 67
      src/components/pages/dataBoardNew/school/index.vue
  65. 10 8
      src/components/pages/dataBoardNew/school/loginCount/index.vue
  66. 167 0
      src/components/pages/dataBoardNew/school/loginTime/index.vue
  67. 128 72
      src/components/pages/dataBoardNew/school/teacherInfo/index.vue
  68. 120 0
      src/components/pages/dataBoardNew/school/toolUserBar/index.vue
  69. 127 58
      src/components/pages/dataBoardNew/student/bar/index.vue
  70. 155 0
      src/components/pages/dataBoardNew/student/bar2/index.vue
  71. 100 0
      src/components/pages/dataBoardNew/student/cateRank/index.vue
  72. 754 79
      src/components/pages/dataBoardNew/student/index.vue
  73. 82 26
      src/components/pages/dataBoardNew/student/loginCount/index.vue
  74. 74 42
      src/components/pages/dataBoardNew/student/loginTime/index.vue
  75. 37 12
      src/components/pages/dataBoardNew/student/stuAct/index.vue
  76. 135 0
      src/components/pages/dataBoardNew/student/stuAct2/index.vue
  77. 145 303
      src/components/pages/dataBoardNew/student/studentInfo/index.vue
  78. 45 13
      src/components/pages/dataBoardNew/student/studentInfo2/index.vue
  79. 159 0
      src/components/pages/dataBoardNew/student/studentInfo3/index.vue
  80. 127 0
      src/components/pages/dataBoardNew/student/studentInfo4/index.vue
  81. 127 235
      src/components/pages/dataBoardNew/student/toolUser/index.vue
  82. 206 0
      src/components/pages/dataBoardNew/student/toolUser2/index.vue
  83. 78 9
      src/components/pages/dataBoardNew/teacher/chartList/bar.vue
  84. 37 12
      src/components/pages/dataBoardNew/teacher/chartList/teaAct.vue
  85. 135 0
      src/components/pages/dataBoardNew/teacher/chartList/teaActSecond.vue
  86. 197 179
      src/components/pages/dataBoardNew/teacher/chartList/teaData.vue
  87. 55 9
      src/components/pages/dataBoardNew/teacher/chartList/teaFre.vue
  88. 126 235
      src/components/pages/dataBoardNew/teacher/chartList/toolUse.vue
  89. 50 13
      src/components/pages/dataBoardNew/teacher/chartList/workNum.vue
  90. 65 37
      src/components/pages/dataBoardNew/teacher/chartList/workTime.vue
  91. 746 211
      src/components/pages/dataBoardNew/teacher/index.vue
  92. 8 1
      src/components/pages/dataBoardSies/Pe/index.vue
  93. 27 10
      src/components/pages/dataBoardSies/education/index.vue
  94. 9 12
      src/components/pages/dataBoardSies/library/index.vue
  95. 221 17
      src/components/pages/dataBoardSies/school/index.vue
  96. 122 81
      src/components/pages/dataBoardSies/school/studentInfo2/index.vue
  97. 1 1
      src/components/pages/dataGM.vue
  98. 314 144
      src/components/pages/easy/addCourse.vue
  99. 293 23
      src/components/pages/easy/commpont/englishRight.vue
  100. 1 1
      src/components/pages/evaluation.vue

+ 4 - 0
dist/index.html

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

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/css/app.858ab99d180883df91741dbad60fc7be.css


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/css/app.858ab99d180883df91741dbad60fc7be.css.map


BIN
dist/static/img/download.5a3bba5.png


BIN
dist/static/img/icon_course_drag_active2.c14a724.png


BIN
dist/static/img/isWord.a2e3b0c.png


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/app.0636562cc50d51b3d89c.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
dist/static/js/app.0636562cc50d51b3d89c.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/app.870450c5d20300a69d98.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/manifest.f583576dfec9dfc9a295.js.map


+ 11 - 4
src/App.vue

@@ -106,7 +106,8 @@ export default {
         "/teacherSource",
         "/grade",
         "/test",
-        "/testStudent"
+        "/testStudent",
+        "/checkToTest"
         // "/eventCenter",
         // "/addRace",
         // "/anliDetail",
@@ -484,12 +485,18 @@ html::-webkit-scrollbar-thumb {
   max-width: 150px;
 }
 
-.el-pagination.is-background .el-pager li:not(.disabled).active {
-    background-color: #0061FF !important;
-    color: #FFF;
+.el-pagination.is-background .el-pager li:not(.disabled).active{
+  background-color: #0061FF !important;
+  color: #FFF !important;
 }
 
 .el-pagination.is-background .el-pager li:not(.disabled):hover {
     color: #0061FF !important;
 }
+
+.el-pagination.is-background .el-pager li:not(.disabled).active {
+    background-color: #0061FF !important;
+    color: #FFF !important;
+}
+
 </style>

BIN
src/assets/icon/fileIcon/deleteworks.png


BIN
src/assets/icon/fileIcon/download.png


BIN
src/assets/icon/fileIcon/isVideo.png


BIN
src/assets/icon/fileIcon/isWord.png


BIN
src/assets/icon/fileIcon/word2.png


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


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

@@ -8,7 +8,6 @@ console.log(process.env)
 axios.interceptors.request.use((config) => {
     //在发送请求之前做某件事
     let token = sessionStorage.getItem('access_token') || ""  //获取token 
-    console.log(token)
     if (token != "") {
         config.headers = {
             'access-token': token,

+ 1 - 1
src/components/pages/GM/examine.vue

@@ -86,7 +86,7 @@ export default {
       this.$router.push(path);
     },
     get(cid) {
-      window.opener.postMessage({ cid: cid, screenType: "3gm" }, "*");
+      window.parent.postMessage({ cid: cid, screenType: "3gm" }, "*");
     },
     time() {
       if (!this.now) {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 400 - 140
src/components/pages/addCourse.vue


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

@@ -2655,7 +2655,7 @@ export default {
       }
     },
     openT() {
-      window.opener.postMessage({ tools: "25" }, "*");
+      window.parent.postMessage({ tools: "25" }, "*");
     },
     deleteTask(i) {
       var _this = this;
@@ -3365,7 +3365,7 @@ export default {
         });
     },
     goCourse() {
-      window.opener.postMessage({ cid: this.courseId, type: "1" }, "*");
+      window.parent.postMessage({ cid: this.courseId, type: "1" }, "*");
     },
     updateWork2() {
       let _unitIndex = this.unitIndex;

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

@@ -45,13 +45,13 @@
                 <div style="margin: 5px 10px 0 0; width: 2rem">
                   <img src="../../assets/icon/second.png" alt />
                 </div>
-                <div>选择课程模</div>
+                <div>选择课程模</div>
               </div>
               <div v-else-if="cidType === 0 && isStepDisplay" class="secondNo" @click="navSteps(2)">
                 <div>
                   <img src="../../assets/icon/secondNo.png" alt />
                 </div>
-                <div>选择课程模</div>
+                <div>选择课程模</div>
               </div>
               <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 2 }"></div>
               <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">

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

@@ -1820,7 +1820,7 @@ export default {
             ) {
               var a =
                 "https://view.officeapps.live.com/op/view.aspx?src=" +
-                pptInfo[i].content;
+                encodeURIComponent(pptInfo[i].content);
               workJson[pptInfo[i].stage + "-" + pptInfo[i].task].wpptInfo.push({
                 wpptInfo: a,
                 score: pptInfo[i].score
@@ -1967,7 +1967,7 @@ export default {
               t = 2;
               var a =
                 "https://view.officeapps.live.com/op/view.aspx?src=" +
-                cocopi.content;
+                encodeURIComponent(cocopi.content);
               workJson[
                 cocopiInfo[i].stage + "-" + cocopiInfo[i].task
               ].cocopiInfo.push({

+ 293 - 23
src/components/pages/components/englishRight.vue

@@ -1,25 +1,106 @@
 <template>
   <div class="englishBox">
     <div class="themeTitle">
-      <div>作文题目<span style="color: red;">*</span></div>
+      <div>作文题目<span style="color: red">*</span></div>
       <div>
         <el-input
           v-model="engList.engTitle"
           placeholder="请填写作文题目"
-          @change="setEngList"
         ></el-input>
       </div>
     </div>
     <div class="themeText">
-      <div>作文要求<span style="color: red;">*</span></div>
+      <div>作文要求<span style="color: red">*</span></div>
       <div>
         <editor-bar
           placeholder="请填写作文要求"
           v-model="engList.englishText"
-          @change="setEngList"
         ></editor-bar>
       </div>
     </div>
+    <div class="themeEva" style="align-items: flex-start">
+      <div>评价设置</div>
+      <div>
+        <div
+          style="
+            display: flex;
+            flex-direction: row;
+            flex-wrap: nowrap;
+            align-items: center;
+          "
+        >
+          <el-select
+            v-model="engEvaId"
+            placeholder="预设"
+            @change="setTestJson"
+          >
+            <el-option
+              v-for="(e, eIndex) in englistEva"
+              :key="eIndex"
+              :label="e.title"
+              :value="e.id"
+            >
+            </el-option>
+          </el-select>
+          <el-tooltip
+            effect="light"
+            content="点击将下列内容设置成评价模板"
+            placement="top"
+            v-if="engList.textJson.startJson.length > 0"
+          >
+            <div
+              class="addeEva"
+              @click="setEvaTitle"
+            >
+              <img src="../../../assets/icon/addEva.png" alt="" />
+            </div>
+          </el-tooltip>
+        </div>
+        <div class="addEva">
+          <el-rate
+            v-model="engList.textJson.score"
+            disabled
+            class="engRate"
+          ></el-rate>
+          <div v-if="engList.textJson.startJson.length > 0">
+            <div
+              class="firstJson"
+              v-for="(item, index) in engList.textJson.startJson"
+              :key="index"
+            >
+              <div class="delteBox">
+                <el-input v-model="item.title"></el-input>
+                <img
+                  v-if="engList.textJson.startJson.length > 0"
+                  @click="delteItem(index)"
+                  src="../../../assets/icon/deleteN.png"
+                  alt=""
+                />
+              </div>
+              <el-input v-model="item.detile"></el-input>
+            </div>
+          </div>
+
+          <div class="addeEvaItem" @click="addStartItem">
+            <img src="../../../assets/icon/addEva.png" alt="" />
+          </div>
+        </div>
+      </div>
+    </div>
+    <el-dialog
+      title="设置名称"
+      :visible.sync="engEvadialogVisible"
+      :append-to-body="true"
+      width="500px"
+      :before-close="handleClose"
+      class="dialog_diy"
+    >
+      <el-input v-model="englishTitle" placeholder="请输入名称"></el-input>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="engEvadialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="insertEnglishEva">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -29,62 +110,251 @@ export default {
   components: {
     EditorBar,
   },
-  props: ["englishList"],
+  props: ["englishList", "oid"],
   data() {
     return {
       engList: {
         engTitle: "",
         englishText: "",
+        textJson: {
+          score: 5,
+          startJson: [],
+        },
       },
+      englistEva: [],
+      engEvaId: "",
+      englishTitle: "",
+      engEvadialogVisible: false,
     };
   },
   methods: {
-    setEngList() {
-      this.$emit("setEnglish", this.engList);
+    handleClose(done) {
+      done();
+    },
+    selectEnglishEva() {
+      this.englistEva = [];
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectEnglishEva", params)
+        .then((res) => {
+          this.englistEva = res.data[0];
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    addStartItem() {
+      this.engList.textJson.startJson.push({
+        title: "",
+        detile: "",
+      });
+    },
+    delteItem(i) {
+      this.engList.textJson.startJson.splice(i, 1);
+      this.$forceUpdate();
+    },
+    setEvaTitle() {
+      this.englishTitle = "";
+      this.engEvadialogVisible = true;
+    },
+    insertEnglishEva() {
+      if (this.englishTitle == "") {
+        this.$message.error("请设置名称!");
+        return;
+      } else if (this.engList.textJson.startJson.length == 0) {
+        this.$message.error("请添加至少一条评价!");
+        return;
+      }
+      let params = [
+        {
+          t: this.englishTitle,
+          c: JSON.stringify(this.engList.textJson),
+          oid: this.oid,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "insertEnglishEva", params)
+        .then((res) => {
+          this.$message.success("添加成功!");
+          this.engEvadialogVisible = false;
+          this.selectEnglishEva();
+          this.$forceUpdate();
+        })
+        .catch((err) => {
+          this.$message.error("网络不佳");
+          console.error(err);
+        });
+    },
+    setTestJson() {
+      if (this.engEvaId != "") {
+        this.selectTextJsonById();
+      }
+    },
+    selectTextJsonById() {
+      let params = {
+        id: this.engEvaId,
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectEnglishEvaById", params)
+        .then((res) => {
+          var tJson = JSON.parse(res.data[0][0].content);
+          if (this.engList.textJson.startJson.length == 0) {
+            this.engList.textJson = tJson;
+          } else {
+            this.engList.textJson.score = tJson.score;
+            for (var i = 0; i < tJson.startJson.length; i++) {
+              this.engList.textJson.startJson.push(tJson.startJson[i]);
+            }
+          }
+          this.engEvaId = "";
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+  },
+  watch: {
+    englishList: {
+      handler(newVal) {
+        if (newVal) {
+          if (Object.keys(this.englishList).length > 0) {
+            this.engList = this.englishList;
+          } else {
+            this.engList = this.engList;
+          }
+          this.$forceUpdate();
+        }
+      },
+      deep: true,
     },
   },
   created() {
-    this.engList = this.englishList;
+    this.engList =
+      Object.keys(this.englishList).length > 0
+        ? this.englishList
+        : this.engList;
+    this.selectEnglishEva();
   },
 };
 </script>
 
 <style scoped>
+.dialog_diy >>> .el-dialog__header {
+  background: #3c3c3c !important;
+  padding: 15px 20px;
+}
+
+.dialog_diy >>> .el-dialog__title {
+  color: #fff;
+}
+
+.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;
+}
+
+.dialog_diy >>> .el-dialog__body,
+.dialog_diy >>> .el-dialog__footer {
+  background: #fafafa;
+}
 .englishBox {
   width: 50%;
   margin: 50px auto 0;
 }
-.themeTitle {
+.englishBox > div:not(:first-child) {
+  margin-top: 20px;
+}
+.themeTitle,
+.themeText,
+.themeEva {
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
   align-items: center;
 }
-.themeTitle > div:first-child {
+.themeText {
+  align-items: flex-start;
+}
+.themeText > div:last-child >>> .text {
+  min-height: 400px !important;
+}
+.themeTitle > div:first-child,
+.themeText > div:first-child,
+.themeEva > div:first-child {
   min-width: 65px;
   font-weight: bold;
 }
-.themeTitle > div:last-child {
+.themeText > div:first-child {
+  margin-top: 10px;
+}
+.themeTitle > div:last-child,
+.themeText > div:last-child,
+.themeEva > div:last-child {
   width: calc(100% - 75px);
   margin-left: 10px;
 }
-.themeText {
+.addeEva {
+  width: 200px;
+  height: 40px;
+  border: 1px dashed #dbdbdb;
+  border-radius: 10px;
+  margin-left: 10px;
+  cursor: pointer;
+}
+.addeEvaItem {
+  width: 50px;
+  height: 30px;
+  border: 1px dashed #dbdbdb;
+  margin-top: 5px;
+  border-radius: 10px;
+  float: right;
+  cursor: pointer;
+}
+.addeEva > img,
+.addeEvaItem > img {
+  width: 100%;
+  height: 100%;
+  object-fit: contain;
+}
+.engRate {
+  height: 25px;
+  margin: 5px 0;
+}
+.engRate >>> .el-rate__icon {
+  font-size: 25px;
+}
+.addEva {
+  width: 100%;
+}
+.firstJson {
   display: flex;
-  flex-direction: row;
+  flex-direction: column;
   flex-wrap: nowrap;
   align-items: flex-start;
-  margin-top: 20px;
 }
-.themeText > div:first-child {
-  min-width: 65px;
-  margin-top: 10px;
-  font-weight: bold;
+.firstJson > div {
+  margin-bottom: 5px;
 }
-.themeText > div:last-child {
-  width: calc(100% - 75px);
-  margin-left: 10px;
+.delteBox {
+  position: relative;
+  width: 100%;
 }
-.themeText > div:last-child >>> .text {
-  min-height: 400px !important;
+.delteBox > img {
+  position: absolute;
+  top: 4px;
+  right: 10px;
+  width: 30px;
+  height: 30px;
+  cursor: pointer;
 }
 </style>

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

@@ -2194,7 +2194,7 @@ export default {
             ) {
               var a =
                 "https://view.officeapps.live.com/op/view.aspx?src=" +
-                pptInfo[i].content;
+                encodeURIComponent(pptInfo[i].content);
               workJson[pptInfo[i].stage + "-" + pptInfo[i].task].wpptInfo.push({
                 wpptInfo: a,
                 score: pptInfo[i].score
@@ -2341,7 +2341,7 @@ export default {
               t = 2;
               var a =
                 "https://view.officeapps.live.com/op/view.aspx?src=" +
-                cocopi.content;
+                encodeURIComponent(cocopi.content);
               workJson[
                 cocopiInfo[i].stage + "-" + cocopiInfo[i].task
               ].cocopiInfo.push({
@@ -2925,7 +2925,7 @@ export default {
               t = 2;
               var a =
                 "https://view.officeapps.live.com/op/view.aspx?src=" +
-                cocopi.content;
+                encodeURIComponent(cocopi.content);
               workJson.cocopiInfo.push({
                 url: a,
                 type: t,

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

@@ -10,7 +10,7 @@
       </pdf>
     </div> -->
     <iframe ref="viframe" style="width: 100%; height: 99%; border: none"
-      :src="'https://cloud.cocorobo.cn/pdf.js/web/viewer.html?file=' + pdfUrl"></iframe>
+      :src="'https://cloud.cocorobo.cn/pdf.js/web/viewer.html?file=' + encodeURIComponent(pdfUrl)"></iframe>
     <!-- <div class="rightArea">
       <div class="toolGroup">
         <div class="page">第 {{ page }} / {{ numPages }} 页</div>

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

@@ -2201,7 +2201,7 @@ export default {
             ) {
               var a =
                 "https://view.officeapps.live.com/op/view.aspx?src=" +
-                pptInfo[i].content;
+                encodeURIComponent(pptInfo[i].content);
               workJson[pptInfo[i].stage + "-" + pptInfo[i].task].wpptInfo.push({
                 wpptInfo: a,
                 score: pptInfo[i].score
@@ -2348,7 +2348,7 @@ export default {
               t = 2;
               var a =
                 "https://view.officeapps.live.com/op/view.aspx?src=" +
-                cocopi.content;
+                encodeURIComponent(cocopi.content);
               workJson[
                 cocopiInfo[i].stage + "-" + cocopiInfo[i].task
               ].cocopiInfo.push({
@@ -3226,7 +3226,7 @@ export default {
               t = 2;
               var a =
                 "https://view.officeapps.live.com/op/view.aspx?src=" +
-                cocopi.content;
+                encodeURIComponent(cocopi.content);
               workJson.cocopiInfo.push({
                 url: a,
                 type: t,

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

@@ -859,7 +859,7 @@ export default {
                 ) {
                   var a =
                     "https://view.officeapps.live.com/op/view.aspx?src=" +
-                    pptInfo[i].content;
+                    encodeURIComponent(pptInfo[i].content);
                   workJson[k].wpptInfo.push(a);
                   this.showPDF = false;
                 } else if (

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

@@ -1820,7 +1820,7 @@ export default {
             ) {
               var a =
                 "https://view.officeapps.live.com/op/view.aspx?src=" +
-                pptInfo[i].content;
+                encodeURIComponent(pptInfo[i].content);
               workJson[pptInfo[i].stage + "-" + pptInfo[i].task].wpptInfo.push({
                 wpptInfo: a,
                 score: pptInfo[i].score
@@ -1967,7 +1967,7 @@ export default {
               t = 2;
               var a =
                 "https://view.officeapps.live.com/op/view.aspx?src=" +
-                cocopi.content;
+                encodeURIComponent(cocopi.content);
               workJson[
                 cocopiInfo[i].stage + "-" + cocopiInfo[i].task
               ].cocopiInfo.push({

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

@@ -712,7 +712,7 @@ export default {
                 ) {
                   var a =
                     "https://view.officeapps.live.com/op/view.aspx?src=" +
-                    pptInfo[i].content;
+                    encodeURIComponent(pptInfo[i].content);
                   workJson[k].wpptInfo.push(a);
                   this.showPDF = false;
                 } else if (

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

@@ -236,7 +236,7 @@
                 " @click="goToCourse3(item.courseId)">
                 修改
               </div>
-              <div v-if="groupA == '0'" @click="
+              <!-- <div v-if="groupA == '0'" @click="
                 goTo(
                   '/works?cid=' +
                   item.courseId +
@@ -251,7 +251,7 @@
                 )
                 ">
                 评价
-              </div>
+              </div> -->
               <div @click="copyCourse(item.courseId)">
                 复制
               </div>

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

@@ -360,12 +360,12 @@ export default {
       //     "&userid=" +
       //     this.userid
       // );
-      window.opener.blur();setTimeout(window.opener.focus(),0);
-      window.opener.postMessage({ cid: cid, screenType: "2gm" }, "*");
+      window.parent.blur();setTimeout(window.parent.focus(),0);
+      window.parent.postMessage({ cid: cid, screenType: "2gm" }, "*");
     },
     get(cid){
-      window.opener.blur();setTimeout(window.opener.focus(),0);
-      window.opener.postMessage({ cid: cid, screenType: "3gm" }, "*");
+      window.parent.blur();setTimeout(window.parent.focus(),0);
+      window.parent.postMessage({ cid: cid, screenType: "3gm" }, "*");
     },
     handle_remove(file, fileList) {
       var _tmp = this.fileList;

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

@@ -409,11 +409,6 @@ export default {
               }
             }
           }
-          for(var i = 0;i<toolAllArray.length;i++){
-            if(toolAllArray[i].value == 0){
-              toolAllArray.splice(i,1)
-            }
-          }
           this.toolList = toolAllArray;
           var courseJson = Object.values(
             tList.reduce(function (acc, obj) {

+ 2 - 2
src/components/pages/dataBoard/student/index.vue

@@ -416,10 +416,10 @@ export default {
             for (let j = 0; j < _loginTimeArray.length; j++) {
               const _user = _loginTimeArray[j];
               if(_user.classid.indexOf(_classList[i].id) != -1){
-                _EloginTimeArray[i].loginTime += _user.time
+                _EloginTimeArray[i].loginTime += Number(_user.time)
               }
             }
-            _EloginTimeArray[i].loginTime = (_EloginTimeArray[i].loginTime / 60).toFixed(2) //换算成小时
+            _EloginTimeArray[i].loginTime = (_EloginTimeArray[i].loginTime / 60 / 60).toFixed(2) //换算成小时
           }
           this.EloginTimeArray = _EloginTimeArray
           let _EscoreArray2 = []

+ 165 - 0
src/components/pages/dataBoardNew/course/chartList/bar2.vue

@@ -0,0 +1,165 @@
+<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: {
+        title: {
+          text: "作业数量",
+          textStyle: {
+            fontSize: 12,
+          },
+          padding: [10, 0, 0, 10],
+        },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+          },
+        },
+        dataZoom: [
+          {
+            // start: 50,
+            type: "inside",
+            yAxisIndex: 0,
+          },
+          {
+            type: "slider",
+            yAxisIndex: 0,
+          },
+        ],
+        grid: {
+          top: "10%",
+          left: "5%",
+          right: "5%",
+          bottom: "5%",
+          containLabel: true,
+        },
+        xAxis: {
+          type: "value",
+          boundaryGap: [0, 0.01],
+        },
+        yAxis: {
+          type: "category",
+          // data: ["六年级", "五年级", "四年级", "三年级", "二年级", "一年级"],
+          data: [],
+        },
+        series: [
+          {
+            name: "作业数量(个)",
+            type: "bar",
+            // data: [60, 110, 25, 130, 65, 80],
+            data: [],
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return "#106bff";
+                },
+              },
+            },
+          },
+        ],
+      },
+    };
+  },
+  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>

+ 128 - 72
src/components/pages/dataBoardNew/course/chartList/cateRank.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="data_body">
-        <div style="width: 100%; height: 100%">
+        <div style="width: 100%; height: 100%" :style="{minWidth:ooption.hours.length * 75 + 'px'}">
             <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
         </div>
     </div>
@@ -26,13 +26,59 @@ export default {
                     position: 'top',
                     formatter: function (params) {
                         // console.log(params);
-                        return params.marker + params.name + ' ' + params.data[1];//params.seriesName + '<br>' + params.
+                        return params.marker + params.name + ' ' + params.data[2];//params.seriesName + '<br>' + params.
 
                     }
                 },
-                title: [],
-                singleAxis: [],
-                series: []
+                grid: {
+                    top: '5%',
+                    left: 0,
+                    bottom: '5%',
+                    right: '5%',
+                    containLabel: true
+                },
+                xAxis: {
+                    type: 'category',
+                    data: [],
+                    boundaryGap: false,
+                    splitLine: {
+                        show: true
+                    },
+                    axisLine: {
+                        show: false
+                    }
+                },
+                yAxis: {
+                    type: 'category',
+                    data: [],
+                    axisLine: {
+                        show: false
+                    }
+                },
+                series: [
+                    {
+                        name: 'Punch Card',
+                        type: 'scatter',
+                        symbolSize: function (val) {
+                            return val[2] * 3;
+                        },
+                        data: [],
+                        animationDelay: function (idx) {
+                            return idx * 5;
+                        },
+                        itemStyle: {
+                            color: function(params) {
+                            // 根据行索引设置不同的颜色
+                            var row = params.value[1];
+                            var colorList = ['hsl(170, 80%, 75%)', 'hsl(300, 99%, 70%)', 'hsl(139, 93%, 60%)', 'hsl(56, 73%, 69%)', 'hsl(352, 98%, 69%)', 'hsl(288, 76%, 66%)', 'hsl(167, 89%, 60%)', 'hsl(83, 81%, 74%)', 'hsl(359, 84%, 66%)', 'hsl(208, 96%, 66%)', 'hsl(259, 82%, 62%)', 'hsl(224, 95%, 64%)', 'hsl(119, 89%, 71%)', 'hsl(35, 75%, 70%)', 'hsl(48, 73%, 76%)', 'hsl(10, 73%, 69%)', 'hsl(112, 88%, 71%)', 'hsl(90, 87%, 61%)', 'hsl(37, 83%, 66%)', 'hsl(192, 86%, 72%)'];
+                            return colorList[row % colorList.length];
+                            }
+                        }
+                    }
+                ]
+                // title: [],
+                // singleAxis: [],
+                // series: []
             },
         };
     },
@@ -71,39 +117,44 @@ export default {
                 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
+                // 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.xAxis.data = hours
+                    this.option.yAxis.data = days
+                    this.option.series[0].data = data.map(function (item) {
+                        return [item[1], item[0], item[2]];
+                    })
+                // this.option.title = title
+                // this.option.singleAxis = singleAxis
+                // this.option.series = series
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
@@ -146,40 +197,44 @@ export default {
                     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
+                    // 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.xAxis.data = hours
+                    this.option.yAxis.data = days
+                    this.option.series[0].data = data.map(function (item) {
+                        return [item[1], item[0], item[2]];
+                    })
+                    // this.option.title = title
+                    // this.option.singleAxis = singleAxis
+                    // this.option.series = series
                     this.chartObj.setOption(this.option);
                 }
             }
@@ -223,6 +278,7 @@ export default {
     padding: 0;
     width: 95%;
     background: #fff;
+    overflow: auto;
 }
 </style>
   

+ 20 - 3
src/components/pages/dataBoardNew/course/chartList/courseNum.vue

@@ -67,17 +67,34 @@ export default {
           column: {
             grouping: false,
             shadow: false,
-            borderWidth: 0
+            borderWidth: 0,
+            dataLabels: {
+              enabled: true,  //显示数量提示
+              color: '#000000',
+              formatter : function() {
+                var employee = this.point.series.chart.series[0].yData[this.point.index];
+                var optimizedEmployee = this.point.series.chart.series[1].yData[this.point.index];
+                var employeePercentage = 0;
+                if(optimizedEmployee > employee){
+                  employeePercentage = ((optimizedEmployee - employee) / optimizedEmployee) * 100
+                }
+                if (this.series.name === '本月课程总数') {
+                  return  employeePercentage.toFixed(1) + '%';
+                } else {
+                  return '';
+                }
+              }
+            }
           }
         },
         series: [{
-          name: '上周课程总数',
+          name: '上课程总数',
           color: 'rgba(165,170,217,1)',
           data: [],
           pointPadding: 0.3, // 通过 pointPadding 和 pointPlacement 控制柱子位置
           // pointPlacement: -0.2
         }, {
-          name: '本周课程总数',
+          name: '本课程总数',
           color: 'rgba(126,86,134,.9)',
           data: [],
           pointPadding: 0.4,

+ 14 - 14
src/components/pages/dataBoardNew/course/chartList/courseTime.vue

@@ -31,9 +31,9 @@ export default {
         series: [
           {
             type: "funnel",
-            left: "10%",
-            top: 60,
-            bottom: 20,
+            left: "5%",
+            top: 10,
+            bottom: 0,
             width: "95%",
             min: 0,
             max: 100,
@@ -83,16 +83,16 @@ export default {
         this.chartObj.setOption(this.option);
       });
     },
-    setArray(array){
-        let _array = array;
+    setArray(array) {
+      let _array = array;
 
-        if (!this.chartObj) {
-          this.setChart(_array);
-        } else {
-          this.option.series[0].data = _array;
-          this.chartObj.setOption(this.option);
-        }
-        this.$forceUpdate();
+      if (!this.chartObj) {
+        this.setChart(_array);
+      } else {
+        this.option.series[0].data = _array;
+        this.chartObj.setOption(this.option);
+      }
+      this.$forceUpdate();
     },
   },
   watch: {
@@ -100,12 +100,12 @@ export default {
       immediate: true,
       deep: true,
       handler(newValue, oldValue) {
-        this.setArray(newValue)
+        this.setArray(newValue);
       },
     },
   },
   mounted() {
-    this.setArray(this.pusaDep)
+    this.setArray(this.pusaDep);
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

+ 67 - 47
src/components/pages/dataBoardNew/course/chartList/subjuect.vue

@@ -20,6 +20,11 @@ export default {
   components: {
     highcharts: Chart,
   },
+  props: {
+    resultSubject: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -36,53 +41,53 @@ export default {
         series: [{
           keys: ['from', 'to', 'weight'],
           data: [
-            ['Brazil', 'Portugal', 5],
-            ['Brazil', 'France', 1],
-            ['Brazil', 'Spain', 1],
-            ['Brazil', 'England', 1],
-            ['Canada', 'Portugal', 1],
-            ['Canada', 'France', 5],
-            ['Canada', 'England', 1],
-            ['Mexico', 'Portugal', 1],
-            ['Mexico', 'France', 1],
-            ['Mexico', 'Spain', 5],
-            ['Mexico', 'England', 1],
-            ['USA', 'Portugal', 1],
-            ['USA', 'France', 1],
-            ['USA', 'Spain', 1],
-            ['USA', 'England', 5],
-            ['Portugal', 'Angola', 2],
-            ['Portugal', 'Senegal', 1],
-            ['Portugal', 'Morocco', 1],
-            ['Portugal', 'South Africa', 3],
-            ['France', 'Angola', 1],
-            ['France', 'Senegal', 3],
-            ['France', 'Mali', 3],
-            ['France', 'Morocco', 3],
-            ['France', 'South Africa', 1],
-            ['Spain', 'Senegal', 1],
-            ['Spain', 'Morocco', 3],
-            ['Spain', 'South Africa', 1],
-            ['England', 'Angola', 1],
-            ['England', 'Senegal', 1],
-            ['England', 'Morocco', 2],
-            ['England', 'South Africa', 7],
-            ['South Africa', 'China', 5],
-            ['South Africa', 'India', 1],
-            ['South Africa', 'Japan', 3],
-            ['Angola', 'China', 5],
-            ['Angola', 'India', 1],
-            ['Angola', 'Japan', 3],
-            ['Senegal', 'China', 5],
-            ['Senegal', 'India', 1],
-            ['Senegal', 'Japan', 3],
-            ['Mali', 'China', 5],
-            ['Mali', 'India', 1],
-            ['Mali', 'Japan', 3],
-            ['Morocco', 'China', 5],
-            ['Morocco', 'India', 1],
-            ['Morocco', 'Japan', 3],
-            ['Japan', 'Brazil', 1]
+            // ['Brazil', 'Portugal', 5],
+            // ['Brazil', 'France', 1],
+            // ['Brazil', 'Spain', 1],
+            // ['Brazil', 'England', 1],
+            // ['Canada', 'Portugal', 1],
+            // ['Canada', 'France', 5],
+            // ['Canada', 'England', 1],
+            // ['Mexico', 'Portugal', 1],
+            // ['Mexico', 'France', 1],
+            // ['Mexico', 'Spain', 5],
+            // ['Mexico', 'England', 1],
+            // ['USA', 'Portugal', 1],
+            // ['USA', 'France', 1],
+            // ['USA', 'Spain', 1],
+            // ['USA', 'England', 5],
+            // ['Portugal', 'Angola', 2],
+            // ['Portugal', 'Senegal', 1],
+            // ['Portugal', 'Morocco', 1],
+            // ['Portugal', 'South Africa', 3],
+            // ['France', 'Angola', 1],
+            // ['France', 'Senegal', 3],
+            // ['France', 'Mali', 3],
+            // ['France', 'Morocco', 3],
+            // ['France', 'South Africa', 1],
+            // ['Spain', 'Senegal', 1],
+            // ['Spain', 'Morocco', 3],
+            // ['Spain', 'South Africa', 1],
+            // ['England', 'Angola', 1],
+            // ['England', 'Senegal', 1],
+            // ['England', 'Morocco', 2],
+            // ['England', 'South Africa', 7],
+            // ['South Africa', 'China', 5],
+            // ['South Africa', 'India', 1],
+            // ['South Africa', 'Japan', 3],
+            // ['Angola', 'China', 5],
+            // ['Angola', 'India', 1],
+            // ['Angola', 'Japan', 3],
+            // ['Senegal', 'China', 5],
+            // ['Senegal', 'India', 1],
+            // ['Senegal', 'Japan', 3],
+            // ['Mali', 'China', 5],
+            // ['Mali', 'India', 1],
+            // ['Mali', 'Japan', 3],
+            // ['Morocco', 'China', 5],
+            // ['Morocco', 'India', 1],
+            // ['Morocco', 'Japan', 3],
+            // ['Japan', 'Brazil', 1]
           ],
           type: 'dependencywheel',
           name: 'Dependency wheel series',
@@ -115,10 +120,25 @@ export default {
         // this.chartObj.setOption(this.option);
       });
     },
+    setArray(array) {
+      this.option.series[0].data = array
+
+    }
   },
   watch: {
+    resultSubject: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
   },
   mounted() {
+    this.setArray(this.resultSubject)
+    // this.setChart();
+
   },
 };
 </script>

+ 2 - 1
src/components/pages/dataBoardNew/course/chartList/teaFre.vue

@@ -36,9 +36,10 @@ export default {
         },
         yAxis: {
           type: "value",
+          minInterval: 1
         },
         grid: {
-          top: "30",
+          top: "10%",
           left: "5%",
           right: "5%",
           bottom: "5%",

+ 206 - 0
src/components/pages/dataBoardNew/course/chartList/toolUse2.vue

@@ -0,0 +1,206 @@
+<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: {
+        // title: {
+        //   text: '登录频次',
+        //   textStyle: {
+        //     fontSize: 12,
+        //   },
+        //   padding: [10, 0, 0, 10]
+        // },
+        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
+          },
+          axisLabel: {
+            formatter: function (value) {
+              console.log(value);
+              var ret = "";//拼接加\n返回的类目项  
+              var maxLength = 2;//每项显示文字个数  
+              var valLength = value.length;//X轴类目项的文字个数  
+              var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数  
+              if (rowN > 1)//如果类目项的文字大于5,  
+              {
+                for (var i = 0; i < rowN; i++) {
+                  var temp = "";//每次截取的字符串  
+                  var start = i * maxLength;//开始截取的位置  
+                  var end = start + maxLength;//结束截取的位置  
+                  //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧  
+                  temp = value.substring(start, end) + "\n";
+                  ret += temp; //凭借最终的字符串  
+                }
+                return ret;
+              }
+              else {
+                return value;
+              }
+            }
+          }
+        },
+        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);
+      });
+    },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        sdata: [],
+        max: 0
+      }
+      let _array = array
+      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);
+      }
+    }
+  },
+  watch: {
+    yearArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setJson(this.yearArray)
+
+    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>

+ 2 - 2
src/components/pages/dataBoardNew/course/chartList/workNum.vue

@@ -33,10 +33,10 @@ export default {
           nameGap: -45
         },
         grid: {
-          top: "10%",
+          top: "20%",
           left: "5%",
           right: "5%",
-          bottom: "10%",
+          bottom: "15%",
           containLabel: true,
         },
         yAxis: {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 412 - 245
src/components/pages/dataBoardNew/course/index.vue


+ 28 - 2
src/components/pages/dataBoardNew/index.vue

@@ -6,12 +6,13 @@
         <div v-if="type == 1">综合数据中心</div>
         <div v-if="type == 2">课程数据中心</div>
         <div v-if="type == 3">学生数据中心</div>
+        <div v-if="type == 5">项目数据中心</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 == 5 }" @click="setType(5)">项目数据</div>
+        <div :class="{ active: type == 5 }" @click="setType(5)" v-if="scourseLength > 0">项目数据</div>
         <div :class="{ active: type == 3 }" @click="setType(3)">学生数据</div>
         <div :class="{ active: type == 4 }" @click="setType(4)">教师数据</div>
       </div>
@@ -45,12 +46,37 @@ export default {
       type: 1,
       oid: this.$route.query.oid,
       org: this.$route.query.org,
+      scourseLength: 0,
     };
   },
   methods: {
     setType(type) {
       this.type = type;
     },
+    getData() {
+      this.isLoading = true;
+      let params = [
+        {
+          oid: this.oid,
+          org: this.org,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "getCourseLength", params)
+        .then((res) => {
+          this.isLoading = false;
+         
+          this.scourseLength = res.data[0][0].count;
+          this.$forceUpdate();
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+  },
+  mounted () {
+    this.getData();
   },
 };
 </script>
@@ -59,7 +85,7 @@ export default {
 .body {
   height: 100%;
   width: 100%;
-  min-width: 1200px;
+  min-width: 1550px;
   min-height: 750px;
 }
 

+ 7 - 0
src/components/pages/dataBoardNew/project/chartList/bar.vue

@@ -23,6 +23,13 @@ export default {
         tooltip: {
           trigger: "item",
         },
+        grid: {
+          top: "5%",
+          left: "5%",
+          right: "5%",
+          bottom: "15%",
+          containLabel: true,
+        },
         xAxis: {
           type: "value",
           data: [0, 50, 100, 150, 200, 250],

+ 141 - 0
src/components/pages/dataBoardNew/project/chartList/bar/cCourse.vue

@@ -0,0 +1,141 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;">
+            <!-- <div id="cateRank" class="echart" style="width: 100%; height: 100%"></div> -->
+            <highcharts :options="option" style="width: 95%; height: 95%"></highcharts>
+        </div>
+    </div>
+</template>
+  
+<script>
+import { Chart } from 'highcharts-vue'
+import HighCharts from 'highcharts'
+//和弦图的引入依赖
+// import column from 'highcharts/modules/column';
+// column(HighCharts);
+
+export default {
+    components: {
+        highcharts: Chart,
+    },
+    props: {
+        weekCourse2: {
+            type: Array,
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                data: [],
+            },
+            option: {
+                chart: {
+                    type: 'column',
+                    inverted: true
+                },
+                credits: {
+                    enabled: false//不显示LOGO
+                },
+                title: {
+                    text: null,
+                },
+                xAxis: {
+                    categories: ['按协同比例']
+                },
+                yAxis: {
+                    min: 0,
+                    title: {
+                        text: null
+                    }
+                },
+                tooltip: {
+                    pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b>' +
+                        '({point.percentage:.0f}%)<br/>',
+                    //:.0f 表示保留 0 位小数,详见教程:https://www.hcharts.cn/docs/basic-labels-string-formatting
+                    shared: true
+                },
+                plotOptions: {
+                    column: {
+                        stacking: 'percent'
+                    }
+                },
+                legend: {
+                    align: 'center',
+                    verticalAlign: 'top',
+                    floating: true,
+                    backgroundColor: 'white',
+                    borderColor: '#CCC',
+                    borderWidth: 1,
+                    shadow: false
+                },
+                series: [{
+                    name: '教师协作',
+                    data: [5]
+                }, {
+                    name: '师生协作',
+                    data: [2]
+                }, {
+                    name: '生生协作',
+                    data: [3]
+                }]
+            }
+        };
+    },
+    methods: {
+        setChart() {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = Highcharts.chart('cateRank', this.option);
+                // 初始化雷达图
+                // this.chartObj = chartObj;
+                // this.chartObj.setOption(this.option);
+            });
+        },
+        setArray(array) {
+            this.option.xAxis.categories = []
+            this.option.series[0].data = []
+            this.option.series[1].data = []
+            for (var i = 0; i < array.length; i++) {
+                this.option.xAxis.categories.push(array[i].name)
+                this.option.series[0].data.push(array[i].lastWeekCouseCount)
+                this.option.series[1].data.push(array[i].toWeekCouseCount)
+            }
+        }
+    },
+    watch: {
+        weekCourse2: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                // this.setArray(newValue)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        // this.setArray(this.weekCourse2)
+        // 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/dataBoardNew/project/chartList/bar/finish.vue

@@ -0,0 +1,141 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;">
+            <!-- <div id="cateRank" class="echart" style="width: 100%; height: 100%"></div> -->
+            <highcharts :options="option" style="width: 95%; height: 95%"></highcharts>
+        </div>
+    </div>
+</template>
+  
+<script>
+import { Chart } from 'highcharts-vue'
+import HighCharts from 'highcharts'
+//和弦图的引入依赖
+// import column from 'highcharts/modules/column';
+// column(HighCharts);
+
+export default {
+    components: {
+        highcharts: Chart,
+    },
+    props: {
+        weekCourse2: {
+            type: Array,
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                data: [],
+            },
+            option: {
+                chart: {
+                    type: 'column',
+                    inverted: true
+                },
+                credits: {
+                    enabled: false//不显示LOGO
+                },
+                title: {
+                    text: null,
+                },
+                xAxis: {
+                    categories: ['按完成状态']
+                },
+                yAxis: {
+                    min: 0,
+                    title: {
+                        text: null
+                    }
+                },
+                tooltip: {
+                    pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b>' +
+                        '({point.percentage:.0f}%)<br/>',
+                    //:.0f 表示保留 0 位小数,详见教程:https://www.hcharts.cn/docs/basic-labels-string-formatting
+                    shared: true
+                },
+                plotOptions: {
+                    column: {
+                        stacking: 'percent'
+                    }
+                },
+                legend: {
+                    align: 'center',
+                    verticalAlign: 'top',
+                    floating: true,
+                    backgroundColor: 'white',
+                    borderColor: '#CCC',
+                    borderWidth: 1,
+                    shadow: false
+                },
+                series: [{
+                    name: '未进行',
+                    data: [5]
+                }, {
+                    name: '进行中',
+                    data: [2]
+                }, {
+                    name: '已完成',
+                    data: [3]
+                }]
+            }
+        };
+    },
+    methods: {
+        setChart() {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = Highcharts.chart('cateRank', this.option);
+                // 初始化雷达图
+                // this.chartObj = chartObj;
+                // this.chartObj.setOption(this.option);
+            });
+        },
+        setArray(array) {
+            this.option.xAxis.categories = []
+            this.option.series[0].data = []
+            this.option.series[1].data = []
+            for (var i = 0; i < array.length; i++) {
+                this.option.xAxis.categories.push(array[i].name)
+                this.option.series[0].data.push(array[i].lastWeekCouseCount)
+                this.option.series[1].data.push(array[i].toWeekCouseCount)
+            }
+        }
+    },
+    watch: {
+        weekCourse2: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                // this.setArray(newValue)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        // this.setArray(this.weekCourse2)
+        // 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/dataBoardNew/project/chartList/bar/teacherStudent.vue

@@ -0,0 +1,141 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;">
+            <!-- <div id="cateRank" class="echart" style="width: 100%; height: 100%"></div> -->
+            <highcharts :options="option" style="width: 95%; height: 95%"></highcharts>
+        </div>
+    </div>
+</template>
+  
+<script>
+import { Chart } from 'highcharts-vue'
+import HighCharts from 'highcharts'
+//和弦图的引入依赖
+// import column from 'highcharts/modules/column';
+// column(HighCharts);
+
+export default {
+    props: {
+        tsArray: {
+            type: Object,
+        },
+    },
+    components: {
+        highcharts: Chart,
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                data: [],
+            },
+            option: {
+                chart: {
+                    type: 'column',
+                    inverted: true
+                },
+                credits: {
+                    enabled: false//不显示LOGO
+                },
+                title: {
+                    text: null,
+                },
+                xAxis: {
+                    categories: ['按师生分工比例']
+                },
+                yAxis: {
+                    min: 0,
+                    title: {
+                        text: null
+                    }
+                },
+                tooltip: {
+                    pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b>' +
+                        '({point.percentage:.0f}%)<br/>',
+                    //:.0f 表示保留 0 位小数,详见教程:https://www.hcharts.cn/docs/basic-labels-string-formatting
+                    shared: true
+                },
+                plotOptions: {
+                    column: {
+                        stacking: 'percent'
+                    }
+                },
+                legend: {
+                    align: 'center',
+                    verticalAlign: 'top',
+                    floating: true,
+                    y: -20,
+                    backgroundColor: 'white',
+                    borderColor: '#CCC',
+                    borderWidth: 1,
+                    shadow: false
+                },
+                series: [{
+                    name: '教师负责',
+                    data: []
+                }, {
+                    name: '学生负责',
+                    data: []
+                }, {
+                    name: '师生负责',
+                    data: []
+                }]
+            }
+        };
+    },
+    methods: {
+        setChart() {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = Highcharts.chart('cateRank', this.option);
+                // 初始化雷达图
+                // this.chartObj = chartObj;
+                // this.chartObj.setOption(this.option);
+            });
+        },
+        setArray(array) {
+            if (!array || !Object.keys(array).length) {
+                return
+            }
+            // this.option.xAxis.categories = []
+            this.option.series[0].data = [array.tt]
+            this.option.series[1].data = [array.ss]
+            this.option.series[2].data = [array.ts]     
+        }
+    },
+    watch: {
+        tsArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(newValue)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.setArray(this.weekCourse2)
+        // 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>

+ 144 - 0
src/components/pages/dataBoardNew/project/chartList/bar/time.vue

@@ -0,0 +1,144 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;">
+            <!-- <div id="cateRank" class="echart" style="width: 100%; height: 100%"></div> -->
+            <highcharts :options="option" style="width: 95%; height: 95%"></highcharts>
+        </div>
+    </div>
+</template>
+  
+<script>
+import { Chart } from 'highcharts-vue'
+import HighCharts from 'highcharts'
+//和弦图的引入依赖
+// import column from 'highcharts/modules/column';
+// column(HighCharts);
+
+export default {
+    components: {
+        highcharts: Chart,
+    },
+    props: {
+        weekCourse2: {
+            type: Array,
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                data: [],
+            },
+            option: {
+                chart: {
+                    type: 'column',
+                    inverted: true
+                },
+                credits: {
+                    enabled: false//不显示LOGO
+                },
+                title: {
+                    text: null,
+                },
+                xAxis: {
+                    categories: ['按项目时长']
+                },
+                yAxis: {
+                    min: 0,
+                    title: {
+                        text: null
+                    }
+                },
+                tooltip: {
+                    pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b>' +
+                        '({point.percentage:.0f}%)<br/>',
+                    //:.0f 表示保留 0 位小数,详见教程:https://www.hcharts.cn/docs/basic-labels-string-formatting
+                    shared: true
+                },
+                plotOptions: {
+                    column: {
+                        stacking: 'percent'
+                    }
+                },
+                legend: {
+                    align: 'center',
+                    verticalAlign: 'top',
+                    floating: true,
+                    backgroundColor: 'white',
+                    borderColor: '#CCC',
+                    borderWidth: 1,
+                    shadow: false
+                },
+                series: [{
+                    name: '9周以上',
+                    data: [5]
+                }, {
+                    name: '6-8周',
+                    data: [2]
+                }, {
+                    name: '3-5周',
+                    data: [3]
+                }, {
+                    name: '2周以下',
+                    data: [3]
+                }]
+            }
+        };
+    },
+    methods: {
+        setChart() {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = Highcharts.chart('cateRank', this.option);
+                // 初始化雷达图
+                // this.chartObj = chartObj;
+                // this.chartObj.setOption(this.option);
+            });
+        },
+        setArray(array) {
+            this.option.xAxis.categories = []
+            this.option.series[0].data = []
+            this.option.series[1].data = []
+            for (var i = 0; i < array.length; i++) {
+                this.option.xAxis.categories.push(array[i].name)
+                this.option.series[0].data.push(array[i].lastWeekCouseCount)
+                this.option.series[1].data.push(array[i].toWeekCouseCount)
+            }
+        }
+    },
+    watch: {
+        weekCourse2: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                // this.setArray(newValue)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        // this.setArray(this.weekCourse2)
+        // 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>

+ 147 - 180
src/components/pages/dataBoardNew/project/chartList/cateRank.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="data_body">
-        <div style="width: 100%; height: 100%">
+        <div style="width: 100%; height: 100%" :style="{ minWidth: ooption.hours.length * 75 + 'px' }">
             <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
         </div>
     </div>
@@ -26,105 +26,63 @@ export default {
                     position: 'top',
                     formatter: function (params) {
                         // console.log(params);
-                        return params.marker + params.name + ' ' + params.data[1];//params.seriesName + '<br>' + params.
+                        return params.marker + params.name + ' ' + params.data[2];//params.seriesName + '<br>' + params.
 
                     }
                 },
-                title: [],
-                singleAxis: [],
-                series: []
+                grid: {
+                    top: '5%',
+                    left: 0,
+                    bottom: '5%',
+                    right: '5%',
+                    containLabel: true
+                },
+                xAxis: {
+                    type: 'category',
+                    data: [],
+                    boundaryGap: false,
+                    splitLine: {
+                        show: true
+                    },
+                    axisLine: {
+                        show: false
+                    }
+                },
+                yAxis: {
+                    type: 'category',
+                    data: [],
+                    axisLine: {
+                        show: false
+                    }
+                },
+                series: [
+                    {
+                        name: 'Punch Card',
+                        type: 'scatter',
+                        symbolSize: function (val) {
+                            return val[2] * 3;
+                        },
+                        data: [],
+                        animationDelay: function (idx) {
+                            return idx * 5;
+                        },
+                        itemStyle: {
+                            color: function(params) {
+                            // 根据行索引设置不同的颜色
+                            var row = params.value[1];
+                            var colorList = ['hsl(170, 80%, 75%)', 'hsl(300, 99%, 70%)', 'hsl(139, 93%, 60%)', 'hsl(56, 73%, 69%)', 'hsl(352, 98%, 69%)', 'hsl(288, 76%, 66%)', 'hsl(167, 89%, 60%)', 'hsl(83, 81%, 74%)', 'hsl(359, 84%, 66%)', 'hsl(208, 96%, 66%)', 'hsl(259, 82%, 62%)', 'hsl(224, 95%, 64%)', 'hsl(119, 89%, 71%)', 'hsl(35, 75%, 70%)', 'hsl(48, 73%, 76%)', 'hsl(10, 73%, 69%)', 'hsl(112, 88%, 71%)', 'hsl(90, 87%, 61%)', 'hsl(37, 83%, 66%)', 'hsl(192, 86%, 72%)'];
+                            return colorList[row % colorList.length];
+                            }
+                        }
+                    }
+                ]
+                // 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);
-        //     });
-        // },
         setChart(option) {
             // 雷达图显示的标签
             let newPromise = new Promise((resolve) => {
@@ -136,68 +94,73 @@ export default {
                     //劳动课程
                     this.$el.querySelector("#charts_canvas")
                 );
-                const hours = 
-                [
-                    '1班', '2班', '3班', '4班', '5班', '6班'
-                ];
+                const hours = option.hours
+                // [
+                //     // '语文', '数学', '英语', '科学', '体育', '音乐', '美术',
+                //     // '劳动', '其他',
+                // ];
                 // prettier-ignore
-                const days = 
-                [
-                    '一年级', '二年级', '三年级', '四年级', '五年级', '六年级'
-                ];
+                const days = option.days
+                // [
+                //     // '一年级', '二年级', '三年级', '四年级', '五年级', '六年级'
+                // ];
                 // prettier-ignore
-                const data = 
-                [
-                    [0, 0, 34], [0, 1, 35], [0, 2, 40], [0, 3, 33], [0, 4, 35], [0, 5, 35], 
-                    [1, 0, 34], [1, 1, 30], [1, 2, 35], [1, 3, 41], [1, 4, 42], [1, 5, 37], 
-                    [2, 0, 45], [2, 1, 35], [2, 2, 44], [2, 3, 45], [2, 4, 41], [2, 5, 35], 
-                    [3, 0, 41], [3, 1, 44], [3, 2, 43], [3, 3, 39], [3, 4, 42], [3, 5, 42], 
-                    [4, 0, 34], [4, 1, 36], [4, 2, 40], [4, 3, 0], [4, 4, 0], [4, 5, 0], 
-                    [5, 0, 44], [5, 1, 44], [5, 2, 34], [5, 3, 0], [5, 4, 0], [5, 5, 0],
-                ];
+                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];
-                        }
-                    });
-                });
-                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
+                // 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.xAxis.data = hours
+                this.option.yAxis.data = days
+                this.option.series[0].data = data.map(function (item) {
+                    return [item[1], item[0], item[2]];
+                })
+                // this.option.title = title
+                // this.option.singleAxis = singleAxis
+                // this.option.series = series
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
             });
         },
         setJson(array) {
-            this.setChart(this.ooption);
             if (array != undefined && array.length > 0) {
                 this.ooption = {
                     hours: [],
@@ -234,40 +197,44 @@ export default {
                     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
+                    // 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.xAxis.data = hours
+                    this.option.yAxis.data = days
+                    this.option.series[0].data = data.map(function (item) {
+                        return [item[1], item[0], item[2]];
+                    })
+                    // this.option.title = title
+                    // this.option.singleAxis = singleAxis
+                    // this.option.series = series
                     this.chartObj.setOption(this.option);
                 }
             }
@@ -290,7 +257,6 @@ export default {
         // this.courseArray = this.courseArray.filter(item => {
         //     return ['一年级','二年级','三年级','四年级','五年级','六年级','七年级'].indexOf(item.name) !== -1
         // })
-
         this.setJson(this.courseArray)
         var _this = this;
         window.addEventListener("resize", () => {
@@ -312,6 +278,7 @@ export default {
     padding: 0;
     width: 95%;
     background: #fff;
+    overflow: auto;
 }
 </style>
-  
+  

+ 107 - 62
src/components/pages/dataBoardNew/project/chartList/courseAna.vue

@@ -1,80 +1,125 @@
 <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 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: {
-        data: [],
+  props: {
+      courseNumberArray: {
+          type: Array,
       },
-      option: {
-        tooltip: {
-          trigger: "item",
-        },
-        series: [
-          {
-            type: "pie",
-            radius: '50%',
-            avoidLabelOverlap: true,
-            emphasis: {
-              label: {
-                show: true,
-                fontSize: 16,
-                fontWeight: "bold",
+  },
+  data() {
+      return {
+          chartObj: null,
+          ooption: {
+              data: [],
+          },
+          option: {
+              // title: {
+              //     text: '课程数量',
+              //     textStyle:{
+              //         fontSize: 12,
+              //     },
+              //     padding: [5, 0, 0, 10]
+              // },
+              tooltip: {
+                  trigger: 'item'
               },
-            },
-            data: [
-              { value: 100, name: "一年级" },
-              { value: 150, name: "二年级" },
-              { value: 223, name: "三年级" },
-              { value: 216, name: "四年级" },
-              { value: 130, name: "五年级" },
-              { value: 208, name: "六年级" },
-            ],
+              series: [
+                  {
+                      avoidLabelOverlap: true,  //是否启用防止标签重叠策略
+                      labelLine: { // 设置指示线的长度
+                          length: 8,
+                          length2: 5
+                      },
+                      label: {
+                          fontSize: 12,
+                          position:'outer',
+                          // alignTo:'labelLine'
+                      },
+                      labelLayout: {
+                          hideOverlap: false
+                      },
+                      type: 'pie',
+                      // radius: ['35%', '70%'],
+                      emphasis: {
+                          label: {
+                              show: true,
+                              fontSize: 13,
+                              fontWeight: 'bold'
+                          }
+                      },
+                      data: [
+                          // { value: 1048, name: '一年级' },
+                          // { value: 735, name: '二年级' },
+                          // { value: 580, name: '三年级' },
+                          // { value: 484, name: '四年级' },
+                          // { value: 484, name: '五年级' },
+                          // { value: 300, 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);
-      });
-    },
+      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.filter(item => item.value !== 0);
+
+              // 初始化雷达图
+              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.setChart();
-    var _this = this;
-    window.addEventListener("resize", () => {
-      if (_this.chartObj) {
-        _this.chartObj.resize();
-      }
-    });
+      this.setArray(this.courseNumberArray)
+      var _this = this;
+      window.addEventListener("resize", () => {
+          if (_this.chartObj) {
+              _this.chartObj.resize();
+          }
+      });
   },
 };
 </script>
@@ -92,4 +137,4 @@ export default {
   width: 95%;
   background: #fff;
 }
-</style>
+</style>

+ 126 - 33
src/components/pages/dataBoardNew/project/chartList/courseNum.vue

@@ -1,42 +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 style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;">
+      <!-- <div id="cateRank" class="echart" style="width: 100%; height: 100%"></div> -->
+      <highcharts :options="option" style="width: 95%; height: 95%"></highcharts>
     </div>
   </div>
 </template>
 
 <script>
+import { Chart } from 'highcharts-vue'
+import HighCharts from 'highcharts'
+//和弦图的引入依赖
+// import column from 'highcharts/modules/column';
+// column(HighCharts);
+
 export default {
+  components: {
+    highcharts: Chart,
+  },
+  props: {
+    weekCourse2: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
       ooption: {
-        xdata: [],
-        type: [],
+        data: [],
       },
       option: {
-        tooltip: {
-          trigger: "item",
+        chart: {
+          type: 'column'
+        },
+        title: {
+          text: null
+        },
+        credits: {
+          enabled: false//不显示LOGO
         },
         xAxis: {
-          type: "category",
-          data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+          categories: [
+          ]
         },
-        yAxis: {
-          type: "value",
+        yAxis: [{
+          allowDecimals: false,
+          min: 0,
+          title: {
+            text: '项目总数'
+          }
         },
-        series: [
-          {
-            data: [120, 200, 150, 80, 70, 110, 130],
-            type: "bar",
-          },
+          // {
+          //   title: {
+          //     text: '项目总数'
+          //   },
+          //   opposite: true
+          // }
         ],
-      },
+        legend: {
+          shadow: false
+        },
+        tooltip: {
+          shared: true
+        },
+        plotOptions: {
+          column: {
+            grouping: false,
+            shadow: false,
+            borderWidth: 0,
+            dataLabels: {
+              enabled: true,  //显示数量提示
+              color: '#000000',
+              formatter : function() {
+                var employee = this.point.series.chart.series[0].yData[this.point.index];
+                var optimizedEmployee = this.point.series.chart.series[1].yData[this.point.index];
+                var employeePercentage = 0;
+                if(optimizedEmployee > employee){
+                  employeePercentage = ((optimizedEmployee - employee) / optimizedEmployee) * 100
+                }
+                if (this.series.name === '本月课程总数') {
+                  return  employeePercentage.toFixed(1) + '%';
+                } else {
+                  return '';
+                }
+              }
+            }
+          }
+        },
+        series: [{
+          name: '上月课程总数',
+          color: 'rgba(165,170,217,1)',
+          data: [],
+          pointPadding: 0.3, // 通过 pointPadding 和 pointPlacement 控制柱子位置
+          // pointPlacement: -0.2
+        }, {
+          name: '本月课程总数',
+          color: 'rgba(126,86,134,.9)',
+          data: [],
+          pointPadding: 0.4,
+          // pointPlacement: -0.2
+        },
+          //  {
+          //   name: '上周项目总数',
+          //   color: 'rgba(248,161,63,1)',
+          //   data: [153, 178, 195],
+          //   pointPadding: 0.3,
+          //   pointPlacement: 0.2,
+          //   yAxis: 1  // 指定数据列所在的 yAxis
+          // }, {
+          //   name: '本周项目总数',
+          //   color: 'rgba(186,60,61,.9)',
+          //   data: [203, 198, 208],
+          //   pointPadding: 0.4,
+          //   pointPlacement: 0.2,
+          //   yAxis: 1
+          // }
+        ]
+      }
     };
   },
   methods: {
@@ -47,24 +127,37 @@ export default {
       });
       //然后异步执行echarts的初始化函数
       newPromise.then(() => {
-        const chartObj = this.$echarts.init(
-          this.$el.querySelector("#charts_canvas")
-        );
+        const chartObj = Highcharts.chart('cateRank', this.option);
         // 初始化雷达图
-        this.chartObj = chartObj;
-        this.chartObj.setOption(this.option);
+        // this.chartObj = chartObj;
+        // this.chartObj.setOption(this.option);
       });
     },
+    setArray(array) {
+      this.option.xAxis.categories = []
+      this.option.series[0].data = []
+      this.option.series[1].data = []
+      for (var i = 0; i < array.length; i++) {
+        this.option.xAxis.categories.push(array[i].name)
+        this.option.series[0].data.push(array[i].lastWeekCouseCount)
+        this.option.series[1].data.push(array[i].toWeekCouseCount)
+      }
+    }
+  },
+  watch: {
+    weekCourse2: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
   },
-  watch: {},
   mounted() {
-    this.setChart();
-    var _this = this;
-    window.addEventListener("resize", () => {
-      if (_this.chartObj) {
-        _this.chartObj.resize();
-      }
-    });
+    this.setArray(this.weekCourse2)
+    // this.setChart();
+
   },
 };
 </script>

+ 139 - 0
src/components/pages/dataBoardNew/project/chartList/subjuect.vue

@@ -0,0 +1,139 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%;align-items: center;justify-content: center;">
+      <!-- <div id="cateRank" class="echart" style="width: 100%; height: 100%"></div> -->
+      <highcharts :options="option" style="width: 100%; height: 95%;"></highcharts>
+    </div>
+  </div>
+</template>
+
+<script>
+import {Chart} from 'highcharts-vue'
+import HighCharts from 'highcharts'
+//和弦图的引入依赖
+import HC_sankey from 'highcharts/modules/sankey';
+import dependencywheel from 'highcharts/modules/dependency-wheel';
+HC_sankey(HighCharts);
+dependencywheel(HighCharts);
+
+export default {
+  components: {
+    highcharts: Chart,
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        data: [],
+      },
+      option: {
+        title: {
+          text: null,
+        },
+        credits: {
+            enabled: false//不显示LOGO
+        },
+        series: [{
+          keys: ['from', 'to', 'weight'],
+          data: [
+            ['Brazil', 'Portugal', 5],
+            ['Brazil', 'France', 1],
+            ['Brazil', 'Spain', 1],
+            ['Brazil', 'England', 1],
+            ['Canada', 'Portugal', 1],
+            ['Canada', 'France', 5],
+            ['Canada', 'England', 1],
+            ['Mexico', 'Portugal', 1],
+            ['Mexico', 'France', 1],
+            ['Mexico', 'Spain', 5],
+            ['Mexico', 'England', 1],
+            ['USA', 'Portugal', 1],
+            ['USA', 'France', 1],
+            ['USA', 'Spain', 1],
+            ['USA', 'England', 5],
+            ['Portugal', 'Angola', 2],
+            ['Portugal', 'Senegal', 1],
+            ['Portugal', 'Morocco', 1],
+            ['Portugal', 'South Africa', 3],
+            ['France', 'Angola', 1],
+            ['France', 'Senegal', 3],
+            ['France', 'Mali', 3],
+            ['France', 'Morocco', 3],
+            ['France', 'South Africa', 1],
+            ['Spain', 'Senegal', 1],
+            ['Spain', 'Morocco', 3],
+            ['Spain', 'South Africa', 1],
+            ['England', 'Angola', 1],
+            ['England', 'Senegal', 1],
+            ['England', 'Morocco', 2],
+            ['England', 'South Africa', 7],
+            ['South Africa', 'China', 5],
+            ['South Africa', 'India', 1],
+            ['South Africa', 'Japan', 3],
+            ['Angola', 'China', 5],
+            ['Angola', 'India', 1],
+            ['Angola', 'Japan', 3],
+            ['Senegal', 'China', 5],
+            ['Senegal', 'India', 1],
+            ['Senegal', 'Japan', 3],
+            ['Mali', 'China', 5],
+            ['Mali', 'India', 1],
+            ['Mali', 'Japan', 3],
+            ['Morocco', 'China', 5],
+            ['Morocco', 'India', 1],
+            ['Morocco', 'Japan', 3],
+            ['Japan', 'Brazil', 1]
+          ],
+          type: 'dependencywheel',
+          name: 'Dependency wheel series',
+          dataLabels: {
+            color: '#333',
+            textPath: {
+              enabled: true,
+              attributes: {
+                dy: 5
+              }
+            },
+            distance: 10
+          },
+          size: '95%'
+        }]
+      }
+    };
+  },
+  methods: {
+    setChart() {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = Highcharts.chart('cateRank',this.option);
+        // 初始化雷达图
+        // this.chartObj = chartObj;
+        // this.chartObj.setOption(this.option);
+      });
+    },
+  },
+  watch: {
+  },
+  mounted() {
+  },
+};
+</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>

+ 54 - 8
src/components/pages/dataBoardNew/project/chartList/teaFre.vue

@@ -12,6 +12,12 @@
 
 <script>
 export default {
+  props: {
+    monthArray: {
+      type: Array,
+      default: [],
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -21,18 +27,19 @@ export default {
       },
       option: {
         tooltip: {
-          trigger: "item",
+          trigger: "axis",
         },
         xAxis: {
           type: "category",
-          boundaryGap: false,
-          data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+          boundaryGap: true,
+          // data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
         },
         yAxis: {
           type: "value",
+          minInterval: 1
         },
         grid: {
-          top: "15%",
+          top: "5%",
           left: "5%",
           right: "5%",
           bottom: "5%",
@@ -40,16 +47,24 @@ export default {
         },
         series: [
           {
-            data: [820, 932, 901, 934, 1290, 1330, 1320],
+            // data: [820, 932, 901, 934, 1290, 1330, 1320],
+            data: [],
             type: "line",
             areaStyle: {},
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return "#106bff";
+                },
+              },
+            },
           },
         ],
       },
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -59,15 +74,46 @@ export default {
         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);
       });
     },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        course: [],
+      }
+      let _array = array
+      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);
+      }
+    }
+  },
+  watch: {
+    monthArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
   },
-  watch: {},
   mounted() {
-    this.setChart();
+    this.setJson(this.monthArray)
+
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

+ 44 - 14
src/components/pages/dataBoardNew/project/chartList/toolChart.vue

@@ -12,40 +12,54 @@
 
 <script>
 export default {
+  props: {
+    toolArray: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
-      ooption: {
-        data: [],
-      },
       option: {
         tooltip: {
           trigger: "item",
         },
+        grid: {
+          left: 0,
+          right: 0,
+          bottom: 0,
+          containLabel: true,
+        },
         series: [
           {
             type: "pie",
-            radius: '50%',
-            avoidLabelOverlap: true,
+            radius: ["40%", "70%"],
             emphasis: {
               label: {
                 show: true,
-                fontSize: 16,
+                fontSize: 14,
                 fontWeight: "bold",
               },
             },
-            data: [
-              { value: 100, name: "思维类" },
-              { value: 150, name: "学科类" },
-              { value: 223, name: "编程类" }
-            ],
+            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() {
+    setChart(arrArray) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -53,9 +67,9 @@ export default {
       //然后异步执行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);
@@ -63,9 +77,25 @@ export default {
     },
   },
   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() {
-    this.setChart();
+    let _array = this.toolArray;
+    this.setChart(_array);
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

+ 127 - 235
src/components/pages/dataBoardNew/project/chartList/toolUse.vue

@@ -1,275 +1,117 @@
 <template>
   <div class="data_body">
     <div style="width: 100%; height: 100%">
-      <div
-        id="charts_canvas"
-        class="echart"
-        style="width: 100%; height: 100%"
-      ></div>
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
     </div>
   </div>
 </template>
 
 <script>
 export default {
+  props: {
+    worksYearArray: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
+      ooption: {
+        xdata: [],
+        sdata: [],
+      },
       option: {
+        // title: {
+        //   text: '登录频次',
+        //   textStyle: {
+        //     fontSize: 12,
+        //   },
+        //   padding: [10, 0, 0, 10]
+        // },
         tooltip: {
-          position: "top",
+          position: 'top'
         },
         grid: {
-          height: "50%",
-          top: "10%",
+          top: '50',
+          left: '5%',
+          right: '5%',
+          bottom: '5%',
+          containLabel: true
         },
         xAxis: {
-          type: "category",
-          data: [
-            "12a",
-            "1a",
-            "2a",
-            "3a",
-            "4a",
-            "5a",
-            "6a",
-            "7a",
-            "8a",
-            "9a",
-            "10a",
-            "11a",
-            "12p",
-            "1p",
-            "2p",
-            "3p",
-            "4p",
-            "5p",
-            "6p",
-            "7p",
-            "8p",
-            "9p",
-            "10p",
-            "11p",
-          ],
+          type: 'category',
+          // data: [
+          //     '1月', '2月', '3月', '4月', '5月', '6月', '7月',
+          //     '8月', '9月', '10月', '11月', '12月'
+          // ],
+          data: [],
           splitArea: {
-            show: true,
+            show: true
           },
+          axisLabel: {
+            formatter: function (value) {
+              console.log(value);
+              var ret = "";//拼接加\n返回的类目项  
+              var maxLength = 2;//每项显示文字个数  
+              var valLength = value.length;//X轴类目项的文字个数  
+              var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数  
+              if (rowN > 1)//如果类目项的文字大于5,  
+              {
+                for (var i = 0; i < rowN; i++) {
+                  var temp = "";//每次截取的字符串  
+                  var start = i * maxLength;//开始截取的位置  
+                  var end = start + maxLength;//结束截取的位置  
+                  //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧  
+                  temp = value.substring(start, end) + "\n";
+                  ret += temp; //凭借最终的字符串  
+                }
+                return ret;
+              }
+              else {
+                return value;
+              }
+            }
+          }
         },
         yAxis: {
-          type: "category",
+          type: 'category',
           data: [
-            "星期一",
-            "星期二",
-            "星期三",
-            "星期四",
-            "星期五",
-            "星期六",
-            "星期日",
+            '星期天', '星期一', '星期二', '星期三',
+            '星期四', '星期五', '星期六',
           ],
           splitArea: {
-            show: true,
+            show: true
           },
         },
         visualMap: {
           min: 0,
           max: 10,
           calculable: true,
-          orient: "horizontal",
-          left: "center",
-          bottom: "15%",
+          orient: 'horizontal',
+          right: '10',
+          top: '0%'
         },
         series: [
           {
-            name: "Punch Card",
-            type: "heatmap",
-            data: [
-              [0, 0, 5],
-              [0, 1, 1],
-              [0, 2, 0],
-              [0, 3, 0],
-              [0, 4, 0],
-              [0, 5, 0],
-              [0, 6, 0],
-              [0, 7, 0],
-              [0, 8, 0],
-              [0, 9, 0],
-              [0, 10, 0],
-              [0, 11, 2],
-              [0, 12, 4],
-              [0, 13, 1],
-              [0, 14, 1],
-              [0, 15, 3],
-              [0, 16, 4],
-              [0, 17, 6],
-              [0, 18, 4],
-              [0, 19, 4],
-              [0, 20, 3],
-              [0, 21, 3],
-              [0, 22, 2],
-              [0, 23, 5],
-              [1, 0, 7],
-              [1, 1, 0],
-              [1, 2, 0],
-              [1, 3, 0],
-              [1, 4, 0],
-              [1, 5, 0],
-              [1, 6, 0],
-              [1, 7, 0],
-              [1, 8, 0],
-              [1, 9, 0],
-              [1, 10, 5],
-              [1, 11, 2],
-              [1, 12, 2],
-              [1, 13, 6],
-              [1, 14, 9],
-              [1, 15, 11],
-              [1, 16, 6],
-              [1, 17, 7],
-              [1, 18, 8],
-              [1, 19, 12],
-              [1, 20, 5],
-              [1, 21, 5],
-              [1, 22, 7],
-              [1, 23, 2],
-              [2, 0, 1],
-              [2, 1, 1],
-              [2, 2, 0],
-              [2, 3, 0],
-              [2, 4, 0],
-              [2, 5, 0],
-              [2, 6, 0],
-              [2, 7, 0],
-              [2, 8, 0],
-              [2, 9, 0],
-              [2, 10, 3],
-              [2, 11, 2],
-              [2, 12, 1],
-              [2, 13, 9],
-              [2, 14, 8],
-              [2, 15, 10],
-              [2, 16, 6],
-              [2, 17, 5],
-              [2, 18, 5],
-              [2, 19, 5],
-              [2, 20, 7],
-              [2, 21, 4],
-              [2, 22, 2],
-              [2, 23, 4],
-              [3, 0, 7],
-              [3, 1, 3],
-              [3, 2, 0],
-              [3, 3, 0],
-              [3, 4, 0],
-              [3, 5, 0],
-              [3, 6, 0],
-              [3, 7, 0],
-              [3, 8, 1],
-              [3, 9, 0],
-              [3, 10, 5],
-              [3, 11, 4],
-              [3, 12, 7],
-              [3, 13, 14],
-              [3, 14, 13],
-              [3, 15, 12],
-              [3, 16, 9],
-              [3, 17, 5],
-              [3, 18, 5],
-              [3, 19, 10],
-              [3, 20, 6],
-              [3, 21, 4],
-              [3, 22, 4],
-              [3, 23, 1],
-              [4, 0, 1],
-              [4, 1, 3],
-              [4, 2, 0],
-              [4, 3, 0],
-              [4, 4, 0],
-              [4, 5, 1],
-              [4, 6, 0],
-              [4, 7, 0],
-              [4, 8, 0],
-              [4, 9, 2],
-              [4, 10, 4],
-              [4, 11, 4],
-              [4, 12, 2],
-              [4, 13, 4],
-              [4, 14, 4],
-              [4, 15, 14],
-              [4, 16, 12],
-              [4, 17, 1],
-              [4, 18, 8],
-              [4, 19, 5],
-              [4, 20, 3],
-              [4, 21, 7],
-              [4, 22, 3],
-              [4, 23, 0],
-              [5, 0, 2],
-              [5, 1, 1],
-              [5, 2, 0],
-              [5, 3, 3],
-              [5, 4, 0],
-              [5, 5, 0],
-              [5, 6, 0],
-              [5, 7, 0],
-              [5, 8, 2],
-              [5, 9, 0],
-              [5, 10, 4],
-              [5, 11, 1],
-              [5, 12, 5],
-              [5, 13, 10],
-              [5, 14, 5],
-              [5, 15, 7],
-              [5, 16, 11],
-              [5, 17, 6],
-              [5, 18, 0],
-              [5, 19, 5],
-              [5, 20, 3],
-              [5, 21, 4],
-              [5, 22, 2],
-              [5, 23, 0],
-              [6, 0, 1],
-              [6, 1, 0],
-              [6, 2, 0],
-              [6, 3, 0],
-              [6, 4, 0],
-              [6, 5, 0],
-              [6, 6, 0],
-              [6, 7, 0],
-              [6, 8, 0],
-              [6, 9, 0],
-              [6, 10, 1],
-              [6, 11, 0],
-              [6, 12, 2],
-              [6, 13, 1],
-              [6, 14, 3],
-              [6, 15, 4],
-              [6, 16, 0],
-              [6, 17, 0],
-              [6, 18, 0],
-              [6, 19, 0],
-              [6, 20, 1],
-              [6, 21, 2],
-              [6, 22, 2],
-              [6, 23, 6],
-            ].map(function (item) {
-              return [item[1], item[0], item[2] || "-"];
-            }),
+            name: '',
+            type: 'heatmap',
+            data: [],
             label: {
-              show: true,
+              show: true
             },
             emphasis: {
               itemStyle: {
                 shadowBlur: 10,
-                shadowColor: "rgba(0, 0, 0, 0.5)",
-              },
-            },
-          },
-        ],
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
+              }
+            }
+          }
+        ]
       },
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -277,18 +119,70 @@ export default {
       //然后异步执行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);
       });
     },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        sdata: [],
+        max: 0
+      }
+      let _array = array
+      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);
+      }
+    }
+  },
+  watch: {
+    worksYearArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
   },
-  watch: {},
   mounted() {
-    this.setChart();
-    var _this = this;
+    this.setJson(this.worksYearArray)
+
     window.addEventListener("resize", () => {
       if (_this.chartObj) {
         _this.chartObj.resize();
@@ -301,14 +195,12 @@ export default {
 <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>
+</style>

+ 70 - 36
src/components/pages/dataBoardNew/project/chartList/workNum.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="data_body" style="height: calc(100% - 170px)">
+  <div class="data_body">
     <div style="width: 100%; height: 100%">
       <div
         id="charts_canvas"
@@ -12,6 +12,11 @@
 
 <script>
 export default {
+  props: {
+    workNumList: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -19,38 +24,43 @@ export default {
         data: [],
       },
       option: {
+        xAxis: {
+          name: "任务数量",
+          nameTextStyle: {
+            padding: [25, 0, 0, 0],
+            verticalAlign:'top'
+          },
+          nameGap: -45
+        },
+        grid: {
+          top: "25%",
+          left: "5%",
+          right: "5%",
+          bottom: "15%",
+          containLabel: true,
+        },
+        yAxis: {
+          name: "作业提交数量",
+        },
+        color: ["#3681FC"],
         tooltip: {
-          trigger: "item",
+          formatter: function (params) {
+            return (
+              params.marker +
+              params.data[2] +
+              "<br/>" +
+              "任务数量:" +
+              params.data[0] +
+              "<br/>" +
+              "作业提交数量:" +
+              params.data[1]
+            );
+          },
         },
-        xAxis: {},
-        yAxis: {},
         series: [
           {
-            symbolSize: 20,
-            data: [
-              [10.0, 8.04],
-              [8.07, 6.95],
-              [13.0, 7.58],
-              [9.05, 8.81],
-              [11.0, 8.33],
-              [14.0, 7.66],
-              [13.4, 6.81],
-              [10.0, 6.33],
-              [14.0, 8.96],
-              [12.5, 6.82],
-              [9.15, 7.2],
-              [11.5, 7.2],
-              [3.03, 4.23],
-              [12.2, 7.83],
-              [2.02, 4.47],
-              [1.05, 3.33],
-              [4.05, 4.96],
-              [6.03, 7.24],
-              [12.0, 6.26],
-              [12.0, 8.84],
-              [7.08, 5.82],
-              [5.02, 5.68],
-            ],
+            symbolSize: 8,
+            data: [],
             type: "scatter",
           },
         ],
@@ -58,7 +68,7 @@ export default {
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -69,23 +79,47 @@ export default {
           //劳动课程
           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]);
+        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.setChart();
+    this.setArray(this.workNumList);
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

+ 44 - 15
src/components/pages/dataBoardNew/project/chartList/workTime.vue

@@ -12,41 +12,54 @@
 
 <script>
 export default {
+  props: {
+    personArray: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
-      ooption: {
-        data: [],
-      },
       option: {
         tooltip: {
           trigger: "item",
         },
+        grid: {
+          left: 0,
+          right: 0,
+          bottom: 0,
+          containLabel: true,
+        },
         series: [
           {
             type: "pie",
-            radius: '50%',
-            avoidLabelOverlap: true,
+            radius: ["40%", "70%"],
             emphasis: {
               label: {
                 show: true,
-                fontSize: 16,
+                fontSize: 14,
                 fontWeight: "bold",
               },
             },
-            data: [
-              { value: 100, name: "2人以下" },
-              { value: 150, name: "3-4人" },
-              { value: 223, name: "5-6人" },
-              { value: 216, name: "7人以上" }
-            ],
+            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() {
+    setChart(arrArray) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -54,9 +67,9 @@ export default {
       //然后异步执行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);
@@ -64,9 +77,25 @@ export default {
     },
   },
   watch: {
+    personArray: {
+      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() {
-    this.setChart();
+    let _array = this.personArray;
+    this.setChart(_array);
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 538 - 177
src/components/pages/dataBoardNew/project/index.vue


+ 2 - 2
src/components/pages/dataBoardNew/school/bar/index.vue

@@ -26,10 +26,10 @@ export default {
           formatter: "{b}   {c}(小时)",
         },
         grid: {
-          top: '5%',
+          top: '15%',
           left: '5%',
           right: '5%',
-          bottom: '5%',
+          bottom: '15%',
           containLabel: true
         },
         xAxis: {

+ 209 - 0
src/components/pages/dataBoardNew/school/barToolUser/index.vue

@@ -0,0 +1,209 @@
+<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: {
+        // title: {
+        //   text: '登录频次',
+        //   textStyle: {
+        //     fontSize: 12,
+        //   },
+        //   padding: [10, 0, 0, 10]
+        // },
+        tooltip: {
+          position: 'top',
+          formatter: function(params){
+            return params.name + '  ' + params.data[2] + '(小时)';
+          }
+        },
+        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
+          },
+          axisLabel: {
+            formatter: function (value) {
+              console.log(value);
+              var ret = "";//拼接加\n返回的类目项  
+              var maxLength = 2;//每项显示文字个数  
+              var valLength = value.length;//X轴类目项的文字个数  
+              var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数  
+              if (rowN > 1)//如果类目项的文字大于5,  
+              {
+                for (var i = 0; i < rowN; i++) {
+                  var temp = "";//每次截取的字符串  
+                  var start = i * maxLength;//开始截取的位置  
+                  var end = start + maxLength;//结束截取的位置  
+                  //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧  
+                  temp = value.substring(start, end) + "\n";
+                  ret += temp; //凭借最终的字符串  
+                }
+                return ret;
+              }
+              else {
+                return value;
+              }
+            }
+          }
+        },
+        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);
+      });
+    },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        sdata: [],
+        max: 0
+      }
+      let _array = array
+      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);
+      }
+    }
+  },
+  watch: {
+    yearArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setJson(this.yearArray)
+
+    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>

+ 67 - 47
src/components/pages/dataBoardNew/school/cateRank/index.vue

@@ -20,6 +20,11 @@ export default {
   components: {
     highcharts: Chart,
   },
+  props: {
+    resultSubject: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -36,53 +41,53 @@ export default {
         series: [{
           keys: ['from', 'to', 'weight'],
           data: [
-            ['Brazil', 'Portugal', 5],
-            ['Brazil', 'France', 1],
-            ['Brazil', 'Spain', 1],
-            ['Brazil', 'England', 1],
-            ['Canada', 'Portugal', 1],
-            ['Canada', 'France', 5],
-            ['Canada', 'England', 1],
-            ['Mexico', 'Portugal', 1],
-            ['Mexico', 'France', 1],
-            ['Mexico', 'Spain', 5],
-            ['Mexico', 'England', 1],
-            ['USA', 'Portugal', 1],
-            ['USA', 'France', 1],
-            ['USA', 'Spain', 1],
-            ['USA', 'England', 5],
-            ['Portugal', 'Angola', 2],
-            ['Portugal', 'Senegal', 1],
-            ['Portugal', 'Morocco', 1],
-            ['Portugal', 'South Africa', 3],
-            ['France', 'Angola', 1],
-            ['France', 'Senegal', 3],
-            ['France', 'Mali', 3],
-            ['France', 'Morocco', 3],
-            ['France', 'South Africa', 1],
-            ['Spain', 'Senegal', 1],
-            ['Spain', 'Morocco', 3],
-            ['Spain', 'South Africa', 1],
-            ['England', 'Angola', 1],
-            ['England', 'Senegal', 1],
-            ['England', 'Morocco', 2],
-            ['England', 'South Africa', 7],
-            ['South Africa', 'China', 5],
-            ['South Africa', 'India', 1],
-            ['South Africa', 'Japan', 3],
-            ['Angola', 'China', 5],
-            ['Angola', 'India', 1],
-            ['Angola', 'Japan', 3],
-            ['Senegal', 'China', 5],
-            ['Senegal', 'India', 1],
-            ['Senegal', 'Japan', 3],
-            ['Mali', 'China', 5],
-            ['Mali', 'India', 1],
-            ['Mali', 'Japan', 3],
-            ['Morocco', 'China', 5],
-            ['Morocco', 'India', 1],
-            ['Morocco', 'Japan', 3],
-            ['Japan', 'Brazil', 1]
+            // ['Brazil', 'Portugal', 5],
+            // ['Brazil', 'France', 1],
+            // ['Brazil', 'Spain', 1],
+            // ['Brazil', 'England', 1],
+            // ['Canada', 'Portugal', 1],
+            // ['Canada', 'France', 5],
+            // ['Canada', 'England', 1],
+            // ['Mexico', 'Portugal', 1],
+            // ['Mexico', 'France', 1],
+            // ['Mexico', 'Spain', 5],
+            // ['Mexico', 'England', 1],
+            // ['USA', 'Portugal', 1],
+            // ['USA', 'France', 1],
+            // ['USA', 'Spain', 1],
+            // ['USA', 'England', 5],
+            // ['Portugal', 'Angola', 2],
+            // ['Portugal', 'Senegal', 1],
+            // ['Portugal', 'Morocco', 1],
+            // ['Portugal', 'South Africa', 3],
+            // ['France', 'Angola', 1],
+            // ['France', 'Senegal', 3],
+            // ['France', 'Mali', 3],
+            // ['France', 'Morocco', 3],
+            // ['France', 'South Africa', 1],
+            // ['Spain', 'Senegal', 1],
+            // ['Spain', 'Morocco', 3],
+            // ['Spain', 'South Africa', 1],
+            // ['England', 'Angola', 1],
+            // ['England', 'Senegal', 1],
+            // ['England', 'Morocco', 2],
+            // ['England', 'South Africa', 7],
+            // ['South Africa', 'China', 5],
+            // ['South Africa', 'India', 1],
+            // ['South Africa', 'Japan', 3],
+            // ['Angola', 'China', 5],
+            // ['Angola', 'India', 1],
+            // ['Angola', 'Japan', 3],
+            // ['Senegal', 'China', 5],
+            // ['Senegal', 'India', 1],
+            // ['Senegal', 'Japan', 3],
+            // ['Mali', 'China', 5],
+            // ['Mali', 'India', 1],
+            // ['Mali', 'Japan', 3],
+            // ['Morocco', 'China', 5],
+            // ['Morocco', 'India', 1],
+            // ['Morocco', 'Japan', 3],
+            // ['Japan', 'Brazil', 1]
           ],
           type: 'dependencywheel',
           name: 'Dependency wheel series',
@@ -115,10 +120,25 @@ export default {
         // this.chartObj.setOption(this.option);
       });
     },
+    setArray(array) {
+      this.option.series[0].data = array
+
+    }
   },
   watch: {
+    resultSubject: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
   },
   mounted() {
+    this.setArray(this.resultSubject)
+    // this.setChart();
+
   },
 };
 </script>

+ 20 - 3
src/components/pages/dataBoardNew/school/courseNum/index.vue

@@ -67,17 +67,34 @@ export default {
           column: {
             grouping: false,
             shadow: false,
-            borderWidth: 0
+            borderWidth: 0,
+            dataLabels: {
+              enabled: true,  //显示数量提示
+              color: '#000000',
+              formatter : function() {
+                var employee = this.point.series.chart.series[0].yData[this.point.index];
+                var optimizedEmployee = this.point.series.chart.series[1].yData[this.point.index];
+                var employeePercentage = 0;
+                if(optimizedEmployee > employee){
+                  employeePercentage = ((optimizedEmployee - employee) / optimizedEmployee) * 100
+                }
+                if (this.series.name === '本月课程总数') {
+                  return  employeePercentage.toFixed(1) + '%';
+                } else {
+                  return '';
+                }
+              }
+            }
           }
         },
         series: [{
-          name: '上周课程总数',
+          name: '上课程总数',
           color: 'rgba(165,170,217,1)',
           data: [],
           pointPadding: 0.3, // 通过 pointPadding 和 pointPlacement 控制柱子位置
           // pointPlacement: -0.2
         }, {
-          name: '本周课程总数',
+          name: '本课程总数',
           color: 'rgba(126,86,134,.9)',
           data: [],
           pointPadding: 0.4,

+ 244 - 67
src/components/pages/dataBoardNew/school/index.vue

@@ -16,12 +16,11 @@
               <span>{{ allUser }}</span>
             </div>
             <div class="info blueBG">
-              <span>本月登录用户环比</span>
+              <span>本月新增登录用户</span>
               <span v-if="loginCountMonthArray.length">{{ (loginCountMonthArray[loginCountMonthArray.length - 1].user -
                 loginCountMonthArray[loginCountMonthArray.length - 2].user) < 0 ? 0 :
-                ((loginCountMonthArray[loginCountMonthArray.length - 1].user -
-                  loginCountMonthArray[loginCountMonthArray.length - 2].user) /
-                  loginCountMonthArray[loginCountMonthArray.length - 2].user) * 100 + '%' }}</span>
+                loginCountMonthArray[loginCountMonthArray.length - 1].user -
+                loginCountMonthArray[loginCountMonthArray.length - 2].user }}</span>
             </div>
             <div class="info blueBG">
               <span>本月登录用户总数</span>
@@ -29,11 +28,15 @@
               }}</span>
             </div>
             <div class="info blueBG">
-              <span>本月新增登录用户</span>
-              <span v-if="loginCountMonthArray.length">{{ (loginCountMonthArray[loginCountMonthArray.length - 1].user -
+              <span>月登录环比</span>
+              <span v-if="loginCountMonthArray.length">{{ (loginCountMonthArray[loginCountMonthArray.length - 1].user) > 0
+                ? (((loginCountMonthArray[loginCountMonthArray.length - 1].user) / allUser) * 100).toFixed(0) + '%' : 0
+              }}</span>
+              <!-- <span v-if="loginCountMonthArray.length">{{ (loginCountMonthArray[loginCountMonthArray.length - 1].user -
                 loginCountMonthArray[loginCountMonthArray.length - 2].user) < 0 ? 0 :
-                loginCountMonthArray[loginCountMonthArray.length - 1].user -
-                loginCountMonthArray[loginCountMonthArray.length - 2].user }}</span>
+                (((loginCountMonthArray[loginCountMonthArray.length - 1].user -
+                  loginCountMonthArray[loginCountMonthArray.length - 2].user) /
+                  loginCountMonthArray[loginCountMonthArray.length - 2].user) * 100).toFixed(0) + '%' }}</span> -->
             </div>
           </div>
           <loginCount style="height: calc(100% - 140px)" :monthArray="loginCountMonthArray"></loginCount>
@@ -81,16 +84,31 @@
             <span>{{ userOnlineTime > 0 ? (userOnlineTime / allUser).toFixed(0) : 0 }}</span>
           </div>
         </div>
-        <div class="dataBox" style="height: calc(100% - 115px);">
-          <toolUser style="height: calc(100%)" v-if="skType == 1" :yearArray="loginCountYearArray"></toolUser>
-          <bar style="height: calc(100%)" v-if="skType == 0" :loginArray="[teacherOnlineTime, studentOnlineTime]"></bar>
-          <!-- <div class="otherCss">
-            <div v-if="!oType">切换为柱状图</div>
-            <div v-if="oType">切换为热力图</div>
+        <div class="dataBox" style="height: calc(100% - 135px);">
+          <!-- 登录频次热力图 -->
+          <toolUser style="height: calc(100%)" v-if="skType == 1 && !oType1" :yearArray="loginCountYearArray"></toolUser>
+          <!-- 登录频次柱状图 -->
+          <toolUserBar style="height: calc(100%)" v-if="skType == 1 && oType1"
+            :loginArray="[teacherLoginCount, studentLoginCount]"></toolUserBar>
+          <!-- 在线时长柱状图 -->
+          <!-- <bar style="height: calc(100%)" v-if="skType == 0 && !oType" :loginArray="[teacherOnlineTime, studentOnlineTime]"></bar> -->
+          <loginTime style="height: calc(100%)" v-if="skType == 0 && !oType" :yearArray="userOnlineTime"></loginTime>
+          <!-- 在线时长热力图 -->
+          <barToolUser style="height: calc(100%)" v-if="skType == 0 && oType" :yearArray="allTimeYearArray"></barToolUser>
+          <div class="otherCss" v-if="skType == 0">
+            <div v-if="!oType">切换为热力图</div>
+            <div v-if="oType">切换为仪表盘</div>
             <div class="otherImg" @click="otherEchart">
               <img src="../../../../assets/icon/other.png" alt="" />
             </div>
-          </div> -->
+          </div>
+          <div class="otherCss" v-if="skType == 1">
+            <div v-if="!oType1">切换为柱状图</div>
+            <div v-if="oType1">切换为热力图</div>
+            <div class="otherImg" @click="otherEchart1">
+              <img src="../../../../assets/icon/other.png" alt="" />
+            </div>
+          </div>
         </div>
       </div>
     </div>
@@ -152,7 +170,7 @@
                 <span>{{ isCourseCount ? (workCount / isCourseCount).toFixed(0) : 0 }}</span>
               </div>
             </div>
-            <workNum style="height:calc(100% - 70px)" :workNumList="workNumList"></workNum>
+            <workNum style="height:calc(100% - 70px)" :workNumList="workNumList" @openCourse="openCourse"></workNum>
           </div>
         </div>
       </div>
@@ -161,11 +179,11 @@
           <div class="title">平台使用概况</div>
           <div class="tCircleC">
             <div class="tCircleBox">
-              <span class="tCircle tt"></span>
+              <span class="tCircle ts"></span>
               <span class="tname">老师</span>
             </div>
             <div class="tCircleBox">
-              <span class="tCircle ts"></span>
+              <span class="tCircle tt"></span>
               <span class="tname">学生</span>
             </div>
           </div>
@@ -182,7 +200,7 @@
               <div>
                 <el-progress :width="80" type="circle"
                   :percentage="lightJson.upCourseTeachers ? parseInt((lightJson.upCourseTeachers / lightJson.teachers * 100).toFixed(0)) : 0"
-                  :stroke-width="5" :format="format" color="rgb(64, 149, 229)"></el-progress>
+                  :stroke-width="5" :format="format" color="#106BFF"></el-progress>
               </div>
             </div>
             <div class="depth">
@@ -190,7 +208,7 @@
               <div>
                 <el-progress :width="80" type="circle"
                   :percentage="lightJson.upSCourseTeachers ? parseInt((lightJson.upSCourseTeachers / lightJson.teachers * 100).toFixed(0)) : 0"
-                  :stroke-width="5" :format="format" color="rgb(64, 149, 229)"></el-progress>
+                  :stroke-width="5" :format="format" color="#106BFF"></el-progress>
               </div>
             </div>
             <div class="depth">
@@ -198,7 +216,7 @@
               <div>
                 <el-progress :width="80" type="circle"
                   :percentage="lightJson.toolTeachers ? parseInt((lightJson.toolTeachers / lightJson.teachers * 100).toFixed(0)) : 0"
-                  :stroke-width="5" :format="format" color="rgb(64, 149, 229)"></el-progress>
+                  :stroke-width="5" :format="format" color="#106BFF"></el-progress>
               </div>
             </div>
             <div class="depth">
@@ -206,7 +224,7 @@
               <div>
                 <el-progress :width="80" type="circle"
                   :percentage="lightJson.gCourseTeachers ? parseInt((lightJson.gCourseTeachers / lightJson.teachers * 100).toFixed(0)) : 0"
-                  :stroke-width="5" :format="format" color="rgb(64, 149, 229)"></el-progress>
+                  :stroke-width="5" :format="format" color="#106BFF"></el-progress>
               </div>
             </div>
             <div class="depth">
@@ -214,7 +232,7 @@
               <div>
                 <el-progress :width="80" type="circle"
                   :percentage="lightJson.commentTeachers ? parseInt((lightJson.commentTeachers / lightJson.teachers * 100).toFixed(0)) : 0"
-                  :stroke-width="5" :format="format" color="rgb(64, 149, 229)"></el-progress>
+                  :stroke-width="5" :format="format" color="#106BFF"></el-progress>
               </div>
             </div>
             <div class="depth">
@@ -222,7 +240,7 @@
               <div>
                 <el-progress :width="80" type="circle"
                   :percentage="lightJson.courseStudents ? parseInt((lightJson.courseStudents / lightJson.students * 100).toFixed(0)) : 0"
-                  :stroke-width="5" :format="format" color="#106BFF"></el-progress>
+                  :stroke-width="5" :format="format" color="#53c95f"></el-progress>
               </div>
             </div>
             <div class="depth">
@@ -230,7 +248,7 @@
               <div>
                 <el-progress :width="80" type="circle"
                   :percentage="lightJson.scourseStudents ? parseInt((lightJson.scourseStudents / lightJson.students * 100).toFixed(0)) : 0"
-                  :stroke-width="5" :format="format" color="#106BFF"></el-progress>
+                  :stroke-width="5" :format="format" color="#53c95f"></el-progress>
               </div>
             </div>
             <div class="depth">
@@ -238,7 +256,7 @@
               <div>
                 <el-progress :width="80" type="circle"
                   :percentage="lightJson.toolStudents ? parseInt((lightJson.toolStudents / lightJson.students * 100).toFixed(0)) : 0"
-                  :stroke-width="5" :format="format" color="#106BFF"></el-progress>
+                  :stroke-width="5" :format="format" color="#53c95f"></el-progress>
               </div>
             </div>
             <div class="depth">
@@ -246,7 +264,7 @@
               <div>
                 <el-progress :width="80" type="circle"
                   :percentage="lightJson.gsCourseStudents ? parseInt((lightJson.gsCourseStudents / lightJson.students * 100).toFixed(0)) : 0"
-                  :stroke-width="5" :format="format" color="#106BFF"></el-progress>
+                  :stroke-width="5" :format="format" color="#53c95f"></el-progress>
               </div>
             </div>
             <div class="depth">
@@ -254,7 +272,7 @@
               <div>
                 <el-progress :width="80" type="circle"
                   :percentage="lightJson.commentStudents ? parseInt((lightJson.commentStudents / lightJson.students * 100).toFixed(0)) : 0"
-                  :stroke-width="5" :format="format" color="#106BFF"></el-progress>
+                  :stroke-width="5" :format="format" color="#53c95f"></el-progress>
               </div>
             </div>
           </div>
@@ -279,7 +297,7 @@
               align-items: center;
             ">
             <el-select v-model="cType" @change="typeChange" class="selectBox">
-              <el-option label="全部" value=""></el-option>
+              <!-- <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>
@@ -299,12 +317,12 @@
       <div class="bottom">
         <div class="titleBox" style="justify-content: space-between">
           <div class="title">跨学科教学情况</div>
-          <el-select v-model="cType6" class="selectBox" style="width: 110px">
+          <!-- <el-select v-model="cType6" class="selectBox" style="width: 110px">
             <el-option label="全部" value="全部"></el-option>
-          </el-select>
+          </el-select> -->
         </div>
         <div class="dataBox">
-          <cateRank style="height: calc(100%)"></cateRank>
+          <cateRank style="height: calc(100%)" :resultSubject="resultSubject"></cateRank>
         </div>
       </div>
     </div>
@@ -320,6 +338,9 @@ import toolUser from "./toolUser";
 import bar from "./bar";
 import courseNum from "./courseNum";
 import workNum from "./workNum";
+import barToolUser from "./barToolUser";
+import toolUserBar from "./toolUserBar";
+import loginTime from "./loginTime";
 
 
 
@@ -333,6 +354,9 @@ export default {
     bar,
     courseNum,
     workNum,
+    barToolUser,
+    toolUserBar,
+    loginTime
   },
   props: {
     oid: {
@@ -345,7 +369,7 @@ export default {
   data() {
     return {
       isLoading: false,
-      cType: "",
+      cType: "grade",
       cType1: "全部年级",
       cType2: "全部活动",
       cType3: "按年级",
@@ -356,12 +380,13 @@ export default {
       tType: 0,
       courseType: 0,
       oType: false,
+      oType1: false,
       shType: false,
       allUser: 0,
       loginCountMonthArray: [],
       countLogin: 0,
       loginCountYearArray: [],
-      userOnlineTime: [],
+      userOnlineTime: '',
       teacherOnlineTime: [],
       studentOnlineTime: [],
       courseArray: [],
@@ -389,22 +414,76 @@ export default {
         gsCourseStudents: 0,//协同课程
         commentStudents: 0,//协同交流
       },
-      weekCourse2: []
+      weekCourse2: [],
+      allTimeYearArray: [],
+      teacherLoginCount: 0,
+      studentLoginCount: 0,
+      resultSubject: []
     };
   },
   mounted() {
     this.getData();
   },
   methods: {
+    openCourse(cid) {
+      window.parent.postMessage({ cid: cid, screenType: "3" }, "*");
+    },
     otherEchart() {
       this.oType = !this.oType;
     },
+    otherEchart1() {
+      this.oType1 = !this.oType1;
+    },
     shEchart() {
       this.shType = !this.shType;
     },
     format(percentage) {
       return percentage + '%';
     },
+    getMonth() {
+      // 获取当前时间
+      var currentDate = new Date();
+
+      // 获取本月的年份和月份
+      var currentYear = currentDate.getFullYear();
+      var currentMonth = currentDate.getMonth() + 1; // 月份从0开始,需要加1
+
+      // 获取上个月的年份和月份
+      var lastMonthYear, lastMonth;
+      if (currentMonth === 1) {
+        lastMonthYear = currentYear - 1;
+        lastMonth = 12;
+      } else {
+        lastMonthYear = currentYear;
+        lastMonth = currentMonth - 1;
+      }
+      // 获取本月的第一天和最后一天的日期
+      var firstDayOfMonth = new Date(currentYear, currentMonth - 1, 1);
+      var lastDayOfMonth = new Date(currentYear, currentMonth, 0);
+
+      // 获取上个月的第一天和最后一天的日期
+      var firstDayOfLastMonth = new Date(lastMonthYear, lastMonth - 1, 1);
+      var lastDayOfLastMonth = new Date(lastMonthYear, lastMonth, 0);
+
+      // 构建本月日期的数组
+      var currentMonthDates = [];
+      for (var i = 1; i <= lastDayOfMonth.getDate(); i++) {
+        let a = new Date(currentYear, currentMonth - 1, i)
+        currentMonthDates.push(a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate());
+      }
+
+      // 构建上个月日期的数组
+      var lastMonthDates = [];
+      for (var j = firstDayOfLastMonth.getDate(); j <= lastDayOfLastMonth.getDate(); j++) {
+        let a = new Date(lastMonthYear, lastMonth - 1, j)
+        lastMonthDates.push(a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate());
+      }
+
+      return {
+        lastWeek: lastMonthDates,//上月
+        toWeek: currentMonthDates //本月
+      }
+    },
     getData() {
       this.isLoading = true;
       let params = [
@@ -418,7 +497,7 @@ export default {
         .then((res) => {
           this.isLoading = false;
           let _grade = res.data[0]; //年级
-          let _subject = res.data[1]; //学科
+          let _subject = JSON.parse(JSON.stringify(res.data[1])); //学科
           let _theme = res.data[2]; //主题
 
           this.allUser = res.data[3][0].count; //总人数
@@ -503,7 +582,6 @@ export default {
               }
             }
           }
-          console.log(loginCountYearArray);
           this.loginCountYearArray = loginCountYearArray
 
           let _userOnlineTime = res.data[7][0].time;//在线时长 所有用户
@@ -521,7 +599,7 @@ export default {
           let _gradeCourse = 0 //各年级上传课程
           let _subjectCourse = 0 //各学科上传课程
           let _courseArray = []
-          _subject.push({ name: '其他' })
+          // _subject.push({ name: '其他' })
 
           for (var i = 0; i < _grade.length; i++) {
             _courseArray.push({
@@ -555,7 +633,7 @@ export default {
             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
+            // _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++) {
@@ -564,7 +642,6 @@ export default {
               }
             }
           }
-          console.log(_courseArray);
           // this.gradeCourse = _gradeCourse / _grade.length
           // this.subjectCourse = _subjectCourse / _subject.length
           this.courseArray = _courseArray
@@ -691,24 +768,25 @@ export default {
             lastWeek: [],//上周
             toWeek: [] //本周
           }
-          for (var i = 0; i < 14; i++) {
-            let time = JSON.parse(JSON.stringify(lastDayOfWeek))
-            let time2 = new Date(time)
-            var a = new Date(time2.setDate(time2.getDate() - i));
-            if (i > 6) {
-              weekArray.lastWeek.push(a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate());
-            } else {
-              weekArray.toWeek.push(a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate());
-            }
-          }
-          console.log(weekArray);
+          // for (var i = 0; i < 14; i++) {
+          //   let time = JSON.parse(JSON.stringify(lastDayOfWeek))
+          //   let time2 = new Date(time)
+          //   var a = new Date(time2.setDate(time2.getDate() - i));
+          //   if (i > 6) {
+          //     weekArray.lastWeek.push(a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate());
+          //   } else {
+          //     weekArray.toWeek.push(a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate());
+          //   }
+          // }
+
+          weekArray = this.getMonth()
           let weekCourse = [];
           let weekCourse2 = [];
           let lastWeekCouseCount = 0
           let toWeekCouseCount = 0
           for (var z = 0; z < _course.length; z++) {
-            let _date = new Date(weekArray.lastWeek[weekArray.lastWeek.length - 1])
-            console.log(_date)
+            let _date = new Date(weekArray.lastWeek[0])
+            console.log(_date);
             if (new Date(_course[z].create_at) > _date && _course[z].pid == '34628934-d02f-11ec-8c78-005056b86db5') {
               weekCourse.push(_course[z])
               var a = new Date(_course[z].create_at)
@@ -718,6 +796,9 @@ export default {
               } else {
                 toWeekCouseCount++
               }
+              // if (weekArray.toWeek.indexOf(string) == -1) {
+              //   lastWeekCouseCount++
+              // }
             }
           }
 
@@ -745,19 +826,111 @@ export default {
                     toCourseidWeek.push(weekCourse[z].courseid)
                   }
                 }
-
+                // if (weekArray.toWeek.indexOf(string) == -1) {
+                //   weekCourse2[i].lastCourse++
+                //   if (lastCourseidWeek.indexOf(weekCourse[z].courseid) === -1) {
+                //     lastCourseidWeek.push(weekCourse[z].courseid)
+                //   }
+                // } 
+
+                //   weekCourse2[i].toCourse++
+                //   if (toCourseidWeek.indexOf(weekCourse[z].courseid) === -1) {
+                //     toCourseidWeek.push(weekCourse[z].courseid)
+                //   }
               }
             }
           }
-          weekCourse2.push({
-            name: '其他',
-            id: '',
-            lastCourse: (lastWeekCouseCount - lastCourseidWeek.length) > 0 ? (lastWeekCouseCount - lastCourseidWeek.length) : 0,
-            toCourse: (toWeekCouseCount - toCourseidWeek.length) > 0 ? (toWeekCouseCount - toCourseidWeek.length) : 0,
-          })
-
-          console.log(weekCourse2);
+          // weekCourse2.push({
+          //   name: '其他',
+          //   id: '',
+          //   lastCourse: (lastWeekCouseCount - lastCourseidWeek.length) > 0 ? (lastWeekCouseCount - lastCourseidWeek.length) : 0,
+          //   toCourse: (toWeekCouseCount - toCourseidWeek.length) > 0 ? (toWeekCouseCount - toCourseidWeek.length) : 0,
+          // })
+
           this.weekCourse2 = weekCourse2
+
+          let allTimeYear = res.data[26]; //累计时长热力图
+          this.teacherLoginCount = res.data[27].length; //教师登录频次柱状图
+          this.studentLoginCount = res.data[28].length; //学生登录频次柱状图
+
+          let allTimeYearArray = []
+          for (var i = Month; i > Month - 12; i--) {
+            if (i <= 0) {
+              allTimeYearArray.push({
+                Year: Year - 1,
+                Month: 12 + i,
+                mon: 0,
+                tue: 0,
+                wed: 0,
+                thur: 0,
+                fri: 0,
+                sat: 0,
+                sun: 0,
+              })
+            } else {
+              allTimeYearArray.push({
+                Month: i,
+                Year: Year,
+                mon: 0,
+                tue: 0,
+                wed: 0,
+                thur: 0,
+                fri: 0,
+                sat: 0,
+                sun: 0,
+              })
+            }
+          }
+          allTimeYearArray = allTimeYearArray.reverse()
+          for (var i = 0; i < allTimeYear.length; i++) {
+            let _date = new Date(allTimeYear[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 < allTimeYearArray.length; j++) {
+              if (_month == allTimeYearArray[j].Month && _year == allTimeYearArray[j].Year) {
+                allTimeYearArray[j][dayArray[_day]] += parseInt((parseInt(allTimeYear[i].text) / 3600).toFixed(0));
+                break;
+              }
+            }
+          }
+          this.allTimeYearArray = allTimeYearArray
+
+
+          let CourseLabel = res.data[29]; //带分类的课程
+          let _subject2 = JSON.parse(JSON.stringify(res.data[1]))
+          const resultSubject = [];
+          for (let i = 0; i < _subject2.length - 1; i++) {
+            for (let j = i + 1; j < _subject2.length; j++) {
+              resultSubject.push({
+                id: [_subject2[i].id, _subject2[j].id],
+                name: [_subject2[i].name, _subject2[j].name],
+                count: 0,
+              });
+            }
+          }
+
+          for(var i = 0; i < CourseLabel.length; i++){
+            let array = CourseLabel[i].type.split(',');
+            for(var j = 0; j < resultSubject.length; j++){
+              if(this.checkArrayInclusion(resultSubject[j].id, array)){
+                resultSubject[j].count++
+              }
+            }
+          }
+
+          let resultSubject2 = []
+
+          for(var i = 0; i < resultSubject.length; i++){
+            let el = resultSubject[i]
+            if(el.count > 0){
+              resultSubject2.push([el.name[0], el.name[1], el.count])
+            }
+          }
+
+          this.resultSubject = resultSubject2
+          console.log(resultSubject);
           this.$forceUpdate();
         })
         .catch((err) => {
@@ -765,10 +938,14 @@ export default {
           console.error(err);
         });
     },
+    checkArrayInclusion(arr1, arr2) {
+      return arr1.every(item => arr2.includes(item));
+    },
     typeChange() {
-      if (this.cType === '') {
-        this.courseNumberArray = this.allArray
-      } else if (this.cType === 'grade') {
+      // if (this.cType === '') {
+      //   this.courseNumberArray = this.allArray
+      // } else 
+      if (this.cType === 'grade') {
         this.courseNumberArray = this.gradeArray
       } else if (this.cType === 'theme') {
         this.courseNumberArray = this.themeArray
@@ -1031,7 +1208,7 @@ export default {
 .info_box>.info2>span:nth-child(1),
 .info_box>.info3>span:nth-child(1),
 .info_box>.info>span:nth-child(1) {
-  font-size: 14px;
+  font-size: 12px;
   /* margin: 0 0 0 20px; */
   color: #565e6a;
   width: 60px;
@@ -1077,7 +1254,7 @@ export default {
 }
 
 .tCircleBox .tt {
-  background: rgb(64, 149, 229);
+  background: #53c95f;
 }
 
 .tCircleBox .ts {

+ 10 - 8
src/components/pages/dataBoardNew/school/loginCount/index.vue

@@ -24,19 +24,19 @@ export default {
       },
       option: {
         // title: {
-        //     text: '登录频次',
+        //     text: '每月登录用户',
         //     textStyle:{
         //         fontSize: 12,
         //     },
-        //     padding: [0, 0, 0, 10]
+        //     padding: [5, 0, 0, 10]
         // },
         tooltip: {
           trigger: 'axis'
         },
-        // legend: {
-        //     data: ['老师', '学生'],
-        //     right: '10'
-        // },
+        legend: {
+            data: ['登录用户'],
+            right: '10'
+        },
         grid: {
           top: '30',
           left: '5%',
@@ -51,11 +51,13 @@ export default {
           data: []
         },
         yAxis: {
-          type: 'value'
+          name: "人数",
+          type: 'value',
+          minInterval: 1
         },
         series: [
           {
-            // name: '老师',
+            name: '登录用户',
             type: 'line',
             areaStyle: {},
             data: [],

+ 167 - 0
src/components/pages/dataBoardNew/school/loginTime/index.vue

@@ -0,0 +1,167 @@
+<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: String,
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                sdata: [],
+            },
+            option: {
+                series: [
+                    {
+                        type: 'gauge',
+                        startAngle: 180,
+                        endAngle: 0,
+                        center: ['50%', '75%'],
+                        radius: '150%',
+                        min: 0,
+                        max: 4000,
+                        splitNumber: 8,
+                        axisLine: {
+                            lineStyle: {
+                                width: 10,
+                                color: [
+                                    [0.25, 'rgb(251, 223, 148)'],
+                                    [0.5, 'rgb(145, 208, 237)'],
+                                    [0.75, 'rgb(68, 96, 193)'],
+                                    [1, 'rgb(240, 141, 158)']
+                                ]
+                            }
+                        },
+                        pointer: {
+                            icon: 'path://M12.8,0.7l12,40.1H0.7L12.8,0.7z',
+                            length: '12%',
+                            width: 12,
+                            offsetCenter: [0, '-60%'],
+                            itemStyle: {
+                                color: 'auto'
+                            }
+                        },
+                        axisTick: {
+                            length: 6,
+                            lineStyle: {
+                                color: 'auto',
+                                width: 2
+                            }
+                        },
+                        splitLine: {
+                            length: 20,
+                            lineStyle: {
+                                color: 'auto',
+                                width: 5
+                            }
+                        },
+                        axisLabel: {
+                            show:false
+                        },
+                        title:{
+                            show:false
+                        },
+                        title: {
+                            offsetCenter: [0, '10%'],
+                            fontSize: 20
+                        },
+                        detail: {
+                            fontSize: 30,
+                            offsetCenter: [0, '-15%'],
+                            color: 'inherit'
+                        },
+                        data: [
+                            {
+                                value: 0,
+                                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.xAxis.data = option.xdata;
+                this.option.series[0].data[0].value = this.yearArray;
+                // 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
+                if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                } else {
+                    this.option.series[0].data[0].value = this.yearArray;
+                    // this.option.xAxis.data = this.ooption.xdata;
+                    // this.option.series[0].data[0] = this.ooption.sdata;
+                    // this.option.visualMap.max = this.ooption.max ? this.ooption.max : 0;
+                    this.chartObj.setOption(this.option);
+                }
+                this.$forceUpdate();
+            },
+        },
+    },
+    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>
+  

+ 128 - 72
src/components/pages/dataBoardNew/school/teacherInfo/index.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="data_body">
-        <div style="width: 100%; height: 100%">
+        <div style="width: 100%; height: 100%" :style="{ minWidth: ooption.hours.length * 75 + 'px' }">
             <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
         </div>
     </div>
@@ -26,13 +26,59 @@ export default {
                     position: 'top',
                     formatter: function (params) {
                         // console.log(params);
-                        return params.marker + params.name + ' ' + params.data[1];//params.seriesName + '<br>' + params.
+                        return params.marker + params.name + ' ' + params.data[2];//params.seriesName + '<br>' + params.
 
                     }
                 },
-                title: [],
-                singleAxis: [],
-                series: []
+                grid: {
+                    top: '5%',
+                    left: 0,
+                    bottom: '5%',
+                    right: '5%',
+                    containLabel: true
+                },
+                xAxis: {
+                    type: 'category',
+                    data: [],
+                    boundaryGap: false,
+                    splitLine: {
+                        show: true
+                    },
+                    axisLine: {
+                        show: false
+                    }
+                },
+                yAxis: {
+                    type: 'category',
+                    data: [],
+                    axisLine: {
+                        show: false
+                    }
+                },
+                series: [
+                    {
+                        name: 'Punch Card',
+                        type: 'scatter',
+                        symbolSize: function (val) {
+                            return val[2] * 3;
+                        },
+                        data: [],
+                        animationDelay: function (idx) {
+                            return idx * 5;
+                        },
+                        itemStyle: {
+                            color: function(params) {
+                            // 根据行索引设置不同的颜色
+                            var row = params.value[1];
+                            var colorList = ['hsl(170, 80%, 75%)', 'hsl(300, 99%, 70%)', 'hsl(139, 93%, 60%)', 'hsl(56, 73%, 69%)', 'hsl(352, 98%, 69%)', 'hsl(288, 76%, 66%)', 'hsl(167, 89%, 60%)', 'hsl(83, 81%, 74%)', 'hsl(359, 84%, 66%)', 'hsl(208, 96%, 66%)', 'hsl(259, 82%, 62%)', 'hsl(224, 95%, 64%)', 'hsl(119, 89%, 71%)', 'hsl(35, 75%, 70%)', 'hsl(48, 73%, 76%)', 'hsl(10, 73%, 69%)', 'hsl(112, 88%, 71%)', 'hsl(90, 87%, 61%)', 'hsl(37, 83%, 66%)', 'hsl(192, 86%, 72%)'];
+                            return colorList[row % colorList.length];
+                            }
+                        }
+                    }
+                ]
+                // title: [],
+                // singleAxis: [],
+                // series: []
             },
         };
     },
@@ -71,39 +117,44 @@ export default {
                 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
+                // 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.xAxis.data = hours
+                this.option.yAxis.data = days
+                this.option.series[0].data = data.map(function (item) {
+                    return [item[1], item[0], item[2]];
+                })
+                // this.option.title = title
+                // this.option.singleAxis = singleAxis
+                // this.option.series = series
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
@@ -146,40 +197,44 @@ export default {
                     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
+                    // 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.xAxis.data = hours
+                    this.option.yAxis.data = days
+                    this.option.series[0].data = data.map(function (item) {
+                        return [item[1], item[0], item[2]];
+                    })
+                    // this.option.title = title
+                    // this.option.singleAxis = singleAxis
+                    // this.option.series = series
                     this.chartObj.setOption(this.option);
                 }
             }
@@ -223,6 +278,7 @@ export default {
     padding: 0;
     width: 95%;
     background: #fff;
+    overflow: auto;
 }
 </style>
   

+ 120 - 0
src/components/pages/dataBoardNew/school/toolUserBar/index.vue

@@ -0,0 +1,120 @@
+<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: {
+    loginArray: {
+      type: Array
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        xdata: [],
+        type: [],
+      },
+      option: {
+        tooltip: {
+          trigger: "item",
+          formatter: "{b}   {c}(次)",
+        },
+        grid: {
+          top: '15%',
+          left: '5%',
+          right: '5%',
+          bottom: '15%',
+          containLabel: true
+        },
+        xAxis: {
+          type: "category",
+          data: ["老师", "学生"],
+        },
+        yAxis: {
+          type: "value",
+          data: [],
+        },
+        series: [
+          {
+            data: [],
+            barWidth: 30,
+            type: "bar",
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart(array) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.series[0].data = array;
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        sdata: [],
+        max: 0
+      }
+
+      if (!this.chartObj) {
+        this.setChart(array);
+      } else {
+        this.option.series[0].data = array;
+        this.chartObj.setOption(this.option);
+      }
+    }
+  },
+  watch: {
+    loginArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setJson(this.loginArray)
+    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>

+ 127 - 58
src/components/pages/dataBoardNew/student/bar/index.vue

@@ -1,71 +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 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: [],
-        type: [],
+  props: {
+      EloginTimeArray: {
+          type: Array,
       },
-      option: {
-        tooltip: {
-          trigger: "item",
-        },
-        xAxis: {
-          type: "value",
-          data: [0, 50, 100, 150, 200, 250],
-        },
-        yAxis: {
-          type: "category",
-          data: ["五年级", "四年级", "三年级", "二年级", "一年级"],
-        },
-        series: [
-          {
-            data: [120, 200, 150, 80, 70, 110, 130],
-            type: "bar",
+  },
+  data() {
+      return {
+          chartObj: null,
+          ooption: {
+              xdata: [],
+              data: [],
           },
-        ],
-      },
-    };
+          option: {
+              // title: {
+              //     text: '在线时长',
+              //     textStyle: {
+              //         fontSize: 12,
+              //     },
+              //     padding: [5, 0, 0, 10]
+              // },
+              tooltip: {
+                  trigger: "axis",
+                  axisPointer: {
+                      type: "shadow",
+                  },
+              },
+              dataZoom: [
+                  {
+                      // start: 50,
+                      type: 'inside',
+                      yAxisIndex: 0
+                  },
+                  {
+                      type: 'slider',
+                      yAxisIndex: 0
+                  }
+              ],
+              grid: {
+                  top: '5%',
+                  left: '5%',
+                  right: '10%',
+                  bottom: '5%',
+                  containLabel: true
+              },
+              xAxis: {
+                  type: 'value',
+                  boundaryGap: [0, 0.01]
+              },
+
+              yAxis: {
+                  type: 'category',
+                  // data: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
+                  data: []
+              },
+              series: [
+                  {
+                      name: "在线时长(时)",
+                      type: 'bar',
+                      // data: [180, 50, 70, 90, 100, 130],
+                      data: [],
+                      itemStyle: {
+                          normal: {
+                              color: function (params) {
+                                  return "#106bff";
+                              },
+                          },
+                      },
+                  }
+              ]
+          },
+      };
   },
   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);
-      });
-    },
+      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.data;
+              // 初始化雷达图
+              this.chartObj = chartObj;
+              this.chartObj.setOption(this.option);
+          });
+      },
+      setArray(Array) {
+          this.ooption = {
+              xdata: [],
+              data: [],
+          }
+          let _array = Array
+          for (var i = 0; i < _array.length; i++) {
+              this.ooption.xdata.push(_array[i].name)
+              this.ooption.data.push(_array[i].loginTime)
+          }
+
+          if (!this.chartObj) {
+              this.setChart(this.ooption);
+          } else {
+              this.option.yAxis.data = this.ooption.xdata;
+              this.option.series[0].data = this.ooption.data;
+              this.chartObj.setOption(this.option);
+          }
+      }
+  },
+  watch: {
+      EloginTimeArray: {
+          immediate: true,
+          deep: true,
+          handler(newValue, oldValue) {
+              this.setArray(newValue)
+              this.$forceUpdate();
+          },
+      },
   },
-  watch: {},
   mounted() {
-    this.setChart();
-    var _this = this;
-    window.addEventListener("resize", () => {
-      if (_this.chartObj) {
-        _this.chartObj.resize();
-      }
-    });
+      this.setArray(this.EloginTimeArray)
+      var _this = this;
+      window.addEventListener("resize", () => {
+          if (_this.chartObj) {
+              _this.chartObj.resize();
+          }
+      });
   },
 };
 </script>
@@ -73,14 +144,12 @@ export default {
 <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>
+</style>

+ 155 - 0
src/components/pages/dataBoardNew/student/bar2/index.vue

@@ -0,0 +1,155 @@
+<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: {
+      EloginTimeArray: {
+          type: Array,
+      },
+  },
+  data() {
+      return {
+          chartObj: null,
+          ooption: {
+              xdata: [],
+              data: [],
+          },
+          option: {
+              // title: {
+              //     text: '登录频次',
+              //     textStyle: {
+              //         fontSize: 12,
+              //     },
+              //     padding: [5, 0, 0, 10]
+              // },
+              tooltip: {
+                  trigger: "axis",
+                  axisPointer: {
+                      type: "shadow",
+                  },
+              },
+              dataZoom: [
+                  {
+                      // start: 50,
+                      type: 'inside',
+                      yAxisIndex: 0
+                  },
+                  {
+                      type: 'slider',
+                      yAxisIndex: 0
+                  }
+              ],
+              grid: {
+                  top: '5%',
+                  left: '5%',
+                  right: '10%',
+                  bottom: '5%',
+                  containLabel: true
+              },
+              xAxis: {
+                  type: 'value',
+                  boundaryGap: [0, 0.01]
+              },
+
+              yAxis: {
+                  type: 'category',
+                  // data: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
+                  data: []
+              },
+              series: [
+                  {
+                      name: "登录频次(次)",
+                      type: 'bar',
+                      // data: [180, 50, 70, 90, 100, 130],
+                      data: [],
+                      itemStyle: {
+                          normal: {
+                              color: function (params) {
+                                  return "#106bff";
+                              },
+                          },
+                      },
+                  }
+              ]
+          },
+      };
+  },
+  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.data;
+              // 初始化雷达图
+              this.chartObj = chartObj;
+              this.chartObj.setOption(this.option);
+          });
+      },
+      setArray(Array) {
+          this.ooption = {
+              xdata: [],
+              data: [],
+          }
+          let _array = Array
+          for (var i = 0; i < _array.length; i++) {
+              this.ooption.xdata.push(_array[i].name)
+              this.ooption.data.push(_array[i].loginTime)
+          }
+
+          if (!this.chartObj) {
+              this.setChart(this.ooption);
+          } else {
+              this.option.yAxis.data = this.ooption.xdata;
+              this.option.series[0].data = this.ooption.data;
+              this.chartObj.setOption(this.option);
+          }
+      }
+  },
+  watch: {
+      EloginTimeArray: {
+          immediate: true,
+          deep: true,
+          handler(newValue, oldValue) {
+              this.setArray(newValue)
+              this.$forceUpdate();
+          },
+      },
+  },
+  mounted() {
+      this.setArray(this.EloginTimeArray)
+      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>

+ 100 - 0
src/components/pages/dataBoardNew/student/cateRank/index.vue

@@ -0,0 +1,100 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%;height: calc(100% - 15px);overflow: auto;">
+      <el-table :data="tableData" style="width: 100%" :header-cell-style="{ background: '#E0EAFB',color: '#000' }"
+        :row-class-name="tableRowClassName" class="tableClass">
+        <el-table-column label="排行" min-width="50" align="center">
+          <template slot-scope="scope">{{ scope.$index + 1 }}</template>
+        </el-table-column>
+        <el-table-column prop="name" label="姓名" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="courseCount" label="参与课程数量" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="scourseCount" label="参与项目数量" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="worksCount" label="提交作业数量" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="exchangeCount" label="互动交流" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="rateCount" label="评价得分" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="score" label="综合指数" min-width="80" align="center">
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    rankData: {
+      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 = JSON.parse(JSON.stringify(array))
+
+      this.tableData = this.tableData.sort(function(a,b){
+        return b.score - a.score;
+      })
+    }
+  },
+  watch: {
+    rankData: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.rankData)
+  },
+};
+</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;
+}
+
+.tableClass >>> td, .tableClass >>> th{
+  padding: 5px 0;
+}
+</style>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 754 - 79
src/components/pages/dataBoardNew/student/index.vue


+ 82 - 26
src/components/pages/dataBoardNew/student/loginCount/index.vue

@@ -1,55 +1,79 @@
 <template>
   <div class="data_body">
     <div style="width: 100%; height: 100%">
-      <div
-        id="charts_canvas"
-        class="echart"
-        style="width: 100%; height: 100%"
-      ></div>
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
     </div>
   </div>
 </template>
 
 <script>
 export default {
+  props: {
+    monthArray: {
+      type: Array,
+      default: []
+    },
+  },
   data() {
     return {
       chartObj: null,
       ooption: {
         xdata: [],
-        course: [],
+        teacher: [],
+        student: [],
       },
       option: {
+        // title: {
+        //     text: '登录频次',
+        //     textStyle:{
+        //         fontSize: 12,
+        //     },
+        //     padding: [0, 0, 0, 10]
+        // },
         tooltip: {
-          trigger: "item",
+          trigger: 'axis'
+        },
+        // legend: {
+        //     data: ['老师', '学生'],
+        //     right: '10'
+        // },
+        grid: {
+          top: '30',
+          left: '5%',
+          right: '5%',
+          bottom: '5%',
+          containLabel: true
         },
         xAxis: {
-          type: "category",
-          boundaryGap: false,
-          data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+          type: 'category',
+          boundaryGap: true,
+          // data: ['1月', '2月', '3月', '4月', '5月', '6月']
+          data: []
         },
         yAxis: {
-          type: "value",
-        },
-        grid: {
-          top: "15%",
-          left: "5%",
-          right: "5%",
-          bottom: "5%",
-          containLabel: true,
+          type: 'value',
+          minInterval: 1
         },
         series: [
           {
-            data: [820, 932, 901, 934, 1290, 1330, 1320],
-            type: "line",
+            // name: '老师',
+            type: 'line',
             areaStyle: {},
-          },
-        ],
+            data: [],
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return "#106bff";
+                },
+              },
+            },
+          }
+        ]
       },
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -57,17 +81,49 @@ export default {
       //然后异步执行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.user;
         // 初始化雷达图
         this.chartObj = chartObj;
         this.chartObj.setOption(this.option);
       });
     },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        user: [],
+      }
+      let _array = array
+      for (var i = 0; i < _array.length; i++) {
+        this.ooption.xdata.push(_array[i].Month + '月')
+        this.ooption.user.push(_array[i].user)
+      }
+
+      if (!this.chartObj) {
+        this.setChart(this.ooption);
+      } else {
+        this.option.xAxis.data = this.ooption.xdata;
+        this.option.series[0].data = this.ooption.user;
+        this.chartObj.setOption(this.option);
+      }
+    }
+  },
+  watch: {
+    monthArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
   },
-  watch: {},
   mounted() {
-    this.setChart();
+    this.setJson(this.monthArray)
+
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {
@@ -91,4 +147,4 @@ export default {
   width: 95%;
   background: #fff;
 }
-</style>
+</style>

+ 74 - 42
src/components/pages/dataBoardNew/student/loginTime/index.vue

@@ -1,17 +1,18 @@
 <template>
-  <div class="data_body" style="height: calc(100% - 100px)">
+  <div class="data_body">
     <div style="width: 100%; height: 100%">
-      <div
-        id="charts_canvas"
-        class="echart"
-        style="width: 100%; height: 100%"
-      ></div>
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
     </div>
   </div>
 </template>
 
 <script>
 export default {
+  props: {
+    uArray: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -19,38 +20,45 @@ export default {
         data: [],
       },
       option: {
+        xAxis: {
+          name: "课程数量",
+          nameTextStyle: {
+            padding: [25, 0, 0, 0],
+            verticalAlign: 'top'
+          },
+          nameGap: -45,
+          minInterval: 1
+        },
+        grid: {
+          top: "15%",
+          left: "10%",
+          right: "10%",
+          bottom: "10%",
+          containLabel: true,
+        },
+        yAxis: {
+          name: "项目数量",
+          minInterval: 1
+        },
+        color: ["#3681FC"],
         tooltip: {
-          trigger: "item",
+          formatter: function (params) {
+            return (
+              params.marker +
+              params.data[2] +
+              "<br/>" +
+              "课程数量:" +
+              params.data[0] +
+              "<br/>" +
+              "项目数量:" +
+              params.data[1]
+            );
+          },
         },
-        xAxis: {},
-        yAxis: {},
         series: [
           {
-            symbolSize: 20,
-            data: [
-              [10.0, 8.04],
-              [8.07, 6.95],
-              [13.0, 7.58],
-              [9.05, 8.81],
-              [11.0, 8.33],
-              [14.0, 7.66],
-              [13.4, 6.81],
-              [10.0, 6.33],
-              [14.0, 8.96],
-              [12.5, 6.82],
-              [9.15, 7.2],
-              [11.5, 7.2],
-              [3.03, 4.23],
-              [12.2, 7.83],
-              [2.02, 4.47],
-              [1.05, 3.33],
-              [4.05, 4.96],
-              [6.03, 7.24],
-              [12.0, 6.26],
-              [12.0, 8.84],
-              [7.08, 5.82],
-              [5.02, 5.68],
-            ],
+            symbolSize: 8,
+            data: [],
             type: "scatter",
           },
         ],
@@ -58,7 +66,7 @@ export default {
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -69,23 +77,47 @@ export default {
           //劳动课程
           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]);
-        });
+        // 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].courseNum, array[i].scourseNum, 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: {
+    uArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue);
+        this.$forceUpdate();
+      },
+    },
   },
   mounted() {
-    this.setChart();
+    this.setArray(this.uArray);
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

+ 37 - 12
src/components/pages/dataBoardNew/student/stuAct/index.vue

@@ -12,6 +12,11 @@
 
 <script>
 export default {
+  props: {
+    pusaDep: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -21,14 +26,14 @@ export default {
           formatter: "{b} : {c}%",
         },
         // legend: {
-        //   data: ["教学评一体化课程", "已评价课程", "已提交作业课程", "设置评价课程", "课程总数"],
+        //   data: ["评价", "授课", "创建", "登录"],
         // },
         series: [
           {
             type: "funnel",
-            left: "10%",
-            top: 60,
-            bottom: 20,
+            left: "5%",
+            top: 10,
+            bottom: 0,
             width: "95%",
             min: 0,
             max: 100,
@@ -51,11 +56,10 @@ export default {
               borderWidth: 1,
             },
             data: [
-              { value: 20, name: "教学评一体化课程" },
-              { value: 40, name: "已评价课程" },
-              { value: 60, name: "已提交作业课程" },
-              { value: 80, name: "设置评价课程" },
-              { value: 100, name: "课程总数" },
+              // { value: 20, name: "登录" },
+              // { value: 40, name: "创建" },
+              // { value: 60, name: "授课" },
+              // { value: 80, name: "评价" },
             ],
           },
         ],
@@ -63,7 +67,7 @@ export default {
     };
   },
   methods: {
-    setChart() {
+    setChart(array) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -74,16 +78,34 @@ export default {
           this.$el.querySelector("#charts_canvas")
         );
         // 初始化雷达图
+        this.option.series[0].data = array;
         this.chartObj = chartObj;
         this.chartObj.setOption(this.option);
       });
     },
+    setArray(array){
+        let _array = array;
+
+        if (!this.chartObj) {
+          this.setChart(_array);
+        } else {
+          this.option.series[0].data = _array;
+          this.chartObj.setOption(this.option);
+        }
+        this.$forceUpdate();
+    },
   },
   watch: {
-    
+    pusaDep: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+      },
+    },
   },
   mounted() {
-    this.setChart();
+    this.setArray(this.pusaDep)
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {
@@ -91,6 +113,9 @@ export default {
       }
     });
   },
+  created() {
+    this.setChart();
+  },
 };
 </script>
 

+ 135 - 0
src/components/pages/dataBoardNew/student/stuAct2/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: {
+    pusaDep: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      option: {
+        tooltip: {
+          trigger: "item",
+          formatter: "{b} : {c}%",
+        },
+        // legend: {
+        //   data: ["评价", "授课", "创建", "登录"],
+        // },
+        series: [
+          {
+            type: "funnel",
+            left: "5%",
+            top: 10,
+            bottom: 0,
+            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(array) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        // 初始化雷达图
+        this.option.series[0].data = array;
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    setArray(array){
+        let _array = array;
+
+        if (!this.chartObj) {
+          this.setChart(_array);
+        } else {
+          this.option.series[0].data = _array;
+          this.chartObj.setOption(this.option);
+        }
+        this.$forceUpdate();
+    },
+  },
+  watch: {
+    pusaDep: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.pusaDep)
+    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>

+ 145 - 303
src/components/pages/dataBoardNew/student/studentInfo/index.vue

@@ -1,317 +1,159 @@
 <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 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);
-        //     });
-        // },
-        setChart(option) {
-            // 雷达图显示的标签
-            let newPromise = new Promise((resolve) => {
-                resolve();
-            });
-            //然后异步执行echarts的初始化函数
-            newPromise.then(() => {
-                const chartObj = this.$echarts.init(
-                    //劳动课程
-                    this.$el.querySelector("#charts_canvas")
-                );
-                const hours = 
-                [
-                    '1班', '2班', '3班', '4班', '5班', '6班'
-                ];
-                // prettier-ignore
-                const days = 
-                [
-                    '一年级', '二年级', '三年级', '四年级', '五年级', '六年级'
-                ];
-                // prettier-ignore
-                const data = 
-                [
-                    [0, 0, 34], [0, 1, 35], [0, 2, 40], [0, 3, 33], [0, 4, 35], [0, 5, 35], 
-                    [1, 0, 34], [1, 1, 30], [1, 2, 35], [1, 3, 41], [1, 4, 42], [1, 5, 37], 
-                    [2, 0, 45], [2, 1, 35], [2, 2, 44], [2, 3, 45], [2, 4, 41], [2, 5, 35], 
-                    [3, 0, 41], [3, 1, 44], [3, 2, 43], [3, 3, 39], [3, 4, 42], [3, 5, 42], 
-                    [4, 0, 34], [4, 1, 36], [4, 2, 40], [4, 3, 0], [4, 4, 0], [4, 5, 0], 
-                    [5, 0, 44], [5, 1, 44], [5, 2, 34], [5, 3, 0], [5, 4, 0], [5, 5, 0],
-                ];
-                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];
-                        }
-                    });
-                });
-                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 = chartObj;
-                this.chartObj.setOption(this.option);
-            });
-        },
-        setJson(array) {
-            this.setChart(this.ooption);
-            if (array != undefined && array.length > 0) {
-                this.ooption = {
-                    hours: [],
-                    days: [],
-                    data: [],
-                }
-                let _grade = []
-                let _subject = []
-                let data = []
+  props: {
+      EloginTimeArray: {
+          type: Array,
+      },
+  },
+  data() {
+      return {
+          chartObj: null,
+          ooption: {
+              xdata: [],
+              data: [],
+          },
+          option: {
+              // title: {
+              //     text: '在线时长',
+              //     textStyle: {
+              //         fontSize: 12,
+              //     },
+              //     padding: [5, 0, 0, 10]
+              // },
+              tooltip: {
+                  trigger: "axis",
+                  axisPointer: {
+                      type: "shadow",
+                  },
+              },
+              dataZoom: [
+                  {
+                      // start: 50,
+                      type: 'inside',
+                      xAxisIndex: 0
+                  },
+                  {
+                      type: 'slider',
+                      xAxisIndex: 0
+                  }
+              ],
+              grid: {
+                  top: '5%',
+                  left: '5%',
+                  right: '10%',
+                  bottom: '10%',
+                  containLabel: true
+              },
+              xAxis: {
+                  type: 'category',
+                  data: [],
+                  // data: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
+              },
 
-                array.forEach(function (item, idx) {
-                    _grade.push(item.name)
-                })
+              yAxis: {
+                  type: 'value',
 
-                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]]);
-                    });
+              },
+              series: [
+                  {
+                      name: "在线时长(时)",
+                      type: 'bar',
+                      // data: [180, 50, 70, 90, 100, 130],
+                      data: [],
+                      itemStyle: {
+                          normal: {
+                              color: function (params) {
+                                  return "#106bff";
+                              },
+                          },
+                      },
+                  }
+              ]
+          },
+      };
+  },
+  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.data;
+              // 初始化雷达图
+              this.chartObj = chartObj;
+              this.chartObj.setOption(this.option);
+          });
+      },
+      setArray(Array) {
+          this.ooption = {
+              xdata: [],
+              data: [],
+          }
+          let _array = Array
+          for (var i = 0; i < _array.length; i++) {
+              this.ooption.xdata.push(_array[i].name)
+              this.ooption.data.push(_array[i].loginTime)
+          }
 
-                    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) {
-                // newValue = newValue.filter(item => {
-                //     return ['一年级','二年级','三年级','四年级','五年级','六年级','七年级'].indexOf(item.name) !== -1
-                // })
-                this.setJson(newValue)
-                this.$forceUpdate();
-            },
-        },
-    },
-    mounted() {
-        // this.courseArray = this.courseArray.filter(item => {
-        //     return ['一年级','二年级','三年级','四年级','五年级','六年级','七年级'].indexOf(item.name) !== -1
-        // })
-
-        this.setJson(this.courseArray)
-        var _this = this;
-        window.addEventListener("resize", () => {
-            if (_this.chartObj) {
-                _this.chartObj.resize();
-            }
-        });
-    },
+          if (!this.chartObj) {
+              this.setChart(this.ooption);
+          } else {
+              this.option.xAxis.data = this.ooption.xdata;
+              this.option.series[0].data = this.ooption.data;
+              this.chartObj.setOption(this.option);
+          }
+      }
+  },
+  watch: {
+      EloginTimeArray: {
+          immediate: true,
+          deep: true,
+          handler(newValue, oldValue) {
+              this.setArray(newValue)
+              this.$forceUpdate();
+          },
+      },
+  },
+  mounted() {
+      this.setArray(this.EloginTimeArray)
+      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;
+  height: 100%;
+  position: relative;
+  border-radius: 5px;
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
 }
 </style>
-  

+ 45 - 13
src/components/pages/dataBoardNew/student/studentInfo2/index.vue

@@ -1,17 +1,18 @@
 <template>
   <div class="data_body">
     <div style="width: 100%; height: 100%">
-      <div
-        id="charts_canvas"
-        class="echart"
-        style="width: 100%; height: 100%"
-      ></div>
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
     </div>
   </div>
 </template>
 
 <script>
 export default {
+  props: {
+    EloginTimeArray: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -22,6 +23,13 @@ export default {
         tooltip: {
           trigger: "item",
         },
+        grid: {
+          top: "5%",
+          left: "5%",
+          right: "5%",
+          bottom: "5%",
+          containLabel: true,
+        },
         series: [
           {
             type: "pie",
@@ -35,12 +43,12 @@ export default {
               },
             },
             data: [
-              { value: 100, name: "一年级" },
-              { value: 150, name: "二年级" },
-              { value: 223, name: "三年级" },
-              { value: 216, name: "四年级" },
-              { value: 130, name: "五年级" },
-              { value: 208, name: "六年级" },
+              // { value: 123, name: "一年级" },
+              // { value: 200, name: "二年级" },
+              // { value: 250, name: "三年级" },
+              // { value: 450, name: "四年级" },
+              // { value: 300, name: "五年级" },
+              // { value: 100, name: "六年级" },
             ],
           },
         ],
@@ -48,7 +56,7 @@ export default {
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -59,16 +67,40 @@ export default {
           //劳动课程
           this.$el.querySelector("#charts_canvas")
         );
+        this.option.series[0].data = this.ooption.data.filter(item => item.value !== 0);
         // 初始化雷达图
         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].loginTime, 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: {
+    EloginTimeArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue);
+        this.$forceUpdate();
+      },
+    },
   },
   mounted() {
-    this.setChart();
+    this.setArray(this.EloginTimeArray);
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

+ 159 - 0
src/components/pages/dataBoardNew/student/studentInfo3/index.vue

@@ -0,0 +1,159 @@
+<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: {
+      EworksNumArray: {
+          type: Array,
+      },
+  },
+  data() {
+      return {
+          chartObj: null,
+          ooption: {
+              xdata: [],
+              data: [],
+          },
+          option: {
+              // title: {
+              //     text: '在线时长',
+              //     textStyle: {
+              //         fontSize: 12,
+              //     },
+              //     padding: [5, 0, 0, 10]
+              // },
+              tooltip: {
+                  trigger: "axis",
+                  axisPointer: {
+                      type: "shadow",
+                  },
+              },
+              dataZoom: [
+                  {
+                      // start: 50,
+                      type: 'inside',
+                      xAxisIndex: 0
+                  },
+                  {
+                      type: 'slider',
+                      xAxisIndex: 0
+                  }
+              ],
+              grid: {
+                  top: '5%',
+                  left: '5%',
+                  right: '10%',
+                  bottom: '10%',
+                  containLabel: true
+              },
+              xAxis: {
+                  type: 'category',
+                  data: [],
+                  // data: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
+              },
+
+              yAxis: {
+                  type: 'value',
+
+              },
+              series: [
+                  {
+                      name: "作业数量",
+                      type: 'bar',
+                      // data: [180, 50, 70, 90, 100, 130],
+                      data: [],
+                      itemStyle: {
+                          normal: {
+                              color: function (params) {
+                                  return "#106bff";
+                              },
+                          },
+                      },
+                  }
+              ]
+          },
+      };
+  },
+  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.data;
+              // 初始化雷达图
+              this.chartObj = chartObj;
+              this.chartObj.setOption(this.option);
+          });
+      },
+      setArray(Array) {
+          this.ooption = {
+              xdata: [],
+              data: [],
+          }
+          let _array = Array
+          for (var i = 0; i < _array.length; i++) {
+              this.ooption.xdata.push(_array[i].name)
+              this.ooption.data.push(_array[i].works)
+          }
+
+          if (!this.chartObj) {
+              this.setChart(this.ooption);
+          } else {
+              this.option.xAxis.data = this.ooption.xdata;
+              this.option.series[0].data = this.ooption.data;
+              this.chartObj.setOption(this.option);
+          }
+      }
+  },
+  watch: {
+      EworksNumArray: {
+          immediate: true,
+          deep: true,
+          handler(newValue, oldValue) {
+              this.setArray(newValue)
+              this.$forceUpdate();
+          },
+      },
+  },
+  mounted() {
+      this.setArray(this.EworksNumArray)
+      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>

+ 127 - 0
src/components/pages/dataBoardNew/student/studentInfo4/index.vue

@@ -0,0 +1,127 @@
+<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: {
+    EworksNumArray: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        data: [],
+      },
+      option: {
+        tooltip: {
+          trigger: "item",
+        },
+        grid: {
+          top: "5%",
+          left: "5%",
+          right: "5%",
+          bottom: "5%",
+          containLabel: true,
+        },
+        series: [
+          {
+            type: "pie",
+            radius: '50%',
+            avoidLabelOverlap: true,
+            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.filter(item => item.value !== 0);
+        // 初始化雷达图
+        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].works, 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: {
+    EworksNumArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue);
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.EworksNumArray);
+    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>

+ 127 - 235
src/components/pages/dataBoardNew/student/toolUser/index.vue

@@ -1,275 +1,117 @@
 <template>
   <div class="data_body">
     <div style="width: 100%; height: 100%">
-      <div
-        id="charts_canvas"
-        class="echart"
-        style="width: 100%; height: 100%"
-      ></div>
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
     </div>
   </div>
 </template>
 
 <script>
 export default {
+  props: {
+    yearArray: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
+      ooption: {
+        xdata: [],
+        sdata: [],
+      },
       option: {
+        // title: {
+        //   text: '登录频次',
+        //   textStyle: {
+        //     fontSize: 12,
+        //   },
+        //   padding: [10, 0, 0, 10]
+        // },
         tooltip: {
-          position: "top",
+          position: 'top'
         },
         grid: {
-          height: "50%",
-          top: "10%",
+          top: '50',
+          left: '5%',
+          right: '5%',
+          bottom: '5%',
+          containLabel: true
         },
         xAxis: {
-          type: "category",
-          data: [
-            "12a",
-            "1a",
-            "2a",
-            "3a",
-            "4a",
-            "5a",
-            "6a",
-            "7a",
-            "8a",
-            "9a",
-            "10a",
-            "11a",
-            "12p",
-            "1p",
-            "2p",
-            "3p",
-            "4p",
-            "5p",
-            "6p",
-            "7p",
-            "8p",
-            "9p",
-            "10p",
-            "11p",
-          ],
+          type: 'category',
+          // data: [
+          //     '1月', '2月', '3月', '4月', '5月', '6月', '7月',
+          //     '8月', '9月', '10月', '11月', '12月'
+          // ],
+          data: [],
           splitArea: {
-            show: true,
+            show: true
           },
+          axisLabel: {
+            formatter: function (value) {
+              console.log(value);
+              var ret = "";//拼接加\n返回的类目项  
+              var maxLength = 2;//每项显示文字个数  
+              var valLength = value.length;//X轴类目项的文字个数  
+              var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数  
+              if (rowN > 1)//如果类目项的文字大于5,  
+              {
+                for (var i = 0; i < rowN; i++) {
+                  var temp = "";//每次截取的字符串  
+                  var start = i * maxLength;//开始截取的位置  
+                  var end = start + maxLength;//结束截取的位置  
+                  //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧  
+                  temp = value.substring(start, end) + "\n";
+                  ret += temp; //凭借最终的字符串  
+                }
+                return ret;
+              }
+              else {
+                return value;
+              }
+            }
+          }
         },
         yAxis: {
-          type: "category",
+          type: 'category',
           data: [
-            "星期一",
-            "星期二",
-            "星期三",
-            "星期四",
-            "星期五",
-            "星期六",
-            "星期日",
+            '星期天', '星期一', '星期二', '星期三',
+            '星期四', '星期五', '星期六',
           ],
           splitArea: {
-            show: true,
+            show: true
           },
         },
         visualMap: {
           min: 0,
           max: 10,
           calculable: true,
-          orient: "horizontal",
-          left: "center",
-          bottom: "15%",
+          orient: 'horizontal',
+          right: '10',
+          top: '0%'
         },
         series: [
           {
-            name: "Punch Card",
-            type: "heatmap",
-            data: [
-              [0, 0, 5],
-              [0, 1, 1],
-              [0, 2, 0],
-              [0, 3, 0],
-              [0, 4, 0],
-              [0, 5, 0],
-              [0, 6, 0],
-              [0, 7, 0],
-              [0, 8, 0],
-              [0, 9, 0],
-              [0, 10, 0],
-              [0, 11, 2],
-              [0, 12, 4],
-              [0, 13, 1],
-              [0, 14, 1],
-              [0, 15, 3],
-              [0, 16, 4],
-              [0, 17, 6],
-              [0, 18, 4],
-              [0, 19, 4],
-              [0, 20, 3],
-              [0, 21, 3],
-              [0, 22, 2],
-              [0, 23, 5],
-              [1, 0, 7],
-              [1, 1, 0],
-              [1, 2, 0],
-              [1, 3, 0],
-              [1, 4, 0],
-              [1, 5, 0],
-              [1, 6, 0],
-              [1, 7, 0],
-              [1, 8, 0],
-              [1, 9, 0],
-              [1, 10, 5],
-              [1, 11, 2],
-              [1, 12, 2],
-              [1, 13, 6],
-              [1, 14, 9],
-              [1, 15, 11],
-              [1, 16, 6],
-              [1, 17, 7],
-              [1, 18, 8],
-              [1, 19, 12],
-              [1, 20, 5],
-              [1, 21, 5],
-              [1, 22, 7],
-              [1, 23, 2],
-              [2, 0, 1],
-              [2, 1, 1],
-              [2, 2, 0],
-              [2, 3, 0],
-              [2, 4, 0],
-              [2, 5, 0],
-              [2, 6, 0],
-              [2, 7, 0],
-              [2, 8, 0],
-              [2, 9, 0],
-              [2, 10, 3],
-              [2, 11, 2],
-              [2, 12, 1],
-              [2, 13, 9],
-              [2, 14, 8],
-              [2, 15, 10],
-              [2, 16, 6],
-              [2, 17, 5],
-              [2, 18, 5],
-              [2, 19, 5],
-              [2, 20, 7],
-              [2, 21, 4],
-              [2, 22, 2],
-              [2, 23, 4],
-              [3, 0, 7],
-              [3, 1, 3],
-              [3, 2, 0],
-              [3, 3, 0],
-              [3, 4, 0],
-              [3, 5, 0],
-              [3, 6, 0],
-              [3, 7, 0],
-              [3, 8, 1],
-              [3, 9, 0],
-              [3, 10, 5],
-              [3, 11, 4],
-              [3, 12, 7],
-              [3, 13, 14],
-              [3, 14, 13],
-              [3, 15, 12],
-              [3, 16, 9],
-              [3, 17, 5],
-              [3, 18, 5],
-              [3, 19, 10],
-              [3, 20, 6],
-              [3, 21, 4],
-              [3, 22, 4],
-              [3, 23, 1],
-              [4, 0, 1],
-              [4, 1, 3],
-              [4, 2, 0],
-              [4, 3, 0],
-              [4, 4, 0],
-              [4, 5, 1],
-              [4, 6, 0],
-              [4, 7, 0],
-              [4, 8, 0],
-              [4, 9, 2],
-              [4, 10, 4],
-              [4, 11, 4],
-              [4, 12, 2],
-              [4, 13, 4],
-              [4, 14, 4],
-              [4, 15, 14],
-              [4, 16, 12],
-              [4, 17, 1],
-              [4, 18, 8],
-              [4, 19, 5],
-              [4, 20, 3],
-              [4, 21, 7],
-              [4, 22, 3],
-              [4, 23, 0],
-              [5, 0, 2],
-              [5, 1, 1],
-              [5, 2, 0],
-              [5, 3, 3],
-              [5, 4, 0],
-              [5, 5, 0],
-              [5, 6, 0],
-              [5, 7, 0],
-              [5, 8, 2],
-              [5, 9, 0],
-              [5, 10, 4],
-              [5, 11, 1],
-              [5, 12, 5],
-              [5, 13, 10],
-              [5, 14, 5],
-              [5, 15, 7],
-              [5, 16, 11],
-              [5, 17, 6],
-              [5, 18, 0],
-              [5, 19, 5],
-              [5, 20, 3],
-              [5, 21, 4],
-              [5, 22, 2],
-              [5, 23, 0],
-              [6, 0, 1],
-              [6, 1, 0],
-              [6, 2, 0],
-              [6, 3, 0],
-              [6, 4, 0],
-              [6, 5, 0],
-              [6, 6, 0],
-              [6, 7, 0],
-              [6, 8, 0],
-              [6, 9, 0],
-              [6, 10, 1],
-              [6, 11, 0],
-              [6, 12, 2],
-              [6, 13, 1],
-              [6, 14, 3],
-              [6, 15, 4],
-              [6, 16, 0],
-              [6, 17, 0],
-              [6, 18, 0],
-              [6, 19, 0],
-              [6, 20, 1],
-              [6, 21, 2],
-              [6, 22, 2],
-              [6, 23, 6],
-            ].map(function (item) {
-              return [item[1], item[0], item[2] || "-"];
-            }),
+            name: '',
+            type: 'heatmap',
+            data: [],
             label: {
-              show: true,
+              show: true
             },
             emphasis: {
               itemStyle: {
                 shadowBlur: 10,
-                shadowColor: "rgba(0, 0, 0, 0.5)",
-              },
-            },
-          },
-        ],
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
+              }
+            }
+          }
+        ]
       },
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -277,18 +119,70 @@ export default {
       //然后异步执行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);
       });
     },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        sdata: [],
+        max: 0
+      }
+      let _array = array
+      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);
+      }
+    }
+  },
+  watch: {
+    yearArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
   },
-  watch: {},
   mounted() {
-    this.setChart();
-    var _this = this;
+    this.setJson(this.yearArray)
+
     window.addEventListener("resize", () => {
       if (_this.chartObj) {
         _this.chartObj.resize();
@@ -301,14 +195,12 @@ export default {
 <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>
+</style>

+ 206 - 0
src/components/pages/dataBoardNew/student/toolUser2/index.vue

@@ -0,0 +1,206 @@
+<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: {
+        // title: {
+        //   text: '在线时长',
+        //   textStyle: {
+        //     fontSize: 12,
+        //   },
+        //   padding: [10, 0, 0, 10]
+        // },
+        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
+          },
+          axisLabel: {
+            formatter: function (value) {
+              console.log(value);
+              var ret = "";//拼接加\n返回的类目项  
+              var maxLength = 2;//每项显示文字个数  
+              var valLength = value.length;//X轴类目项的文字个数  
+              var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数  
+              if (rowN > 1)//如果类目项的文字大于5,  
+              {
+                for (var i = 0; i < rowN; i++) {
+                  var temp = "";//每次截取的字符串  
+                  var start = i * maxLength;//开始截取的位置  
+                  var end = start + maxLength;//结束截取的位置  
+                  //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧  
+                  temp = value.substring(start, end) + "\n";
+                  ret += temp; //凭借最终的字符串  
+                }
+                return ret;
+              }
+              else {
+                return value;
+              }
+            }
+          }
+        },
+        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);
+      });
+    },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        sdata: [],
+        max: 0
+      }
+      let _array = array
+      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);
+      }
+    }
+  },
+  watch: {
+    yearArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setJson(this.yearArray)
+
+    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>

+ 78 - 9
src/components/pages/dataBoardNew/teacher/chartList/bar.vue

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

+ 37 - 12
src/components/pages/dataBoardNew/teacher/chartList/teaAct.vue

@@ -12,6 +12,11 @@
 
 <script>
 export default {
+  props: {
+    pusaDep: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -21,14 +26,14 @@ export default {
           formatter: "{b} : {c}%",
         },
         // legend: {
-        //   data: ["教学评一体化课程", "已评价课程", "已提交作业课程", "设置评价课程", "课程总数"],
+        //   data: ["评价", "授课", "创建", "登录"],
         // },
         series: [
           {
             type: "funnel",
-            left: "10%",
-            top: 60,
-            bottom: 20,
+            left: "5%",
+            top: 10,
+            bottom: 0,
             width: "95%",
             min: 0,
             max: 100,
@@ -51,11 +56,10 @@ export default {
               borderWidth: 1,
             },
             data: [
-              { value: 20, name: "教学评一体化课程" },
-              { value: 40, name: "已评价课程" },
-              { value: 60, name: "已提交作业课程" },
-              { value: 80, name: "设置评价课程" },
-              { value: 100, name: "课程总数" },
+              // { value: 20, name: "登录" },
+              // { value: 40, name: "创建" },
+              // { value: 60, name: "授课" },
+              // { value: 80, name: "评价" },
             ],
           },
         ],
@@ -63,7 +67,7 @@ export default {
     };
   },
   methods: {
-    setChart() {
+    setChart(array) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -74,16 +78,34 @@ export default {
           this.$el.querySelector("#charts_canvas")
         );
         // 初始化雷达图
+        this.option.series[0].data = array;
         this.chartObj = chartObj;
         this.chartObj.setOption(this.option);
       });
     },
+    setArray(array){
+        let _array = array;
+
+        if (!this.chartObj) {
+          this.setChart(_array);
+        } else {
+          this.option.series[0].data = _array;
+          this.chartObj.setOption(this.option);
+        }
+        this.$forceUpdate();
+    },
   },
   watch: {
-    
+    pusaDep: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+      },
+    },
   },
   mounted() {
-    this.setChart();
+    this.setArray(this.pusaDep)
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {
@@ -91,6 +113,9 @@ export default {
       }
     });
   },
+  created() {
+    this.setChart();
+  },
 };
 </script>
 

+ 135 - 0
src/components/pages/dataBoardNew/teacher/chartList/teaActSecond.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: {
+    pusaDep: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      option: {
+        tooltip: {
+          trigger: "item",
+          formatter: "{b} : {c}%",
+        },
+        // legend: {
+        //   data: ["评价", "授课", "创建", "登录"],
+        // },
+        series: [
+          {
+            type: "funnel",
+            left: "5%",
+            top: 10,
+            bottom: 0,
+            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(array) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        // 初始化雷达图
+        this.option.series[0].data = array;
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    setArray(array){
+        let _array = array;
+
+        if (!this.chartObj) {
+          this.setChart(_array);
+        } else {
+          this.option.series[0].data = _array;
+          this.chartObj.setOption(this.option);
+        }
+        this.$forceUpdate();
+    },
+  },
+  watch: {
+    pusaDep: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.pusaDep)
+    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>

+ 197 - 179
src/components/pages/dataBoardNew/teacher/chartList/teaData.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="data_body">
-        <div style="width: 100%; height: 100%">
+        <div style="width: 100%; height: 100%" :style="{ minWidth: ooption.hours.length * 75 + 'px' }">
             <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
         </div>
     </div>
@@ -12,6 +12,9 @@ export default {
         courseArray: {
             type: Array,
         },
+        cType: {
+            type: String
+        }
     },
     data() {
         return {
@@ -25,106 +28,63 @@ export default {
                 tooltip: {
                     position: 'top',
                     formatter: function (params) {
-                        // console.log(params);
-                        return params.marker + params.name + ' ' + params.data[1];//params.seriesName + '<br>' + params.
+                        return params.marker + params.name + ' ' + params.data[2];//params.seriesName + '<br>' + params.
 
                     }
                 },
-                title: [],
-                singleAxis: [],
-                series: []
+                grid: {
+                    top: '5%',
+                    left: 0,
+                    bottom: '5%',
+                    right: '5%',
+                    containLabel: true
+                },
+                xAxis: {
+                    type: 'category',
+                    data: [],
+                    boundaryGap: false,
+                    splitLine: {
+                        show: true
+                    },
+                    axisLine: {
+                        show: false
+                    }
+                },
+                yAxis: {
+                    type: 'category',
+                    data: [],
+                    axisLine: {
+                        show: false
+                    }
+                },
+                series: [
+                    {
+                        name: 'Punch Card',
+                        type: 'scatter',
+                        symbolSize: function (val) {
+                            return val[2] * 3;
+                        },
+                        data: [],
+                        animationDelay: function (idx) {
+                            return idx * 5;
+                        },
+                        itemStyle: {
+                            color: function (params) {
+                                // 根据行索引设置不同的颜色
+                                var row = params.value[1];
+                                var colorList = ['hsl(170, 80%, 75%)', 'hsl(300, 99%, 70%)', 'hsl(139, 93%, 60%)', 'hsl(56, 73%, 69%)', 'hsl(352, 98%, 69%)', 'hsl(288, 76%, 66%)', 'hsl(167, 89%, 60%)', 'hsl(83, 81%, 74%)', 'hsl(359, 84%, 66%)', 'hsl(208, 96%, 66%)', 'hsl(259, 82%, 62%)', 'hsl(224, 95%, 64%)', 'hsl(119, 89%, 71%)', 'hsl(35, 75%, 70%)', 'hsl(48, 73%, 76%)', 'hsl(10, 73%, 69%)', 'hsl(112, 88%, 71%)', 'hsl(90, 87%, 61%)', 'hsl(37, 83%, 66%)', 'hsl(192, 86%, 72%)'];
+                                return colorList[row % colorList.length];
+                            }
+                        }
+                    }
+                ]
+                // 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);
-        //     });
-        // },
         setChart(option) {
             // 雷达图显示的标签
             let newPromise = new Promise((resolve) => {
@@ -136,68 +96,97 @@ export default {
                     //劳动课程
                     this.$el.querySelector("#charts_canvas")
                 );
-                const hours = 
-                [
-                    '1班', '2班', '3班', '4班', '5班', '6班'
-                ];
+                const hours = option.hours
+                // [
+                //     // '语文', '数学', '英语', '科学', '体育', '音乐', '美术',
+                //     // '劳动', '其他',
+                // ];
                 // prettier-ignore
-                const days = 
-                [
-                    '一年级', '二年级', '三年级', '四年级', '五年级', '六年级'
-                ];
+                const days = option.days
+                // [
+                //     // '一年级', '二年级', '三年级', '四年级', '五年级', '六年级'
+                // ];
                 // prettier-ignore
-                const data = 
-                [
-                    [0, 0, 34], [0, 1, 35], [0, 2, 40], [0, 3, 33], [0, 4, 35], [0, 5, 35], 
-                    [1, 0, 34], [1, 1, 30], [1, 2, 35], [1, 3, 41], [1, 4, 42], [1, 5, 37], 
-                    [2, 0, 45], [2, 1, 35], [2, 2, 44], [2, 3, 45], [2, 4, 41], [2, 5, 35], 
-                    [3, 0, 41], [3, 1, 44], [3, 2, 43], [3, 3, 39], [3, 4, 42], [3, 5, 42], 
-                    [4, 0, 34], [4, 1, 36], [4, 2, 40], [4, 3, 0], [4, 4, 0], [4, 5, 0], 
-                    [5, 0, 44], [5, 1, 44], [5, 2, 34], [5, 3, 0], [5, 4, 0], [5, 5, 0],
-                ];
+                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];
-                        }
-                    });
-                });
-                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
+                // 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.option.xAxis.data = hours
+                this.option.yAxis.data = days
+                this.option.series[0].data = data.map(function (item) {
+                    return [item[1], item[0], item[2]];
+                })
+
+                if (this.cType == '0') {
+                    this.option.series[0].symbolSize = function (val) {
+                        return val[2] / 5;
+                    }
+                } else {
+                    this.option.series[0].symbolSize = function (val) {
+                        return val[2] * 3;
+                    }
+                }
+                let days2 = days
+                let that = this
+                this.option.tooltip.formatter = function (params) {
+                    let type = ''
+                    switch (that.cType) {
+                        case '0': type = '时长'; break;
+                        case '1': type = '创建'; break;
+                        case '2': type = '协同'; break;
+                        case '3': type = '实施'; break;
+                        case '4': type = '评价'; break;
+                    }
+
+                    return '学科:' + params.name + '<br/> ' + '年级:' + days2[params.data[1]] + '<br/> ' + type + ':' + params.data[2];//params.seriesName + '<br>' + params.
+                }
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
             });
         },
         setJson(array) {
-            this.setChart(this.ooption);
             if (array != undefined && array.length > 0) {
                 this.ooption = {
                     hours: [],
@@ -234,40 +223,69 @@ export default {
                     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]]);
-                    });
+                    // 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.option.title = title
+                    // this.option.singleAxis = singleAxis
+                    // this.option.series = series
+                    this.option.xAxis.data = hours
+                    this.option.yAxis.data = days
+                    this.option.series[0].data = data.map(function (item) {
+                        return [item[1], item[0], item[2]];
+                    })
+
+                    if (this.cType == '0') {
+                        this.option.series[0].symbolSize = function (val) {
+                            return val[2] / 5;
+                        }
+                    } else {
+                        this.option.series[0].symbolSize = function (val) {
+                            return val[2] * 3;
+                        }
+                    }
+                    let days2 = days
+                    let that = this
+                    this.option.tooltip.formatter = function (params) {
+                        let type = ''
+                        switch (that.cType) {
+                            case '0': type = '时长'; break;
+                            case '1': type = '创建'; break;
+                            case '2': type = '协同'; break;
+                            case '3': type = '实施'; break;
+                            case '4': type = '评价'; break;
+                        }
+
+                        return '学科:' + params.name + '<br/> ' + '年级:' + days2[params.data[1]] + '<br/> ' + type + ':' + params.data[2];//params.seriesName + '<br>' + params.
+                    }
                     this.chartObj.setOption(this.option);
                 }
             }
@@ -290,7 +308,6 @@ export default {
         // this.courseArray = this.courseArray.filter(item => {
         //     return ['一年级','二年级','三年级','四年级','五年级','六年级','七年级'].indexOf(item.name) !== -1
         // })
-
         this.setJson(this.courseArray)
         var _this = this;
         window.addEventListener("resize", () => {
@@ -312,6 +329,7 @@ export default {
     padding: 0;
     width: 95%;
     background: #fff;
+    overflow: auto;
 }
 </style>
   

+ 55 - 9
src/components/pages/dataBoardNew/teacher/chartList/teaFre.vue

@@ -12,27 +12,34 @@
 
 <script>
 export default {
+  props: {
+    monthArray: {
+      type: Array,
+      default: [],
+    },
+  },
   data() {
     return {
       chartObj: null,
       ooption: {
         xdata: [],
-        course: [],
+        login: [],
       },
       option: {
         tooltip: {
-          trigger: "item",
+          trigger: "axis",
         },
         xAxis: {
           type: "category",
-          boundaryGap: false,
-          data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+          boundaryGap: true,
+          // data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
         },
         yAxis: {
           type: "value",
+          minInterval: 1
         },
         grid: {
-          top: "15%",
+          top: "30",
           left: "5%",
           right: "5%",
           bottom: "5%",
@@ -40,16 +47,24 @@ export default {
         },
         series: [
           {
-            data: [820, 932, 901, 934, 1290, 1330, 1320],
+            // data: [820, 932, 901, 934, 1290, 1330, 1320],
+            data: [],
             type: "line",
             areaStyle: {},
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return "#106bff";
+                },
+              },
+            },
           },
         ],
       },
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -59,15 +74,46 @@ export default {
         const chartObj = this.$echarts.init(
           this.$el.querySelector("#charts_canvas")
         );
+        this.option.xAxis.data = option.xdata;
+        this.option.series[0].data = option.login;
         // 初始化雷达图
         this.chartObj = chartObj;
         this.chartObj.setOption(this.option);
       });
     },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        login: [],
+      }
+      let _array = array
+      for (var i = 0; i < _array.length; i++) {
+        this.ooption.xdata.push(_array[i].Month + '月')
+        this.ooption.login.push(_array[i].login)
+      }
+
+      if (!this.chartObj) {
+        this.setChart(this.ooption);
+      } else {
+        this.option.xAxis.data = this.ooption.xdata;
+        this.option.series[0].data = this.ooption.login;
+        this.chartObj.setOption(this.option);
+      }
+    }
+  },
+  watch: {
+    monthArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
   },
-  watch: {},
   mounted() {
-    this.setChart();
+    this.setJson(this.monthArray)
+
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

+ 126 - 235
src/components/pages/dataBoardNew/teacher/chartList/toolUse.vue

@@ -1,275 +1,116 @@
 <template>
   <div class="data_body">
     <div style="width: 100%; height: 100%">
-      <div
-        id="charts_canvas"
-        class="echart"
-        style="width: 100%; height: 100%"
-      ></div>
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
     </div>
   </div>
 </template>
 
 <script>
 export default {
+  props: {
+    yearArray: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
+      ooption: {
+        xdata: [],
+        sdata: [],
+      },
       option: {
+        // title: {
+        //   text: '登录频次',
+        //   textStyle: {
+        //     fontSize: 12,
+        //   },
+        //   padding: [10, 0, 0, 10]
+        // },
         tooltip: {
-          position: "top",
+          position: 'top'
         },
         grid: {
-          height: "50%",
-          top: "10%",
+          top: '50',
+          left: '5%',
+          right: '5%',
+          bottom: '5%',
+          containLabel: true
         },
         xAxis: {
-          type: "category",
-          data: [
-            "12a",
-            "1a",
-            "2a",
-            "3a",
-            "4a",
-            "5a",
-            "6a",
-            "7a",
-            "8a",
-            "9a",
-            "10a",
-            "11a",
-            "12p",
-            "1p",
-            "2p",
-            "3p",
-            "4p",
-            "5p",
-            "6p",
-            "7p",
-            "8p",
-            "9p",
-            "10p",
-            "11p",
-          ],
+          type: 'category',
+          // data: [
+          //     '1月', '2月', '3月', '4月', '5月', '6月', '7月',
+          //     '8月', '9月', '10月', '11月', '12月'
+          // ],
+          data: [],
           splitArea: {
-            show: true,
+            show: true
           },
+          axisLabel: {
+            formatter: function (value) {
+              var ret = "";//拼接加\n返回的类目项  
+              var maxLength = 2;//每项显示文字个数  
+              var valLength = value.length;//X轴类目项的文字个数  
+              var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数  
+              if (rowN > 1)//如果类目项的文字大于5,  
+              {
+                for (var i = 0; i < rowN; i++) {
+                  var temp = "";//每次截取的字符串  
+                  var start = i * maxLength;//开始截取的位置  
+                  var end = start + maxLength;//结束截取的位置  
+                  //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧  
+                  temp = value.substring(start, end) + "\n";
+                  ret += temp; //凭借最终的字符串  
+                }
+                return ret;
+              }
+              else {
+                return value;
+              }
+            }
+          }
         },
         yAxis: {
-          type: "category",
+          type: 'category',
           data: [
-            "星期一",
-            "星期二",
-            "星期三",
-            "星期四",
-            "星期五",
-            "星期六",
-            "星期日",
+            '星期天', '星期一', '星期二', '星期三',
+            '星期四', '星期五', '星期六',
           ],
           splitArea: {
-            show: true,
+            show: true
           },
         },
         visualMap: {
           min: 0,
           max: 10,
           calculable: true,
-          orient: "horizontal",
-          left: "center",
-          bottom: "15%",
+          orient: 'horizontal',
+          right: '10',
+          top: '0%'
         },
         series: [
           {
-            name: "Punch Card",
-            type: "heatmap",
-            data: [
-              [0, 0, 5],
-              [0, 1, 1],
-              [0, 2, 0],
-              [0, 3, 0],
-              [0, 4, 0],
-              [0, 5, 0],
-              [0, 6, 0],
-              [0, 7, 0],
-              [0, 8, 0],
-              [0, 9, 0],
-              [0, 10, 0],
-              [0, 11, 2],
-              [0, 12, 4],
-              [0, 13, 1],
-              [0, 14, 1],
-              [0, 15, 3],
-              [0, 16, 4],
-              [0, 17, 6],
-              [0, 18, 4],
-              [0, 19, 4],
-              [0, 20, 3],
-              [0, 21, 3],
-              [0, 22, 2],
-              [0, 23, 5],
-              [1, 0, 7],
-              [1, 1, 0],
-              [1, 2, 0],
-              [1, 3, 0],
-              [1, 4, 0],
-              [1, 5, 0],
-              [1, 6, 0],
-              [1, 7, 0],
-              [1, 8, 0],
-              [1, 9, 0],
-              [1, 10, 5],
-              [1, 11, 2],
-              [1, 12, 2],
-              [1, 13, 6],
-              [1, 14, 9],
-              [1, 15, 11],
-              [1, 16, 6],
-              [1, 17, 7],
-              [1, 18, 8],
-              [1, 19, 12],
-              [1, 20, 5],
-              [1, 21, 5],
-              [1, 22, 7],
-              [1, 23, 2],
-              [2, 0, 1],
-              [2, 1, 1],
-              [2, 2, 0],
-              [2, 3, 0],
-              [2, 4, 0],
-              [2, 5, 0],
-              [2, 6, 0],
-              [2, 7, 0],
-              [2, 8, 0],
-              [2, 9, 0],
-              [2, 10, 3],
-              [2, 11, 2],
-              [2, 12, 1],
-              [2, 13, 9],
-              [2, 14, 8],
-              [2, 15, 10],
-              [2, 16, 6],
-              [2, 17, 5],
-              [2, 18, 5],
-              [2, 19, 5],
-              [2, 20, 7],
-              [2, 21, 4],
-              [2, 22, 2],
-              [2, 23, 4],
-              [3, 0, 7],
-              [3, 1, 3],
-              [3, 2, 0],
-              [3, 3, 0],
-              [3, 4, 0],
-              [3, 5, 0],
-              [3, 6, 0],
-              [3, 7, 0],
-              [3, 8, 1],
-              [3, 9, 0],
-              [3, 10, 5],
-              [3, 11, 4],
-              [3, 12, 7],
-              [3, 13, 14],
-              [3, 14, 13],
-              [3, 15, 12],
-              [3, 16, 9],
-              [3, 17, 5],
-              [3, 18, 5],
-              [3, 19, 10],
-              [3, 20, 6],
-              [3, 21, 4],
-              [3, 22, 4],
-              [3, 23, 1],
-              [4, 0, 1],
-              [4, 1, 3],
-              [4, 2, 0],
-              [4, 3, 0],
-              [4, 4, 0],
-              [4, 5, 1],
-              [4, 6, 0],
-              [4, 7, 0],
-              [4, 8, 0],
-              [4, 9, 2],
-              [4, 10, 4],
-              [4, 11, 4],
-              [4, 12, 2],
-              [4, 13, 4],
-              [4, 14, 4],
-              [4, 15, 14],
-              [4, 16, 12],
-              [4, 17, 1],
-              [4, 18, 8],
-              [4, 19, 5],
-              [4, 20, 3],
-              [4, 21, 7],
-              [4, 22, 3],
-              [4, 23, 0],
-              [5, 0, 2],
-              [5, 1, 1],
-              [5, 2, 0],
-              [5, 3, 3],
-              [5, 4, 0],
-              [5, 5, 0],
-              [5, 6, 0],
-              [5, 7, 0],
-              [5, 8, 2],
-              [5, 9, 0],
-              [5, 10, 4],
-              [5, 11, 1],
-              [5, 12, 5],
-              [5, 13, 10],
-              [5, 14, 5],
-              [5, 15, 7],
-              [5, 16, 11],
-              [5, 17, 6],
-              [5, 18, 0],
-              [5, 19, 5],
-              [5, 20, 3],
-              [5, 21, 4],
-              [5, 22, 2],
-              [5, 23, 0],
-              [6, 0, 1],
-              [6, 1, 0],
-              [6, 2, 0],
-              [6, 3, 0],
-              [6, 4, 0],
-              [6, 5, 0],
-              [6, 6, 0],
-              [6, 7, 0],
-              [6, 8, 0],
-              [6, 9, 0],
-              [6, 10, 1],
-              [6, 11, 0],
-              [6, 12, 2],
-              [6, 13, 1],
-              [6, 14, 3],
-              [6, 15, 4],
-              [6, 16, 0],
-              [6, 17, 0],
-              [6, 18, 0],
-              [6, 19, 0],
-              [6, 20, 1],
-              [6, 21, 2],
-              [6, 22, 2],
-              [6, 23, 6],
-            ].map(function (item) {
-              return [item[1], item[0], item[2] || "-"];
-            }),
+            name: '',
+            type: 'heatmap',
+            data: [],
             label: {
-              show: true,
+              show: true
             },
             emphasis: {
               itemStyle: {
                 shadowBlur: 10,
-                shadowColor: "rgba(0, 0, 0, 0.5)",
-              },
-            },
-          },
-        ],
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
+              }
+            }
+          }
+        ]
       },
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -277,18 +118,70 @@ export default {
       //然后异步执行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);
       });
     },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        sdata: [],
+        max: 0
+      }
+      let _array = array
+      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);
+      }
+    }
+  },
+  watch: {
+    yearArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
   },
-  watch: {},
   mounted() {
-    this.setChart();
-    var _this = this;
+    this.setJson(this.yearArray)
+
     window.addEventListener("resize", () => {
       if (_this.chartObj) {
         _this.chartObj.resize();
@@ -301,14 +194,12 @@ export default {
 <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>
+</style>

+ 50 - 13
src/components/pages/dataBoardNew/teacher/chartList/workNum.vue

@@ -1,17 +1,18 @@
 <template>
   <div class="data_body">
     <div style="width: 100%; height: 100%">
-      <div
-        id="charts_canvas"
-        class="echart"
-        style="width: 100%; height: 100%"
-      ></div>
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
     </div>
   </div>
 </template>
 
 <script>
 export default {
+  props: {
+    courseNumberArray: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -22,6 +23,13 @@ export default {
         tooltip: {
           trigger: "item",
         },
+        grid: {
+          top: "5%",
+          left: "5%",
+          right: "5%",
+          bottom: "5%",
+          containLabel: true,
+        },
         series: [
           {
             type: "pie",
@@ -35,12 +43,12 @@ export default {
               },
             },
             data: [
-              { value: 100, name: "一年级" },
-              { value: 150, name: "二年级" },
-              { value: 223, name: "三年级" },
-              { value: 216, name: "四年级" },
-              { value: 130, name: "五年级" },
-              { value: 208, name: "六年级" },
+              // { value: 123, name: "一年级" },
+              // { value: 200, name: "二年级" },
+              // { value: 250, name: "三年级" },
+              // { value: 450, name: "四年级" },
+              // { value: 300, name: "五年级" },
+              // { value: 100, name: "六年级" },
             ],
           },
         ],
@@ -48,7 +56,7 @@ export default {
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -59,16 +67,45 @@ export default {
           //劳动课程
           this.$el.querySelector("#charts_canvas")
         );
+        this.option.series[0].data = this.ooption.data.filter(item => item.value !== 0);
+        chartObj.off('click')
+        let _this = this
+        chartObj.on('click', function (param) {
+          _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.setChart();
+    this.setArray(this.courseNumberArray);
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

+ 65 - 37
src/components/pages/dataBoardNew/teacher/chartList/workTime.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="data_body" style="height: calc(100% - 100px)">
+  <div class="data_body">
     <div style="width: 100%; height: 100%">
       <div
         id="charts_canvas"
@@ -12,6 +12,11 @@
 
 <script>
 export default {
+  props: {
+    workNumList: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -19,38 +24,43 @@ export default {
         data: [],
       },
       option: {
+        xAxis: {
+          name: "课程数量",
+          nameTextStyle: {
+            padding: [25, 0, 0, 0],
+            verticalAlign:'top'
+          },
+          nameGap: -45
+        },
+        grid: {
+          top: "15%",
+          left: "5%",
+          right: "5%",
+          bottom: "15%",
+          containLabel: true,
+        },
+        yAxis: {
+          name: "项目数量",
+        },
+        color: ["#3681FC"],
         tooltip: {
-          trigger: "item",
+          formatter: function (params) {
+            return (
+              params.marker +
+              params.data[2] +
+              "<br/>" +
+              "课程数量:" +
+              params.data[0] +
+              "<br/>" +
+              "项目数量:" +
+              params.data[1]
+            );
+          },
         },
-        xAxis: {},
-        yAxis: {},
         series: [
           {
-            symbolSize: 20,
-            data: [
-              [10.0, 8.04],
-              [8.07, 6.95],
-              [13.0, 7.58],
-              [9.05, 8.81],
-              [11.0, 8.33],
-              [14.0, 7.66],
-              [13.4, 6.81],
-              [10.0, 6.33],
-              [14.0, 8.96],
-              [12.5, 6.82],
-              [9.15, 7.2],
-              [11.5, 7.2],
-              [3.03, 4.23],
-              [12.2, 7.83],
-              [2.02, 4.47],
-              [1.05, 3.33],
-              [4.05, 4.96],
-              [6.03, 7.24],
-              [12.0, 6.26],
-              [12.0, 8.84],
-              [7.08, 5.82],
-              [5.02, 5.68],
-            ],
+            symbolSize: 8,
+            data: [],
             type: "scatter",
           },
         ],
@@ -58,7 +68,7 @@ export default {
     };
   },
   methods: {
-    setChart() {
+    setChart(option) {
       // 雷达图显示的标签
       let newPromise = new Promise((resolve) => {
         resolve();
@@ -69,23 +79,41 @@ export default {
           //劳动课程
           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.setChart();
+    this.setArray(this.workNumList);
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 746 - 211
src/components/pages/dataBoardNew/teacher/index.vue


+ 8 - 1
src/components/pages/dataBoardSies/Pe/index.vue

@@ -47,8 +47,14 @@
         <div class="titleBox">
           <div class="title">学生运动报告</div>
           <div>
-            <el-select v-model="eva" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 120px;">
+            <el-select v-model="type1" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 120px;">
               <el-option label="全部年级" value=""></el-option>
+              <el-option label="一年级" value="1"></el-option>
+              <el-option label="二年级" value="2"></el-option>
+              <el-option label="三年级" value="3"></el-option>
+              <el-option label="四年级" value="4"></el-option>
+              <el-option label="五年级" value="5"></el-option>
+              <el-option label="六年级" value="6"></el-option>
             </el-select>
             <el-select v-model="eva" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 120px;">
               <el-option label="全部班级" value=""></el-option>
@@ -214,6 +220,7 @@ export default {
       },
       evArray: [],
       eva: '',
+      type1:'',
       evCourseArray: [],
       minWidth: 0
     }

+ 27 - 10
src/components/pages/dataBoardSies/education/index.vue

@@ -13,23 +13,21 @@
               <!-- <span>{{ count }}</span> -->
               <span>{{ 2126 }}</span>
             </div>
-            <div class="info blueBG">
+            <!-- <div class="info blueBG">
               <span>本月登录用户环比</span>
-              <!-- <span>{{ weekCount }}</span> -->
               <span>{{ "3.04%" }}</span>
-            </div>
+            </div> -->
             <div class="info blueBG">
               <span>本月登录用户总数</span>
               <!-- <span>{{ loginCount }}</span> -->
               <span>{{ 2013 }}</span>
             </div>
-            <div class="info blueBG">
+            <!-- <div class="info blueBG">
               <span>本月新增登录用户</span>
-              <!-- <span>{{ (loginCount / count).toFixed(0) }}</span> -->
               <span>{{ 1604 }}</span>
-            </div>
+            </div> -->
           </div>
-          <loginCount style="height: calc(100% - 140px)" :monthArray="loginCountMonthArray"></loginCount>
+          <loginCount style="height: calc(100% - 70px)" :monthArray="loginCountMonthArray"></loginCount>
         </div>
       </div>
       <div class="bottom">
@@ -71,6 +69,17 @@
       <div class="bottom">
         <div class="titleBox">
           <div class="title">学生综合素质报告</div>
+          <div>
+            <el-select v-model="type3" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 120px;">
+              <el-option label="全部年级" value=""></el-option>
+              <el-option label="一年级" value="1"></el-option>
+              <el-option label="二年级" value="2"></el-option>
+              <el-option label="三年级" value="3"></el-option>
+              <el-option label="四年级" value="4"></el-option>
+              <el-option label="五年级" value="5"></el-option>
+              <el-option label="六年级" value="6"></el-option>
+            </el-select>
+          </div>
         </div>
         <div class="dataBox">
           <studentInfo2 :evCourseArray="evCourseArray" :eva="eva"></studentInfo2>
@@ -93,10 +102,16 @@
         <div class="titleBox">
           <div class="title">学科发展情况</div>
           <div>
-            <el-select v-model="eva" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 120px;">
+            <el-select v-model="type1" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 120px;">
               <el-option label="全部年级" value=""></el-option>
+              <el-option label="一年级" value="1"></el-option>
+              <el-option label="二年级" value="2"></el-option>
+              <el-option label="三年级" value="3"></el-option>
+              <el-option label="四年级" value="4"></el-option>
+              <el-option label="五年级" value="5"></el-option>
+              <el-option label="六年级" value="6"></el-option>
             </el-select>
-            <el-select v-model="eva" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 120px;">
+            <el-select v-model="type2" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 120px;">
               <el-option label="全部班级" value=""></el-option>
             </el-select>
           </div>
@@ -171,7 +186,9 @@ export default {
         commentUsers: 0,
       },
       evArray:[],
-      eva:'',
+      type1:'',
+      type2:'',
+      type3:'',
       evCourseArray:[],
       minWidth:0
     }

+ 9 - 12
src/components/pages/dataBoardSies/library/index.vue

@@ -13,23 +13,20 @@
               <!-- <span>{{ count }}</span> -->
               <span>{{ 2126 }}</span>
             </div>
-            <div class="info blueBG">
+            <!-- <div class="info blueBG">
               <span>本月借阅用户环比</span>
-              <!-- <span>{{ weekCount }}</span> -->
               <span>{{ "8300%" }}</span>
-            </div>
+            </div> -->
             <div class="info blueBG">
               <span>本月借阅书籍总数</span>
-              <!-- <span>{{ loginCount }}</span> -->
               <span>{{ 558 }}</span>
             </div>
-            <div class="info blueBG">
+            <!-- <div class="info blueBG">
               <span>本月借阅用户总数</span>
-              <!-- <span>{{ (loginCount / count).toFixed(0) }}</span> -->
               <span>{{ 84 }}</span>
-            </div>
+            </div> -->
           </div>
-          <loginCount style="height: calc(100% - 140px)" :monthArray="loginCountMonthArray"></loginCount>
+          <loginCount style="height: calc(100% - 70px)" :monthArray="loginCountMonthArray"></loginCount>
         </div>
       </div>
       <div class="bottom">
@@ -68,14 +65,14 @@
       <div class="bottom">
         <div class="titleBox">
           <div class="title">借阅排行</div>
-          <div>
+          <!-- <div>
             <el-select v-model="eva" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 120px;">
               <el-option label="全部年级" value=""></el-option>
             </el-select>
             <el-select v-model="eva" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 120px;">
               <el-option label="全部班级" value=""></el-option>
             </el-select>
-          </div>
+          </div> -->
         </div>
         <div class="dataBox rank_box">
           <cateRank :evCourseArray="evCourseArray" :eva="eva" style="width: calc(100% / 2 - 10px);"></cateRank>
@@ -98,11 +95,11 @@
       <div class="bottom">
         <div class="titleBox">
           <div class="title">借阅类别</div>
-          <div>
+          <!-- <div>
             <el-select v-model="eva" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 120px;">
               <el-option label="全部年级" value=""></el-option>
             </el-select>
-          </div>
+          </div> -->
         </div>
         <div class="dataBox">
           <studentInfo :evCourseArray="evCourseArray" :eva="eva"></studentInfo>

+ 221 - 17
src/components/pages/dataBoardSies/school/index.vue

@@ -14,11 +14,16 @@
         <div class="titleBox">
           <div class="title">整体表现</div>
           <div>
-            <el-select v-model="cType" @change="typeChange" class="selectBox" @focus="setMinWidth" style="width: 100px;">
-              <el-option label="三年级" value=""></el-option>
+            <el-select v-model="cType1" @change="typeChange" class="selectBox" @focus="setMinWidth" style="width: 100px;">
+              <el-option label="三年级" value="0"></el-option>
+              <el-option label="四年级" value="1"></el-option>
+              <el-option label="五年级" value="2"></el-option>
+              <el-option label="六年级" value="3"></el-option>
             </el-select>
-            <el-select v-model="cType" @change="typeChange" class="selectBox" @focus="setMinWidth" style="width: 180px;">
-              <el-option label="2022-2023第二学期" value=""></el-option>
+            <el-select v-model="cType2" @change="typeChange" class="selectBox" @focus="setMinWidth" style="width: 180px;">
+              <el-option label="2022-2023第二学期" value="0"></el-option>
+              <el-option label="2021-2022第二学期" value="1"></el-option>
+              <el-option label="2021-2022第一学期" value="2"></el-option>
             </el-select>
           </div>
         </div>
@@ -27,27 +32,27 @@
             <div class="info blueBG">
               <span>实有人数</span>
               <!-- <span>{{ loginTime.toFixed(0) }}小时</span> -->
-              <span>{{ 323 }}</span>
+              <span>{{ allScoreArray[cType2][cType1].count }}</span>
             </div>
             <div class="info blueBG">
               <span>考试人数</span>
               <!-- <span>{{ (loginTime / count).toFixed(0) }}小时</span> -->
-              <span>{{ 320 }}</span>
+              <span>{{ allScoreArray[cType2][cType1].isC }}</span>
             </div>
           </div>
           <div class="depth_box" style="height: calc(100% - 70px)">
             <div class="depth">
               <span>优秀率</span>
               <div>
-                <el-progress :width="80" type="circle" :percentage="80" :stroke-width="5" :format="format"
-                  color="#106BFF"></el-progress>
+                <el-progress :width="100" type="circle" :percentage="allScoreArray[cType2][cType1].excellent"
+                  :stroke-width="5" :format="format" color="#106BFF"></el-progress>
               </div>
             </div>
             <div class="depth">
               <span>合格率</span>
               <div>
-                <el-progress :width="80" type="circle" :percentage="80" :stroke-width="5" :format="format"
-                  color="#106BFF"></el-progress>
+                <el-progress :width="100" type="circle" :percentage="allScoreArray[cType2][cType1].pass" :stroke-width="5"
+                  :format="format" color="#106BFF"></el-progress>
               </div>
             </div>
           </div>
@@ -75,16 +80,21 @@
         <div class="titleBox">
           <div class="title">成绩分布</div>
           <div>
-            <el-select v-model="cType" @change="typeChange" class="selectBox" @focus="setMinWidth" style="width: 100px;">
-              <el-option label="三年级" value=""></el-option>
+            <el-select v-model="cType3" @change="typeChange" class="selectBox" @focus="setMinWidth" style="width: 100px;">
+              <el-option label="三年级" value="0"></el-option>
+              <el-option label="四年级" value="1"></el-option>
+              <el-option label="五年级" value="2"></el-option>
+              <el-option label="六年级" value="3"></el-option>
             </el-select>
-            <el-select v-model="cType" @change="typeChange" class="selectBox" @focus="setMinWidth" style="width: 180px;">
-              <el-option label="2022-2023第二学期" value=""></el-option>
+            <el-select v-model="cType4" @change="typeChange" class="selectBox" @focus="setMinWidth" style="width: 180px;">
+              <el-option label="2022-2023第二学期" value="0"></el-option>
+              <el-option label="2021-2022第二学期" value="1"></el-option>
+              <el-option label="2021-2022第一学期" value="2"></el-option>
             </el-select>
           </div>
         </div>
         <div class="dataBox">
-          <studentInfo2 :evCourseArray="evCourseArray" :eva="eva"></studentInfo2>
+          <studentInfo2 :evCourseArray="evCourseArray2[cType4][cType3]"></studentInfo2>
         </div>
       </div>
     </div>
@@ -156,6 +166,10 @@ export default {
       subjectCourse: 0,
       courseArray: [],
       cType: '',
+      cType1: '0',
+      cType2: '0',
+      cType3: '0',
+      cType4: '0',
       gradeArray: [],
       subjectArray: [],
       themeArray: [],
@@ -178,8 +192,198 @@ export default {
       },
       evArray: [],
       eva: '',
-      evCourseArray: [],
-      minWidth: 0
+      evCourseArray: [
+
+      ],
+      evCourseArray2: [
+        [
+          {
+            class: ['三(1)班', '三(2)班', '三(3)班', '三(4)班', '三(5)班', '三(6)班'],
+            Array: [
+              [ 2, 15, 19, 6, 3, 5], 
+              [ 0, 16, 22, 5, 4, 3], 
+              [ 2, 26, 9, 6, 2, 5], 
+              [ 1, 21, 12, 7, 2, 7], 
+              [0, 19, 13, 10, 4, 3], 
+              [ 0, 17, 18, 9, 0, 5],
+            ]
+          },
+          {
+            class: ['四(1)班', '四(2)班', '四(3)班', '四(4)班', '四(5)班', '四(6)班'],
+            Array: [
+              [ 1, 20, 17, 3, 5, 3], 
+              [ 1, 11, 19, 9, 2, 8], 
+              [ 0, 9, 12, 9, 9, 9], 
+              [ 0, 12, 11, 8, 8, 10], 
+              [ 0, 9, 13, 10, 5, 13], 
+              [ 0, 13, 14, 10, 5, 7],
+            ]
+          },
+          {
+            class: ['五(1)班', '五(2)班', '五(3)班', '五(4)班'],
+            Array: [
+              [0, 13, 11, 11, 6, 8], 
+              [ 2, 17, 7, 12, 3, 8], 
+              [ 1, 19, 16, 15, 3, 4], 
+              [ 4, 18, 13, 8, 2, 3],
+            ]
+          },
+          {
+            class: ['六(1)班', '六(2)班'],
+            Array: [
+              [ 1, 30, 10, 4, 0, 3], 
+              [ 0, 23, 10, 4, 6, 4]
+            ]
+          }
+        ],
+        [
+          {
+            class: ['三(1)班', '三(2)班', '三(3)班', '三(4)班', '三(5)班', '三(6)班'],
+            Array: [
+              [ 1, 22, 17, 6, 2, 2],
+              [ 1, 14, 18, 11, 2, 4],
+              [ 0, 12, 16, 12, 4, 5],
+              [ 0, 23, 15, 8, 3, 1],
+              [ 3, 12, 14, 7, 6, 8],
+              [ 2, 20, 16, 5, 1, 5],
+            ]
+          },
+          {
+            class: ['四(1)班', '四(2)班', '四(3)班'],
+            Array: [
+              [ 0, 9, 20, 7, 7, 7],
+              [ 0, 11, 16, 15, 3, 4],
+              [ 0, 9, 21, 8, 10, 1],
+            ]
+          },
+          {
+            class: ['五(1)班'],
+            Array: [
+              [ 0, 15, 13, 11, 4, 6]
+            ]
+          },
+          {
+            class: ['六(1)班'],
+            Array: [
+              [ 0, 0, 0, 0, 0, 0]
+            ]
+          }
+        ],
+        [
+          {
+            class: ['三(1)班', '三(2)班', '三(3)班', '三(4)班', '三(5)班', '三(6)班'],
+            Array: [
+              [4, 34, 8, 2, 1, 1],
+              [ 1, 35, 8, 4, 1, 0],
+              [ 2, 23, 16, 6, 2, 1],
+              [ 3, 31, 11, 3, 1, 1],
+              [ 1, 25, 12, 3, 5, 3],
+              [2, 27, 14, 4, 1, 1]
+            ]
+          },
+          {
+            class: ['四(1)班', '四(2)班', '四(3)班'],
+            Array: [
+              [ 0, 17, 18, 6, 2, 3],
+              [ 0, 22, 16, 3, 4, 5],
+              [ 0, 16, 21, 6, 3, 2]
+            ]
+          },
+          {
+            class: ['五(1)班'],
+            Array: [
+              [ 0, 20, 15, 8, 2, 3]
+            ]
+          },
+          {
+            class: ['六(1)班'],
+            Array: [
+              [ 0, 19, 17, 8, 2, 1]
+            ]
+          }
+        ],
+      ],
+      minWidth: 0,
+      allScoreArray: [
+        [
+          {
+            count: 302,
+            isC: 298,
+            pass: 91,
+            excellent: 60
+          },
+          {
+            count: 296,
+            isC: 295,
+            pass: 83,
+            excellent: 41
+          },
+          {
+            count: 194,
+            isC: 194,
+            pass: 88,
+            excellent: 43
+          },
+          {
+            count: 95,
+            isC: 95,
+            pass: 93,
+            excellent: 78
+          },
+        ],
+        [
+          {
+            count: 300,
+            isC: 298,
+            pass: 92,
+            excellent: 57
+          },
+          {
+            count: 149,
+            isC: 148,
+            pass: 92,
+            excellent: 43
+          },
+          {
+            count: 49,
+            isC: 49,
+            pass: 88,
+            excellent: 56
+          },
+          {
+            count: 47,
+            isC: 0,
+            pass: 0,
+            excellent: 0
+          },
+        ],
+        [
+          {
+            count: 299,
+            isC: 297,
+            pass: 98,
+            excellent: 78
+          },
+          {
+            count: 144,
+            isC: 144,
+            pass: 93,
+            excellent: 62
+          },
+          {
+            count: 48,
+            isC: 48,
+            pass: 94,
+            excellent: 73
+          },
+          {
+            count: 47,
+            isC: 47,
+            pass: 98,
+            excellent: 77
+          },
+        ],
+      ]
     }
   },
   mounted() {

+ 122 - 81
src/components/pages/dataBoardSies/school/studentInfo2/index.vue

@@ -11,13 +11,13 @@
 export default {
     props: {
         evCourseArray: {
-            type: Array,
-            default: []
+            type: Object,   
+            default: () => {}
         },
-        eva: {
-            type: String,
-            default: ''
-        }
+        // eva: {
+        //     type: String,
+        //     default: ''
+        // }
     },
     data() {
         return {
@@ -26,12 +26,20 @@ export default {
                 xdata: [],
                 sdata: [],
             },
+            name:['100分','90-99分','80-89分','70-79分','60-69分','0-59分'],
             option: {
                 xAxis: {
                     type: 'value',
                     show: false,
                     // max: 500
                 },
+                tooltip: {
+                    trigger: 'axis',
+                    axisPointer: {
+                    // Use axis to trigger tooltip
+                    type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
+                    }
+                },
                 grid: {
                     left: '15%',
                     right: '5%',
@@ -42,55 +50,55 @@ export default {
                     inverse: true,
                     type: 'category',
                     data: [
-                        '三(1)班级',
-                        '三(2)班级',
-                        '三(3)班级',
-                        '三(4)班级',
-                        '三(5)班级',
-                        '三(6)班级'
+                        // '三(1)班级',
+                        // '三(2)班级',
+                        // '三(3)班级',
+                        // '三(4)班级',
+                        // '三(5)班级',
+                        // '三(6)班级'
                     ]
                 },
                 series: [
-                    {
-                        showBackground: true,
-                        stack: 'total',
-                        data: [
-                            40, 30, 40, 50, 60, 70
-                        ],
-                        type: 'bar'
-                    },
-                    {
-                        showBackground: true,
-                        stack: 'total',
-                        data: [
-                            20, 10, 26, 51, 44, 35
-                        ],
-                        type: 'bar'
-                    },
-                    {
-                        showBackground: true,
-                        stack: 'total',
-                        data: [
-                            11, 23, 41, 15, 23, 14
-                        ],
-                        type: 'bar'
-                    },
-                    {
-                        showBackground: true,
-                        stack: 'total',
-                        data: [
-                            41, 21, 21, 12, 24, 34
-                        ],
-                        type: 'bar'
-                    },
-                    {
-                        showBackground: true,
-                        stack: 'total',
-                        data: [
-                            52, 54, 53, 24, 35, 43
-                        ],
-                        type: 'bar'
-                    }
+                    // {
+                    //     showBackground: true,
+                    //     stack: 'total',
+                    //     data: [
+                    //         40, 30, 40, 50, 60, 70
+                    //     ],
+                    //     type: 'bar'
+                    // },
+                    // {
+                    //     showBackground: true,
+                    //     stack: 'total',
+                    //     data: [
+                    //         20, 10, 26, 51, 44, 35
+                    //     ],
+                    //     type: 'bar'
+                    // },
+                    // {
+                    //     showBackground: true,
+                    //     stack: 'total',
+                    //     data: [
+                    //         11, 23, 41, 15, 23, 14
+                    //     ],
+                    //     type: 'bar'
+                    // },
+                    // {
+                    //     showBackground: true,
+                    //     stack: 'total',
+                    //     data: [
+                    //         41, 21, 21, 12, 24, 34
+                    //     ],
+                    //     type: 'bar'
+                    // },
+                    // {
+                    //     showBackground: true,
+                    //     stack: 'total',
+                    //     data: [
+                    //         52, 54, 53, 24, 35, 43
+                    //     ],
+                    //     type: 'bar'
+                    // }
                 ]
             },
         };
@@ -107,36 +115,69 @@ export default {
                     //劳动课程
                     this.$el.querySelector("#charts_canvas")
                 );
-                // this.option.radar.indicator = option.xdata;
-                // this.option.series[0].data[0].value = option.sdata;
-
+                this.option.yAxis.data = option.xdata;
+                this.option.series = []
+                for(var i = 0;i<this.name.length;i++){
+                    this.option.series.push(           
+                        {
+                            name:this.name[i],
+                            showBackground: true,
+                            stack: 'total',
+                            data: [],
+                            type: 'bar'
+                        },
+                    );
+                }
+                for(var i = 0;i<option.sdata.length;i++){
+                    for(var j = 0;j<this.option.series.length;j++){
+                        this.option.series[j].data.push(option.sdata[i][j])
+                    }
+                }
+                console.log(this.option);
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
             });
         },
         setArray(array) {
-            this.setChart(array);
-            return
+            // this.setChart(array);
+            // return
             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;
-                }
+                xdata: array.class,
+                sdata: array.Array,
             }
+            // 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);
-                // }
+                if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                } else {
+                    this.option.yAxis.data = this.ooption.xdata;
+                    this.option.series = []
+                    for(var i = 0;i<this.name.length;i++){
+                        this.option.series.push(           
+                            {
+                                name:this.name[i],
+                                showBackground: true,
+                                stack: 'total',
+                                data: [],
+                                type: 'bar'
+                            },
+                        );
+                    }
+                    for(var i = 0;i<this.ooption.sdata.length;i++){
+                        for(var j = 0;j<this.option.series.length;j++){
+                            this.option.series[j].data.push(this.ooption.sdata[i][j])
+                        }
+                    }
+                    console.log(this.option);
+                    this.chartObj.setOption(this.option);
+                }
             }, 100);
             this.$forceUpdate();
         },
@@ -150,14 +191,14 @@ export default {
                 this.$forceUpdate();
             },
         },
-        eva: {
-            immediate: true,
-            deep: true,
-            handler(newValue, oldValue) {
-                this.setArray(this.evCourseArray)
-                this.$forceUpdate();
-            },
-        },
+        // eva: {
+        //     immediate: true,
+        //     deep: true,
+        //     handler(newValue, oldValue) {
+        //         this.setArray(this.evCourseArray)
+        //         this.$forceUpdate();
+        //     },
+        // },
     },
     mounted() {
         this.setArray(this.evCourseArray)

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

@@ -296,7 +296,7 @@ export default {
             message: "修改成功",
             type: "success",
           });
-          window.opener.postMessage({ close: "1" }, "*");
+          window.parent.postMessage({ close: "1" }, "*");
           this.getUser();
         })
         .catch((err) => {

+ 314 - 144
src/components/pages/easy/addCourse.vue

@@ -173,12 +173,14 @@
                           dragOverBottom: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex < tIndex,
                         }">
                         <div @dragstart="dragTaskStart(t, tIndex)" @dragover.prevent="dragTaskOver(tIndex)"
-                          @dragend="dragTaskEnd()" draggable @click="goToTask(tIndex)" class="navTask" :class="{
+                          @dragend="dragTaskEnd()" :draggable="isdrag == 'task-'+tIndex" @click="goToTask(tIndex)" class="navTask" :class="{
                             isNavTask:
                               isClickColor > 0 && isClickColor == tIndex + 1,
                             isNavOpen: t.toolOpen,
                           }">
-                          <div style="left: 8px;" class="chapter_upload_drag"></div>
+                          <div @click.stop="taskOpen(tIndex)" class="chapter_upload_open"></div>
+                          <div @mousedown="isdrag = 'task-'+tIndex" @mouseup="isdrag = ''"
+                            @touchstart="isdrag = 'task-'+tIndex" @touchend="isdrag = ''" style="left: 8px;" class="chapter_upload_drag"></div>
                           <div class="nt_taskBox">
                             <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
                             <div class="nt_taskName">
@@ -212,7 +214,7 @@
                 <div class="basic_box2">
                   <div style="margin: 0 0 20px 0; padding: 0 0 0 10px"
                     v-for="(item, index) in unitJson[unitIndex].chapterInfo" :key="index">
-                    <div class="taskBorder" style="padding: 20px 20px 10px;">
+                    <div class="taskBorder" style="padding: 20px 20px 10px;" >
                       <div class="basic_box" style="
                           margin: 0;
                           min-height: 0;
@@ -226,18 +228,19 @@
                             align-items: center;
                           ">
                           <div class="lineTitle" style="margin-bottom:10px">学习内容</div>
-                          <div style="margin-bottom:10px" v-if="!item.taskJson[0].isFoldchapter" class="show_taskD show"
+                          <!-- <div style="margin-bottom:10px" v-if="!item.taskJson[0].isFoldchapter" class="show_taskD show"
                             @click="foldC(0)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
                           <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(0)"><img
-                              src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div>
+                              src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
                         </div>
-                        <div v-if="!item.taskJson[0].isFoldchapter">
+                        <!-- v-if="!item.taskJson[0].isFoldchapter" -->
+                        <div>
                           <div class="add_chapters_box add_c_none" v-if="item.taskJson[0].chapterData &&
                             item.taskJson[0].chapterData.length == 0
                             "><img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span></div>
                           <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
                             <div @dragstart="dragStart(item1, index1, 0)" @dragover.prevent="dragOver(index1, 0)"
-                              @dragend="dragEnd()" draggable class="chapter_upload" v-for="(item1, index1) in item.taskJson[0]
+                              @dragend="dragEnd()" :draggable="isdrag == 'chapter-'+'0'+'-'+index1" class="chapter_upload" v-for="(item1, index1) in item.taskJson[0]
                                 .chapterData" :key="item1.id" @click="
                               getChapterData(
                                 $event,
@@ -250,7 +253,8 @@
                                 dragOverTop2: newIndex === index1 && typeIndex == 'chapter-'+'0'+'-'+index1 && oldIndex > index1,
                                 dragOverBottom2: newIndex === index1 && typeIndex == 'chapter-'+'0'+'-'+index1 && oldIndex < index1,
                               }">
-                              <div class="chapter_upload_drag"></div>
+                              <div @mousedown="isdrag = 'chapter-'+'0'+'-'+index1" @mouseup="isdrag = ''"
+                                  @touchstart="isdrag = 'chapter-'+'0'+'-'+index1" @touchend="isdrag = ''" class="chapter_upload_drag"></div>
                               <div class="chapter_upload_t" style="width: 100%"></div>
                               <div class="chapter_upload_o" style="
                                   position: relative;
@@ -387,7 +391,8 @@
                             </div>
                           </div>
                         </div>
-                        <div class="add_info_box" style="margin:10px 0 0" v-if="!item.taskJson[0].isFoldchapter">
+                        <!-- v-if="!item.taskJson[0].isFoldchapter" -->
+                        <div class="add_info_box" style="margin:10px 0 0">
                             <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
                               文件
                               <input type="file" accept="*" style="display: none" v-if="inputShow"
@@ -443,8 +448,9 @@
                       </div>
                     </div>
                     <div class="taskBorder" :style="{
-                      minHeight: unitJson[unitIndex].easy && 'unset',
-                    }" v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
+                      minHeight: unitJson[unitIndex].easy && 'unset', paddingBottom: '40px'
+                    }" :class="{ smallTaskBorder: itemTask.isFold === 1 }" v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
+                      <div class="taskTitle">任务{{ itemTaskIndex + 1 }}</div>
                       <div v-if="unitJson[unitIndex].easy != 1">
                         <div :style="{
                           marginBottom:
@@ -461,7 +467,7 @@
                               justify-content: flex-start;
                               align-items: center;
                             ">
-                            <div class="lineTitle">任务{{ itemTaskIndex + 1 }}概述</div>
+                            <div class="lineTitle">任务概述</div>
                           </div>
                           <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
                               flex-direction: row;
@@ -477,16 +483,17 @@
                                   itemTaskIndex
                                 ].task
                                   " />
-                              <div v-if="!itemTask.isFold2" class="show_taskD show" @click="fold2(itemTaskIndex)"><img
+                              <!-- <div v-if="!itemTask.isFold2" class="show_taskD show" @click="fold2(itemTaskIndex)"><img
                                   src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
                               <div v-else class="show_taskD" @click="fold2(itemTaskIndex)"><img
-                                  src="../../../assets/icon/new/icon-slide.png" />展开任务描述</div>
+                                  src="../../../assets/icon/new/icon-slide.png" />展开任务描述</div> -->
                             </div>
                             <div class="remove" v-if="item.taskJson.length > 1" @click="deleteTask(itemTaskIndex)"></div>
                           </div>
                         </div>
                       </div>
-                      <div style="margin: 25px 0" v-if="!itemTask.isFold2">
+                      <div style="margin: 25px 0"> 
+                         <!-- v-if="!itemTask.isFold2" -->
                         <!-- <editor-bar style="width: 90% !important; margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
                           itemTaskIndex
                         ].taskDetail
@@ -567,7 +574,7 @@
                                   其他
                                 </div> -->
                               </div>
-                              <div class="chapter_upload_ud2" style="z-index: 9;margin:0 0 0 auto" v-if="itemTask.toolChoose.length > 1">
+                              <div class="chapter_upload_ud2" style="z-index: 9;margin:0 0 0 auto" :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px auto' : '0 0 0 auto' }" v-if="itemTask.toolChoose.length > 1">
                                   <div class="chapter_upload_up2" @click.stop="
                                       upTool(
                                         $event,
@@ -585,17 +592,18 @@
                                       )
                                   ">下移</div>
                               </div>
-                              <div v-if="!itemTool.isFold3" class="show_toolD show"
+                              <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
                                 @click="fold3(itemTaskIndex, toolIndex)"
                                 :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
                                   src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
                               <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
                                 :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
-                                  src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div>
+                                  src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
                               <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
                                 v-if="itemTask.toolChoose.length > 1" style="position: absolute; right: 0;top:-5px;"></div>
                             </div>
-                            <div style="min-height: 163px" v-show="!itemTool.isFold3">
+                            <!-- v-show="!itemTool.isFold3" -->
+                            <div style="min-height: 163px" >
                               <div class="toolSort" v-if="itemTool.toolType == 0">
                                 <!-- <div class="tool">
                               <div
@@ -1679,7 +1687,8 @@
                             </div> -->
                               </div>
                             </div>
-                            <div v-show="!itemTool.isFold3">
+                            <!-- v-show="!itemTool.isFold3" -->
+                            <div>
                               <textarea rows="3" type="text" v-autoHeight="87" placeholder="添加工具描述" class="binfo_input"
                                 style="
                                   margin: 0 0 20px 0;
@@ -1698,6 +1707,17 @@
                           </button>
                         </div>
                       </div>
+                      <div class="funBlock" style="padding: 0">
+                        <div class="fold" @click="fold(itemTaskIndex, $event)">
+                          <div
+                            class="arrow"
+                            :class="{ arrowZ: !(itemTask.isFold === 1) }"
+                          ></div>
+                          <div>
+                            {{ itemTask.isFold === 1 ? "展开任务" : "收起任务" }}
+                          </div>
+                        </div>
+                      </div>
                     </div>
                     <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
                       <!-- <div>
@@ -4589,8 +4609,8 @@
       </span>
     </el-dialog>
     <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px"
-      :before-close="(done) => { closePan(69) }" class="dialog_diy fullStyle">
-      <englishRight @setEngList="setEnglishList" :englishList="englishList"></englishRight>
+      :before-close="(done) => { closePan(69) }" class="dialog_diy fullStyle fullStyle1">
+      <englishRight :englishList="englishList" :oid="oid" ref="engJson"></englishRight>
       <span slot="footer" class="dialog-footer">
         <el-button @click="englishDialogVisible = false">取 消</el-button>
         <el-button type="primary" @click="addEnglish">确 定</el-button>
@@ -4769,7 +4789,7 @@ export default {
                   toolText: "",
                   isShowTools: false,
                   askCount: 1,
-                  isFold: 0,
+                  isFold: 1,
                   askTitle: "",
                   askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
                   checkJson: [{ checkCount: [], checkPerent: [] }],
@@ -4854,6 +4874,7 @@ export default {
       oldData: null,
       newIndex: "",
       typeIndex: "",
+      isdrag: '',
     };
   },
   directives: {
@@ -5226,6 +5247,9 @@ export default {
         });
     },
     addEnglish(){
+      this.englishList.engTitle = this.$refs['engJson'].engList.engTitle;
+      this.englishList.englishText = this.$refs['engJson'].engList.englishText;
+      this.englishList.textJson = this.$refs['engJson'].engList.textJson;
       if(this.englishList.engTitle == "" || this.englishList.englishText == ""){
         this.$message.error("请将内容填写完整!");
         return;
@@ -5242,9 +5266,6 @@ export default {
         this.addTools(69, this.taskCount, this.toolIndex);
       }
     },
-    setEnglishList(engList){
-      this.englishList = engList;
-    },
     imgChange2(i, j) {
       var _tmp = this.testJson.testJson[i].checkList[j];
       this.noneBtnImg = _tmp.length >= 1;
@@ -5794,11 +5815,11 @@ export default {
               // a.splice(a.length - 1, a.length);
               _this.$message.error("上传失败");
             } else {
-              _this.cover.push({
+              _this.cover = [{
                 name: file.name,
                 url: data.Location,
                 uid: file.uid,
-              });
+              }];
               _this.imgChange1(null, null, 1, null);
               _this.choosePicVisible = false;
               console.log(data.Location);
@@ -6402,7 +6423,7 @@ export default {
                 ],
                 isShowTools: false,
                 askCount: 1,
-                isFold: 0,
+                isFold: 1,
                 askTitle: "",
                 askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
                 checkJson: [{ checkCount: [], checkPerent: [] }],
@@ -6455,7 +6476,7 @@ export default {
         toolText: "",
         isShowTools: false,
         askCount: 1,
-        isFold: 0,
+        isFold: 1,
         askTitle: "",
         askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
         checkJson: [{ checkCount: [], checkPerent: [] }],
@@ -6467,16 +6488,10 @@ export default {
       el.getElementsByTagName("input")[0].click();
     },
     fold(i, e, type) {
-      var a = e.currentTarget.parentElement.parentElement;
-      var b = e.currentTarget.parentElement;
-      if (type == 1) {
+      if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0) {
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
-        a.className += " smallTaskBorder";
-        b.className += " funBlockTop";
       } else {
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
-        a.className = "taskBorder";
-        b.className = "funBlock";
       }
       console.log(e);
     },
@@ -6692,59 +6707,81 @@ export default {
       this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
       this.$forceUpdate();
     },
-    upTool(e, i, j, tooli){
+    async upTool(e, i, j, tooli){
       e.stopPropagation();
       if (tooli == 0) {
         return;
       }
-      this.$confirm(
-        "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
-        "提示",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
-        .then(() => {
+      let count1 = await this.getWorksCount(3, i, j, tooli - 1)
+      let count2 = await this.getWorksCount(3, i, j, tooli)
+      if(count1 > 0 || count2 > 0){
+        this.$confirm(
+          "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          }
+        )
+          .then(() => {
+            var a =
+            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]));
+            this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
+              JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
+            this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
+            this.$forceUpdate()
+          })
+          .catch(() => {
+            return;
+          });
+        }else{
           var a =
-          JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]));
-          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
-            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
-          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
-          this.$forceUpdate()
-        })
-        .catch(() => {
-          return;
-        });
+            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]));
+            this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
+              JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
+            this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
+            this.$forceUpdate()
+        }
     },
-    downTool(e, i, j, tooli){
+    async downTool(e, i, j, tooli){
       e.stopPropagation();
       if ( tooli ==
         this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length -
         1) {
         return;
       }
-      this.$confirm(
-        "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
-        "提示",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
-        .then(() => {
+      let count1 = await this.getWorksCount(3, i, j, tooli + 1)
+      let count2 = await this.getWorksCount(3, i, j, tooli)
+      if(count1 > 0 || count2 > 0){
+        this.$confirm(
+          "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          }
+        )
+          .then(() => {
+            var a =
+            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]));
+            this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
+              JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
+            this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
+            this.$forceUpdate()
+          })
+          .catch(() => {
+            return;
+          });
+        }else{
           var a =
-          JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]));
-          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
-            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
-          this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
-          this.$forceUpdate()
-        })
-        .catch(() => {
-          return;
-        });
+            JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]));
+            this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
+              JSON.parse(JSON.stringify(this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]));
+            this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
+            this.$forceUpdate()
+        }
     },
     addWork() {
       let cPan = 1;
@@ -7170,7 +7207,7 @@ export default {
                       ],
                       isShowTools: false,
                       askCount: 1,
-                      isFold: 0,
+                      isFold: 1,
                       askTitle: "",
                       askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
                       checkJson: [{ checkCount: [], checkPerent: [] }],
@@ -7234,7 +7271,7 @@ export default {
                       ],
                       isShowTools: false,
                       askCount: 1,
-                      isFold: 0,
+                      isFold: 1,
                       askTitle: "",
                       askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
                       checkJson: [{ checkCount: [], checkPerent: [] }],
@@ -7682,6 +7719,7 @@ export default {
           "*"
         );
       }else if(i == 69){
+        this.englishList = {};
         this.englishList = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
           itemTaskIndex
         ].toolChoose[toolIndex].englishList
@@ -7693,6 +7731,7 @@ export default {
             )
           )
           : {  };
+        this.$forceUpdate();
         this.englishDialogVisible = true;
       }
     },
@@ -8356,10 +8395,13 @@ export default {
           return element != "";
         });
         return (
-          (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
+          el.teststitle != "" || el.timuList.length > 0 || elc.length != 0
         );
       });
       isTestJson.testCount = isTestJson.testJson.length;
+      if(!isTestJson.testCount){
+        return;
+      }
       this.testJson = isTestJson;
       this.$forceUpdate();
     },
@@ -8395,7 +8437,7 @@ export default {
           ],
           isShowTools: false,
           askCount: 1,
-          isFold: 0,
+          isFold: 1,
           askTitle: "",
           askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
           checkJson: [{ checkCount: [], checkPerent: [] }],
@@ -8445,7 +8487,7 @@ export default {
                   ],
                   isShowTools: false,
                   askCount: 1,
-                  isFold: 0,
+                  isFold: 1,
                   askTitle: "",
                   askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
                   checkJson: [{ checkCount: [], checkPerent: [] }],
@@ -9475,23 +9517,31 @@ export default {
     goToTask(i) {
       this.toolIndexType = ''
       if (this.isClickColor == (i + 1)) {
-        if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
-          this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
-        } else {
+        // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
+        //   this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
+        // } else {
           this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true
-        }
+        // }
         this.$forceUpdate();
         return;
       }
 
-      if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
-        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
-      } else {
+      // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
+      //   this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
+      // } else {
         document.querySelectorAll(".rightBox")[0].scrollTop =
           document.querySelectorAll(".taskBorder")[i + 1].offsetTop +
           document.querySelectorAll(".taskBorder")[i + 1].parentElement.parentElement.offsetTop;
         this.isClickColor = i + 1;
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true
+      // }
+      this.$forceUpdate();
+    },
+    taskOpen(i){
+      if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
+      } else {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true
       }
       this.$forceUpdate();
     },
@@ -9886,6 +9936,7 @@ export default {
       this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount].chapterData = [...newItems];
       this.newIndex = "";
       this.typeIndex = "";
+      this.isdrag = "";
       this.$forceUpdate()
     },
     dragTaskStart(val, i) {
@@ -9896,49 +9947,102 @@ export default {
       this.typeIndex = "task-" + i
       this.newIndex = i;
     },
-    dragTaskEnd() {
+    async dragTaskEnd() {
       if (this.newIndex == this.oldIndex) {
         this.typeIndex = "";
-          this.newIndex = "";
+        this.newIndex = "";
+        this.isdrag = "";
         return;
       }
-      this.$confirm(
-        "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
-        "提示",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
-        .then(() => {
-          let newItems = [...this.unitJson[this.unitIndex].chapterInfo[0].taskJson];
-          let chapterData = []
-          if (this.oldIndex == 0) {
-            chapterData = newItems[this.oldIndex].chapterData
-            newItems[this.oldIndex].chapterData = []
-          }else if(this.newIndex == 0){
-            chapterData = newItems[this.newIndex].chapterData
-            newItems[this.oldIndex].chapterData = []
-          }
-          // 删除老的节点
-          newItems.splice(this.oldIndex, 1);
-          // 在列表中目标位置增加新的节点
-          newItems.splice(this.newIndex, 0, this.oldData);
-          if (this.oldIndex == 0 || this.newIndex == 0) {
-            newItems[0].chapterData = chapterData
+      let count1 = await this.getWorksCount(2, 0, this.newIndex, 0)
+      let count2 = await this.getWorksCount(2, 0, this.oldIndex, 0)
+      if(count1 > 0 || count2 > 0){
+        this.$confirm(
+          "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
           }
-          this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [...newItems];
-          this.typeIndex = "";
-          this.newIndex = "";
-          this.$forceUpdate()
-        })
-        .catch(() => {
-          this.typeIndex = "";
-          this.newIndex = "";
-          return;
-        });
+        )
+          .then(() => {
+            let newItems = [...this.unitJson[this.unitIndex].chapterInfo[0].taskJson];
+            let chapterData = []
+            if (this.oldIndex == 0) {
+              chapterData = newItems[this.oldIndex].chapterData
+              newItems[this.oldIndex].chapterData = []
+            }else if(this.newIndex == 0){
+              chapterData = newItems[this.newIndex].chapterData
+              newItems[this.oldIndex].chapterData = []
+            }
+            // 删除老的节点
+            newItems.splice(this.oldIndex, 1);
+            // 在列表中目标位置增加新的节点
+            newItems.splice(this.newIndex, 0, this.oldData);
+            if (this.oldIndex == 0 || this.newIndex == 0) {
+              newItems[0].chapterData = chapterData
+            }
+            this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [...newItems];
+            this.typeIndex = "";
+            this.newIndex = "";
+            this.isdrag = "";
+            this.$forceUpdate()
+          })
+          .catch(() => {
+            this.typeIndex = "";
+            this.newIndex = "";
+            this.isdrag = "";
+            return;
+          });
+        }else{
+          let newItems = [...this.unitJson[this.unitIndex].chapterInfo[0].taskJson];
+            let chapterData = []
+            if (this.oldIndex == 0) {
+              chapterData = newItems[this.oldIndex].chapterData
+              newItems[this.oldIndex].chapterData = []
+            }else if(this.newIndex == 0){
+              chapterData = newItems[this.newIndex].chapterData
+              newItems[this.oldIndex].chapterData = []
+            }
+            // 删除老的节点
+            newItems.splice(this.oldIndex, 1);
+            // 在列表中目标位置增加新的节点
+            newItems.splice(this.newIndex, 0, this.oldData);
+            if (this.oldIndex == 0 || this.newIndex == 0) {
+              newItems[0].chapterData = chapterData
+            }
+            this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [...newItems];
+            this.typeIndex = "";
+            this.newIndex = "";
+            this.$forceUpdate()
+        }
     },
+    getWorksCount(type, stage, task, tool){
+      return new Promise((resolve, reject) => {
+        let params = [
+          {
+            cid: this.cid,
+            stage: stage,
+            task: task,
+            tool: tool,
+            type: type
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "getCourseWorkCount", params)
+          .then((res) => {
+            let count = res.data[0][0].count
+            resolve(count)
+          })
+          .catch((err) => {
+            resolve(0)
+            this.$message.error("网络不佳");
+            console.error(err);
+          });
+      });
+      
+    }
   },
   beforeDestroy() {
     clearTimeout(this.timer);
@@ -11015,6 +11119,10 @@ export default {
   box-sizing: border-box;
 }
 
+.chapter_upload:hover > .chapter_upload_drag{
+  display: block;
+}
+
 .chapter_upload_drag {
   position: absolute;
   cursor: pointer;
@@ -11024,6 +11132,7 @@ export default {
   background-image: url("../../../assets/icon/new/icon_course_drag.png");
   background-size: 100% 100%;
   z-index: 10;
+  display: none;
 }
 
 .chapter_upload_t {
@@ -11227,7 +11336,7 @@ export default {
 .chapter_upload_up2::before,
 .chapter_upload_down2::before {
   content: '';
-  background-image: url('../../../assets/icon/new/c_up.png');
+  background-image: url('../../../assets/icon/new/c_down.png');
   width: 14px;
   height: 14px;
   background-size: 100% 100%;
@@ -11236,7 +11345,7 @@ export default {
 }
 
 .chapter_upload_up2::before {
-  background-image: url('../../../assets/icon/new/c_down.png') !important;
+  background-image: url('../../../assets/icon/new/c_up.png') !important;
 }
 
 
@@ -11980,8 +12089,8 @@ ol {
 }
 
 .smallTaskBorder {
-  height: 170px;
-  min-height: 170px !important;
+  height: 340px;
+  min-height: 340px !important;
   overflow: hidden;
 }
 
@@ -12024,28 +12133,46 @@ ol {
   display: flex;
   padding: 15px 0;
   flex-direction: row;
-  justify-content: flex-end;
+  justify-content: center;
   align-items: center;
   position: absolute;
-  right: 15px;
-  bottom: 35px;
+  right: 0;
+  bottom: 0;
+  background: #fff;
+  width: 100%;
+  height: 60px;
   z-index: 9;
 }
 
 .fold {
   display: flex;
-  margin: 0 10px;
+  margin: 0 20px;
   flex-direction: row;
   align-items: center;
   cursor: pointer;
+  color: #2b7bff;
 }
 
 .arrow {
-  width: 15px;
-  height: 15px;
-  margin-left: 10px;
+  margin-right: 8px;
+  width: 16px;
+  height: 16px;
+  min-width: 16px;
+  min-height: 16px;
+  background-size: 100% 100%;
+  display: block;
+  background-image: url(../../../assets/icon/new/u_up.png);
+  /* border-left: 7px solid transparent;
+  border-bottom: 7px solid #717C8D;
+  border-top: 0px solid transparent;
+  border-right: 7px solid transparent; */
+  /* box-sizing: border-box; */
+  transition: all .3s;
 }
 
+.arrowZ {
+  transform: rotate(180deg);
+}
 .addToolFun {
   display: flex;
   width: 150px;
@@ -13146,14 +13273,17 @@ ol {
   cursor: pointer;
   background: #ffffff;
   width: 95%;
-  margin: 10px auto 0;
+  margin: 5px auto 5px;
   box-sizing: border-box;
   border-radius: 5px;
   flex-wrap: wrap;
   position: relative;
 }
 
-.navTask::before {
+.navTask:hover > .chapter_upload_drag{
+  display: block;
+}
+.navTask .chapter_upload_open {
   content: '';
   display: block;
   width: 16px;
@@ -13163,8 +13293,23 @@ ol {
   margin-left: 23px;
 }
 
-.isNavOpen::before {
+.noImage .chapter_upload_open {
+  display: none;
+  background-image: unset !important;
+}
+
+.isNavOpen .chapter_upload_open {
+  /* background-image: url(../../assets/icon/new/icon_arrow_a.png) !important; */
+  transform: rotate(90deg);
+}
+
+.isNavTask .chapter_upload_open {
   background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
+  transform: rotate(-90deg);
+}
+
+.isNavTask.isNavOpen .chapter_upload_open{
+  transform: rotate(0deg);
 }
 
 .dragOverTop {
@@ -13235,14 +13380,19 @@ ol {
   /* max-width: 130px; */
   /* width: 100%; */
   max-width: calc(100% - 66px);
-  white-space: nowrap;
-  overflow: hidden;
-  text-overflow: ellipsis;
   font-size: 16px;
   color: #060E17;
   /* color: #0E1E33; */
 }
 
+.navTask .nt_taskName span{
+  width: 100%;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display:block;
+}
+
 .gjBox {
   width: calc(100% - 25px);
   padding: 0 0 0 0;
@@ -13542,6 +13692,9 @@ ol {
   height: 100% !important;
   margin: 0 auto !important;
 }
+.fullStyle1>>>.el-dialog__body {
+  height: auto !important;
+}
 
 .wb_j_box_btn {
   width: calc(100% - 30px);
@@ -13704,4 +13857,21 @@ ol {
 .class_item>>>.el-checkbox__input {
   display: flex;
   align-items: center;
-}</style>
+}
+.taskTitle{
+  font-size: 20px;
+  font-weight: bold;
+  margin-bottom: 35px;
+}
+
+.taskTitle:after{
+  content: '';
+  width: 100%;
+  display: block;
+  height: 1px;
+  background: #CAD1DC;
+  position: absolute;
+  left: 0;
+  margin: 15px 0 0;
+}
+</style>

+ 293 - 23
src/components/pages/easy/commpont/englishRight.vue

@@ -1,25 +1,105 @@
 <template>
   <div class="englishBox">
     <div class="themeTitle">
-      <div>作文题目<span style="color: red;">*</span></div>
+      <div>作文题目<span style="color: red">*</span></div>
       <div>
         <el-input
           v-model="engList.engTitle"
           placeholder="请填写作文题目"
-          @change="setEngList"
         ></el-input>
       </div>
     </div>
     <div class="themeText">
-      <div>作文要求<span style="color: red;">*</span></div>
+      <div>作文要求<span style="color: red">*</span></div>
       <div>
         <editor-bar
           placeholder="请填写作文要求"
           v-model="engList.englishText"
-          @change="setEngList"
         ></editor-bar>
       </div>
     </div>
+    <div class="themeEva" style="align-items: flex-start">
+      <div>评价设置</div>
+      <div>
+        <div
+          style="
+            display: flex;
+            flex-direction: row;
+            flex-wrap: nowrap;
+            align-items: center;
+          "
+        >
+          <el-select
+            v-model="engEvaId"
+            placeholder="预设"
+            @change="setTestJson"
+          >
+            <el-option
+              v-for="(e, eIndex) in englistEva"
+              :key="eIndex"
+              :label="e.title"
+              :value="e.id"
+            >
+            </el-option>
+          </el-select>
+          <el-tooltip
+            effect="light"
+            content="点击将下列内容设置成评价模板"
+            placement="top"
+            v-if="engList.textJson.startJson.length > 0"
+          >
+            <div
+              class="addeEva"
+              @click="setEvaTitle"
+            >
+              <img src="../../../../assets/icon/addEva.png" alt="" />
+            </div>
+          </el-tooltip>
+        </div>
+        <div class="addEva">
+          <el-rate
+            v-model="engList.textJson.score"
+            disabled
+            class="engRate"
+          ></el-rate>
+          <div v-if="engList.textJson.startJson.length > 0">
+            <div
+              class="firstJson"
+              v-for="(item, index) in engList.textJson.startJson"
+              :key="index"
+            >
+              <div class="delteBox">
+                <el-input v-model="item.title"></el-input>
+                <img
+                  v-if="engList.textJson.startJson.length > 0"
+                  @click="delteItem(index)"
+                  src="../../../../assets/icon/deleteN.png"
+                  alt=""
+                />
+              </div>
+              <el-input v-model="item.detile"></el-input>
+            </div>
+          </div>
+          <div class="addeEvaItem" @click="addStartItem">
+            <img src="../../../../assets/icon/addEva.png" alt="" />
+          </div>
+        </div>
+      </div>
+    </div>
+    <el-dialog
+      title="设置名称"
+      :visible.sync="engEvadialogVisible"
+      :append-to-body="true"
+      width="500px"
+      :before-close="handleClose"
+      class="dialog_diy"
+    >
+      <el-input v-model="englishTitle" placeholder="请输入名称"></el-input>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="engEvadialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="insertEnglishEva">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -29,62 +109,252 @@ export default {
   components: {
     EditorBar,
   },
-  props: ["englishList"],
+  props: ["englishList", "oid"],
   data() {
     return {
       engList: {
         engTitle: "",
         englishText: "",
+        textJson: {
+          score: 5,
+          startJson: [],
+        },
       },
+      englistEva: [],
+      engEvaId: "",
+      englishTitle: "",
+      time: null,
+      engEvadialogVisible: false,
     };
   },
   methods: {
-    setEngList() {
-      this.$emit("setEnglish", this.engList);
+    handleClose(done) {
+      done();
+    },
+    selectEnglishEva() {
+      this.englistEva = [];
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectEnglishEva", params)
+        .then((res) => {
+          this.englistEva = res.data[0];
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    addStartItem() {
+      this.engList.textJson.startJson.push({
+        title: "",
+        detile: "",
+      });
+    },
+    delteItem(i) {
+      this.engList.textJson.startJson.splice(i, 1);
+      this.$forceUpdate();
+    },
+    setEvaTitle() {
+      this.englishTitle = "";
+      this.engEvadialogVisible = true;
+    },
+    insertEnglishEva() {
+      if (this.englishTitle == "") {
+        this.$message.error("请设置名称!");
+        return;
+      } else if (this.engList.textJson.startJson.length == 0) {
+        this.$message.error("请添加至少一条评价!");
+        return;
+      }
+      let params = [
+        {
+          t: this.englishTitle,
+          c: JSON.stringify(this.engList.textJson),
+          oid: this.oid,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "insertEnglishEva", params)
+        .then((res) => {
+          this.$message.success("添加成功!");
+          this.engEvadialogVisible = false;
+          this.selectEnglishEva();
+          this.$forceUpdate();
+        })
+        .catch((err) => {
+          this.$message.error("网络不佳");
+          console.error(err);
+        });
+    },
+    setTestJson() {
+      if (this.engEvaId != "") {
+        this.selectTextJsonById();
+      }
+    },
+    selectTextJsonById() {
+      let params = {
+        id: this.engEvaId,
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectEnglishEvaById", params)
+        .then((res) => {
+          var tJson = JSON.parse(res.data[0][0].content);
+          if (this.engList.textJson.startJson.length == 0) {
+            this.engList.textJson = tJson;
+          } else {
+            this.engList.textJson.score = tJson.score;
+            for (var i = 0; i < tJson.startJson.length; i++) {
+              this.engList.textJson.startJson.push(tJson.startJson[i]);
+            }
+          }
+          this.engEvaId = "";
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+  },
+  watch: {
+    englishList: {
+      handler(newVal) {
+        if (newVal) {
+          if(Object.keys(this.englishList).length > 0){
+            this.engList = this.englishList;
+          }else{
+            this.engList = this.engList;
+          }
+          this.$forceUpdate();
+        }
+      },
+      deep: true,
     },
   },
   created() {
-    this.engList = this.englishList;
+    this.engList =
+      Object.keys(this.englishList).length > 0
+        ? this.englishList
+        : this.engList;
+    this.selectEnglishEva();
   },
 };
 </script>
 
 <style scoped>
+.dialog_diy >>> .el-dialog__header {
+  background: #3c3c3c !important;
+  padding: 15px 20px;
+}
+
+.dialog_diy >>> .el-dialog__title {
+  color: #fff;
+}
+
+.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;
+}
+
+.dialog_diy >>> .el-dialog__body,
+.dialog_diy >>> .el-dialog__footer {
+  background: #fafafa;
+}
 .englishBox {
   width: 50%;
   margin: 50px auto 0;
 }
-.themeTitle {
+.englishBox > div:not(:first-child) {
+  margin-top: 20px;
+}
+.themeTitle,
+.themeText,
+.themeEva {
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
   align-items: center;
 }
-.themeTitle > div:first-child {
+.themeText {
+  align-items: flex-start;
+}
+.themeText > div:last-child >>> .text {
+  min-height: 400px !important;
+}
+.themeTitle > div:first-child,
+.themeText > div:first-child,
+.themeEva > div:first-child {
   min-width: 65px;
   font-weight: bold;
 }
-.themeTitle > div:last-child {
+.themeText > div:first-child {
+  margin-top: 10px;
+}
+.themeTitle > div:last-child,
+.themeText > div:last-child,
+.themeEva > div:last-child {
   width: calc(100% - 75px);
   margin-left: 10px;
 }
-.themeText {
+.addeEva {
+  width: 200px;
+  height: 40px;
+  border: 1px dashed #dbdbdb;
+  border-radius: 10px;
+  margin-left: 10px;
+  cursor: pointer;
+}
+.addeEvaItem {
+  width: 50px;
+  height: 30px;
+  border: 1px dashed #dbdbdb;
+  margin-top: 5px;
+  border-radius: 10px;
+  float: right;
+  cursor: pointer;
+}
+.addeEva > img,
+.addeEvaItem > img {
+  width: 100%;
+  height: 100%;
+  object-fit: contain;
+}
+.engRate {
+  height: 25px;
+  margin: 5px 0;
+}
+.engRate >>> .el-rate__icon {
+  font-size: 25px;
+}
+.addEva {
+  width: 100%;
+}
+.firstJson {
   display: flex;
-  flex-direction: row;
+  flex-direction: column;
   flex-wrap: nowrap;
   align-items: flex-start;
-  margin-top: 20px;
 }
-.themeText > div:first-child {
-  min-width: 65px;
-  margin-top: 10px;
-  font-weight: bold;
+.firstJson > div {
+  margin-bottom: 5px;
 }
-.themeText > div:last-child {
-  width: calc(100% - 75px);
-  margin-left: 10px;
+.delteBox {
+  position: relative;
+  width: 100%;
 }
-.themeText > div:last-child >>> .text {
-  min-height: 400px !important;
+.delteBox > img {
+  position: absolute;
+  top: 4px;
+  right: 10px;
+  width: 30px;
+  height: 30px;
+  cursor: pointer;
 }
 </style>

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

@@ -76,7 +76,7 @@
                   type="primary"
                   size="small"
                   @click="checkE(scope.row)"
-                  >查看</el-button
+                  >编辑</el-button
                 >
                 <el-button
                   class="de_button"

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott