Browse Source

Merge branch 'master' of http://47.112.200.206:3000/aijia/kmt

name 6 years ago
parent
commit
c9203b8b79

+ 13 - 0
src/ImgConfig/index.js

@@ -0,0 +1,13 @@
+let IMG_BASE_URL = ''
+let APPOR_BASE_URL = ''
+if (process.env.NODE_ENV === 'development') {
+    IMG_BASE_URL = 'https://xtimg.sharingschool.com/' //测试环境图片地址
+    APPOR_BASE_URL = 'https://xtkmt.sharingschool.com/kmt/index.html' //测试环境作业批改地址
+} else {
+    IMG_BASE_URL = 'https://img.sharingschool.com'; //正式环境图片地址;
+    APPOR_BASE_URL = 'https://kmt.sharingschool.com/aijia/kmt/index.html'; //正式环境作业批改地址地址;
+}
+export {
+    IMG_BASE_URL,
+    APPOR_BASE_URL
+}

+ 4 - 1
src/api/index.js

@@ -50,6 +50,8 @@ const HomeworkRecoveryList = urlFn('/api/kmt/correctSys/homeworkRecoveryList')
 const errorWarning = urlFn('/api/kmt/correctSys/errorWarning')
 // 报错详情
 const errorDetail = urlFn('/api/kmt/correctSys/errorDetail')
+// 退出登陆
+const logout = urlFn('/api/kmt/login/logout')
 export {
     GET_TOKEN,
     GET_UUIONID_TOKEN,
@@ -74,5 +76,6 @@ export {
     AllotTeacherToManager,
     HomeworkRecoveryList,
     errorWarning,
-    errorDetail
+    errorDetail,
+    logout
 }

+ 11 - 11
src/axios/index.js

@@ -36,7 +36,7 @@ axios.interceptors.response.use(
                 // 未登录则跳转登录页面,并携带当前页面的路径
                 // 在登录成功后返回当前页面,这一步需要在登录页操作。
                 case 401:
-                Message.error('登陆失效,请重新登录')
+                Message.error('登陆信息失效,请重新登录')
                    localStorage.removeItem("accessToken")
                     router.replace({
                         path: '/',
@@ -71,14 +71,14 @@ axios.interceptors.response.use(
             }
             return Promise.reject(error.response);
         }
-        else {
-            Message.error('登陆失效,请重新登录')
-            localStorage.removeItem("accessToken")
-             router.replace({
-                 path: '/',
-                 query: { redirect: router.currentRoute.fullPath }
-             });
-        }
+        // else {
+        //     Message.error('登陆失效,请重新登录')
+        //     localStorage.removeItem("accessToken")
+        //      router.replace({
+        //          path: '/',
+        //          query: { redirect: router.currentRoute.fullPath }
+        //      });
+        // }
     }
 );
 // 数据统一处理来自网络及服务器的错误
@@ -143,7 +143,7 @@ export default {
             method:'post',
             // url,
             url: `${url}?${qs.stringify(params)}`,
-            // timeout: TIME_OUT,
+            timeout: TIME_OUT,
             data,
             // data: qs.stringify(data),
             headers:{
@@ -161,7 +161,7 @@ export default {
             method:'post',
             // url,
             url: `${url}?${qs.stringify(params)}`,
-            // timeout: TIME_OUT,
+            timeout: TIME_OUT,
             data,
             // data: qs.stringify(data),
             headers:{

+ 7 - 8
src/components/MenuComponent.vue

@@ -33,7 +33,7 @@
 
 <script>
 import { mapGetters } from "vuex";
-import { BASE_URL } from '@/config'
+import { IMG_BASE_URL } from '@/ImgConfig'
 export default {
   name: "navMenu",
   // props: {
@@ -41,8 +41,8 @@ export default {
   // },
   data() {
     return {
-       BASE_URL:'https://xtimg.sharingschool.com/',
-        // BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
+      accessToken:localStorage.getItem("accessToken"), //token
+      BASE_URL:IMG_BASE_URL,
       menuData: [
         {
           id: "1",
@@ -60,7 +60,7 @@ export default {
           href: "TeacherPay"
         },
       ],
-      checkindex: ""
+      checkindex: 0
     };
   },
   watch: {
@@ -94,10 +94,9 @@ export default {
         type: "warning"
       })
         .then(() => {
-          localStorage.removeItem("accessToken");
-          this.$store.dispatch("LogOut").then(() => {
-            location.reload(); // 为了重新实例化vue-router对象 避免bug
-          });
+             this.$store.dispatch("LogOut", {
+             accessToken: this.accessToken
+      });
         })
         .catch(() => {
           // console.log(err)

+ 6 - 7
src/components/SuperComponent.vue

@@ -29,7 +29,7 @@
 
 <script>
 import {mapGetters} from 'vuex'
-import { BASE_URL } from '@/config'
+import { IMG_BASE_URL } from '@/ImgConfig'
 export default {
   name: "navMenu",
   // props: {
@@ -37,8 +37,8 @@ export default {
   // },
   data() {
     return {
-      BASE_URL:'https://xtimg.sharingschool.com/',
-        // BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
+        accessToken:localStorage.getItem("accessToken"), //token
+        BASE_URL:IMG_BASE_URL,
       menuData: [ {
     id: "1",
     name: "校区管理员",
@@ -99,10 +99,9 @@ export default {
         type: "warning"
       })
         .then(() => {
-          localStorage.removeItem("accessToken");
-          this.$store.dispatch("LogOut").then(() => {
-            location.reload(); // 为了重新实例化vue-router对象 避免bug
-          });
+          this.$store.dispatch("LogOut", {
+             accessToken: this.accessToken
+      });
         })
         .catch(() => {
           // console.log(err)

+ 6 - 7
src/components/teacherCompoent.vue

@@ -28,7 +28,7 @@
 
 <script>
 import {mapGetters} from 'vuex'
-import { BASE_URL } from '@/config'
+import { IMG_BASE_URL } from '@/ImgConfig'
 export default {
   name: "navMenu",
   // props: {
@@ -36,8 +36,8 @@ export default {
   // },
   data() {
     return {
-      BASE_URL:'https://xtimg.sharingschool.com/',
-        // BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
+        accessToken:localStorage.getItem("accessToken"), //token
+       BASE_URL:IMG_BASE_URL,
       menuData: [ {
     id: "1",
     name: "在线批改老师",
@@ -70,10 +70,9 @@ export default {
         type: "warning"
       })
         .then(() => {
-          localStorage.removeItem("accessToken");
-          this.$store.dispatch("LogOut").then(() => {
-            location.reload(); // 为了重新实例化vue-router对象 避免bug
-          });
+          this.$store.dispatch("LogOut", {
+             accessToken: this.accessToken
+      });
         })
         .catch(() => {
           // console.log(err)

+ 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://xt.sharingschool.com/sz';
+    BASE_URL = 'https://t.sharingschool.com/sz';
 }
 const TIME_OUT = 10000
 

+ 1 - 0
src/pages/Login.vue

@@ -47,6 +47,7 @@ export default {
         let WxCode = unionid;
         this.WxCode = WxCode;
         localStorage.setItem("unionid", this.WxCode);
+            console.log("获取unionid" + this.WxCode);
         this.$store.dispatch("UnionidLogin", {
           unionid: this.WxCode
         });

+ 29 - 24
src/pages/home/SchoolManager.vue

@@ -86,7 +86,7 @@
                 <!-- 在线 -->
                 <div v-if="v.status == '1'" class="tr-first" :class="{BgcColor:k%2 !== 1}">
                   <div>
-                    <i
+                    <i style="cursor:pointer;"
                       :class="[isDown && isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-right']"
                       @click="dropDown(v,k)"
                     ></i>
@@ -103,7 +103,7 @@
                 <!-- 离线 -->
                 <div v-if="v.status == '2'" style="color:#BEBEBE" class="tr-first" :class="{BgcColor:k%2 !== 1}">
                   <div>
-                    <i
+                    <i style="cursor:pointer;"
                       :class="[isDown && isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-right']"
                       @click="dropDown(v,k)"
                     ></i>
@@ -119,7 +119,7 @@
                 <!-- 封号 -->
                 <div v-if="v.status == '3'" style="color:#FF6767" class="tr-first" :class="{BgcColor:k%2 !== 1}">
                   <div>
-                    <i
+                    <i style="cursor:pointer;"
                       :class="[isDown && isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-right']"
                       @click="dropDown(v,k)"
                     ></i>
@@ -138,17 +138,13 @@
                 >暂无数据!</div>
                 <div v-if="isDownindex === k && isDown">
                   <div class="tr-second" v-for="(v, k) of TeacherHomeworkList.list" :key="k">
-                    <div class="tr-seconds" style="width:16px;">{{k+1}}</div>
+                    <div class="tr-seconds" style="width:50px;">{{k+1}}</div>
                     <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 v-if="v.status !== 1" class="tr-secondsA">{{v.spendTime}}</div>
-                    <div
-                      v-if="v.status === 1"
-                      class="tr-secondsA"
-                      style="color:#52CC60"
-                    >{{v.spendTime}}</div>
+                     <div  v-if="v.status && !(v.status === 1 && k == 0) " class="tr-secondsA">{{v.spendTime}}</div>
+                     <div v-if="v.status === 1 && k == 0" class="tr-secondsA" style="color:#52CC60">{{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>
@@ -164,7 +160,7 @@
                       <el-button type="info">
                         <a
                           style="text-decoration:none;color:#ffffff;"
-                          :href="'http://120.77.207.0:8081/kmt/index.html?homeworkId='+v.homeworkId+'&unionid='+unionid+'&teacherId='+homeworkLIst.teacherId+'&state='+2"
+                          :href="APPOR_BASE_URL+'?homeworkId='+v.homeworkId+'&unionid='+unionid+'&teacherId='+homeworkLIst.teacherId+'&state='+2"
                         >已检查</a>
                       </el-button>
                       <span style="color:red;font-size:12px;">报错{{v.wrongCount}}</span>
@@ -173,7 +169,7 @@
                       <el-button type="warning">
                         <a
                           style="text-decoration:none;color:#ffffff;"
-                          :href="'http://120.77.207.0:8081/kmt/index.html?homeworkId='+v.homeworkId+'&unionid='+unionid+'&teacherId='+homeworkLIst.teacherId+'&state='+2"
+                          :href="APPOR_BASE_URL+'?homeworkId='+v.homeworkId+'&unionid='+unionid+'&teacherId='+homeworkLIst.teacherId+'&state='+2"
                         >去检查</a>
                       </el-button>
                     </div>
@@ -240,7 +236,7 @@
                 <div>科目</div>
                 <div>批改总份数</div>
                 <div>批改总张数</div>
-                <div>平均批改时间</div>
+                <div style="width:240px;">平均批改时间</div>
                 <div>出勤</div>
               </div>
               <div class="tr" v-for="(v, k) of DayTeacherList.list" :key="k">
@@ -308,9 +304,9 @@
           <el-col :span="3" :offset="1">
             <div class="main-header-item">月出勤率:{{MothTeacherList.totalAttendanceRate}}</div>
           </el-col>
-          <el-col :span="4">
+          <!-- <el-col :span="4">
             <div class="main-header-item">批改总份数:{{MothTeacherList.totalHomeworkCount}}</div>
-          </el-col>
+          </el-col> -->
           <el-col :span="4">
             <div class="main-header-item">批改总张数:{{MothTeacherList.totalHomeworkPicCount }}</div>
           </el-col>
@@ -336,7 +332,7 @@
                 <div>批改总张数</div>
                 <div>正确率</div>
                 <div>满意度</div>
-                <div>平均批改时间</div>
+                <div style="width:240px;">平均批改时间</div>
                 <div>出勤率</div>
               </div>
               <div class="tr" v-for="(v, k) of MothTeacherList.list" :key="k">
@@ -631,8 +627,8 @@
   </div>
 </template>
 <script>
+import { IMG_BASE_URL,APPOR_BASE_URL } from '@/ImgConfig'
 import { mapGetters, mapActions } from "vuex";
-import { BASE_URL } from '@/config'
 export default {
   components: {},
   name: "actvResolveLabel",
@@ -643,9 +639,8 @@ export default {
       accessToken:localStorage.getItem("accessToken"), //token
       managerId:"",// 超级管理员登陆ID
       ApporhomeworkId:"",
-        // BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
-      BASE_URL:'https://xtimg.sharingschool.com/',
-      // BASE_URL: BASE_URL,
+      BASE_URL:IMG_BASE_URL,
+      APPOR_BASE_URL:APPOR_BASE_URL,
       isDownindex: "",
       modelindex: 0,
       values: [],
@@ -796,7 +791,7 @@ export default {
          this.InfoWatch();
         },
            BeforetoTeacherAllotCode(val, oldVal){ //普通的watch监听
-          window.open('http://120.77.207.0:8081/kmt/index.html?homeworkId=' + this.ApporhomeworkId + '&unionid=' + this.unionid + '&teacherId=' + this.homeworkLIst.teacherId + '&state=' + 1)
+          window.open(APPOR_BASE_URL + '?homeworkId=' + this.ApporhomeworkId + '&unionid=' + this.unionid + '&teacherId=' + this.homeworkLIst.teacherId + '&state=' + 1)
         },
            BeforetoTeacherstatues(val, oldVal){ //普通的watch监听
          // 查看老师批改作业列表
@@ -899,13 +894,14 @@ export default {
          managerId:this.managerId || ''
       });
     },
+    
     // 查看老师批改作业列表
     async TeacherHomework(v) {
       this.homeworkLIst.teacherId =  v.teacherId
       this.$store.dispatch("TeacherHomeworkList", {
         teacherId: v.teacherId,
         maxCreateTime: "",
-        pageNo: this.homeworkLIst.pageNo,
+        pageNo: 1,
         pageSize: this.homeworkLIst.pageSize
       });
     },
@@ -996,12 +992,15 @@ export default {
     selectTitle(k) {
       this.modelindex = k;
       if (k === 0) {
+       this.filters.pageNo = 1
         this.InfoWatch();
       }
       if (k === 1) {
+        this.filters1.pageNo = 1
         this.InfoWatchDay();
       }
       if (k === 2) {
+        this.filters2.pageNo = 1
         this.InfoWatchMoth();
       }
     },
@@ -1268,6 +1267,7 @@ el-table {
 }
 .main-header-item {
   font-size: 16px;
+  /* font-weight: 700; */
 }
 .model-manager {
   display: flex;
@@ -1290,6 +1290,9 @@ el-table {
 .input-with-select .el-input-group__prepend {
   background-color: #fff;
 }
+.el-select-dropdown__list{
+  padding:15px 0!important;
+}
 .input-with-new{
   border:1px solid #cccccc;
   border-radius:15px;
@@ -1345,8 +1348,10 @@ el-table {
 .tr {
   width: 100%;
   color: #393939;
-  font-size: 20px;
   text-align: center;
+   font-family:"PingFang-SC-Bold";
+  font-size: 16px;
+  font-weight: 700;
 }
 .tr-first {
   display: flex;
@@ -1405,7 +1410,7 @@ el-table {
   text-align: center;
   font-size: 14px;
   word-wrap: break-word;
-  width: 200px;
+  width: 280px;
 }
 .tr-w120 {
   width: 160px;

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

@@ -3,12 +3,14 @@
   </div>
 </template>
 <script>
+import { IMG_BASE_URL,APPOR_BASE_URL } from '@/ImgConfig'
   export default {
     name: "model",
     components: {},
     props: {},
     data() {
       return {
+        APPOR_BASE_URL:APPOR_BASE_URL,
       unionid:localStorage.getItem("unionid"),
       };
     },
@@ -19,7 +21,8 @@
     computed: {},
     methods: {
       toAppovalIng(){
-            window.open('http://120.77.207.0:8081/kmt/index.html?unionid=' + this.unionid + '&state=' + 1)
+            window.open(APPOR_BASE_URL + '?unionid=' + this.unionid + '&state=' + 1)
+              console.log(APPOR_BASE_URL + '?unionid=' + this.unionid + '&state=' + 1)
       }
     },
     mounted() {}

+ 5 - 5
src/pages/home/TeacherPay.vue

@@ -96,16 +96,14 @@
 </template>
 <script>
 import { mapGetters, mapActions } from "vuex";
-import { BASE_URL } from '@/config'
+import { IMG_BASE_URL } from '@/ImgConfig'
 export default {
   components: {},
   name: "actvResolveLabel",
   props: {},
   data() {
     return {
-
-        // BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
-      BASE_URL:'https://xtimg.sharingschool.com/',
+         BASE_URL:IMG_BASE_URL,
        accessToken:localStorage.getItem("accessToken"), 
        NoAllotManagerModel:false,//token
        filters1: {
@@ -430,8 +428,10 @@ el-table {
 .tr {
   width: 100%;
   color: #393939;
-  font-size: 20px;
   text-align: center;
+  /* font-weight: 700; */
+   font-family:"PingFang-SC-Bold";
+  font-size: 16px;
 }
 .tr-first {
   margin-right:2%;

+ 2 - 2
src/pages/super/CheckTeacherAudit.vue

@@ -122,14 +122,14 @@
 </template>
 <script>
   import { mapGetters, mapActions } from "vuex";
+  import { IMG_BASE_URL } from '@/ImgConfig'
   export default {
     components: { },
     name: "actvResolveLabel",
     props: {},
     data() {
       return {
-          // BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
-           BASE_URL:'https://xtimg.sharingschool.com/',
+             BASE_URL:IMG_BASE_URL,
         hiddenModel:false,
         applicantId:'',
         operate:'',

+ 2 - 2
src/pages/super/CheckTeacherPay.vue

@@ -107,14 +107,14 @@
 </template>
 <script>
   import { mapGetters, mapActions } from "vuex";
+  import { IMG_BASE_URL } from '@/ImgConfig'
   export default {
     components: { },
     name: "actvResolveLabel",
     props: {},
     data() {
       return {
-        // BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
-         BASE_URL:'https://xtimg.sharingschool.com/',
+          BASE_URL:IMG_BASE_URL,
         selMonth:'',
         hiddenModel:false,
         isPigai:false,

+ 2 - 2
src/pages/super/HomeWorkRecover.vue

@@ -92,14 +92,14 @@
 </template>
 <script>
   import { mapGetters, mapActions } from "vuex";
+  import { IMG_BASE_URL } from '@/ImgConfig'
   export default {
     components: { },
     name: "actvResolveLabel",
     props: {},
     data() {
       return {
-        //  BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
-         BASE_URL:'https://xtimg.sharingschool.com/',
+          BASE_URL:IMG_BASE_URL,
         hiddenModel:false,
         applicantId:'',
         operate:'',

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

@@ -132,14 +132,14 @@
 </template>
 <script>
   import { mapGetters, mapActions } from "vuex";
+  import { IMG_BASE_URL } from '@/ImgConfig'
   export default {
     components: { },
     name: "actvResolveLabel",
     props: {},
     data() {
       return {
-      //  BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
-       BASE_URL:'https://xtimg.sharingschool.com/',
+        BASE_URL:IMG_BASE_URL,
         selMonth:'',
         hiddenModel:false,
         isPigai:false,

+ 53 - 24
src/pages/super/SchoolManager.vue

@@ -78,15 +78,15 @@
                 <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 monitorTeacherList.list" :key="k">
                 <!-- 在线 -->
                 <div v-if="v.status == '1'" class="tr-first" :class="{BgcColor:k%2 !== 1}">
                   <div>
-                    <i
+                    <i style="cursor:pointer;"
                       :class="[isDown&&isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-right']"
                       @click="dropDown(v,k)"
                     ></i>
@@ -103,7 +103,7 @@
                 <!-- 离线 -->
                 <div v-if="v.status == '2'" style="color:#BEBEBE" class="tr-first" :class="{BgcColor:k%2 !== 1}">
                   <div>
-                    <i
+                    <i style="cursor:pointer;"
                       :class="[isDown && isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-right']"
                       @click="dropDown(v,k)"
                     ></i>
@@ -112,14 +112,14 @@
                   <div>{{v.name}}</div>
                   <div>{{v.waitCount}}份</div>
                   <div>{{v.maxWaitTime}}</div>
-                  <div  style="width:200px;">{{v.totalCorrectTime}}</div>
+                  <div  style="width:240px;">{{v.totalCorrectTime}}</div>
                   <div>{{v.respSpeed}}</div>
                   <div>离线</div>
                 </div>
                 <!-- 封号 -->
                 <div v-if="v.status == '3'" style="color:#FF6767" class="tr-first" :class="{BgcColor:k%2 !== 1}">
                   <div>
-                    <i
+                    <i style="cursor:pointer;"
                       :class="[isDown && isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-right']"
                       @click="dropDown(v,k)"
                     ></i>
@@ -138,13 +138,13 @@
                 <!--&& isDownindex === k && isDown-->
                 <div v-if="isDownindex === k && isDown">
                   <div class="tr-second" v-for="(v, k) of TeacherHomeworkList.list" :key="k">
-                    <div class="tr-seconds" style="width:16px;">{{k+1}}</div>
+                    <div class="tr-seconds" style="width:50px;">{{k+1}}</div>
                     <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  v-if="v.status !== 1" class="tr-secondsA">{{v.spendTime}}</div>
-                     <div v-if="v.status === 1" class="tr-secondsA" style="color:#52CC60">{{v.spendTime}}</div>
+                    <div  v-if="v.status && !(v.status === 1 && k == 0) " class="tr-secondsA">{{v.spendTime}}</div>
+                     <div v-if="v.status === 1 && k == 0" class="tr-secondsA" style="color:#52CC60">{{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>
@@ -155,11 +155,13 @@
                       <el-button @click="isShow(v,1)" type="success">去分配</el-button>
                     </div>
                     <div class="tr-sw180" v-if="v.status === 3 && v.isCheck ===1">
-                       <el-button type="info"><a style="text-decoration:none;color:#ffffff;" :href="'http://120.77.207.0:8081/kmt/index.html?homeworkId='+v.homeworkId+'&unionid='+unionid+'&teacherId='+homeworkLIst.teacherId+'&state='+2">已检查</a></el-button>
+                         <span>{{v.checkCount}}</span>
+                      <span style="color:#bbbbbb;">/{{v.picTotal}}</span>
+                       <el-button type="info"><a style="text-decoration:none;color:#ffffff;" :href="APPOR_BASE_URL+'?homeworkId='+v.homeworkId+'&unionid='+unionid+'&teacherId='+homeworkLIst.teacherId+'&state='+2">已检查</a></el-button>
                       <span style="color:red;font-size:12px;">报错{{v.wrongCount}}</span>
                     </div>
                     <div class="tr-sw180" v-if="v.status === 3 && v.isCheck ===0">
-                      <el-button type="warning"><a style="text-decoration:none;color:#ffffff!important;" :href="'http://120.77.207.0:8081/kmt/index.html?homeworkId='+v.homeworkId+'&unionid='+unionid+'&teacherId='+homeworkLIst.teacherId+'&state='+2">去检查</a></el-button>
+                      <el-button type="warning"><a style="text-decoration:none;color:#ffffff!important;" :href="APPOR_BASE_URL+'?homeworkId='+v.homeworkId+'&unionid='+unionid+'&teacherId='+homeworkLIst.teacherId+'&state='+2">去检查</a></el-button>
                     </div>
                   </div>
                   <!-- 分页显示 -->
@@ -229,7 +231,7 @@
                 <div>科目</div>
                 <div>批改总份数</div>
                 <div>批改总张数</div>
-                <div>平均批改时间</div>
+                <div style="width:240px;">平均批改时间</div>
                 <div>出勤</div>
               </div>
               <div class="tr" v-for="(v, k) of DayTeacherList.list" :key="k">
@@ -275,7 +277,7 @@
       <el-col :span="18" class="main" v-if="modelindex == 2">
         <el-row :gutter="20" class="main-header">
           <el-col :span="5">
-            <div class="main-header-item">当月报错总次数:{{MothTeacherList.totalWrongCount}}次</div>
+            <div class="main-header-item">当月报错总次数:<span style="color:red;">{{MothTeacherList.totalWrongCount}}次</span></div>
           </el-col>
           <el-col :span="4" :offset="10">
             <el-input placeholder="请输入老师名字" v-model="filters2.inputValue" class="input-with-select">
@@ -298,9 +300,9 @@
           <el-col :span="3" :offset="1">
             <div class="main-header-item" >月出勤率:{{MothTeacherList.totalAttendanceRate}}</div>
           </el-col>
-          <el-col :span="4">
+          <!-- <el-col :span="4">
             <div class="main-header-item" >批改总份数:{{MothTeacherList.totalHomeworkCount}}</div>
-          </el-col>
+          </el-col> -->
           <el-col :span="4">
             <div
               class="main-header-item"
@@ -330,7 +332,7 @@
                 <div>批改总张数</div>
                 <div>正确率</div>
                 <div>满意度</div>
-                <div>平均批改时间</div>
+                <div style="width:240px;">平均批改时间</div>
                 <div>出勤率</div>
               </div>
               <div class="tr" v-for="(v, k) of MothTeacherList.list" :key="k">
@@ -717,6 +719,7 @@
 </template>
 <script>
 import { mapGetters, mapActions } from "vuex";
+import { IMG_BASE_URL,APPOR_BASE_URL } from '@/ImgConfig'
 export default {
   components: {},
   name: "actvResolveLabel",
@@ -726,10 +729,8 @@ export default {
       unionid:localStorage.getItem("unionid"),
       accessToken:localStorage.getItem("accessToken"), //token
       managerId: "", // 超级管理员登陆ID
-      // BASE_URL:'https://img.sharingschool.com', //正式环境图片地址
-      BASE_URL:'https://xtimg.sharingschool.com/',
-      CS_URL: "http://120.77.207.0:8081/kmt/index.html", //作业批改测环境
-      PRO_URL: "https://kmt.sharingschool.com/aijia/kmt/index.html", //作业批改生产环境
+      BASE_URL:IMG_BASE_URL,
+      APPOR_BASE_URL:APPOR_BASE_URL,
       isDownindex: "",
       modelindex: 0,
       TeacherIds:"", //封号,升级,解封
@@ -962,6 +963,16 @@ export default {
       // this.teachList = this.monitorTeacherList.list;
       // console.log(this.teachList)
     },
+    // 
+    // 获取校区管理员当天数据条件筛选
+    async SearchInfoWatchDay(){
+      this.filters1.pageNo = 1
+      this.InfoWatchDay()
+    },
+     async timeInfoWatchDay(){
+      this.filters1.pageNo = 1
+      this.InfoWatchDay()
+    },
     // 获取校区管理员当天数据
     async InfoWatchDay() {
       this.$store.dispatch("InfoWatchDay", {
@@ -975,6 +986,15 @@ export default {
         managerId: this.managerId || ""
       });
     },
+      // 获取校区管理员当月数据条件筛选
+    async SearchInfoWatchMoth(){
+      this.filters2.pageNo = 1
+      this.InfoWatchMoth()
+    },
+     async TimeInfoWatchMoth(){
+      this.filters2.pageNo = 1
+      this.InfoWatchMoth()
+    },
     // 获取校区管理员当月数据
     async InfoWatchMoth() {
       this.$store.dispatch("InfoWatchMoth", {
@@ -994,7 +1014,7 @@ export default {
       this.$store.dispatch("TeacherHomeworkList", {
         teacherId: v.teacherId,
         maxCreateTime: this.filters.MaxtimeValue,
-        pageNo: this.homeworkLIst.pageNo,
+        pageNo: 1,
         pageSize: this.homeworkLIst.pageSize
       });
     },
@@ -1150,12 +1170,15 @@ export default {
     selectTitle(k) {
       this.modelindex = k;
       if (k === 0) {
+         this.filters.pageNo = 1
         this.InfoWatch();
       }
       if (k === 1) {
+         this.filters1.pageNo = 1
         this.InfoWatchDay();
       }
       if (k === 2) {
+         this.filters2.pageNo = 1
         this.InfoWatchMoth();
       }
     },
@@ -1457,6 +1480,7 @@ el-table {
 }
 .main-header-item {
   font-size: 16px;
+  /* font-weight: 700; */
 }
 .model-manager {
   display: flex;
@@ -1479,6 +1503,9 @@ el-table {
 .input-with-select .el-input-group__prepend {
   background-color: #fff;
 }
+.el-select-dropdown__list{
+  padding:15px 0!important;
+}
 .active {
   background-color: #52cc60;
   color: #fff;
@@ -1529,8 +1556,10 @@ ul{
 .tr {
   width: 100%;
   color: #393939;
-  font-size: 20px;
   text-align: center;
+   font-family:"PingFang-SC-Bold";
+  font-size: 16px;
+  font-weight: 700;
 }
 .tr-first {
   display: flex;
@@ -1574,7 +1603,7 @@ ul{
 }
 .tr-sw180{
   width: 180px;
-  text-align:left;
+  text-align:center;
 }
 .width40{
 width: 60px;
@@ -1583,7 +1612,7 @@ width: 60px;
     text-align: center;
   font-size: 14px;
   word-wrap: break-word;
-   width: 200px;
+   width: 280px;
 }
 .tr-w120{
   width:160px;

+ 2 - 2
src/pages/super/SuperAdmin.vue

@@ -147,14 +147,14 @@
 </template>
 <script>
   import { mapGetters, mapActions } from "vuex";
+  import { IMG_BASE_URL } from '@/ImgConfig'
   export default {
     components: { },
     name: "actvResolveLabel",
     props: {},
     data() {
       return {
-         BASE_URL:'https://xtimg.sharingschool.com/',
-        // BASE_URL:'https://t.sharingschool.com/upload/',
+        BASE_URL:IMG_BASE_URL,
         hiddenModel:false,
         isPigai:false,
         managerId:'',

+ 1 - 1
src/permission.js

@@ -15,7 +15,7 @@ router.beforeEach((to, from, next) => {
             if (accessToken) { // 判断缓存里面是否有 accessToken  //在登录的时候设置它的值
                 next();
             } else {
-                Message.error('登陆权限验证失败,请重新登录')
+                Message.error('登陆权限验证失败,请重新登录!')
                 next({
                     path: '/Login'
                 })

+ 33 - 24
src/store/modules/user.js

@@ -3,8 +3,9 @@ import { GET_UUIONID_TOKEN,GET_TOKEN,GetInfo,InfoWatch,InfoWatchDay,
   TeacherAllot,UnallotHomeworkList,GetTeacherDetail,
   GetStudentDetail,GetManagerDetail,Downgrade,SuperManagerList,
   SuperApplyTeacherList,ApplyOperate,GetTeacherSalaryList,DealCorrectTeacher,
-  GetAllotManagerList,AllotTeacherToManager,HomeworkRecoveryList,errorWarning,errorDetail
+  GetAllotManagerList,AllotTeacherToManager,HomeworkRecoveryList,errorWarning,errorDetail,logout
   } from '@/api'
+  import { APPOR_BASE_URL } from '@/ImgConfig'
 import { getToken, setToken, removeToken } from '@/utils/auth'
 import axios from '@/axios'
 import router from "@/router"
@@ -148,15 +149,17 @@ const user = {
                           }
                           if (roles == 1) {
                             Message.success('在线批改老师角色登录成功')
-                            window.open('http://120.77.207.0:8081/kmt/index.html?unionid=' + unionid);
+                            window.open(APPOR_BASE_URL + '?unionid=' + unionid);
                           }
                           if (roles == 2) {
                             Message.success('校区管理员角色登录成功')
-                            router.push("/home");
+                            // router.push("/home");
+                            router.push({path: '/home', replace: true})
                           }
                           if (roles == 3) {
                             Message.success('超级管理员角色登录成功')
-                            router.push("/super");
+                            // router.push("/super");
+                            router.push({path: '/super', replace: true})
                           }
                         } if (isBanned == 1) {
                           Message.error('您已被封号')
@@ -196,15 +199,19 @@ const user = {
                           }
                           if (roles == 1) {
                             Message.success('在线批改老师角色登录成功')
-                            window.open('http://120.77.207.0:8081/kmt/index.html?unionid=' + unionid);
+                            window.open(APPOR_BASE_URL + '?unionid=' + unionid);
                           }
                           if (roles == 2) {
                             Message.success('校区管理员角色登录成功')
-                            router.push("/home");
+                            // router.push("/home");
+                            router.push({path: '/home', replace: true})
+                            
                           }
                           if (roles == 3) {
                             Message.success('超级管理员角色登录成功')
-                            router.push("/super");
+                            // router.push("/super");
+                            router.push({path: '/super', replace: true})
+                            
                           }
                         } if (isBanned == 1) {
                           Message.error('您已被封号')
@@ -566,23 +573,25 @@ const user = {
       })
     },
     // 登出getTeacherSalaryList
-    LogOut({ commit, state }) {
-      // debugger
-      commit('SET_TOKEN', '')
-      commit('SET_ROLES', [])
-      Message.success('退出成功')
-      router.push("/");
-      // return new Promise((resolve, reject) => {
-      //   logout(state.token).then(() => {
-      //     commit('SET_TOKEN', '')
-      //     commit('SET_ROLES', [])
-      //     Message.success('退出成功')
-      //     router.push("/");
-      //     resolve()
-      //   }).catch(error => {
-      //     reject(error)
-      //   })
-      // })
+    LogOut({ commit, state }, data) {
+      return new Promise((resolve, reject) => {
+        axios.Tokenpost(logout, data).then(response => {
+          const data = response || {}
+          if (data.code === "999"){
+          localStorage.removeItem("accessToken");
+          commit('SET_TOKEN', '')
+          commit('SET_ROLES', [])
+          Message.success('退出成功')
+          router.push("/");
+          }
+          else {
+            Message.error("出错了")
+          }
+          resolve(response)
+        }).catch(error => {
+          reject(error)
+        })
+      })
     },
 
     // 前端 登出