【修改】修改bug
This commit is contained in:
@@ -212,5 +212,7 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
word-break: keep-all;
|
||||||
|
line-height: 23px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+39
-19
@@ -86,7 +86,7 @@ export default {
|
|||||||
data = []
|
data = []
|
||||||
}
|
}
|
||||||
data = data.sort((a, b) => a.sort - b.sort)
|
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 = []
|
let menuData = []
|
||||||
const menuFun = (menu) => {
|
const menuFun = (menu) => {
|
||||||
menuData = [...menuData, ...menu]
|
menuData = [...menuData, ...menu]
|
||||||
@@ -96,25 +96,45 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
menuFun(menu)
|
menuFun(menu)
|
||||||
|
if(menuData.length==0){
|
||||||
const treeData = menuData.map(item => ({
|
this.$api.login.logout().then(_ => {
|
||||||
id: item.id,
|
this.$message.warning('暂无权限,请联系管理员授权')
|
||||||
parentId: item.parentId,
|
this.$store.commit('saveUserInfo', null)
|
||||||
label: item.name,
|
this.$store.commit('setHandleProcess', null)
|
||||||
href: item.href,
|
this.$store.commit('savePathUrl', null)
|
||||||
icon: item.iconHref,
|
this.$store.commit('removeDicts', null)
|
||||||
isCollage: true,
|
// var sevice = "http://"+window.location.host+"/";
|
||||||
belong: item.belong,
|
// var serviceUrl = encodeURIComponent(sevice);
|
||||||
isUrl: item.isUrl
|
// 正式
|
||||||
}))
|
// window.open("https://caddmuat.changan.com.cn/cas/logout?service=http://10.64.23.30:7766/home", '_self');
|
||||||
// 去重
|
// 测试
|
||||||
const obj = {}
|
// window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self');
|
||||||
treeData.forEach(item => {
|
this.$router.push('/login')
|
||||||
obj[item.id] = item
|
})
|
||||||
})
|
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.$store.commit('saveMenuData', Object.values(obj))
|
||||||
this.menuAllDate = Object.values(obj)
|
this.menuAllDate = Object.values(obj)
|
||||||
this.getMenu()
|
this.getMenu()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user