menu.py 48 KB

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