浏览代码

加班申请手机端

lxy_01 4 天之前
父节点
当前提交
cafa08542b

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/router/index.js

@@ -115,7 +115,7 @@ const router = new Router({
         path: "/overtimeApplication",
         component: () => import("@/views/overtime/overtimeApplication"),
         meta: {
-            title: "加班管理",
+            title: "加班申请",
             keepAlive: false
         }
     },

+ 4 - 5
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/index/index.vue

@@ -244,16 +244,15 @@ export default {
                 fixed: true
               },
               {
-                name: '加班管理',
-                moudelName: '加班管理',
+                name: '加班申请',
+                moudelName: '员工加班申请',
                 url: '/overtimeApplication',
-                icon: 'balance-list-o',
-                fixed: true
+                icon: 'balance-list-o'
               },
 
             ]
             console.log(routersList, modelNameList)
-            this.routers = routersList.filter(item => item.fixed || modelNameList.includes(item.moudelName));
+            this.routers = routersList.filter(item =>item.fixed || modelNameList.includes(item.moudelName));
             this.routers.push({
                     name: '我的',
                     moudelName: '我的',

+ 13 - 0
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/my/children/center.vue

@@ -43,6 +43,7 @@
 <script>
     import Footer from "@/components/Footer";
     import { mapGetters } from "vuex";
+    import { ref } from "vue";
     export default {
         components: {
             Footer
@@ -74,6 +75,10 @@
 
                 this.$store.commit("updateLogin", false);
                 localStorage.removeItem("userInfo");
+                
+                console.log("logout");
+                // 清除缓存的keep-alive页面
+                this.clearKeepAliveCache();
                 this.$router.push({path:"/login", query: {loginAny: true}});
             },
             bindWeiXin(){
@@ -95,6 +100,14 @@
                 var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=0#wechat_redirect";
                 window.location.href = weixinUrl;
             },
+            
+            clearKeepAliveCache() {
+                const indexs = this.$router.options.routes.filter(route => route.path && route.path === "/index");
+                console.log(indexs);
+                if (indexs.length > 0 && indexs[0].meta.keepAlive){
+                    indexs[0].meta.keepAlive = false;
+                }
+            },
         },
         create() {
         },