lsc 1 year ago
parent
commit
da477927c6

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.8f513f5bcda451b365189ccad68ab4e5.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.4ae2783fdfe7ab52e4d5.js></script><script type=text/javascript src=./static/js/vendor.b01159b52abeac4e6216.js></script><script type=text/javascript src=./static/js/app.3fc6e3fd1d8510a7d828.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.858ab99d180883df91741dbad60fc7be.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.b01159b52abeac4e6216.js></script><script type=text/javascript src=./static/js/app.0636562cc50d51b3d89c.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

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


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


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


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


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


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


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


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


+ 2 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js

@@ -0,0 +1,2 @@
+!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,c){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i]);for(n&&n(r,a,c);l.length;)l.shift()();if(c)for(s=0;s<c.length;s++)f=o(o.s=c[s]);return f};var r={},t={4:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+e+"."+{0:"7da288988865a9378b49",1:"994623639438b244a74c"}[e]+".js";var i=setTimeout(u,12e4);function u(){c.onerror=c.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=u,a.appendChild(c),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
+//# sourceMappingURL=manifest.3512a67a6213c2df4180.js.map

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


+ 0 - 2
dist/static/js/manifest.4ae2783fdfe7ab52e4d5.js

@@ -1,2 +0,0 @@
-!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={4:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"7bd37c6227e5d67b75fe",1:"994623639438b244a74c"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
-//# sourceMappingURL=manifest.4ae2783fdfe7ab52e4d5.js.map

+ 3 - 1
src/components/pages/dataBoardNew/course/index.vue

@@ -878,7 +878,9 @@ export default {
             }
           }
           this.loginCountMonthArray = loginCountMonthArray;
-
+          tList.forEach(element => {
+            element.text = element.text ? element.text : 0;
+          });
           var courseJson = Object.values(
             tList.reduce(function (acc, obj) {
               if (!acc[obj.courseid]) {

+ 57 - 6
src/components/pages/dataBoardNew/teacher/chartList/teaData.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="data_body">
-        <div style="width: 100%; height: 100%" :style="{minWidth:ooption.hours.length * 75 + 'px'}">
+        <div style="width: 100%; height: 100%" :style="{ minWidth: ooption.hours.length * 75 + 'px' }">
             <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
         </div>
     </div>
@@ -12,6 +12,9 @@ export default {
         courseArray: {
             type: Array,
         },
+        cType: {
+            type: String
+        }
     },
     data() {
         return {
@@ -66,11 +69,11 @@ export default {
                             return idx * 5;
                         },
                         itemStyle: {
-                            color: function(params) {
-                            // 根据行索引设置不同的颜色
-                            var row = params.value[1];
-                            var colorList = ['hsl(170, 80%, 75%)', 'hsl(300, 99%, 70%)', 'hsl(139, 93%, 60%)', 'hsl(56, 73%, 69%)', 'hsl(352, 98%, 69%)', 'hsl(288, 76%, 66%)', 'hsl(167, 89%, 60%)', 'hsl(83, 81%, 74%)', 'hsl(359, 84%, 66%)', 'hsl(208, 96%, 66%)', 'hsl(259, 82%, 62%)', 'hsl(224, 95%, 64%)', 'hsl(119, 89%, 71%)', 'hsl(35, 75%, 70%)', 'hsl(48, 73%, 76%)', 'hsl(10, 73%, 69%)', 'hsl(112, 88%, 71%)', 'hsl(90, 87%, 61%)', 'hsl(37, 83%, 66%)', 'hsl(192, 86%, 72%)'];
-                            return colorList[row % colorList.length];
+                            color: function (params) {
+                                // 根据行索引设置不同的颜色
+                                var row = params.value[1];
+                                var colorList = ['hsl(170, 80%, 75%)', 'hsl(300, 99%, 70%)', 'hsl(139, 93%, 60%)', 'hsl(56, 73%, 69%)', 'hsl(352, 98%, 69%)', 'hsl(288, 76%, 66%)', 'hsl(167, 89%, 60%)', 'hsl(83, 81%, 74%)', 'hsl(359, 84%, 66%)', 'hsl(208, 96%, 66%)', 'hsl(259, 82%, 62%)', 'hsl(224, 95%, 64%)', 'hsl(119, 89%, 71%)', 'hsl(35, 75%, 70%)', 'hsl(48, 73%, 76%)', 'hsl(10, 73%, 69%)', 'hsl(112, 88%, 71%)', 'hsl(90, 87%, 61%)', 'hsl(37, 83%, 66%)', 'hsl(192, 86%, 72%)'];
+                                return colorList[row % colorList.length];
                             }
                         }
                     }
@@ -154,6 +157,30 @@ export default {
                 this.option.series[0].data = data.map(function (item) {
                     return [item[1], item[0], item[2]];
                 })
+
+                if (this.cType == '0') {
+                    this.option.series[0].symbolSize = function (val) {
+                        return val[2] / 5;
+                    }
+                } else {
+                    this.option.series[0].symbolSize = function (val) {
+                        return val[2] * 3;
+                    }
+                }
+                let days2 = days
+                let that = this
+                this.option.tooltip.formatter = function (params) {
+                    let type = ''
+                    switch (that.cType) {
+                        case '0': type = '时长'; break;
+                        case '1': type = '创建'; break;
+                        case '2': type = '协同'; break;
+                        case '3': type = '实施'; break;
+                        case '4': type = '评价'; break;
+                    }
+
+                    return '学科:' + params.name + '<br/> ' + '年级:' + days2[params.data[1]] + '<br/> ' + type + ':' + params.data[2];//params.seriesName + '<br>' + params.
+                }
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
@@ -235,6 +262,30 @@ export default {
                     this.option.series[0].data = data.map(function (item) {
                         return [item[1], item[0], item[2]];
                     })
+
+                    if (this.cType == '0') {
+                        this.option.series[0].symbolSize = function (val) {
+                            return val[2] / 5;
+                        }
+                    } else {
+                        this.option.series[0].symbolSize = function (val) {
+                            return val[2] * 3;
+                        }
+                    }
+                    let days2 = days
+                    let that = this
+                    this.option.tooltip.formatter = function (params) {
+                        let type = ''
+                        switch (that.cType) {
+                            case '0': type = '时长'; break;
+                            case '1': type = '创建'; break;
+                            case '2': type = '协同'; break;
+                            case '3': type = '实施'; break;
+                            case '4': type = '评价'; break;
+                        }
+
+                        return '学科:' + params.name + '<br/> ' + '年级:' + days2[params.data[1]] + '<br/> ' + type + ':' + params.data[2];//params.seriesName + '<br>' + params.
+                    }
                     this.chartObj.setOption(this.option);
                 }
             }

+ 290 - 347
src/components/pages/dataBoardNew/teacher/index.vue

@@ -16,7 +16,10 @@
             <div class="info blueBG">
               <span>本月登录教师环比</span>
               <!-- <span>{{ weekCount }}</span> -->
-              <span v-if="teacherLoginCountMonthArray.length">{{ (teacherLoginCountMonthArray[teacherLoginCountMonthArray.length - 1].login) > 0 ? (((teacherLoginCountMonthArray[teacherLoginCountMonthArray.length - 1].login) / teacherNum) * 100).toFixed(0) + '%' : 0 }}</span>
+              <span v-if="teacherLoginCountMonthArray.length">{{
+                (teacherLoginCountMonthArray[teacherLoginCountMonthArray.length - 1].login) > 0 ?
+                (((teacherLoginCountMonthArray[teacherLoginCountMonthArray.length - 1].login) / teacherNum) *
+                  100).toFixed(0) + '%' : 0 }}</span>
               <!-- <span v-if="teacherLoginCountMonthArray.length">{{
                 teacherLoginCountMonthArray[
                   teacherLoginCountMonthArray.length - 1
@@ -60,28 +63,17 @@
               }}</span>
             </div>
           </div>
-          <TeaFre
-            style="height: calc(100% - 150px)"
-            :monthArray="teacherLoginCountMonthArray"
-          ></TeaFre>
+          <TeaFre style="height: calc(100% - 150px)" :monthArray="teacherLoginCountMonthArray"></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>
         </div>
@@ -114,16 +106,8 @@
           </div>
         </div>
         <div class="dataBox">
-          <Bar
-            style="height: calc(100% - 70px)"
-            v-if="skType == 0"
-            :workTime="workTime"
-          ></Bar>
-          <ToolUse
-            style="height: calc(100% - 70px)"
-            v-if="skType == 1"
-            :yearArray="loginCountYearArray"
-          ></ToolUse>
+          <Bar style="height: calc(100% - 70px)" v-if="skType == 0" :workTime="workTime"></Bar>
+          <ToolUse style="height: calc(100% - 70px)" v-if="skType == 1" :yearArray="loginCountYearArray"></ToolUse>
           <!-- <div class="otherCss">
             <div v-if="!oType">切换为柱状图</div>
             <div v-if="oType">切换为热力图</div>
@@ -137,20 +121,16 @@
     <div class="center">
       <div class="top">
         <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: courseType == 0 }"
-              @click="courseType = 0"
-              style="cursor: pointer; padding: 0 0 5px 0"
-            >
+              justify-content: space-between;
+              width: 100%;
+            ">
+            <div class="title" :class="{ isClick: courseType == 0 }" @click="courseType = 0"
+              style="cursor: pointer; padding: 0 0 5px 0">
               教师行为分布
             </div>
             <!-- <div
@@ -161,41 +141,35 @@
             >
               教师协同情况
             </div> -->
+            <el-select v-model="cType" @change="typeChange2" class="selectBox" v-if="courseType == 0">
+              <el-option label="时长" value="0"></el-option>
+              <el-option label="创建" value="1"></el-option>
+              <el-option label="协同" value="2"></el-option>
+              <el-option label="实施" value="3"></el-option>
+              <el-option label="评价" value="4"></el-option>
+            </el-select>
           </div>
         </div>
         <div class="dataBox">
-          <TeaData
-            v-if="courseType == 0 || courseType == 1"
-            style="height: calc(100%)"
-            :courseArray="courseArray"
-          ></TeaData>
+          <TeaData v-if="courseType == 0 || courseType == 1" style="height: calc(100%)" :courseArray="courseArray" :cType="cType">
+          </TeaData>
           <!-- <FunPlot v-if="courseType == 1" style="height: calc(100%)"></FunPlot> -->
         </div>
       </div>
       <div class="bottom">
         <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: bType == 0 }"
-              @click="bType = 0"
-              style="cursor: pointer; padding: 0 0 5px 0"
-            >
+            ">
+            <div class="title" :class="{ isClick: bType == 0 }" @click="bType = 0"
+              style="cursor: pointer; padding: 0 0 5px 0">
               课程参与情况
             </div>
-            <div
-              class="title"
-              :class="{ isClick: bType == 1 }"
-              @click="bType = 1"
-              style="cursor: pointer; padding: 0 0 5px 0"
-            >
+            <div class="title" :class="{ isClick: bType == 1 }" @click="bType = 1"
+              style="cursor: pointer; padding: 0 0 5px 0">
               项目参与情况
             </div>
           </div>
@@ -204,155 +178,98 @@
           <div class="allBox">
             <div class="allBox_left">
               <TeaAct v-if="bType == 0" :pusaDep="pusaDep"></TeaAct>
-              <TeaActSecond
-                v-if="bType == 1"
-                :pusaDep="pusaDep1"
-              ></TeaActSecond>
+              <TeaActSecond v-if="bType == 1" :pusaDep="pusaDep1"></TeaActSecond>
             </div>
             <div class="allBox_right" v-if="bType == 0">
               <div class="depth">
                 <span>创建课程</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="
-                      lightJson.createCourse
-                        ? parseInt(
-                            (
-                              (lightJson.createCourse / lightJson.teachers) *
-                              100
-                            ).toFixed(0)
-                          )
-                        : 0
-                    "
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="lightJson.createCourse
+                      ? parseInt(
+                        (
+                          (lightJson.createCourse / lightJson.teachers) *
+                          100
+                        ).toFixed(0)
+                      )
+                      : 0
+                    " :stroke-width="5" :format="format" color="#106BFF"></el-progress>
                 </div>
               </div>
               <div class="depth">
                 <span>协同教研</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="
-                      lightJson.gCourseTeachers
-                        ? parseInt(
-                            (
-                              (lightJson.gCourseTeachers / lightJson.teachers) *
-                              100
-                            ).toFixed(0)
-                          )
-                        : 0
-                    "
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="lightJson.gCourseTeachers
+                      ? parseInt(
+                        (
+                          (lightJson.gCourseTeachers / lightJson.teachers) *
+                          100
+                        ).toFixed(0)
+                      )
+                      : 0
+                    " :stroke-width="5" :format="format" color="#106BFF"></el-progress>
                 </div>
               </div>
               <div class="depth">
                 <span>使用模板</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="0"
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="0" :stroke-width="5" :format="format"
+                    color="#106BFF"></el-progress>
                 </div>
               </div>
               <div class="depth">
                 <span>互动交流</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="
-                      lightJson.commentTeachers
-                        ? parseInt(
-                            (
-                              (lightJson.commentTeachers / lightJson.teachers) *
-                              100
-                            ).toFixed(0)
-                          )
-                        : 0
-                    "
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="lightJson.commentTeachers
+                      ? parseInt(
+                        (
+                          (lightJson.commentTeachers / lightJson.teachers) *
+                          100
+                        ).toFixed(0)
+                      )
+                      : 0
+                    " :stroke-width="5" :format="format" color="#106BFF"></el-progress>
                 </div>
               </div>
               <div class="depth">
                 <span>使用工具</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="
-                      lightJson.useTool
-                        ? parseInt(
-                            (
-                              (lightJson.useTool / lightJson.teachers) *
-                              100
-                            ).toFixed(0)
-                          )
-                        : 0
-                    "
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="lightJson.useTool
+                      ? parseInt(
+                        (
+                          (lightJson.useTool / lightJson.teachers) *
+                          100
+                        ).toFixed(0)
+                      )
+                      : 0
+                    " :stroke-width="5" :format="format" color="#106BFF"></el-progress>
                 </div>
               </div>
               <div class="depth">
                 <span>实施评价</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="
-                      lightJson.useEvalution
-                        ? parseInt(
-                            (
-                              (lightJson.useEvalution / lightJson.teachers) *
-                              100
-                            ).toFixed(0)
-                          )
-                        : 0
-                    "
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="lightJson.useEvalution
+                      ? parseInt(
+                        (
+                          (lightJson.useEvalution / lightJson.teachers) *
+                          100
+                        ).toFixed(0)
+                      )
+                      : 0
+                    " :stroke-width="5" :format="format" color="#106BFF"></el-progress>
                 </div>
               </div>
               <div class="depth">
                 <span>教学评一体化</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="
-                      lightJson.evaWorksCount
-                        ? parseInt(
-                            (
-                              (lightJson.evaWorksCount / lightJson.teachers) *
-                              100
-                            ).toFixed(0)
-                          )
-                        : 0
-                    "
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="lightJson.evaWorksCount
+                      ? parseInt(
+                        (
+                          (lightJson.evaWorksCount / lightJson.teachers) *
+                          100
+                        ).toFixed(0)
+                      )
+                      : 0
+                    " :stroke-width="5" :format="format" color="#106BFF"></el-progress>
                 </div>
               </div>
             </div>
@@ -360,94 +277,58 @@
               <div class="depth">
                 <span>创建项目</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="
-                      lightJson1.createProject
-                        ? parseInt(
-                            (
-                              (lightJson1.createProject / lightJson1.teachers) *
-                              100
-                            ).toFixed(0)
-                          )
-                        : 0
-                    "
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="lightJson1.createProject
+                      ? parseInt(
+                        (
+                          (lightJson1.createProject / lightJson1.teachers) *
+                          100
+                        ).toFixed(0)
+                      )
+                      : 0
+                    " :stroke-width="5" :format="format" color="#106BFF"></el-progress>
                 </div>
               </div>
               <div class="depth">
                 <span>师生协作</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="
-                      lightJson1.gProjectTeachers
-                        ? parseInt(
-                            (
-                              (lightJson1.gProjectTeachers /
-                                lightJson1.teachers) *
-                              100
-                            ).toFixed(0)
-                          )
-                        : 0
-                    "
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="lightJson1.gProjectTeachers
+                      ? parseInt(
+                        (
+                          (lightJson1.gProjectTeachers /
+                            lightJson1.teachers) *
+                          100
+                        ).toFixed(0)
+                      )
+                      : 0
+                    " :stroke-width="5" :format="format" color="#106BFF"></el-progress>
                 </div>
               </div>
               <div class="depth">
                 <span>使用模板</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="0"
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="0" :stroke-width="5" :format="format"
+                    color="#106BFF"></el-progress>
                 </div>
               </div>
               <div class="depth">
                 <span>互动交流</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="0"
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="0" :stroke-width="5" :format="format"
+                    color="#106BFF"></el-progress>
                 </div>
               </div>
               <div class="depth">
                 <span>使用工具</span>
                 <div>
-                  <el-progress
-                    :width="80"
-                    type="circle"
-                    :percentage="
-                      lightJson1.useTool
-                        ? parseInt(
-                            (
-                              (lightJson1.useTool / lightJson1.teachers) *
-                              100
-                            ).toFixed(0)
-                          )
-                        : 0
-                    "
-                    :stroke-width="5"
-                    :format="format"
-                    color="#106BFF"
-                  ></el-progress>
+                  <el-progress :width="80" type="circle" :percentage="lightJson1.useTool
+                      ? parseInt(
+                        (
+                          (lightJson1.useTool / lightJson1.teachers) *
+                          100
+                        ).toFixed(0)
+                      )
+                      : 0
+                    " :stroke-width="5" :format="format" color="#106BFF"></el-progress>
                 </div>
               </div>
             </div>
@@ -467,10 +348,7 @@
           </el-select>
         </div>
         <div class="dataBox">
-          <WorkNum
-            style="height: calc(100% - 40px)"
-            :courseNumberArray="courseNumberArray"
-          ></WorkNum>
+          <WorkNum style="height: calc(100% - 40px)" :courseNumberArray="courseNumberArray"></WorkNum>
         </div>
       </div>
       <div class="bottom">
@@ -494,10 +372,7 @@
               }}</span>
             </div>
           </div>
-          <WorkTime
-            style="height: calc(100% - 72px)"
-            :workNumList="workNumList"
-          ></WorkTime>
+          <WorkTime style="height: calc(100% - 72px)" :workNumList="workNumList"></WorkTime>
         </div>
       </div>
     </div>
@@ -542,6 +417,7 @@ export default {
       bType: 0,
       sType: 0,
       cType4: "grade",
+      cType: "1",
       oType: false,
       teacherNum: 0,
       allLoginTeacher: 0,
@@ -555,6 +431,8 @@ export default {
       themeListTime: [],
       loginCountYearArray: [],
       courseArray: [],
+      _courseArray: [],
+      _course2: [],
       courseNumberArray: [],
       gradeArray: [],
       subjectArray: [],
@@ -617,6 +495,116 @@ export default {
       }
       this.$forceUpdate();
     },
+    typeChange2() {
+      let _grade = JSON.parse(JSON.stringify(this._grade)); //年级
+      let _subject = JSON.parse(JSON.stringify(this._subject)); //学科
+      let _course = JSON.parse(JSON.stringify(this._courseArray));
+      let _course2 = JSON.parse(JSON.stringify(this._course2));
+      let _gradeCourse = 0; //各年级上传课程
+      let _subjectCourse = 0; //各学科上传课程
+      let _courseArray = [];
+      // _subject.push({ name: "其他" });
+
+      if(this.cType == '1'){
+        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;
+        }
+      }else {
+        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 < _course2.length; z++) {
+            if (_course2[z].typeid == _grade[i].id) {
+              if (
+                _courseArray[i].courseid.indexOf(_course2[z].courseid) === -1
+              ) {
+                _courseArray[i].courseid.push(_course2[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 < _course2.length; z++) {
+              if (
+                _course[z].typeid == _subject[j].id &&
+                _courseArray[i].courseid.indexOf(_course2[z].courseid) !== -1
+              ) {
+                if(this.cType == '0'){
+                  _courseArray[i].subject[j].course+=_course2[z].text ? parseInt((parseInt(_course2[z].text) / 3600).toFixed(0)) : 0;
+                }else if(this.cType == '2'){
+                  if(_course2[z].course_teacher.split(",").length > 0){
+                    _courseArray[i].subject[j].course++;
+                  }
+                }else if(this.cType == '3'){
+                  if(_course2[z].worksCount > 0){
+                    _courseArray[i].subject[j].course++;
+                  }
+                }else if(this.cType == '4'){
+                  if(_course2[z].evaCount > 0){
+                    _courseArray[i].subject[j].course++;
+                  }
+                }     
+              }
+            }
+          }
+        }
+      }
+      // 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.$forceUpdate();
+    },
     getData() {
       this.isLoading = true;
       let params = [
@@ -631,6 +619,8 @@ export default {
           this.isLoading = false;
           let _grade = res.data[0]; //年级
           let _subject = res.data[1]; //学科
+          this._grade = JSON.parse(JSON.stringify(_grade));
+          this._subject = JSON.parse(JSON.stringify(_subject));
           let _themeList = res.data[2]; //主题
           this.teacherNum = res.data[3][0].count; //教师总数
           let _teacherNumYear = res.data[4]; //半年内教师数量
@@ -729,8 +719,8 @@ export default {
 
           var _allTime = 0;
 
-          for(var i = 0;i<mergedArray.length;i++){
-            _allTime +=  Number(mergedArray[i].text);
+          for (var i = 0; i < mergedArray.length; i++) {
+            _allTime += Number(mergedArray[i].text);
           }
 
           // this.allTime = parseInt(res.data[7][0].time) / 60 / 60;
@@ -788,60 +778,9 @@ export default {
           this.allLoginTime = res.data[9][0].count; //一年的登录频次
 
           let _course = res.data[10]; //课程
-          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._courseArray = JSON.parse(JSON.stringify(_course));
+          this._course2 = res.data[25]; //查询课程
+          this.typeChange2()
 
           let _gradeArray = [];
           let _subjectArray = [];
@@ -1054,7 +993,7 @@ export default {
   height: 100%;
 }
 
-.left > .top {
+.left>.top {
   width: 100%;
   height: calc(100% / 2 - 10px);
   background: #fff;
@@ -1062,7 +1001,7 @@ export default {
   margin: 0 0 20px 0;
 }
 
-.left > .bottom {
+.left>.bottom {
   width: 100%;
   height: calc(100% / 2 - 10px);
   background: #fff;
@@ -1075,7 +1014,7 @@ export default {
   margin: 0 20px;
 }
 
-.center > .top {
+.center>.top {
   width: 100%;
   height: calc(100% / 5 * 3 - 10px);
   background: #fff;
@@ -1083,7 +1022,7 @@ export default {
   margin: 0 0 20px 0;
 }
 
-.center > .bottom {
+.center>.bottom {
   width: 100%;
   height: calc(100% / 5 * 2 - 10px);
   background: #fff;
@@ -1095,7 +1034,7 @@ export default {
   height: 100%;
 }
 
-.right > .top {
+.right>.top {
   width: 100%;
   height: calc(100% / 2 - 10px);
   background: #fff;
@@ -1103,7 +1042,7 @@ export default {
   margin: 0 0 20px 0;
 }
 
-.right > .bottom {
+.right>.bottom {
   width: 100%;
   height: calc(100% / 2 - 10px);
   background: #fff;
@@ -1148,6 +1087,7 @@ export default {
   padding: 0 10px;
   margin: 0 10px;
 }
+
 .teaMiddle {
   width: calc(100% / 3 - 10px);
 }
@@ -1160,43 +1100,38 @@ export default {
   margin: 0 0 0 15px;
 }
 
-.timeDiv > div {
+.timeDiv>div {
   margin-right: 10px;
   cursor: pointer;
 }
+
 .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;
@@ -1205,11 +1140,13 @@ export default {
 .halfBox {
   width: 50%;
 }
+
 .isClick {
   color: #1684fc;
   border-bottom: 2px solid #1684fc;
   box-sizing: border-box;
 }
+
 .otherCss {
   display: flex;
   flex-direction: row;
@@ -1217,16 +1154,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%;
@@ -1235,10 +1175,12 @@ export default {
   flex-wrap: nowrap;
   align-items: center;
 }
+
 .allBox_left {
   width: 30%;
   height: 100%;
 }
+
 .allBox_right {
   display: flex;
   flex-wrap: wrap;
@@ -1257,24 +1199,25 @@ 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) {}
+
 .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;
 }
 
@@ -1287,9 +1230,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;
@@ -1303,19 +1246,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: 12px;
   /* margin: 0 0 0 20px; */
   color: #565e6a;
@@ -1324,9 +1267,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; */
 }

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