Browse Source

修复测试反馈

TheLittlePrince 6 years ago
parent
commit
1708f23880

+ 1 - 0
src/assets/css/element_amend.css

@@ -3,6 +3,7 @@
 body {
   overflow-x: hidden;
   overflow-y: auto;
+  font-size: 16px!important;
 }
 
 /* for Chrome */

+ 0 - 1
src/components/MenuComponent.vue

@@ -100,7 +100,6 @@ export default {
       })
         .then(() => {
           localStorage.removeItem("accessToken");
-          debugger
           this.$store.dispatch("LogOut").then(() => {
             location.reload(); // 为了重新实例化vue-router对象 避免bug
           });

+ 6 - 1
src/components/SuperComponent.vue

@@ -10,7 +10,7 @@
 
       </el-col>
 
-      <el-col :span="4" :offset="9">
+      <el-col :span="3" :offset="6">
       <div class="login">   
         <img  class="userstyle"  :src="BASE_URL + avatar" alt="">
         <!-- <img class="userstyle" src="../assets/img/user.jpg"> -->
@@ -51,6 +51,11 @@ export default {
     name: "批改老师薪酬表",
     href: "CheckTeacherPay",
   },
+   {
+    id: "4",
+    name: "作业回收站",
+    href: "HomeWorkRecover",
+  },
  ],
       checkindex: 0
     };

+ 1 - 1
src/config/index.js

@@ -4,7 +4,7 @@ if (process.env.NODE_ENV === 'development') {
     // BASE_URL = 'http://127.0.0.1:8080'
     BASE_URL = 'https://xt.sharingschool.com/sz'
 } else {
-    BASE_URL = 'https://t.sharingschool.com/sz';
+    BASE_URL = 'https://xt.sharingschool.com/sz';
 }
 const TIME_OUT = 10000
 

+ 20 - 22
src/pages/Login.vue

@@ -27,32 +27,30 @@ export default {
   },
   watch: {},
   created() {
-    // this.getTKByUnionid()
+    this.getTKByUnionid()
   },
   methods: {
     WxLoginCtl() {
-      // this.$util.messageMethod("success", "前去微信登陆扫码授权");
-      this.$router.push({
-        path: "/aikmt/Redirect_uri",
-        query: {
-          unionid: "oPHg8wXraekgH5YKVHvD3H7Ujynw",
-          prince: "6666666666666"
-        }
-      });
+      // this.$router.push({
+      //   path: "/aikmt/Redirect_uri",
+      //   query: {
+      //     unionid: "oPHg8wVj5EyFkLImpL62YOSOagSI"
+      //   }
+      // });
     },
-    // async getTKByUnionid() {
-    //   if (window.location.href.indexOf("unionid") >= 0) {
-    //     // 如果url中包含code,则保存到store中
-    //     let unionid = window.location.href.split("?")[1];
-    //     unionid = unionid.substring(8, code.indexOf("&"));
-    //     let WxCode = unionid;
-    //     this.WxCode = WxCode;
-    //     this.$store.dispatch("UnionidLogin", {
-    //      unionid: this.WxCode
-    //   });
-    //   }
-    //  return
-    // }
+    async getTKByUnionid() {
+      if (window.location.href.indexOf("unionid") >= 0) {
+        // 如果url中包含code,则保存到store中
+        let unionid = window.location.href.split("?")[1];
+        unionid = unionid.substring(8);
+        let WxCode = unionid;
+        this.WxCode = WxCode;
+        this.$store.dispatch("UnionidLogin", {
+         unionid: this.WxCode
+      });
+      }
+     return
+    }
   },
   mounted() {
     var obj = new WxLogin({

+ 28 - 27
src/pages/aikmt/Redirect_uri.vue

@@ -5,7 +5,7 @@
     </div>
     <div class="log-container">
       <img class="log-icon" src="../../assets/img/log.png">
-      <div class="log-text">欢迎登陆私塾家知识管理后台重定向页面啦啦啦啦啦</div>
+      <div class="log-text">欢迎登陆私塾家知识管理后台重定向页面</div>
       <div class="log-qrcode">
         <img class="log-qrcode-image" src="../../assets/img/ssj_qrcode.png">
         <div class="log-qrcode-text">请使用微信扫码登陆</div>
@@ -29,39 +29,40 @@ export default {
     };
   },
   created() {
-    this.getTKByUnionid();
+    // this.getTKByUnionid();
+    this.getTKByCode();
     // debugger
   },
   computed: {
     ...mapGetters(["token"])
   },
   methods: {
-    async getTKByUnionid() {
-      if (window.location.href.indexOf("unionid") >= 0) {
-        //  debugger
-        // 如果url中包含code,则保存到store中
-        let unionid = window.location.href.split("?")[1];
-        unionid = unionid.substring(8, unionid.indexOf("&"));
-        let WxCode = unionid;
-        this.WxCode = WxCode;
-        this.$store.dispatch("UnionidLogin", {
-          unionid: this.WxCode
-        });
-      }
-      return
-    }
-    // async getTKByCode(){
-    //    if (window.location.href.indexOf('code') >= 0) {
-    //       // 如果url中包含code,则保存到store中
-    //       let code = window.location.href.split("?")[1];
-    //       code = code.substring(5, code.indexOf('&'));
-    //       let WxCode = code
-    //       this.WxCode = WxCode
-    //     }
-    //          this.$store.dispatch('GET_TOKEN', {
-    //            code: this.WxCode
-    //       });
+    // async getTKByUnionid() {
+    //   if (window.location.href.indexOf("unionid") >= 0) {
+    //     //  debugger
+    //     // 如果url中包含code,则保存到store中
+    //     let unionid = window.location.href.split("?")[1];
+    //     unionid = unionid.substring(8);
+    //     let WxCode = unionid;
+    //     this.WxCode = WxCode;
+    //     this.$store.dispatch("UnionidLogin", {
+    //       unionid: this.WxCode         
+    //     });
+    //   }
+    //   return
     // }
+    async getTKByCode(){
+       if (window.location.href.indexOf('code') >= 0) {
+          // 如果url中包含code,则保存到store中
+          let code = window.location.href.split("?")[1];
+          code = code.substring(5);
+          let WxCode = code
+          this.WxCode = WxCode
+        }
+             this.$store.dispatch('GET_TOKEN', {
+               code: this.WxCode
+          });
+    }
   },
   mounted() {}
 };

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

@@ -85,7 +85,7 @@
               </div>
               <div class="tr" v-for="(v, k) of monitorTeacherList.list" :key="k">
                 <!-- 在线 -->
-                <div v-if="v.status == '在线'" class="tr-first">
+                <div v-if="v.status == '1'" class="tr-first">
                   <div>
                     <i
                       :class="[isDown && isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-top']"
@@ -98,10 +98,10 @@
                   <div class="tr-active">{{v.maxWaitTime}}</div>
                   <div>{{v.totalCorrectTime}}</div>
                   <div>{{v.respSpeed}}/份</div>
-                  <div>{{v.status}}</div>
+                  <div>在线</div>
                 </div>
                 <!-- 离线 -->
-                 <div v-if="v.status == '离线'" style="color:#BEBEBE" class="tr-first">
+                 <div v-if="v.status == '2'" style="color:#BEBEBE" class="tr-first">
                   <div>
                     <i
                       :class="[isDown && isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-top']"
@@ -114,10 +114,10 @@
                   <div>{{v.maxWaitTime}}</div>
                   <div>{{v.totalCorrectTime}}</div>
                   <div>{{v.respSpeed}}/份</div>
-                  <div>{{v.status}}</div>
+                  <div>离线</div>
                 </div>
                 <!-- 封号 -->
-                 <div v-if="v.status == '已封号'"  style="color:#FF6767" class="tr-first">
+                 <div v-if="v.status == '3'"  style="color:#FF6767" class="tr-first">
                   <div>
                     <i
                       :class="[isDown && isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-top']"
@@ -130,30 +130,33 @@
                   <div>{{v.maxWaitTime}}</div>
                   <div>{{v.totalCorrectTime}}</div>
                   <div>{{v.respSpeed}}/份</div>
-                  <div>{{v.status}}</div>
+                  <div>已封号</div>
+                </div>
+                <div class="tr-setNo" v-if="isDownindex === k && isDown && TeacherHomeworkList.list.length == 0">
+                    暂无数据!
                 </div>
                 <div v-if="isDownindex === k && isDown">
                   <div class="tr-second" v-for="(v, k) of TeacherHomeworkList.list" :key="k">
                     <div class="tr-seconds">{{k+1}}</div>
-                    <div class="tr-seconds">
+                    <div class="tr-seconds tr-w120">
                       <span @click="isShow(v,4)" style="cursor: pointer;" class="tr-second-check">查看</span>
                       <span>{{v.name}}</span>
                     </div>
-                    <div class="tr-seconds">{{v.spendTime}}</div>
-                    <div class="tr-seconds">{{v.subject}}</div>
-                    <div class="tr-seconds">{{v.grade}}</div>
-                    <div v-if="v.status === 1" class="tr-seconds">未批改</div>
-                    <div v-if="v.status === 2" class="tr-seconds" style="color:#FFC303">批改中</div>
-                    <div v-if="v.status === 3" class="tr-seconds">已批改</div>
-                    <div class="tr-s" v-if="v.status === 1">
+                    <div class="tr-secondsA">{{v.spendTime}}</div>
+                    <div class="tr-seconds width40">{{v.subject}}</div>
+                    <div class="tr-seconds width40">{{v.grade}}</div>
+                    <div v-if="v.status === 1" class="tr-seconds width40">未批改</div>
+                    <div v-if="v.status === 2" class="tr-seconds width40" style="color:#FFC303">批改中</div>
+                    <div v-if="v.status === 3" class="tr-seconds width40">已批改</div>
+                    <div class="tr-sw180" v-if="v.status === 1">
                      <el-button type="" plain><a style="text-decoration:none;color:#52cc60;" :href="'https://kmt.sharingschool.com/aijia/kmt/index.html?homeworkId='+v.homeworkId+'&accessToken='+accessToken+'&state='+1">去批改</a></el-button>
                       <el-button @click="isShow(v,1)" type="success">去分配</el-button>
                     </div>
-                    <div class="tr-s" v-if="v.status === 3 && v.isCheck ===1">
+                    <div class="tr-sw180" v-if="v.status === 3 && v.isCheck ===1">
                       <el-button type="info" plain>已检查</el-button>
                       <span style="color:red;font-size:12px;">报错{{v.wrongCount}}</span>
                     </div>
-                    <div class="tr-s" v-if="v.status === 3 && v.isCheck ===0">
+                    <div class="tr-sw180" v-if="v.status === 3 && v.isCheck ===0">
                      <el-button type="warning" plain><a style="text-decoration:none;color:#52cc60;" :href="'http://120.77.207.0:8081/kmt/index.html?homeworkId='+v.homeworkId+'&accessToken='+accessToken+'&state='+2">去检查</a></el-button>
                     </div>
                   </div>
@@ -165,6 +168,7 @@
             :page-sizes="[10, 20]"
              layout="total, sizes, prev, pager, next, jumper"
              :total= parseInt(TeacherHomeworkList.pages)
+             :hide-on-single-page="true"
             ></el-pagination>
                 </div>
               </div>
@@ -413,6 +417,9 @@
           <div>可分配老师</div>
           <div>{{allotList.Allotgarde}}{{allotList.Allotsubjct}}</div>
         </div>
+          <div class="tr-setNo"  v-if="TeacherAllotList.list.length == 0">
+            暂无数据!
+          </div>
         <div class="model-items" v-for="(v, k) in TeacherAllotList.list" :key="k">
           <div class="model-items-left">
             <div class="model-items-left-top">
@@ -458,6 +465,9 @@
         </div>
         <div>
           <!-- UnallotHomeworkInfo -->
+          <div class="tr-setNo"  v-if="UnallotHomeworkInfo.list.length == 0">
+            暂无数据!
+          </div>
           <div class="tr-set" v-for="(v, k) of UnallotHomeworkInfo.list" :key="k">
             <div class="tr-secon">{{k+1}}</div>
             <div class="tr-secon" style="width:50px;">
@@ -481,6 +491,7 @@
             :page-sizes="[10]"
              layout="total, sizes, prev, pager, next, jumper"
              :total= parseInt(UnallotHomeworkInfo.pages)
+              :hide-on-single-page="true"
             ></el-pagination>
         </div>
   
@@ -1127,6 +1138,13 @@ el-table {
   font-size: 12px;
   margin: 20px;
 }
+.tr-setNo {
+  display: flex;
+  justify-content: space-around;
+  color: #000000f1;
+  font-size: 16px;
+  margin: 20px;
+}
 .tr-secon {
   font-size: 12px;
   text-align: center;
@@ -1137,7 +1155,6 @@ el-table {
   background-color: #fbfbfb;
   margin: 0 115px;
   display: flex;
-  justify-content: space-around;
   color: #393939;
   font-size: 20px;
 }
@@ -1145,9 +1162,24 @@ el-table {
    text-align: center;
   font-size: 14px;
   word-wrap: break-word;
-   /* width: 40px; */
+  margin:0 50px;
    /* height: 30px; */
 }
+.width40{
+width: 60px;
+}
+.tr-sw180{
+  width: 180px;
+}
+.tr-secondsA{
+    text-align: center;
+  font-size: 14px;
+  word-wrap: break-word;
+  width: 200px;
+}
+.tr-w120{
+  width:120px;
+}
 .tr-second-check {
   color: #3ab548;
   font-size: 17px;

+ 452 - 0
src/pages/super/HomeWorkRecover.vue

@@ -0,0 +1,452 @@
+<!-- 活动解析 -->
+<template>
+  <div>
+    <!-- table 表格 -->
+    <el-row :gutter="20" class="main-items" >
+
+      <!--数据监控-->
+      <el-col :span="20" class="main" :offset="2">
+
+        <el-table
+          :data="list"
+          highlight-current-row
+          size="medium"
+          border
+          stripe
+        >
+          <el-table-column
+            prop="school"
+            label="上传时间"
+            header-align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="subject"
+            label="科目"
+            header-align="center"
+          ></el-table-column>
+          <el-table-column
+            prop=""
+            label="学生"
+            header-align="center">
+          </el-table-column>
+          <el-table-column
+            prop=""
+            label="批改状况"
+            header-align="center"
+          >
+          </el-table-column>
+
+          <el-table-column prop="status" label="" header-align="center" width="250">
+            <template scope="scope">
+              <el-button type="danger" @click="isShow(2,scope.row.teacherId,scope.row.name)">去分配</el-button>
+            </template>
+          </el-table-column>
+
+        </el-table>
+        <!-- 分页显示 -->
+        <div class="page-block" v-if="parseInt(applyTeacherList.pages) > 0">
+          <el-pagination
+            background
+            @size-change="handleSizeChange"
+            @current-change="pageChange"
+            :page-sizes="[10, 20, 30, 40]"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total= parseInt(applyTeacherList.pages)
+          ></el-pagination>
+        </div>
+      </el-col>
+
+
+    </el-row>
+
+    <!--是否通过-->
+    <div class='showModel' @click="allShowModel(1)" v-if="hiddenModel"></div>
+    <div class='model' v-if="hiddenModel">
+      <div class='model-text'>
+        <div class="model-text-items">
+          <div><img src="../../assets/img/del@2x.png" alt="" @click="allShowModel(1)" class="model-text-items-close"></div>
+          <div>是否要通过{{userName}}老师的注册申请?</div>
+        </div>
+        <div class="model-btn">
+          <div class="model-btn-items main-gay" @click="ApplyOperate()">是</div>
+          <div class="model-btn-items model-grdeen" @click="allShowModel(1)">否</div>
+        </div>
+      </div>
+    </div>
+    <!--是否驳回-->
+    <div class='showModel' @click="allShowModel(2)" v-if="isPigai"></div>
+    <div class='model' v-if="isPigai">
+      <div class='model-text'>
+        <div class="model-text-items">
+          <div><img src="../../assets/img/del@2x.png" alt="" @click="allShowModel(2)" class="model-text-items-close"></div>
+          <div>是否要驳回{{userName}}老师的注册申请?</div>
+        </div>
+        <div class="model-btn">
+          <div class="model-btn-items main-gay" @click="ApplyOperate()">是</div>
+          <div class="model-btn-items model-grdeen" @click="allShowModel(2)">否</div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import { mapGetters, mapActions } from "vuex";
+  export default {
+    components: { },
+    name: "actvResolveLabel",
+    props: {},
+    data() {
+      return {
+        BASE_URL:'https://xt.sharingschool.com/upload/',
+        hiddenModel:false,
+        applicantId:'',
+        operate:'',
+        list:[],
+        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:'数据监控'
+          },
+          {
+            text:'当天'
+          },
+          {
+            text:'当月'
+          },
+        ],
+        filters: {
+          actvNm: "",
+          actvCrtUserId: "",
+          actvType: "",
+          actvSmallType: "",
+          // 排序
+          MaxtimeValue:'',
+          pageNo: 1,
+          pageSize: 10,
+          count: 0,
+          orderField: "",
+          orderAD: ""
+        }
+      };
+    },
+    watch: {},
+    computed: {
+      ...mapGetters(["getUser","applyTeacherList"])
+    },
+    methods: {
+      ...mapActions(["setUser"]),
+
+      isShow(str,res,ts){
+        let _this = this;
+        console.log(str)
+        _this.operate = str;
+        _this.applicantId = res;
+        _this.userName = ts
+        if (str == 1){
+          _this.hiddenModel = true;
+          _this.isPigai = false;
+        } else if (str == 2){
+          _this.isPigai = true;
+          _this.hiddenModel = false;
+        }
+
+      },
+      //关闭弹框
+      allShowModel(str) {
+        let _this = this;
+
+        if (str == 1){
+          _this.hiddenModel = false;
+        } else if (str == 2){
+          _this.isPigai = false;
+        }
+      },
+      //查看申请老师列表
+      async SuperApplyTeacherList() {
+        this.$store.dispatch("SuperApplyTeacherList", {
+          maxCreateTime: this.formatDate(),
+          pageNo: this.filters.pageNo,
+          pageSize: this.filters.pageSize
+        });
+        console.log(this.applyTeacherList)
+        this.applyTeacherList.list = (res => {
+          const d = []
+          for (let i in res) {
+            d.push( {
+              gradeList: this.gradeBag(i),
+              periodList: res[i].period.split(';'),
+              imgUrl: res[i].imgUrl,
+              name: res[i].name,
+              school:res[i].school,
+              teacherId:res[i].teacherId,
+              subject:res[i].subject
+            })
+          }
+          return d
+        })(this.applyTeacherList.list)
+        this.list = this.applyTeacherList.list;
+        console.log(this.list)
+      },
+      //申请审批操作
+      async ApplyOperate() {
+        this.$store.dispatch("ApplyOperate", {
+          applicantId: this.applicantId,
+          operate: this.operate,
+        });
+        this.allShowModel(this.operate)
+      },
+      //时间封装
+      formatDate: function () {
+        let date = new Date();
+        let y = date.getFullYear();
+        let MM = date.getMonth() + 1;
+        MM = MM < 10 ? ('0' + MM) : MM;
+        let d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        let h = date.getHours();
+        h = h < 10 ? ('0' + h) : h;
+        let m = date.getMinutes();
+        m = m < 10 ? ('0' + m) : m;
+        let s = date.getSeconds();
+        s = s < 10 ? ('0' + s) : s;
+        return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
+      },
+      // 数组去重
+      uniq(array){
+        var temp = []; //一个新的临时数组
+        for (var i = 0; i < array.length; i++){
+          if (temp.indexOf(array[i]) == -1) {
+            temp.push(array[i]);
+          }
+        }
+        return temp;
+      },
+      //年级封装
+      gradeBag:function (res) {
+        var arr = [];
+        if (this.applyTeacherList.list[res].grade) {
+          arr = this.applyTeacherList.list[res].grade.split(',');
+        } else {
+          arr = []
+        }
+        var arrList = [];
+        for (var i in arr) {
+          if (arr[i] == '一年级' || arr[i] == '二年级') {
+            arrList.push('1-2年级')
+          } else if (arr[i] == '三年级' || arr[i] == "四年级") {
+            arrList.push('3-4年级')
+          } else if (arr[i] == '五年级' || arr[i] == "六年级") {
+            arrList.push('5-6年级')
+          }
+        }
+        return this.uniq(arrList);
+      },
+      // 分页
+      pageChange(val) {
+        this.filters.pageNo = val;
+        this.SuperApplyTeacherList();
+      },
+      changeDateSlot(dateSlot) {
+        if (dateSlot) {
+          this.filters.startDate = dateSlot[0];
+          this.filters.endDate = dateSlot[1];
+        } else {
+          this.filters.startDate = null;
+          this.filters.endDate = null;
+        }
+      },
+      actvTypeChange(typeList) {
+        switch (typeList.length) {
+          case 1:
+            this.filters.actvType = typeList[0];
+            this.filters.actvSmallType = null;
+            break;
+          case 2:
+            this.filters.actvType = null;
+            this.filters.actvSmallType = typeList[1];
+            break;
+          default:
+            this.filters.actvType = null;
+            this.filters.actvSmallType = null;
+            break;
+        }
+      },
+      handleSizeChange(val) {
+        console.log(val)
+        this.filters.pageSize = val;
+        this.SuperApplyTeacherList();
+      },
+      // 排序
+      sortChange(sort) {
+        this.filters.orderField = sort.prop;
+        this.filters.orderAD = sort.order != null ? sort.order : "";
+        this.itemListReshow();
+      },
+      clearSearch() {
+        this.filters.actvNm = null;
+        this.filters.actvCrtUserId = null;
+        this.filters.actvType = null;
+        this.filters.actvSmallType = null;
+        this.filtersActvType = [];
+        this.createDateSlot = null;
+      },
+
+    },
+    mounted() {
+      this.SuperApplyTeacherList();
+
+      console.log(this.list)
+    }
+  };
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped>
+
+  .main{
+    background-color: #fff;
+    margin-top: 16px;
+    padding: 0 !important;
+    border: 1px solid #E1E1E1;
+    min-height: 980px;
+  }
+
+  el-table{
+    color: #999999;
+    font-size: 18px;
+  }
+  .scope-name{
+    margin-left: 13px;
+  }
+  .main-items{
+    color: #393939;
+    text-align: center;
+    line-height: 80px;
+  }
+
+  .input-with-select .el-input-group__prepend {
+    background-color: #fff;
+  }
+
+  .table-img{
+    width:36px;
+    height:36px;
+    border-radius:6px;
+  }
+  .showModel{
+    width: 100%;
+    height: 100%;
+    position: fixed;
+    top: 0;
+    left: 0;
+    background: #000000;
+    opacity: 0.2;
+    overflow: hidden;
+    z-index: 1000;
+    color: #fff;
+
+  }
+  .model{
+    z-index: 1001;
+    width:40%;
+    height:auto;
+    position: fixed;
+    top: 30%;
+    left: 30%;
+    margin:auto;
+    background: #fff;
+    border-radius:10px;
+    text-align: center;
+  }
+
+  .model-text{
+    background:rgba(255,255,255,1);
+    border-radius:10px;
+  }
+
+  .model-btn{
+    display: flex;
+    justify-content: space-around;
+    margin-bottom: 44px;
+  }
+  .model-btn-items{
+    width:154px;
+    height:50px;
+    line-height: 50px;
+    text-align: center;
+    font-size: 18px;
+    border-radius:4px;
+  }
+  .main-gay{
+    background:rgba(246,247,251,1);
+    color: #7E7E7E;
+  }
+  .model-grdeen{
+    background-color: #52CC60;
+    color: #fff;
+  }
+  .model-text-items-close{
+    position: absolute;
+    top: 10px;
+    right: 15px;
+  }
+  .model-text-items{
+    position: relative;
+    color: #000000;
+    font-size: 24px;
+    text-align: center;
+    padding: 40px 0 50px 0;
+  }
+  .page-block{
+    text-align: center;
+    margin-top: 15px;
+  }
+  .scope-list{
+    margin-left: 18px;
+    text-align: left;
+  }
+  /*.all_pagination{*/
+    /*text-align: center !important;*/
+  /*}*/
+</style>

+ 39 - 14
src/pages/super/SchoolManager.vue

@@ -131,28 +131,31 @@
                   <div>{{v.respSpeed}}/份</div>
                   <div>已封号</div>
                 </div>
+                  <div class="tr-setNo" v-if="isDownindex === k && isDown && TeacherHomeworkList.list.length == 0">
+                    暂无数据!
+                </div>
                 <div v-if="isDownindex === k && isDown">
                   <div class="tr-second" v-for="(v, k) of TeacherHomeworkList.list" :key="k">
                     <div class="tr-seconds">{{k+1}}</div>
-                    <div class="tr-seconds">
+                    <div class="tr-seconds  tr-w120">
                       <span @click="isShow(v,4)" style="cursor: pointer;" class="tr-second-check">查看</span>
                       <span>{{v.name}}</span>
                     </div>
-                    <div class="tr-seconds">{{v.spendTime}}</div>
-                    <div class="tr-seconds">{{v.subject}}</div>
-                    <div class="tr-seconds">{{v.grade}}</div>
-                    <div v-if="v.status === 1" class="tr-seconds">未批改</div>
-                    <div v-if="v.status === 2" class="tr-seconds" style="color:#FFC303">批改中</div>
-                    <div v-if="v.status === 3" class="tr-seconds">已批改</div>
-                    <div class="tr-s" v-if="v.status === 1">
+                    <div class="tr-secondsA">{{v.spendTime}}</div>
+                    <div class="tr-seconds width40">{{v.subject}}</div>
+                    <div class="tr-seconds width40">{{v.grade}}</div>
+                    <div v-if="v.status === 1" class="tr-seconds width40">未批改</div>
+                    <div v-if="v.status === 2" class="tr-seconds width40" style="color:#FFC303">批改中</div>
+                    <div v-if="v.status === 3" class="tr-seconds width40">已批改</div>
+                    <div class="tr-sw180" v-if="v.status === 1">
                       <!-- <el-button type="" plain><a style="text-decoration:none;color:#52cc60;" :href="'https://kmt.sharingschool.com/aijia/kmt/index.html?homeworkId='+v.homeworkId+'&accessToken='+accessToken+'&state='+1">去批改</a></el-button> -->
                       <el-button @click="isShow(v,1)" type="success">去分配</el-button>
                     </div>
-                    <div class="tr-s" v-if="v.status === 3 && v.isCheck ===1">
+                    <div class="tr-sw180" v-if="v.status === 3 && v.isCheck ===1">
                       <el-button type="info" plain>已检查</el-button>
                       <span style="color:red;font-size:12px;">报错{{v.wrongCount}}</span>
                     </div>
-                    <div class="tr-s" v-if="v.status === 3 && v.isCheck ===0">
+                    <div class="tr-sw180" v-if="v.status === 3 && v.isCheck ===0">
                       <el-button type="warning" plain><a style="text-decoration:none;color:#52cc60;" :href="'http://120.77.207.0:8081/kmt/index.html?homeworkId='+v.homeworkId+'&accessToken='+accessToken+'&state='+2">去检查</a></el-button>
                     </div>
                   </div>
@@ -176,6 +179,7 @@
               :page-sizes="[10, 20, 30, 40]"
               layout="total, sizes, prev, pager, next, jumper"
               :total="parseInt(monitorTeacherList.pages)"
+              :hide-on-single-page="true"
             ></el-pagination>
             <!-- <div style="float:right;margin-left:15px;">
             <el-button @click="myVisible = false" size="small">取 消</el-button>
@@ -494,6 +498,7 @@
             :page-sizes="[10]"
             layout="total, sizes, prev, pager, next, jumper"
             :total="parseInt(UnallotHomeworkInfo.pages)"
+             :hide-on-single-page=true
           ></el-pagination>
         </div>
       </div>
@@ -1357,11 +1362,17 @@ el-table {
   word-wrap: break-word;
   width: 40px;
 }
+.tr-setNo {
+  display: flex;
+  justify-content: space-around;
+  color: #000000f1;
+  font-size: 16px;
+  margin: 20px;
+}
 .tr-second {
   background-color: #fbfbfb;
-  margin: 0 115px;
+  margin: 0 60px;
   display: flex;
-  justify-content: space-around;
   color: #393939;
   font-size: 20px;
 }
@@ -1369,8 +1380,22 @@ el-table {
   text-align: center;
   font-size: 14px;
   word-wrap: break-word;
-  /* width: 40px; */
-  /* height: 30px; */
+  margin:0 50px;
+}
+.tr-sw180{
+  width: 180px;
+}
+.width40{
+width: 60px;
+}
+.tr-secondsA{
+    text-align: center;
+  font-size: 14px;
+  word-wrap: break-word;
+   width: 200px;
+}
+.tr-w120{
+  width:120px;
 }
 .tr-second-check {
   color: #3ab548;

+ 7 - 0
src/router/index.js

@@ -16,6 +16,7 @@ import CheckTeacherAudit from "@/pages/Super/CheckTeacherAudit";
 import SuperSchoolManager from "@/pages/Super/SchoolManager";
 import CheckTeacherPay from "@/pages/Super/CheckTeacherPay";
 import SuperAdmin from "@/pages/Super/SuperAdmin";
+import HomeWorkRecover from "@/pages/Super/HomeWorkRecover";
 // 在线批改老师
 import Onlineteacher from "@/pages/OnlineTeacher/onlineteacher";
 import Redirect_uri from "@/pages/aikmt/Redirect_uri"; //微信登陆路由重定向页面
@@ -80,6 +81,12 @@ export const constantRouterMap =
           component: SuperSchoolManager,
           meta: { title: '校区管理员', roles: ['3'] }
         },
+        {
+          path: "HomeWorkRecover",
+          name: "HomeWorkRecover",
+          component: HomeWorkRecover,
+          meta: { title: '作业回收站', roles: ['3'] }
+        },
        ]
      },
     //  校区管理员角色路由

+ 0 - 1
src/store/modules/permission.js

@@ -6,7 +6,6 @@ import { asyncRouterMap, constantRouterMap } from '@/router'
  * @param route
  */
 function hasPermission(roles, route) {
-  debugger
   if (route.meta && route.meta.roles) {
     return roles.some(role => route.meta.roles.indexOf(role) >= 0)
   } else {

+ 17 - 5
src/store/modules/user.js

@@ -106,18 +106,24 @@ const user = {
         axios.Tokenpost(GET_UUIONID_TOKEN, data).then(res => {
           if (res && res.code == '999') {
             const data = res.data
+            const accessToken = data.accessToken
             commit('SET_TOKEN', data);
             localStorage.setItem("accessToken",data.accessToken)
-                    Message.success('登录成功')
                    dispatch('GetInfo').then(res => { // 拉取用户信息
                         const roles = res.data.role 
+                        if (roles == 0) {
+                          Message.error('无用户角色')
+                        }
                         if (roles == 1) {
-                          window.open('https://kmt.sharingschool.com/aijia/kmt/index.html');
+                          Message.success('在线批改老师角色登录成功')
+                          window.open('http://120.77.207.0:8081/kmt/index.html?accessToken=' + accessToken);
                         }
                         if (roles == 2) {
+                          Message.success('校区管理员角色登录成功')
                           router.push("/home");
                         }
                         if (roles == 3) {
+                          Message.success('超级管理员角色登录成功')
                           router.push("/super");
                         }
                       }).catch(() => {
@@ -137,18 +143,24 @@ const user = {
         axios.Tokenpost(GET_TOKEN, data).then(res => {
           if (res && res.code == '999') {
             const data = res.data
+            const accessToken = data.accessToken
             commit('SET_TOKEN', data);
             localStorage.setItem("accessToken",data.accessToken)
-                    Message.success('登录成功')
                    dispatch('GetInfo').then(res => { // 拉取用户信息
-                        const roles = res.data.role 
+                        const roles = res.data.role
+                        if (roles == 0) {
+                          Message.error('无用户角色')
+                        }
                         if (roles == 1) {
-                          window.open('https://kmt.sharingschool.com/aijia/kmt/index.html');
+                          Message.success('在线批改老师角色登录成功')
+                          window.open('http://120.77.207.0:8081/kmt/index.html?accessToken=' + accessToken);
                         }
                         if (roles == 2) {
+                          Message.success('校区管理员角色登录成功')
                           router.push("/home");
                         }
                         if (roles == 3) {
+                          Message.success('超级管理员角色登录成功')
                           router.push("/super");
                         }
                       }).catch(() => {