Browse Source

提交最新代码

TheLittlePrince 6 years ago
parent
commit
8b7723bb0e

+ 5 - 1
src/api/index.js

@@ -46,6 +46,9 @@ const GetAllotManagerList = urlFn('/api/kmt/correctSys/getAllotManagerList')
 const AllotTeacherToManager = urlFn('/api/kmt/correctSys/allotTeacherToManager')
 // 作业回收站列表
 const HomeworkRecoveryList = urlFn('/api/kmt/correctSys/homeworkRecoveryList')
+// 报错警告
+const errorWarning = urlFn('/api/kmt/correctSys/errorWarning')
+
 export {
     GET_TOKEN,
     GET_UUIONID_TOKEN,
@@ -68,5 +71,6 @@ export {
     DealCorrectTeacher,
     GetAllotManagerList,
     AllotTeacherToManager,
-    HomeworkRecoveryList
+    HomeworkRecoveryList,
+    errorWarning
 }

BIN
src/assets/img/next_gray.png


BIN
src/assets/img/next_white.png


BIN
src/assets/img/pen.png


BIN
src/assets/img/prev_gray.png


BIN
src/assets/img/prev_white.png


+ 19 - 10
src/components/MenuComponent.vue

@@ -15,7 +15,7 @@
       <span class="lineStyle" :class="{navactive:index == checkindex,menu_item:true}">{{item.name}}</span>
     </el-col>
 
-    <el-col :span="4" :offset="10">
+    <el-col :span="4" :offset="9">
       <div class="login">   
         <img  class="userstyle"  :src="BASE_URL + avatar" alt="">
         <!-- <img class="userstyle" src="../assets/img/user.jpg"> -->
@@ -45,7 +45,7 @@ export default {
         // BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
       menuData: [
         {
-          id: "2",
+          id: "1",
           name: "校区群管理员",
           href: "SchoolManager"
         },
@@ -54,13 +54,13 @@ export default {
           name: " 在线批改老师",
           href: "TeacherApporval"
         },
-        {
-          id: "3",
-          name: "报错警告",
-          href: "TeacherPay"
-        },
+        // {
+        //   id: "3",
+        //   name: "报错警告",
+        //   href: "TeacherPay"
+        // },
       ],
-      checkindex: 0
+      checkindex: ""
     };
   },
   watch: {
@@ -75,8 +75,16 @@ export default {
     //   this.menuData = JSON.parse(JSON.stringify(this.navsData));
     // },
     secondNavClick(val, index) {
-      this.$router.push("/home/" + val.href);
-      this.checkindex = index;
+        sessionStorage.setItem('tabIndex',index);
+      this.checkindex = sessionStorage.getItem('tabIndex');
+      console.log(sessionStorage.getItem('tabIndex'))
+      if (sessionStorage.getItem('tabIndex') == 0){
+        this.$router.push("/home/" + 'SchoolManager');
+      } else if (sessionStorage.getItem('tabIndex') == 1){
+        this.$router.push("/home/" + 'TeacherApporval');
+      } else if (sessionStorage.getItem('tabIndex') == 2){
+        this.$router.push("/home/" + 'TeacherPay');
+      }
     },
     //  账号管理、退出登录
     Loginout() {
@@ -101,6 +109,7 @@ export default {
     ...mapGetters(["name", "avatar", "roles"])
   },
   mounted() {
+      this.checkindex = sessionStorage.getItem('tabIndex');
     // this.initNav();
   }
 };

+ 0 - 7
src/components/SuperComponent.vue

@@ -6,17 +6,10 @@
     <!--v-show="roles.indexOf(item.id) >= 0"-->
       <el-col :span="3"   v-for="(item, index) of menuData" :key="item.id"
       @click.native="secondNavClick(item,index)" style="text-align: center">
-<<<<<<< HEAD
-          <span class="lineStyle" :class="{active:index == checkindex,menu_item:true}">{{item.name}}</span>
-          <!--<div class="box" v-if="index==1||index==3">-->
-            <!--<span class="box-text">{{index==1?2+'项任务':3+'份作业'}}</span>-->
-          <!--</div>-->
-=======
           <span class="lineStyle" :class="{superactive:index == checkindex,menu_item:true}">{{item.name}}</span>
           <!-- <div class="box" v-if="index==1||index==3">
             <span class="box-text">{{index==1?2+'项任务':3+'份作业'}}</span>
           </div> -->
->>>>>>> 21b8f6891c717d37f8cc05e1f56edb0611d0e08e
       </el-col>
 
       <el-col :span="4" class="aside-right">

+ 154 - 0
src/pages/home/ModalCarouselPicture.vue

@@ -0,0 +1,154 @@
+<template>
+    <div class="modal-carousel-picture">
+        <transition name="slide-fade">
+            <div class="modal-container">
+                <div class="modal-wrapper">
+                    <div class="modal-cancel" @click="updateIsShowCarouselPictureModal()">X</div>
+                    <div class="modal-list">
+                        <div class="modal-li">
+                            <img class="modal-li-image" alt="">
+                        </div>
+                        <div class="modal-li modal-col">
+                            <div class="modal-top">
+                                <div class="modal-text modal-text-black">错误原因</div>
+                                <div class="modal-text">{{pictureList[pictureIndex].errorReason || '无'}}</div>
+                            </div>
+                            <div class="modal-bottom">
+                                <div class="modal-text modal-flex-end">{{pictureList[pictureIndex].checker}}</div>
+                                <div class="modal-text modal-text-green modal-flex-end">{{pictureList[pictureIndex].checkDate}}</div>
+                                <div class="modal-text modal-flex-end">
+                                    <img class="modal-icon" v-lazy="bgIcon" alt="">
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="modal-btns">
+                        <div class="modal-btn">
+                            <img class="modal-btn-icon" v-lazy="prevWhiteIcon" alt="" v-show='pictureIndex > 0' @click="updatePictureIndex(pictureIndex - 1)">
+                            <img class="modal-btn-icon" v-lazy="prevGrayIcon" alt="" v-show='pictureIndex == 0'>
+                        </div>
+                        <div class="modal-btn">
+                            <div class="modal-btn-text">
+                                <span class="modal-btn-text-white">{{+pictureIndex + 1}}</span>
+                                <span class="modal-btn-text-gray">/{{pictureList.length}}</span>
+                            </div>
+                        </div>
+                        <div class="modal-btn">
+                            <img class="modal-btn-icon" v-lazy="nextWhiteIcon" alt="" @click="updatePictureIndex(pictureIndex + 1)">
+                            <img class="modal-btn-icon" v-lazy="nextGrayIcon" alt="">
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </transition>
+    </div>
+</template>
+
+<script>
+// const { mapState, mapGetters, mapActions, mapMutations }
+export default {
+    name: 'modal-carousel-picture',
+    data () {
+        return {
+            BASE_IMG_URL:'https://xtimg.sharingschool.com/',
+            bgIcon: require('@/assets/img/pen.png'),
+            prevWhiteIcon: require('@/assets/img/prev_white.png'),
+            prevGrayIcon: require('@/assets/img/prev_gray.png'),
+            nextWhiteIcon: require('@/assets/img/next_white.png'),
+            nextGrayIcon: require('@/assets/img/next_gray.png'),
+        }
+    },
+    computed: {
+    },
+    methods: {
+
+    }
+}
+</script>
+
+<style lang="stylus" scoped>
+@import '../../style/index.styl';
+    .modal-container
+        position fixed
+        top 0
+        left 0
+        width 100%
+        height 100%
+        z-index 9
+        background rgba($color-bg-black, .7)
+        .modal-wrapper
+            position absolute
+            top 0
+            left 0
+            width 100%
+            height 100%
+            flex-col-center()
+            .modal-cancel
+                position absolute
+                top 20px
+                right 20px
+                width 50px
+                height 50px
+                text-align center
+                line-height 50px
+                background $color-bg-black
+                border-radius 100px
+                font-size $font-size-xxxl
+                color $color-text-white
+                cursor pointer
+            .modal-list
+                margin 50px auto 20px auto
+                flex 1
+                flex-row-center()
+                .modal-col
+                    height 100%
+                    flex-col()
+                .modal-li
+                    flex 1
+                    height 100%
+                    max-width 600px
+                    min-width 600px
+                    border-radius 10px
+                    background $color-bg-white
+                    margin 10px
+                    padding 20px
+                    &-image
+                        width 100%
+                        height 100%
+                        object-fit cover
+                    .modal-top
+                        width 100%
+                        flex 1
+                    .modal-text
+                        font-size $font-size-m
+                        &-black
+                            color $color-text-black
+                            font-size $font-size-xl
+                        &-green
+                            color $color-text-green
+                            font-size $font-size-s
+                    .modal-flex-end
+                        flex-row-end()
+                        margin 10px auto
+                    .modal-bottom
+                        width 100%
+                    .modal-icon
+                        width 63px
+                        height 96px
+            .modal-btns
+                margin 20px auto
+                flex-row-center()
+                .modal-btn
+                    flex 1
+                    padding 10px 20px 30px 20px
+                    &-icon
+                        cursor pointer
+                        width 41px
+                        height 37px
+                    &-text
+                        font-size $font-size-xxxl
+                        &-gray
+                            color $color-text-gray
+                        &-white
+                            color $color-text-white
+</style>

+ 2 - 0
src/pages/home/SchoolManager.vue

@@ -929,6 +929,7 @@ export default {
         subject: this.filters.gradesValue,
         teacherName: this.filters1.inputValue,
         maxCreateTime: this.filters1.MaxtimeValue,
+          oneDay: this.filters1.MaxtimeValue,
         pageNo: this.filters1.pageNo,
         pageSize: this.filters1.pageSize,
          managerId:this.managerId || ''
@@ -941,6 +942,7 @@ export default {
         subject: this.filters.gradesValue,
         teacherName: this.filters2.inputValue,
         maxCreateTime: this.filters2.MaxtimeValue,
+           oneMonth: this.filters2.MaxtimeValue,
         pageNo: this.filters2.pageNo,
         pageSize: this.filters2.pageSize,
          managerId:this.managerId || ''

+ 1 - 1
src/pages/home/TeacherApporval.vue

@@ -19,7 +19,7 @@
     computed: {},
     methods: {
       toAppovalIng(){
-            window.open('https://kmt.sharingschool.com/aijia/kmt/index.html?unionid=' + this.unionid + '&state=' + 1)
+            window.open('http://120.77.207.0:8081/kmt/index.html?unionid=' + this.unionid + '&state=' + 1)
       }
     },
     mounted() {}

+ 45 - 40
src/pages/home/TeacherPay.vue

@@ -4,41 +4,33 @@
     <!-- table 表格 -->
     <el-row :gutter="20"  class="main-items">
       <!--数据监控-->
+       <el-col class="aside" :span="1" :offset="1" style="padding: 0 !important;">
+        <div></div>
+      </el-col>
       <!--当天-->
-      <el-col :span="20"  :offset="2" class="main">
+      <el-col :span="20" class="main">
         <el-row :gutter="20" class="main-header">
           <el-col :span="5">
-         <div class="main-header-item">今日报错总次数:<span style="color:red;">{{DayTeacherList.wrongCount}}次</span></div> 
+         <div class="main-header-item">报错总次数:<span style="color:red;">{{errorWarningList.allErrorCount}}次</span></div> 
           </el-col>
         </el-row>
         <el-row :gutter="20" class="main-header">
           <el-col :span="24">
             <div class="table">
               <div class="table-head">
-                <div>头像</div>
-                <div>姓名</div>
-                <div>被报错</div>
+                <div>时间</div>
+                <div>学生</div>
                 <div>科目</div>
-                <div>批改总份数</div>
-                <div>批改总张数</div>
-                <div>平均批改时间</div>
-                <div>出勤</div>
+                 <div>查看报错详情</div>
               </div>
-              <div class="tr" v-for="(v, k) of DayTeacherList.list" :key="k">
+              <div class="tr" v-for="(v, k) of errorWarningList.list" :key="k">
                 <div class="tr-first">
-                  <div>
-                    <img :src="BASE_URL + v.imgUrl" alt class="table-img">
-                  </div>
-                  <div>{{v.name}}</div>
-                  <div v-if="v.wrongCount == 0">{{v.wrongCount}}次</div>
-                   <div style="color:red;" v-if="v.wrongCount > 0">{{v.wrongCount}}次</div>
-                  <div class="tr-active">{{v.subject}}</div>
-                  <div>{{v.homeworkCount}}</div>
-                  <div>{{v.homeworkPicCount}}/张</div>
-                  <div>{{v.avgTime}}</div>
-                  <div>{{v.attendance}}</div>
-                     <!-- <div v-if="v.attendance == 正常">{{v.attendance}}</div>
-                   <div style="color:#52cc60;" v-if="v.attendance == 未出勤">{{v.attendance}}</div> -->
+                  <div>{{v.date}}</div>
+                  <div>{{v.studentName}}</div>
+                  <div>{{v.subject}}</div>
+                   <div class="tr-seconds">
+                      <span @click="groupDetail(v)" style="cursor: pointer;" class="tr-second-check">查看详情</span>
+                    </div>
                 </div>
               </div>
             </div>
@@ -49,13 +41,9 @@
               @current-change="pageChange1"
               :page-sizes="[10]"
               layout="total, sizes, prev, pager, next, jumper"
-              :total="parseInt(DayTeacherList.pages)"
+              :total="parseInt(errorWarningList.pages)"
               :hide-on-single-page="true"
             ></el-pagination>
-            <!-- <div style="float:right;margin-left:15px;">
-            <el-button @click="myVisible = false" size="small">取 消</el-button>
-            <el-button type="primary" size="small" @click="submit">确定</el-button>
-            </div>-->
             <div style="clear:both;"></div>
           </el-col>
         </el-row>
@@ -74,7 +62,11 @@ export default {
     return {
         // BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
       BASE_URL:'https://xtimg.sharingschool.com/',
-      // BASE_URL: BASE_URL,
+       accessToken:localStorage.getItem("accessToken"), //token
+       filters1: {
+        pageNo: 1,
+        pageSize: 10,
+      },
     };
   },
   created(){
@@ -83,33 +75,46 @@ export default {
     },
   computed: {
     ...mapGetters([
-      "DayTeacherList",
+      "errorWarningList"
     ])
   },
   methods: {
     ...mapActions(["setUser"]),
        // 去批改前分配老师
     // 获取校区管理员当天数据
-    async InfoWatchDay() {
-      this.$store.dispatch("InfoWatchDay", {
-        grade: this.filters.OptionsValue,
-        subject: this.filters.gradesValue,
-        teacherName: this.filters1.inputValue,
-        maxCreateTime: this.filters1.MaxtimeValue,
+    async GeterrorWarningLists() {
+      this.$store.dispatch("GeterrorWarning", {
         pageNo: this.filters1.pageNo,
         pageSize: this.filters1.pageSize,
-         managerId:this.managerId || ''
+        accessToken: this.accessToken
       });
     },
+       handleSizeChange1(val) {
+      this.filters1.pageSize = val;
+      this.GeterrorWarningLists();
+    },
+      pageChange1(val) {
+      this.filters1.pageNo = val;
+      this.GeterrorWarningLists();
+    },  // 分页
+      //报错详情
+      groupDetail(str){
+        this.$router.push({
+          path: "/home/ModalCarouselPicture",
+          // query: {
+          //   managerId: str
+          // }
+        })
+      },
   },
   mounted() {
-    this.InfoWatchDay();
+    this.GeterrorWarningLists();
   }
 };
 </script>
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
-<style>
+<style scoped>
 html,
 body {
   height: 100%;
@@ -120,7 +125,7 @@ ul{
   margin: 0 !important
 }
 .aside {
-  background-color: #fff;
+  /* background-color: #fbfbfb; */
   margin-top: 16px;
   padding: 0;
   min-height: 880px;

+ 1 - 1
src/pages/super/HomeworkRecycle.vue

@@ -54,7 +54,7 @@
             header-align="center"
             width="450"
           >
-            <template slot-scope="scope">
+            <template slot-scope="">
                 <span class="allocation">去分配</span>
             </template>
           </el-table-column>

+ 3 - 1
src/pages/super/SchoolManager.vue

@@ -237,7 +237,7 @@
               <el-date-picker
                 @change="InfoWatchDay"
                 v-model="filters1.MaxtimeValue"
-                value-format="yyyy-MM-dd HH:mm:ss"
+                 value-format="yyyy-MM-dd"
                 type="date"
                 placeholder="选择日期"
               ></el-date-picker>
@@ -994,6 +994,7 @@ export default {
         subject: this.filters.gradesValue,
         teacherName: this.filters1.inputValue,
         maxCreateTime: this.filters1.MaxtimeValue,
+          oneDay: this.filters1.MaxtimeValue,
         pageNo: this.filters1.pageNo,
         pageSize: this.filters1.pageSize,
         managerId: this.managerId || ""
@@ -1006,6 +1007,7 @@ export default {
         subject: this.filters.gradesValue,
         teacherName: this.filters2.inputValue,
         maxCreateTime: this.filters2.MaxtimeValue,
+           oneMonth: this.filters2.MaxtimeValue,
         pageNo: this.filters2.pageNo,
         pageSize: this.filters2.pageSize,
         managerId: this.managerId || ""

+ 8 - 0
src/router/index.js

@@ -11,6 +11,8 @@ import Error404 from "@/pages/Error404";
 import SchoolManager from "@/pages/home/SchoolManager";
 import TeacherApporval from "@/pages/home/TeacherApporval";
 import TeacherPay from "@/pages/home/TeacherPay";
+import ModalCarouselPicture from "@/pages/home/ModalCarouselPicture";
+
 // 超级管理员
 import CheckTeacherAudit from "@/pages/Super/CheckTeacherAudit";
 import SuperSchoolManager from "@/pages/Super/SchoolManager";
@@ -119,6 +121,12 @@ export const constantRouterMap =
            component: TeacherPay,
            meta: { title: '教师薪酬管理', roles: ['2'] }
          },
+         {
+          path: "ModalCarouselPicture",
+          name: "ModalCarouselPicture",
+          component: ModalCarouselPicture,
+          meta: { title: '报错详情', roles: ['2'] }
+        },
        ]
      },
     //  在线批改老师角色路由

+ 1 - 0
src/store/getters.js

@@ -27,5 +27,6 @@ const getters = {
   BeforetoTeacherAllotCode: state => state.user.BeforetoTeacherAllotCode,
   SuperBeforetoTeacherAllotCode :state => state.user.SuperBeforetoTeacherAllotCode,
   BeforetoTeacherstatues :state => state.user.BeforetoTeacherstatues,
+  errorWarningList :state => state.user.errorWarningList,
 }
 export default getters

+ 19 - 2
src/store/modules/user.js

@@ -3,7 +3,7 @@ import { GET_UUIONID_TOKEN,GET_TOKEN,GetInfo,InfoWatch,InfoWatchDay,
   TeacherAllot,UnallotHomeworkList,GetTeacherDetail,
   GetStudentDetail,GetManagerDetail,Downgrade,SuperManagerList,
   SuperApplyTeacherList,ApplyOperate,GetTeacherSalaryList,DealCorrectTeacher,
-  GetAllotManagerList,AllotTeacherToManager,HomeworkRecoveryList
+  GetAllotManagerList,AllotTeacherToManager,HomeworkRecoveryList,errorWarning
   } from '@/api'
 import { getToken, setToken, removeToken } from '@/utils/auth'
 import axios from '@/axios'
@@ -32,7 +32,8 @@ const user = {
     getAllotManagerList:"",
     homeworkRecoveryList:[],
     BeforetoTeacherAllotCode:"",
-    BeforetoTeacherstatues:""
+    BeforetoTeacherstatues:"",
+    errorWarningList:[]
   },
 
   mutations: {
@@ -105,6 +106,10 @@ const user = {
     SET_GET_SUCCESS_TEACHER:(state,BeforetoTeacherstatues) => {
       state.BeforetoTeacherstatues = BeforetoTeacherstatues
     },
+    SET_ERROR_WARING:(state,errorWarningList) => {
+      state.errorWarningList = errorWarningList
+    },
+    
   },
 
   actions: {
@@ -396,6 +401,18 @@ const user = {
         })
       })
     },
+      // 报错警告
+      GeterrorWarning({ commit, state }, data) {
+        return new Promise((resolve, reject) => {
+          axios.post(errorWarning, data).then(response => {
+            const data = response.data || {}
+            commit('SET_ERROR_WARING', data);
+            resolve(response)
+          }).catch(error => {
+            reject(error)
+          })
+        })
+      },
     // 处理在线批改老师(解封)
     OpenIdTeacher({ commit, state }, data) {
       return new Promise((resolve, reject) => {