updata
This commit is contained in:
parent
057f564f1d
commit
2144f3dcbc
@ -6,7 +6,6 @@
|
||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
||||
</el-menu-item>
|
||||
</app-link>
|
||||
|
||||
</template>
|
||||
|
||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
@ -94,7 +93,17 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.sider{
|
||||
.sider {
|
||||
// 给嵌套菜单添加左边距
|
||||
::v-deep .nest-menu {
|
||||
.el-menu-item {
|
||||
padding-left: 60px !important; // 或者您想要的任何值,比如10px
|
||||
}
|
||||
|
||||
// 如果还有更深层的嵌套,可以继续设置
|
||||
.nest-menu .el-menu-item {
|
||||
padding-left: 100px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -4,7 +4,7 @@ import Cookies from 'js-cookie'
|
||||
|
||||
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
|
||||
|
||||
import '@/assets/css/iconfont/iconfont.css'
|
||||
import './assets/css/iconfont/iconfont.css'
|
||||
|
||||
import Element from 'element-ui'
|
||||
import './styles/element-variables.scss'
|
||||
|
||||
@ -308,7 +308,7 @@ export const asyncRoutes = [
|
||||
title: "全部产品",
|
||||
fullPath: "/product",
|
||||
noCache: true,
|
||||
icon: "el-icon-s-platform"
|
||||
icon: "el-icon-goods"
|
||||
},
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
@ -340,15 +340,11 @@ export const asyncRoutes = [
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
{
|
||||
path: "baidu",
|
||||
component: () => import('@/views/product/productHome/productIndex/index.vue'),
|
||||
name: 'BaiduOrder',
|
||||
meta: {
|
||||
title: "百度订单",
|
||||
fullPath: "/product/overview",
|
||||
noCache: true
|
||||
}
|
||||
}
|
||||
path: "orderManagement",
|
||||
component: () => import("@/views/customer/orderManagement"),
|
||||
name: "OrderManagement",
|
||||
meta: { title: "百度订单", fullPath: "/customer/orderManagement", noCache: true, },
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
@ -362,20 +358,16 @@ export const asyncRoutes = [
|
||||
title: "资源管理",
|
||||
fullPath: "/resourceManagement",
|
||||
noCache: true,
|
||||
icon: "el-icon-copy-document"
|
||||
icon: "el-icon-s-management"
|
||||
},
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
{
|
||||
path: "baidu",
|
||||
component: () => import('@/views/product/productHome/productIndex/index.vue'),
|
||||
name: 'BaiduResource',
|
||||
meta: {
|
||||
title: "百度资源",
|
||||
fullPath: "/resourceManagement/baidu",
|
||||
noCache: true
|
||||
}
|
||||
}
|
||||
path: "userResource", component: () => import(
|
||||
// "@/views/customer/userResource/iframeJiNan.vue"//iframe报错
|
||||
"@/views/customer/userResource"
|
||||
), name: "userResource", meta: { title: "百度资源", fullPath: "/customer/userResource", noCache: true },
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
@ -783,163 +775,258 @@ export const asyncRoutes = [
|
||||
{
|
||||
|
||||
},
|
||||
// // 客户
|
||||
// 工单管理 - 变为一级菜单
|
||||
{
|
||||
path: "/customer", component: Layout, redirect: "/customer/workOrderManagement", meta: {
|
||||
title: "客户", icon: "el-icon-s-custom", noCache: true, fullPath: "/customer",
|
||||
path: "/workOrderManagement",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "工单管理",
|
||||
icon: "el-icon-s-ticket",
|
||||
noCache: true,
|
||||
fullPath: "/workOrderManagement"
|
||||
},
|
||||
children: [
|
||||
// 工单
|
||||
{
|
||||
path: "workOrderManagement",
|
||||
path: "index",
|
||||
component: () => import("@/views/customer/workOrderManagement"),
|
||||
name: "WorkOrderManagement",
|
||||
meta: { title: "工单管理", fullPath: "/customer/workOrderManagement" },
|
||||
},
|
||||
// 退订
|
||||
{
|
||||
path: "unsubscribe",
|
||||
|
||||
component: () => import("@/views/customer/unsubscribe"),
|
||||
name: "Unsubscribe",
|
||||
alwaysShow: true, // 确保父菜单始终显示
|
||||
meta: {
|
||||
title: "退订管理",
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "BaiduNetdisk",
|
||||
component: () => import("@/views/customer/unsubscribe/BaiduNetdisk.vue"),
|
||||
name: "BaiduNetdisk",
|
||||
meta: { title: "百度云" }
|
||||
},
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
// 完善信息
|
||||
{
|
||||
path: 'approve',
|
||||
component: () => import('@/views/customer/ncApprove/index.vue'),
|
||||
name: "Approve",
|
||||
meta: { title: "信息完善", fullPath: "/customer/ncApprove" },
|
||||
},
|
||||
// 渠道管理
|
||||
{
|
||||
hidden: true,
|
||||
path: "channelMangement",
|
||||
component: () => import("@/views/customer/channelMangement/index.vue"),
|
||||
name: "ChannelMangement",
|
||||
meta: { title: "渠道管理", fullPath: "/customer/channelMangement" },
|
||||
},
|
||||
//渠道产品管理
|
||||
{
|
||||
hidden: true,
|
||||
path: "channelProductMangement",
|
||||
component: () => import("@/views/customer/channelMangement/channelProductMangement/index.vue"),
|
||||
name: "channelProductMangement",
|
||||
meta: { title: "渠道产品管理", fullPath: "/customer/channelMangement/channelProductMangement", noCache: true },
|
||||
},
|
||||
// 无权限
|
||||
{
|
||||
hidden: true,
|
||||
path: "noChannelPermission",
|
||||
component: () => import("@/views/customer/channelMangement/noChannelPermission/index.vue"),
|
||||
name: "noChannelPermission",
|
||||
meta: { title: "无权限", fullPath: "/customer/channelMangement/noChannelPermission", noCache: true },
|
||||
},
|
||||
// 聊天
|
||||
{
|
||||
hidden: true,
|
||||
path: "chat",
|
||||
component: () => import("@/views/product/productHome/chat/index.vue"),
|
||||
name: "chat",
|
||||
meta: {
|
||||
title: "聊天", fullPath: "/product/productHome/chat", noCache: true
|
||||
},
|
||||
},
|
||||
|
||||
// 个人中心
|
||||
{
|
||||
hidden: true,
|
||||
path: "customerInformation",
|
||||
component: () => import("@/views/customer/customerInformation"),
|
||||
name: "customerInformation",
|
||||
meta: { title: "个人中心", fullPath: "/customer/customerInformation" },
|
||||
},
|
||||
// 充值管理
|
||||
{
|
||||
path: "rechargeRecord",
|
||||
component: () => import("@/views/customer/rechargeRecord"),
|
||||
name: "RechargeRecord",
|
||||
meta: { title: "充值管理", fullPath: "/customer/rechargeRecord" },
|
||||
},
|
||||
// 订单管理
|
||||
{
|
||||
path: "orderManagement",
|
||||
component: () => import("@/views/customer/orderManagement"),
|
||||
name: "OrderManagement",
|
||||
meta: { title: "产品订单", fullPath: "/customer/orderManagement", noCache: true, },
|
||||
},
|
||||
// 订单详情
|
||||
{
|
||||
path: "orderDetil",
|
||||
component: () => import("@/views/customer/orderDetil"),
|
||||
name: "orderDetil",
|
||||
hidden: true,
|
||||
meta: { title: "订单详情", fullPath: "/customer/orderDetil", noCache: true, },
|
||||
},
|
||||
// 促销邀请码
|
||||
{
|
||||
hidden: true,
|
||||
path: "promotionalInvitationCode",
|
||||
component: () => import("@/views/customer/promotionalInvitationCode"),
|
||||
name: "PromotionalInvitationCode",
|
||||
meta: { title: "促销邀请码", fullPath: "/customer/promotionalInvitationCode" },
|
||||
},
|
||||
|
||||
// 资源示例
|
||||
{
|
||||
path: "userResource", component: () => import(
|
||||
// "@/views/customer/userResource/iframeJiNan.vue"//iframe报错
|
||||
"@/views/customer/userResource"
|
||||
), name: "userResource", meta: { title: "资源实例", fullPath: "/customer/userResource", noCache: true },
|
||||
},
|
||||
// ssh登录
|
||||
{
|
||||
|
||||
path: "sshTerminal",
|
||||
component: () => import(
|
||||
// "@/views/customer/userResource/iframeJiNan.vue"//iframe报错
|
||||
"@/views/customer/userResource/SshTerminal.vue"
|
||||
),
|
||||
name: "sshTerminal",
|
||||
meta: { title: "ssh登录", fullPath: "/customer/SshTerminal", noCache: true },
|
||||
},
|
||||
// 审批记录
|
||||
{
|
||||
hidden: true, path: "approvalRecord", component: () => import(
|
||||
// "@/views/customer/approvalRecord/iframeJiNan.vue"//iframe报错
|
||||
"@/views/customer/approvalRecord"
|
||||
), name: "approvalRecord", meta: { title: "审批记录", fullPath: "/customer/approvalRecord" },
|
||||
},
|
||||
// 发票管理
|
||||
{
|
||||
path: "invoice",
|
||||
component: () => import("@/views/customer/invoice"),
|
||||
name: "Invoice",
|
||||
meta: { title: "发票管理", fullPath: "/customer/invoice" },
|
||||
},
|
||||
// 产品最新页
|
||||
{
|
||||
hidden: true,
|
||||
path: "productIndex",
|
||||
component: () => import("@/views/product/productHome/productIndex/index.vue"),
|
||||
name: "ProductIndex",
|
||||
meta: { title: "产品最新页", fullPath: "/product/productHome/productIndex", noCache: true },
|
||||
},],
|
||||
meta: { title: "工单管理", fullPath: "/workOrderManagement/index" },
|
||||
}
|
||||
]
|
||||
},
|
||||
// 退订管理 - 变为一级菜单(包含子菜单)
|
||||
{
|
||||
path: "/unsubscribeManagement",
|
||||
component: Layout,
|
||||
redirect: "/unsubscribeManagement/BaiduNetdisk", // 修正重定向路径
|
||||
alwaysShow: true, // 添加这个属性到路由层级,不是meta里面
|
||||
meta: {
|
||||
title: "退订管理",
|
||||
icon: "el-icon-circle-close",
|
||||
noCache: true,
|
||||
fullPath: "/unsubscribeManagement"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "BaiduNetdisk",
|
||||
component: () => import("@/views/customer/unsubscribe/BaiduNetdisk.vue"),
|
||||
name: "BaiduNetdisk",
|
||||
meta: {
|
||||
title: "百度云",
|
||||
fullPath: "/unsubscribeManagement/BaiduNetdisk"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// 信息完善 - 变为一级菜单
|
||||
{
|
||||
path: "/informationPerfect",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "信息完善",
|
||||
icon: "el-icon-edit-outline",
|
||||
noCache: true,
|
||||
fullPath: "/informationPerfect"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import('@/views/customer/ncApprove/index.vue'),
|
||||
name: "InformationPerfect",
|
||||
meta: { title: "信息完善", fullPath: "/informationPerfect/index" },
|
||||
}
|
||||
]
|
||||
},
|
||||
// 充值管理 - 变为一级菜单
|
||||
{
|
||||
path: "/rechargeManagement",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "充值管理",
|
||||
icon: "el-icon-money",
|
||||
noCache: true,
|
||||
fullPath: "/rechargeManagement"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/customer/rechargeRecord"),
|
||||
name: "RechargeManagement",
|
||||
meta: { title: "充值管理", fullPath: "/rechargeManagement/index" },
|
||||
}
|
||||
]
|
||||
},
|
||||
// 发票管理 - 变为一级菜单
|
||||
{
|
||||
path: "/invoiceManagement",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "发票管理",
|
||||
icon: "el-icon-document",
|
||||
noCache: true,
|
||||
fullPath: "/invoiceManagement"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/customer/invoice"),
|
||||
name: "InvoiceManagement",
|
||||
meta: { title: "发票管理", fullPath: "/invoiceManagement/index" },
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
// // 客户 - 注释掉
|
||||
// {
|
||||
// path: "/customer", component: Layout, redirect: "/customer/workOrderManagement", meta: {
|
||||
// title: "客户", icon: "el-icon-s-custom", noCache: true, fullPath: "/customer",
|
||||
// },
|
||||
// children: [
|
||||
// // 工单
|
||||
// {
|
||||
// path: "workOrderManagement",
|
||||
// component: () => import("@/views/customer/workOrderManagement"),
|
||||
// name: "WorkOrderManagement",
|
||||
// meta: { title: "工单管理", fullPath: "/customer/workOrderManagement" },
|
||||
// },
|
||||
// // 退订
|
||||
// {
|
||||
// path: "unsubscribe",
|
||||
|
||||
// component: () => import("@/views/customer/unsubscribe"),
|
||||
// name: "Unsubscribe",
|
||||
// alwaysShow: true, // 确保父菜单始终显示
|
||||
// meta: {
|
||||
// title: "退订管理",
|
||||
// alwaysShow: true
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "BaiduNetdisk",
|
||||
// component: () => import("@/views/customer/unsubscribe/BaiduNetdisk.vue"),
|
||||
// name: "BaiduNetdisk",
|
||||
// meta: { title: "百度云" }
|
||||
// },
|
||||
|
||||
// ]
|
||||
// },
|
||||
// // 完善信息
|
||||
// {
|
||||
// path: 'approve',
|
||||
// component: () => import('@/views/customer/ncApprove/index.vue'),
|
||||
// name: "Approve",
|
||||
// meta: { title: "信息完善", fullPath: "/customer/ncApprove" },
|
||||
// },
|
||||
// // 渠道管理
|
||||
// {
|
||||
// hidden: true,
|
||||
// path: "channelMangement",
|
||||
// component: () => import("@/views/customer/channelMangement/index.vue"),
|
||||
// name: "ChannelMangement",
|
||||
// meta: { title: "渠道管理", fullPath: "/customer/channelMangement" },
|
||||
// },
|
||||
// //渠道产品管理
|
||||
// {
|
||||
// hidden: true,
|
||||
// path: "channelProductMangement",
|
||||
// component: () => import("@/views/customer/channelMangement/channelProductMangement/index.vue"),
|
||||
// name: "channelProductMangement",
|
||||
// meta: { title: "渠道产品管理", fullPath: "/customer/channelMangement/channelProductMangement", noCache: true },
|
||||
// },
|
||||
// // 无权限
|
||||
// {
|
||||
// hidden: true,
|
||||
// path: "noChannelPermission",
|
||||
// component: () => import("@/views/customer/channelMangement/noChannelPermission/index.vue"),
|
||||
// name: "noChannelPermission",
|
||||
// meta: { title: "无权限", fullPath: "/customer/channelMangement/noChannelPermission", noCache: true },
|
||||
// },
|
||||
// // 聊天
|
||||
// {
|
||||
// hidden: true,
|
||||
// path: "chat",
|
||||
// component: () => import("@/views/product/productHome/chat/index.vue"),
|
||||
// name: "chat",
|
||||
// meta: {
|
||||
// title: "聊天", fullPath: "/product/productHome/chat", noCache: true
|
||||
// },
|
||||
// },
|
||||
|
||||
// // 个人中心
|
||||
// {
|
||||
// hidden: true,
|
||||
// path: "customerInformation",
|
||||
// component: () => import("@/views/customer/customerInformation"),
|
||||
// name: "customerInformation",
|
||||
// meta: { title: "个人中心", fullPath: "/customer/customerInformation" },
|
||||
// },
|
||||
// // 充值管理
|
||||
// {
|
||||
// path: "rechargeRecord",
|
||||
// component: () => import("@/views/customer/rechargeRecord"),
|
||||
// name: "RechargeRecord",
|
||||
// meta: { title: "充值管理", fullPath: "/customer/rechargeRecord" },
|
||||
// },
|
||||
// // 订单管理
|
||||
// // {
|
||||
// // path: "orderManagement",
|
||||
// // component: () => import("@/views/customer/orderManagement"),
|
||||
// // name: "OrderManagement",
|
||||
// // meta: { title: "产品订单", fullPath: "/customer/orderManagement", noCache: true, },
|
||||
// // },
|
||||
// // 订单详情
|
||||
// {
|
||||
// path: "orderDetil",
|
||||
// component: () => import("@/views/customer/orderDetil"),
|
||||
// name: "orderDetil",
|
||||
// hidden: true,
|
||||
// meta: { title: "订单详情", fullPath: "/customer/orderDetil", noCache: true, },
|
||||
// },
|
||||
// // 促销邀请码
|
||||
// {
|
||||
// hidden: true,
|
||||
// path: "promotionalInvitationCode",
|
||||
// component: () => import("@/views/customer/promotionalInvitationCode"),
|
||||
// name: "PromotionalInvitationCode",
|
||||
// meta: { title: "促销邀请码", fullPath: "/customer/promotionalInvitationCode" },
|
||||
// },
|
||||
|
||||
// // 资源示例
|
||||
|
||||
// // ssh登录
|
||||
// // {
|
||||
|
||||
// // path: "sshTerminal",
|
||||
// // component: () => import(
|
||||
// // // "@/views/customer/userResource/iframeJiNan.vue"//iframe报错
|
||||
// // "@/views/customer/userResource/SshTerminal.vue"
|
||||
// // ),
|
||||
// // name: "sshTerminal",
|
||||
// // meta: { title: "ssh登录", fullPath: "/customer/SshTerminal", noCache: true },
|
||||
// // },
|
||||
// // 审批记录
|
||||
// {
|
||||
// hidden: true, path: "approvalRecord", component: () => import(
|
||||
// // "@/views/customer/approvalRecord/iframeJiNan.vue"//iframe报错
|
||||
// "@/views/customer/approvalRecord"
|
||||
// ), name: "approvalRecord", meta: { title: "审批记录", fullPath: "/customer/approvalRecord" },
|
||||
// },
|
||||
// // 发票管理
|
||||
// {
|
||||
// path: "invoice",
|
||||
// component: () => import("@/views/customer/invoice"),
|
||||
// name: "Invoice",
|
||||
// meta: { title: "发票管理", fullPath: "/customer/invoice" },
|
||||
// },
|
||||
// // 产品最新页
|
||||
// {
|
||||
// hidden: true,
|
||||
// path: "productIndex",
|
||||
// component: () => import("@/views/product/productHome/productIndex/index.vue"),
|
||||
// name: "ProductIndex",
|
||||
// meta: { title: "产品最新页", fullPath: "/product/productHome/productIndex", noCache: true },
|
||||
// },],
|
||||
// },
|
||||
// 资质审核
|
||||
{
|
||||
path: "/qualificationReview",
|
||||
@ -992,7 +1079,7 @@ export const asyncRoutes = [
|
||||
component: Layout,
|
||||
name: "demandMangement",
|
||||
redirect: "/demandMangement/index",
|
||||
meta: { fullPath: "/demandMangement", title: "需求管理", noCache: true, icon: 'el-icon-s-home' },
|
||||
meta: { fullPath: "/demandMangement", title: "需求管理", noCache: true, icon: 'el-icon-s-claim' },
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
@ -1013,7 +1100,7 @@ export const asyncRoutes = [
|
||||
component: Layout,
|
||||
name: "productMangement",
|
||||
redirect: "/productMangement/index",
|
||||
meta: { fullPath: "/productMangement", title: "商品管理", noCache: true, icon: 'el-icon-s-home' },
|
||||
meta: { fullPath: "/productMangement", title: "商品管理", noCache: true, icon: 'el-icon-s-shop' },
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
@ -1725,8 +1812,12 @@ export const asyncRoutes = [
|
||||
},
|
||||
{
|
||||
path: "/administrator", component: Layout, redirect: "/administrator/index", meta: {
|
||||
title: "企业管理", icon: "el-icon-s-tools", noCache: true, fullPath: "/administrator",
|
||||
}, children: [
|
||||
title: "企业管理",
|
||||
icon: "el-icon-s-custom",
|
||||
noCache: true,
|
||||
fullPath: "/administrator"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "departmentManagement",
|
||||
component: () => import("@/views/administrator/departmentManagement"),
|
||||
|
||||
@ -34,18 +34,18 @@ function filterAsyncRoutes(routes, permissions) {
|
||||
}
|
||||
|
||||
// 新增:为普通用户添加订单管理和资源管理路由
|
||||
function addUserRoutes(routes, userType) {
|
||||
console.log("addUserRoutes - userType:", userType);
|
||||
function addUserRoutes(routes, userType, orgType) {
|
||||
console.log("addUserRoutes - userType:", userType, "orgType:", orgType);
|
||||
|
||||
// 如果是普通用户(org_type为2),添加订单管理和资源管理路由
|
||||
if (userType === 'user') {
|
||||
const userRoutes = [];
|
||||
|
||||
// 如果是普通用户(org_type为2或userType为user),添加订单管理和资源管理路由
|
||||
if (userType === 'user' || orgType == 2) {
|
||||
const orderManagementRoute = routes.find(route => route.path === "/orderManagement");
|
||||
const resourceManagementRoute = routes.find(route => route.path === "/resourceManagement");
|
||||
|
||||
const userRoutes = [];
|
||||
|
||||
if (orderManagementRoute) {
|
||||
console.log("添加订单管理路由");
|
||||
console.log("添加订单管理路由");
|
||||
userRoutes.push(JSON.parse(JSON.stringify(orderManagementRoute))); // 深拷贝
|
||||
}
|
||||
|
||||
@ -53,11 +53,21 @@ function addUserRoutes(routes, userType) {
|
||||
console.log("添加资源管理路由");
|
||||
userRoutes.push(JSON.parse(JSON.stringify(resourceManagementRoute))); // 深拷贝
|
||||
}
|
||||
|
||||
return userRoutes;
|
||||
}
|
||||
|
||||
return [];
|
||||
// 新增:为所有用户添加五个新的客户菜单
|
||||
const newCustomerRoutes = [
|
||||
routes.find(route => route.path === "/workOrderManagement"),
|
||||
routes.find(route => route.path === "/unsubscribeManagement"),
|
||||
routes.find(route => route.path === "/informationPerfect"),
|
||||
routes.find(route => route.path === "/rechargeManagement"),
|
||||
routes.find(route => route.path === "/invoiceManagement")
|
||||
].filter(route => route); // 过滤掉undefined
|
||||
|
||||
console.log("添加新的客户菜单路由:", newCustomerRoutes.map(r => r.path));
|
||||
userRoutes.push(...newCustomerRoutes);
|
||||
|
||||
return userRoutes;
|
||||
}
|
||||
|
||||
function filterRoutesMobile(routes) {
|
||||
@ -145,20 +155,18 @@ const actions = {
|
||||
accessedRoutes = [];
|
||||
}
|
||||
|
||||
// 新增:为普通用户添加订单管理和资源管理路由
|
||||
if (userType === 'user' || orgType == 2) {
|
||||
console.log("为普通用户添加订单管理和资源管理路由");
|
||||
const userSpecificRoutes = addUserRoutes(asyncRoutes, userType);
|
||||
// 新增:为普通用户添加订单管理和资源管理路由以及新的五个客户菜单
|
||||
console.log("为用户添加特定路由");
|
||||
const userSpecificRoutes = addUserRoutes(asyncRoutes, userType, orgType);
|
||||
|
||||
// 确保不重复添加路由
|
||||
userSpecificRoutes.forEach(route => {
|
||||
if (!accessedRoutes.some(r => r.path === route.path)) {
|
||||
accessedRoutes.push(route);
|
||||
}
|
||||
});
|
||||
// 确保不重复添加路由
|
||||
userSpecificRoutes.forEach(route => {
|
||||
if (!accessedRoutes.some(r => r.path === route.path)) {
|
||||
accessedRoutes.push(route);
|
||||
}
|
||||
});
|
||||
|
||||
console.log("添加用户特定路由后的accessedRoutes:", accessedRoutes);
|
||||
}
|
||||
console.log("添加用户特定路由后的accessedRoutes:", accessedRoutes);
|
||||
}
|
||||
|
||||
console.log("ACTION generateRoutes - calculated accessedRoutes:", accessedRoutes);
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
<div class="nav-list">
|
||||
<!-- 首页 -->
|
||||
<p :class="{ active: $route.path.includes('/index') }">
|
||||
|
||||
<a @click="$router.push('/homePage/index')">{{ translations[language].home }}</a>
|
||||
</p>
|
||||
<!-- 产品与服务:鼠标移入显示子菜单 -->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user