menu.py 47 KB

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