Browse Source

最新代码

TheLittlePrince 6 năm trước cách đây
mục cha
commit
b3b3f5f564

+ 8 - 0
src/axios/index.js

@@ -71,6 +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 }
+             });
+        }
     }
 );
 // 数据统一处理来自网络及服务器的错误

+ 6 - 6
src/pages/Login.vue

@@ -31,12 +31,12 @@ export default {
   },
   methods: {
     WxLoginCtl() {
-      this.$router.push({
-        path: "/aikmt/Redirect_uri",
-        query: {
-          unionid: "oPHg8wXraekgH5YKVHvD3H7Ujynw"
-        }
-      });
+      // this.$router.push({
+      //   path: "/aikmt/Redirect_uri",
+      //   query: {
+      //     unionid: "oPHg8wXraekgH5YKVHvD3H7Ujynw"
+      //   }
+      // });
     },
     async getTKByUnionid() {
       if (window.location.href.indexOf("unionid") >= 0) {

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

@@ -29,41 +29,41 @@ export default {
     };
   },
   created() {
-    this.getTKByUnionid();
-    // this.getTKByCode();
+    // 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);
-        let WxCode = unionid;
-        this.WxCode = WxCode;
-         localStorage.setItem("unionid",this.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
-    //       });
+    // 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;
+    //      localStorage.setItem("unionid",this.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() {}
 };

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

@@ -153,11 +153,11 @@
                       <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" plain><a style="text-decoration:none;color:#52cc60;" :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="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 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" plain><a style="text-decoration:none;color:#52cc60;" :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;" :href="'http://120.77.207.0:8081/kmt/index.html?homeworkId='+v.homeworkId+'&unionid='+unionid+'&teacherId='+homeworkLIst.teacherId+'&state='+2">去检查</a></el-button>
                     </div>
                   </div>
                      <!-- 分页显示 -->
@@ -181,6 +181,7 @@
                 :page-sizes="[10]"
                 layout="total, sizes, prev, pager, next, jumper"
                 :total= parseInt(monitorTeacherList.pages)
+                 :hide-on-single-page="true"
               ></el-pagination>
             <div style="clear:both;"></div>
           </el-col>
@@ -266,7 +267,6 @@
               </div>
             </div>
             <!-- 分页显示 -->
-            <div v-if="parseInt(DayTeacherList.pages) > 10">
               <el-pagination
               background
               @size-change="handleSizeChange1"
@@ -274,8 +274,8 @@
               :page-sizes="[10]"
                layout="total, sizes, prev, pager, next, jumper"
                 :total= parseInt(DayTeacherList.pages)
+                 :hide-on-single-page="true"
               ></el-pagination>
-            </div>
             <!-- <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>
@@ -388,7 +388,6 @@
               </div>
             </div>
             <!-- 分页显示 -->
-            <div v-if="parseInt(MothTeacherList.pages) > 10">
               <el-pagination
               background
               @size-change="handleSizeChange2"
@@ -396,8 +395,8 @@
               :page-sizes="[10]"
                layout="total, sizes, prev, pager, next, jumper"
              :total= parseInt(MothTeacherList.pages)
+              :hide-on-single-page="true"
               ></el-pagination>
-            </div>
             <!-- <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>
@@ -417,15 +416,10 @@
           <div>可分配老师</div>
           <div>{{allotList.Allotgarde}}{{allotList.Allotsubjct}}</div>
         </div>
-          <!-- <div class="tr-setNo"  v-if="TeacherAllotList.list.length == 0">
+          <div class="tr-setNo"  v-if="TeacherAllotList.list.length == 0">
             暂无数据!
-<<<<<<< HEAD
-          </div> -->
-        <div class="model-itemss" style="margin:10px;" v-for="(v, k) in TeacherAllotList.list" :key="k">
-=======
           </div>
-        <div class="allocation-items" v-for="(v, k) in TeacherAllotList.list" :key="k" >
->>>>>>> 6a3419620148f4e66aa22d4c8ad3e9a27fb03927
+        <div class="model-itemss" style="margin:10px;" v-for="(v, k) in TeacherAllotList.list" :key="k">
           <div class="model-items-left">
             <div class="model-items-left-top">
               <div>
@@ -452,7 +446,6 @@
           </div>
         </div>
         <!-- 分页显示 -->
-        <div v-if="parseInt(TeacherAllotList.pages) > 10">
             <el-pagination
             background
             @size-change="handleSizeChange4"
@@ -460,8 +453,8 @@
             :page-sizes="[10]"
              layout="total, sizes, prev, pager, next, jumper"
              :total= parseInt(TeacherAllotList.pages)
+              :hide-on-single-page="true"
             ></el-pagination>
-        </div>
       </div>
     </div>
 
@@ -498,7 +491,6 @@
               <el-button type="success" @click="isShow(v,5)">去分配</el-button>
             </div>
           </div>
-          <div v-if="parseInt(UnallotHomeworkInfo.pages) > 10">
             <el-pagination
             background
             @size-change="handleSizeChange3"
@@ -508,7 +500,6 @@
              :total= parseInt(UnallotHomeworkInfo.pages)
               :hide-on-single-page="true"
             ></el-pagination>
-          </div>
         </div>
   
       </div>
@@ -562,6 +553,7 @@
             :page-sizes="[10]"
             layout="total, sizes, prev, pager, next, jumper"
             :total="parseInt(TeacherAllotList.pages)"
+             :hide-on-single-page="true"
           ></el-pagination>
       </div>
     </div>
@@ -1021,7 +1013,7 @@ export default {
         grade: v.grade || this.allNoapprovalList.Allotgarde, 
         subject: v.subject || this.allNoapprovalList.Allotsubjct,
         maxCreateTime: this.filters.MaxtimeValue,
-        pageNo: this.allNoapprovalList.pageNo,
+        pageNo: 1,
         pageSize: this.allNoapprovalList.pageSize
       });
     },

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

@@ -1,6 +1,5 @@
 <template>
-  <div>
-    批改老师
+  <div> 
   </div>
 </template>
 <script>
@@ -9,11 +8,20 @@
     components: {},
     props: {},
     data() {
-      return {};
+      return {
+      unionid:localStorage.getItem("unionid"),
+      };
     },
+    created() {
+    this.toAppovalIng()
+  },
     watch: {},
     computed: {},
-    methods: {},
+    methods: {
+      toAppovalIng(){
+            window.open('http://120.77.207.0:8081/kmt/index.html?unionid=' + this.unionid + '&state=' + 1)
+      }
+    },
     mounted() {}
   };
 </script>

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

@@ -44,7 +44,7 @@
             label="是否有补拍"
             header-align="center"
           >
-            <template slot-scope="ownReplenish">
+            <template slot-scope="">
               <span class="allocation">{{scope.row.ownReplenish==1?'有':'无'}}</span>
             </template>
           </el-table-column>

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

@@ -152,11 +152,11 @@
                       <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" plain><a style="text-decoration:none;color:#52cc60;" :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="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 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" plain><a style="text-decoration:none;color:#52cc60;" :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="'http://120.77.207.0:8081/kmt/index.html?homeworkId='+v.homeworkId+'&unionid='+unionid+'&teacherId='+homeworkLIst.teacherId+'&state='+2">去检查</a></el-button>
                     </div>
                   </div>
                   <!-- 分页显示 -->
@@ -1049,7 +1049,7 @@ export default {
         grade: v.grade || this.allNoapprovalList.Allotgarde, 
         subject: v.subject || this.allNoapprovalList.Allotsubjct,
         maxCreateTime: this.filters.MaxtimeValue,
-        pageNo: this.allNoapprovalList.pageNo,
+        pageNo: 1,
         pageSize: this.allNoapprovalList.pageSize
       });
     },