lsc 2 gadi atpakaļ
vecāks
revīzija
4cf68aefa4

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.48d3ba7c1241e79ce5ae8136b30f24c7.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.f1661c5ebfd33221b88f.js></script><script type=text/javascript src=./static/js/app.7542d150ed9b528a7ee6.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.3ec844746261dbfbe83c626680535640.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.f1661c5ebfd33221b88f.js></script><script type=text/javascript src=./static/js/app.a08f4094b93c70f66e23.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.3ec844746261dbfbe83c626680535640.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.3ec844746261dbfbe83c626680535640.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.48d3ba7c1241e79ce5ae8136b30f24c7.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.7542d150ed9b528a7ee6.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.a08f4094b93c70f66e23.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.a08f4094b93c70f66e23.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 8 - 5
src/components/pages/dataBoard/course/chartList/workNum.vue

@@ -1,11 +1,7 @@
 <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>
@@ -27,6 +23,13 @@ export default {
         xAxis: {
           name: "任务数量",
         },
+        grid: {
+          top: '10%',
+          left: '5%',
+          right: '20%',
+          bottom: '5%',
+          containLabel: true
+        },
         yAxis: {
           name: "作业提交数量",
         },

+ 1 - 1
src/components/pages/dataBoard/course/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="body1">
+  <div class="body1" v-loading="isLoading">
     <!-- 课程数据 -->
     <div class="left">
       <div class="top">

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

@@ -43,6 +43,7 @@ export default {
       }
     },
     setArray(array){
+      this.tableData = []
       for(var i = 0;i<array.length;i++){
         this.tableData.push({
           sum:array[i].course,

+ 86 - 2
src/components/pages/dataBoard/school/index.vue

@@ -194,9 +194,12 @@
       <div class="bottom">
         <div class="titleBox">
           <div class="title">学生综合评价</div>
+          <el-select v-model="eva" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 150px;">
+            <el-option v-for="item in evArray" :key="item.id" :label="item.title" :value="item.id" :style="{'width': minWidth + 2 + 'px'}"></el-option>
+          </el-select>
         </div>
         <div class="dataBox">
-          <studentInfo></studentInfo>
+          <studentInfo :evCourseArray="evCourseArray" :eva="eva"></studentInfo>
         </div>
       </div>
     </div>
@@ -260,13 +263,20 @@ export default {
         rateUser: 0,
         upgCourseTeachers: 0,
         commentUsers: 0,
-      }
+      },
+      evArray:[],
+      eva:'',
+      evCourseArray:[],
+      minWidth:0
     }
   },
   mounted() {
     this.getData();
   },
   methods: {
+    setMinWidth (val) {
+      this.minWidth = val.srcElement.clientWidth
+    },
     getData() {
       this.isLoading = true;
       let params = [
@@ -516,6 +526,77 @@ export default {
             upgCourseTeachers: _upgCourseTeachers,
             commentUsers: _commentUsers,
           }
+
+
+          let _evArray = res.data[25] //目标数组
+          let _evWorkArray = res.data[26] //目标课程的作业
+          let _evCourseArray = [] //计算总分 
+          let _evCourse = [] //筛选有目标的数组 
+          for(var i = 0;i<_evWorkArray.length;i++){
+              let courseJson = JSON.parse(_evWorkArray[i].chapters)
+              let _rate = JSON.parse(_evWorkArray[i].rate)
+              delete _rate.content
+              if(courseJson[_evWorkArray[i].stage] && 
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task] && 
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList &&
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList.length){
+                let _elist = courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList
+                let _rateC = Object.keys(_rate)
+                let json = {}
+                for(var j = 0;j<_rateC.length;j++){
+                  for(var k = 0;k<_elist.length;k++){
+                    if(_elist[k].value == _rateC[j] && _elist[k].target){
+                      json[_elist[k].target[0]] = _rate[_rateC[j]]
+                      break;
+                    }
+                  }
+                }
+                if(Object.keys(json).length){
+                  _evCourse.push({
+                    evid:_evWorkArray[i].evaId,
+                    rateJson:json
+                  })
+                }
+              }
+          }
+          for(var i = 0;i<_evArray.length;i++){
+            _evCourseArray.push({
+              title:_evArray[i].title,
+              evid:_evArray[i].id,
+              evJson:{}
+            })
+            for(var j = 0;j<_evCourse.length;j++){
+              if(_evArray[i].id == _evCourse[j].evid){
+                let _rate = Object.keys(_evCourse[j].rateJson)
+                for(var k = 0;k<_rate.length;k++){
+                  if(_evCourseArray[i].evJson[_rate[k]]){
+                    _evCourseArray[i].evJson[_rate[k]].push(_evCourse[j].rateJson[_rate[k]])
+                  }else{
+                    _evCourseArray[i].evJson[_rate[k]] = [_evCourse[j].rateJson[_rate[k]]]
+                  }
+                }
+              }
+            }
+          }
+          for(var i = 0;i < _evCourseArray.length; i++){
+            _evCourseArray[i].indicator = []
+            _evCourseArray[i].value = []
+            let evJson = Object.keys(_evCourseArray[i].evJson)
+            for(var j = 0;j < evJson.length;j++){
+              _evCourseArray[i].indicator.push({
+                name:evJson[j],
+                max: 5 
+              })
+              let sum = 0
+              _evCourseArray[i].evJson[evJson[j]].forEach((value)=>{
+                sum+=value
+              })
+              _evCourseArray[i].value.push((sum / _evCourseArray[i].evJson[evJson[j]].length).toFixed(1))
+            }
+          }
+          this.evArray = _evArray
+          this.eva = _evArray[0].id
+          this.evCourseArray = _evCourseArray
           this.$forceUpdate();
         })
         .catch((err) => {
@@ -534,6 +615,9 @@ export default {
         this.courseNumberArray = this.themeArray
       }
       this.$forceUpdate();
+    },
+    typeChange2(){
+
     },
     format(percentage) {
       return percentage;

+ 62 - 12
src/components/pages/dataBoard/school/studentInfo/index.vue

@@ -1,13 +1,24 @@
 <template>
     <div class="data_body">
-        <div style="width: 100%; height: 100%">
+        <div style="width: 100%; height: 100%" v-if="this.ooption.xdata.length">
             <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
         </div>
+        <div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;" v-show="!this.ooption.xdata.length">暂无数据</div>
     </div>
 </template>
   
 <script>
 export default {
+    props: {
+        evCourseArray: {
+            type: Array,
+            default: []
+        },
+        eva: {
+            type: String,
+            default: ''
+        }
+    },
     data() {
         return {
             chartObj: null,
@@ -20,11 +31,11 @@ export default {
                 radar: {
                     // shape: 'circle',
                     indicator: [
-                        { name: '目标一', max: 10 },
-                        { name: '目标二', max: 10 },
-                        { name: '目标三', max: 10 },
-                        { name: '目标四', max: 10 },
-                        { name: '目标五', max: 10 }
+                        // { name: '目标一', max: 5 },
+                        // { name: '目标二', max: 5 },
+                        // { name: '目标三', max: 5 },
+                        // { name: '目标四', max: 5 },
+                        // { name: '目标五', max: 5 }
                     ]
                 },
                 series: [
@@ -34,7 +45,8 @@ export default {
                         type: 'radar',
                         data: [
                             {
-                                value: [5, 7, 7, 8, 5, 6],
+                                // 5, 4, 3, 5, 5, 2
+                                value: [],
                                 name: ''
                             }
                         ]
@@ -55,20 +67,58 @@ export default {
                     //劳动课程
                     this.$el.querySelector("#charts_canvas")
                 );
-                //   this.option.xAxis.data = option.xdata;
-                //   this.option.series[0].data = option.sdata;
+                this.option.radar.indicator = option.xdata;
+                this.option.series[0].data[0].value = option.sdata;
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
             });
         },
+        setArray(array) {
+            this.ooption = {
+                xdata: [],
+                sdata: [],
+            }
+            for(var i = 0;i<array.length;i++){
+                if(array[i].evid == this.eva){
+                    this.ooption.xdata = array[i].indicator
+                    this.ooption.sdata = array[i].value
+                    break;
+                }
+            }
+            setTimeout(() => {
+                // if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                // } else {
+                //     this.option.radar.indicator = this.ooption.xdata;
+                //     this.option.series[0].data[0].value = this.ooption.sdata;
+                //     this.chartObj.setOption(this.option);
+                // }
+            }, 100);
+            this.$forceUpdate();
+        },
     },
     watch: {
-
+        evCourseArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(newValue)
+                this.$forceUpdate();
+            },
+        },
+        eva: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(this.evCourseArray)
+                this.$forceUpdate();
+            },
+        },
     },
     mounted() {
-
-        this.setChart(this.ooption);
+        this.setArray(this.evCourseArray)
+        // this.setChart(this.ooption);
         var _this = this;
         window.addEventListener("resize", () => {
             if (_this.chartObj) {

+ 115 - 3
src/components/pages/dataBoard/student/index.vue

@@ -33,7 +33,7 @@
           <div class="title">学生行为数据</div>
         </div>
         <div class="dataBox">
-          <stuAct style="height: calc(100% - 20px)"></stuAct>
+          <stuAct style="height: calc(100% - 20px)" :courseClass="courseClass"></stuAct>
         </div>
       </div>
     </div>
@@ -139,9 +139,12 @@
       <div class="top">
         <div class="titleBox">
           <div class="title">学生综合评价</div>
+          <el-select v-model="eva" @change="typeChange2" @focus="setMinWidth" class="selectBox" style="width: 150px;">
+            <el-option v-for="item in evArray" :key="item.id" :label="item.title" :value="item.id" :style="{'width': minWidth + 2 + 'px'}"></el-option>
+          </el-select>
         </div>
         <div class="dataBox">
-          <studentInfo2></studentInfo2>
+          <studentInfo2 :evCourseArray="evCourseArray" :eva="eva"></studentInfo2>
         </div>
       </div>
       <div class="bottom">
@@ -197,13 +200,21 @@ export default {
       loginCountMonthArray:[],
       weekCount:0,
       classList:[],
-      scoreJun:0
+      scoreJun:0,
+      evArray:[],
+      eva:'',
+      evCourseArray:[],
+      minWidth:0,
+      courseClass:[]
     };
   },
   mounted() {
     this.getData();
   },
   methods: {
+    setMinWidth (val) {
+      this.minWidth = val.srcElement.clientWidth
+    },
     getData() {
       this.isLoading = true;
       let params = [
@@ -269,6 +280,93 @@ export default {
             _sumScore += _score.wScore
           }
           this.scoreJun = (_sumScore / _scoreArray.length).toFixed(0)
+
+
+          let _evArray = res.data[7] //目标数组
+          let _evWorkArray = res.data[8] //目标课程的作业
+          let _evCourseArray = [] //计算总分 
+          let _evCourse = [] //筛选有目标的数组 
+          for(var i = 0;i<_evWorkArray.length;i++){
+              let courseJson = JSON.parse(_evWorkArray[i].chapters)
+              let _rate = JSON.parse(_evWorkArray[i].rate)
+              delete _rate.content
+              if(courseJson[_evWorkArray[i].stage] && 
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task] && 
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList &&
+                courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList.length){
+                let _elist = courseJson[_evWorkArray[i].stage].chapterInfo[0].taskJson[_evWorkArray[i].task].eList
+                let _rateC = Object.keys(_rate)
+                let json = {}
+                for(var j = 0;j<_rateC.length;j++){
+                  for(var k = 0;k<_elist.length;k++){
+                    if(_elist[k].value == _rateC[j] && _elist[k].target){
+                      json[_elist[k].target[0]] = _rate[_rateC[j]]
+                      break;
+                    }
+                  }
+                }
+                if(Object.keys(json).length){
+                  _evCourse.push({
+                    evid:_evWorkArray[i].evaId,
+                    rateJson:json
+                  })
+                }
+              }
+          }
+          for(var i = 0;i<_evArray.length;i++){
+            _evCourseArray.push({
+              title:_evArray[i].title,
+              evid:_evArray[i].id,
+              evJson:{}
+            })
+            for(var j = 0;j<_evCourse.length;j++){
+              if(_evArray[i].id == _evCourse[j].evid){
+                let _rate = Object.keys(_evCourse[j].rateJson)
+                for(var k = 0;k<_rate.length;k++){
+                  if(_evCourseArray[i].evJson[_rate[k]]){
+                    _evCourseArray[i].evJson[_rate[k]].push(_evCourse[j].rateJson[_rate[k]])
+                  }else{
+                    _evCourseArray[i].evJson[_rate[k]] = [_evCourse[j].rateJson[_rate[k]]]
+                  }
+                }
+              }
+            }
+          }
+          for(var i = 0;i < _evCourseArray.length; i++){
+            _evCourseArray[i].indicator = []
+            _evCourseArray[i].value = []
+            let evJson = Object.keys(_evCourseArray[i].evJson)
+            for(var j = 0;j < evJson.length;j++){
+              _evCourseArray[i].indicator.push({
+                name:evJson[j],
+                max: 5 
+              })
+              let sum = 0
+              _evCourseArray[i].evJson[evJson[j]].forEach((value)=>{
+                sum+=value
+              })
+              _evCourseArray[i].value.push((sum / _evCourseArray[i].evJson[evJson[j]].length).toFixed(1))
+            }
+          }
+          this.evArray = _evArray
+          this.eva = _evArray[0].id
+          this.evCourseArray = _evCourseArray
+
+          let _courseClassArray = res.data[9] //作业带课程
+          let _courseClass = []
+          for(var i = 0;i<_classList.length;i++){
+            _courseClass.push({
+              name:_classList[i].name,
+              works:0,
+              id:_classList[i].id
+            })
+            for(var j = 0;j<_courseClassArray.length;j++){
+              if(_courseClassArray[j].classid.indexOf(_classList[i].id) != -1){
+                _courseClass[i].works++
+              }
+            }
+          }
+          this.courseClass = _courseClass
         })
         .catch((err) => {
           this.isLoading = false;
@@ -474,4 +572,18 @@ export default {
 }
 .depth > div:nth-child(1) {
 }
+
+.selectBox {
+  width: 80px;
+  margin-left: 10px;
+}
+
+.selectBox>>>.el-input__inner {
+  height: 30px;
+  line-height: 30px;
+}
+
+.selectBox>>>.el-input__icon {
+  line-height: 30px;
+}
 </style>

+ 43 - 11
src/components/pages/dataBoard/student/stuAct/index.vue

@@ -7,16 +7,17 @@
         :header-cell-style="{ background: '#E0EAFB' }"
         :row-class-name="tableRowClassName"
       >
-        <el-table-column prop="rank" label="排行" min-width="50" align="center">
+      <el-table-column label="排行" min-width="50" align="center">
+          <template slot-scope="scope">{{ scope.$index + 1 }}</template>
         </el-table-column>
         <el-table-column
           prop="name"
-          label="类别名称"
+          label="班级名称"
           min-width="80"
           align="center"
         >
         </el-table-column>
-        <el-table-column prop="sum" label="授课次数" min-width="80" align="center">
+        <el-table-column prop="sum" label="作业数量" min-width="80" align="center">
         </el-table-column>
       </el-table>
     </div>
@@ -25,17 +26,23 @@
 
 <script>
 export default {
+  props: {
+    courseClass: {
+      type: Array,
+      default: []
+    },
+  },
   data() {
     return {
       tableData: [
-        { rank: "1", name: "一年级", sum: "2356" },
-        { rank: "2", name: "二年级", sum: "2256" },
-        { rank: "3", name: "三年级", sum: "2156" },
-        { rank: "4", name: "四年级", sum: "1356" },
-        { rank: "5", name: "五年级", sum: "1256" },
-        { rank: "6", name: "六年级", sum: "1056" },
-        { rank: "7", name: "七年级", sum: "956" },
-        { rank: "8", name: "八年级", sum: "856" },
+        // { rank: "1", name: "一年级", sum: "2356" },
+        // { rank: "2", name: "二年级", sum: "2256" },
+        // { rank: "3", name: "三年级", sum: "2156" },
+        // { rank: "4", name: "四年级", sum: "1356" },
+        // { rank: "5", name: "五年级", sum: "1256" },
+        // { rank: "6", name: "六年级", sum: "1056" },
+        // { rank: "7", name: "七年级", sum: "956" },
+        // { rank: "8", name: "八年级", sum: "856" },
       ],
     };
   },
@@ -47,6 +54,31 @@ export default {
         return "";
       }
     },
+    setArray(array){
+      this.tableData = []
+      for(var i = 0;i<array.length;i++){
+        this.tableData.push({
+          sum:array[i].works,
+          name:array[i].name
+        })
+      }
+      this.tableData = this.tableData.sort(function(a,b){
+        return b.sum - a.sum;
+      })
+    }
+  },
+  watch: {
+    courseClass: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.courseClass)
   },
 };
 </script>

+ 62 - 12
src/components/pages/dataBoard/student/studentInfo2/index.vue

@@ -1,13 +1,24 @@
 <template>
     <div class="data_body">
-        <div style="width: 100%; height: 100%">
+        <div style="width: 100%; height: 100%" v-if="this.ooption.xdata.length">
             <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
         </div>
+        <div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;" v-show="!this.ooption.xdata.length">暂无数据</div>
     </div>
 </template>
   
 <script>
 export default {
+    props: {
+        evCourseArray: {
+            type: Array,
+            default: []
+        },
+        eva: {
+            type: String,
+            default: ''
+        }
+    },
     data() {
         return {
             chartObj: null,
@@ -20,11 +31,11 @@ export default {
                 radar: {
                     // shape: 'circle',
                     indicator: [
-                        { name: '目标一', max: 10 },
-                        { name: '目标二', max: 10 },
-                        { name: '目标三', max: 10 },
-                        { name: '目标四', max: 10 },
-                        { name: '目标五', max: 10 }
+                        // { name: '目标一', max: 5 },
+                        // { name: '目标二', max: 5 },
+                        // { name: '目标三', max: 5 },
+                        // { name: '目标四', max: 5 },
+                        // { name: '目标五', max: 5 }
                     ]
                 },
                 series: [
@@ -34,7 +45,8 @@ export default {
                         type: 'radar',
                         data: [
                             {
-                                value: [5, 7, 7, 8, 5, 6],
+                                // 5, 4, 3, 5, 5, 2
+                                value: [],
                                 name: ''
                             }
                         ]
@@ -55,20 +67,58 @@ export default {
                     //劳动课程
                     this.$el.querySelector("#charts_canvas")
                 );
-                //   this.option.xAxis.data = option.xdata;
-                //   this.option.series[0].data = option.sdata;
+                this.option.radar.indicator = option.xdata;
+                this.option.series[0].data[0].value = option.sdata;
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
             });
         },
+        setArray(array) {
+            this.ooption = {
+                xdata: [],
+                sdata: [],
+            }
+            for(var i = 0;i<array.length;i++){
+                if(array[i].evid == this.eva){
+                    this.ooption.xdata = array[i].indicator
+                    this.ooption.sdata = array[i].value
+                    break;
+                }
+            }
+            setTimeout(() => {
+                // if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                // } else {
+                //     this.option.radar.indicator = this.ooption.xdata;
+                //     this.option.series[0].data[0].value = this.ooption.sdata;
+                //     this.chartObj.setOption(this.option);
+                // }
+            }, 100);
+            this.$forceUpdate();
+        },
     },
     watch: {
-
+        evCourseArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(newValue)
+                this.$forceUpdate();
+            },
+        },
+        eva: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setArray(this.evCourseArray)
+                this.$forceUpdate();
+            },
+        },
     },
     mounted() {
-
-        this.setChart(this.ooption);
+        this.setArray(this.evCourseArray)
+        // this.setChart(this.ooption);
         var _this = this;
         window.addEventListener("resize", () => {
             if (_this.chartObj) {

+ 1 - 1
src/components/pages/dataBoard/teacher/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="body1">
+  <div class="body1" v-loading="isLoading">
     <!-- 教师数据 -->
     <div class="left">
       <div class="top">

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels