From 47b5d2d8000ab5d18895cb95e3b599d7e5c56d24 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, 22 Aug 2021 17:56:34 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=B1=95=E7=A4=BA=E9=80=BB?=
=?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jshERP-web/src/components/layouts/TabLayout.vue | 9 +++++----
jshERP-web/src/components/page/GlobalLayout.vue | 3 +--
jshERP-web/src/components/tools/UserMenu.vue | 9 ++++++---
jshERP-web/src/utils/util.js | 1 +
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/jshERP-web/src/components/layouts/TabLayout.vue b/jshERP-web/src/components/layouts/TabLayout.vue
index ead77270..2caca6e6 100644
--- a/jshERP-web/src/components/layouts/TabLayout.vue
+++ b/jshERP-web/src/components/layouts/TabLayout.vue
@@ -36,6 +36,7 @@
import Contextmenu from '@/components/menu/Contextmenu'
import { mixin, mixinDevice } from '@/utils/mixin.js'
import { triggerWindowResizeEvent } from '@/utils/util'
+ import Vue from 'vue'
const indexKey = '/dashboard/analysis'
@@ -121,6 +122,8 @@
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)
//每次切换都刷新
this.routeReload()
}
@@ -196,12 +199,9 @@
this.$message.warning('这是最后一页,不能再关闭了啦')
return
}
- console.log("this.pageList ",this.pageList);
this.pageList = this.pageList.filter(item => item.fullPath !== key)
- console.log("this.pageList ",this.pageList);
let index = this.linkList.indexOf(key)
this.linkList = this.linkList.filter(item => item !== key)
- console.log("this.linkList ",this.linkList);
index = index >= this.linkList.length ? this.linkList.length - 1 : index
this.activePage = this.linkList[index]
},
@@ -284,7 +284,7 @@
}
},
//update-begin-author:taoyan date:20190430 for:动态路由title显示配置的菜单title而不是其对应路由的title
- dynamicRouterShow(key,title){
+ dynamicRouterShow(key, id, title){
let keyIndex = this.linkList.indexOf(key)
if(keyIndex>=0){
//切换历史页签
@@ -302,6 +302,7 @@
path: key,
fullPath: key,
meta: {
+ id: id,
icon: key,
title: title
}
diff --git a/jshERP-web/src/components/page/GlobalLayout.vue b/jshERP-web/src/components/page/GlobalLayout.vue
index a8072ebf..79128347 100644
--- a/jshERP-web/src/components/page/GlobalLayout.vue
+++ b/jshERP-web/src/components/page/GlobalLayout.vue
@@ -154,11 +154,10 @@
myMenuSelect(value){
//此处触发动态路由被点击事件
this.findMenuBykey(this.menus,value.key)
- this.$emit("dynamicRouterShow",value.key,this.activeMenu.text)
+ this.$emit("dynamicRouterShow",value.key, this.activeMenu.id, this.activeMenu.text)
// update-begin-author:sunjianlei date:20191223 for: 修复刷新后菜单Tab名字显示异常
let storeKey = 'route:title:' + this.activeMenu.url
this.$ls.set(storeKey, this.activeMenu.text)
- Vue.ls.set('funId', this.activeMenu.id, 7 * 24 * 60 * 60 * 1000);
// update-end-author:sunjianlei date:20191223 for: 修复刷新后菜单Tab名字显示异常
},
findMenuBykey(menus,key){
diff --git a/jshERP-web/src/components/tools/UserMenu.vue b/jshERP-web/src/components/tools/UserMenu.vue
index bebab47b..a6084963 100644
--- a/jshERP-web/src/components/tools/UserMenu.vue
+++ b/jshERP-web/src/components/tools/UserMenu.vue
@@ -32,9 +32,12 @@
-
-
-
+
+ 官方网站
+
+
+
+
diff --git a/jshERP-web/src/utils/util.js b/jshERP-web/src/utils/util.js
index 8b667acf..c790ee8c 100644
--- a/jshERP-web/src/utils/util.js
+++ b/jshERP-web/src/utils/util.js
@@ -118,6 +118,7 @@ function generateChildRouters (data) {
name: item.text,
component: componentPath,
meta: {
+ id: item.id,
title: item.text,
icon: item.icon,
url: item.url,