menu.py 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791
  1. """运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,14 个一级菜单)"""
  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 一致:14 个一级菜单
  7. STATIC_MENU_TREE = [
  8. {
  9. "id": "DOCLIB00000000000000000000000001",
  10. "name": "Doclib",
  11. "path": "/doclib",
  12. "component": "/index/index",
  13. "meta": {
  14. "title": "文档库",
  15. "icon": "ri:folder-open-line",
  16. "keepAlive": False,
  17. },
  18. "children": [
  19. {
  20. "id": "DOCLIB00000000000000000000000002",
  21. "name": "DoclibEnter",
  22. "path": "enter",
  23. "component": "/doclib/enter/index",
  24. "meta": {
  25. "title": "文档库",
  26. "icon": "ri:folder-open-line",
  27. "keepAlive": False,
  28. },
  29. }
  30. ],
  31. },
  32. # ────────────────────────────────────────────
  33. # 1. 细胞存储
  34. # ────────────────────────────────────────────
  35. {
  36. "id": "CEL00000000000000000000000000001",
  37. "name": "CellStorage",
  38. "path": "/cell-storage",
  39. "component": "/index/index",
  40. "meta": {
  41. "title": "细胞存储",
  42. "icon": "ri:test-tube-line",
  43. "keepAlive": False,
  44. "roles": ["admin"],
  45. },
  46. "children": [
  47. {
  48. "id": "50000000000000000000000000000002",
  49. "name": "CellStorageProtocol",
  50. "path": "protocol",
  51. "component": "/cell-storage/protocol/index",
  52. "meta": {"title": "采集协议单录入", "keepAlive": True, "isHide": True, "menuCode": "biz:cellStorageProtocol:list"},
  53. },
  54. {
  55. "id": "50000000000000000000000000000003",
  56. "name": "CellStorageProtocolAudit",
  57. "path": "protocol-audit",
  58. "component": "/cell-storage/protocol-audit/index",
  59. "meta": {"title": "采集协议单", "keepAlive": True, "menuCode": "biz:cellStorageProtocolAudit:list"},
  60. },
  61. {
  62. "id": "50000000000000000000000000000004",
  63. "name": "CellStoragePaymentConfirm",
  64. "path": "payment-confirm",
  65. "component": "/cell-storage/payment-confirm/index",
  66. "meta": {"title": "缴退费财务确认", "keepAlive": True, "menuCode": "biz:cellStoragePaymentConfirm:list"},
  67. },
  68. {
  69. "id": "70000000000000000000000000000011",
  70. "name": "CellStorageStorageReleaseReview",
  71. "path": "storage-release-review",
  72. "component": "/quality-inspection/storage-release-review/index",
  73. "meta": {"title": "入库放行审核", "keepAlive": True, "menuCode": "biz:storageReleaseReview:list"},
  74. },
  75. ],
  76. },
  77. # ────────────────────────────────────────────
  78. # 2. 科研捐赠
  79. # ────────────────────────────────────────────
  80. {
  81. "id": "RSC00000000000000000000000000001",
  82. "name": "ResearchDonation",
  83. "path": "/research-donation",
  84. "component": "/index/index",
  85. "meta": {
  86. "title": "科研捐赠",
  87. "icon": "ri:hand-heart-line",
  88. "keepAlive": False,
  89. "roles": ["admin"],
  90. },
  91. "children": [
  92. {
  93. "id": "60000000000000000000000000000002",
  94. "name": "ResearchDonationList",
  95. "path": "list",
  96. "component": "/research-donation/list/index",
  97. "meta": {"title": "捐赠协议单录入", "keepAlive": True, "isHide": True, "menuCode": "biz:researchDonation:list"},
  98. },
  99. {
  100. "id": "60000000000000000000000000000003",
  101. "name": "ResearchDonationAudit",
  102. "path": "audit",
  103. "component": "/research-donation/audit/index",
  104. "meta": {"title": "捐赠协议单", "keepAlive": True, "menuCode": "biz:researchDonationAudit:list"},
  105. },
  106. ],
  107. },
  108. # ────────────────────────────────────────────
  109. # 3. 中试服务
  110. # ────────────────────────────────────────────
  111. {
  112. "id": "PIL00000000000000000000000000001",
  113. "name": "PilotService",
  114. "path": "/pilot-service",
  115. "component": "/index/index",
  116. "meta": {
  117. "title": "中试服务",
  118. "icon": "ri:flask-line",
  119. "keepAlive": False,
  120. "roles": ["admin"],
  121. },
  122. "children": [
  123. {
  124. "id": "80000000000000000000000000000010",
  125. "name": "PilotApplication",
  126. "path": "pilot-application",
  127. "component": "/pilot-service/pilot-application/index",
  128. "meta": {"title": "中试服务申请单", "keepAlive": True, "menuCode": "pilot-service:pilot-application:list"},
  129. },
  130. {
  131. "id": "PIL00000000000000000000000000004",
  132. "name": "PilotOutboundRelease",
  133. "path": "outbound-release-review",
  134. "component": "/pilot-service/outbound-release-review/index",
  135. "meta": {"title": "出库放行审核", "keepAlive": True, "menuCode": "pilot-service:outbound-release-review:list"},
  136. },
  137. ],
  138. },
  139. # ────────────────────────────────────────────
  140. # 4. 临床应用
  141. # ────────────────────────────────────────────
  142. {
  143. "id": "CLI00000000000000000000000000001",
  144. "name": "ClinicalApplication",
  145. "path": "/clinical-application",
  146. "component": "/index/index",
  147. "meta": {
  148. "title": "临床应用",
  149. "icon": "ri:heart-pulse-line",
  150. "keepAlive": False,
  151. "roles": ["admin"],
  152. },
  153. "children": [
  154. {
  155. "id": "CLI00000000000000000000000000002",
  156. "name": "ClinicalApplicationList",
  157. "path": "clinical-application",
  158. "component": "/pilot-service/pilot-application/index",
  159. "meta": {"title": "临床申请单", "keepAlive": True, "menuCode": "clinical-application:application:list"},
  160. },
  161. {
  162. "id": "CLI00000000000000000000000000003",
  163. "name": "ClinicalCheckupManagement",
  164. "path": "clinical-checkup-management",
  165. "component": "/pilot-service/checkup-management/index",
  166. "meta": {
  167. "title": "体检管理",
  168. "keepAlive": True,
  169. "isHide": True,
  170. "menuCode": "clinical-application:checkup-management:list",
  171. },
  172. },
  173. {
  174. "id": "CLI00000000000000000000000000004",
  175. "name": "ClinicalInfusionSchedule",
  176. "path": "clinical-infusion-schedule-management",
  177. "component": "/pilot-service/infusion-schedule-management/index",
  178. "meta": {
  179. "title": "输注计划管理",
  180. "keepAlive": False,
  181. "isHide": True,
  182. "menuCode": "clinical-application:infusion-schedule-management:list",
  183. },
  184. },
  185. {
  186. "id": "CLI00000000000000000000000000005",
  187. "name": "ClinicalPaymentInfo",
  188. "path": "clinical-payment-info",
  189. "component": "/pilot-service/clinical-payment-info/index",
  190. "meta": {
  191. "title": "缴费信息",
  192. "keepAlive": False,
  193. "isHide": True,
  194. "menuCode": "clinical-application:payment-info:list",
  195. },
  196. },
  197. {
  198. "id": "CLI00000000000000000000000000006",
  199. "name": "ClinicalPaymentConfirm",
  200. "path": "clinical-payment-confirm",
  201. "component": "/pilot-service/clinical-payment-confirm/index",
  202. "meta": {"title": "缴退费财务确认", "keepAlive": True, "menuCode": "clinical-application:payment-confirm:list"},
  203. },
  204. {
  205. "id": "CLI00000000000000000000000000007",
  206. "name": "ClinicalRefundConfirm",
  207. "path": "clinical-refund-confirm",
  208. "component": "/pilot-service/clinical-refund-confirm/index",
  209. "meta": {"title": "退费确认(财务)", "keepAlive": True, "menuCode": "clinical-application:refund-confirm:list"},
  210. },
  211. {
  212. "id": "CLI00000000000000000000000000008",
  213. "name": "ClinicalOutboundRelease",
  214. "path": "clinical-outbound-release-review",
  215. "component": "/pilot-service/outbound-release-review/index",
  216. "meta": {"title": "出库放行审核", "keepAlive": True, "menuCode": "clinical-application:outbound-release-review:list"},
  217. },
  218. ],
  219. },
  220. # ────────────────────────────────────────────
  221. # 5. 质检管理
  222. # ────────────────────────────────────────────
  223. {
  224. "id": "QCM00000000000000000000000000001",
  225. "name": "QualityManage",
  226. "path": "/quality-manage",
  227. "component": "/index/index",
  228. "meta": {
  229. "title": "质检管理",
  230. "icon": "ri:shield-check-line",
  231. "keepAlive": False,
  232. "roles": ["admin"],
  233. },
  234. "children": [
  235. {
  236. "id": "70000000000000000000000000000002",
  237. "name": "QualityInspectionSampleReception",
  238. "path": "sample-reception",
  239. "component": "/quality-inspection/sample-reception/index",
  240. "meta": {"title": "样本接收", "keepAlive": True, "menuCode": "biz:sampleReception:list"},
  241. },
  242. {
  243. "id": "70000000000000000000000000000007",
  244. "name": "QualityInspectionQcWorkOrder",
  245. "path": "qc-work-order",
  246. "component": "/quality-inspection/qc-work-order/index",
  247. "meta": {"title": "质检工单", "keepAlive": True, "menuCode": "biz:qcWorkOrder:list"},
  248. },
  249. ],
  250. },
  251. # ────────────────────────────────────────────
  252. # 6. 生产管理
  253. # ────────────────────────────────────────────
  254. {
  255. "id": "PRM00000000000000000000000000001",
  256. "name": "ProductionManage",
  257. "path": "/production",
  258. "component": "/index/index",
  259. "meta": {
  260. "title": "生产管理",
  261. "icon": "grid",
  262. "keepAlive": False,
  263. "roles": ["admin"],
  264. },
  265. "children": [
  266. {
  267. "id": "61000000000000000000000000000003",
  268. "name": "ProductionStorageFacility",
  269. "path": "storage-facility",
  270. "component": "/operations/storage-facility/index",
  271. "meta": {"title": "库位管理", "keepAlive": True, "menuCode": "operations:storage-facility:list"},
  272. },
  273. {
  274. "id": "90000000000000000000000000000013",
  275. "name": "CellProduct",
  276. "path": "cell-product",
  277. "component": "/production/cell-product/index",
  278. "meta": {"title": "细胞产品库", "keepAlive": True, "menuCode": "production:cell-product:list"},
  279. },
  280. {
  281. "id": "90000000000000000000000000000011",
  282. "name": "ProductionWorkOrder",
  283. "path": "production-work-order",
  284. "component": "/production/production-work-order/index",
  285. "meta": {"title": "生产工单", "keepAlive": True, "menuCode": "production:work-order:list"},
  286. },
  287. ],
  288. },
  289. # ────────────────────────────────────────────
  290. # 7. 运营支撑
  291. # ────────────────────────────────────────────
  292. {
  293. "id": "OPS00000000000000000000000000001",
  294. "name": "Operations",
  295. "path": "/operations",
  296. "component": "/index/index",
  297. "meta": {
  298. "title": "运营支撑",
  299. "icon": "operation",
  300. "keepAlive": False,
  301. "roles": ["admin"],
  302. },
  303. "children": [
  304. {
  305. "id": "61000000000000000000000000000002",
  306. "name": "CleanRoom",
  307. "path": "clean-room",
  308. "component": "/operations/clean-room/index",
  309. "meta": {"title": "洁净室管理", "keepAlive": True, "menuCode": "operations:clean-room:list"},
  310. },
  311. {
  312. "id": "61000000000000000000000000000004",
  313. "name": "ExhibitionAppointment",
  314. "path": "exhibition-appointment",
  315. "component": "/operations/exhibition-appointment/index",
  316. "meta": {"title": "展馆预约", "keepAlive": True, "menuCode": "operations:exhibition-appointment:list"},
  317. },
  318. ],
  319. },
  320. # ────────────────────────────────────────────
  321. # 8. 市场基础信息
  322. # ────────────────────────────────────────────
  323. {
  324. "id": "MKT00000000000000000000000000001",
  325. "name": "MarketInfo",
  326. "path": "/market-info",
  327. "component": "/index/index",
  328. "meta": {
  329. "title": "市场基础信息",
  330. "icon": "ri:price-tag-3-line",
  331. "keepAlive": False,
  332. "roles": ["admin"],
  333. },
  334. "children": [
  335. {
  336. "id": "122",
  337. "name": "BizCellSampleType",
  338. "path": "cell-sample-type",
  339. "component": "/basic-info/cell-sample-type/index",
  340. "meta": {"title": "细胞样本基础信息维护", "keepAlive": True, "menuCode": "biz:cellSampleType:list"},
  341. },
  342. {
  343. "id": "123",
  344. "name": "BizCollectionRegion",
  345. "path": "collection-region",
  346. "component": "/basic-info/collection-region/index",
  347. "meta": {"title": "细胞采集基础信息维护", "keepAlive": True, "menuCode": "biz:collectionRegion:list"},
  348. },
  349. {
  350. "id": "80000000000000000000000000000002",
  351. "name": "CellProductType",
  352. "path": "cell-product-type",
  353. "component": "/pilot-service/cell-product-type/index",
  354. "meta": {"title": "细胞产品基础信息维护", "keepAlive": True, "menuCode": "pilot-service:cell-product-type:list"},
  355. },
  356. {
  357. "id": "40000000000000000000000000000007",
  358. "name": "BasicInfoInsuranceCompany",
  359. "path": "insurance-company",
  360. "component": "/basic-info/insurance-company/index",
  361. "meta": {"title": "保险公司及险种价格", "keepAlive": True, "menuCode": "basic-info:insurance-company:list"},
  362. },
  363. {
  364. "id": "80000000000000000000000000000007",
  365. "name": "CheckupInstitution",
  366. "path": "checkup-institution",
  367. "component": "/pilot-service/checkup-institution/index",
  368. "meta": {"title": "体检机构及项目价格", "keepAlive": True, "menuCode": "pilot-service:checkup-institution:list"},
  369. },
  370. {
  371. "id": "50000000000000000000000000000009",
  372. "name": "MarketMaterial",
  373. "path": "material",
  374. "component": "/cell-storage/material/index",
  375. "meta": {"title": "市场物料库", "keepAlive": True, "menuCode": "biz:material:list"},
  376. },
  377. {
  378. "id": "121",
  379. "name": "BizCustomer",
  380. "path": "customer",
  381. "component": "/basic-info/customer/index",
  382. "meta": {"title": "客户管理", "keepAlive": True, "menuCode": "biz:customer:list"},
  383. },
  384. {
  385. "id": "80000000000000000000000000000006",
  386. "name": "Channel",
  387. "path": "channel",
  388. "component": "/pilot-service/channel/index",
  389. "meta": {"title": "渠道信息管理", "keepAlive": True, "menuCode": "pilot-service:channel:list"},
  390. },
  391. {
  392. "id": "80000000000000000000000000000009",
  393. "name": "ChannelServiceOrderFinance",
  394. "path": "channel-service-order-finance",
  395. "component": "/pilot-service/channel-service-order-finance/index",
  396. "meta": {"title": "渠道服务订单(财务确认)", "keepAlive": True, "menuCode": "pilot-service:channel-service-order-finance:list"},
  397. },
  398. ],
  399. },
  400. # ────────────────────────────────────────────
  401. # 9. 质检基础信息
  402. # ────────────────────────────────────────────
  403. {
  404. "id": "QCB00000000000000000000000000001",
  405. "name": "QualityBase",
  406. "path": "/quality-base",
  407. "component": "/index/index",
  408. "meta": {
  409. "title": "质检基础信息",
  410. "icon": "ri:clipboard-line",
  411. "keepAlive": False,
  412. "roles": ["admin"],
  413. },
  414. "children": [
  415. {
  416. "id": "70000000000000000000000000000003",
  417. "name": "QualityInspectionSampleReceptionCheckItem",
  418. "path": "sample-reception-check-item",
  419. "component": "/quality-inspection/sample-reception-check-item/index",
  420. "meta": {"title": "接收检查项配置", "keepAlive": True, "menuCode": "biz:sampleReceptionCheckItem:list"},
  421. },
  422. {
  423. "id": "70000000000000000000000000000006",
  424. "name": "QualityInspectionLabTestItem",
  425. "path": "lab-test-item",
  426. "component": "/quality-inspection/lab-test-item/index",
  427. "meta": {"title": "质检项目管理", "keepAlive": True, "menuCode": "biz:qcLabTestItem:list"},
  428. },
  429. {
  430. "id": "70000000000000000000000000000009",
  431. "name": "QualityInspectionQcMaterial",
  432. "path": "qc-material",
  433. "component": "/quality-inspection/qc-material/index",
  434. "meta": {"title": "质检物料库", "keepAlive": True, "menuCode": "biz:qcMaterial:list"},
  435. },
  436. ],
  437. },
  438. # ────────────────────────────────────────────
  439. # 10. 生产基础信息
  440. # ────────────────────────────────────────────
  441. {
  442. "id": "PRB00000000000000000000000000001",
  443. "name": "ProductionBase",
  444. "path": "/production-base",
  445. "component": "/index/index",
  446. "meta": {
  447. "title": "生产基础信息",
  448. "icon": "ri:tools-line",
  449. "keepAlive": False,
  450. "roles": ["admin"],
  451. },
  452. "children": [
  453. {
  454. "id": "90000000000000000000000000000002",
  455. "name": "ProductionConsumable",
  456. "path": "consumable",
  457. "component": "/production/consumable/index",
  458. "meta": {"title": "耗材管理", "keepAlive": True, "menuCode": "production:consumable:list"},
  459. },
  460. {
  461. "id": "90000000000000000000000000000003",
  462. "name": "ProductionReagent",
  463. "path": "reagent",
  464. "component": "/production/reagent/index",
  465. "meta": {"title": "试剂管理", "keepAlive": True, "menuCode": "production:reagent:list"},
  466. },
  467. {
  468. "id": "90000000000000000000000000000004",
  469. "name": "ProductionSop",
  470. "path": "sop",
  471. "component": "/production/sop/index",
  472. "meta": {"title": "SOP文档", "keepAlive": True, "menuCode": "production:sop-document:list"},
  473. },
  474. {
  475. "id": "90000000000000000000000000000005",
  476. "name": "ProductionProcessCategory",
  477. "path": "process-category",
  478. "component": "/production/process-category/index",
  479. "meta": {"title": "工艺基础信息维护", "keepAlive": True, "menuCode": "production:process-category:list"},
  480. },
  481. {
  482. "id": "90000000000000000000000000000008",
  483. "name": "ProductionProcess",
  484. "path": "process",
  485. "component": "/production/process/index",
  486. "meta": {"title": "工艺库管理", "keepAlive": True, "menuCode": "production:process:list"},
  487. },
  488. ],
  489. },
  490. # ────────────────────────────────────────────
  491. # 11. 系统基础信息
  492. # ────────────────────────────────────────────
  493. {
  494. "id": "SYSB000000000000000000000000000001",
  495. "name": "SystemBase",
  496. "path": "/system-base",
  497. "component": "/index/index",
  498. "meta": {
  499. "title": "系统基础信息",
  500. "icon": "ri:archive-line",
  501. "keepAlive": False,
  502. "roles": ["admin"],
  503. },
  504. "children": [
  505. {
  506. "id": "107",
  507. "name": "Site",
  508. "path": "site",
  509. "component": "/system/site/index",
  510. "meta": {"title": "站点管理", "keepAlive": True, "menuCode": "system:site:list"},
  511. },
  512. {
  513. "id": "109",
  514. "name": "Unit",
  515. "path": "unit",
  516. "component": "/system/unit/index",
  517. "meta": {"title": "物品单位管理", "keepAlive": True, "menuCode": "system:unit:list"},
  518. },
  519. {
  520. "id": "110",
  521. "name": "Express",
  522. "path": "express",
  523. "component": "/system/express/index",
  524. "meta": {"title": "快递公司", "keepAlive": True, "menuCode": "system:express:list"},
  525. },
  526. ],
  527. },
  528. # ────────────────────────────────────────────
  529. # 12. CRM 管理
  530. # ────────────────────────────────────────────
  531. {
  532. "id": "CRM00000000000000000000000000001",
  533. "name": "CRM管理",
  534. "path": "/crm",
  535. "component": "/index/index",
  536. "meta": {
  537. "title": "CRM管理",
  538. "icon": "goods",
  539. "keepAlive": False,
  540. "roles": ["admin"],
  541. },
  542. "children": [
  543. {
  544. "id": "CRM00000000000000000000000000010",
  545. "name": "CrmProductGroup",
  546. "path": "product-group",
  547. "component": "/index/route-parent",
  548. "meta": {"title": "产品管理", "keepAlive": False},
  549. "children": [
  550. {
  551. "id": "CRM00000000000000000000000000003",
  552. "name": "CrmProduct",
  553. "path": "/crm/product",
  554. "component": "/crm/product/index",
  555. "meta": {"title": "产品管理", "keepAlive": True, "menuCode": "crm:product:list"},
  556. },
  557. {
  558. "id": "CRM00000000000000000000000000002",
  559. "name": "CrmProductCategory",
  560. "path": "/crm/product-category",
  561. "component": "/crm/product-category/index",
  562. "meta": {
  563. "title": "产品分类",
  564. "keepAlive": True,
  565. "isHide": True,
  566. "menuCode": "crm:productCategory:list",
  567. },
  568. },
  569. ],
  570. },
  571. {
  572. "id": "CRM00000000000000000000000000020",
  573. "name": "CrmQuoteGroup",
  574. "path": "quote-group",
  575. "component": "/index/route-parent",
  576. "meta": {"title": "报价单管理", "keepAlive": False},
  577. "children": [
  578. {
  579. "id": "CRM3000000000000000000000000010",
  580. "name": "CrmQuote",
  581. "path": "/crm/quote",
  582. "component": "/crm/quote/index",
  583. "meta": {"title": "报价单管理", "keepAlive": True, "menuCode": "crm:quote:list"},
  584. },
  585. {
  586. "id": "CRM3000000000000000000000000016",
  587. "name": "CrmQuoteApproval",
  588. "path": "/crm/quote-approval",
  589. "component": "/crm/quote/approval/index",
  590. "meta": {"title": "报价单审批", "keepAlive": True, "menuCode": "crm:quote:approve"},
  591. },
  592. ],
  593. },
  594. {
  595. "id": "CRM00000000000000000000000000030",
  596. "name": "CrmContractGroup",
  597. "path": "contract-group",
  598. "component": "/index/route-parent",
  599. "meta": {"title": "合同管理", "keepAlive": False},
  600. "children": [
  601. {
  602. "id": "CRM3000000000000000000000000020",
  603. "name": "CrmContract",
  604. "path": "/crm/contract",
  605. "component": "/crm/contract/index",
  606. "meta": {"title": "合同管理", "keepAlive": True, "menuCode": "crm:contract:list"},
  607. },
  608. {
  609. "id": "CRM3000000000000000000000000021",
  610. "name": "CrmContractApproval",
  611. "path": "/crm/contract-approval",
  612. "component": "/crm/contract/approval/index",
  613. "meta": {"title": "合同审批", "keepAlive": True, "menuCode": "crm:contract:approve"},
  614. },
  615. {
  616. "id": "CRM3000000000000000000000000030",
  617. "name": "CrmPriceLetter",
  618. "path": "/crm/price-letter",
  619. "component": "/crm/price-letter/index",
  620. "meta": {"title": "调价函管理", "keepAlive": True, "menuCode": "crm:priceLetter:list"},
  621. },
  622. ],
  623. },
  624. {
  625. "id": "CRM00000000000000000000000000040",
  626. "name": "CrmCustomerGroup",
  627. "path": "customer-group",
  628. "component": "/index/route-parent",
  629. "meta": {"title": "客户管理", "keepAlive": False},
  630. "children": [
  631. {
  632. "id": "CRM1000000000000000000000000002",
  633. "name": "CrmCustomer",
  634. "path": "/crm/customer",
  635. "component": "/crm/customer/index",
  636. "meta": {"title": "客户管理", "keepAlive": True, "menuCode": "crm:customer:list"},
  637. },
  638. ],
  639. },
  640. ],
  641. },
  642. # ────────────────────────────────────────────
  643. # 13. 工作流管理
  644. # ────────────────────────────────────────────
  645. {
  646. "id": "WKF00000000000000000000000000001",
  647. "name": "Workflow",
  648. "path": "/workflow",
  649. "component": "/index/index",
  650. "meta": {
  651. "title": "工作流管理",
  652. "icon": "workflow",
  653. "keepAlive": False,
  654. "isHide": True,
  655. "roles": ["admin"],
  656. },
  657. "children": [
  658. {
  659. "id": "10000000000000000000000000000wf01",
  660. "name": "WorkflowProcess",
  661. "path": "process",
  662. "component": "/system/workflow/process/index",
  663. "meta": {"title": "流程配置", "keepAlive": True, "menuCode": "workflow:process"},
  664. },
  665. {
  666. "id": "10000000000000000000000000000wf02",
  667. "name": "WorkflowPending",
  668. "path": "pending",
  669. "component": "/system/workflow/task-pending/index",
  670. "meta": {"title": "待办中心", "keepAlive": True, "menuCode": "workflow:pending"},
  671. },
  672. {
  673. "id": "10000000000000000000000000000wf03",
  674. "name": "WorkflowCompleted",
  675. "path": "completed",
  676. "component": "/system/workflow/task-completed/index",
  677. "meta": {"title": "已办中心", "keepAlive": True, "menuCode": "workflow:completed"},
  678. },
  679. {
  680. "id": "10000000000000000000000000000wf05",
  681. "name": "WorkflowMyApplications",
  682. "path": "my-applications",
  683. "component": "/system/workflow/my-applications/index",
  684. "meta": {"title": "我的申请", "keepAlive": True, "menuCode": "workflow:myApplications"},
  685. },
  686. {
  687. "id": "10000000000000000000000000000wf04",
  688. "name": "LeaveRequest",
  689. "path": "leave",
  690. "component": "/system/leave/index",
  691. "meta": {"title": "请假申请", "keepAlive": True, "menuCode": "workflow:leave"},
  692. },
  693. ],
  694. },
  695. # ────────────────────────────────────────────
  696. # 14. 系统管理
  697. # ────────────────────────────────────────────
  698. {
  699. "id": "SYSM000000000000000000000000000001",
  700. "name": "SystemManage",
  701. "path": "/system",
  702. "component": "/index/index",
  703. "meta": {
  704. "title": "系统管理",
  705. "icon": "ri:settings-3-line",
  706. "keepAlive": False,
  707. "roles": ["admin"],
  708. },
  709. "children": [
  710. {
  711. "id": "101",
  712. "name": "Tenant",
  713. "path": "tenant",
  714. "component": "/system/tenant/index",
  715. "meta": {"title": "租户管理", "keepAlive": True, "menuCode": "system:tenant:list"},
  716. },
  717. {
  718. "id": "102",
  719. "name": "Dict",
  720. "path": "dict",
  721. "component": "/system/dict/index",
  722. "meta": {"title": "字典管理", "keepAlive": True, "menuCode": "system:dict:list"},
  723. },
  724. {
  725. "id": "106",
  726. "name": "Menu",
  727. "path": "menu",
  728. "component": "/system/menu/index",
  729. "meta": {"title": "菜单管理", "keepAlive": True, "menuCode": "system:menu:list"},
  730. },
  731. {
  732. "id": "103",
  733. "name": "Dept",
  734. "path": "dept",
  735. "component": "/system/dept/index",
  736. "meta": {"title": "组织管理", "keepAlive": True, "menuCode": "system:dept:list"},
  737. },
  738. {
  739. "id": "105",
  740. "name": "Role",
  741. "path": "role",
  742. "component": "/system/role/index",
  743. "meta": {"title": "角色管理", "keepAlive": True, "menuCode": "system:role:list"},
  744. },
  745. {
  746. "id": "104",
  747. "name": "User",
  748. "path": "user",
  749. "component": "/system/user/index",
  750. "meta": {"title": "用户管理", "keepAlive": True, "menuCode": "system:user:list"},
  751. },
  752. {
  753. "id": "108",
  754. "name": "Post",
  755. "path": "post",
  756. "component": "/system/post/index",
  757. "meta": {"title": "职位管理", "keepAlive": True, "menuCode": "system:post:list"},
  758. },
  759. {
  760. "id": "10000000000000000000000000000008",
  761. "name": "UserDetail",
  762. "path": "user/detail",
  763. "component": "/system/user/detail",
  764. "meta": {"title": "用户详情", "isHide": True, "keepAlive": True},
  765. },
  766. ],
  767. },
  768. ]
  769. @router.get("/list")
  770. def get_menu_list(_user: dict = Depends(require_admin_or_super_admin)):
  771. """获取菜单列表(与当前前端路由一致)"""
  772. return success_response({"menuList": STATIC_MENU_TREE})