menu.py 50 KB

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