zengyicheng 1 year ago
parent
commit
c84d8cca71

File diff suppressed because it is too large
+ 1 - 18150
package-lock.json


+ 1 - 0
package.json

@@ -21,6 +21,7 @@
     "gantt-elastic": "^1.0.12",
     "gantt-elastic-header": "^0.1.11",
     "hevue-img-preview": "^5.0.3",
+    "highcharts": "^11.1.0",
     "highcharts-vue": "^1.4.3",
     "html-docx-js": "^0.3.1",
     "image-conversion": "^2.1.1",

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

@@ -26,11 +26,11 @@ export default {
       },
       option: {
         title: {
-          text: '授课时长',
+          text: "授课时长",
           textStyle: {
             fontSize: 12,
           },
-          padding: [10, 0, 0, 10]
+          padding: [10, 0, 0, 10],
         },
         tooltip: {
           trigger: "axis",
@@ -38,6 +38,17 @@ export default {
             type: "shadow",
           },
         },
+        dataZoom: [
+          {
+            // start: 50,
+            type: "inside",
+            yAxisIndex: 0,
+          },
+          {
+            type: "slider",
+            yAxisIndex: 0,
+          },
+        ],
         grid: {
           top: "10%",
           left: "5%",

+ 19 - 108
src/components/pages/dataBoardNew/course/chartList/cateRank.vue

@@ -37,94 +37,6 @@ export default {
         };
     },
     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,25 +48,26 @@ 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 = [];
@@ -181,7 +94,7 @@ export default {
                         type: 'scatter',
                         data: [],
                         symbolSize: function (dataItem) {
-                            return dataItem[1];
+                            return dataItem[1] * 3;
                         }
                     });
                 });
@@ -197,7 +110,6 @@ export default {
             });
         },
         setJson(array) {
-            this.setChart(this.ooption);
             if (array != undefined && array.length > 0) {
                 this.ooption = {
                     hours: [],
@@ -290,7 +202,6 @@ export default {
         // this.courseArray = this.courseArray.filter(item => {
         //     return ['一年级','二年级','三年级','四年级','五年级','六年级','七年级'].indexOf(item.name) !== -1
         // })
-
         this.setJson(this.courseArray)
         var _this = this;
         window.addEventListener("resize", () => {

+ 51 - 13
src/components/pages/dataBoardNew/course/chartList/courseAna.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,46 @@ 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) {
+          console.log(param);  //X轴的值
+          _this.$emit('openCourse', param.dataIndex)
+        });
         // 初始化雷达图
         this.chartObj = chartObj;
         this.chartObj.setOption(this.option);
       });
     },
+    setArray(array) {
+      this.ooption = {
+        data: [],
+      };
+      for (var i = 0; i < array.length; i++) {
+        this.ooption.data.push({ value: array[i].course, name: array[i].name });
+      }
+      if (!this.chartObj) {
+        this.setChart(this.ooption);
+      } else {
+        this.option.series[0].data = this.ooption.data;
+        this.chartObj.setOption(this.option);
+      }
+      this.$forceUpdate();
+    },
   },
   watch: {
+    courseNumberArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue);
+        this.$forceUpdate();
+      },
+    },
   },
   mounted() {
-    this.setChart();
+    this.setArray(this.courseNumberArray);
     var _this = this;
     window.addEventListener("resize", () => {
       if (_this.chartObj) {

+ 109 - 33
src/components/pages/dataBoardNew/course/chartList/courseNum.vue

@@ -1,42 +1,105 @@
 <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
+          }
+        },
+        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 +110,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].lastCourse)
+        this.option.series[1].data.push(array[i].toCourse)
+      }
+    }
+  },
+  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>

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

@@ -12,6 +12,11 @@
 
 <script>
 export default {
+  props: {
+    pusaDep: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -21,7 +26,7 @@ export default {
           formatter: "{b} : {c}%",
         },
         // legend: {
-        //   data: ["教学评一体化课程", "已评价课程", "已提交作业课程", "设置评价课程", "课程总数"],
+        //   data: ["评价", "授课", "创建", "登录"],
         // },
         series: [
           {
@@ -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>
 

+ 139 - 0
src/components/pages/dataBoardNew/course/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>

+ 44 - 14
src/components/pages/dataBoardNew/course/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/course/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: {
+    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>

+ 70 - 36
src/components/pages/dataBoardNew/course/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: "10%",
+          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/course/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) {

+ 598 - 109
src/components/pages/dataBoardNew/course/index.vue

@@ -19,7 +19,7 @@
             <div class="info blueBG">
               <span>本月新增课程环比</span>
               <!-- <span>{{ weekCount }}</span> -->
-              <span>{{
+              <span v-if="loginCountMonthArray.length">{{
                 loginCountMonthArray[loginCountMonthArray.length - 1].course -
                   loginCountMonthArray[loginCountMonthArray.length - 2].course <
                 0
@@ -45,7 +45,7 @@
             <div class="info blueBG">
               <span>本月新增课程总数</span>
               <!-- <span>{{ weekCount }}</span> -->
-              <span>{{
+              <span v-if="loginCountMonthArray.length">{{
                 loginCountMonthArray[loginCountMonthArray.length - 1].course
               }}</span>
             </div>
@@ -72,14 +72,28 @@
             @click="skType = 1"
             style="cursor: pointer; padding: 0 0 5px 0"
           >
-            授课频次
+            作业数量
           </div>
           <el-select
+            v-if="skType == 0"
             v-model="lType"
             @change="typeChange1"
             class="selectBox"
             style="margin-left: auto"
           >
+            <el-option label="全部" value="all"></el-option>
+            <el-option label="年级" value="grade"></el-option>
+            <el-option label="主题" value="theme"></el-option>
+            <el-option label="学科" value="subject"></el-option>
+          </el-select>
+          <el-select
+            v-if="skType == 1"
+            v-model="lType1"
+            @change="typeChange2"
+            class="selectBox"
+            style="margin-left: auto"
+          >
+            <el-option label="全部" value="all"></el-option>
             <el-option label="年级" value="grade"></el-option>
             <el-option label="主题" value="theme"></el-option>
             <el-option label="学科" value="subject"></el-option>
@@ -119,19 +133,21 @@
           </div>
           <div class="info_box" style="width: 96%" v-if="skType == 1">
             <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
-              <span>授课频次</span>
+              <span>作业数量</span>
               <!-- <span>{{ count }}</span> -->
-              <span>{{ 153 }}</span>
+              <span>{{ worksCount }}</span>
             </div>
             <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
               <span>课程开展总数</span>
               <!-- <span>{{ weekCount }}</span> -->
-              <span>{{ 4 }}</span>
+              <span>{{ haveWorksCourse }}</span>
             </div>
             <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
-              <span>课程平均授课次数</span>
+              <span>课程平均作业数量</span>
               <!-- <span>{{ weekCount }}</span> -->
-              <span>{{ 4 }}</span>
+              <span>{{
+                worksCount == 0 ? 0 : (worksCount / haveWorksCourse).toFixed(0)
+              }}</span>
             </div>
           </div>
           <Bar
@@ -142,6 +158,7 @@
           <ToolUse
             style="height: calc(100% - 70px)"
             v-if="skType == 1"
+            :yearArray="courseWorksCountYearArray"
           ></ToolUse>
           <!-- <div class="otherCss">
             <div v-if="!oType">切换为柱状图</div>
@@ -177,69 +194,23 @@
           <CateRank
             v-if="courseType == 0"
             style="height: calc(100%)"
+             :courseArray="courseArray"
           ></CateRank>
           <CourseNum
             v-if="courseType == 1"
             style="height: calc(100%)"
+            :weekCourse2="weekCourse2"
           ></CourseNum>
         </div>
       </div>
       <div class="bottom">
         <div class="titleBox" style="justify-content: space-between">
           <div class="title">课程实施程度</div>
-          <div
-            style="
-              display: flex;
-              flex-direction: row;
-              flex-wrap: nowrap;
-              align-items: center;
-            "
-          >
-            <div v-if="shType">
-              <el-select
-                v-model="cType1"
-                class="selectBox"
-                style="width: 110px"
-              >
-                <el-option label="全部年级" value="全部年级"></el-option>
-                <el-option label="一年级" value="一年级"></el-option>
-                <el-option label="二年级" value="二年级"></el-option>
-                <el-option label="三年级" value="三年级"></el-option>
-              </el-select>
-              <el-select
-                v-model="cType2"
-                class="selectBox"
-                style="width: 110px"
-              >
-                <el-option label="全部学科" value="全部学科"></el-option>
-                <el-option label="语文" value="语文"></el-option>
-                <el-option label="数学" value="数学"></el-option>
-                <el-option label="英语" value="英语"></el-option>
-              </el-select>
-              <el-select
-                v-model="cType3"
-                class="selectBox"
-                style="width: 110px"
-              >
-                <el-option label="全部主题" value="全部主题"></el-option>
-                <el-option label="社会" value="社会"></el-option>
-                <el-option label="人文" value="人文"></el-option>
-                <el-option label="自然" value="自然"></el-option>
-              </el-select>
-            </div>
-            <div class="timeDiv">
-              <div @click="sType = 0" :class="{ isClick: sType == 0 }">周</div>
-              <div @click="sType = 1" :class="{ isClick: sType == 1 }">月</div>
-              <div @click="sType = 2" :class="{ isClick: sType == 2 }">
-                学期
-              </div>
-            </div>
-          </div>
         </div>
         <div class="dataBox">
           <div class="allBox" v-if="!shType" style="height: calc(100% - 30px)">
             <div class="allBox_left">
-              <CourseTime v-if="!shType"></CourseTime>
+              <CourseTime v-if="!shType" :pusaDep="pusaDep"></CourseTime>
             </div>
             <div class="allBox_right">
               <div class="depth">
@@ -248,7 +219,7 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="80"
+                    :percentage="allCourse ? parseInt((evaCount / allCourse * 100).toFixed(0)) : 0"
                     :stroke-width="5"
                     :format="format"
                     color="#106BFF"
@@ -261,7 +232,7 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="80"
+                    :percentage="allCourse ? parseInt((haveWorksCourse / allCourse * 100).toFixed(0)) : 0"
                     :stroke-width="5"
                     :format="format"
                     color="#106BFF"
@@ -274,7 +245,7 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="80"
+                    :percentage="allCourse ? parseInt((evaWorksCount / allCourse * 100).toFixed(0)) : 0"
                     :stroke-width="5"
                     :format="format"
                     color="#106BFF"
@@ -287,7 +258,7 @@
                   <el-progress
                     :width="80"
                     type="circle"
-                    :percentage="80"
+                    :percentage="allCourse ? parseInt((evaWorksCount / allCourse * 100).toFixed(0)) : 0"
                     :stroke-width="5"
                     :format="format"
                     color="#106BFF"
@@ -297,28 +268,28 @@
             </div>
           </div>
           <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>{{ 18 }}</span>
+              <span>{{ isCourseCount }}</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>{{ isCourseCount ? (isCourseCount / allCourseCount * 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>{{ isCourseCount ? (taskCount / isCourseCount).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>{{ isCourseCount ? (workCount / isCourseCount).toFixed(0) : 0 }}</span>
             </div>
           </div>
-          <WorkNum v-if="shType"></WorkNum>
+          <WorkNum style="height:calc(100% - 95px)" :workNumList="workNumList" v-if="shType"></WorkNum>
           <div class="otherCss">
             <div v-if="!shType">转换为散点图</div>
             <div v-if="shType">转换为漏斗图</div>
@@ -359,42 +330,25 @@
           </div>
           <el-select
             v-model="cType4"
+            @change="typeChange"
             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-option label="全部" value=""></el-option>
+            <el-option label="年级" value="grade"></el-option>
+            <el-option label="主题" value="theme"></el-option>
+            <el-option label="学科" value="subject"></el-option>
           </el-select>
-          <div
-            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>
-              <el-option label="数学" value="数学"></el-option>
-            </el-select>
-            <el-select v-model="cType6" class="selectBox" style="width: 110px">
-              <el-option label="全部年级" value="全部年级"></el-option>
-              <el-option label="一年级" value="一年级"></el-option>
-              <el-option label="二年级" value="二年级"></el-option>
-            </el-select>
-          </div>
         </div>
         <div class="dataBox">
           <CourseAna
-            style="height: calc(100% - 40px)"
+            style="height: calc(100%)"
+            :courseNumberArray="courseNumberArray"
             v-if="toolType == 0"
           ></CourseAna>
           <ToolChart
-            style="height: calc(100% - 40px)"
+            style="height: calc(100%)"
+            :toolArray="toolList"
             v-if="toolType == 1"
           ></ToolChart>
         </div>
@@ -404,7 +358,8 @@
           <div class="title">课程协同情况</div>
         </div>
         <div class="dataBox">
-          <WorkTime style="height: calc(100% - 72px)" v-if="xtType"></WorkTime>
+          <WorkTime style="height: calc(100% - 25px)" :personArray="personList" v-if="xtType"></WorkTime>
+          <Subjuect style="height: calc(100% - 25px)" v-if="!xtType"></Subjuect>
           <div class="otherCss">
             <div v-if="!xtType">转换为人员协同</div>
             <div v-if="xtType">转换为学科协同</div>
@@ -429,6 +384,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,
@@ -441,6 +397,7 @@ export default {
     Bar,
     CourseNum,
     ToolChart,
+    Subjuect,
   },
   props: {
     oid: {
@@ -454,12 +411,7 @@ export default {
     return {
       isLoading: false,
       cType: "全部年级",
-      cType1: "全部年级",
-      cType2: "全部学科",
-      cType3: "全部主题",
-      cType4: "按年级",
-      cType5: "全部学科",
-      cType6: "全部年级",
+      cType4: "",
       cType7: "全部课程",
       toolType: 0,
       tType: 0,
@@ -472,18 +424,49 @@ export default {
       allCourse: 0,
       courseTemplate: 0,
       loginCountMonthArray: [],
-      lType: "grade",
+      lType: "all",
+      lType1: "all",
       tedurArray: [],
+      tedurArray1: [],
       classList: [],
       subjectList: [],
       themeList: [],
       allTime: 0,
-      sumTime: 0,
       gradeLength: 0,
       subjectLength: 0,
       themeLength: 0,
       courseTList: [],
       courseLength: 0,
+      courseWorksCountYearArray: [],
+      allCourseWorks: [],
+      gradeList: [],
+      subjectList: [],
+      thList: [],
+      worksCount: 0,
+      haveWorksCourse: 0,
+      courseNumberArray: [],
+      gradeArray: [],
+      subjectArray: [],
+      themeArray: [],
+      allArray: [],
+      toolList: [],
+      personList: [],
+      workNumList: [],
+      taskCount: 0,
+      workCount: 0,
+      isCourseCount: 0,
+      allCourseCount: 0,
+      courseArray: [],
+      evaCount: 0,
+      evaWorksCount: 0,
+      pusaDep: [
+        { value: 0, name: "课程总数" },
+        { value: 0, name: "设置评价课程" },
+        { value: 0, name: "已提交作业课程" },
+        { value: 0, name: "已评价课程" },
+        { value: 0, name: "教学评一体化课程" },
+      ],
+      weekCourse2: [],
     };
   },
   mounted() {
@@ -499,9 +482,16 @@ export default {
     xtEchart() {
       this.xtType = !this.xtType;
     },
+    format(percentage) {
+      return percentage + '%';
+    },
     typeChange1() {
       var a = [];
-      if (this.lType == "grade") {
+      if (this.lType == "all") {
+        a = this.classList.concat(this.subjectList, this.themeList);
+        this.courseLength =
+          this.gradeLength + this.subjectLength + this.themeLength;
+      } else if (this.lType == "grade") {
         a = this.classList;
         this.courseLength = this.gradeLength;
       } else if (this.lType == "subject") {
@@ -520,7 +510,167 @@ export default {
       }
       this.allTime = time;
 
-      // this.sumTime = Math.ceil(time / this.studentNum);
+      this.$forceUpdate();
+    },
+    typeChange2() {
+      const date = new Date();
+      var Month = date.getMonth() + 1;
+      var Year = date.getFullYear();
+      let courseWorksCountYearArray = [];
+      for (var i = Month; i > Month - 12; i--) {
+        if (i <= 0) {
+          courseWorksCountYearArray.push({
+            Year: Year - 1,
+            Month: 12 + i,
+            mon: 0,
+            tue: 0,
+            wed: 0,
+            thur: 0,
+            fri: 0,
+            sat: 0,
+            sun: 0,
+          });
+        } else {
+          courseWorksCountYearArray.push({
+            Month: i,
+            Year: Year,
+            mon: 0,
+            tue: 0,
+            wed: 0,
+            thur: 0,
+            fri: 0,
+            sat: 0,
+            sun: 0,
+          });
+        }
+      }
+      courseWorksCountYearArray = courseWorksCountYearArray.reverse();
+      for (var i = 0; i < this.allCourseWorks.length; i++) {
+        let _date = new Date(this.allCourseWorks[i].create_at);
+        let _type = this.allCourseWorks[i].typeid;
+        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 < courseWorksCountYearArray.length; j++) {
+          if (this.lType1 == "all") {
+            if (
+              _month == courseWorksCountYearArray[j].Month &&
+              _year == courseWorksCountYearArray[j].Year
+            ) {
+              courseWorksCountYearArray[j][dayArray[_day]]++;
+              break;
+            }
+          } else if (this.lType1 == "grade") {
+            if (
+              _month == courseWorksCountYearArray[j].Month &&
+              _year == courseWorksCountYearArray[j].Year &&
+              this.gradeList.indexOf(_type) != -1
+            ) {
+              courseWorksCountYearArray[j][dayArray[_day]]++;
+              break;
+            }
+          } else if (this.lType1 == "subject") {
+            if (
+              _month == courseWorksCountYearArray[j].Month &&
+              _year == courseWorksCountYearArray[j].Year &&
+              this.subjectList.indexOf(_type) != -1
+            ) {
+              courseWorksCountYearArray[j][dayArray[_day]]++;
+              break;
+            }
+          } else {
+            if (
+              _month == courseWorksCountYearArray[j].Month &&
+              _year == courseWorksCountYearArray[j].Year &&
+              this.thList.indexOf(_type) != -1
+            ) {
+              courseWorksCountYearArray[j][dayArray[_day]]++;
+              break;
+            }
+          }
+        }
+      }
+
+      var worksCount = 0,
+        haveWorksCourse = [];
+      for (var i = 0; i < this.allCourseWorks.length; i++) {
+        if (this.lType1 == "all") {
+          if (this.allCourseWorks[i].id) {
+            worksCount++;
+          }
+          if (haveWorksCourse.length == 0) {
+            haveWorksCourse.push(this.allCourseWorks[i].courseid);
+          } else {
+            if (
+              haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
+            ) {
+              haveWorksCourse.push(this.allCourseWorks[i].courseid);
+            }
+          }
+        } else if (this.lType1 == "grade") {
+          if (this.gradeList.indexOf(this.allCourseWorks[i].typeid)) {
+            if (this.allCourseWorks[i].id) {
+              worksCount++;
+            }
+            if (haveWorksCourse.length == 0) {
+              haveWorksCourse.push(this.allCourseWorks[i].courseid);
+            } else {
+              if (
+                haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
+              ) {
+                haveWorksCourse.push(this.allCourseWorks[i].courseid);
+              }
+            }
+          }
+        } else if (this.lType1 == "subject") {
+          if (this.subjectList.indexOf(this.allCourseWorks[i].typeid)) {
+            if (this.allCourseWorks[i].id) {
+              worksCount++;
+            }
+            if (haveWorksCourse.length == 0) {
+              haveWorksCourse.push(this.allCourseWorks[i].courseid);
+            } else {
+              if (
+                haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
+              ) {
+                haveWorksCourse.push(this.allCourseWorks[i].courseid);
+              }
+            }
+          }
+        } else {
+          if (this.thList.indexOf(this.allCourseWorks[i].typeid)) {
+            if (this.allCourseWorks[i].id) {
+              worksCount++;
+            }
+            if (haveWorksCourse.length == 0) {
+              haveWorksCourse.push(this.allCourseWorks[i].courseid);
+            } else {
+              if (
+                haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
+              ) {
+                haveWorksCourse.push(this.allCourseWorks[i].courseid);
+              }
+            }
+          }
+        }
+      }
+      this.courseWorksCountYearArray = courseWorksCountYearArray;
+      this.worksCount = worksCount;
+      this.haveWorksCourse = haveWorksCourse.length;
+
+      this.$forceUpdate();
+    },
+    typeChange() {
+      if (this.cType4 === "") {
+        this.courseNumberArray = this.allArray;
+      } else if (this.cType4 === "grade") {
+        this.courseNumberArray = this.gradeArray;
+      } else if (this.cType4 === "theme") {
+        this.courseNumberArray = this.themeArray;
+      } else if (this.cType4 === "subject") {
+        this.courseNumberArray = this.subjectArray;
+      }
       this.$forceUpdate();
     },
     getData() {
@@ -542,6 +692,7 @@ export default {
           let _timeCourse = res.data[4]; //查询半年内全部课程
           this.courseTemplate = res.data[5][0].count; //查询模板课程总数
           let tList = res.data[6]; //授课时长
+          // let countCourseWorks = res.data[8][0].count; //获取有作业的课程
           this.courseTList = tList;
 
           //将数据根据time里面的月份分成多个数组
@@ -687,7 +838,10 @@ export default {
           this.themeLength = _tList.length;
 
           var a = [];
-          if (this.lType == "grade") {
+          if (this.lType == "all") {
+            this.tedurArray = _grade.concat(_subject, _themeList);
+            this.courseLength = _gList.length + _sList.length + _tList.length;
+          } else if (this.lType == "grade") {
             this.tedurArray = _grade;
             this.courseLength = _gList.length;
           } else if (this.lType == "subject") {
@@ -705,7 +859,342 @@ export default {
             }
           }
           this.allTime = time;
-          // this.sumTime = Math.ceil(time / this.studentNum);
+
+          let allCourseWorks = res.data[7]; //作业总数量
+          this.allCourseWorks = allCourseWorks;
+          this.gradeList = _gradeList;
+          this.subjectList = _subjectList;
+          this.thList = _thList;
+          this.typeChange2();
+
+          let _course = res.data[8]; //课程
+          let _gradeArray = [];
+          let _subjectArray = [];
+          let _themeArray = [];
+
+          for (var i = 0; i < _grade.length; i++) {
+            _gradeArray.push({
+              name: _grade[i].name,
+              typeid: _grade[i].id,
+              course: 0,
+              array: [],
+            });
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _grade[i].id) {
+                _gradeArray[i].course++;
+                _gradeArray[i].array.push(_course[z].courseid);
+              }
+            }
+          }
+
+          for (var i = 0; i < _subject.length; i++) {
+            _subjectArray.push({
+              name: _subject[i].name,
+              typeid: _subject[i].id,
+              course: 0,
+              array: [],
+            });
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _subject[i].id) {
+                _subjectArray[i].course++;
+                _subjectArray[i].array.push(_course[z].courseid);
+              }
+            }
+          }
+
+          for (var i = 0; i < _themeList.length; i++) {
+            _themeArray.push({
+              name: _themeList[i].name,
+              typeid: _themeList[i].id,
+              course: 0,
+              array: [],
+            });
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _themeList[i].id) {
+                _themeArray[i].course++;
+                _themeArray[i].array.push(_course[z].courseid);
+              }
+            }
+          }
+          this.gradeArray = _gradeArray;
+          this.subjectArray = _subjectArray;
+          this.themeArray = _themeArray;
+          this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray];
+          this.typeChange();
+
+          var courseList = res.data[9];
+          var cList = [];
+          for (var i = 0; i < courseList.length; i++) {
+            cList.push(JSON.parse(courseList[i].chapters));
+          }
+
+          var toolList = [
+            [10, 65], //互动类
+            [7, 1, 52, 3, 48], //思维类
+            [49], //协作类
+            [4, 45, 15, 16, 50, 41, 47], //测评类
+            [40], //评价类
+            [18, 21, 22, 23, 24, 32, 57, 63], //编程类
+            [28, 31, 39, 66, 67, 68], //学科类
+          ];
+          var toolAllArray = [
+            { name: "互动类", value: 0 },
+            { name: "思维类", value: 0 },
+            { name: "协作类", value: 0 },
+            { name: "测评类", value: 0 },
+            { name: "评价类", value: 0 },
+            { name: "编程类", value: 0 },
+            { name: "学科类", value: 0 },
+          ];
+          for (var p = 0; p < toolList.length; p++) {
+            for (var i = 0; i < cList.length; i++) {
+              for (var j = 0; j < cList[i].length; j++) {
+                for (
+                  var k = 0;
+                  k < cList[i][j].chapterInfo[0].taskJson.length;
+                  k++
+                ) {
+                  for (
+                    var q = 0;
+                    q <
+                    cList[i][j].chapterInfo[0].taskJson[k].toolChoose.length;
+                    q++
+                  ) {
+                    if (
+                      toolList[p].indexOf(
+                        cList[i][j].chapterInfo[0].taskJson[k].toolChoose[q]
+                          .tool[0]
+                      ) != -1
+                    ) {
+                      toolAllArray[p].value++;
+                    }
+                  }
+                }
+              }
+            }
+          }
+          for(var i = 0;i<toolAllArray.length;i++){
+            if(toolAllArray[i].value == 0){
+              toolAllArray.splice(i,1)
+            }
+          }
+          this.toolList = toolAllArray;
+
+          var twoPerson = 0,threePerson = 0,fivePerson = 0,sevenPerson = 0;
+          var personList = []
+          for(var i = 0;i<courseList.length;i++){
+            if(courseList[i].course_teacher != ""){
+              if(courseList[i].course_teacher.split(',').length <= 2){
+                twoPerson++
+              }else if(4 >= courseList[i].course_teacher.split(',').length && courseList[i].course_teacher.split(',').length > 2){
+                threePerson++;
+              }else if(6 >= courseList[i].course_teacher.split(',').length && courseList[i].course_teacher.split(',').length > 4){
+                fivePerson++;
+              }else if(courseList[i].course_teacher.split(',').length > 7){
+                sevenPerson++;
+              }
+            }
+          }
+
+          personList.push({ name:"2人以下",value: twoPerson },{ name:"3-4人",value: threePerson },{ name:"5-6人",value: fivePerson },{ name:"7人以上",value: sevenPerson });
+          this.personList = personList;
+
+          let _workCourse = res.data[10]; //带作业的课程
+          let _taskCount = 0 //任务数量
+
+          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;
+              }
+            }
+          }
+          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.workCount = _workCourse.length
+          this.isCourseCount = res.data[11][0].count; //课程开展总数
+          this.allCourseCount = res.data[9].length; //课程总数
+
+          let _gradeCourse = 0 //各年级上传课程
+          let _subjectCourse = 0 //各学科上传课程
+          let _courseArray = []
+          _subject.push({ name: '其他' })
+
+          for (var i = 0; i < _grade.length; i++) {
+            _courseArray.push({
+              name: _grade[i].name,
+              id: _grade[i].id,
+              courseid: [],
+              subject: [],
+            })
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _grade[i].id) {
+                _gradeCourse++
+                if (_courseArray[i].courseid.indexOf(_course[z].courseid) === -1) {
+                  _courseArray[i].courseid.push(_course[z].courseid)
+                }
+              }
+
+            }
+            for (var j = 0; j < _subject.length; j++) {
+              _courseArray[i].subject.push({
+                name: _subject[j].name,
+                id: _subject[j].id,
+                course: 0
+              })
+              for (var z = 0; z < _course.length; z++) {
+                if (_course[z].typeid == _subject[j].id && _courseArray[i].courseid.indexOf(_course[z].courseid) !== -1) {
+                  _courseArray[i].subject[j].course++
+                }
+              }
+            }
+            let sum = 0
+            for (var j = 0; j < _courseArray[i].subject.length - 1; j++) {
+              sum += _courseArray[i].subject[j].course
+            }
+            _courseArray[i].subject[_courseArray[i].subject.length - 1].course = (_courseArray[i].courseid.length - sum) < 0 ? 0 : _courseArray[i].courseid.length - sum
+          }
+          for (var j = 0; j < _subject.length; j++) {
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid == _subject[j].id) {
+                _subjectCourse++
+              }
+            }
+          }
+          this.courseArray = _courseArray
+
+          this.evaCount = res.data[12][0].count; //设置评价
+          
+          this.evaWorksCount = res.data[13][0].count; //查询有目标并且有评价的作业
+
+          for (var i = 0; i < this.pusaDep.length; i++) {
+            if (this.pusaDep[i].name == "课程总数") {
+              this.pusaDep[i].value = ((this.allCourse / this.allCourse) * 100).toFixed(
+                0
+              );
+            } else if (this.pusaDep[i].name == "设置评价课程") {
+              this.pusaDep[i].value = (
+                (this.evaCount  / this.allCourse) *
+                100
+              ).toFixed(0);
+            } else if (this.pusaDep[i].name == "已提交作业课程") {
+              this.pusaDep[i].value = (
+                (this.haveWorksCourse / this.allCourse) *
+                100
+              ).toFixed(0);
+            } else if (this.pusaDep[i].name == "已评价课程") {
+              this.pusaDep[i].value = (
+                (this.evaWorksCount / this.allCourse) *
+                100
+              ).toFixed(0);
+            } else if (this.pusaDep[i].name == "教学评一体化课程") {
+              this.pusaDep[i].value = (
+                (this.evaWorksCount / this.allCourse) *
+                100
+              ).toFixed(0);
+            }
+          }
+
+          var today = new Date();
+          var lastDayOfWeek = new Date(today.setDate(today.getDate() - today.getDay() + 7));;//本周周日
+
+          let weekArray = {
+            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());
+            }
+          }
+          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])
+            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)
+              var string = a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate()
+              if (weekArray.lastWeek.indexOf(string) != -1) {
+                lastWeekCouseCount++
+              } else {
+                toWeekCouseCount++
+              }
+            }
+          }
+
+          let lastCourseidWeek = []
+          let toCourseidWeek = []
+          for (var i = 0; i < _grade.length; i++) {
+            weekCourse2.push({
+              name: _grade[i].name,
+              id: _grade[i].id,
+              lastCourse: 0,
+              toCourse: 0,
+            })
+            for (var z = 0; z < weekCourse.length; z++) {
+              if (weekCourse[z].typeid == _grade[i].id) {
+                var a = new Date(weekCourse[z].create_at)
+                var string = a.getFullYear() + '-' + (a.getMonth() + 1) + '-' + a.getDate()
+                if (weekArray.lastWeek.indexOf(string) != -1) {
+                  weekCourse2[i].lastCourse++
+                  if (lastCourseidWeek.indexOf(weekCourse[z].courseid) === -1) {
+                    lastCourseidWeek.push(weekCourse[z].courseid)
+                  }
+                } else {
+                  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,
+          })
+
+          this.weekCourse2 = weekCourse2
 
           this.$forceUpdate();
         })

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