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" />
|
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</app-link>
|
</app-link>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||||
@ -95,6 +94,16 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<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>
|
</style>
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import Cookies from 'js-cookie'
|
|||||||
|
|
||||||
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
|
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 Element from 'element-ui'
|
||||||
import './styles/element-variables.scss'
|
import './styles/element-variables.scss'
|
||||||
|
|||||||
@ -308,7 +308,7 @@ export const asyncRoutes = [
|
|||||||
title: "全部产品",
|
title: "全部产品",
|
||||||
fullPath: "/product",
|
fullPath: "/product",
|
||||||
noCache: true,
|
noCache: true,
|
||||||
icon: "el-icon-s-platform"
|
icon: "el-icon-goods"
|
||||||
},
|
},
|
||||||
alwaysShow: true,
|
alwaysShow: true,
|
||||||
children: [
|
children: [
|
||||||
@ -340,15 +340,11 @@ export const asyncRoutes = [
|
|||||||
alwaysShow: true,
|
alwaysShow: true,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "baidu",
|
path: "orderManagement",
|
||||||
component: () => import('@/views/product/productHome/productIndex/index.vue'),
|
component: () => import("@/views/customer/orderManagement"),
|
||||||
name: 'BaiduOrder',
|
name: "OrderManagement",
|
||||||
meta: {
|
meta: { title: "百度订单", fullPath: "/customer/orderManagement", noCache: true, },
|
||||||
title: "百度订单",
|
},
|
||||||
fullPath: "/product/overview",
|
|
||||||
noCache: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -362,20 +358,16 @@ export const asyncRoutes = [
|
|||||||
title: "资源管理",
|
title: "资源管理",
|
||||||
fullPath: "/resourceManagement",
|
fullPath: "/resourceManagement",
|
||||||
noCache: true,
|
noCache: true,
|
||||||
icon: "el-icon-copy-document"
|
icon: "el-icon-s-management"
|
||||||
},
|
},
|
||||||
alwaysShow: true,
|
alwaysShow: true,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "baidu",
|
path: "userResource", component: () => import(
|
||||||
component: () => import('@/views/product/productHome/productIndex/index.vue'),
|
// "@/views/customer/userResource/iframeJiNan.vue"//iframe报错
|
||||||
name: 'BaiduResource',
|
"@/views/customer/userResource"
|
||||||
meta: {
|
), name: "userResource", meta: { title: "百度资源", fullPath: "/customer/userResource", noCache: true },
|
||||||
title: "百度资源",
|
},
|
||||||
fullPath: "/resourceManagement/baidu",
|
|
||||||
noCache: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -783,163 +775,258 @@ export const asyncRoutes = [
|
|||||||
{
|
{
|
||||||
|
|
||||||
},
|
},
|
||||||
// // 客户
|
// 工单管理 - 变为一级菜单
|
||||||
{
|
{
|
||||||
path: "/customer", component: Layout, redirect: "/customer/workOrderManagement", meta: {
|
path: "/workOrderManagement",
|
||||||
title: "客户", icon: "el-icon-s-custom", noCache: true, fullPath: "/customer",
|
component: Layout,
|
||||||
|
meta: {
|
||||||
|
title: "工单管理",
|
||||||
|
icon: "el-icon-s-ticket",
|
||||||
|
noCache: true,
|
||||||
|
fullPath: "/workOrderManagement"
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
// 工单
|
|
||||||
{
|
{
|
||||||
path: "workOrderManagement",
|
path: "index",
|
||||||
component: () => import("@/views/customer/workOrderManagement"),
|
component: () => import("@/views/customer/workOrderManagement"),
|
||||||
name: "WorkOrderManagement",
|
name: "WorkOrderManagement",
|
||||||
meta: { title: "工单管理", fullPath: "/customer/workOrderManagement" },
|
meta: { title: "工单管理", fullPath: "/workOrderManagement/index" },
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
// 退订
|
// 退订管理 - 变为一级菜单(包含子菜单)
|
||||||
{
|
{
|
||||||
path: "unsubscribe",
|
path: "/unsubscribeManagement",
|
||||||
|
component: Layout,
|
||||||
component: () => import("@/views/customer/unsubscribe"),
|
redirect: "/unsubscribeManagement/BaiduNetdisk", // 修正重定向路径
|
||||||
name: "Unsubscribe",
|
alwaysShow: true, // 添加这个属性到路由层级,不是meta里面
|
||||||
alwaysShow: true, // 确保父菜单始终显示
|
|
||||||
meta: {
|
meta: {
|
||||||
title: "退订管理",
|
title: "退订管理",
|
||||||
alwaysShow: true
|
icon: "el-icon-circle-close",
|
||||||
|
noCache: true,
|
||||||
|
fullPath: "/unsubscribeManagement"
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "BaiduNetdisk",
|
path: "BaiduNetdisk",
|
||||||
component: () => import("@/views/customer/unsubscribe/BaiduNetdisk.vue"),
|
component: () => import("@/views/customer/unsubscribe/BaiduNetdisk.vue"),
|
||||||
name: "BaiduNetdisk",
|
name: "BaiduNetdisk",
|
||||||
meta: { title: "百度云" }
|
meta: {
|
||||||
},
|
title: "百度云",
|
||||||
|
fullPath: "/unsubscribeManagement/BaiduNetdisk"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 完善信息
|
// 信息完善 - 变为一级菜单
|
||||||
{
|
{
|
||||||
path: 'approve',
|
path: "/informationPerfect",
|
||||||
component: () => import('@/views/customer/ncApprove/index.vue'),
|
component: Layout,
|
||||||
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: {
|
meta: {
|
||||||
title: "聊天", fullPath: "/product/productHome/chat", noCache: true
|
title: "信息完善",
|
||||||
|
icon: "el-icon-edit-outline",
|
||||||
|
noCache: true,
|
||||||
|
fullPath: "/informationPerfect"
|
||||||
},
|
},
|
||||||
},
|
children: [
|
||||||
|
|
||||||
// 个人中心
|
|
||||||
{
|
{
|
||||||
hidden: true,
|
path: "index",
|
||||||
path: "customerInformation",
|
component: () => import('@/views/customer/ncApprove/index.vue'),
|
||||||
component: () => import("@/views/customer/customerInformation"),
|
name: "InformationPerfect",
|
||||||
name: "customerInformation",
|
meta: { title: "信息完善", fullPath: "/informationPerfect/index" },
|
||||||
meta: { title: "个人中心", fullPath: "/customer/customerInformation" },
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
// 充值管理
|
// 充值管理 - 变为一级菜单
|
||||||
{
|
{
|
||||||
path: "rechargeRecord",
|
path: "/rechargeManagement",
|
||||||
|
component: Layout,
|
||||||
|
meta: {
|
||||||
|
title: "充值管理",
|
||||||
|
icon: "el-icon-money",
|
||||||
|
noCache: true,
|
||||||
|
fullPath: "/rechargeManagement"
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "index",
|
||||||
component: () => import("@/views/customer/rechargeRecord"),
|
component: () => import("@/views/customer/rechargeRecord"),
|
||||||
name: "RechargeRecord",
|
name: "RechargeManagement",
|
||||||
meta: { title: "充值管理", fullPath: "/customer/rechargeRecord" },
|
meta: { title: "充值管理", fullPath: "/rechargeManagement/index" },
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
// 订单管理
|
// 发票管理 - 变为一级菜单
|
||||||
{
|
{
|
||||||
path: "orderManagement",
|
path: "/invoiceManagement",
|
||||||
component: () => import("@/views/customer/orderManagement"),
|
component: Layout,
|
||||||
name: "OrderManagement",
|
meta: {
|
||||||
meta: { title: "产品订单", fullPath: "/customer/orderManagement", noCache: true, },
|
title: "发票管理",
|
||||||
|
icon: "el-icon-document",
|
||||||
|
noCache: true,
|
||||||
|
fullPath: "/invoiceManagement"
|
||||||
},
|
},
|
||||||
// 订单详情
|
children: [
|
||||||
{
|
{
|
||||||
path: "orderDetil",
|
path: "index",
|
||||||
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"),
|
component: () => import("@/views/customer/invoice"),
|
||||||
name: "Invoice",
|
name: "InvoiceManagement",
|
||||||
meta: { title: "发票管理", fullPath: "/customer/invoice" },
|
meta: { title: "发票管理", fullPath: "/invoiceManagement/index" },
|
||||||
},
|
}
|
||||||
// 产品最新页
|
]
|
||||||
{
|
|
||||||
hidden: true,
|
|
||||||
path: "productIndex",
|
|
||||||
component: () => import("@/views/product/productHome/productIndex/index.vue"),
|
|
||||||
name: "ProductIndex",
|
|
||||||
meta: { title: "产品最新页", fullPath: "/product/productHome/productIndex", noCache: true },
|
|
||||||
},],
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// // 客户 - 注释掉
|
||||||
|
// {
|
||||||
|
// 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",
|
path: "/qualificationReview",
|
||||||
@ -992,7 +1079,7 @@ export const asyncRoutes = [
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
name: "demandMangement",
|
name: "demandMangement",
|
||||||
redirect: "/demandMangement/index",
|
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: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "index",
|
path: "index",
|
||||||
@ -1013,7 +1100,7 @@ export const asyncRoutes = [
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
name: "productMangement",
|
name: "productMangement",
|
||||||
redirect: "/productMangement/index",
|
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: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "index",
|
path: "index",
|
||||||
@ -1725,8 +1812,12 @@ export const asyncRoutes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/administrator", component: Layout, redirect: "/administrator/index", meta: {
|
path: "/administrator", component: Layout, redirect: "/administrator/index", meta: {
|
||||||
title: "企业管理", icon: "el-icon-s-tools", noCache: true, fullPath: "/administrator",
|
title: "企业管理",
|
||||||
}, children: [
|
icon: "el-icon-s-custom",
|
||||||
|
noCache: true,
|
||||||
|
fullPath: "/administrator"
|
||||||
|
},
|
||||||
|
children: [
|
||||||
{
|
{
|
||||||
path: "departmentManagement",
|
path: "departmentManagement",
|
||||||
component: () => import("@/views/administrator/departmentManagement"),
|
component: () => import("@/views/administrator/departmentManagement"),
|
||||||
|
|||||||
@ -34,16 +34,16 @@ function filterAsyncRoutes(routes, permissions) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 新增:为普通用户添加订单管理和资源管理路由
|
// 新增:为普通用户添加订单管理和资源管理路由
|
||||||
function addUserRoutes(routes, userType) {
|
function addUserRoutes(routes, userType, orgType) {
|
||||||
console.log("addUserRoutes - userType:", userType);
|
console.log("addUserRoutes - userType:", userType, "orgType:", orgType);
|
||||||
|
|
||||||
// 如果是普通用户(org_type为2),添加订单管理和资源管理路由
|
|
||||||
if (userType === 'user') {
|
|
||||||
const orderManagementRoute = routes.find(route => route.path === "/orderManagement");
|
|
||||||
const resourceManagementRoute = routes.find(route => route.path === "/resourceManagement");
|
|
||||||
|
|
||||||
const userRoutes = [];
|
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");
|
||||||
|
|
||||||
if (orderManagementRoute) {
|
if (orderManagementRoute) {
|
||||||
console.log("添加订单管理路由");
|
console.log("添加订单管理路由");
|
||||||
userRoutes.push(JSON.parse(JSON.stringify(orderManagementRoute))); // 深拷贝
|
userRoutes.push(JSON.parse(JSON.stringify(orderManagementRoute))); // 深拷贝
|
||||||
@ -53,11 +53,21 @@ function addUserRoutes(routes, userType) {
|
|||||||
console.log("添加资源管理路由");
|
console.log("添加资源管理路由");
|
||||||
userRoutes.push(JSON.parse(JSON.stringify(resourceManagementRoute))); // 深拷贝
|
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) {
|
function filterRoutesMobile(routes) {
|
||||||
@ -145,10 +155,9 @@ const actions = {
|
|||||||
accessedRoutes = [];
|
accessedRoutes = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增:为普通用户添加订单管理和资源管理路由
|
// 新增:为普通用户添加订单管理和资源管理路由以及新的五个客户菜单
|
||||||
if (userType === 'user' || orgType == 2) {
|
console.log("为用户添加特定路由");
|
||||||
console.log("为普通用户添加订单管理和资源管理路由");
|
const userSpecificRoutes = addUserRoutes(asyncRoutes, userType, orgType);
|
||||||
const userSpecificRoutes = addUserRoutes(asyncRoutes, userType);
|
|
||||||
|
|
||||||
// 确保不重复添加路由
|
// 确保不重复添加路由
|
||||||
userSpecificRoutes.forEach(route => {
|
userSpecificRoutes.forEach(route => {
|
||||||
@ -159,7 +168,6 @@ const actions = {
|
|||||||
|
|
||||||
console.log("添加用户特定路由后的accessedRoutes:", accessedRoutes);
|
console.log("添加用户特定路由后的accessedRoutes:", accessedRoutes);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
console.log("ACTION generateRoutes - calculated accessedRoutes:", accessedRoutes);
|
console.log("ACTION generateRoutes - calculated accessedRoutes:", accessedRoutes);
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
<div class="nav-list">
|
<div class="nav-list">
|
||||||
<!-- 首页 -->
|
<!-- 首页 -->
|
||||||
<p :class="{ active: $route.path.includes('/index') }">
|
<p :class="{ active: $route.path.includes('/index') }">
|
||||||
|
|
||||||
<a @click="$router.push('/homePage/index')">{{ translations[language].home }}</a>
|
<a @click="$router.push('/homePage/index')">{{ translations[language].home }}</a>
|
||||||
</p>
|
</p>
|
||||||
<!-- 产品与服务:鼠标移入显示子菜单 -->
|
<!-- 产品与服务:鼠标移入显示子菜单 -->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user