menu.py 51 KB

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