menu.py 53 KB

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