menu.py 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. """运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,14 个一级菜单)"""
  2. from fastapi import APIRouter, Depends
  3. from app.core.menu_guard import require_admin_or_super_admin
  4. from app.core.response import success_response
  5. router = APIRouter(prefix="/web/menu", tags=["菜单管理"])
  6. # 与 web-admin/src/router/modules/sqxp.ts 一致:14 个一级菜单
  7. STATIC_MENU_TREE = [
  8. # ────────────────────────────────────────────
  9. # 1. 细胞存储
  10. # ────────────────────────────────────────────
  11. {
  12. "id": "CEL00000000000000000000000000001",
  13. "name": "CellStorage",
  14. "path": "/cell-storage",
  15. "component": "/index/index",
  16. "meta": {
  17. "title": "细胞存储",
  18. "icon": "ri:test-tube-line",
  19. "keepAlive": False,
  20. "roles": ["admin"],
  21. },
  22. "children": [
  23. {
  24. "id": "50000000000000000000000000000002",
  25. "name": "CellStorageProtocol",
  26. "path": "protocol",
  27. "component": "/cell-storage/protocol/index",
  28. "meta": {"title": "采集协议单录入", "keepAlive": True, "isHide": True, "menuCode": "biz:cellStorageProtocol:list"},
  29. },
  30. {
  31. "id": "50000000000000000000000000000003",
  32. "name": "CellStorageProtocolAudit",
  33. "path": "protocol-audit",
  34. "component": "/cell-storage/protocol-audit/index",
  35. "meta": {"title": "采集协议单", "keepAlive": True, "menuCode": "biz:cellStorageProtocolAudit:list"},
  36. },
  37. {
  38. "id": "50000000000000000000000000000004",
  39. "name": "CellStoragePaymentConfirm",
  40. "path": "payment-confirm",
  41. "component": "/cell-storage/payment-confirm/index",
  42. "meta": {"title": "缴退费财务确认", "keepAlive": True, "menuCode": "biz:cellStoragePaymentConfirm:list"},
  43. },
  44. {
  45. "id": "70000000000000000000000000000011",
  46. "name": "CellStorageStorageReleaseReview",
  47. "path": "storage-release-review",
  48. "component": "/quality-inspection/storage-release-review/index",
  49. "meta": {"title": "入库放行审核", "keepAlive": True, "menuCode": "biz:storageReleaseReview:list"},
  50. },
  51. ],
  52. },
  53. # ────────────────────────────────────────────
  54. # 2. 科研捐赠
  55. # ────────────────────────────────────────────
  56. {
  57. "id": "RSC00000000000000000000000000001",
  58. "name": "ResearchDonation",
  59. "path": "/research-donation",
  60. "component": "/index/index",
  61. "meta": {
  62. "title": "科研捐赠",
  63. "icon": "ri:hand-heart-line",
  64. "keepAlive": False,
  65. "roles": ["admin"],
  66. },
  67. "children": [
  68. {
  69. "id": "60000000000000000000000000000002",
  70. "name": "ResearchDonationList",
  71. "path": "list",
  72. "component": "/research-donation/list/index",
  73. "meta": {"title": "捐赠协议单录入", "keepAlive": True, "isHide": True, "menuCode": "biz:researchDonation:list"},
  74. },
  75. {
  76. "id": "60000000000000000000000000000003",
  77. "name": "ResearchDonationAudit",
  78. "path": "audit",
  79. "component": "/research-donation/audit/index",
  80. "meta": {"title": "捐赠协议单", "keepAlive": True, "menuCode": "biz:researchDonationAudit:list"},
  81. },
  82. ],
  83. },
  84. # ────────────────────────────────────────────
  85. # 3. 中试服务
  86. # ────────────────────────────────────────────
  87. {
  88. "id": "PIL00000000000000000000000000001",
  89. "name": "PilotService",
  90. "path": "/pilot-service",
  91. "component": "/index/index",
  92. "meta": {
  93. "title": "中试服务",
  94. "icon": "ri:flask-line",
  95. "keepAlive": False,
  96. "roles": ["admin"],
  97. },
  98. "children": [
  99. {
  100. "id": "80000000000000000000000000000010",
  101. "name": "PilotApplication",
  102. "path": "pilot-application",
  103. "component": "/pilot-service/pilot-application/index",
  104. "meta": {"title": "中试服务申请单", "keepAlive": True, "menuCode": "pilot-service:pilot-application:list"},
  105. },
  106. {
  107. "id": "PIL00000000000000000000000000004",
  108. "name": "PilotOutboundRelease",
  109. "path": "outbound-release-review",
  110. "component": "/pilot-service/outbound-release-review/index",
  111. "meta": {"title": "出库放行审核", "keepAlive": True, "menuCode": "pilot-service:outbound-release-review:list"},
  112. },
  113. ],
  114. },
  115. # ────────────────────────────────────────────
  116. # 4. 临床应用
  117. # ────────────────────────────────────────────
  118. {
  119. "id": "CLI00000000000000000000000000001",
  120. "name": "ClinicalApplication",
  121. "path": "/clinical-application",
  122. "component": "/index/index",
  123. "meta": {
  124. "title": "临床应用",
  125. "icon": "ri:heart-pulse-line",
  126. "keepAlive": False,
  127. "roles": ["admin"],
  128. },
  129. "children": [
  130. {
  131. "id": "CLI00000000000000000000000000002",
  132. "name": "ClinicalApplicationList",
  133. "path": "clinical-application",
  134. "component": "/pilot-service/pilot-application/index",
  135. "meta": {"title": "临床申请单", "keepAlive": True, "menuCode": "clinical-application:application:list"},
  136. },
  137. {
  138. "id": "CLI00000000000000000000000000003",
  139. "name": "ClinicalCheckupManagement",
  140. "path": "clinical-checkup-management",
  141. "component": "/pilot-service/checkup-management/index",
  142. "meta": {
  143. "title": "体检管理",
  144. "keepAlive": True,
  145. "isHide": True,
  146. "menuCode": "clinical-application:checkup-management:list",
  147. },
  148. },
  149. {
  150. "id": "CLI00000000000000000000000000004",
  151. "name": "ClinicalInfusionSchedule",
  152. "path": "clinical-infusion-schedule-management",
  153. "component": "/pilot-service/infusion-schedule-management/index",
  154. "meta": {
  155. "title": "输注计划管理",
  156. "keepAlive": False,
  157. "isHide": True,
  158. "menuCode": "clinical-application:infusion-schedule-management:list",
  159. },
  160. },
  161. {
  162. "id": "CLI00000000000000000000000000005",
  163. "name": "ClinicalPaymentInfo",
  164. "path": "clinical-payment-info",
  165. "component": "/pilot-service/clinical-payment-info/index",
  166. "meta": {
  167. "title": "缴费信息",
  168. "keepAlive": False,
  169. "isHide": True,
  170. "menuCode": "clinical-application:payment-info:list",
  171. },
  172. },
  173. {
  174. "id": "CLI00000000000000000000000000006",
  175. "name": "ClinicalPaymentConfirm",
  176. "path": "clinical-payment-confirm",
  177. "component": "/pilot-service/clinical-payment-confirm/index",
  178. "meta": {"title": "缴退费财务确认", "keepAlive": True, "menuCode": "clinical-application:payment-confirm:list"},
  179. },
  180. {
  181. "id": "CLI00000000000000000000000000007",
  182. "name": "ClinicalRefundConfirm",
  183. "path": "clinical-refund-confirm",
  184. "component": "/pilot-service/clinical-refund-confirm/index",
  185. "meta": {"title": "退费确认(财务)", "keepAlive": True, "menuCode": "clinical-application:refund-confirm:list"},
  186. },
  187. {
  188. "id": "CLI00000000000000000000000000008",
  189. "name": "ClinicalOutboundRelease",
  190. "path": "clinical-outbound-release-review",
  191. "component": "/pilot-service/outbound-release-review/index",
  192. "meta": {"title": "出库放行审核", "keepAlive": True, "menuCode": "clinical-application:outbound-release-review:list"},
  193. },
  194. ],
  195. },
  196. # ────────────────────────────────────────────
  197. # 5. 质检管理
  198. # ────────────────────────────────────────────
  199. {
  200. "id": "QCM00000000000000000000000000001",
  201. "name": "QualityManage",
  202. "path": "/quality-manage",
  203. "component": "/index/index",
  204. "meta": {
  205. "title": "质检管理",
  206. "icon": "ri:shield-check-line",
  207. "keepAlive": False,
  208. "roles": ["admin"],
  209. },
  210. "children": [
  211. {
  212. "id": "70000000000000000000000000000002",
  213. "name": "QualityInspectionSampleReception",
  214. "path": "sample-reception",
  215. "component": "/quality-inspection/sample-reception/index",
  216. "meta": {"title": "样本接收", "keepAlive": True, "menuCode": "biz:sampleReception:list"},
  217. },
  218. {
  219. "id": "70000000000000000000000000000007",
  220. "name": "QualityInspectionQcWorkOrder",
  221. "path": "qc-work-order",
  222. "component": "/quality-inspection/qc-work-order/index",
  223. "meta": {"title": "质检工单", "keepAlive": True, "menuCode": "biz:qcWorkOrder:list"},
  224. },
  225. ],
  226. },
  227. # ────────────────────────────────────────────
  228. # 6. 生产管理
  229. # ────────────────────────────────────────────
  230. {
  231. "id": "PRM00000000000000000000000000001",
  232. "name": "ProductionManage",
  233. "path": "/production",
  234. "component": "/index/index",
  235. "meta": {
  236. "title": "生产管理",
  237. "icon": "grid",
  238. "keepAlive": False,
  239. "roles": ["admin"],
  240. },
  241. "children": [
  242. {
  243. "id": "61000000000000000000000000000003",
  244. "name": "ProductionStorageFacility",
  245. "path": "storage-facility",
  246. "component": "/operations/storage-facility/index",
  247. "meta": {"title": "库位管理", "keepAlive": True, "menuCode": "operations:storage-facility:list"},
  248. },
  249. {
  250. "id": "90000000000000000000000000000013",
  251. "name": "CellProduct",
  252. "path": "cell-product",
  253. "component": "/production/cell-product/index",
  254. "meta": {"title": "细胞产品库", "keepAlive": True, "menuCode": "production:cell-product:list"},
  255. },
  256. {
  257. "id": "90000000000000000000000000000011",
  258. "name": "ProductionWorkOrder",
  259. "path": "production-work-order",
  260. "component": "/production/production-work-order/index",
  261. "meta": {"title": "生产工单", "keepAlive": True, "menuCode": "production:work-order:list"},
  262. },
  263. ],
  264. },
  265. # ────────────────────────────────────────────
  266. # 7. 运营支撑
  267. # ────────────────────────────────────────────
  268. {
  269. "id": "OPS00000000000000000000000000001",
  270. "name": "Operations",
  271. "path": "/operations",
  272. "component": "/index/index",
  273. "meta": {
  274. "title": "运营支撑",
  275. "icon": "operation",
  276. "keepAlive": False,
  277. "roles": ["admin"],
  278. },
  279. "children": [
  280. {
  281. "id": "61000000000000000000000000000002",
  282. "name": "CleanRoom",
  283. "path": "clean-room",
  284. "component": "/operations/clean-room/index",
  285. "meta": {"title": "洁净室管理", "keepAlive": True, "menuCode": "operations:clean-room:list"},
  286. },
  287. {
  288. "id": "61000000000000000000000000000004",
  289. "name": "ExhibitionAppointment",
  290. "path": "exhibition-appointment",
  291. "component": "/operations/exhibition-appointment/index",
  292. "meta": {"title": "展馆预约", "keepAlive": True, "menuCode": "operations:exhibition-appointment:list"},
  293. },
  294. ],
  295. },
  296. # ────────────────────────────────────────────
  297. # 8. 市场基础信息
  298. # ────────────────────────────────────────────
  299. {
  300. "id": "MKT00000000000000000000000000001",
  301. "name": "MarketInfo",
  302. "path": "/market-info",
  303. "component": "/index/index",
  304. "meta": {
  305. "title": "市场基础信息",
  306. "icon": "ri:price-tag-3-line",
  307. "keepAlive": False,
  308. "roles": ["admin"],
  309. },
  310. "children": [
  311. {
  312. "id": "122",
  313. "name": "BizCellSampleType",
  314. "path": "cell-sample-type",
  315. "component": "/basic-info/cell-sample-type/index",
  316. "meta": {"title": "细胞样本基础信息维护", "keepAlive": True, "menuCode": "biz:cellSampleType:list"},
  317. },
  318. {
  319. "id": "123",
  320. "name": "BizCollectionRegion",
  321. "path": "collection-region",
  322. "component": "/basic-info/collection-region/index",
  323. "meta": {"title": "细胞采集基础信息维护", "keepAlive": True, "menuCode": "biz:collectionRegion:list"},
  324. },
  325. {
  326. "id": "80000000000000000000000000000002",
  327. "name": "CellProductType",
  328. "path": "cell-product-type",
  329. "component": "/pilot-service/cell-product-type/index",
  330. "meta": {"title": "细胞产品基础信息维护", "keepAlive": True, "menuCode": "pilot-service:cell-product-type:list"},
  331. },
  332. {
  333. "id": "40000000000000000000000000000007",
  334. "name": "BasicInfoInsuranceCompany",
  335. "path": "insurance-company",
  336. "component": "/basic-info/insurance-company/index",
  337. "meta": {"title": "保险公司及险种价格", "keepAlive": True, "menuCode": "basic-info:insurance-company:list"},
  338. },
  339. {
  340. "id": "80000000000000000000000000000007",
  341. "name": "CheckupInstitution",
  342. "path": "checkup-institution",
  343. "component": "/pilot-service/checkup-institution/index",
  344. "meta": {"title": "体检机构及项目价格", "keepAlive": True, "menuCode": "pilot-service:checkup-institution:list"},
  345. },
  346. {
  347. "id": "50000000000000000000000000000009",
  348. "name": "MarketMaterial",
  349. "path": "material",
  350. "component": "/cell-storage/material/index",
  351. "meta": {"title": "市场物料库", "keepAlive": True, "menuCode": "biz:material:list"},
  352. },
  353. {
  354. "id": "121",
  355. "name": "BizCustomer",
  356. "path": "customer",
  357. "component": "/basic-info/customer/index",
  358. "meta": {"title": "客户管理", "keepAlive": True, "menuCode": "biz:customer:list"},
  359. },
  360. {
  361. "id": "80000000000000000000000000000006",
  362. "name": "Channel",
  363. "path": "channel",
  364. "component": "/pilot-service/channel/index",
  365. "meta": {"title": "渠道信息管理", "keepAlive": True, "menuCode": "pilot-service:channel:list"},
  366. },
  367. {
  368. "id": "80000000000000000000000000000009",
  369. "name": "ChannelServiceOrderFinance",
  370. "path": "channel-service-order-finance",
  371. "component": "/pilot-service/channel-service-order-finance/index",
  372. "meta": {"title": "渠道服务订单(财务确认)", "keepAlive": True, "menuCode": "pilot-service:channel-service-order-finance:list"},
  373. },
  374. ],
  375. },
  376. # ────────────────────────────────────────────
  377. # 9. 质检基础信息
  378. # ────────────────────────────────────────────
  379. {
  380. "id": "QCB00000000000000000000000000001",
  381. "name": "QualityBase",
  382. "path": "/quality-base",
  383. "component": "/index/index",
  384. "meta": {
  385. "title": "质检基础信息",
  386. "icon": "ri:clipboard-line",
  387. "keepAlive": False,
  388. "roles": ["admin"],
  389. },
  390. "children": [
  391. {
  392. "id": "70000000000000000000000000000003",
  393. "name": "QualityInspectionSampleReceptionCheckItem",
  394. "path": "sample-reception-check-item",
  395. "component": "/quality-inspection/sample-reception-check-item/index",
  396. "meta": {"title": "接收检查项配置", "keepAlive": True, "menuCode": "biz:sampleReceptionCheckItem:list"},
  397. },
  398. {
  399. "id": "70000000000000000000000000000006",
  400. "name": "QualityInspectionLabTestItem",
  401. "path": "lab-test-item",
  402. "component": "/quality-inspection/lab-test-item/index",
  403. "meta": {"title": "质检项目管理", "keepAlive": True, "menuCode": "biz:qcLabTestItem:list"},
  404. },
  405. {
  406. "id": "70000000000000000000000000000009",
  407. "name": "QualityInspectionQcMaterial",
  408. "path": "qc-material",
  409. "component": "/quality-inspection/qc-material/index",
  410. "meta": {"title": "质检物料库", "keepAlive": True, "menuCode": "biz:qcMaterial:list"},
  411. },
  412. ],
  413. },
  414. # ────────────────────────────────────────────
  415. # 10. 生产基础信息
  416. # ────────────────────────────────────────────
  417. {
  418. "id": "PRB00000000000000000000000000001",
  419. "name": "ProductionBase",
  420. "path": "/production-base",
  421. "component": "/index/index",
  422. "meta": {
  423. "title": "生产基础信息",
  424. "icon": "ri:tools-line",
  425. "keepAlive": False,
  426. "roles": ["admin"],
  427. },
  428. "children": [
  429. {
  430. "id": "90000000000000000000000000000002",
  431. "name": "ProductionConsumable",
  432. "path": "consumable",
  433. "component": "/production/consumable/index",
  434. "meta": {"title": "耗材管理", "keepAlive": True, "menuCode": "production:consumable:list"},
  435. },
  436. {
  437. "id": "90000000000000000000000000000003",
  438. "name": "ProductionReagent",
  439. "path": "reagent",
  440. "component": "/production/reagent/index",
  441. "meta": {"title": "试剂管理", "keepAlive": True, "menuCode": "production:reagent:list"},
  442. },
  443. {
  444. "id": "90000000000000000000000000000004",
  445. "name": "ProductionSop",
  446. "path": "sop",
  447. "component": "/production/sop/index",
  448. "meta": {"title": "SOP文档", "keepAlive": True, "menuCode": "production:sop-document:list"},
  449. },
  450. {
  451. "id": "90000000000000000000000000000005",
  452. "name": "ProductionProcessCategory",
  453. "path": "process-category",
  454. "component": "/production/process-category/index",
  455. "meta": {"title": "工艺基础信息维护", "keepAlive": True, "menuCode": "production:process-category:list"},
  456. },
  457. {
  458. "id": "90000000000000000000000000000008",
  459. "name": "ProductionProcess",
  460. "path": "process",
  461. "component": "/production/process/index",
  462. "meta": {"title": "工艺库管理", "keepAlive": True, "menuCode": "production:process:list"},
  463. },
  464. ],
  465. },
  466. # ────────────────────────────────────────────
  467. # 11. 系统基础信息
  468. # ────────────────────────────────────────────
  469. {
  470. "id": "SYSB000000000000000000000000000001",
  471. "name": "SystemBase",
  472. "path": "/system-base",
  473. "component": "/index/index",
  474. "meta": {
  475. "title": "系统基础信息",
  476. "icon": "ri:archive-line",
  477. "keepAlive": False,
  478. "roles": ["admin"],
  479. },
  480. "children": [
  481. {
  482. "id": "107",
  483. "name": "Site",
  484. "path": "site",
  485. "component": "/system/site/index",
  486. "meta": {"title": "站点管理", "keepAlive": True, "menuCode": "system:site:list"},
  487. },
  488. {
  489. "id": "109",
  490. "name": "Unit",
  491. "path": "unit",
  492. "component": "/system/unit/index",
  493. "meta": {"title": "物品单位管理", "keepAlive": True, "menuCode": "system:unit:list"},
  494. },
  495. {
  496. "id": "110",
  497. "name": "Express",
  498. "path": "express",
  499. "component": "/system/express/index",
  500. "meta": {"title": "快递公司", "keepAlive": True, "menuCode": "system:express:list"},
  501. },
  502. ],
  503. },
  504. # ────────────────────────────────────────────
  505. # 12. CRM 管理
  506. # ────────────────────────────────────────────
  507. {
  508. "id": "CRM00000000000000000000000000001",
  509. "name": "CRM 管理",
  510. "path": "/crm",
  511. "component": "/index/index",
  512. "meta": {
  513. "title": "CRM 管理",
  514. "icon": "goods",
  515. "keepAlive": False,
  516. "roles": ["admin"],
  517. },
  518. "children": [
  519. {
  520. "id": "CRM00000000000000000000000000002",
  521. "name": "CrmProductCategory",
  522. "path": "product-category",
  523. "component": "/crm/product-category/index",
  524. "meta": {"title": "产品分类", "keepAlive": True, "menuCode": "crm:productCategory:list"},
  525. },
  526. {
  527. "id": "CRM00000000000000000000000000003",
  528. "name": "CrmProduct",
  529. "path": "product",
  530. "component": "/crm/product/index",
  531. "meta": {"title": "产品管理", "keepAlive": True, "menuCode": "crm:product:list"},
  532. },
  533. {
  534. "id": "CRM1000000000000000000000000002",
  535. "name": "CrmCustomer",
  536. "path": "customer",
  537. "component": "/crm/customer/index",
  538. "meta": {"title": "客户管理", "keepAlive": True, "menuCode": "crm:customer:list"},
  539. },
  540. {
  541. "id": "CRM1000000000000000000000000003",
  542. "name": "CrmCustomerPool",
  543. "path": "customer-pool",
  544. "component": "/crm/customer/pool/index",
  545. "meta": {"title": "公海池", "keepAlive": True, "menuCode": "crm:customerPool:list"},
  546. },
  547. ],
  548. },
  549. # ────────────────────────────────────────────
  550. # 13. 工作流管理
  551. # ────────────────────────────────────────────
  552. {
  553. "id": "WKF00000000000000000000000000001",
  554. "name": "Workflow",
  555. "path": "/workflow",
  556. "component": "/index/index",
  557. "meta": {
  558. "title": "工作流管理",
  559. "icon": "workflow",
  560. "keepAlive": False,
  561. "roles": ["admin"],
  562. },
  563. "children": [
  564. {
  565. "id": "10000000000000000000000000000wf01",
  566. "name": "WorkflowProcess",
  567. "path": "process",
  568. "component": "/system/workflow/process/index",
  569. "meta": {"title": "流程配置", "keepAlive": True, "menuCode": "workflow:process"},
  570. },
  571. {
  572. "id": "10000000000000000000000000000wf02",
  573. "name": "WorkflowPending",
  574. "path": "pending",
  575. "component": "/system/workflow/task-pending/index",
  576. "meta": {"title": "待办中心", "keepAlive": True, "menuCode": "workflow:pending"},
  577. },
  578. {
  579. "id": "10000000000000000000000000000wf03",
  580. "name": "WorkflowCompleted",
  581. "path": "completed",
  582. "component": "/system/workflow/task-completed/index",
  583. "meta": {"title": "已办中心", "keepAlive": True, "menuCode": "workflow:completed"},
  584. },
  585. {
  586. "id": "10000000000000000000000000000wf05",
  587. "name": "WorkflowMyApplications",
  588. "path": "my-applications",
  589. "component": "/system/workflow/my-applications/index",
  590. "meta": {"title": "我的申请", "keepAlive": True, "menuCode": "workflow:myApplications"},
  591. },
  592. {
  593. "id": "10000000000000000000000000000wf04",
  594. "name": "LeaveRequest",
  595. "path": "leave",
  596. "component": "/system/leave/index",
  597. "meta": {"title": "请假申请", "keepAlive": True, "menuCode": "workflow:leave"},
  598. },
  599. ],
  600. },
  601. # ────────────────────────────────────────────
  602. # 14. 系统管理
  603. # ────────────────────────────────────────────
  604. {
  605. "id": "SYSM000000000000000000000000000001",
  606. "name": "SystemManage",
  607. "path": "/system",
  608. "component": "/index/index",
  609. "meta": {
  610. "title": "系统管理",
  611. "icon": "ri:settings-3-line",
  612. "keepAlive": False,
  613. "roles": ["admin"],
  614. },
  615. "children": [
  616. {
  617. "id": "101",
  618. "name": "Tenant",
  619. "path": "tenant",
  620. "component": "/system/tenant/index",
  621. "meta": {"title": "租户管理", "keepAlive": True, "menuCode": "system:tenant:list"},
  622. },
  623. {
  624. "id": "102",
  625. "name": "Dict",
  626. "path": "dict",
  627. "component": "/system/dict/index",
  628. "meta": {"title": "字典管理", "keepAlive": True, "menuCode": "system:dict:list"},
  629. },
  630. {
  631. "id": "106",
  632. "name": "Menu",
  633. "path": "menu",
  634. "component": "/system/menu/index",
  635. "meta": {"title": "菜单管理", "keepAlive": True, "menuCode": "system:menu:list"},
  636. },
  637. {
  638. "id": "103",
  639. "name": "Dept",
  640. "path": "dept",
  641. "component": "/system/dept/index",
  642. "meta": {"title": "组织管理", "keepAlive": True, "menuCode": "system:dept:list"},
  643. },
  644. {
  645. "id": "105",
  646. "name": "Role",
  647. "path": "role",
  648. "component": "/system/role/index",
  649. "meta": {"title": "角色管理", "keepAlive": True, "menuCode": "system:role:list"},
  650. },
  651. {
  652. "id": "104",
  653. "name": "User",
  654. "path": "user",
  655. "component": "/system/user/index",
  656. "meta": {"title": "用户管理", "keepAlive": True, "menuCode": "system:user:list"},
  657. },
  658. {
  659. "id": "108",
  660. "name": "Post",
  661. "path": "post",
  662. "component": "/system/post/index",
  663. "meta": {"title": "职位管理", "keepAlive": True, "menuCode": "system:post:list"},
  664. },
  665. {
  666. "id": "10000000000000000000000000000008",
  667. "name": "UserDetail",
  668. "path": "user/detail",
  669. "component": "/system/user/detail",
  670. "meta": {"title": "用户详情", "isHide": True, "keepAlive": True},
  671. },
  672. ],
  673. },
  674. ]
  675. @router.get("/list")
  676. def get_menu_list(_user: dict = Depends(require_admin_or_super_admin)):
  677. """获取菜单列表(与当前前端路由一致)"""
  678. return success_response({"menuList": STATIC_MENU_TREE})