menu.py 51 KB

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