menu.py 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043
  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": "95400000000000000000000000000001",
  427. "name": "ProductionStorageReleaseReview",
  428. "path": "storage-release-review",
  429. "component": "/quality-inspection/storage-release-review/index",
  430. "meta": {"title": "入库放行审核", "keepAlive": True, "menuCode": "production:storageReleaseReview:list"},
  431. },
  432. {
  433. "id": "94000000000000000000000000000001",
  434. "name": "ProductionMyProductionTask",
  435. "path": "my-production-task",
  436. "component": "/production/my-production-task/index",
  437. "meta": {"title": "我的生产任务", "keepAlive": True, "menuCode": "production:my-task:list"},
  438. },
  439. {
  440. "id": "94000000000000000000000000000002",
  441. "name": "ProductionMyMaterialUsage",
  442. "path": "my-production-material-usage",
  443. "component": "/production/my-production-material-usage/index",
  444. "meta": {
  445. "title": "我的物料领用记录",
  446. "keepAlive": True,
  447. "menuCode": "production:my-material-usage:list",
  448. },
  449. },
  450. {
  451. "id": "91000000000000000000000000000001",
  452. "name": "ProductionSampleReceptionCompletion",
  453. "path": "sample-reception-completion",
  454. "component": "/production/sample-reception-completion/index",
  455. "meta": {
  456. "title": "样本接收信息完善",
  457. "keepAlive": True,
  458. "menuCode": "production:sample-reception-completion:list",
  459. },
  460. },
  461. {
  462. "id": "95000000000000000000000000000003",
  463. "name": "ProductionCleanroomGarment",
  464. "path": "cleanroom-garment",
  465. "component": "/production/cleanroom-garment/index",
  466. "meta": {
  467. "title": "洁净服管理",
  468. "keepAlive": True,
  469. "menuCode": "production:cleanroom-garment:list",
  470. },
  471. },
  472. {
  473. "id": "95300000000000000000000000000001",
  474. "name": "ProductionWasteOutput",
  475. "path": "waste-output",
  476. "component": "/production/waste-output/index",
  477. "meta": {
  478. "title": "废弃物管理",
  479. "keepAlive": True,
  480. "menuCode": "production:waste-output:list",
  481. },
  482. },
  483. ],
  484. },
  485. # 生产基础信息
  486. {
  487. "id": "PRB00000000000000000000000000001",
  488. "name": "ProductionBase",
  489. "path": "production-base",
  490. "component": "",
  491. "meta": {
  492. "title": "生产基础信息",
  493. "icon": "ri:tools-line",
  494. "keepAlive": False,
  495. "roles": ["admin"],
  496. },
  497. "children": [
  498. {
  499. "id": "90000000000000000000000000000014",
  500. "name": "ProductionMaterial",
  501. "path": "production-material",
  502. "component": "/production/production-material/index",
  503. "meta": {"title": "生产物料库", "keepAlive": True, "menuCode": "production:material:list"},
  504. },
  505. {
  506. "id": "90000000000000000000000000000002",
  507. "name": "ProductionConsumable",
  508. "path": "consumable",
  509. "component": "/production/consumable/index",
  510. "meta": {
  511. "title": "耗材管理",
  512. "keepAlive": True,
  513. "isHide": True,
  514. "menuCode": "production:consumable:list",
  515. },
  516. },
  517. {
  518. "id": "90000000000000000000000000000003",
  519. "name": "ProductionReagent",
  520. "path": "reagent",
  521. "component": "/production/reagent/index",
  522. "meta": {
  523. "title": "试剂管理",
  524. "keepAlive": True,
  525. "isHide": True,
  526. "menuCode": "production:reagent:list",
  527. },
  528. },
  529. {
  530. "id": "90000000000000000000000000000004",
  531. "name": "ProductionSop",
  532. "path": "sop",
  533. "component": "/production/sop/index",
  534. "meta": {"title": "SOP文档", "keepAlive": True, "menuCode": "production:sop-document:list"},
  535. },
  536. {
  537. "id": "90000000000000000000000000000005",
  538. "name": "ProductionProcessCategory",
  539. "path": "process-category",
  540. "component": "/production/process-category/index",
  541. "meta": {"title": "工艺基础信息维护", "keepAlive": True, "menuCode": "production:process-category:list"},
  542. },
  543. {
  544. "id": "90000000000000000000000000000008",
  545. "name": "ProductionProcess",
  546. "path": "process",
  547. "component": "/production/process/index",
  548. "meta": {"title": "工艺库管理", "keepAlive": True, "menuCode": "production:process:list"},
  549. },
  550. {
  551. "id": "90000000000000000000000000000009",
  552. "name": "ProductionEquipment",
  553. "path": "equipment",
  554. "component": "/production/equipment/index",
  555. "meta": {"title": "设备管理", "keepAlive": True, "menuCode": "production:equipment:list"},
  556. },
  557. ],
  558. },
  559. ],
  560. },
  561. # ────────────────────────────────────────────
  562. # 3. 质检 (menu:quality)
  563. # ────────────────────────────────────────────
  564. {
  565. "id": "TOP00000000000000000000000000003",
  566. "name": "Quality",
  567. "path": "/quality-group",
  568. "component": "/index/index",
  569. "meta": {
  570. "title": "质检",
  571. "icon": "ri:shield-check-line",
  572. "keepAlive": False,
  573. "isTopMenu": True,
  574. "menuCode": "menu:quality",
  575. "roles": ["admin"],
  576. },
  577. "children": [
  578. # 质检管理
  579. {
  580. "id": "QCM00000000000000000000000000001",
  581. "name": "QualityManage",
  582. "path": "quality-manage",
  583. "component": "",
  584. "meta": {
  585. "title": "质检管理",
  586. "icon": "ri:shield-check-line",
  587. "keepAlive": False,
  588. "roles": ["admin"],
  589. },
  590. "children": [
  591. {
  592. "id": "70000000000000000000000000000002",
  593. "name": "QualityInspectionSampleReception",
  594. "path": "sample-reception",
  595. "component": "/quality-inspection/sample-reception/index",
  596. "meta": {"title": "样本接收", "keepAlive": True, "menuCode": "biz:sampleReception:list"},
  597. },
  598. {
  599. "id": "70000000000000000000000000000007",
  600. "name": "QualityInspectionQcWorkOrder",
  601. "path": "qc-work-order",
  602. "component": "/quality-inspection/qc-work-order/index",
  603. "meta": {"title": "质检工单", "keepAlive": True, "menuCode": "biz:qcWorkOrder:list"},
  604. },
  605. {
  606. "id": "70000000000000000000000000000014",
  607. "name": "QualityInspectionStorageReleaseReview",
  608. "path": "storage-release-review",
  609. "component": "/quality-inspection/storage-release-review/index",
  610. "meta": {"title": "入库放行审核", "keepAlive": True, "menuCode": "quality:storageReleaseReview:list"},
  611. },
  612. {
  613. "id": "71000000000000000000000000000002",
  614. "name": "QualityInspectionEnvDetectRecord",
  615. "path": "env-detect-record",
  616. "component": "/quality-inspection/env-detect-record/index",
  617. "meta": {"title": "环境检测管理", "keepAlive": True, "menuCode": "biz:envDetectRecord:list"},
  618. },
  619. {
  620. "id": "92000000000000000000000000000001",
  621. "name": "QualityInspectionMyQcMaterialUsage",
  622. "path": "my-qc-material-usage",
  623. "component": "/quality-inspection/my-qc-material-usage/index",
  624. "meta": {
  625. "title": "我的物料领用记录",
  626. "keepAlive": True,
  627. "menuCode": "biz:myQcMaterialUsage:list",
  628. },
  629. },
  630. {
  631. "id": "93000000000000000000000000000001",
  632. "name": "QualityInspectionMyQcTask",
  633. "path": "my-qc-task",
  634. "component": "/quality-inspection/my-qc-task/index",
  635. "meta": {
  636. "title": "我的质检任务",
  637. "keepAlive": True,
  638. "menuCode": "biz:myQcTask:list",
  639. },
  640. },
  641. ],
  642. },
  643. # 质检基础信息
  644. {
  645. "id": "QCB00000000000000000000000000001",
  646. "name": "QualityBase",
  647. "path": "quality-base",
  648. "component": "",
  649. "meta": {
  650. "title": "质检基础信息",
  651. "icon": "ri:clipboard-line",
  652. "keepAlive": False,
  653. "roles": ["admin"],
  654. },
  655. "children": [
  656. {
  657. "id": "70000000000000000000000000000003",
  658. "name": "QualityInspectionSampleReceptionCheckItem",
  659. "path": "sample-reception-check-item",
  660. "component": "/quality-inspection/sample-reception-check-item/index",
  661. "meta": {"title": "接收检查项配置", "keepAlive": True, "menuCode": "biz:sampleReceptionCheckItem:list"},
  662. },
  663. {
  664. "id": "70000000000000000000000000000006",
  665. "name": "QualityInspectionLabTestItem",
  666. "path": "lab-test-item",
  667. "component": "/quality-inspection/lab-test-item/index",
  668. "meta": {"title": "质检项目管理", "keepAlive": True, "menuCode": "biz:qcLabTestItem:list"},
  669. },
  670. {
  671. "id": "71000000000000000000000000000001",
  672. "name": "QualityInspectionEnvDetectItem",
  673. "path": "env-detect-item",
  674. "component": "/quality-inspection/env-detect-item/index",
  675. "meta": {"title": "环境检测项维护", "keepAlive": True, "menuCode": "biz:envDetectItem:list"},
  676. },
  677. {
  678. "id": "70000000000000000000000000000009",
  679. "name": "QualityInspectionQcMaterial",
  680. "path": "qc-material",
  681. "component": "/quality-inspection/qc-material/index",
  682. "meta": {"title": "质检物料库", "keepAlive": True, "menuCode": "biz:qcMaterial:list"},
  683. },
  684. {
  685. "id": "95100000000000000000000000000001",
  686. "name": "QualityInspectionQcMaterialAmountAuth",
  687. "path": "qc-material-amount-auth",
  688. "component": "/quality-inspection/qc-material-amount-auth/index",
  689. "meta": {
  690. "title": "质检物料金额查看授权",
  691. "keepAlive": True,
  692. "menuCode": "biz:qcMaterialAmountAuth:list",
  693. },
  694. },
  695. ],
  696. },
  697. ],
  698. },
  699. # ────────────────────────────────────────────
  700. # 4. 运营支撑 (menu:operations)
  701. # ────────────────────────────────────────────
  702. {
  703. "id": "TOP00000000000000000000000000004",
  704. "name": "OperationsGroup",
  705. "path": "/operations-group",
  706. "component": "/index/index",
  707. "meta": {
  708. "title": "运营支撑",
  709. "icon": "ri:settings-3-line",
  710. "keepAlive": False,
  711. "isTopMenu": True,
  712. "menuCode": "menu:operations",
  713. "roles": ["admin"],
  714. },
  715. "children": [
  716. # 系统基础信息
  717. {
  718. "id": "SYSB000000000000000000000000000001",
  719. "name": "SystemBase",
  720. "path": "system-base",
  721. "component": "",
  722. "meta": {
  723. "title": "系统基础信息",
  724. "icon": "ri:archive-line",
  725. "keepAlive": False,
  726. "roles": ["admin"],
  727. },
  728. "children": [
  729. {
  730. "id": "107",
  731. "name": "Site",
  732. "path": "site",
  733. "component": "/system/site/index",
  734. "meta": {"title": "站点管理", "keepAlive": True, "menuCode": "system:site:list"},
  735. },
  736. {
  737. "id": "109",
  738. "name": "Unit",
  739. "path": "unit",
  740. "component": "/system/unit/index",
  741. "meta": {"title": "物品单位管理", "keepAlive": True, "menuCode": "system:unit:list"},
  742. },
  743. {
  744. "id": "110",
  745. "name": "Express",
  746. "path": "express",
  747. "component": "/system/express/index",
  748. "meta": {"title": "快递公司", "keepAlive": True, "menuCode": "system:express:list"},
  749. },
  750. ],
  751. },
  752. # 运营支撑
  753. {
  754. "id": "OPS00000000000000000000000000001",
  755. "name": "Operations",
  756. "path": "operations",
  757. "component": "",
  758. "meta": {
  759. "title": "运营支撑",
  760. "icon": "operation",
  761. "keepAlive": False,
  762. "roles": ["admin"],
  763. },
  764. "children": [
  765. {
  766. "id": "61000000000000000000000000000002",
  767. "name": "CleanRoom",
  768. "path": "clean-room",
  769. "component": "/operations/clean-room/index",
  770. "meta": {"title": "洁净室管理", "keepAlive": True, "menuCode": "operations:clean-room:list"},
  771. },
  772. {
  773. "id": "61000000000000000000000000000004",
  774. "name": "ExhibitionAppointment",
  775. "path": "exhibition-appointment",
  776. "component": "/operations/exhibition-appointment/index",
  777. "meta": {"title": "展馆预约", "keepAlive": True, "menuCode": "operations:exhibition-appointment:list"},
  778. },
  779. ],
  780. },
  781. ],
  782. },
  783. # ────────────────────────────────────────────
  784. # 5. 系统管理 (menu:system-manage)
  785. # ────────────────────────────────────────────
  786. {
  787. "id": "TOP00000000000000000000000000005",
  788. "name": "SystemManageGroup",
  789. "path": "/system-manage",
  790. "component": "/index/index",
  791. "meta": {
  792. "title": "系统管理",
  793. "icon": "ri:server-line",
  794. "keepAlive": False,
  795. "isTopMenu": True,
  796. "menuCode": "menu:system-manage",
  797. "roles": ["admin"],
  798. },
  799. "children": [
  800. # 系统管理
  801. {
  802. "id": "SYSM000000000000000000000000000001",
  803. "name": "SystemManage",
  804. "path": "system",
  805. "component": "",
  806. "meta": {
  807. "title": "系统管理",
  808. "icon": "ri:settings-3-line",
  809. "keepAlive": False,
  810. "roles": ["admin"],
  811. },
  812. "children": [
  813. {
  814. "id": "101",
  815. "name": "Tenant",
  816. "path": "tenant",
  817. "component": "/system/tenant/index",
  818. "meta": {"title": "租户管理", "keepAlive": True, "menuCode": "system:tenant:list"},
  819. },
  820. {
  821. "id": "102",
  822. "name": "Dict",
  823. "path": "dict",
  824. "component": "/system/dict/index",
  825. "meta": {"title": "字典管理", "keepAlive": True, "menuCode": "system:dict:list"},
  826. },
  827. {
  828. "id": "106",
  829. "name": "Menu",
  830. "path": "menu",
  831. "component": "/system/menu/index",
  832. "meta": {"title": "菜单管理", "keepAlive": True, "menuCode": "system:menu:list"},
  833. },
  834. {
  835. "id": "103",
  836. "name": "Dept",
  837. "path": "dept",
  838. "component": "/system/dept/index",
  839. "meta": {"title": "组织管理", "keepAlive": True, "menuCode": "system:dept:list"},
  840. },
  841. {
  842. "id": "105",
  843. "name": "Role",
  844. "path": "role",
  845. "component": "/system/role/index",
  846. "meta": {"title": "角色管理", "keepAlive": True, "menuCode": "system:role:list"},
  847. },
  848. {
  849. "id": "104",
  850. "name": "User",
  851. "path": "user",
  852. "component": "/system/user/index",
  853. "meta": {"title": "用户管理", "keepAlive": True, "menuCode": "system:user:list"},
  854. },
  855. {
  856. "id": "108",
  857. "name": "Post",
  858. "path": "post",
  859. "component": "/system/post/index",
  860. "meta": {"title": "职位管理", "keepAlive": True, "menuCode": "system:post:list"},
  861. },
  862. {
  863. "id": "10000000000000000000000000000008",
  864. "name": "UserDetail",
  865. "path": "user/detail",
  866. "component": "/system/user/detail",
  867. "meta": {"title": "用户详情", "isHide": True, "keepAlive": True},
  868. },
  869. ],
  870. },
  871. # OA审批(钉钉交互)
  872. {
  873. "id": "OA000000000000000000000000000001",
  874. "name": "OaApproval",
  875. "path": "oa-approval",
  876. "component": "",
  877. "meta": {
  878. "title": "OA审批",
  879. "icon": "ri:auction-line",
  880. "keepAlive": False,
  881. "roles": ["admin"],
  882. },
  883. "children": [
  884. {
  885. "id": "OA000000000000000000000000000101",
  886. "name": "OaApprovalApps",
  887. "path": "apps",
  888. "component": "/oa-approval/apps/index",
  889. "meta": {"title": "审批管理", "keepAlive": True, "menuCode": "oa:apps:list"},
  890. },
  891. {
  892. "id": "OA000000000000000000000000000103",
  893. "name": "OaApprovalStart",
  894. "path": "start",
  895. "component": "/oa-approval/start/index",
  896. "meta": {"title": "发起审批", "keepAlive": True, "menuCode": "oa:start"},
  897. },
  898. {
  899. "id": "OA000000000000000000000000000104",
  900. "name": "OaApprovalPending",
  901. "path": "pending",
  902. "component": "/oa-approval/pending/index",
  903. "meta": {"title": "待处理", "keepAlive": True, "menuCode": "oa:pending"},
  904. },
  905. {
  906. "id": "OA000000000000000000000000000105",
  907. "name": "OaApprovalDone",
  908. "path": "done",
  909. "component": "/oa-approval/done/index",
  910. "meta": {"title": "已处理", "keepAlive": True, "menuCode": "oa:done"},
  911. },
  912. {
  913. "id": "OA000000000000000000000000000106",
  914. "name": "OaApprovalMine",
  915. "path": "mine",
  916. "component": "/oa-approval/mine/index",
  917. "meta": {"title": "我发起的", "keepAlive": True, "menuCode": "oa:mine"},
  918. },
  919. {
  920. "id": "OA000000000000000000000000000107",
  921. "name": "OaApprovalCc",
  922. "path": "cc",
  923. "component": "/oa-approval/cc/index",
  924. "meta": {"title": "抄送我的", "keepAlive": True, "menuCode": "oa:cc"},
  925. },
  926. {
  927. "id": "OA000000000000000000000000000201",
  928. "name": "OaApprovalDesigner",
  929. "path": "designer/:id",
  930. "component": "/oa-approval/designer/index",
  931. "meta": {
  932. "title": "审批设计",
  933. "keepAlive": False,
  934. "isHide": True,
  935. "menuCode": "oa:designer",
  936. },
  937. },
  938. {
  939. "id": "OA000000000000000000000000000202",
  940. "name": "OaApprovalInstanceDetail",
  941. "path": "instances/:id",
  942. "component": "/oa-approval/instances/detail",
  943. "meta": {
  944. "title": "审批详情",
  945. "keepAlive": False,
  946. "isHide": True,
  947. "menuCode": "oa:instance:detail",
  948. },
  949. },
  950. ],
  951. },
  952. # 旧工作流管理(侧栏隐藏)
  953. {
  954. "id": "WKF00000000000000000000000000001",
  955. "name": "Workflow",
  956. "path": "workflow",
  957. "component": "",
  958. "meta": {
  959. "title": "工作流管理",
  960. "icon": "workflow",
  961. "keepAlive": False,
  962. "isHide": True,
  963. "roles": ["admin"],
  964. },
  965. "children": [
  966. {
  967. "id": "10000000000000000000000000000wf01",
  968. "name": "WorkflowProcess",
  969. "path": "process",
  970. "component": "/system/workflow/process/index",
  971. "meta": {
  972. "title": "流程配置",
  973. "keepAlive": True,
  974. "isHide": True,
  975. "menuCode": "workflow:process",
  976. },
  977. },
  978. {
  979. "id": "10000000000000000000000000000wf02",
  980. "name": "WorkflowPending",
  981. "path": "pending",
  982. "component": "/system/workflow/task-pending/index",
  983. "meta": {
  984. "title": "待办中心",
  985. "keepAlive": True,
  986. "isHide": True,
  987. "menuCode": "workflow:pending",
  988. },
  989. },
  990. {
  991. "id": "10000000000000000000000000000wf03",
  992. "name": "WorkflowCompleted",
  993. "path": "completed",
  994. "component": "/system/workflow/task-completed/index",
  995. "meta": {
  996. "title": "已办中心",
  997. "keepAlive": True,
  998. "isHide": True,
  999. "menuCode": "workflow:completed",
  1000. },
  1001. },
  1002. {
  1003. "id": "10000000000000000000000000000wf05",
  1004. "name": "WorkflowMyApplications",
  1005. "path": "my-applications",
  1006. "component": "/system/workflow/my-applications/index",
  1007. "meta": {
  1008. "title": "我的申请",
  1009. "keepAlive": True,
  1010. "isHide": True,
  1011. "menuCode": "workflow:myApplications",
  1012. },
  1013. },
  1014. {
  1015. "id": "10000000000000000000000000000wf04",
  1016. "name": "LeaveRequest",
  1017. "path": "leave",
  1018. "component": "/system/leave/index",
  1019. "meta": {
  1020. "title": "请假申请",
  1021. "keepAlive": True,
  1022. "isHide": True,
  1023. "menuCode": "workflow:leave",
  1024. },
  1025. },
  1026. ],
  1027. },
  1028. ],
  1029. },
  1030. ]
  1031. @router.get("/list")
  1032. async def get_menu_list(_user: dict = Depends(require_admin_or_super_admin)):
  1033. """获取菜单列表(与当前前端路由一致)"""
  1034. return success_response({"menuList": STATIC_MENU_TREE})