// Ai-DOP 业务规划菜单种子(由 ai-dop-platform/tools/gen_aidop_menu.py 生成) namespace Admin.NET.Plugin.AiDOP; /// /// Ai-DOP 规划菜单;类名须为 SysMenuSeedData,以便租户默认菜单聚合所有程序集种子。 /// [IncreSeed] public class SysMenuSeedData : ISqlSugarEntitySeedData { private const long AidopRootId = 1320990000101L; /// public IEnumerable HasData() { var ct = DateTime.Parse("2022-02-10 00:00:00"); var list = new List { new() { Id = AidopRootId, Pid = 0, Title = "Ai-DOP", Path = "/aidop", Name = "aidopRoot", Component = "Layout", Icon = "ele-Grid", Type = MenuTypeEnum.Dir, CreateTime = ct, OrderNo = 250, Remark = "Ai-DOP 主菜单(规划项,叶子为占位页)" } }; var dirSeq = 0; var menuSeq = 0; foreach (var mod in ModuleDefinitions) { dirSeq++; var dirId = 1321000000000L + dirSeq * 1000L; var modCode = mod.Code; var codeLower = mod.Code.ToLowerInvariant(); list.Add(new SysMenu { Id = dirId, Pid = AidopRootId, Title = mod.L1, Path = $"/aidop/{codeLower}", Name = $"aidopDir{mod.Code}", Component = "Layout", Icon = "ele-Folder", Type = MenuTypeEnum.Dir, CreateTime = ct, OrderNo = 260 + dirSeq }); var subOrder = 100; var idx = 0; foreach (var leaf in mod.Leaves) { menuSeq++; idx++; var isDir = DirOverrides.Contains((modCode, idx)); var component = isDir ? "Layout" : ResolveComponent(modCode, idx); var menuType = isDir ? MenuTypeEnum.Dir : MenuTypeEnum.Menu; var path = PathOverrides.TryGetValue((modCode, idx), out var pathOv) ? pathOv : $"/aidop/{codeLower}/{idx:000}"; var routeName = NameOverrides.TryGetValue((modCode, idx), out var nameOv) ? nameOv : $"aidop{mod.Code}{idx:000}"; list.Add(new SysMenu { Id = 1322000000000L + menuSeq, Pid = dirId, Title = leaf.Title, Path = path, Name = routeName, Component = component, Type = menuType, CreateTime = ct, OrderNo = subOrder++, Icon = isDir ? "ele-Folder" : "ele-Document", Remark = BuildRemark(mod.Code, leaf) }); } } foreach (var m in BuildAidopSmartOpsSeedMenus(ct)) list.Add(m); foreach (var m in BuildS0SalesMenus(ct)) list.Add(m); foreach (var m in BuildS0SupplyMenus(ct)) list.Add(m); foreach (var m in BuildS0ManufacturingMenus(ct)) list.Add(m); foreach (var m in BuildS0QualityMenus(ct)) list.Add(m); foreach (var m in BuildS0WarehouseMenus(ct)) list.Add(m); foreach (var m in BuildS1OrderWorkOrderMenus(ct)) list.Add(m); foreach (var m in BuildS1SalesKanbanMenus(ct)) list.Add(m); foreach (var m in BuildS8CollaborationMenus(ct)) list.Add(m); // 产销协同看板改为目录后,访问 /aidop/s1/SalesKanBan 默认进入指标看板子页 var salesKanBanDir = list.FirstOrDefault(x => x.Id == 1322000000005L); if (salesKanBanDir != null) salesKanBanDir.Redirect = "/aidop/s1/SalesKanBan/kanban"; // S8:复用自动生成的首项菜单位,直接作为「异常监控看板」页,避免再出现中间层「异常管理」目录 var s8Dashboard = list.FirstOrDefault(x => x.Id == 1322000000028L); if (s8Dashboard != null) { s8Dashboard.Title = "异常监控看板"; s8Dashboard.Path = "/aidop/s8/dashboard"; s8Dashboard.Name = "aidopS8Dashboard"; s8Dashboard.Component = "/aidop/s8/dashboard/S8DashboardPage"; s8Dashboard.Icon = "ele-DataBoard"; s8Dashboard.Type = MenuTypeEnum.Menu; s8Dashboard.Redirect = null; s8Dashboard.Remark = "S8 异常监控看板"; } return list; } /// /// 智慧诊断 + 智慧运营看板(入库,便于平台「菜单管理」配置;勿在 Web aidopMenuDisplay 再注入整段菜单)。 /// private static IEnumerable BuildAidopSmartOpsSeedMenus(DateTime ct) { const long smartOpsDirId = 1320990000200L; yield return new SysMenu { Id = 1320990000201L, Pid = AidopRootId, Title = "智慧诊断", Path = "/aidop/smart-diagnosis", Name = "aidopSmartDiagnosis", Component = "/aidop/diagnosis/index", Icon = "ele-TrendCharts", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 251, Remark = "Ai-DOP 智慧诊断" }; yield return new SysMenu { Id = smartOpsDirId, Pid = AidopRootId, Title = "智慧运营看板", Path = "/aidop/smart-ops", Name = "aidopSmartOpsRoot", Component = "Layout", Icon = "ele-DataBoard", Type = MenuTypeEnum.Dir, CreateTime = ct, OrderNo = 252, Remark = "Ai-DOP 智慧运营看板分组" }; // OrderNo:建模紧接九宫格之后,避免在侧栏最底部不易发现;已落库环境需在菜单管理调序或改库 var children = new (long Id, string Path, string Name, string Title, string Component, int Order)[] { (1320990000301L, "/aidop/smart-ops/grid", "aidopSmartOpsGrid", "九宫格智慧运营看板", "/dashboard/home", 100), (1320990000311L, "/aidop/smart-ops/modeling", "aidopSmartOpsModeling", "运营指标建模", "/aidop/kanban/s0", 105), (1320990000312L, "/aidop/smart-ops/kpi-master", "aidopSmartOpsKpiMaster", "运营指标主数据", "/aidop/kanban/kpiMaster", 106), (1320990000302L, "/aidop/smart-ops/s1", "aidopSmartOpsS1", "S1产销协同看板", "/aidop/kanban/s1", 110), (1320990000303L, "/aidop/smart-ops/s2", "aidopSmartOpsS2", "S2制造协同看板", "/aidop/kanban/s2", 120), (1320990000304L, "/aidop/smart-ops/s3", "aidopSmartOpsS3", "S3供应协同看板", "/aidop/kanban/s3", 130), (1320990000305L, "/aidop/smart-ops/s4", "aidopSmartOpsS4", "S4采购执行看板", "/aidop/kanban/s4", 140), (1320990000306L, "/aidop/smart-ops/s5", "aidopSmartOpsS5", "S5物料仓储看板", "/aidop/kanban/s5", 150), (1320990000307L, "/aidop/smart-ops/s6", "aidopSmartOpsS6", "S6生产执行看板", "/aidop/kanban/s6", 160), (1320990000308L, "/aidop/smart-ops/s7", "aidopSmartOpsS7", "S7成品仓储看板", "/aidop/kanban/s7", 170), (1320990000309L, "/aidop/smart-ops/s8", "aidopSmartOpsS8", "S8异常监控看板", "/aidop/kanban/s8", 180), (1320990000310L, "/aidop/smart-ops/s9", "aidopSmartOpsS9", "S9运营指标看板", "/aidop/kanban/s9", 190), }; foreach (var (id, path, name, title, component, order) in children) { yield return new SysMenu { Id = id, Pid = smartOpsDirId, Title = title, Path = path, Name = name, Component = component, Icon = "ele-DataAnalysis", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = order, Remark = title }; } } private static string ResolveComponent(string modCode, int leafIndex) => ComponentOverrides.TryGetValue((modCode, leafIndex), out var c) ? c : "/aidop/planning/index"; private static readonly Dictionary<(string Mod, int Leaf), string> ComponentOverrides = new() { { ("S1", 3), "/aidop/kanban/s1" }, }; /// S1 等模块下叶子菜单 path 覆盖(目录化后使用语义路径)。 private static readonly Dictionary<(string Mod, int Leaf), string> PathOverrides = new() { { ("S1", 1), "/aidop/s1/order-mgmt" }, { ("S1", 2), "/aidop/s1/workorder-mgmt" }, { ("S1", 3), "/aidop/s1/SalesKanBan" }, }; /// S1 等模块下叶子菜单 route name 覆盖。 private static readonly Dictionary<(string Mod, int Leaf), string> NameOverrides = new() { { ("S1", 1), "aidopS1OrderMgmt" }, { ("S1", 2), "aidopS1WorkOrderMgmt" }, }; /// /// 需要从 Menu 提升为 Dir(目录)的叶子节点;用于承载子级菜单。 /// private static readonly HashSet<(string Mod, int Leaf)> DirOverrides = new() { { ("S0", 1) }, // 数据建模 → 目录,产销建模挂在其下 { ("S1", 1) }, // 订单管理 → 目录(销售订单、合同评审) { ("S1", 2) }, // 工单管理 → 目录(工单列表、工单下达) { ("S1", 3) }, // 产销协同看板 → 目录(指标看板、需求明细核验) }; private static string BuildRemark(string code, (string Title, string Desc, string Complexity, string Days, string Note) leaf) { var notePart = string.IsNullOrWhiteSpace(leaf.Note) ? "" : $" | {leaf.Note}"; var s = $"[{code}|{leaf.Complexity}|{leaf.Days}人天] {leaf.Desc}{notePart}"; return s.Length <= 256 ? s : s[..256]; } private static IEnumerable BuildS0SalesMenus(DateTime ct) { // 与 ModuleDefinitions 中 S0 首项「数据建模」的生成 Id 一致(全局 menuSeq=1 → 1322000000001) const long s0DataModelingMenuId = 1322000000001L; const long subDirId = 1329002000000L; yield return new SysMenu { Id = subDirId, Pid = s0DataModelingMenuId, Title = "产销建模", Path = "/aidop/s0/sales", Name = "aidopS0Sales", Component = "Layout", Icon = "ele-ShoppingCart", Type = MenuTypeEnum.Dir, CreateTime = ct, OrderNo = 20, Remark = "S0 产销建模" }; yield return new SysMenu { Id = subDirId + 1, Pid = subDirId, Title = "客户管理", Path = "/aidop/s0/sales/customer", Name = "aidopS0SalesCustomer", Component = "/aidop/s0/sales/CustomerList", Icon = "ele-User", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 1, Remark = "S0 客户管理" }; yield return new SysMenu { Id = subDirId + 2, Pid = subDirId, Title = "物料管理", Path = "/aidop/s0/sales/material", Name = "aidopS0SalesMaterial", Component = "/aidop/s0/sales/MaterialList", Icon = "ele-Box", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 2, Remark = "S0 物料管理" }; yield return new SysMenu { Id = subDirId + 3, Pid = subDirId, Title = "订单优先规则", Path = "/aidop/s0/sales/order-priority-rule", Name = "aidopS0SalesOrderPriorityRule", Component = "/aidop/s0/sales/OrderPriorityRuleList", Icon = "ele-Sort", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 3, Remark = "S0 订单优先规则" }; yield return new SysMenu { Id = subDirId + 4, Pid = subDirId, Title = "合同评审周期", Path = "/aidop/s0/sales/contract-review-cycle", Name = "aidopS0SalesContractReviewCycle", Component = "/aidop/s0/sales/ContractReviewCycleList", Icon = "ele-Clock", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 4, Remark = "S0 合同评审周期标准配置" }; yield return new SysMenu { Id = subDirId + 5, Pid = subDirId, Title = "产品设计周期", Path = "/aidop/s0/sales/product-design-cycle", Name = "aidopS0SalesProductDesignCycle", Component = "/aidop/s0/sales/ProductDesignCycleList", Icon = "ele-Timer", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 5, Remark = "S0 产品设计周期标准配置" }; yield return new SysMenu { Id = subDirId + 6, Pid = subDirId, Title = "订单评审周期", Path = "/aidop/s0/sales/order-review-cycle", Name = "aidopS0SalesOrderReviewCycle", Component = "/aidop/s0/sales/OrderReviewCycleList", Icon = "ele-AlarmClock", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 6, Remark = "S0 订单评审周期标准配置" }; } private static IEnumerable BuildS0ManufacturingMenus(DateTime ct) { const long s0DataModelingMenuId = 1322000000001L; const long subDirId = 1329003000000L; yield return new SysMenu { Id = subDirId, Pid = s0DataModelingMenuId, Title = "制造建模", Path = "/aidop/s0/manufacturing", Name = "aidopS0Manufacturing", Component = "Layout", Icon = "ele-SetUp", Type = MenuTypeEnum.Dir, CreateTime = ct, OrderNo = 30, Remark = "S0 制造建模" }; var leaves = new (long IdOff, string Path, string Name, string Title, string Component, int Order)[] { (1, "/aidop/s0/manufacturing/standard-bom", "aidopS0MfgStandardBom", "标准 BOM", "/aidop/s0/manufacturing/StandardBomManagement", 10), (2, "/aidop/s0/manufacturing/standard-operation", "aidopS0MfgStandardOperation", "标准工序", "/aidop/s0/manufacturing/StandardProcessList", 20), (3, "/aidop/s0/manufacturing/production-line", "aidopS0MfgProductionLine", "产线", "/aidop/s0/manufacturing/ProductionLineList", 30), (4, "/aidop/s0/manufacturing/routing", "aidopS0MfgRouting", "工艺路线", "/aidop/s0/manufacturing/RoutingList", 40), (5, "/aidop/s0/manufacturing/material-substitution", "aidopS0MfgMaterialSubstitution", "物料替代", "/aidop/s0/manufacturing/MaterialSubstitutionList", 50), (6, "/aidop/s0/manufacturing/work-order-control", "aidopS0MfgWorkOrderControl", "工单控制参数", "/aidop/s0/manufacturing/WorkOrderControlParams", 60), (7, "/aidop/s0/manufacturing/person-skill", "aidopS0MfgPersonSkill", "人员技能", "/aidop/s0/manufacturing/PersonnelSkillList", 70), (8, "/aidop/s0/manufacturing/person-skill-assignment", "aidopS0MfgPersonSkillAssignment", "人员技能维护", "/aidop/s0/manufacturing/PersonSkillAssignmentList", 80), (9, "/aidop/s0/manufacturing/line-post", "aidopS0MfgLinePost", "产线岗位维护", "/aidop/s0/manufacturing/LinePostList", 90), (10, "/aidop/s0/manufacturing/work-center", "aidopS0MfgWorkCenter", "工作中心", "/aidop/s0/manufacturing/WorkCenterList", 100), (11, "/aidop/s0/manufacturing/line-material", "aidopS0MfgLineMaterial", "线边物料", "/aidop/s0/manufacturing/LineMaterialList", 110), (12, "/aidop/s0/manufacturing/element-param-production", "aidopS0MfgElementParamProduction", "生产要素参数", "/aidop/s0/manufacturing/ProductionElementParamList", 120), (13, "/aidop/s0/manufacturing/material-process-element", "aidopS0MfgMaterialProcessElement", "物料工艺要素", "/aidop/s0/manufacturing/MaterialProcessElementList", 130), (14, "/aidop/s0/manufacturing/preprocess-element", "aidopS0MfgPreprocessElement", "前处理要素", "/aidop/s0/manufacturing/PreprocessElementList", 140), (15, "/aidop/s0/manufacturing/preprocess-element-param", "aidopS0MfgElementParamPreprocess", "前处理要素参数", "/aidop/s0/manufacturing/PreprocessElementParamList", 150), (16, "/aidop/s0/manufacturing/sop-file-type", "aidopS0MfgSopFileType", "SOP 文件类型", "/aidop/s0/manufacturing/SopFileTypeList", 160), (17, "/aidop/s0/manufacturing/sop-document", "aidopS0MfgSopDocument", "SOP 维护", "/aidop/s0/manufacturing/SopMaintenanceList", 170), }; foreach (var (idOff, path, name, title, component, order) in leaves) { yield return new SysMenu { Id = subDirId + idOff, Pid = subDirId, Title = title, Path = path, Name = name, Component = component, Icon = "ele-Document", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = order, Remark = $"S0 {title}" }; } yield return new SysMenu { Id = subDirId + 18, Pid = subDirId, Title = "选择替代方案", Path = "/aidop/s0/manufacturing/substitute-scheme-select", Name = "aidopS0MfgSubstituteSchemeSelect", Component = "/aidop/s0/manufacturing/SubstituteSchemeSelectList", Icon = "ele-List", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 18, Remark = "S0 选择替代方案(只读查询)" }; } private static IEnumerable BuildS0SupplyMenus(DateTime ct) { const long s0DataModelingMenuId = 1322000000001L; const long subDirId = 1329004000000L; yield return new SysMenu { Id = subDirId, Pid = s0DataModelingMenuId, Title = "供应建模", Path = "/aidop/s0/supply", Name = "aidopS0Supply", Component = "Layout", Icon = "ele-Ship", Type = MenuTypeEnum.Dir, CreateTime = ct, OrderNo = 40, Remark = "S0 供应建模" }; yield return new SysMenu { Id = subDirId + 1, Pid = subDirId, Title = "供应商维护", Path = "/aidop/s0/supply/supplier", Name = "aidopS0SupplySupplier", Component = "/aidop/s0/supply/SupplierList", Icon = "ele-UserFilled", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 1, Remark = "S0 供应商维护" }; yield return new SysMenu { Id = subDirId + 2, Pid = subDirId, Title = "货源清单", Path = "/aidop/s0/supply/sourcing-item", Name = "aidopS0SupplySourcingItem", Component = "/aidop/s0/supply/SourcingList", Icon = "ele-List", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 2, Remark = "S0 货源清单(srm_purchase)" }; } private static IEnumerable BuildS0QualityMenus(DateTime ct) { const long s0DataModelingMenuId = 1322000000001L; const long subDirId = 1329004500000L; yield return new SysMenu { Id = subDirId, Pid = s0DataModelingMenuId, Title = "质量建模", Path = "/aidop/s0/quality", Name = "aidopS0Quality", Component = "Layout", Icon = "ele-DataAnalysis", Type = MenuTypeEnum.Dir, CreateTime = ct, OrderNo = 45, Remark = "S0 质量建模" }; var leaves = new (long IdOff, string Path, string Name, string Title, string Component, int Order)[] { (1, "/aidop/s0/quality/dictionary", "aidopS0QlyDictionary", "质量字典", "/aidop/s0/quality/QualityDictionaryPage", 10), (2, "/aidop/s0/quality/raw-whitelist", "aidopS0QlyRawWhitelist", "原材料白名单", "/aidop/s0/quality/RawWhitelistList", 20), (3, "/aidop/s0/quality/sampling-scheme", "aidopS0QlySamplingScheme", "抽样方案", "/aidop/s0/quality/SamplingSchemeList", 30), (4, "/aidop/s0/quality/instrument", "aidopS0QlyInstrument", "检验仪器", "/aidop/s0/quality/InspectionInstrumentList", 40), (5, "/aidop/s0/quality/inspection-method", "aidopS0QlyInspectionMethod", "检验方法", "/aidop/s0/quality/InspectionMethodList", 50), (6, "/aidop/s0/quality/inspection-basis", "aidopS0QlyInspectionBasis", "检验依据", "/aidop/s0/quality/InspectionBasisList", 60), (7, "/aidop/s0/quality/inspection-standard", "aidopS0QlyInspectionStandard", "检验标准", "/aidop/s0/quality/InspectionStandardList", 70), (8, "/aidop/s0/quality/inspection-item", "aidopS0QlyInspectionItem", "检验项目", "/aidop/s0/quality/InspectionItemList", 80), (9, "/aidop/s0/quality/inspection-frequency", "aidopS0QlyInspectionFrequency", "检验频率", "/aidop/s0/quality/InspectionFrequencyList", 90), (10, "/aidop/s0/quality/inspection-plan", "aidopS0QlyInspectionPlan", "检验方案", "/aidop/s0/quality/InspectionPlanList", 100), (11, "/aidop/s0/quality/raw-inspection-spec", "aidopS0QlyRawInspectionSpec", "原材料检验规范", "/aidop/s0/quality/RawInspectionSpecList", 110), (12, "/aidop/s0/quality/process-inspection-spec", "aidopS0QlyProcessInspectionSpec", "过程检验规范", "/aidop/s0/quality/ProcessInspectionSpecList", 120), }; foreach (var (idOff, path, name, title, component, order) in leaves) { yield return new SysMenu { Id = subDirId + idOff, Pid = subDirId, Title = title, Path = path, Name = name, Component = component, Icon = "ele-Document", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = order, Remark = $"S0 {title}" }; } } /// /// S8 异常协同:直接挂在「S8 异常监控」目录下,不再经过中间层「异常管理」。 /// private static IEnumerable BuildS8CollaborationMenus(DateTime ct) { const long s8DirId = 1321000009000L; const long baseId = 1329008000000L; const long s8MonitoringDirId = 1329008000020L; // 异常监控子模块(专题大屏占位,后续接业务数据) yield return new SysMenu { Id = s8MonitoringDirId, Pid = s8DirId, Title = "异常监控", Path = "/aidop/s8/monitoring", Name = "aidopS8MonitoringDir", Component = "Layout", Redirect = "/aidop/s8/monitoring/overview", Icon = "ele-Monitor", Type = MenuTypeEnum.Dir, CreateTime = ct, OrderNo = 8, Remark = "S8 异常监控子模块" }; yield return new SysMenu { Id = s8MonitoringDirId + 1, Pid = s8MonitoringDirId, Title = "异常监控大屏", Path = "/aidop/s8/monitoring/overview", Name = "aidopS8MonitoringOverview", Component = "/aidop/s8/monitoring/S8MonitoringOverviewPage", Icon = "ele-DataBoard", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 10, Remark = "S8 异常监控大屏(占位)" }; yield return new SysMenu { Id = s8MonitoringDirId + 2, Pid = s8MonitoringDirId, Title = "交付异常大屏", Path = "/aidop/s8/monitoring/delivery", Name = "aidopS8MonitoringDelivery", Component = "/aidop/s8/monitoring/S8MonitoringDeliveryPage", Icon = "ele-Position", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 11, Remark = "S8 交付异常大屏(占位)" }; yield return new SysMenu { Id = s8MonitoringDirId + 3, Pid = s8MonitoringDirId, Title = "生产异常大屏", Path = "/aidop/s8/monitoring/production", Name = "aidopS8MonitoringProduction", Component = "/aidop/s8/monitoring/S8MonitoringProductionPage", Icon = "ele-Cpu", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 12, Remark = "S8 生产异常大屏(占位)" }; yield return new SysMenu { Id = s8MonitoringDirId + 4, Pid = s8MonitoringDirId, Title = "供应异常大屏", Path = "/aidop/s8/monitoring/supply", Name = "aidopS8MonitoringSupply", Component = "/aidop/s8/monitoring/S8MonitoringSupplyPage", Icon = "ele-Box", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 13, Remark = "S8 供应异常大屏(占位)" }; // 可见业务页(「异常监控看板」复用自动生成的 1322000000028 菜单位) yield return new SysMenu { Id = baseId + 2, Pid = s8DirId, Title = "异常列表", Path = "/aidop/s8/exceptions", Name = "aidopS8ExceptionList", Component = "/aidop/s8/exceptions/S8ExceptionListPage", Icon = "ele-List", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 20, Remark = "S8 异常列表" }; yield return new SysMenu { Id = baseId + 3, Pid = s8DirId, Title = "主动提报", Path = "/aidop/s8/report", Name = "aidopS8ManualReport", Component = "/aidop/s8/report/S8ManualReportPage", Icon = "ele-EditPen", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 30, Remark = "S8 主动提报" }; yield return new SysMenu { Id = baseId + 4, Pid = s8DirId, Title = "配置中心", Path = "/aidop/s8/config", Name = "aidopS8ConfigHub", Component = "/aidop/s8/config/S8ConfigHubPage", Icon = "ele-Setting", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 40, Remark = "S8 配置中心" }; // 隐藏路由(不出侧栏,需参与动态路由注册) yield return new SysMenu { Id = baseId + 10, Pid = s8DirId, Title = "任务详情", Path = "/aidop/s8/exceptions/:id", Name = "aidopS8TaskDetail", Component = "/aidop/s8/exceptions/S8TaskDetailPage", Icon = "ele-Document", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 90, IsHide = true, Remark = "S8 任务详情" }; var cfg = new (long Off, string Path, string Name, string Title, string Component)[] { (11, "/aidop/s8/config/scenes", "aidopS8ScenarioConfig", "场景基础配置", "/aidop/s8/config/S8ScenarioConfigPage"), (12, "/aidop/s8/config/notifications", "aidopS8NotificationLayerConfig", "通知分层配置", "/aidop/s8/config/S8NotificationLayerPage"), (13, "/aidop/s8/config/roles", "aidopS8RolePermissionConfig", "角色权限配置", "/aidop/s8/config/S8RolePermissionConfigPage"), (14, "/aidop/s8/config/alert-rules", "aidopS8AlertRulesConfig", "报警规则配置", "/aidop/s8/config/S8AlertRulesPage"), (15, "/aidop/s8/config/data-sources", "aidopS8DataSourceConfig", "数据源配置", "/aidop/s8/config/S8DataSourceConfigPage"), (16, "/aidop/s8/config/watch-rules", "aidopS8WatchRuleConfig", "监视规则配置", "/aidop/s8/config/S8WatchRuleConfigPage"), }; foreach (var (off, path, name, title, component) in cfg) { yield return new SysMenu { Id = baseId + off, Pid = s8DirId, Title = title, Path = path, Name = name, Component = component, Icon = "ele-Document", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 100 + (int)off, IsHide = true, Remark = $"S8 {title}" }; } } private static IEnumerable BuildS0WarehouseMenus(DateTime ct) { const long s0DataModelingMenuId = 1322000000001L; const long subDirId = 1329005000000L; yield return new SysMenu { Id = subDirId, Pid = s0DataModelingMenuId, Title = "仓储建模", Path = "/aidop/s0/warehouse", Name = "aidopS0Warehouse", Component = "Layout", Icon = "ele-OfficeBuilding", Type = MenuTypeEnum.Dir, CreateTime = ct, OrderNo = 50, Remark = "S0 仓储建模" }; var leaves = new (long IdOff, string Path, string Name, string Title, string Component, int Order)[] { (1, "/aidop/s0/warehouse/department", "aidopS0WhDepartment", "部门维护", "/aidop/s0/warehouse/DepartmentList", 10), (2, "/aidop/s0/warehouse/employee", "aidopS0WhEmployee", "雇员列表", "/aidop/s0/warehouse/EmployeeList", 20), (3, "/aidop/s0/warehouse/cost-center", "aidopS0WhCostCenter", "成本中心", "/aidop/s0/warehouse/CostCenterList", 30), (4, "/aidop/s0/warehouse/location", "aidopS0WhLocation", "库位维护", "/aidop/s0/warehouse/LocationList", 40), (5, "/aidop/s0/warehouse/location-shelf", "aidopS0WhLocationShelf", "货架列表", "/aidop/s0/warehouse/LocationShelfList", 50), (6, "/aidop/s0/warehouse/barcode-rule", "aidopS0WhBarcodeRule", "条码规则", "/aidop/s0/warehouse/BarcodeRuleList", 60), (7, "/aidop/s0/warehouse/label-type", "aidopS0WhLabelType", "标签格式", "/aidop/s0/warehouse/LabelTypeList", 70), (8, "/aidop/s0/warehouse/nbr-type", "aidopS0WhNbrType", "单号类型", "/aidop/s0/warehouse/NbrTypeList", 80), (9, "/aidop/s0/warehouse/nbr-control", "aidopS0WhNbrControl", "单号规则维护", "/aidop/s0/warehouse/NbrControlList", 90), (10, "/aidop/s0/warehouse/item-pack", "aidopS0WhItemPack", "零件包装规格", "/aidop/s0/warehouse/ItemPackList", 100), (11, "/aidop/s0/warehouse/emp-work-duty", "aidopS0WhEmpWorkDuty", "物料职责维护", "/aidop/s0/warehouse/EmpWorkDutyList", 110), (12, "/aidop/s0/warehouse/task-assignment", "aidopS0WhTaskAssignment", "物料状态任务指派", "/aidop/s0/warehouse/TaskAssignmentList", 120), }; foreach (var (idOff, path, name, title, component, order) in leaves) { yield return new SysMenu { Id = subDirId + idOff, Pid = subDirId, Title = title, Path = path, Name = name, Component = component, Icon = "ele-Document", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = order, Remark = $"S0 {title}" }; } } /// /// S1「产销协同看板」目录(Id=1322000000005)下的子菜单:指标看板、需求明细核验。 /// private static IEnumerable BuildS1SalesKanbanMenus(DateTime ct) { const long salesKanBanDirId = 1322000000005L; yield return new SysMenu { Id = 1322000000201L, Pid = salesKanBanDirId, Title = "产销协同指标看板", Path = "/aidop/s1/SalesKanBan/kanban", Name = "aidopS1SalesKanBanKanban", Component = "/aidop/kanban/s1", Icon = "ele-DataAnalysis", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 10, Remark = "S1 产销协同看板(指标)" }; yield return new SysMenu { Id = 1322000000202L, Pid = salesKanBanDirId, Title = "需求明细核验", Path = "/aidop/s1/SalesKanBan/requirement-examine-detail", Name = "aidopS1RequirementExamineDetail", Component = "/aidop/s1/sales-kanban/RequirementExamineDetailList", Icon = "ele-List", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 20, Remark = "S1 需求明细核验" }; } /// /// S1「订单管理」「工单管理」目录化后的子菜单:销售订单、合同评审、产品设计、工单下达等。 /// 父级 Id:订单管理=1322000000003,工单管理=1322000000004(menuSeq 与 ModuleDefinitions 中 S1 叶子顺序一致)。 /// 产销协同看板=1322000000005,路径 /aidop/s1/SalesKanBan(勿与工单管理目录混淆)。 /// private static IEnumerable BuildS1OrderWorkOrderMenus(DateTime ct) { const long orderMgmtDirId = 1322000000003L; const long workOrderMgmtDirId = 1322000000004L; yield return new SysMenu { Id = 1322000000101L, Pid = orderMgmtDirId, Title = "合同评审", Path = "/aidop/s1/order-mgmt/contract-review", Name = "aidopS1ContractReview", Component = "/aidop/business/contractReviewList", Icon = "ele-Edit", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 10, Remark = "S1 合同评审" }; yield return new SysMenu { Id = 1322000000102L, Pid = orderMgmtDirId, Title = "产品设计", Path = "/aidop/s1/order-mgmt/product-design", Name = "aidopS1ProductDesign", Component = "/aidop/business/productDesignList", Icon = "ele-Edit", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 20, Remark = "S1 产品设计" }; yield return new SysMenu { Id = 1322000000103L, Pid = orderMgmtDirId, Title = "订单评审", Path = "/aidop/s1/order-mgmt/order", Name = "aidopS1SalesOrder", Component = "/aidop/business/orderList", Icon = "ele-Document", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 30, Remark = "S1 销售订单(原订单管理入口)" }; yield return new SysMenu { Id = 1322000000104L, Pid = orderMgmtDirId, Title = "订单交付", Path = "/aidop/s1/order-mgmt/orderDelivery", Name = "aidopS1OrderDelivery", Component = "/aidop/business/orderDeliveryList", Icon = "ele-Document", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 40, Remark = "S1 订单交付" }; yield return new SysMenu { Id = 1322000000105L, Pid = orderMgmtDirId, Title = "订单发货", Path = "/aidop/s1/order-mgmt/asnShipper", Name = "aidopS1AsnShipper", Component = "/aidop/business/asnShipperList", Icon = "ele-Document", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 50, Remark = "S1 订单发货" }; yield return new SysMenu { Id = 1322000000106L, Pid = workOrderMgmtDirId, Title = "工单下达", Path = "/aidop/s1/workorder-mgmt/dispatch", Name = "aidopS1WorkOrderDispatch", Component = "/aidop/business/workOrderDispatchList", Icon = "ele-Position", Type = MenuTypeEnum.Menu, CreateTime = ct, OrderNo = 10, Remark = "S1 工单池下达" }; } private static readonly (string Code, string L1, (string Title, string Desc, string Complexity, string Days, string Note)[] Leaves)[] ModuleDefinitions = { ("S0", "S0 运营建模", new[] { ("数据建模", "支持数据库表结构设计与建模", "高", "5", "核心基础功能"), ("业务建模", "支持业务流程建模与配置", "高", "5", "核心基础功能"), }), ("S1", "S1 产销协同", new[] { ("订单管理", "销售订单录入、查询、编辑、删除", "中", "3", ""), ("工单管理", "工单创建、分配、跟踪", "中", "3", ""), ("产销协同看板", "订单与生产协同数据可视化", "高", "5", "数据看板类"), }), ("S2", "S2 制造协同", new[] { ("生产排程", "生产任务排程与调度", "高", "5", ""), ("作业计划", "车间作业计划管理", "中", "3", ""), ("制造协同看板", "制造过程协同数据展示", "高", "5", "数据看板类"), }), ("S3", "S3 供应协同", new[] { ("物料计划", "物料需求计划(MRP)计算", "高", "7", "核心算法"), ("供应协同看板", "供应商协同数据可视化", "中", "4", "数据看板类"), }), ("S4", "S4 采购执行", new[] { ("采购管理", "采购申请、订单、合同管理", "中", "4", ""), ("交货管理", "供应商交货跟踪与验收", "中", "3", ""), ("退货管理", "采购退货流程处理", "低", "2", ""), ("采购执行看板", "采购执行数据可视化", "中", "4", "数据看板类"), }), ("S5", "S5 物料仓储", new[] { ("来料检验", "IQC来料质量检验", "中", "3", ""), ("仓储管理", "仓库入库、出库、调拨", "中", "4", ""), ("库存数据", "库存查询、盘点、调整", "中", "3", ""), ("物料仓储看板", "仓储数据可视化分析", "中", "4", "数据看板类"), }), ("S6", "S6 生产执行", new[] { ("生产记录管理", "生产过程数据记录", "中", "3", ""), ("过程质量管理", "IPQC过程质量检验", "中", "4", ""), ("设备工装管理", "设备台账、保养、维修", "中", "4", ""), ("生产执行看板", "生产执行数据可视化", "高", "5", "数据看板类"), }), ("S7", "S7 成品仓储", new[] { ("成品质量管理", "OQC成品质量检验", "中", "3", ""), ("生产入库管理", "成品入库流程", "低", "2", ""), ("成品出库管理", "成品出库发货流程", "低", "2", ""), ("成品库存管理", "成品库存查询与管理", "中", "3", ""), }), ("S8", "S8 异常监控", new[] { ("异常监控看板", "生产异常监控、处理、跟踪", "中", "4", ""), }), ("S9", "S9 运营指标", new[] { ("ERP同步", "与外部ERP系统数据同步", "高", "7", "接口集成"), ("日志查询", "系统操作日志查询", "低", "2", ""), ("ERP事务", "ERP相关事务处理", "中", "3", ""), }), ("M11", "系统管理", new[] { ("组织架构", "部门、岗位、人员管理", "中", "3", "与框架系统管理对应,后续可映射具体页"), ("菜单管理", "系统菜单权限配置", "中", "3", ""), }), ("M12", "流程平台", new[] { ("流程管理", "工作流流程定义与配置", "高", "7", "核心引擎"), ("表单管理", "流程表单设计与配置", "高", "5", ""), ("应用设计", "业务应用快速设计", "高", "5", ""), ("数据资源配置", "数据资源连接配置", "中", "4", ""), ("格式化JSON", "JSON数据格式化工具", "低", "1", "工具类"), ("模板管理", "流程模板管理", "中", "3", ""), ("系统按钮", "系统按钮权限配置", "低", "2", ""), ("流程按钮", "流程操作按钮配置", "低", "2", ""), ("应用程序", "外部应用集成管理", "中", "4", ""), ("接口系统", "API接口配置管理", "高", "5", ""), }), ("M13", "系统工具", new[] { ("数据字典", "系统字典数据管理", "低", "2", ""), ("数据连接", "数据库连接配置", "中", "3", ""), ("首页设置", "系统首页个性化配置", "低", "2", ""), ("日志查询", "系统运行日志查询", "低", "2", ""), ("流水号管理", "业务流水号规则配置", "低", "2", ""), ("工作日设置", "工作日历配置", "低", "1", ""), ("图标库", "系统图标资源管理", "低", "1", ""), ("在线用户", "在线用户监控", "低", "2", ""), ("周库存统计", "库存周期统计报表", "中", "3", "报表类"), ("数据导入", "批量数据导入工具", "中", "3", ""), }), ("M14", "流程中心", new[] { ("发起流程", "新建并发起工作流程", "中", "3", ""), ("待办事项", "个人待办任务处理", "中", "3", ""), ("待办批量处理", "待办任务批量操作", "中", "3", ""), ("已办事项", "已办任务查询", "低", "2", ""), ("我的流程", "我发起的流程跟踪", "中", "3", ""), ("已委托事项", "委托他人处理的事项", "低", "2", ""), ("流程委托", "流程任务委托配置", "低", "2", ""), ("流程意见", "流程审批意见管理", "低", "2", ""), }), ("M15", "个人设置", new[] { ("个人信息", "个人资料维护", "低", "1", ""), ("头像设置", "个人头像上传", "低", "1", ""), ("修改密码", "密码修改功能", "低", "1", ""), ("签章管理", "个人电子签章管理", "中", "3", ""), ("文件管理", "个人文件存储管理", "中", "3", ""), ("快捷菜单", "个人快捷方式配置", "低", "1", ""), }), ("M16", "系统首页", new[] { ("系统首页", "系统门户首页", "中", "3", "门户类"), ("发起流程(快捷)", "首页快捷发起流程", "低", "1", ""), ("我的流程(快捷)", "首页流程快捷入口", "低", "1", ""), ("待办事项(快捷)", "首页待办快捷入口", "低", "1", ""), }), }; }