menu.py 50 KB

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