feat: 权限改造
This commit is contained in:
parent
c22aa9c743
commit
e3ea3d9c28
|
@ -32,7 +32,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "运营管理",
|
name: "运营管理",
|
||||||
url: "operation-management",
|
url: "operation-management",
|
||||||
perms: "",
|
perms: "operation-management",
|
||||||
type: 0,
|
type: 0,
|
||||||
elIcon: "el-icon-s-help",
|
elIcon: "el-icon-s-help",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -44,7 +44,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "市场列表",
|
name: "市场列表",
|
||||||
url: "operation-management/market-list/index",
|
url: "operation-management/market-list/index",
|
||||||
perms: "",
|
perms: "operation-management:market-list:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-shopping-cart-full",
|
elIcon: "el-icon-shopping-cart-full",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -57,7 +57,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "店铺列表",
|
name: "店铺列表",
|
||||||
url: "operation-management/shop-list/index",
|
url: "operation-management/shop-list/index",
|
||||||
perms: "",
|
perms: "operation-management:shop-list:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-shopping-cart-full",
|
elIcon: "el-icon-shopping-cart-full",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -70,7 +70,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "品牌店铺",
|
name: "品牌店铺",
|
||||||
url: "operation-management/brand-store/index",
|
url: "operation-management/brand-store/index",
|
||||||
perms: "",
|
perms: "operation-management:brand-store:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-shopping-cart-full",
|
elIcon: "el-icon-shopping-cart-full",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -83,7 +83,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "品牌市场",
|
name: "品牌市场",
|
||||||
url: "operation-management/brand-market/index",
|
url: "operation-management/brand-market/index",
|
||||||
perms: "",
|
perms: "operation-management:brand-market:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-shopping-cart-full",
|
elIcon: "el-icon-shopping-cart-full",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -96,7 +96,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "分销商列表",
|
name: "分销商列表",
|
||||||
url: "operation-management/distributor/index",
|
url: "operation-management/distributor/index",
|
||||||
perms: "",
|
perms: "operation-management:distributor:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-shopping-cart-full",
|
elIcon: "el-icon-shopping-cart-full",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -109,7 +109,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "商品管理",
|
name: "商品管理",
|
||||||
url: "operation-management/commodity/index",
|
url: "operation-management/commodity/index",
|
||||||
perms: "",
|
perms: "operation-management:commodity:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-menu",
|
elIcon: "el-icon-menu",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -122,7 +122,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "总订单管理",
|
name: "总订单管理",
|
||||||
url: "operation-management/total-order/index",
|
url: "operation-management/total-order/index",
|
||||||
perms: "",
|
perms: "operation-management:total-order:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-menu",
|
elIcon: "el-icon-menu",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -136,7 +136,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "订单管理",
|
name: "订单管理",
|
||||||
url: "operation-management/order/index",
|
url: "operation-management/order/index",
|
||||||
perms: "",
|
perms: "operation-management:order:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-menu",
|
elIcon: "el-icon-menu",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -149,7 +149,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "订单管理",
|
name: "订单管理",
|
||||||
url: "operation-management/brand-order/index",
|
url: "operation-management/brand-order/index",
|
||||||
perms: "",
|
perms: "operation-management:brand-order:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-menu",
|
elIcon: "el-icon-menu",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -162,7 +162,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "轮播图管理",
|
name: "轮播图管理",
|
||||||
url: "operation-management/banner/index",
|
url: "operation-management/banner/index",
|
||||||
perms: "",
|
perms: "operation-management:banner:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-menu",
|
elIcon: "el-icon-menu",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -175,7 +175,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "购物须知管理",
|
name: "购物须知管理",
|
||||||
url: "operation-management/paynotice/index",
|
url: "operation-management/paynotice/index",
|
||||||
perms: "",
|
perms: "operation-management:paynotice:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-menu",
|
elIcon: "el-icon-menu",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -188,39 +188,39 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "公告管理",
|
name: "公告管理",
|
||||||
url: "operation-management/notice/index",
|
url: "operation-management/notice/index",
|
||||||
perms: "",
|
perms: "operation-management:notice:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-menu",
|
elIcon: "el-icon-menu",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
open: null,
|
open: null,
|
||||||
list: []
|
list: []
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
menuId: getUUID(),
|
// menuId: getUUID(),
|
||||||
parentId: 0,
|
// parentId: 0,
|
||||||
parentName: null,
|
// parentName: null,
|
||||||
name: "账号管理",
|
// name: "账号管理",
|
||||||
url: "operation-management/accountNumber/index",
|
// url: "operation-management/accountNumber/index",
|
||||||
perms: "",
|
// perms: "operation-management:accountNumber:index",
|
||||||
type: 1,
|
// type: 1,
|
||||||
elIcon: "el-icon-menu",
|
// elIcon: "el-icon-menu",
|
||||||
orderNum: 0,
|
// orderNum: 0,
|
||||||
open: null,
|
// open: null,
|
||||||
list: []
|
// list: []
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
menuId: getUUID(),
|
// menuId: getUUID(),
|
||||||
parentId: 0,
|
// parentId: 0,
|
||||||
parentName: null,
|
// parentName: null,
|
||||||
name: "角色管理",
|
// name: "角色管理",
|
||||||
url: "operation-management/role/index",
|
// url: "operation-management/role/index",
|
||||||
perms: "",
|
// perms: "operation-management:role:index",
|
||||||
type: 1,
|
// type: 1,
|
||||||
elIcon: "el-icon-user",
|
// elIcon: "el-icon-user",
|
||||||
orderNum: 0,
|
// orderNum: 0,
|
||||||
open: null,
|
// open: null,
|
||||||
list: []
|
// list: []
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -229,7 +229,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "数据中心",
|
name: "数据中心",
|
||||||
url: "datacenter",
|
url: "datacenter",
|
||||||
perms: "",
|
perms: "datacenter",
|
||||||
type: 0,
|
type: 0,
|
||||||
elIcon: "el-icon-tickets",
|
elIcon: "el-icon-tickets",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -241,7 +241,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "客户分析",
|
name: "客户分析",
|
||||||
url: "datacenter/customer-analysis/index",
|
url: "datacenter/customer-analysis/index",
|
||||||
perms: "",
|
perms: "datacenter:customer-analysis:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-user",
|
elIcon: "el-icon-user",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -254,7 +254,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "商品分析",
|
name: "商品分析",
|
||||||
url: "datacenter/product-analysis/index",
|
url: "datacenter/product-analysis/index",
|
||||||
perms: "",
|
perms: "datacenter:product-analysis:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-data-analysis",
|
elIcon: "el-icon-data-analysis",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -267,7 +267,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "订单统计分析",
|
name: "订单统计分析",
|
||||||
url: "datacenter/order-analysis/index",
|
url: "datacenter/order-analysis/index",
|
||||||
perms: "",
|
perms: "datacenter:order-analysis:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-shopping-cart-full",
|
elIcon: "el-icon-shopping-cart-full",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -282,7 +282,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "银行卡管理",
|
name: "银行卡管理",
|
||||||
url: "bank-card/index",
|
url: "bank-card/index",
|
||||||
perms: "",
|
perms: "bank-card:index",
|
||||||
type: 0,
|
type: 0,
|
||||||
elIcon: "el-icon-picture-outline",
|
elIcon: "el-icon-picture-outline",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -296,7 +296,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "品牌管理",
|
name: "品牌管理",
|
||||||
url: "brand",
|
url: "brand",
|
||||||
perms: "",
|
perms: "brand",
|
||||||
type: 0,
|
type: 0,
|
||||||
elIcon: "el-icon-money",
|
elIcon: "el-icon-money",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -308,7 +308,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "品牌管理",
|
name: "品牌管理",
|
||||||
url: "brand/config/index",
|
url: "brand/config/index",
|
||||||
perms: "",
|
perms: "brand:config:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-postcard",
|
elIcon: "el-icon-postcard",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -323,7 +323,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "优惠卷营销工具管理",
|
name: "优惠卷营销工具管理",
|
||||||
url: "coupon/index",
|
url: "coupon/index",
|
||||||
perms: "",
|
perms: "coupon:index",
|
||||||
type: 0,
|
type: 0,
|
||||||
elIcon: "el-icon-document-remove",
|
elIcon: "el-icon-document-remove",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -336,7 +336,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "预售营销工具管理",
|
name: "预售营销工具管理",
|
||||||
url: "presale",
|
url: "presale",
|
||||||
perms: "",
|
perms: "presale",
|
||||||
type: 0,
|
type: 0,
|
||||||
elIcon: "el-icon-data-analysis",
|
elIcon: "el-icon-data-analysis",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -348,7 +348,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "预售商品",
|
name: "预售商品",
|
||||||
url: "presale/products/index",
|
url: "presale/products/index",
|
||||||
perms: "",
|
perms: "presale:products:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-postcard",
|
elIcon: "el-icon-postcard",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -361,7 +361,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "预售订单",
|
name: "预售订单",
|
||||||
url: "presale/order/index",
|
url: "presale/order/index",
|
||||||
perms: "",
|
perms: "presale:order:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-postcard",
|
elIcon: "el-icon-postcard",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -376,7 +376,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "等级明细",
|
name: "等级明细",
|
||||||
url: "marketing-level/detail",
|
url: "marketing-level/detail",
|
||||||
perms: "",
|
perms: "marketing-level:detail",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-user",
|
elIcon: "el-icon-user",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -390,7 +390,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "会员营销工具管理",
|
name: "会员营销工具管理",
|
||||||
url: "marketing",
|
url: "marketing",
|
||||||
perms: "",
|
perms: "marketing",
|
||||||
type: 0,
|
type: 0,
|
||||||
elIcon: "el-icon-tickets",
|
elIcon: "el-icon-tickets",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -402,7 +402,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "等级设置",
|
name: "等级设置",
|
||||||
url: "marketing/level/index",
|
url: "marketing/level/index",
|
||||||
perms: "",
|
perms: "marketing:level:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-user",
|
elIcon: "el-icon-user",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -416,7 +416,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "会员列表",
|
name: "会员列表",
|
||||||
url: "marketing/user/index",
|
url: "marketing/user/index",
|
||||||
perms: "",
|
perms: "marketing:user:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-data-analysis",
|
elIcon: "el-icon-data-analysis",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -429,7 +429,7 @@ export default {
|
||||||
// parentName: null,
|
// parentName: null,
|
||||||
// name: "积分设置",
|
// name: "积分设置",
|
||||||
// url: "marketing/points-setting/index",
|
// url: "marketing/points-setting/index",
|
||||||
// perms: "",
|
// perms: "marketing:points-setting:index",
|
||||||
// type: 1,
|
// type: 1,
|
||||||
// elIcon: "el-icon-shopping-cart-full",
|
// elIcon: "el-icon-shopping-cart-full",
|
||||||
// orderNum: 0,
|
// orderNum: 0,
|
||||||
|
@ -442,7 +442,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "积分商品",
|
name: "积分商品",
|
||||||
url: "marketing/points-mall/index",
|
url: "marketing/points-mall/index",
|
||||||
perms: "",
|
perms: "marketing:points-mall:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-shopping-cart-full",
|
elIcon: "el-icon-shopping-cart-full",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -455,7 +455,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "积分订单",
|
name: "积分订单",
|
||||||
url: "marketing/points-order/index",
|
url: "marketing/points-order/index",
|
||||||
perms: "",
|
perms: "marketing:points-order:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-shopping-cart-full",
|
elIcon: "el-icon-shopping-cart-full",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -470,7 +470,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "代理商",
|
name: "代理商",
|
||||||
url: "agent",
|
url: "agent",
|
||||||
perms: "",
|
perms: "agent",
|
||||||
type: 0,
|
type: 0,
|
||||||
elIcon: "el-icon-tickets",
|
elIcon: "el-icon-tickets",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -482,7 +482,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "数据面板",
|
name: "数据面板",
|
||||||
url: "agent/data-panel/index",
|
url: "agent/data-panel/index",
|
||||||
perms: "",
|
perms: "agent:data-panel:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-user",
|
elIcon: "el-icon-user",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -495,7 +495,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "品牌管理",
|
name: "品牌管理",
|
||||||
url: "agent/brand/index",
|
url: "agent/brand/index",
|
||||||
perms: "",
|
perms: "agent:brand:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-data-analysis",
|
elIcon: "el-icon-data-analysis",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -508,7 +508,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "报表",
|
name: "报表",
|
||||||
url: "agent/report-form/index",
|
url: "agent/report-form/index",
|
||||||
perms: "",
|
perms: "agent:report-form:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-shopping-cart-full",
|
elIcon: "el-icon-shopping-cart-full",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -521,7 +521,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "权限管理",
|
name: "权限管理",
|
||||||
url: "agent/jurisdiction/index",
|
url: "agent/jurisdiction/index",
|
||||||
perms: "",
|
perms: "agent:jurisdiction:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-shopping-cart-full",
|
elIcon: "el-icon-shopping-cart-full",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -549,7 +549,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "我的钱包",
|
name: "我的钱包",
|
||||||
url: "wallet/index",
|
url: "wallet/index",
|
||||||
perms: "",
|
perms: "wallet:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-menu",
|
elIcon: "el-icon-menu",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -564,7 +564,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "运费管理",
|
name: "运费管理",
|
||||||
url: "ogistics-fare",
|
url: "ogistics-fare",
|
||||||
perms: "",
|
perms: "ogistics-fare",
|
||||||
type: 0,
|
type: 0,
|
||||||
elIcon: "el-icon-money",
|
elIcon: "el-icon-money",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -576,7 +576,7 @@ export default {
|
||||||
parentName: null,
|
parentName: null,
|
||||||
name: "运费模板",
|
name: "运费模板",
|
||||||
url: "logistics-fare/logistics-template/index",
|
url: "logistics-fare/logistics-template/index",
|
||||||
perms: "",
|
perms: "logistics-fare:logistics-template:index",
|
||||||
type: 1,
|
type: 1,
|
||||||
elIcon: "el-icon-postcard",
|
elIcon: "el-icon-postcard",
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
|
@ -591,7 +591,7 @@ export default {
|
||||||
// parentName: null,
|
// parentName: null,
|
||||||
// name: "会员管理",
|
// name: "会员管理",
|
||||||
// url: "member-management",
|
// url: "member-management",
|
||||||
// perms: "",
|
// perms: "member-management",
|
||||||
// type: 0,
|
// type: 0,
|
||||||
// elIcon: "el-icon-user-solid",
|
// elIcon: "el-icon-user-solid",
|
||||||
// orderNum: 0,
|
// orderNum: 0,
|
||||||
|
@ -603,7 +603,7 @@ export default {
|
||||||
// parentName: null,
|
// parentName: null,
|
||||||
// name: "等级设置",
|
// name: "等级设置",
|
||||||
// url: "member-management/level-setting/index",
|
// url: "member-management/level-setting/index",
|
||||||
// perms: "",
|
// perms: "member-management:level-setting:index",
|
||||||
// type: 1,
|
// type: 1,
|
||||||
// elIcon: "el-icon-star-on",
|
// elIcon: "el-icon-star-on",
|
||||||
// orderNum: 0,
|
// orderNum: 0,
|
||||||
|
@ -618,7 +618,7 @@ export default {
|
||||||
// parentName: null,
|
// parentName: null,
|
||||||
// name: "会员列表",
|
// name: "会员列表",
|
||||||
// url: "member-list",
|
// url: "member-list",
|
||||||
// perms: "",
|
// perms: "member-list",
|
||||||
// type: 0,
|
// type: 0,
|
||||||
// elIcon: "el-icon-user",
|
// elIcon: "el-icon-user",
|
||||||
// orderNum: 0,
|
// orderNum: 0,
|
||||||
|
@ -630,7 +630,7 @@ export default {
|
||||||
// parentName: null,
|
// parentName: null,
|
||||||
// name: "会员列表",
|
// name: "会员列表",
|
||||||
// url: "member-list/member-list/index",
|
// url: "member-list/member-list/index",
|
||||||
// perms: "",
|
// perms: "member-list:member-list:index",
|
||||||
// type: 1,
|
// type: 1,
|
||||||
// elIcon: "el-icon-user",
|
// elIcon: "el-icon-user",
|
||||||
// orderNum: 0,
|
// orderNum: 0,
|
||||||
|
|
|
@ -8,7 +8,7 @@ import Vue from "vue";
|
||||||
import Router from "vue-router";
|
import Router from "vue-router";
|
||||||
import http from "@/utils/httpRequest";
|
import http from "@/utils/httpRequest";
|
||||||
import { isURL } from "@/utils/validate";
|
import { isURL } from "@/utils/validate";
|
||||||
import { clearLoginInfo, getMenu } from "@/utils";
|
import { clearLoginInfo } from "@/utils";
|
||||||
import FULL_ROUTERS from "./full-routers";
|
import FULL_ROUTERS from "./full-routers";
|
||||||
import $api from "@/api/index.js";
|
import $api from "@/api/index.js";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
|
@ -25,20 +25,20 @@ const globalRoutes = [
|
||||||
path: "/404",
|
path: "/404",
|
||||||
component: _import("common/404"),
|
component: _import("common/404"),
|
||||||
name: "404",
|
name: "404",
|
||||||
meta: { title: "404未找到" }
|
meta: { title: "404未找到" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/login",
|
path: "/login",
|
||||||
component: _import("common/login"),
|
component: _import("common/login"),
|
||||||
name: "login",
|
name: "login",
|
||||||
meta: { title: "登录" }
|
meta: { title: "登录" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/test-member-detail",
|
path: "/test-member-detail",
|
||||||
component: _import("test-member-detail"),
|
component: _import("test-member-detail"),
|
||||||
name: "test-member-detail",
|
name: "test-member-detail",
|
||||||
meta: { title: "会员详情样式测试" }
|
meta: { title: "会员详情样式测试" },
|
||||||
}
|
},
|
||||||
//test用,会员管理
|
//test用,会员管理
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -58,20 +58,20 @@ const mainRoutes = {
|
||||||
path: "/home",
|
path: "/home",
|
||||||
component: _import("common/home"),
|
component: _import("common/home"),
|
||||||
name: "home",
|
name: "home",
|
||||||
meta: { title: "首页" }
|
meta: { title: "首页" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/theme",
|
path: "/theme",
|
||||||
component: _import("common/theme"),
|
component: _import("common/theme"),
|
||||||
name: "theme",
|
name: "theme",
|
||||||
meta: { title: "主题" }
|
meta: { title: "主题" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/demo-echarts",
|
path: "/demo-echarts",
|
||||||
component: _import("demo/echarts"),
|
component: _import("demo/echarts"),
|
||||||
name: "demo-echarts",
|
name: "demo-echarts",
|
||||||
meta: { title: "demo-echarts", isTab: true }
|
meta: { title: "demo-echarts", isTab: true },
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
beforeEnter(to, from, next) {
|
beforeEnter(to, from, next) {
|
||||||
let token = Vue.cookie.get("token");
|
let token = Vue.cookie.get("token");
|
||||||
|
@ -80,7 +80,7 @@ const mainRoutes = {
|
||||||
next({ name: "login" });
|
next({ name: "login" });
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const router = new Router({
|
const router = new Router({
|
||||||
|
@ -88,7 +88,7 @@ const router = new Router({
|
||||||
// mode:"history",
|
// mode:"history",
|
||||||
scrollBehavior: () => ({ y: 0 }),
|
scrollBehavior: () => ({ y: 0 }),
|
||||||
isAddDynamicMenuRoutes: false, // 是否已经添加动态(菜单)路由
|
isAddDynamicMenuRoutes: false, // 是否已经添加动态(菜单)路由
|
||||||
routes: globalRoutes.concat(mainRoutes)
|
routes: globalRoutes.concat(mainRoutes),
|
||||||
});
|
});
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
|
@ -104,47 +104,53 @@ router.beforeEach((to, from, next) => {
|
||||||
} else {
|
} else {
|
||||||
let loadingInstance = Loading.service({
|
let loadingInstance = Loading.service({
|
||||||
text: "正在初始化中...",
|
text: "正在初始化中...",
|
||||||
background: "rgba(255,255,255,0.7)"
|
background: "rgba(255,255,255,0.7)",
|
||||||
});
|
});
|
||||||
$api
|
$api
|
||||||
.getUserInfo()
|
.getUserInfo()
|
||||||
.then(async ({ data }) => {
|
.then(async ({ data }) => {
|
||||||
let permissionsData = getMenu(data.data.role, data.data.manageMode);
|
// 从后端获取的权限码 (只包含叶子节点)
|
||||||
if (permissionsData === null) {
|
const permissionCodes = data.data.permissions?.permissionCodes || [];
|
||||||
let res = await $api.role.getRoleList({ roleId: data.data.role });
|
|
||||||
permissionsData = res.data.data;
|
|
||||||
}
|
|
||||||
const filterTreeData = (data, permissions) => {
|
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
// return data; //临时性返回所有菜单方便调试
|
const filterTreeData = (menuData, permissions) => {
|
||||||
return data.reduce((filtered, node) => {
|
const result = [];
|
||||||
// 如果节点的权限在权限数组中
|
menuData.forEach((node) => {
|
||||||
if (permissions.includes(node.url)) {
|
// 检查当前节点是否为叶子节点
|
||||||
// 递归过滤子节点
|
const isLeaf = !node.list || node.list.length === 0;
|
||||||
const list = filterTreeData(node.list || [], permissions);
|
|
||||||
// 创建一个新的节点,包含过滤后的子节点
|
if (isLeaf) {
|
||||||
filtered.push({
|
// 如果是叶子节点,检查其权限是否存在于权限码中
|
||||||
...node,
|
if (permissions.includes(node.perms)) {
|
||||||
list
|
result.push({ ...node });
|
||||||
});
|
}
|
||||||
|
} else {
|
||||||
|
// 如果是父节点,递归过滤其子节点
|
||||||
|
const filteredChildren = filterTreeData(node.list, permissions);
|
||||||
|
// 如果过滤后的子节点列表不为空,则保留该父节点
|
||||||
|
if (filteredChildren.length > 0) {
|
||||||
|
result.push({
|
||||||
|
...node,
|
||||||
|
list: filteredChildren,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return filtered;
|
});
|
||||||
}, []);
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(data, "用户信息");
|
console.log(data, "用户信息");
|
||||||
sessionStorage.setItem("role", JSON.stringify(data.data.role));
|
sessionStorage.setItem("role", JSON.stringify(data.data.role));
|
||||||
if (data.data.markets?.length > 0) {
|
if (data.data.markets?.length > 0) {
|
||||||
// 存在多个市场
|
// 存在多个市场
|
||||||
$api.mer_admin
|
$api.mer_admin
|
||||||
.storeList({ marketId: data.data.markets[0].marketId })
|
.storeList({ marketId: data.data.markets[0].marketId })
|
||||||
.then(res => {
|
.then((res) => {
|
||||||
store.commit("userData/setState", {
|
store.commit("userData/setState", {
|
||||||
isMerchant: true,
|
isMerchant: true,
|
||||||
marketList: data.data.markets,
|
marketList: data.data.markets,
|
||||||
storeList: res.data.data,
|
storeList: res.data.data,
|
||||||
marketId: data.data.markets[0].marketId,
|
marketId: data.data.markets[0].marketId,
|
||||||
shopId: res.data.data[0].shopId
|
shopId: res.data.data[0].shopId,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
console.log(data.data.markets);
|
console.log(data.data.markets);
|
||||||
|
@ -156,7 +162,7 @@ router.beforeEach((to, from, next) => {
|
||||||
marketList: [],
|
marketList: [],
|
||||||
storeList: [],
|
storeList: [],
|
||||||
marketId: data.data.marketId,
|
marketId: data.data.marketId,
|
||||||
shopId: data.data.shopId
|
shopId: data.data.shopId,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
store.commit("userData/setState", {
|
store.commit("userData/setState", {
|
||||||
|
@ -164,7 +170,7 @@ router.beforeEach((to, from, next) => {
|
||||||
marketList: [],
|
marketList: [],
|
||||||
storeList: [],
|
storeList: [],
|
||||||
marketId: -1,
|
marketId: -1,
|
||||||
shopId: data.data.shopId
|
shopId: data.data.shopId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -174,28 +180,22 @@ router.beforeEach((to, from, next) => {
|
||||||
marketList: [],
|
marketList: [],
|
||||||
storeList: [],
|
storeList: [],
|
||||||
marketId: "",
|
marketId: "",
|
||||||
shopId: ""
|
shopId: "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
sessionStorage.setItem("userInfo", JSON.stringify(data.data));
|
sessionStorage.setItem("userInfo", JSON.stringify(data.data));
|
||||||
sessionStorage.setItem(
|
sessionStorage.setItem(
|
||||||
"permissions",
|
"permissions",
|
||||||
JSON.stringify(data.data.permissions || "[]")
|
JSON.stringify(permissionCodes || "[]")
|
||||||
);
|
);
|
||||||
//添加全量菜单,根据权限进行过滤
|
|
||||||
// let _menu = filterTreeData(
|
|
||||||
// FULL_ROUTERS.menuList,
|
|
||||||
// data.data.permissions
|
|
||||||
// );
|
|
||||||
console.log(permissionsData, "11111111111111111111111111111");
|
|
||||||
|
|
||||||
let _menu = filterTreeData(FULL_ROUTERS.menuList, permissionsData);
|
let _menu = filterTreeData(FULL_ROUTERS.menuList, permissionCodes);
|
||||||
fnAddDynamicMenuRoutes(_menu);
|
fnAddDynamicMenuRoutes(_menu);
|
||||||
sessionStorage.setItem("menuList", JSON.stringify(_menu));
|
sessionStorage.setItem("menuList", JSON.stringify(_menu));
|
||||||
router.options.isAddDynamicMenuRoutes = true;
|
router.options.isAddDynamicMenuRoutes = true;
|
||||||
next({ ...to, replace: true });
|
next({ ...to, replace: true });
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch((e) => {
|
||||||
sessionStorage.setItem("menuList", "[]");
|
sessionStorage.setItem("menuList", "[]");
|
||||||
sessionStorage.setItem("permissions", "[]");
|
sessionStorage.setItem("permissions", "[]");
|
||||||
console.log(
|
console.log(
|
||||||
|
@ -208,24 +208,6 @@ router.beforeEach((to, from, next) => {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loadingInstance.close();
|
loadingInstance.close();
|
||||||
});
|
});
|
||||||
// http({
|
|
||||||
// url: '/sys/menu/nav',
|
|
||||||
// method: 'get',
|
|
||||||
// params: http.adornParams()
|
|
||||||
// }).then(({ data }) => {
|
|
||||||
// if (data && data.code === 0) {
|
|
||||||
// // router.options.isAddDynamicMenuRoutes = true
|
|
||||||
// // sessionStorage.setItem('permissions', JSON.stringify(data.permissions || '[]'))
|
|
||||||
// next({ ...to, replace: true })
|
|
||||||
// } else {
|
|
||||||
// // sessionStorage.setItem('menuList', '[]')
|
|
||||||
// // sessionStorage.setItem('permissions', '[]')
|
|
||||||
// next()
|
|
||||||
// }
|
|
||||||
// }).catch((e) => {
|
|
||||||
// console.log(`%c${e} 请求菜单列表和权限失败,跳转至登录页!!`, 'color:blue')
|
|
||||||
// router.push({ name: 'login' })
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -270,8 +252,8 @@ function fnAddDynamicMenuRoutes(menuList = [], routes = []) {
|
||||||
isDynamic: true,
|
isDynamic: true,
|
||||||
isTab: true,
|
isTab: true,
|
||||||
iframeUrl: "",
|
iframeUrl: "",
|
||||||
isMicroApp: menuList[i].isMicroApp
|
isMicroApp: menuList[i].isMicroApp,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
// url以http[s]://开头, 通过iframe展示,或者启用microApp框架
|
// url以http[s]://开头, 通过iframe展示,或者启用microApp框架
|
||||||
if (isURL(menuList[i].url)) {
|
if (isURL(menuList[i].url)) {
|
||||||
|
|
|
@ -136,158 +136,6 @@ function doHandleMonth(month) {
|
||||||
}
|
}
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 权限
|
|
||||||
* @param {*} min
|
|
||||||
* @param {*} max
|
|
||||||
*/
|
|
||||||
export function getMenu(role, manageMode) {
|
|
||||||
if (role == "ROLE_MANAGER") {
|
|
||||||
return [
|
|
||||||
"operation-management",
|
|
||||||
"operation-management/commodity/index",
|
|
||||||
"operation-management/order/index",
|
|
||||||
"operation-management/banner/index",
|
|
||||||
"operation-management/notice/index",
|
|
||||||
"operation-management/paynotice/index",
|
|
||||||
"operation-management/role/index",
|
|
||||||
"datacenter",
|
|
||||||
"datacenter/customer-analysis/index",
|
|
||||||
"datacenter/product-analysis/index",
|
|
||||||
"datacenter/order-analysis/index",
|
|
||||||
"coupon/index",
|
|
||||||
"presale",
|
|
||||||
"presale/products/index",
|
|
||||||
"presale/order/index",
|
|
||||||
"marketing",
|
|
||||||
"marketing/level/index",
|
|
||||||
"marketing-level/detail",
|
|
||||||
"marketing/user/index",
|
|
||||||
"marketing/points-setting/index",
|
|
||||||
"marketing/points-mall/index",
|
|
||||||
"marketing/points-order/index",
|
|
||||||
// "member-management",
|
|
||||||
// "member-management/level-setting/index",
|
|
||||||
// "member-list",
|
|
||||||
// "member-list/member-list/index",
|
|
||||||
"local-course/resources",
|
|
||||||
"wallet/index",
|
|
||||||
"ogistics-fare",
|
|
||||||
"logistics-fare/logistics-template/index",
|
|
||||||
"bank-card/index",
|
|
||||||
"operation-management/total-order/index",
|
|
||||||
"operation-management/accountNumber/index"
|
|
||||||
];
|
|
||||||
} else if (role == "ROLE_MERCHANT") {
|
|
||||||
if (manageMode === 1) {
|
|
||||||
return [
|
|
||||||
"operation-management",
|
|
||||||
"operation-management/commodity/index",
|
|
||||||
"operation-management/order/index",
|
|
||||||
"operation-management/banner/index",
|
|
||||||
"operation-management/notice/index",
|
|
||||||
"operation-management/paynotice/index",
|
|
||||||
"operation-management/role/index",
|
|
||||||
"datacenter",
|
|
||||||
"datacenter/customer-analysis/index",
|
|
||||||
"datacenter/product-analysis/index",
|
|
||||||
"datacenter/order-analysis/index",
|
|
||||||
"coupon/index",
|
|
||||||
"presale",
|
|
||||||
"presale/products/index",
|
|
||||||
"presale/order/index",
|
|
||||||
"marketing",
|
|
||||||
"marketing/points-mall/index",
|
|
||||||
"marketing/points-order/index",
|
|
||||||
// "member-management",
|
|
||||||
// "member-management/level-setting/index",
|
|
||||||
// "member-list",
|
|
||||||
// "member-list/member-list/index",
|
|
||||||
"local-course/resources",
|
|
||||||
"wallet/index",
|
|
||||||
"ogistics-fare",
|
|
||||||
"logistics-fare/logistics-template/index",
|
|
||||||
"bank-card/index",
|
|
||||||
"operation-management/total-order/index",
|
|
||||||
"operation-management/accountNumber/index"
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
return [
|
|
||||||
"operation-management",
|
|
||||||
"operation-management/commodity/index",
|
|
||||||
"operation-management/order/index",
|
|
||||||
"operation-management/banner/index",
|
|
||||||
"operation-management/notice/index",
|
|
||||||
"operation-management/paynotice/index",
|
|
||||||
"operation-management/role/index",
|
|
||||||
"datacenter",
|
|
||||||
"datacenter/customer-analysis/index",
|
|
||||||
"datacenter/product-analysis/index",
|
|
||||||
"datacenter/order-analysis/index",
|
|
||||||
"coupon/index",
|
|
||||||
"presale",
|
|
||||||
"presale/products/index",
|
|
||||||
"presale/order/index",
|
|
||||||
"marketing",
|
|
||||||
"marketing/level/index",
|
|
||||||
"marketing-level/detail",
|
|
||||||
"marketing/user/index",
|
|
||||||
"marketing/points-setting/index",
|
|
||||||
"marketing/points-mall/index",
|
|
||||||
"marketing/points-order/index",
|
|
||||||
// "member-management",
|
|
||||||
// "member-management/level-setting/index",
|
|
||||||
// "member-list",
|
|
||||||
// "member-list/member-list/index",
|
|
||||||
"local-course/resources",
|
|
||||||
"wallet/index",
|
|
||||||
"ogistics-fare",
|
|
||||||
"logistics-fare/logistics-template/index",
|
|
||||||
"bank-card/index",
|
|
||||||
"operation-management/total-order/index",
|
|
||||||
"operation-management/accountNumber/index"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
} else if (role == "ROLE_BRAND_MANAGER") {
|
|
||||||
return [
|
|
||||||
"operation-management",
|
|
||||||
// "operation-management/shop-list/index",
|
|
||||||
"operation-management/brand-market/index",
|
|
||||||
"operation-management/brand-store/index",
|
|
||||||
"operation-management/distributor/index",
|
|
||||||
// "operation-management/order/index",
|
|
||||||
"operation-management/brand-order/index",
|
|
||||||
// "operation-management/role/index",
|
|
||||||
"datacenter",
|
|
||||||
"datacenter/customer-analysis/index",
|
|
||||||
"datacenter/product-analysis/index",
|
|
||||||
"datacenter/order-analysis/index",
|
|
||||||
"brand",
|
|
||||||
"brand/config/index",
|
|
||||||
"local-course/resources",
|
|
||||||
"wallet/index"
|
|
||||||
// "operation-management/accountNumber/index",
|
|
||||||
];
|
|
||||||
} else if (role == "ROLE_AGENT") {
|
|
||||||
return [
|
|
||||||
"operation-management",
|
|
||||||
"operation-management/shop-list/index",
|
|
||||||
"operation-management/market-list/index",
|
|
||||||
// "operation-management/order/index",
|
|
||||||
"operation-management/brand-order/index",
|
|
||||||
// "operation-management/role/index",
|
|
||||||
"datacenter",
|
|
||||||
"datacenter/customer-analysis/index",
|
|
||||||
"datacenter/product-analysis/index",
|
|
||||||
"datacenter/order-analysis/index",
|
|
||||||
"local-course/resources",
|
|
||||||
"wallet/index"
|
|
||||||
// "operation-management/accountNumber/index",
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function isNumberStr(str) {
|
export function isNumberStr(str) {
|
||||||
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str);
|
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str);
|
||||||
|
|
Loading…
Reference in New Issue