lsc 1 vuosi sitten
vanhempi
commit
88cb144709

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.d84a5f590706779b93cf169de6f7405a.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.659f7950b2771544816e.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.750de035398c9f87da3d5e760da7dd0a.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.85e85c848c3f9e7b0225.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/app.750de035398c9f87da3d5e760da7dd0a.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/app.750de035398c9f87da3d5e760da7dd0a.css.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/app.d84a5f590706779b93cf169de6f7405a.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/app.d84a5f590706779b93cf169de6f7405a.css.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.659f7950b2771544816e.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.85e85c848c3f9e7b0225.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.85e85c848c3f9e7b0225.js.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 8 - 1
src/App.vue

@@ -484,12 +484,19 @@ html::-webkit-scrollbar-thumb {
   max-width: 150px;
 }
 
+.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).active {
     background-color: #0061FF !important;
-    color: #FFF;
+    color: #FFF !important;
+
 }
 
 .el-pagination.is-background .el-pager li:not(.disabled):hover {
     color: #0061FF !important;
 }
+
 </style>

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

@@ -36,7 +36,7 @@ export default {
           top: "10%",
           left: "5%",
           right: "5%",
-          bottom: "10%",
+          bottom: "15%",
           containLabel: true,
         },
         yAxis: {

+ 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>

+ 53 - 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,18 @@ 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",
         },
         grid: {
-          top: "15%",
+          top: "5%",
           left: "5%",
           right: "5%",
           bottom: "5%",
@@ -40,16 +46,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 +73,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: "10%",
+          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) {

+ 330 - 181
src/components/pages/dataBoardNew/project/index.vue

@@ -13,47 +13,44 @@
           <div class="info_box">
             <div class="info blueBG">
               <span>项目总数</span>
-              <!-- <span>{{ count }}</span> -->
-              <span>{{ 15130 }}</span>
+              <span>{{ allCourse }}</span>
             </div>
             <div class="info blueBG">
               <span>本月新增项目环比</span>
-              <!-- <span>{{ weekCount }}</span> -->
-              <span>{{ "80%" }}</span>
+              <span v-if="loginCountMonthArray.length">{{
+                loginCountMonthArray[loginCountMonthArray.length - 1].course -
+                loginCountMonthArray[loginCountMonthArray.length - 2].course < 0 ? 0 : (
+                  (loginCountMonthArray[loginCountMonthArray.length - 1].course -
+                    loginCountMonthArray[loginCountMonthArray.length - 2].course) / (allCourse -
+                      loginCountMonthArray[loginCountMonthArray.length - 1].course)).toFixed(2) * 100 + "%" }}</span>
+                  <span v-else>0</span>
             </div>
             <div class="info blueBG">
               <span>模板项目总数</span>
-              <!-- <span>{{ weekCount }}</span> -->
-              <span>{{ 18 }}</span>
+              <span>{{ courseTemplate }}</span>
             </div>
             <div class="info blueBG">
               <span>本月新增项目总数</span>
-              <!-- <span>{{ weekCount }}</span> -->
-              <span>{{ 18 }}</span>
+              <span v-if="loginCountMonthArray.length">{{
+                loginCountMonthArray[loginCountMonthArray.length - 1].course
+              }}</span>
+              <span v-else>0</span>
             </div>
           </div>
-          <TeaFre style="height: calc(100% - 140px)"></TeaFre>
+          <TeaFre style="height: calc(100% - 140px)" :monthArray="loginCountMonthArray"></TeaFre>
         </div>
       </div>
       <div class="bottom">
         <div class="titleBox">
-          <div
-            class="title"
-            :class="{ isClick: skType == 0 }"
-            @click="skType = 0"
-            style="cursor: pointer; padding: 0 0 5px 0"
-          >
+          <div class="title" :class="{ isClick: skType == 0 }" @click="skType = 0"
+            style="cursor: pointer; padding: 0 0 5px 0">
             项目时长
           </div>
-          <div
-            class="title"
-            :class="{ isClick: skType == 1 }"
-            @click="skType = 1"
-            style="cursor: pointer; padding: 0 0 5px 0"
-          >
-            开展频次
+          <div class="title" :class="{ isClick: skType == 1 }" @click="skType = 1"
+            style="cursor: pointer; padding: 0 0 5px 0">
+            作业数量
           </div>
-          <el-select v-model="cType" class="selectBox" style="width: 110px">
+          <!-- <el-select v-model="cType" class="selectBox" style="width: 110px">
             <el-option label="全部年级" value="全部年级"></el-option>
             <el-option label="一年级" value="一年级"></el-option>
             <el-option label="二年级" value="二年级"></el-option>
@@ -63,114 +60,90 @@
             <div @click="tType = 0" :class="{ isClick: tType == 0 }">周</div>
             <div @click="tType = 1" :class="{ isClick: tType == 1 }">月</div>
             <div @click="tType = 2" :class="{ isClick: tType == 2 }">学期</div>
-          </div>
+          </div> -->
         </div>
-        <div class="info_box" v-if="!oType">
-          <div class="info blueBG">
-            <span>开展频次</span>
-            <!-- <span>{{ count }}</span> -->
-            <span>{{ 15130 }}</span>
+        <div class="info_box" v-if="skType == 1">
+          <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
+            <span>作业数量</span>
+            <span>{{ worksCount }}</span>
           </div>
-          <div class="info blueBG">
+          <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
             <span>项目开展总数</span>
-            <!-- <span>{{ weekCount }}</span> -->
-            <span>{{ "80%" }}</span>
+            <span>{{ haveWorksCourse }}</span>
           </div>
-          <div class="info blueBG">
-            <span>项目平均开展次数</span>
-            <!-- <span>{{ weekCount }}</span> -->
-            <span>{{ 18 }}</span>
+          <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
+            <span>项目平均作业数量</span>
+            <span>{{
+              !worksCount ? 0 : (worksCount / haveWorksCourse).toFixed(0)
+            }}</span>
           </div>
         </div>
-        <div class="info_box" v-if="oType">
-          <div class="info blueBG">
+        <div class="info_box" v-if="skType == 0">
+          <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
             <span>累计时长</span>
-            <!-- <span>{{ count }}</span> -->
-            <span>{{ 15130 }}</span>
+            <span>{{ 132 }}</span>
           </div>
-          <div class="info blueBG">
-            <span>开展项目总数</span>
-            <!-- <span>{{ weekCount }}</span> -->
-            <span>{{ "80%" }}</span>
+          <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
+            <span>项目开展总数</span>
+            <span>{{ haveWorksCourse }}</span>
           </div>
-          <div class="info blueBG">
+          <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
             <span>项目平均时长</span>
-            <!-- <span>{{ weekCount }}</span> -->
             <span>{{ 18 }}</span>
           </div>
         </div>
-        <div class="dataBox">
-          <ToolUse style="height: calc(100% - 170px)" v-if="!oType"></ToolUse>
-          <Bar style="height: calc(100% - 170px)" v-if="oType"></Bar>
-          <div class="otherCss">
+        <div class="dataBox" style="height: calc(100% - 110px);">
+          <ToolUse style="height: calc(100%)" v-if="skType == 1" :worksYearArray="worksYearArray"></ToolUse>
+          <Bar style="height: calc(100%)" v-if="skType == 0"></Bar>
+          <!-- <div class="otherCss">
             <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>
       </div>
     </div>
     <div class="center">
       <div class="top">
         <div class="titleBox">
-          <div
-            class="title"
-            :class="{ isClick: courseType == 0 }"
-            @click="courseType = 0"
-            style="cursor: pointer; padding: 0 0 5px 0"
-          >
+          <div class="title" :class="{ isClick: courseType == 0 }" @click="courseType = 0"
+            style="cursor: pointer; padding: 0 0 5px 0">
             项目分布
           </div>
-          <div
-            class="title"
-            :class="{ isClick: courseType == 1 }"
-            @click="courseType = 1"
-            style="cursor: pointer; padding: 0 0 5px 0"
-          >
+          <div class="title" :class="{ isClick: courseType == 1 }" @click="courseType = 1"
+            style="cursor: pointer; padding: 0 0 5px 0">
             项目总数增幅
           </div>
         </div>
         <div class="dataBox">
-          <CateRank
-            v-if="courseType == 0"
-            style="height: calc(100%)"
-          ></CateRank>
-          <CourseNum
-            v-if="courseType == 1"
-            style="height: calc(100%)"
-          ></CourseNum>
+          <CateRank v-if="courseType == 0" style="height: calc(100%)"></CateRank>
+          <CourseNum v-if="courseType == 1" style="height: calc(100%)"></CourseNum>
         </div>
       </div>
       <div class="bottom">
         <div class="titleBox" style="justify-content: space-between">
           <div class="title">项目开展情况</div>
-          <div
-            v-if="!shType"
-            style="
+          <!-- <div v-if="!shType" style="
               display: flex;
               flex-direction: row;
               flex-wrap: nowrap;
               align-items: center;
-            "
-          >
+            ">
             <el-select v-model="cType8" class="selectBox" style="width: 110px">
               <el-option label="全部年级" value="全部年级"></el-option>
             </el-select>
             <el-select v-model="cType9" class="selectBox" style="width: 110px">
               <el-option label="全部学科" value="全部学科"></el-option>
             </el-select>
-          </div>
-          <div
-            v-if="shType"
-            style="
+          </div> -->
+          <!-- <div v-if="shType" style="
               display: flex;
               flex-direction: row;
               flex-wrap: nowrap;
               align-items: center;
-            "
-          >
+            ">
             <el-select v-model="cType1" class="selectBox" style="width: 110px">
               <el-option label="全部年级" value="全部年级"></el-option>
             </el-select>
@@ -180,36 +153,29 @@
             <el-select v-model="cType3" class="selectBox" style="width: 110px">
               <el-option label="全部主题" value="全部主题"></el-option>
             </el-select>
-          </div>
+          </div> -->
         </div>
         <div class="dataBox">
-          <CourseTime
-            v-if="!shType"
-            style="height: calc(100% - 30px)"
-          ></CourseTime>
+          <CourseTime v-if="!shType" style="height: calc(100% - 30px)"></CourseTime>
           <div class="info_box" v-if="shType">
-            <div class="info blueBG">
+            <div class="info blueBG" style="width: calc(100% / 4 - 10px)">
               <span>项目实施总数</span>
-              <!-- <span>{{ count }}</span> -->
-              <span>{{ 15130 }}</span>
+              <span>{{ haveWorksCourse }}</span>
             </div>
-            <div class="info blueBG">
+            <div class="info blueBG" style="width: calc(100% / 4 - 10px)">
               <span>平台实施项目占比</span>
-              <!-- <span>{{ weekCount }}</span> -->
-              <span>{{ "80%" }}</span>
+              <span>{{ haveWorksCourse && allCourse ? (haveWorksCourse / allCourse * 100).toFixed(0) + '%' : 0 + '%' }}</span>
             </div>
-            <div class="info blueBG">
+            <div class="info blueBG" style="width: calc(100% / 4 - 10px)">
               <span>项目平均任务数量</span>
-              <!-- <span>{{ weekCount }}</span> -->
-              <span>{{ 18 }}</span>
+              <span>{{ taskCount && allCourse ? (taskCount / allCourse).toFixed(0) : 0 }}</span>
             </div>
-            <div class="info blueBG">
+            <div class="info blueBG" style="width: calc(100% / 4 - 10px)">
               <span>项目平均作业数量</span>
-              <!-- <span>{{ weekCount }}</span> -->
-              <span>{{ 18 }}</span>
+              <span>{{ worksCount && allCourse ? (worksCount / allCourse).toFixed(0) : 0 }}</span>
             </div>
           </div>
-          <WorkNum v-if="shType"></WorkNum>
+          <WorkNum v-if="shType" style="height: calc(100% - 105px)" :workNumList="workNumList"></WorkNum>
           <div class="otherCss">
             <div v-if="!shType">转换为散点图</div>
             <div v-if="shType">转换为堆积柱状图</div>
@@ -223,50 +189,32 @@
     <div class="right">
       <div class="top" style="border-radius: 5px">
         <div class="titleBox" style="justify-content: space-between">
-          <div
-            style="
+          <div style="
               display: flex;
               flex-direction: row;
               flex-wrap: nowrap;
               align-items: center;
-            "
-          >
-            <div
-              class="title"
-              :class="{ isClick: toolType == 0 }"
-              @click="toolType = 0"
-              style="cursor: pointer; padding: 0 0 5px 0"
-            >
+            ">
+            <div class="title" :class="{ isClick: toolType == 0 }" @click="toolType = 0"
+              style="cursor: pointer; padding: 0 0 5px 0">
               项目占比
             </div>
-            <div
-              class="title"
-              :class="{ isClick: toolType == 1 }"
-              @click="toolType = 1"
-              style="cursor: pointer; padding: 0 0 5px 0"
-            >
+            <div class="title" :class="{ isClick: toolType == 1 }" @click="toolType = 1"
+              style="cursor: pointer; padding: 0 0 5px 0">
               工具使用
             </div>
           </div>
-          <el-select
-            v-model="cType4"
-            class="selectBox"
-            style="width: 110px"
-            v-if="toolType == 0"
-          >
+          <!-- <el-select v-model="cType4" class="selectBox" style="width: 110px" v-if="toolType == 0">
             <el-option label="按年级" value="按年级"></el-option>
             <el-option label="按学科" value="按学科"></el-option>
             <el-option label="按主题" value="按主题"></el-option>
-          </el-select>
-          <div
-            v-if="toolType == 1"
-            style="
+          </el-select> -->
+          <!-- <div v-if="toolType == 1" style="
               display: flex;
               flex-direction: row;
               flex-wrap: nowrap;
               align-items: center;
-            "
-          >
+            ">
             <el-select v-model="cType5" class="selectBox" style="width: 110px">
               <el-option label="全部学科" value="全部学科"></el-option>
               <el-option label="语文" value="语文"></el-option>
@@ -277,17 +225,11 @@
               <el-option label="一年级" value="一年级"></el-option>
               <el-option label="二年级" value="二年级"></el-option>
             </el-select>
-          </div>
+          </div> -->
         </div>
         <div class="dataBox">
-          <CourseAna
-            style="height: calc(100% - 40px)"
-            v-if="toolType == 0"
-          ></CourseAna>
-          <ToolChart
-            style="height: calc(100% - 40px)"
-            v-if="toolType == 1"
-          ></ToolChart>
+          <CourseAna style="height: calc(100% - 40px)" v-if="toolType == 0"></CourseAna>
+          <ToolChart style="height: calc(100% - 40px)" v-if="toolType == 1" :toolArray="toolList"></ToolChart>
         </div>
       </div>
       <div class="bottom">
@@ -295,7 +237,8 @@
           <div class="title">项目学科分布</div>
         </div>
         <div class="dataBox">
-          <WorkTime style="height: calc(100% - 72px)" v-if="xtType"></WorkTime>
+          <subjuect style="height: calc(100% - 30px)" v-if="!xtType"></subjuect>
+          <WorkTime style="height: calc(100% - 30px)" v-if="xtType" :personArray="personList"></WorkTime>
           <div class="otherCss">
             <div v-if="!xtType">转换为人员协同</div>
             <div v-if="xtType">转换为学科协同</div>
@@ -320,6 +263,7 @@ import WorkTime from "./chartList/workTime.vue";
 import Bar from "./chartList/bar.vue";
 import CourseNum from "./chartList/courseNum.vue";
 import ToolChart from "./chartList/toolChart.vue";
+import subjuect from "./chartList/subjuect.vue";
 export default {
   components: {
     TeaFre,
@@ -332,6 +276,7 @@ export default {
     Bar,
     CourseNum,
     ToolChart,
+    subjuect
   },
   props: {
     oid: {
@@ -362,6 +307,15 @@ export default {
       oType: false,
       shType: false,
       xtType: false,
+      allCourse: 0,
+      courseTemplate: 0,
+      loginCountMonthArray: [],
+      haveWorksCourse: 0,
+      worksCount: 0,
+      workNumList: [],
+      taskCount: 0,
+      toolList: [],
+      personList: [],
     };
   },
   mounted() {
@@ -377,6 +331,9 @@ export default {
     xtEchart() {
       this.xtType = !this.xtType;
     },
+    format(percentage) {
+      return percentage + '%';
+    },
     getData() {
       this.isLoading = true;
       let params = [
@@ -391,6 +348,197 @@ export default {
           this.isLoading = false;
           let _grade = res.data[0]; //赛道
           let _subject = res.data[1]; //主题
+          this.allCourse = res.data[2][0].count; //课程总数
+          let _timeCourse = res.data[3]; //查询半年内全部课程
+          this.courseTemplate = res.data[4][0].count; //查询模板课程总数
+
+          //将数据根据time里面的月份分成多个数组
+          let loginCountMonthArray = [];
+          const date = new Date();
+          var Month = date.getMonth() + 1;
+          var Year = date.getFullYear();
+          for (var i = Month; i > Month - 6; i--) {
+            if (i <= 0) {
+              loginCountMonthArray.push({
+                Year: Year - 1,
+                Month: 12 + i,
+                course: 0,
+              });
+            } else {
+              loginCountMonthArray.push({
+                Month: i,
+                Year: Year,
+                course: 0,
+              });
+            }
+          }
+          loginCountMonthArray = loginCountMonthArray.reverse();
+          for (var i = 0; i < _timeCourse.length; i++) {
+            let _date = new Date(_timeCourse[i].time);
+            var _month = _date.getMonth() + 1;
+            var _year = _date.getFullYear();
+            for (var j = 0; j < loginCountMonthArray.length; j++) {
+              if (
+                _month == loginCountMonthArray[j].Month &&
+                _year == loginCountMonthArray[j].Year
+              ) {
+                loginCountMonthArray[j].course++;
+                break;
+              }
+            }
+          }
+          this.loginCountMonthArray = loginCountMonthArray;
+
+          this.haveWorksCourse = res.data[5][0].count; //项目开展总数
+          this.worksCount = res.data[6][0].count; //作业数量
+
+          let worksArray = res.data[7];//一年内提交的作业
+          let worksYearArray = []
+          for (var i = Month; i > Month - 12; i--) {
+            if (i <= 0) {
+              worksYearArray.push({
+                Year: Year - 1,
+                Month: 12 + i,
+                mon: 0,
+                tue: 0,
+                wed: 0,
+                thur: 0,
+                fri: 0,
+                sat: 0,
+                sun: 0,
+              })
+            } else {
+              worksYearArray.push({
+                Month: i,
+                Year: Year,
+                mon: 0,
+                tue: 0,
+                wed: 0,
+                thur: 0,
+                fri: 0,
+                sat: 0,
+                sun: 0,
+              })
+            }
+          }
+          worksYearArray = worksYearArray.reverse()
+          for (var i = 0; i < worksArray.length; i++) {
+            let _date = new Date(worksArray[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 < worksYearArray.length; j++) {
+              if (_month == worksYearArray[j].Month && _year == worksYearArray[j].Year) {
+                worksYearArray[j][dayArray[_day]]++
+                break;
+              }
+            }
+          }
+          console.log(worksYearArray);
+          this.worksYearArray = worksYearArray
+
+
+          let _workCourse = res.data[8]; //带作业的课程
+          let _taskCount = 0 //任务数量
+          var toolAllArray = [
+            { name: "电子白板", value: 0 },
+            { name: "思维导图", value: 0 },
+            { name: "表格", value: 0 },
+            { name: "文档", value: 0 },
+            { name: "资源库", value: 0 },
+            { name: "拍照", value: 0 },
+            { name: "投票", value: 0 },
+            { name: "CocoPi", value: 0 },
+            { name: "其他", value: 0 },
+          ];
+          var twoPerson = 0,threePerson = 0,fivePerson = 0,sevenPerson = 0;
+          let personList = []
+          var wList = [];
+          for (var i = 0; i < _workCourse.length; i++) {
+            if (!wList[_workCourse[i].courseId]) {
+              wList[_workCourse[i].courseId] = {
+                cid: _workCourse[i].courseId,
+                title: _workCourse[i].title,
+                task: 0,
+                work: 0,
+              };
+              let chapters = JSON.parse(_workCourse[i].chapters);
+              for (var j = 0; j < chapters.length; j++) {
+                if (wList[_workCourse[i].courseId].task == 0) {
+                  wList[_workCourse[i].courseId].task =
+                    chapters[j].chapterInfo[0].taskJson.length;
+                } else {
+                  wList[_workCourse[i].courseId].task +=
+                    chapters[j].chapterInfo[0].taskJson.length;
+                }
+                _taskCount += chapters[j].chapterInfo[0].taskJson.length;
+                let _taskJson = chapters[j].chapterInfo[0].taskJson
+                for (
+                    var k = 0;
+                    k < _taskJson.length;
+                    k++
+                  ) {
+                    for (
+                      var q = 0;
+                      q <
+                        _taskJson[k].toolArray.length;
+                      q++
+                    ) {
+                        if(_taskJson[k].toolArray[q].tool == 1){
+                          toolAllArray[0].value++;
+                        }else if(_taskJson[k].toolArray[q].tool == 3){
+                          toolAllArray[1].value++;
+                        }else if(_taskJson[k].toolArray[q].tool == 48){
+                          toolAllArray[2].value++;
+                        }else if(_taskJson[k].toolArray[q].tool == 52){
+                          toolAllArray[3].value++;
+                        }else if(_taskJson[k].toolArray[q].tool == 51){
+                          toolAllArray[4].value++;
+                        }else if(_taskJson[k].toolArray[q].tool == 54){
+                          toolAllArray[5].value++;
+                        }else if(_taskJson[k].toolArray[q].tool == 56){
+                          toolAllArray[6].value++;
+                        }else if(_taskJson[k].toolArray[q].tool == 57){
+                          toolAllArray[7].value++;
+                        }else{
+                          toolAllArray[8].value++;
+                        }
+                    }
+                  }
+              }
+              if(_workCourse[i].course_teacher){
+                if(_workCourse[i].course_teacher.split(',').length <= 2){
+                  twoPerson++
+                }else if(4 >= _workCourse[i].course_teacher.split(',').length && _workCourse[i].course_teacher.split(',').length > 2){
+                  threePerson++;
+                }else if(6 >= _workCourse[i].course_teacher.split(',').length && _workCourse[i].course_teacher.split(',').length > 4){
+                  fivePerson++;
+                }else if(_workCourse[i].course_teacher.split(',').length >= 7){
+                  sevenPerson++;
+                }
+              }
+            }
+          }
+          for (var i = 0; i < _workCourse.length; i++) {
+            let a = Object.keys(wList);
+            for (var j = 0; j < Object.keys(wList).length; j++) {
+              if (_workCourse[i].courseId == wList[a[j]].cid && _workCourse[i].id) {
+                wList[a[j]].work++;
+              }
+            }
+          }
+          var workNumList = Object.values(wList).map((item) => [
+            item.task,
+            item.work,
+            item.title,
+            item.cid,
+          ]);
+          this.workNumList = workNumList;
+          this.taskCount = _taskCount
+          this.toolList = toolAllArray;
+          personList.push({ name:"2人以下",value: twoPerson },{ name:"3-4人",value: threePerson },{ name:"5-6人",value: fivePerson },{ name:"7人以上",value: sevenPerson });
+          this.personList = personList;
 
           this.$forceUpdate();
         })
@@ -418,7 +566,7 @@ export default {
   height: 100%;
 }
 
-.left > .top {
+.left>.top {
   width: 100%;
   height: calc(100% / 2 - 10px);
   background: #fff;
@@ -426,7 +574,7 @@ export default {
   margin: 0 0 20px 0;
 }
 
-.left > .bottom {
+.left>.bottom {
   width: 100%;
   height: calc(100% / 2 - 10px);
   background: #fff;
@@ -439,7 +587,7 @@ export default {
   margin: 0 20px;
 }
 
-.center > .top {
+.center>.top {
   width: 100%;
   height: calc(100% / 5 * 3 - 10px);
   background: #fff;
@@ -447,7 +595,7 @@ export default {
   margin: 0 0 20px 0;
 }
 
-.center > .bottom {
+.center>.bottom {
   width: 100%;
   height: calc(100% / 5 * 2 - 10px);
   background: #fff;
@@ -459,7 +607,7 @@ export default {
   height: 100%;
 }
 
-.right > .top {
+.right>.top {
   width: 100%;
   height: calc(100% / 2 - 10px);
   background: #fff;
@@ -467,7 +615,7 @@ export default {
   margin: 0 0 20px 0;
 }
 
-.right > .bottom {
+.right>.bottom {
   width: 100%;
   height: calc(100% / 2 - 10px);
   background: #fff;
@@ -512,43 +660,38 @@ export default {
   padding: 0 10px;
   margin: 0 10px;
 }
+
 .teaMiddle {
   width: calc(100% / 3 - 10px);
 }
 
 .cNum {
-  background: linear-gradient(
-    180deg,
-    rgb(125, 227, 174, 0.2) 0%,
-    rgb(23, 196, 105, 0.3) 100%
-  ) !important;
+  background: linear-gradient(180deg,
+      rgb(125, 227, 174, 0.2) 0%,
+      rgb(23, 196, 105, 0.3) 100%) !important;
 }
 
 .tNum {
-  background: linear-gradient(
-    180deg,
-    rgb(174, 204, 254, 0.2) 0%,
-    rgb(54, 129, 252, 0.3) 100%
-  ) !important;
+  background: linear-gradient(180deg,
+      rgb(174, 204, 254, 0.2) 0%,
+      rgb(54, 129, 252, 0.3) 100%) !important;
 }
 
 .tSum {
-  background: linear-gradient(
-    180deg,
-    rgb(125, 227, 174, 0.2) 0%,
-    rgb(23, 196, 105, 0.3) 100%
-  ) !important;
+  background: linear-gradient(180deg,
+      rgb(125, 227, 174, 0.2) 0%,
+      rgb(23, 196, 105, 0.3) 100%) !important;
 }
 
-.teaLeft > div:first-child,
-.teaMiddle > div:first-child {
+.teaLeft>div:first-child,
+.teaMiddle>div:first-child {
   font-size: 12px;
   font-weight: 400;
   color: #565e6a;
 }
 
-.teaLeft > div:last-child,
-.teaMiddle > div:last-child {
+.teaLeft>div:last-child,
+.teaMiddle>div:last-child {
   font-size: 22px;
   font-weight: bold;
   color: #060e17;
@@ -558,17 +701,18 @@ export default {
   width: 50%;
   height: 100%;
 }
+
 .selectBox {
   width: 80px;
   margin-left: 10px;
 }
 
-.selectBox >>> .el-input__inner {
+.selectBox>>>.el-input__inner {
   height: 30px;
   line-height: 30px;
 }
 
-.selectBox >>> .el-input__icon {
+.selectBox>>>.el-input__icon {
   line-height: 30px;
 }
 
@@ -580,7 +724,7 @@ export default {
   margin: 0 0 0 15px;
 }
 
-.timeDiv > div {
+.timeDiv>div {
   margin-right: 10px;
   cursor: pointer;
 }
@@ -598,16 +742,19 @@ export default {
   align-items: center;
   justify-content: flex-end;
 }
+
 .otherImg {
   width: 20px;
   height: 20px;
   margin: 0 10px;
   cursor: pointer;
 }
-.otherImg > img {
+
+.otherImg>img {
   width: 100%;
   height: 100%;
 }
+
 .allBox {
   width: 100%;
   height: 100%;
@@ -616,10 +763,12 @@ export default {
   flex-wrap: nowrap;
   align-items: center;
 }
+
 .allBox_left {
   width: 30%;
   height: 100%;
 }
+
 .allBox_right {
   display: flex;
   flex-wrap: wrap;
@@ -638,13 +787,13 @@ export default {
   justify-content: center;
 }
 
-.depth > span:nth-child(1) {
+.depth>span:nth-child(1) {
   font-size: 14px;
   font-weight: 700;
   margin: 0 0 10px;
 }
-.depth > div:nth-child(1) {
-}
+
+.depth>div:nth-child(1) {}
 
 .info_box {
   display: flex;
@@ -655,9 +804,9 @@ export default {
   margin: 0 auto;
 }
 
-.info_box > .info2,
-.info_box > .info3,
-.info_box > .info {
+.info_box>.info2,
+.info_box>.info3,
+.info_box>.info {
   width: calc(50% - 10px);
   display: flex;
   flex-direction: row;
@@ -671,19 +820,19 @@ export default {
   border-radius: 5px;
 }
 
-.info_box > .info2 {
+.info_box>.info2 {
   width: calc(100% / 4 - 10px);
   /* align-items: flex-end; */
 }
 
-.info_box > .info3 {
+.info_box>.info3 {
   width: 100%;
   margin-bottom: 5px;
 }
 
-.info_box > .info2 > span:nth-child(1),
-.info_box > .info3 > span:nth-child(1),
-.info_box > .info > span:nth-child(1) {
+.info_box>.info2>span:nth-child(1),
+.info_box>.info3>span:nth-child(1),
+.info_box>.info>span:nth-child(1) {
   font-size: 14px;
   /* margin: 0 0 0 20px; */
   color: #565e6a;
@@ -692,9 +841,9 @@ export default {
   word-break: break-all;
 }
 
-.info_box > .info2 > span:nth-child(2),
-.info_box > .info3 > span:nth-child(2),
-.info_box > .info > span:nth-child(2) {
+.info_box>.info2>span:nth-child(2),
+.info_box>.info3>span:nth-child(2),
+.info_box>.info>span:nth-child(2) {
   font-size: 24px;
   /* font-weight: 700; */
 }

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä