diff --git a/src/components/ProcessApprovalHistory.vue b/src/components/ProcessApprovalHistory.vue index f370eeb..cdeedb2 100644 --- a/src/components/ProcessApprovalHistory.vue +++ b/src/components/ProcessApprovalHistory.vue @@ -212,5 +212,7 @@ export default { overflow: hidden; height: 23px; text-overflow: ellipsis; + word-break: keep-all; + line-height: 23px; } diff --git a/src/views/Layout.vue b/src/views/Layout.vue index b482c66..9bdc43a 100644 --- a/src/views/Layout.vue +++ b/src/views/Layout.vue @@ -86,7 +86,7 @@ export default { data = [] } data = data.sort((a, b) => a.sort - b.sort) - const menu = data.filter(item => item.belong) + const menu = data.filter(item => item.belong && !item.isButton) let menuData = [] const menuFun = (menu) => { menuData = [...menuData, ...menu] @@ -96,25 +96,45 @@ export default { } } menuFun(menu) - - const treeData = menuData.map(item => ({ - id: item.id, - parentId: item.parentId, - label: item.name, - href: item.href, - icon: item.iconHref, - isCollage: true, - belong: item.belong, - isUrl: item.isUrl - })) - // 去重 - const obj = {} - treeData.forEach(item => { - obj[item.id] = item - }) + if(menuData.length==0){ + this.$api.login.logout().then(_ => { + this.$message.warning('暂无权限,请联系管理员授权') + this.$store.commit('saveUserInfo', null) + this.$store.commit('setHandleProcess', null) + this.$store.commit('savePathUrl', null) + this.$store.commit('removeDicts', null) + // var sevice = "http://"+window.location.host+"/"; + // var serviceUrl = encodeURIComponent(sevice); + // 正式 + // window.open("https://caddmuat.changan.com.cn/cas/logout?service=http://10.64.23.30:7766/home", '_self'); + // 测试 + // window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self'); + this.$router.push('/login') + }) + return + }else{ + const treeData = menuData.map(item => ({ + id: item.id, + parentId: item.parentId, + label: item.name, + href: item.href, + icon: item.iconHref, + isCollage: true, + belong: item.belong, + isUrl: item.isUrl + })) + // 去重 + const obj = {} + treeData.forEach(item => { + obj[item.id] = item + }) this.$store.commit('saveMenuData', Object.values(obj)) - this.menuAllDate = Object.values(obj) - this.getMenu() + this.menuAllDate = Object.values(obj) + this.getMenu() + + } + + }) } },