menu.py 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889
  1. """运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,5 个一级菜单分组)"""
  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 一致:5 个一级菜单分组
  7. STATIC_MENU_TREE = [
  8. # ────────────────────────────────────────────
  9. # 1. 市场 (menu:market)
  10. # ────────────────────────────────────────────
  11. {
  12. "id": "TOP00000000000000000000000000001",
  13. "name": "Market",
  14. "path": "/market",
  15. "component": "/index/index",
  16. "meta": {
  17. "title": "市场",
  18. "icon": "ri:store-2-line",
  19. "keepAlive": False,
  20. "isTopMenu": True,
  21. "menuCode": "menu:market",
  22. "roles": ["admin"],
  23. },
  24. "children": [
  25. # 细胞存储
  26. {
  27. "id": "CEL00000000000000000000000000001",
  28. "name": "CellStorage",
  29. "path": "cell-storage",
  30. "component": "",
  31. "meta": {
  32. "title": "细胞存储",
  33. "icon": "ri:test-tube-line",
  34. "keepAlive": False,
  35. "roles": ["admin"],
  36. },
  37. "children": [
  38. {
  39. "id": "50000000000000000000000000000002",
  40. "name": "CellStorageProtocol",
  41. "path": "protocol",
  42. "component": "/cell-storage/protocol/index",
  43. "meta": {"title": "采集协议单录入", "keepAlive": True, "isHide": True, "menuCode": "biz:cellStorageProtocol:list"},
  44. },
  45. {
  46. "id": "50000000000000000000000000000003",
  47. "name": "CellStorageProtocolAudit",
  48. "path": "protocol-audit",
  49. "component": "/cell-storage/protocol-audit/index",
  50. "meta": {"title": "采集协议单", "keepAlive": True, "menuCode": "biz:cellStorageProtocolAudit:list"},
  51. },
  52. {
  53. "id": "50000000000000000000000000000013",
  54. "name": "CellStorageSampleInfo",
  55. "path": "sample-info",
  56. "component": "/cell-storage/sample-info/index",
  57. "meta": {"title": "样本信息管理", "keepAlive": True, "menuCode": "cell-storage:sample-info:list"},
  58. },
  59. {
  60. "id": "50000000000000000000000000000004",
  61. "name": "CellStoragePaymentConfirm",
  62. "path": "payment-confirm",
  63. "component": "/cell-storage/payment-confirm/index",
  64. "meta": {"title": "缴退费财务确认", "keepAlive": True, "menuCode": "biz:cellStoragePaymentConfirm:list"},
  65. },
  66. {
  67. "id": "70000000000000000000000000000011",
  68. "name": "CellStorageStorageReleaseReview",
  69. "path": "storage-release-review",
  70. "component": "/quality-inspection/storage-release-review/index",
  71. "meta": {"title": "入库放行审核", "keepAlive": True, "menuCode": "biz:storageReleaseReview:list"},
  72. },
  73. ],
  74. },
  75. # 科研捐赠
  76. {
  77. "id": "RSC00000000000000000000000000001",
  78. "name": "ResearchDonation",
  79. "path": "research-donation",
  80. "component": "",
  81. "meta": {
  82. "title": "科研捐赠",
  83. "icon": "ri:hand-heart-line",
  84. "keepAlive": False,
  85. "roles": ["admin"],
  86. },
  87. "children": [
  88. {
  89. "id": "60000000000000000000000000000002",
  90. "name": "ResearchDonationList",
  91. "path": "list",
  92. "component": "/research-donation/list/index",
  93. "meta": {"title": "捐赠协议单录入", "keepAlive": True, "isHide": True, "menuCode": "biz:researchDonation:list"},
  94. },
  95. {
  96. "id": "60000000000000000000000000000003",
  97. "name": "ResearchDonationAudit",
  98. "path": "audit",
  99. "component": "/research-donation/audit/index",
  100. "meta": {"title": "捐赠协议单", "keepAlive": True, "menuCode": "biz:researchDonationAudit:list"},
  101. },
  102. {
  103. "id": "60000000000000000000000000000004",
  104. "name": "ResearchDonationSampleInfo",
  105. "path": "sample-info",
  106. "component": "/research-donation/sample-info/index",
  107. "meta": {"title": "样本信息管理", "keepAlive": True, "menuCode": "research-donation:sample-info:list"},
  108. },
  109. ],
  110. },
  111. # 中试服务
  112. {
  113. "id": "PIL00000000000000000000000000001",
  114. "name": "PilotService",
  115. "path": "pilot-service",
  116. "component": "",
  117. "meta": {
  118. "title": "中试服务",
  119. "icon": "ri:flask-line",
  120. "keepAlive": False,
  121. "roles": ["admin"],
  122. },
  123. "children": [
  124. {
  125. "id": "80000000000000000000000000000010",
  126. "name": "PilotApplication",
  127. "path": "pilot-application",
  128. "component": "/pilot-service/pilot-application/index",
  129. "meta": {"title": "中试服务申请单", "keepAlive": True, "menuCode": "pilot-service:pilot-application:list"},
  130. },
  131. {
  132. "id": "PIL00000000000000000000000000004",
  133. "name": "PilotOutboundRelease",
  134. "path": "outbound-release-review",
  135. "component": "/pilot-service/outbound-release-review/index",
  136. "meta": {"title": "出库放行审核", "keepAlive": True, "menuCode": "pilot-service:outbound-release-review:list"},
  137. },
  138. ],
  139. },
  140. # 基础实验
  141. {
  142. "id": "BEX00000000000000000000000000001",
  143. "name": "BasicExperiment",
  144. "path": "basic-experiment",
  145. "component": "",
  146. "meta": {
  147. "title": "基础实验",
  148. "icon": "ri:flask-line",
  149. "keepAlive": False,
  150. "roles": ["admin"],
  151. },
  152. "children": [
  153. {
  154. "id": "BEX00000000000000000000000000002",
  155. "name": "BasicExperimentApplication",
  156. "path": "application",
  157. "component": "/pilot-service/pilot-application/index",
  158. "meta": {
  159. "title": "基础实验申请单",
  160. "keepAlive": True,
  161. "menuCode": "basic-experiment:application:list",
  162. },
  163. },
  164. {
  165. "id": "BEX00000000000000000000000000003",
  166. "name": "BasicExperimentPaymentConfirm",
  167. "path": "payment-confirm",
  168. "component": "/pilot-service/clinical-payment-confirm/index",
  169. "meta": {
  170. "title": "缴退费财务确认",
  171. "keepAlive": True,
  172. "menuCode": "basic-experiment:payment-confirm:list",
  173. },
  174. },
  175. {
  176. "id": "BEX00000000000000000000000000004",
  177. "name": "BasicExperimentOutboundRelease",
  178. "path": "outbound-release-review",
  179. "component": "/pilot-service/outbound-release-review/index",
  180. "meta": {
  181. "title": "出库放行审核",
  182. "keepAlive": True,
  183. "menuCode": "basic-experiment:outbound-release-review:list",
  184. },
  185. },
  186. ],
  187. },
  188. # 市场基础信息
  189. {
  190. "id": "MKT00000000000000000000000000001",
  191. "name": "MarketInfo",
  192. "path": "market-info",
  193. "component": "",
  194. "meta": {
  195. "title": "市场基础信息",
  196. "icon": "ri:price-tag-3-line",
  197. "keepAlive": False,
  198. "roles": ["admin"],
  199. },
  200. "children": [
  201. {
  202. "id": "122",
  203. "name": "BizCellSampleType",
  204. "path": "cell-sample-type",
  205. "component": "/basic-info/cell-sample-type/index",
  206. "meta": {"title": "细胞样本基础信息维护", "keepAlive": True, "menuCode": "biz:cellSampleType:list"},
  207. },
  208. {
  209. "id": "123",
  210. "name": "BizCollectionRegion",
  211. "path": "collection-region",
  212. "component": "/basic-info/collection-region/index",
  213. "meta": {"title": "细胞采集基础信息维护", "keepAlive": True, "menuCode": "biz:collectionRegion:list"},
  214. },
  215. {
  216. "id": "80000000000000000000000000000002",
  217. "name": "CellProductType",
  218. "path": "cell-product-type",
  219. "component": "/pilot-service/cell-product-type/index",
  220. "meta": {"title": "细胞产品基础信息维护", "keepAlive": True, "menuCode": "pilot-service:cell-product-type:list"},
  221. },
  222. {
  223. "id": "40000000000000000000000000000007",
  224. "name": "BasicInfoInsuranceCompany",
  225. "path": "insurance-company",
  226. "component": "/basic-info/insurance-company/index",
  227. "meta": {"title": "保险公司及险种价格", "keepAlive": True, "menuCode": "basic-info:insurance-company:list"},
  228. },
  229. {
  230. "id": "80000000000000000000000000000007",
  231. "name": "CheckupInstitution",
  232. "path": "checkup-institution",
  233. "component": "/pilot-service/checkup-institution/index",
  234. "meta": {"title": "体检机构及项目价格", "keepAlive": True, "menuCode": "pilot-service:checkup-institution:list"},
  235. },
  236. {
  237. "id": "50000000000000000000000000000009",
  238. "name": "MarketMaterial",
  239. "path": "material",
  240. "component": "/cell-storage/material/index",
  241. "meta": {"title": "市场物料库", "keepAlive": True, "menuCode": "biz:material:list"},
  242. },
  243. {
  244. "id": "121",
  245. "name": "BizCustomer",
  246. "path": "customer",
  247. "component": "/basic-info/customer/index",
  248. "meta": {"title": "客户管理", "keepAlive": True, "menuCode": "biz:customer:list"},
  249. },
  250. {
  251. "id": "80000000000000000000000000000006",
  252. "name": "Channel",
  253. "path": "channel",
  254. "component": "/pilot-service/channel/index",
  255. "meta": {"title": "渠道信息管理", "keepAlive": True, "menuCode": "pilot-service:channel:list"},
  256. },
  257. {
  258. "id": "80000000000000000000000000000009",
  259. "name": "ChannelServiceOrderFinance",
  260. "path": "channel-service-order-finance",
  261. "component": "/pilot-service/channel-service-order-finance/index",
  262. "meta": {"title": "渠道服务订单(财务确认)", "keepAlive": True, "menuCode": "pilot-service:channel-service-order-finance:list"},
  263. },
  264. ],
  265. },
  266. ],
  267. },
  268. # ────────────────────────────────────────────
  269. # 2. 生产 (menu:production)
  270. # ────────────────────────────────────────────
  271. {
  272. "id": "TOP00000000000000000000000000002",
  273. "name": "Production",
  274. "path": "/production-group",
  275. "component": "/index/index",
  276. "meta": {
  277. "title": "生产",
  278. "icon": "ri:building-4-line",
  279. "keepAlive": False,
  280. "isTopMenu": True,
  281. "menuCode": "menu:production",
  282. "roles": ["admin"],
  283. },
  284. "children": [
  285. # 临床应用
  286. {
  287. "id": "CLI00000000000000000000000000001",
  288. "name": "ClinicalApplication",
  289. "path": "clinical-application",
  290. "component": "",
  291. "meta": {
  292. "title": "临床应用",
  293. "icon": "ri:heart-pulse-line",
  294. "keepAlive": False,
  295. "isHide": True,
  296. "roles": ["admin"],
  297. },
  298. "children": [
  299. {
  300. "id": "CLI00000000000000000000000000002",
  301. "name": "ClinicalApplicationList",
  302. "path": "clinical-application",
  303. "component": "/pilot-service/pilot-application/index",
  304. "meta": {
  305. "title": "临床申请单",
  306. "keepAlive": True,
  307. "isHide": True,
  308. "menuCode": "clinical-application:application:list",
  309. },
  310. },
  311. {
  312. "id": "CLI00000000000000000000000000003",
  313. "name": "ClinicalCheckupManagement",
  314. "path": "clinical-checkup-management",
  315. "component": "/pilot-service/checkup-management/index",
  316. "meta": {
  317. "title": "体检管理",
  318. "keepAlive": True,
  319. "isHide": True,
  320. "menuCode": "clinical-application:checkup-management:list",
  321. },
  322. },
  323. {
  324. "id": "CLI00000000000000000000000000004",
  325. "name": "ClinicalInfusionSchedule",
  326. "path": "clinical-infusion-schedule-management",
  327. "component": "/pilot-service/infusion-schedule-management/index",
  328. "meta": {
  329. "title": "输注计划管理",
  330. "keepAlive": False,
  331. "isHide": True,
  332. "menuCode": "clinical-application:infusion-schedule-management:list",
  333. },
  334. },
  335. {
  336. "id": "CLI00000000000000000000000000005",
  337. "name": "ClinicalPaymentInfo",
  338. "path": "clinical-payment-info",
  339. "component": "/pilot-service/clinical-payment-info/index",
  340. "meta": {
  341. "title": "缴费信息",
  342. "keepAlive": False,
  343. "isHide": True,
  344. "menuCode": "clinical-application:payment-info:list",
  345. },
  346. },
  347. {
  348. "id": "CLI00000000000000000000000000006",
  349. "name": "ClinicalPaymentConfirm",
  350. "path": "clinical-payment-confirm",
  351. "component": "/pilot-service/clinical-payment-confirm/index",
  352. "meta": {
  353. "title": "缴退费财务确认",
  354. "keepAlive": True,
  355. "isHide": True,
  356. "menuCode": "clinical-application:payment-confirm:list",
  357. },
  358. },
  359. {
  360. "id": "CLI00000000000000000000000000007",
  361. "name": "ClinicalRefundConfirm",
  362. "path": "clinical-refund-confirm",
  363. "component": "/pilot-service/clinical-refund-confirm/index",
  364. "meta": {"title": "退费确认(财务)", "keepAlive": True, "menuCode": "clinical-application:refund-confirm:list"},
  365. },
  366. {
  367. "id": "CLI00000000000000000000000000008",
  368. "name": "ClinicalOutboundRelease",
  369. "path": "clinical-outbound-release-review",
  370. "component": "/pilot-service/outbound-release-review/index",
  371. "meta": {
  372. "title": "出库放行审核",
  373. "keepAlive": True,
  374. "isHide": True,
  375. "menuCode": "clinical-application:outbound-release-review:list",
  376. },
  377. },
  378. ],
  379. },
  380. # 生产管理
  381. {
  382. "id": "PRM00000000000000000000000000001",
  383. "name": "ProductionManage",
  384. "path": "production",
  385. "component": "",
  386. "meta": {
  387. "title": "生产管理",
  388. "icon": "grid",
  389. "keepAlive": False,
  390. "roles": ["admin"],
  391. },
  392. "children": [
  393. {
  394. "id": "61000000000000000000000000000003",
  395. "name": "ProductionStorageFacility",
  396. "path": "storage-facility",
  397. "component": "/operations/storage-facility/index",
  398. "meta": {"title": "库位管理", "keepAlive": True, "menuCode": "operations:storage-facility:list"},
  399. },
  400. {
  401. "id": "90000000000000000000000000000013",
  402. "name": "CellProduct",
  403. "path": "cell-product",
  404. "component": "/production/cell-product/index",
  405. "meta": {"title": "细胞产品库", "keepAlive": True, "menuCode": "production:cell-product:list"},
  406. },
  407. {
  408. "id": "90000000000000000000000000000011",
  409. "name": "ProductionWorkOrder",
  410. "path": "production-work-order",
  411. "component": "/production/production-work-order/index",
  412. "meta": {"title": "生产工单", "keepAlive": True, "menuCode": "production:work-order:list"},
  413. },
  414. {
  415. "id": "94000000000000000000000000000001",
  416. "name": "ProductionMyProductionTask",
  417. "path": "my-production-task",
  418. "component": "/production/my-production-task/index",
  419. "meta": {"title": "我的生产任务", "keepAlive": True, "menuCode": "production:my-task:list"},
  420. },
  421. {
  422. "id": "94000000000000000000000000000002",
  423. "name": "ProductionMyMaterialUsage",
  424. "path": "my-production-material-usage",
  425. "component": "/production/my-production-material-usage/index",
  426. "meta": {
  427. "title": "我的物料领用记录",
  428. "keepAlive": True,
  429. "menuCode": "production:my-material-usage:list",
  430. },
  431. },
  432. {
  433. "id": "91000000000000000000000000000001",
  434. "name": "ProductionSampleReceptionCompletion",
  435. "path": "sample-reception-completion",
  436. "component": "/production/sample-reception-completion/index",
  437. "meta": {
  438. "title": "样本接收信息完善",
  439. "keepAlive": True,
  440. "menuCode": "production:sample-reception-completion:list",
  441. },
  442. },
  443. {
  444. "id": "95000000000000000000000000000003",
  445. "name": "ProductionCleanroomGarment",
  446. "path": "cleanroom-garment",
  447. "component": "/production/cleanroom-garment/index",
  448. "meta": {
  449. "title": "洁净服管理",
  450. "keepAlive": True,
  451. "menuCode": "production:cleanroom-garment:list",
  452. },
  453. },
  454. ],
  455. },
  456. # 生产基础信息
  457. {
  458. "id": "PRB00000000000000000000000000001",
  459. "name": "ProductionBase",
  460. "path": "production-base",
  461. "component": "",
  462. "meta": {
  463. "title": "生产基础信息",
  464. "icon": "ri:tools-line",
  465. "keepAlive": False,
  466. "roles": ["admin"],
  467. },
  468. "children": [
  469. {
  470. "id": "90000000000000000000000000000014",
  471. "name": "ProductionMaterial",
  472. "path": "production-material",
  473. "component": "/production/production-material/index",
  474. "meta": {"title": "生产物料库", "keepAlive": True, "menuCode": "production:material:list"},
  475. },
  476. {
  477. "id": "90000000000000000000000000000002",
  478. "name": "ProductionConsumable",
  479. "path": "consumable",
  480. "component": "/production/consumable/index",
  481. "meta": {
  482. "title": "耗材管理",
  483. "keepAlive": True,
  484. "isHide": True,
  485. "menuCode": "production:consumable:list",
  486. },
  487. },
  488. {
  489. "id": "90000000000000000000000000000003",
  490. "name": "ProductionReagent",
  491. "path": "reagent",
  492. "component": "/production/reagent/index",
  493. "meta": {
  494. "title": "试剂管理",
  495. "keepAlive": True,
  496. "isHide": True,
  497. "menuCode": "production:reagent:list",
  498. },
  499. },
  500. {
  501. "id": "90000000000000000000000000000004",
  502. "name": "ProductionSop",
  503. "path": "sop",
  504. "component": "/production/sop/index",
  505. "meta": {"title": "SOP文档", "keepAlive": True, "menuCode": "production:sop-document:list"},
  506. },
  507. {
  508. "id": "90000000000000000000000000000005",
  509. "name": "ProductionProcessCategory",
  510. "path": "process-category",
  511. "component": "/production/process-category/index",
  512. "meta": {"title": "工艺基础信息维护", "keepAlive": True, "menuCode": "production:process-category:list"},
  513. },
  514. {
  515. "id": "90000000000000000000000000000008",
  516. "name": "ProductionProcess",
  517. "path": "process",
  518. "component": "/production/process/index",
  519. "meta": {"title": "工艺库管理", "keepAlive": True, "menuCode": "production:process:list"},
  520. },
  521. {
  522. "id": "90000000000000000000000000000009",
  523. "name": "ProductionEquipment",
  524. "path": "equipment",
  525. "component": "/production/equipment/index",
  526. "meta": {"title": "设备管理", "keepAlive": True, "menuCode": "production:equipment:list"},
  527. },
  528. ],
  529. },
  530. ],
  531. },
  532. # ────────────────────────────────────────────
  533. # 3. 质检 (menu:quality)
  534. # ────────────────────────────────────────────
  535. {
  536. "id": "TOP00000000000000000000000000003",
  537. "name": "Quality",
  538. "path": "/quality-group",
  539. "component": "/index/index",
  540. "meta": {
  541. "title": "质检",
  542. "icon": "ri:shield-check-line",
  543. "keepAlive": False,
  544. "isTopMenu": True,
  545. "menuCode": "menu:quality",
  546. "roles": ["admin"],
  547. },
  548. "children": [
  549. # 质检管理
  550. {
  551. "id": "QCM00000000000000000000000000001",
  552. "name": "QualityManage",
  553. "path": "quality-manage",
  554. "component": "",
  555. "meta": {
  556. "title": "质检管理",
  557. "icon": "ri:shield-check-line",
  558. "keepAlive": False,
  559. "roles": ["admin"],
  560. },
  561. "children": [
  562. {
  563. "id": "70000000000000000000000000000002",
  564. "name": "QualityInspectionSampleReception",
  565. "path": "sample-reception",
  566. "component": "/quality-inspection/sample-reception/index",
  567. "meta": {"title": "样本接收", "keepAlive": True, "menuCode": "biz:sampleReception:list"},
  568. },
  569. {
  570. "id": "70000000000000000000000000000007",
  571. "name": "QualityInspectionQcWorkOrder",
  572. "path": "qc-work-order",
  573. "component": "/quality-inspection/qc-work-order/index",
  574. "meta": {"title": "质检工单", "keepAlive": True, "menuCode": "biz:qcWorkOrder:list"},
  575. },
  576. {
  577. "id": "71000000000000000000000000000002",
  578. "name": "QualityInspectionEnvDetectRecord",
  579. "path": "env-detect-record",
  580. "component": "/quality-inspection/env-detect-record/index",
  581. "meta": {"title": "环境检测管理", "keepAlive": True, "menuCode": "biz:envDetectRecord:list"},
  582. },
  583. {
  584. "id": "92000000000000000000000000000001",
  585. "name": "QualityInspectionMyQcMaterialUsage",
  586. "path": "my-qc-material-usage",
  587. "component": "/quality-inspection/my-qc-material-usage/index",
  588. "meta": {
  589. "title": "我的物料领用记录",
  590. "keepAlive": True,
  591. "menuCode": "biz:myQcMaterialUsage:list",
  592. },
  593. },
  594. {
  595. "id": "93000000000000000000000000000001",
  596. "name": "QualityInspectionMyQcTask",
  597. "path": "my-qc-task",
  598. "component": "/quality-inspection/my-qc-task/index",
  599. "meta": {
  600. "title": "我的质检任务",
  601. "keepAlive": True,
  602. "menuCode": "biz:myQcTask:list",
  603. },
  604. },
  605. ],
  606. },
  607. # 质检基础信息
  608. {
  609. "id": "QCB00000000000000000000000000001",
  610. "name": "QualityBase",
  611. "path": "quality-base",
  612. "component": "",
  613. "meta": {
  614. "title": "质检基础信息",
  615. "icon": "ri:clipboard-line",
  616. "keepAlive": False,
  617. "roles": ["admin"],
  618. },
  619. "children": [
  620. {
  621. "id": "70000000000000000000000000000003",
  622. "name": "QualityInspectionSampleReceptionCheckItem",
  623. "path": "sample-reception-check-item",
  624. "component": "/quality-inspection/sample-reception-check-item/index",
  625. "meta": {"title": "接收检查项配置", "keepAlive": True, "menuCode": "biz:sampleReceptionCheckItem:list"},
  626. },
  627. {
  628. "id": "70000000000000000000000000000006",
  629. "name": "QualityInspectionLabTestItem",
  630. "path": "lab-test-item",
  631. "component": "/quality-inspection/lab-test-item/index",
  632. "meta": {"title": "质检项目管理", "keepAlive": True, "menuCode": "biz:qcLabTestItem:list"},
  633. },
  634. {
  635. "id": "71000000000000000000000000000001",
  636. "name": "QualityInspectionEnvDetectItem",
  637. "path": "env-detect-item",
  638. "component": "/quality-inspection/env-detect-item/index",
  639. "meta": {"title": "环境检测项维护", "keepAlive": True, "menuCode": "biz:envDetectItem:list"},
  640. },
  641. {
  642. "id": "70000000000000000000000000000009",
  643. "name": "QualityInspectionQcMaterial",
  644. "path": "qc-material",
  645. "component": "/quality-inspection/qc-material/index",
  646. "meta": {"title": "质检物料库", "keepAlive": True, "menuCode": "biz:qcMaterial:list"},
  647. },
  648. ],
  649. },
  650. ],
  651. },
  652. # ────────────────────────────────────────────
  653. # 4. 运营支撑 (menu:operations)
  654. # ────────────────────────────────────────────
  655. {
  656. "id": "TOP00000000000000000000000000004",
  657. "name": "OperationsGroup",
  658. "path": "/operations-group",
  659. "component": "/index/index",
  660. "meta": {
  661. "title": "运营支撑",
  662. "icon": "ri:settings-3-line",
  663. "keepAlive": False,
  664. "isTopMenu": True,
  665. "menuCode": "menu:operations",
  666. "roles": ["admin"],
  667. },
  668. "children": [
  669. # 系统基础信息
  670. {
  671. "id": "SYSB000000000000000000000000000001",
  672. "name": "SystemBase",
  673. "path": "system-base",
  674. "component": "",
  675. "meta": {
  676. "title": "系统基础信息",
  677. "icon": "ri:archive-line",
  678. "keepAlive": False,
  679. "roles": ["admin"],
  680. },
  681. "children": [
  682. {
  683. "id": "107",
  684. "name": "Site",
  685. "path": "site",
  686. "component": "/system/site/index",
  687. "meta": {"title": "站点管理", "keepAlive": True, "menuCode": "system:site:list"},
  688. },
  689. {
  690. "id": "109",
  691. "name": "Unit",
  692. "path": "unit",
  693. "component": "/system/unit/index",
  694. "meta": {"title": "物品单位管理", "keepAlive": True, "menuCode": "system:unit:list"},
  695. },
  696. {
  697. "id": "110",
  698. "name": "Express",
  699. "path": "express",
  700. "component": "/system/express/index",
  701. "meta": {"title": "快递公司", "keepAlive": True, "menuCode": "system:express:list"},
  702. },
  703. ],
  704. },
  705. # 运营支撑
  706. {
  707. "id": "OPS00000000000000000000000000001",
  708. "name": "Operations",
  709. "path": "operations",
  710. "component": "",
  711. "meta": {
  712. "title": "运营支撑",
  713. "icon": "operation",
  714. "keepAlive": False,
  715. "roles": ["admin"],
  716. },
  717. "children": [
  718. {
  719. "id": "61000000000000000000000000000002",
  720. "name": "CleanRoom",
  721. "path": "clean-room",
  722. "component": "/operations/clean-room/index",
  723. "meta": {"title": "洁净室管理", "keepAlive": True, "menuCode": "operations:clean-room:list"},
  724. },
  725. {
  726. "id": "61000000000000000000000000000004",
  727. "name": "ExhibitionAppointment",
  728. "path": "exhibition-appointment",
  729. "component": "/operations/exhibition-appointment/index",
  730. "meta": {"title": "展馆预约", "keepAlive": True, "menuCode": "operations:exhibition-appointment:list"},
  731. },
  732. ],
  733. },
  734. ],
  735. },
  736. # ────────────────────────────────────────────
  737. # 5. 系统管理 (menu:system-manage)
  738. # ────────────────────────────────────────────
  739. {
  740. "id": "TOP00000000000000000000000000005",
  741. "name": "SystemManageGroup",
  742. "path": "/system-manage",
  743. "component": "/index/index",
  744. "meta": {
  745. "title": "系统管理",
  746. "icon": "ri:server-line",
  747. "keepAlive": False,
  748. "isTopMenu": True,
  749. "menuCode": "menu:system-manage",
  750. "roles": ["admin"],
  751. },
  752. "children": [
  753. # 系统管理
  754. {
  755. "id": "SYSM000000000000000000000000000001",
  756. "name": "SystemManage",
  757. "path": "system",
  758. "component": "",
  759. "meta": {
  760. "title": "系统管理",
  761. "icon": "ri:settings-3-line",
  762. "keepAlive": False,
  763. "roles": ["admin"],
  764. },
  765. "children": [
  766. {
  767. "id": "101",
  768. "name": "Tenant",
  769. "path": "tenant",
  770. "component": "/system/tenant/index",
  771. "meta": {"title": "租户管理", "keepAlive": True, "menuCode": "system:tenant:list"},
  772. },
  773. {
  774. "id": "102",
  775. "name": "Dict",
  776. "path": "dict",
  777. "component": "/system/dict/index",
  778. "meta": {"title": "字典管理", "keepAlive": True, "menuCode": "system:dict:list"},
  779. },
  780. {
  781. "id": "106",
  782. "name": "Menu",
  783. "path": "menu",
  784. "component": "/system/menu/index",
  785. "meta": {"title": "菜单管理", "keepAlive": True, "menuCode": "system:menu:list"},
  786. },
  787. {
  788. "id": "103",
  789. "name": "Dept",
  790. "path": "dept",
  791. "component": "/system/dept/index",
  792. "meta": {"title": "组织管理", "keepAlive": True, "menuCode": "system:dept:list"},
  793. },
  794. {
  795. "id": "105",
  796. "name": "Role",
  797. "path": "role",
  798. "component": "/system/role/index",
  799. "meta": {"title": "角色管理", "keepAlive": True, "menuCode": "system:role:list"},
  800. },
  801. {
  802. "id": "104",
  803. "name": "User",
  804. "path": "user",
  805. "component": "/system/user/index",
  806. "meta": {"title": "用户管理", "keepAlive": True, "menuCode": "system:user:list"},
  807. },
  808. {
  809. "id": "108",
  810. "name": "Post",
  811. "path": "post",
  812. "component": "/system/post/index",
  813. "meta": {"title": "职位管理", "keepAlive": True, "menuCode": "system:post:list"},
  814. },
  815. {
  816. "id": "10000000000000000000000000000008",
  817. "name": "UserDetail",
  818. "path": "user/detail",
  819. "component": "/system/user/detail",
  820. "meta": {"title": "用户详情", "isHide": True, "keepAlive": True},
  821. },
  822. ],
  823. },
  824. # 工作流管理
  825. {
  826. "id": "WKF00000000000000000000000000001",
  827. "name": "Workflow",
  828. "path": "workflow",
  829. "component": "",
  830. "meta": {
  831. "title": "工作流管理",
  832. "icon": "workflow",
  833. "keepAlive": False,
  834. "roles": ["admin"],
  835. },
  836. "children": [
  837. {
  838. "id": "10000000000000000000000000000wf01",
  839. "name": "WorkflowProcess",
  840. "path": "process",
  841. "component": "/system/workflow/process/index",
  842. "meta": {"title": "流程配置", "keepAlive": True, "menuCode": "workflow:process"},
  843. },
  844. {
  845. "id": "10000000000000000000000000000wf02",
  846. "name": "WorkflowPending",
  847. "path": "pending",
  848. "component": "/system/workflow/task-pending/index",
  849. "meta": {"title": "待办中心", "keepAlive": True, "menuCode": "workflow:pending"},
  850. },
  851. {
  852. "id": "10000000000000000000000000000wf03",
  853. "name": "WorkflowCompleted",
  854. "path": "completed",
  855. "component": "/system/workflow/task-completed/index",
  856. "meta": {"title": "已办中心", "keepAlive": True, "menuCode": "workflow:completed"},
  857. },
  858. {
  859. "id": "10000000000000000000000000000wf05",
  860. "name": "WorkflowMyApplications",
  861. "path": "my-applications",
  862. "component": "/system/workflow/my-applications/index",
  863. "meta": {"title": "我的申请", "keepAlive": True, "menuCode": "workflow:myApplications"},
  864. },
  865. {
  866. "id": "10000000000000000000000000000wf04",
  867. "name": "LeaveRequest",
  868. "path": "leave",
  869. "component": "/system/leave/index",
  870. "meta": {"title": "请假申请", "keepAlive": True, "menuCode": "workflow:leave"},
  871. },
  872. ],
  873. },
  874. ],
  875. },
  876. ]
  877. @router.get("/list")
  878. async def get_menu_list(_user: dict = Depends(require_admin_or_super_admin)):
  879. """获取菜单列表(与当前前端路由一致)"""
  880. return success_response({"menuList": STATIC_MENU_TREE})