mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 08:29:20 +08:00
小修小补
This commit is contained in:
@@ -6,11 +6,11 @@ import type {
|
||||
import { generateAccessible } from '@vben/access';
|
||||
import { preferences } from '@vben/preferences';
|
||||
|
||||
import { message } from 'ant-design-vue';
|
||||
// import { message } from 'ant-design-vue';
|
||||
|
||||
import { getAllMenusApi } from '#/api';
|
||||
// import { getAllMenusApi } from '#/api';
|
||||
import { BasicLayout, IFrameView } from '#/layouts';
|
||||
import { $t } from '#/locales';
|
||||
// import { $t } from '#/locales';
|
||||
|
||||
const forbiddenComponent = () => import('#/views/_core/fallback/forbidden.vue');
|
||||
|
||||
@@ -24,13 +24,13 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) {
|
||||
|
||||
return await generateAccessible(preferences.app.accessMode, {
|
||||
...options,
|
||||
fetchMenuListAsync: async () => {
|
||||
message.loading({
|
||||
content: `${$t('common.loadingMenu')}...`,
|
||||
duration: 1.5,
|
||||
});
|
||||
return await getAllMenusApi();
|
||||
},
|
||||
// fetchMenuListAsync: async () => {
|
||||
// message.loading({
|
||||
// content: `${$t('common.loadingMenu')}...`,
|
||||
// duration: 1.5,
|
||||
// });
|
||||
// return await getAllMenusApi();
|
||||
// },
|
||||
// 可以指定没有权限跳转403页面
|
||||
forbiddenComponent,
|
||||
// 如果 route.meta.menuVisibleWithForbidden = true
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import { $t } from '#/locales';
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
meta: {
|
||||
icon: 'lucide:shopping-cart',
|
||||
order: 1,
|
||||
title: '电商数据中台',
|
||||
title: '数据中台',
|
||||
},
|
||||
name: 'Ecommerce',
|
||||
path: '/ecommerce',
|
||||
@@ -30,24 +28,6 @@ const routes: RouteRecordRaw[] = [
|
||||
title: '数据分析',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'ShopManagement',
|
||||
path: '/shop-management',
|
||||
component: () => import('#/views/ecommerce/shop-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:store',
|
||||
title: '店铺管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'ProductManagement',
|
||||
path: '/product-management',
|
||||
component: () => import('#/views/ecommerce/product-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:package',
|
||||
title: '商品管理',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
meta: {
|
||||
icon: 'lucide:building-2',
|
||||
order: 200,
|
||||
title: '组织管理',
|
||||
},
|
||||
name: 'Organization',
|
||||
path: '/organization',
|
||||
children: [
|
||||
{
|
||||
name: 'CompanyManagement',
|
||||
path: '/organization/company-management',
|
||||
component: () => import('#/views/organization/company-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:building',
|
||||
title: '公司管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'DepartmentManagement',
|
||||
path: '/organization/department-management',
|
||||
component: () => import('#/views/organization/department-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:users',
|
||||
title: '部门管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'PositionManagement',
|
||||
path: '/organization/position-management',
|
||||
component: () => import('#/views/organization/position-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:briefcase',
|
||||
title: '岗位管理',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default routes;
|
||||
@@ -0,0 +1,53 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
meta: {
|
||||
icon: 'lucide:store',
|
||||
order: 50,
|
||||
title: '店铺管理',
|
||||
},
|
||||
name: 'Shop',
|
||||
path: '/shop',
|
||||
children: [
|
||||
{
|
||||
name: 'ShopManagement',
|
||||
path: '/shop/shop-management',
|
||||
component: () => import('#/views/shop/shop-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:store',
|
||||
title: '店铺管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'ProductManagement',
|
||||
path: '/shop/product-management',
|
||||
component: () => import('#/views/shop/product-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:package',
|
||||
title: '商品管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'OrderManagement',
|
||||
path: '/shop/order-management',
|
||||
component: () => import('#/views/shop/order-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:shopping-cart',
|
||||
title: '订单管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'OrderStatusManagement',
|
||||
path: '/shop/order-status-management',
|
||||
component: () => import('#/views/shop/order-status-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:list-checks',
|
||||
title: '订单状态管理',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default routes;
|
||||
@@ -4,7 +4,7 @@ const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
meta: {
|
||||
icon: 'lucide:settings',
|
||||
order: 100,
|
||||
order: 999,
|
||||
title: '系统管理',
|
||||
},
|
||||
name: 'System',
|
||||
@@ -13,7 +13,7 @@ const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
name: 'MenuManagement',
|
||||
path: '/system/menu-management',
|
||||
component: () => import('#/views/_core/system/menu-management/index.vue'),
|
||||
component: () => import('#/views/system/menu-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:menu',
|
||||
title: '菜单管理',
|
||||
@@ -21,44 +21,6 @@ const routes: RouteRecordRaw[] = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
meta: {
|
||||
icon: 'lucide:building-2',
|
||||
order: 200,
|
||||
title: '组织管理',
|
||||
},
|
||||
name: 'Organization',
|
||||
path: '/organization',
|
||||
children: [
|
||||
{
|
||||
name: 'CompanyManagement',
|
||||
path: '/organization/company-management',
|
||||
component: () => import('#/views/_core/organization/company-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:building',
|
||||
title: '公司管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'DepartmentManagement',
|
||||
path: '/organization/department-management',
|
||||
component: () => import('#/views/_core/organization/department-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:users',
|
||||
title: '部门管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'PositionManagement',
|
||||
path: '/organization/position-management',
|
||||
component: () => import('#/views/_core/organization/position-management/index.vue'),
|
||||
meta: {
|
||||
icon: 'lucide:briefcase',
|
||||
title: '岗位管理',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default routes;
|
||||
|
||||
Reference in New Issue
Block a user