zengyicheng 2 years ago
parent
commit
7fb68fea9b

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

@@ -60,7 +60,7 @@ export default {
           //劳动课程
           //劳动课程
           this.$el.querySelector("#charts_canvas")
           this.$el.querySelector("#charts_canvas")
         );
         );
-        this.option.series[0].data = this.ooption.data;
+        this.option.series[0].data = this.ooption.data.filter(item => item.value !== 0);
         chartObj.off('click')
         chartObj.off('click')
         let _this = this
         let _this = this
         chartObj.on('click', function (param) {
         chartObj.on('click', function (param) {

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

@@ -54,6 +54,7 @@ export default {
               width: 3, // 设置线宽度
               width: 3, // 设置线宽度
               color: "#0E65F7", // 设置线颜色
               color: "#0E65F7", // 设置线颜色
             },
             },
+            areaStyle: {}
           },
           },
         ],
         ],
       },
       },

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

@@ -52,6 +52,13 @@ export default {
             type: "bar",
             type: "bar",
             // data: [60, 110, 25, 130, 65, 80],
             // data: [60, 110, 25, 130, 65, 80],
             data: [],
             data: [],
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return "#106bff";
+                },
+              },
+            },
           },
           },
         ],
         ],
       },
       },

+ 35 - 30
src/components/pages/dataBoard/course/index.vue

@@ -84,7 +84,7 @@
       </div>
       </div>
     </div>
     </div>
     <div class="right">
     <div class="right">
-      <div class="top">
+      <div class="top" style="border-radius: 5px">
         <div class="titleBox">
         <div class="titleBox">
           <div class="title">课程分析</div>
           <div class="title">课程分析</div>
           <el-select v-model="cType" @change="typeChange" class="selectBox">
           <el-select v-model="cType" @change="typeChange" class="selectBox">
@@ -187,68 +187,68 @@ export default {
     this.getData();
     this.getData();
   },
   },
   methods: {
   methods: {
-    openCourse(cid){
+    openCourse(cid) {
       window.parent.postMessage({ cid: cid, screenType: "3" }, "*");
       window.parent.postMessage({ cid: cid, screenType: "3" }, "*");
     },
     },
-    openCourse2(index){
+    openCourse2(index) {
       console.log(index);
       console.log(index);
       // console.log(this.courseNumberArray);
       // console.log(this.courseNumberArray);
-      let id = this.courseNumberArray[index].typeid
-      let typea = ""
-      let typeb = ""
-      let typed = ""
+      let id = this.courseNumberArray[index].typeid;
+      let typea = "";
+      let typeb = "";
+      let typed = "";
       // console.log(this.gradeArray);
       // console.log(this.gradeArray);
       // console.log(this.subjectArray);
       // console.log(this.subjectArray);
       // console.log(this.themeArray);
       // console.log(this.themeArray);
-      let key = 0
+      let key = 0;
       for (key in this.gradeArray) {
       for (key in this.gradeArray) {
         if (this.gradeArray.hasOwnProperty.call(this.gradeArray, key)) {
         if (this.gradeArray.hasOwnProperty.call(this.gradeArray, key)) {
           const element = this.gradeArray[key];
           const element = this.gradeArray[key];
-          if(element.typeid == id){
-            typea = id
+          if (element.typeid == id) {
+            typea = id;
           }
           }
         }
         }
       }
       }
       for (key in this.subjectArray) {
       for (key in this.subjectArray) {
         if (this.subjectArray.hasOwnProperty.call(this.subjectArray, key)) {
         if (this.subjectArray.hasOwnProperty.call(this.subjectArray, key)) {
           const element = this.subjectArray[key];
           const element = this.subjectArray[key];
-          if(element.typeid == id){
-            typed = id
+          if (element.typeid == id) {
+            typed = id;
           }
           }
         }
         }
       }
       }
       for (key in this.themeArray) {
       for (key in this.themeArray) {
         if (this.themeArray.hasOwnProperty.call(this.themeArray, key)) {
         if (this.themeArray.hasOwnProperty.call(this.themeArray, key)) {
           const element = this.themeArray[key];
           const element = this.themeArray[key];
-          if(element.typeid == id){
-            typeb = id
+          if (element.typeid == id) {
+            typeb = id;
           }
           }
         }
         }
       }
       }
       window.parent.postMessage(
       window.parent.postMessage(
-        { 
+        {
           tools: "openCourse",
           tools: "openCourse",
           typea: typea || "",
           typea: typea || "",
           typeb: typeb || "",
           typeb: typeb || "",
           typed: typed || "",
           typed: typed || "",
-        }, 
+        },
         "*"
         "*"
       );
       );
     },
     },
-    typeCourseCountCalu(){
-      this.courseNumberArray2 = this.allArray
-      this.typeCount = this.courseNumberArray2.length
-      let course = []
-      for(var i = 0;i<this.courseNumberArray2.length;i++){
-        let _array = this.courseNumberArray2[i].array
-        for(var j = 0; j <_array.length;j++){
+    typeCourseCountCalu() {
+      this.courseNumberArray2 = this.allArray;
+      this.typeCount = this.courseNumberArray2.length;
+      let course = [];
+      for (var i = 0; i < this.courseNumberArray2.length; i++) {
+        let _array = this.courseNumberArray2[i].array;
+        for (var j = 0; j < _array.length; j++) {
           console.log(_array[j]);
           console.log(_array[j]);
-          if(course.indexOf(_array[j]) == -1){
-            course.push(_array[j])
+          if (course.indexOf(_array[j]) == -1) {
+            course.push(_array[j]);
           }
           }
         }
         }
       }
       }
-      this.typeCourseCount = course.length
+      this.typeCourseCount = course.length;
     },
     },
     typeChange() {
     typeChange() {
       if (this.cType === "") {
       if (this.cType === "") {
@@ -394,6 +394,11 @@ export default {
               }
               }
             }
             }
           }
           }
+          for(var i = 0;i<toolAllArray.length;i++){
+            if(toolAllArray[i].value == 0){
+              toolAllArray.splice(i,1)
+            }
+          }
           this.toolList = toolAllArray;
           this.toolList = toolAllArray;
           var courseJson = Object.values(
           var courseJson = Object.values(
             tList.reduce(function (acc, obj) {
             tList.reduce(function (acc, obj) {
@@ -465,7 +470,7 @@ export default {
               name: _grade[i].name,
               name: _grade[i].name,
               typeid: _grade[i].id,
               typeid: _grade[i].id,
               course: 0,
               course: 0,
-              array:[]
+              array: [],
             });
             });
             for (var z = 0; z < _course.length; z++) {
             for (var z = 0; z < _course.length; z++) {
               if (_course[z].typeid == _grade[i].id) {
               if (_course[z].typeid == _grade[i].id) {
@@ -480,7 +485,7 @@ export default {
               name: _subject[i].name,
               name: _subject[i].name,
               typeid: _subject[i].id,
               typeid: _subject[i].id,
               course: 0,
               course: 0,
-              array:[]
+              array: [],
             });
             });
             for (var z = 0; z < _course.length; z++) {
             for (var z = 0; z < _course.length; z++) {
               if (_course[z].typeid == _subject[i].id) {
               if (_course[z].typeid == _subject[i].id) {
@@ -495,7 +500,7 @@ export default {
               name: themeList[i].name,
               name: themeList[i].name,
               typeid: themeList[i].id,
               typeid: themeList[i].id,
               course: 0,
               course: 0,
-              array: []
+              array: [],
             });
             });
             for (var z = 0; z < _course.length; z++) {
             for (var z = 0; z < _course.length; z++) {
               if (_course[z].typeid == themeList[i].id) {
               if (_course[z].typeid == themeList[i].id) {
@@ -508,7 +513,7 @@ export default {
           this.subjectArray = _subjectArray;
           this.subjectArray = _subjectArray;
           this.themeArray = _themeArray;
           this.themeArray = _themeArray;
           this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray];
           this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray];
-          this.typeCourseCountCalu()
+          this.typeCourseCountCalu();
           this.typeChange();
           this.typeChange();
           var wList = [];
           var wList = [];
           for (var i = 0; i < _workCourse.length; i++) {
           for (var i = 0; i < _workCourse.length; i++) {

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

@@ -61,7 +61,7 @@ export default {
                     //劳动课程
                     //劳动课程
                     this.$el.querySelector("#charts_canvas")
                     this.$el.querySelector("#charts_canvas")
                 );
                 );
-                this.option.series[0].data = this.ooption.data;
+                this.option.series[0].data = this.ooption.data.filter(item => item.value !== 0);
                 chartObj.off('click')
                 chartObj.off('click')
                 let _this = this
                 let _this = this
                 chartObj.on('click', function (param) {  
                 chartObj.on('click', function (param) {  

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

@@ -30,6 +30,7 @@ export default {
             top: 60,
             top: 60,
             bottom: 20,
             bottom: 20,
             width: "95%",
             width: "95%",
+            height: "75%",
             min: 0,
             min: 0,
             max: 100,
             max: 100,
             minSize: "0%",
             minSize: "0%",

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

@@ -50,6 +50,7 @@ export default {
             type: "line",
             type: "line",
             // data: [220, 182, 191, 234, 290, 330]
             // data: [220, 182, 191, 234, 290, 330]
             data: [],
             data: [],
+            areaStyle: {}
           },
           },
         ],
         ],
       },
       },

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

@@ -42,6 +42,13 @@ export default {
             name: "2011",
             name: "2011",
             type: "bar",
             type: "bar",
             data: [60, 110, 25, 130, 65, 80],
             data: [60, 110, 25, 130, 65, 80],
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return "#106bff";
+                },
+              },
+            },
           },
           },
         ],
         ],
       },
       },