feat(m11): align role model with product definition (SALES/DELIVERY/LICENSE_OPS)

This commit is contained in:
2026-05-25 01:41:04 +08:00
parent d933639518
commit 1f599e5646
6 changed files with 87 additions and 122 deletions
@@ -124,17 +124,17 @@ onUnmounted(() => {
})
const menuItems = [
{ path: "/", icon: "📊", label: "首页", roles: ["SYS_ADMIN","DEVELOPER","OPS"] },
{ path: "/customers", icon: "👥", label: "客户管理", roles: ["SYS_ADMIN","DEVELOPER"] },
{ path: "/contracts", icon: "📋", label: "合同管理", roles: ["SYS_ADMIN","DEVELOPER"] },
{ path: "/deliveries", icon: "📦", label: "交付管理", roles: ["SYS_ADMIN","DEVELOPER"] },
{ path: "/licenses/sn", icon: "🔑", label: "许可 SN", roles: ["SYS_ADMIN","DEVELOPER"] },
{ path: "/licenses", icon: "🛡️", label: "许可证管理", badge: "NEW", roles: ["SYS_ADMIN","DEVELOPER"] },
{ path: "/callbacks", icon: "📨", label: "Callback 收件箱", roles: ["SYS_ADMIN","OPS"] },
{ path: "/integration/environments", icon: "🌐", label: "集成环境", roles: ["SYS_ADMIN","DEVELOPER","OPS"] },
{ path: "/integration/product-lines", icon: "📱", label: "产品线", roles: ["SYS_ADMIN","DEVELOPER","OPS"] },
{ path: "/devices", icon: "🖥️", label: "设备管理", roles: ["SYS_ADMIN","DEVELOPER"] },
{ path: "/todos", icon: "🔔", label: "待办中心", roles: ["SYS_ADMIN","DEVELOPER","OPS"] },
{ path: "/", icon: "📊", label: "首页", roles: ["SYS_ADMIN","SALES","LICENSE_OPS"] },
{ path: "/customers", icon: "👥", label: "客户管理", roles: ["SYS_ADMIN","SALES"] },
{ path: "/contracts", icon: "📋", label: "合同管理", roles: ["SYS_ADMIN","SALES"] },
{ path: "/deliveries", icon: "📦", label: "交付管理", roles: ["SYS_ADMIN","SALES","DELIVERY"] },
{ path: "/licenses/sn", icon: "🔑", label: "许可 SN", roles: ["SYS_ADMIN","SALES"] },
{ path: "/licenses", icon: "🛡️", label: "许可证管理", badge: "NEW", roles: ["SYS_ADMIN","SALES"] },
{ path: "/callbacks", icon: "📨", label: "Callback 收件箱", roles: ["SYS_ADMIN","LICENSE_OPS"] },
{ path: "/integration/environments", icon: "🌐", label: "集成环境", roles: ["SYS_ADMIN","SALES","LICENSE_OPS"] },
{ path: "/integration/product-lines", icon: "📱", label: "产品线", roles: ["SYS_ADMIN","SALES","LICENSE_OPS"] },
{ path: "/devices", icon: "🖥️", label: "设备管理", roles: ["SYS_ADMIN","SALES","DELIVERY"] },
{ path: "/todos", icon: "🔔", label: "待办中心", roles: ["SYS_ADMIN","SALES","LICENSE_OPS"] },
{ path: "/reports/contract-sn", icon: "📊", label: "报表中心", roles: ["SYS_ADMIN"] },
];
+26 -26
View File
@@ -12,79 +12,79 @@ const routes = [
path: "",
name: "home",
component: () => import("../views/HomeView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER", "OPS"] },
meta: { roles: ["SYS_ADMIN", "SALES", "LICENSE_OPS"] },
},
{
path: "customers/:id",
name: "customer-detail",
component: () => import("../views/CustomerDetailView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "客户详情" },
meta: { roles: ["SYS_ADMIN", "SALES"], title: "客户详情" },
},
{
path: "customers",
name: "customers",
component: () => import("../views/CustomersView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"] },
meta: { roles: ["SYS_ADMIN", "SALES"] },
},
{
path: "projects",
name: "projects",
component: () => import("../views/ProjectsView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"] },
meta: { roles: ["SYS_ADMIN", "SALES"] },
},
{
path: "deliveries/new",
name: "delivery-new",
component: () => import("../views/DeliveryBatchWizardView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "新建交付批次" },
meta: { roles: ["SYS_ADMIN", "SALES", "DELIVERY"], title: "新建交付批次" },
},
{
path: "deliveries/:id",
name: "delivery-detail",
component: () => import("../views/DeliveryBatchDetailView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "交付批次详情" },
meta: { roles: ["SYS_ADMIN", "SALES", "DELIVERY"], title: "交付批次详情" },
},
{
path: "deliveries",
name: "deliveries",
component: () => import("../views/DeliveriesView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "交付管理" },
meta: { roles: ["SYS_ADMIN", "SALES", "DELIVERY"], title: "交付管理" },
},
{
path: "licenses/sn/new",
name: "license-sn-new",
component: () => import("../views/LicenseSnWizardView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "新建许可 SN" },
meta: { roles: ["SYS_ADMIN", "SALES"], title: "新建许可 SN" },
},
{
path: "licenses/sn/:id",
name: "license-sn-detail",
component: () => import("../views/LicenseSnDetailView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "许可 SN 详情" },
meta: { roles: ["SYS_ADMIN", "SALES"], title: "许可 SN 详情" },
},
{
path: "licenses/sn",
name: "license-sn-list",
component: () => import("../views/LicenseSnListView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "许可 SN" },
meta: { roles: ["SYS_ADMIN", "SALES"], title: "许可 SN" },
},
{
path: "integration/environments",
name: "integration-environments",
component: () => import("../views/IntegrationEnvironmentsView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER", "OPS"], title: "集成环境" },
meta: { roles: ["SYS_ADMIN", "SALES", "LICENSE_OPS"], title: "集成环境" },
},
{
path: "integration/product-lines",
name: "integration-product-lines",
component: () => import("../views/IntegrationProductLinesView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER", "OPS"], title: "产品线" },
meta: { roles: ["SYS_ADMIN", "SALES", "LICENSE_OPS"], title: "产品线" },
},
{
path: "integration/id-mappings",
name: "integration-id-mappings",
component: () => import("../views/IntegrationIdMappingView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "ID 映射" },
meta: { roles: ["SYS_ADMIN", "SALES"], title: "ID 映射" },
},
{
path: "integration/json-templates",
@@ -96,61 +96,61 @@ const routes = [
path: "callbacks/:id",
name: "callback-inbox-detail",
component: () => import("../views/CallbackInboxDetailView.vue"),
meta: { roles: ["SYS_ADMIN", "OPS"], title: "Callback 详情" },
meta: { roles: ["SYS_ADMIN", "LICENSE_OPS"], title: "Callback 详情" },
},
{
path: "callbacks",
name: "callback-inbox",
component: () => import("../views/CallbackInboxView.vue"),
meta: { roles: ["SYS_ADMIN", "OPS"], title: "Callback 收件箱" },
meta: { roles: ["SYS_ADMIN", "LICENSE_OPS"], title: "Callback 收件箱" },
},
{
path: "contracts/new",
name: "contract-new",
component: () => import("../views/ContractWizardView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "新建合同" },
meta: { roles: ["SYS_ADMIN", "SALES"], title: "新建合同" },
},
{
path: "contracts/:id",
name: "contract-detail",
component: () => import("../views/ContractDetailView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "合同详情" },
meta: { roles: ["SYS_ADMIN", "SALES"], title: "合同详情" },
},
{
path: "contracts",
name: "contracts",
component: () => import("../views/ContractsView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "合同管理" },
meta: { roles: ["SYS_ADMIN", "SALES"], title: "合同管理" },
},
{
path: "license-compare",
name: "license-compare",
component: () => import("../views/LayoutCompareView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"] },
meta: { roles: ["SYS_ADMIN", "SALES"] },
},
{
path: "licenses",
name: "licenses",
component: () => import("../views/LicenseList.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "许可证管理" },
meta: { roles: ["SYS_ADMIN", "SALES"], title: "许可证管理" },
},
{
path: "devices/:id",
name: "device-detail",
component: () => import("../views/DeviceDetailView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER", "OPS"], title: "设备详情" },
meta: { roles: ["SYS_ADMIN", "SALES", "LICENSE_OPS", "DELIVERY"], title: "设备详情" },
},
{
path: "devices",
name: "devices",
component: () => import("../views/DeviceListView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER", "OPS"], title: "设备管理" },
meta: { roles: ["SYS_ADMIN", "SALES", "LICENSE_OPS", "DELIVERY"], title: "设备管理" },
},
{
path: "todos",
name: "todos",
component: () => import("../views/TodoCenterView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER", "OPS"], title: "待办中心" },
meta: { roles: ["SYS_ADMIN", "SALES", "LICENSE_OPS"], title: "待办中心" },
},
{
path: "notifications/settings",
@@ -162,19 +162,19 @@ const routes = [
path: "reports/contract-sn",
name: "contract-sn-report",
component: () => import("../views/ContractSnReportView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER"], title: "合同 SN 报表" },
meta: { roles: ["SYS_ADMIN", "SALES"], title: "合同 SN 报表" },
},
{
path: "reports/callback-stats",
name: "callback-stats",
component: () => import("../views/CallbackStatsView.vue"),
meta: { roles: ["SYS_ADMIN", "OPS"], title: "Callback 统计" },
meta: { roles: ["SYS_ADMIN", "LICENSE_OPS"], title: "Callback 统计" },
},
{
path: "profile",
name: "profile",
component: () => import("../views/ProfileView.vue"),
meta: { roles: ["SYS_ADMIN", "DEVELOPER", "OPS"], title: "个人设置" },
meta: { roles: ["SYS_ADMIN", "SALES", "LICENSE_OPS"], title: "个人设置" },
},
{
path: "reports/project-health",
+10 -10
View File
@@ -33,16 +33,16 @@ const pingLoading = ref(false);
/** I7:与 MainLayout / 路由 meta 一致 */
const allModuleLinks = [
{ to: "/customers", label: "客户", roles: ["SYS_ADMIN", "DEVELOPER"] },
{ to: "/projects", label: "项目", roles: ["SYS_ADMIN", "DEVELOPER"] },
{ to: "/contracts", label: "合同", roles: ["SYS_ADMIN", "DEVELOPER"] },
{ to: "/deliveries", label: "交付", roles: ["SYS_ADMIN", "DEVELOPER"] },
{ to: "/licenses/sn", label: "许可 SN", roles: ["SYS_ADMIN", "DEVELOPER"] },
{ to: "/callbacks", label: "Callback 收件箱", roles: ["SYS_ADMIN", "OPS"] },
{ to: "/integration/environments", label: "集成环境", roles: ["SYS_ADMIN", "DEVELOPER", "OPS"] },
{ to: "/integration/product-lines", label: "产品线", roles: ["SYS_ADMIN", "DEVELOPER", "OPS"] },
{ to: "/devices", label: "设备管理", roles: ["SYS_ADMIN", "DEVELOPER"] },
{ to: "/todos", label: "待办中心", roles: ["SYS_ADMIN", "DEVELOPER", "OPS"] },
{ to: "/customers", label: "客户", roles: ["SYS_ADMIN", "SALES"] },
{ to: "/projects", label: "项目", roles: ["SYS_ADMIN", "SALES"] },
{ to: "/contracts", label: "合同", roles: ["SYS_ADMIN", "SALES"] },
{ to: "/deliveries", label: "交付", roles: ["SYS_ADMIN", "SALES", "DELIVERY"] },
{ to: "/licenses/sn", label: "许可 SN", roles: ["SYS_ADMIN", "SALES"] },
{ to: "/callbacks", label: "Callback 收件箱", roles: ["SYS_ADMIN", "LICENSE_OPS"] },
{ to: "/integration/environments", label: "集成环境", roles: ["SYS_ADMIN", "SALES", "LICENSE_OPS"] },
{ to: "/integration/product-lines", label: "产品线", roles: ["SYS_ADMIN", "SALES", "LICENSE_OPS"] },
{ to: "/devices", label: "设备管理", roles: ["SYS_ADMIN", "SALES", "DELIVERY"] },
{ to: "/todos", label: "待办中心", roles: ["SYS_ADMIN", "SALES", "LICENSE_OPS"] },
{ to: "/reports/contract-sn", label: "报表中心", roles: ["SYS_ADMIN"] },
];