Browse Source

提交校区管理员监控接口

TheLittlePrince 6 years ago
parent
commit
1f2f683df7

+ 4 - 1
src/api/index.js

@@ -12,10 +12,13 @@ const InfoWatch = urlFn('/api/kmt/correctSys/monitorTeacherList')
 const InfoWatchDay = urlFn('/api/kmt/correctSys/monitorOneDayList')
 // 校区群管理员当月数据
 const InfoWatchMoth = urlFn('/api/kmt/correctSys/monitorOneMonthList')
+//查看老师批改作业列表
+const TeacherHomeworkList = urlFn('/api/kmt/correctSys/teacherHomeworkList')
 export {
     GET_TOKEN,
     GetInfo,
     InfoWatch,
     InfoWatchDay,
-    InfoWatchMoth
+    InfoWatchMoth,
+    TeacherHomeworkList
 }

+ 3 - 2
src/components/MenuComponent.vue

@@ -2,8 +2,9 @@
   <el-col :span="24" class="">
       <el-col :span="2" :offset="2">
        <img class="logoImg" src="../assets/img/log.png"/>
-      </el-col>
-      <el-col :span="2" v-show="roles.indexOf(item.id) >= 0"  v-for="(item, index) of menuData" :key="item.id"
+      </el-col>  
+      <!-- v-show="roles.indexOf(item.id) >= 0" -->
+      <el-col :span="2"  v-for="(item, index) of menuData" :key="item.id"
       @click.native="secondNavClick(item,index)" style="text-align: center">
         <span class="lineStyle" :class="{active:index == checkindex,menu_item:true}">{{item.name}}</span>
 

+ 85 - 18
src/pages/home/SchoolManager.vue

@@ -77,20 +77,21 @@
                 <div>响应速度</div>
                 <div>状态</div>
               </div>
-              <div class="tr">
+              <div class="tr" v-for="(v, k) of monitorTeacherList.list"
+                             :key='k'>
                 <div class="tr-first">
                   <div>
-                    <i :class="[isDown?'el-icon-caret-bottom':'el-icon-caret-top']" @click="dropDown()"></i>
-                    <img src="../../assets/img/user.jpg" alt="" class="table-img">
+                    <i :class="[isDown?'el-icon-caret-bottom':'el-icon-caret-top']" @click="dropDown(k)"></i>
+                    <img :src="BASE_URL + v.imgUrl" alt="" class="table-img">
                   </div>
-                  <div>颜如玉</div>
-                  <div>2份</div>
-                  <div class="tr-active">8:16</div>
-                  <div>12:30:04</div>
-                  <div>5:02/份</div>
-                  <div>在线</div>
+                  <div>{{v.name}}</div>
+                  <div>{{v.waitCount}}份</div>
+                  <div class="tr-active">{{v.maxWaitTime}}</div>
+                  <div>{{v.totalCorrectTime}}</div>
+                  <div>{{v.respSpeed}}/份</div>
+                  <div>{{v.status}}</div>
                 </div>
-                <div class="tr-second" v-if="isDown">
+                <div class="tr-second" v-if="isDownindex === k">
                       <div>1</div>
                       <div>
                         <span class="tr-second-check" @click="isShow(2)">查看</span>
@@ -318,10 +319,53 @@
     props: {},
     data() {
       return {
+        // BASE_URL:'https://img.sharingschool.com',
+          BASE_URL:'https://xt.sharingschool.com/upload/',
+          isDownindex:0,
         modelindex: 0,
         hiddenModel:false,
         isPigai:false,
         isDown:false,
+            options: [
+        {
+          value: "0",
+          label: "一年级"
+        },
+        {
+          value: "1",
+          label: "二年级"
+        },
+        {
+          value: "2",
+          label: "三年级"
+        },
+        {
+          value: "3",
+          label: "四年级"
+        },
+        {
+          value: "4",
+          label: "五年级"
+        },
+        {
+          value: "5",
+          label: "六年级"
+        }
+      ],
+      grades: [
+        {
+          value: "0",
+          label: "语文"
+        },
+        {
+          value: "1",
+          label: "数学"
+        },
+        {
+          value: "2",
+          label: "英语"
+        }
+      ],
         ItemList: [
           {
             text:'数据监控'
@@ -353,6 +397,22 @@
             status:'22'
           }
         ],
+          filters: { //超级管理员的当天数据
+        actvNm: "",
+        actvCrtUserId: "",
+        actvType: "",
+        actvSmallType: "",
+        // 排序
+        MaxtimeValue:"",
+        OptionsValue: "",
+        gradesValue: "",
+        inputValue: "",
+        pageNo: 1,
+        pageSize: 10,
+        count: 0,
+        orderField: "",
+        orderAD: ""
+      },
        filters1: { //超级管理员的当天数据
         actvNm: "",
         actvCrtUserId: "",
@@ -395,8 +455,10 @@
     ...mapActions(["setUser"]),
 
     // 点击下拉
-    dropDown(){
+    dropDown(k){
       this.isDown = !this.isDown;
+      this.isDownindex = k
+      // this.TeacherHomeworkList()
     },
     // // 分页
     // pageChange(val) {
@@ -414,8 +476,6 @@
     // },
     // 获取校区管理员监控数据
     async InfoWatch() {
-      let filter = {
-      };
       this.$store.dispatch("InfoWatch", {
         grade: this.filters.gradesValue,
         subject: this.filters.OptionsValue,
@@ -427,8 +487,6 @@
     },
       // 获取校区管理员当天数据
     async InfoWatchDay() {
-      let filter = {
-      };
       this.$store.dispatch("InfoWatchDay", {
         grade: this.filters1.gradesValue,
         subject: this.filters1.OptionsValue,
@@ -440,8 +498,6 @@
     },
       // 获取校区管理员当月数据
     async InfoWatchMoth() {
-      let filter = {
-      };
       this.$store.dispatch("InfoWatchMoth", {
         grade: this.filters2.gradesValue,
         subject: this.filters2.OptionsValue,
@@ -451,6 +507,17 @@
         pageSize: this.filters2.pageSize
       });
     },
+      // 查看老师批改作业列表
+    async TeacherHomeworkList() {
+      this.$store.dispatch("TeacherHomeworkList", {
+        grade: this.filters.gradesValue,
+        subject: this.filters.OptionsValue,
+        teacherName: this.filters.inputValue,
+        maxCreateTime: this.filters.MaxtimeValue,
+        pageNo: this.filters.pageNo,
+        pageSize: this.filters.pageSize
+      });
+    },
     selectTitle(k) {
       console.log(k);
       this.modelindex = k;
@@ -589,7 +656,7 @@
     line-height: 80px;
   }
   .main-header-item{
-    font-size: 20px;
+    font-size: 16px;
   }
   .main-header-link{
     color: #52CC60;

+ 40 - 0
src/pages/super/CheckTeacherAudit.vue

@@ -313,6 +313,46 @@
         checkindex: 0,
         hiddenModel:false,
         isPigai:false,
+            options: [
+        {
+          value: "0",
+          label: "一年级"
+        },
+        {
+          value: "1",
+          label: "二年级"
+        },
+        {
+          value: "2",
+          label: "三年级"
+        },
+        {
+          value: "3",
+          label: "四年级"
+        },
+        {
+          value: "4",
+          label: "五年级"
+        },
+        {
+          value: "5",
+          label: "六年级"
+        }
+      ],
+      grades: [
+        {
+          value: "0",
+          label: "语文"
+        },
+        {
+          value: "1",
+          label: "数学"
+        },
+        {
+          value: "2",
+          label: "英语"
+        }
+      ],
         ItemList: [
           {
             text:'数据监控'

+ 21 - 7
src/store/modules/user.js

@@ -1,5 +1,5 @@
 import { LOGIN,GET_TOKEN,GetInfo,InfoWatch,InfoWatchDay,
-  InfoWatchMoth } from '@/api'
+  InfoWatchMoth,TeacherHomeworkList } from '@/api'
 import { getToken, setToken, removeToken } from '@/utils/auth'
 import axios from '@/axios'
 const user = {
@@ -11,6 +11,7 @@ const user = {
     monitorTeacherList:[],
     dayTeacherList:[],
     mothTeacherList:[],
+    TeacherHomeworkList:[]
   },
 
   mutations: {
@@ -34,6 +35,9 @@ const user = {
     },
     SET_TEACHER_MOTH: (state, monitorTeacherList) => {
       state.mothTeacherList = mothTeacherList
+    },
+    SET_TEACHER_HOMELISt: (state, TeacherHomeworkList) => {
+      state.TeacherHomeworkList = TeacherHomeworkList
     }
   },
 
@@ -86,32 +90,42 @@ const user = {
         axios.post(InfoWatch, data).then(response => {
           const data = response.data
           commit('SET_TEACHER', data);
-          debugger
           resolve(response)
         }).catch(error => {
           reject(error)
         })
       })
     },
+      // 校区管理员当月数据
+      InfoWatchMoth({ commit, state }, data) {
+        return new Promise((resolve, reject) => {
+          axios.post(InfoWatchMoth, data).then(response => {
+            const data = response.data
+            commit('SET_TEACHER_MOTH', data);
+            resolve(response)
+          }).catch(error => {
+            reject(error)
+          })
+        })
+      },
      // 校区管理员当天数据
      InfoWatchDay({ commit, state }, data) {
       return new Promise((resolve, reject) => {
         axios.post(InfoWatchDay, data).then(response => {
           const data = response.data
           commit('SET_TEACHER_DAY', data);
-          debugger
           resolve(response)
         }).catch(error => {
           reject(error)
         })
       })
     },
-     // 校区管理员当月数据
-     InfoWatchMoth({ commit, state }, data) {
+     // 查看老师批改作业列表
+     TeacherHomeworkList({ commit, state }, data) {
       return new Promise((resolve, reject) => {
-        axios.post(InfoWatchMoth, data).then(response => {
+        axios.post(TeacherHomeworkList, data).then(response => {
           const data = response.data
-          commit('SET_TEACHER_MOTH', data);
+          commit('SET_TEACHER_HOMELISt', data);
           debugger
           resolve(response)
         }).catch(error => {