| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766 |
- """运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,14 个一级菜单)"""
- from fastapi import APIRouter, Depends
- from app.core.menu_guard import require_admin_or_super_admin
- from app.core.response import success_response
- router = APIRouter(prefix="/web/menu", tags=["菜单管理"])
- # 与 web-admin/src/router/modules/sqxp.ts 一致:14 个一级菜单
- STATIC_MENU_TREE = [
- # ────────────────────────────────────────────
- # 1. 细胞存储
- # ────────────────────────────────────────────
- {
- "id": "CEL00000000000000000000000000001",
- "name": "CellStorage",
- "path": "/cell-storage",
- "component": "/index/index",
- "meta": {
- "title": "细胞存储",
- "icon": "ri:test-tube-line",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "50000000000000000000000000000002",
- "name": "CellStorageProtocol",
- "path": "protocol",
- "component": "/cell-storage/protocol/index",
- "meta": {"title": "采集协议单录入", "keepAlive": True, "isHide": True, "menuCode": "biz:cellStorageProtocol:list"},
- },
- {
- "id": "50000000000000000000000000000003",
- "name": "CellStorageProtocolAudit",
- "path": "protocol-audit",
- "component": "/cell-storage/protocol-audit/index",
- "meta": {"title": "采集协议单", "keepAlive": True, "menuCode": "biz:cellStorageProtocolAudit:list"},
- },
- {
- "id": "50000000000000000000000000000004",
- "name": "CellStoragePaymentConfirm",
- "path": "payment-confirm",
- "component": "/cell-storage/payment-confirm/index",
- "meta": {"title": "缴退费财务确认", "keepAlive": True, "menuCode": "biz:cellStoragePaymentConfirm:list"},
- },
- {
- "id": "70000000000000000000000000000011",
- "name": "CellStorageStorageReleaseReview",
- "path": "storage-release-review",
- "component": "/quality-inspection/storage-release-review/index",
- "meta": {"title": "入库放行审核", "keepAlive": True, "menuCode": "biz:storageReleaseReview:list"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 2. 科研捐赠
- # ────────────────────────────────────────────
- {
- "id": "RSC00000000000000000000000000001",
- "name": "ResearchDonation",
- "path": "/research-donation",
- "component": "/index/index",
- "meta": {
- "title": "科研捐赠",
- "icon": "ri:hand-heart-line",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "60000000000000000000000000000002",
- "name": "ResearchDonationList",
- "path": "list",
- "component": "/research-donation/list/index",
- "meta": {"title": "捐赠协议单录入", "keepAlive": True, "isHide": True, "menuCode": "biz:researchDonation:list"},
- },
- {
- "id": "60000000000000000000000000000003",
- "name": "ResearchDonationAudit",
- "path": "audit",
- "component": "/research-donation/audit/index",
- "meta": {"title": "捐赠协议单", "keepAlive": True, "menuCode": "biz:researchDonationAudit:list"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 3. 中试服务
- # ────────────────────────────────────────────
- {
- "id": "PIL00000000000000000000000000001",
- "name": "PilotService",
- "path": "/pilot-service",
- "component": "/index/index",
- "meta": {
- "title": "中试服务",
- "icon": "ri:flask-line",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "80000000000000000000000000000010",
- "name": "PilotApplication",
- "path": "pilot-application",
- "component": "/pilot-service/pilot-application/index",
- "meta": {"title": "中试服务申请单", "keepAlive": True, "menuCode": "pilot-service:pilot-application:list"},
- },
- {
- "id": "PIL00000000000000000000000000004",
- "name": "PilotOutboundRelease",
- "path": "outbound-release-review",
- "component": "/pilot-service/outbound-release-review/index",
- "meta": {"title": "出库放行审核", "keepAlive": True, "menuCode": "pilot-service:outbound-release-review:list"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 4. 临床应用
- # ────────────────────────────────────────────
- {
- "id": "CLI00000000000000000000000000001",
- "name": "ClinicalApplication",
- "path": "/clinical-application",
- "component": "/index/index",
- "meta": {
- "title": "临床应用",
- "icon": "ri:heart-pulse-line",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "CLI00000000000000000000000000002",
- "name": "ClinicalApplicationList",
- "path": "clinical-application",
- "component": "/pilot-service/pilot-application/index",
- "meta": {"title": "临床申请单", "keepAlive": True, "menuCode": "clinical-application:application:list"},
- },
- {
- "id": "CLI00000000000000000000000000003",
- "name": "ClinicalCheckupManagement",
- "path": "clinical-checkup-management",
- "component": "/pilot-service/checkup-management/index",
- "meta": {
- "title": "体检管理",
- "keepAlive": True,
- "isHide": True,
- "menuCode": "clinical-application:checkup-management:list",
- },
- },
- {
- "id": "CLI00000000000000000000000000004",
- "name": "ClinicalInfusionSchedule",
- "path": "clinical-infusion-schedule-management",
- "component": "/pilot-service/infusion-schedule-management/index",
- "meta": {
- "title": "输注计划管理",
- "keepAlive": False,
- "isHide": True,
- "menuCode": "clinical-application:infusion-schedule-management:list",
- },
- },
- {
- "id": "CLI00000000000000000000000000005",
- "name": "ClinicalPaymentInfo",
- "path": "clinical-payment-info",
- "component": "/pilot-service/clinical-payment-info/index",
- "meta": {
- "title": "缴费信息",
- "keepAlive": False,
- "isHide": True,
- "menuCode": "clinical-application:payment-info:list",
- },
- },
- {
- "id": "CLI00000000000000000000000000006",
- "name": "ClinicalPaymentConfirm",
- "path": "clinical-payment-confirm",
- "component": "/pilot-service/clinical-payment-confirm/index",
- "meta": {"title": "缴退费财务确认", "keepAlive": True, "menuCode": "clinical-application:payment-confirm:list"},
- },
- {
- "id": "CLI00000000000000000000000000007",
- "name": "ClinicalRefundConfirm",
- "path": "clinical-refund-confirm",
- "component": "/pilot-service/clinical-refund-confirm/index",
- "meta": {"title": "退费确认(财务)", "keepAlive": True, "menuCode": "clinical-application:refund-confirm:list"},
- },
- {
- "id": "CLI00000000000000000000000000008",
- "name": "ClinicalOutboundRelease",
- "path": "clinical-outbound-release-review",
- "component": "/pilot-service/outbound-release-review/index",
- "meta": {"title": "出库放行审核", "keepAlive": True, "menuCode": "clinical-application:outbound-release-review:list"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 5. 质检管理
- # ────────────────────────────────────────────
- {
- "id": "QCM00000000000000000000000000001",
- "name": "QualityManage",
- "path": "/quality-manage",
- "component": "/index/index",
- "meta": {
- "title": "质检管理",
- "icon": "ri:shield-check-line",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "70000000000000000000000000000002",
- "name": "QualityInspectionSampleReception",
- "path": "sample-reception",
- "component": "/quality-inspection/sample-reception/index",
- "meta": {"title": "样本接收", "keepAlive": True, "menuCode": "biz:sampleReception:list"},
- },
- {
- "id": "70000000000000000000000000000007",
- "name": "QualityInspectionQcWorkOrder",
- "path": "qc-work-order",
- "component": "/quality-inspection/qc-work-order/index",
- "meta": {"title": "质检工单", "keepAlive": True, "menuCode": "biz:qcWorkOrder:list"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 6. 生产管理
- # ────────────────────────────────────────────
- {
- "id": "PRM00000000000000000000000000001",
- "name": "ProductionManage",
- "path": "/production",
- "component": "/index/index",
- "meta": {
- "title": "生产管理",
- "icon": "grid",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "61000000000000000000000000000003",
- "name": "ProductionStorageFacility",
- "path": "storage-facility",
- "component": "/operations/storage-facility/index",
- "meta": {"title": "库位管理", "keepAlive": True, "menuCode": "operations:storage-facility:list"},
- },
- {
- "id": "90000000000000000000000000000013",
- "name": "CellProduct",
- "path": "cell-product",
- "component": "/production/cell-product/index",
- "meta": {"title": "细胞产品库", "keepAlive": True, "menuCode": "production:cell-product:list"},
- },
- {
- "id": "90000000000000000000000000000011",
- "name": "ProductionWorkOrder",
- "path": "production-work-order",
- "component": "/production/production-work-order/index",
- "meta": {"title": "生产工单", "keepAlive": True, "menuCode": "production:work-order:list"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 7. 运营支撑
- # ────────────────────────────────────────────
- {
- "id": "OPS00000000000000000000000000001",
- "name": "Operations",
- "path": "/operations",
- "component": "/index/index",
- "meta": {
- "title": "运营支撑",
- "icon": "operation",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "61000000000000000000000000000002",
- "name": "CleanRoom",
- "path": "clean-room",
- "component": "/operations/clean-room/index",
- "meta": {"title": "洁净室管理", "keepAlive": True, "menuCode": "operations:clean-room:list"},
- },
- {
- "id": "61000000000000000000000000000004",
- "name": "ExhibitionAppointment",
- "path": "exhibition-appointment",
- "component": "/operations/exhibition-appointment/index",
- "meta": {"title": "展馆预约", "keepAlive": True, "menuCode": "operations:exhibition-appointment:list"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 8. 市场基础信息
- # ────────────────────────────────────────────
- {
- "id": "MKT00000000000000000000000000001",
- "name": "MarketInfo",
- "path": "/market-info",
- "component": "/index/index",
- "meta": {
- "title": "市场基础信息",
- "icon": "ri:price-tag-3-line",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "122",
- "name": "BizCellSampleType",
- "path": "cell-sample-type",
- "component": "/basic-info/cell-sample-type/index",
- "meta": {"title": "细胞样本基础信息维护", "keepAlive": True, "menuCode": "biz:cellSampleType:list"},
- },
- {
- "id": "123",
- "name": "BizCollectionRegion",
- "path": "collection-region",
- "component": "/basic-info/collection-region/index",
- "meta": {"title": "细胞采集基础信息维护", "keepAlive": True, "menuCode": "biz:collectionRegion:list"},
- },
- {
- "id": "80000000000000000000000000000002",
- "name": "CellProductType",
- "path": "cell-product-type",
- "component": "/pilot-service/cell-product-type/index",
- "meta": {"title": "细胞产品基础信息维护", "keepAlive": True, "menuCode": "pilot-service:cell-product-type:list"},
- },
- {
- "id": "40000000000000000000000000000007",
- "name": "BasicInfoInsuranceCompany",
- "path": "insurance-company",
- "component": "/basic-info/insurance-company/index",
- "meta": {"title": "保险公司及险种价格", "keepAlive": True, "menuCode": "basic-info:insurance-company:list"},
- },
- {
- "id": "80000000000000000000000000000007",
- "name": "CheckupInstitution",
- "path": "checkup-institution",
- "component": "/pilot-service/checkup-institution/index",
- "meta": {"title": "体检机构及项目价格", "keepAlive": True, "menuCode": "pilot-service:checkup-institution:list"},
- },
- {
- "id": "50000000000000000000000000000009",
- "name": "MarketMaterial",
- "path": "material",
- "component": "/cell-storage/material/index",
- "meta": {"title": "市场物料库", "keepAlive": True, "menuCode": "biz:material:list"},
- },
- {
- "id": "121",
- "name": "BizCustomer",
- "path": "customer",
- "component": "/basic-info/customer/index",
- "meta": {"title": "客户管理", "keepAlive": True, "menuCode": "biz:customer:list"},
- },
- {
- "id": "80000000000000000000000000000006",
- "name": "Channel",
- "path": "channel",
- "component": "/pilot-service/channel/index",
- "meta": {"title": "渠道信息管理", "keepAlive": True, "menuCode": "pilot-service:channel:list"},
- },
- {
- "id": "80000000000000000000000000000009",
- "name": "ChannelServiceOrderFinance",
- "path": "channel-service-order-finance",
- "component": "/pilot-service/channel-service-order-finance/index",
- "meta": {"title": "渠道服务订单(财务确认)", "keepAlive": True, "menuCode": "pilot-service:channel-service-order-finance:list"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 9. 质检基础信息
- # ────────────────────────────────────────────
- {
- "id": "QCB00000000000000000000000000001",
- "name": "QualityBase",
- "path": "/quality-base",
- "component": "/index/index",
- "meta": {
- "title": "质检基础信息",
- "icon": "ri:clipboard-line",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "70000000000000000000000000000003",
- "name": "QualityInspectionSampleReceptionCheckItem",
- "path": "sample-reception-check-item",
- "component": "/quality-inspection/sample-reception-check-item/index",
- "meta": {"title": "接收检查项配置", "keepAlive": True, "menuCode": "biz:sampleReceptionCheckItem:list"},
- },
- {
- "id": "70000000000000000000000000000006",
- "name": "QualityInspectionLabTestItem",
- "path": "lab-test-item",
- "component": "/quality-inspection/lab-test-item/index",
- "meta": {"title": "质检项目管理", "keepAlive": True, "menuCode": "biz:qcLabTestItem:list"},
- },
- {
- "id": "70000000000000000000000000000009",
- "name": "QualityInspectionQcMaterial",
- "path": "qc-material",
- "component": "/quality-inspection/qc-material/index",
- "meta": {"title": "质检物料库", "keepAlive": True, "menuCode": "biz:qcMaterial:list"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 10. 生产基础信息
- # ────────────────────────────────────────────
- {
- "id": "PRB00000000000000000000000000001",
- "name": "ProductionBase",
- "path": "/production-base",
- "component": "/index/index",
- "meta": {
- "title": "生产基础信息",
- "icon": "ri:tools-line",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "90000000000000000000000000000002",
- "name": "ProductionConsumable",
- "path": "consumable",
- "component": "/production/consumable/index",
- "meta": {"title": "耗材管理", "keepAlive": True, "menuCode": "production:consumable:list"},
- },
- {
- "id": "90000000000000000000000000000003",
- "name": "ProductionReagent",
- "path": "reagent",
- "component": "/production/reagent/index",
- "meta": {"title": "试剂管理", "keepAlive": True, "menuCode": "production:reagent:list"},
- },
- {
- "id": "90000000000000000000000000000004",
- "name": "ProductionSop",
- "path": "sop",
- "component": "/production/sop/index",
- "meta": {"title": "SOP文档", "keepAlive": True, "menuCode": "production:sop-document:list"},
- },
- {
- "id": "90000000000000000000000000000005",
- "name": "ProductionProcessCategory",
- "path": "process-category",
- "component": "/production/process-category/index",
- "meta": {"title": "工艺基础信息维护", "keepAlive": True, "menuCode": "production:process-category:list"},
- },
- {
- "id": "90000000000000000000000000000008",
- "name": "ProductionProcess",
- "path": "process",
- "component": "/production/process/index",
- "meta": {"title": "工艺库管理", "keepAlive": True, "menuCode": "production:process:list"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 11. 系统基础信息
- # ────────────────────────────────────────────
- {
- "id": "SYSB000000000000000000000000000001",
- "name": "SystemBase",
- "path": "/system-base",
- "component": "/index/index",
- "meta": {
- "title": "系统基础信息",
- "icon": "ri:archive-line",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "107",
- "name": "Site",
- "path": "site",
- "component": "/system/site/index",
- "meta": {"title": "站点管理", "keepAlive": True, "menuCode": "system:site:list"},
- },
- {
- "id": "109",
- "name": "Unit",
- "path": "unit",
- "component": "/system/unit/index",
- "meta": {"title": "物品单位管理", "keepAlive": True, "menuCode": "system:unit:list"},
- },
- {
- "id": "110",
- "name": "Express",
- "path": "express",
- "component": "/system/express/index",
- "meta": {"title": "快递公司", "keepAlive": True, "menuCode": "system:express:list"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 12. CRM 管理
- # ────────────────────────────────────────────
- {
- "id": "CRM00000000000000000000000000001",
- "name": "CRM管理",
- "path": "/crm",
- "component": "/index/index",
- "meta": {
- "title": "CRM管理",
- "icon": "goods",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "CRM00000000000000000000000000010",
- "name": "CrmProductGroup",
- "path": "product-group",
- "component": "/index/route-parent",
- "meta": {"title": "产品管理", "keepAlive": False},
- "children": [
- {
- "id": "CRM00000000000000000000000000003",
- "name": "CrmProduct",
- "path": "/crm/product",
- "component": "/crm/product/index",
- "meta": {"title": "产品管理", "keepAlive": True, "menuCode": "crm:product:list"},
- },
- {
- "id": "CRM00000000000000000000000000002",
- "name": "CrmProductCategory",
- "path": "/crm/product-category",
- "component": "/crm/product-category/index",
- "meta": {
- "title": "产品分类",
- "keepAlive": True,
- "isHide": True,
- "menuCode": "crm:productCategory:list",
- },
- },
- ],
- },
- {
- "id": "CRM00000000000000000000000000020",
- "name": "CrmQuoteGroup",
- "path": "quote-group",
- "component": "/index/route-parent",
- "meta": {"title": "报价单管理", "keepAlive": False},
- "children": [
- {
- "id": "CRM3000000000000000000000000010",
- "name": "CrmQuote",
- "path": "/crm/quote",
- "component": "/crm/quote/index",
- "meta": {"title": "报价单管理", "keepAlive": True, "menuCode": "crm:quote:list"},
- },
- {
- "id": "CRM3000000000000000000000000016",
- "name": "CrmQuoteApproval",
- "path": "/crm/quote-approval",
- "component": "/crm/quote/approval/index",
- "meta": {"title": "报价单审批", "keepAlive": True, "menuCode": "crm:quote:approve"},
- },
- ],
- },
- {
- "id": "CRM00000000000000000000000000030",
- "name": "CrmContractGroup",
- "path": "contract-group",
- "component": "/index/route-parent",
- "meta": {"title": "合同管理", "keepAlive": False},
- "children": [
- {
- "id": "CRM3000000000000000000000000020",
- "name": "CrmContract",
- "path": "/crm/contract",
- "component": "/crm/contract/index",
- "meta": {"title": "合同管理", "keepAlive": True, "menuCode": "crm:contract:list"},
- },
- {
- "id": "CRM3000000000000000000000000021",
- "name": "CrmContractApproval",
- "path": "/crm/contract-approval",
- "component": "/crm/contract/approval/index",
- "meta": {"title": "合同审批", "keepAlive": True, "menuCode": "crm:contract:approve"},
- },
- {
- "id": "CRM3000000000000000000000000030",
- "name": "CrmPriceLetter",
- "path": "/crm/price-letter",
- "component": "/crm/price-letter/index",
- "meta": {"title": "调价函管理", "keepAlive": True, "menuCode": "crm:priceLetter:list"},
- },
- ],
- },
- {
- "id": "CRM00000000000000000000000000040",
- "name": "CrmCustomerGroup",
- "path": "customer-group",
- "component": "/index/route-parent",
- "meta": {"title": "客户管理", "keepAlive": False},
- "children": [
- {
- "id": "CRM1000000000000000000000000002",
- "name": "CrmCustomer",
- "path": "/crm/customer",
- "component": "/crm/customer/index",
- "meta": {"title": "客户管理", "keepAlive": True, "menuCode": "crm:customer:list"},
- },
- ],
- },
- ],
- },
- # ────────────────────────────────────────────
- # 13. 工作流管理
- # ────────────────────────────────────────────
- {
- "id": "WKF00000000000000000000000000001",
- "name": "Workflow",
- "path": "/workflow",
- "component": "/index/index",
- "meta": {
- "title": "工作流管理",
- "icon": "workflow",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "10000000000000000000000000000wf01",
- "name": "WorkflowProcess",
- "path": "process",
- "component": "/system/workflow/process/index",
- "meta": {"title": "流程配置", "keepAlive": True, "menuCode": "workflow:process"},
- },
- {
- "id": "10000000000000000000000000000wf02",
- "name": "WorkflowPending",
- "path": "pending",
- "component": "/system/workflow/task-pending/index",
- "meta": {"title": "待办中心", "keepAlive": True, "menuCode": "workflow:pending"},
- },
- {
- "id": "10000000000000000000000000000wf03",
- "name": "WorkflowCompleted",
- "path": "completed",
- "component": "/system/workflow/task-completed/index",
- "meta": {"title": "已办中心", "keepAlive": True, "menuCode": "workflow:completed"},
- },
- {
- "id": "10000000000000000000000000000wf05",
- "name": "WorkflowMyApplications",
- "path": "my-applications",
- "component": "/system/workflow/my-applications/index",
- "meta": {"title": "我的申请", "keepAlive": True, "menuCode": "workflow:myApplications"},
- },
- {
- "id": "10000000000000000000000000000wf04",
- "name": "LeaveRequest",
- "path": "leave",
- "component": "/system/leave/index",
- "meta": {"title": "请假申请", "keepAlive": True, "menuCode": "workflow:leave"},
- },
- ],
- },
- # ────────────────────────────────────────────
- # 14. 系统管理
- # ────────────────────────────────────────────
- {
- "id": "SYSM000000000000000000000000000001",
- "name": "SystemManage",
- "path": "/system",
- "component": "/index/index",
- "meta": {
- "title": "系统管理",
- "icon": "ri:settings-3-line",
- "keepAlive": False,
- "roles": ["admin"],
- },
- "children": [
- {
- "id": "101",
- "name": "Tenant",
- "path": "tenant",
- "component": "/system/tenant/index",
- "meta": {"title": "租户管理", "keepAlive": True, "menuCode": "system:tenant:list"},
- },
- {
- "id": "102",
- "name": "Dict",
- "path": "dict",
- "component": "/system/dict/index",
- "meta": {"title": "字典管理", "keepAlive": True, "menuCode": "system:dict:list"},
- },
- {
- "id": "106",
- "name": "Menu",
- "path": "menu",
- "component": "/system/menu/index",
- "meta": {"title": "菜单管理", "keepAlive": True, "menuCode": "system:menu:list"},
- },
- {
- "id": "103",
- "name": "Dept",
- "path": "dept",
- "component": "/system/dept/index",
- "meta": {"title": "组织管理", "keepAlive": True, "menuCode": "system:dept:list"},
- },
- {
- "id": "105",
- "name": "Role",
- "path": "role",
- "component": "/system/role/index",
- "meta": {"title": "角色管理", "keepAlive": True, "menuCode": "system:role:list"},
- },
- {
- "id": "104",
- "name": "User",
- "path": "user",
- "component": "/system/user/index",
- "meta": {"title": "用户管理", "keepAlive": True, "menuCode": "system:user:list"},
- },
- {
- "id": "108",
- "name": "Post",
- "path": "post",
- "component": "/system/post/index",
- "meta": {"title": "职位管理", "keepAlive": True, "menuCode": "system:post:list"},
- },
- {
- "id": "10000000000000000000000000000008",
- "name": "UserDetail",
- "path": "user/detail",
- "component": "/system/user/detail",
- "meta": {"title": "用户详情", "isHide": True, "keepAlive": True},
- },
- ],
- },
- ]
- @router.get("/list")
- def get_menu_list(_user: dict = Depends(require_admin_or_super_admin)):
- """获取菜单列表(与当前前端路由一致)"""
- return success_response({"menuList": STATIC_MENU_TREE})
|