Commit b43465d1 authored by 李苏's avatar 李苏 💬

ROUTER POWER REWRiTING=>FILTER HASMKID=TRUE

parent 9930a6a5
......@@ -115,9 +115,10 @@ const permission = {
/* 权限路由*/
/* */
function filter(data) {
var newData = data.filter(
(item) => {
let hasMkid = false
let hasMkid = true
asymenus.forEach(e => {
if ((e.mkid == item.meta.mkid) || (item.meta.mkid == 'test')) {
item.meta.icon = e.icon
......@@ -140,6 +141,7 @@ const permission = {
let newPowerRoutes = filter(powerRoutes)
let newCommonList = filter(commonList.list)
let newErpList = filter(erpList.list)
/* 转化菜单格式*/
let delArr = []
let newmenus = []
......@@ -154,7 +156,6 @@ const permission = {
res.data = dynamicRouter([...newCommonList, ...newErpList, ...newPowerRoutes], asymenus) || [...
newCommonList, ...newErpList, ...newPowerRoutes
]
console.log(res.data,'router finally')
/* 重置首页路由*/
// let hompePage = treeToList([...newCommonList,...newErpList,...newPowerRoutes]).filter(item=>item.mkid==localStorage.getItem('homeMkid'))
let ttlist = treeToList([...newCommonList, ...newErpList, ...newPowerRoutes])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment