From b7ef95ab0ccbd294b4c3af6126dbf18e9753cc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Sun, 9 Jan 2022 20:25:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=98=BE=E7=A4=BA=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jshERP-web/src/components/layouts/TabLayout.vue | 2 -- jshERP-web/src/components/page/GlobalLayout.vue | 7 +------ jshERP-web/src/mixins/JeecgListMixin.js | 5 ++--- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/jshERP-web/src/components/layouts/TabLayout.vue b/jshERP-web/src/components/layouts/TabLayout.vue index 1edcea47..0ec34d0e 100644 --- a/jshERP-web/src/components/layouts/TabLayout.vue +++ b/jshERP-web/src/components/layouts/TabLayout.vue @@ -122,8 +122,6 @@ let oldIndex = this.linkList.indexOf(newRoute.fullPath) let oldPositionRoute = this.pageList[oldIndex] this.pageList.splice(oldIndex, 1, Object.assign({},newRoute,{meta:oldPositionRoute.meta})) - //给菜单id赋值,用于调用之后控制按钮的显示 - Vue.ls.set('funId', oldPositionRoute.meta.id, 7 * 24 * 60 * 60 * 1000) } }, 'activePage': function(key) { diff --git a/jshERP-web/src/components/page/GlobalLayout.vue b/jshERP-web/src/components/page/GlobalLayout.vue index 1fe7a8a4..bb0322d6 100644 --- a/jshERP-web/src/components/page/GlobalLayout.vue +++ b/jshERP-web/src/components/page/GlobalLayout.vue @@ -14,7 +14,7 @@ @@ -157,11 +157,6 @@ let storeKey = 'route:title:' + this.activeMenu.url this.$ls.set(storeKey, this.activeMenu.text) }, - myMenuSelectMobile(value){ - this.myMenuSelect(value) - //给菜单id赋值,用于调用之后控制按钮的显示 - Vue.ls.set('funId', this.activeMenu.id, 7 * 24 * 60 * 60 * 1000); - }, findMenuBykey(menus,key){ for(let i of menus){ if(i.url==key){ diff --git a/jshERP-web/src/mixins/JeecgListMixin.js b/jshERP-web/src/mixins/JeecgListMixin.js index c0dcefbc..aaf70c32 100644 --- a/jshERP-web/src/mixins/JeecgListMixin.js +++ b/jshERP-web/src/mixins/JeecgListMixin.js @@ -351,12 +351,11 @@ export const JeecgListMixin = { }, /* 按钮权限 */ initActiveBtnStr() { - let funId = Vue.ls.get('funId'); //功能id let btnStrList = Vue.ls.get('winBtnStrList'); //按钮功能列表 JSON字符串 this.btnEnableList = ""; //按钮列表 - if (funId && btnStrList) { + if (location.pathname && btnStrList) { for (let i = 0; i < btnStrList.length; i++) { - if (btnStrList[i].funId == funId) { + if (btnStrList[i].url === location.pathname) { if (btnStrList[i].btnStr) { this.btnEnableList = btnStrList[i].btnStr; }