|
|
@ -96,12 +96,16 @@ const refreshRouter = async () => { |
|
|
|
const serverRoutes = Object.assign([], remoteRoutes); |
|
|
|
if (appStore.user.roles.some((o) => o === "物流")) { |
|
|
|
const baseDataRoutes = serverRoutes.find((o) => o.path === "base-data"); |
|
|
|
baseDataRoutes.children = baseDataRoutes.children.filter((o) => o.path !== "bei-jian" && o.path !== "xiao-shou" && o.path !== "yin-du-jian"); |
|
|
|
baseDataRoutes.children = baseDataRoutes.children.filter((o) => o.path !== "bei-jian" && o.path !== "xiao-shou" && o.path !== "yin-du-jian" && o.path !== "bei-jian-show" && o.path !== "xiao-shou-show" && o.path !== "yin-du-jian-show"); |
|
|
|
} |
|
|
|
if (appStore.user.roles.some((o) => o === "admin")) { |
|
|
|
const baseDataRoutes = serverRoutes.find((o) => o.path === "base-data"); |
|
|
|
baseDataRoutes.children = baseDataRoutes.children.filter((o) => o.path !== "bei-jian-show" && o.path !== "xiao-shou-show" && o.path !== "yin-du-jian-show"); |
|
|
|
} |
|
|
|
if (appStore.user.roles.some((o) => o === "商务")) { |
|
|
|
const baseDataRoutes = serverRoutes.find((o) => o.path === "base-data"); |
|
|
|
baseDataRoutes.children = baseDataRoutes.children.filter((o) => o.path !== "bei-jian" && o.path !== "xiao-shou" && o.path !== "yin-du-jian"); |
|
|
|
} |
|
|
|
const setPermission = (list, parent = null) => { |
|
|
|
list.forEach((o) => { |
|
|
|
// full path
|
|
|
|