menu.py 47 KB

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