menu.py 51 KB

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