From 7f7979679f2ead92182c9eaf6b8bc64c0fd965ac Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Fri, 12 Jun 2026 20:02:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(menu):=20=E4=BF=AE=E5=A4=8D=E4=B8=A4?= =?UTF-8?q?=E7=BA=A7=E8=8F=9C=E5=8D=95=E7=BB=93=E6=9E=84=E5=92=8C=E5=B5=8C?= =?UTF-8?q?=E5=A5=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 菜单类型默认值改为 TOP_LEFT(顶部一级+左侧二级) 2. 二级菜单 component 设为空字符串避免嵌套布局 3. 前端和后端菜单数据同步更新 Co-authored-by: Cursor --- backend/app.pid | 1 - backend/app/api/menu.py | 28 +- ...d4febda7c99852c8385ddf73f5e10a774e8e3.json | 1 + ...c033a90e748ac2915f78b6f35a39933945e2e.json | 1 + backend/graphify-out/.graphify_analysis.json | 6 +- backend/graphify-out/.graphify_extract.json | 76 +-- backend/graphify-out/GRAPH_REPORT.md | 6 +- backend/graphify-out/graph.html | 4 +- backend/graphify-out/graph.json | 110 ++-- backend/graphify-out/manifest.json | 4 +- .../plans/2026-06-12-menu-restructuring.md | 499 ++++++++++++++++++ web-admin/graphify-out/.graphify_extract.json | 39 +- web-admin/graphify-out/GRAPH_REPORT.md | 2 +- web-admin/graphify-out/graph.json | 26 +- web-admin/graphify-out/manifest.json | 34 +- .../src/api/infusion-schedule-handover.ts | 7 +- web-admin/src/api/outbound-release-review.ts | 22 +- web-admin/src/api/qc-material-usage.ts | 5 +- web-admin/src/config/setting.ts | 2 +- ...429cd0183c02c64a89e3130ac1f675358268d.json | 1 + ...15e44ff87be7ea683c469478975a23c5b297f.json | 1 + ...4bafd9c7f6b75a886f6aaa832efa355d314f7.json | 1 + ...9c2c5cff634ebb3cba20938b1dd848788d0d5.json | 1 + ...61d1aa52bd808f40b26f85fc2c5018e67de72.json | 1 + ...23ec5e70fd7613b9dd86a1e1b6fb336fc4df7.json | 1 + ...96c55d5d2177cd8b972853ca27f3220e1b32c.json | 1 + ...ea6ef81ec6f6bfb07492726916a7f16b29dea.json | 1 + ...e56770382510b8b511c55e8b9aa327b7aceed.json | 1 + web-admin/src/router/modules/sqxp.ts | 38 +- 29 files changed, 720 insertions(+), 200 deletions(-) delete mode 100644 backend/app.pid create mode 100644 backend/app/graphify-out/cache/ast/1ec8afcf67f2a9cf1b0899d636ad4febda7c99852c8385ddf73f5e10a774e8e3.json create mode 100644 backend/app/graphify-out/cache/ast/b0bc99380087c1605c074518021c033a90e748ac2915f78b6f35a39933945e2e.json create mode 100644 docs/superpowers/plans/2026-06-12-menu-restructuring.md create mode 100644 web-admin/src/graphify-out/cache/ast/16be8a5e9d82c3ac4ae7989649c429cd0183c02c64a89e3130ac1f675358268d.json create mode 100644 web-admin/src/graphify-out/cache/ast/2d763022a4b3be3f640fdb427d515e44ff87be7ea683c469478975a23c5b297f.json create mode 100644 web-admin/src/graphify-out/cache/ast/33235f58393fd9ed32cb33abdee4bafd9c7f6b75a886f6aaa832efa355d314f7.json create mode 100644 web-admin/src/graphify-out/cache/ast/3a2c803533b89e3622cba149ea09c2c5cff634ebb3cba20938b1dd848788d0d5.json create mode 100644 web-admin/src/graphify-out/cache/ast/807e093fec92609781483b24de161d1aa52bd808f40b26f85fc2c5018e67de72.json create mode 100644 web-admin/src/graphify-out/cache/ast/d341fa482c5045dcc029add27fe23ec5e70fd7613b9dd86a1e1b6fb336fc4df7.json create mode 100644 web-admin/src/graphify-out/cache/ast/d5ba087d00bf3acc835ef83319e96c55d5d2177cd8b972853ca27f3220e1b32c.json create mode 100644 web-admin/src/graphify-out/cache/ast/da29aee2c0966e54534087f71adea6ef81ec6f6bfb07492726916a7f16b29dea.json create mode 100644 web-admin/src/graphify-out/cache/ast/efb4b14913a4a3f951d04fd2e3fe56770382510b8b511c55e8b9aa327b7aceed.json diff --git a/backend/app.pid b/backend/app.pid deleted file mode 100644 index 7193c803..00000000 --- a/backend/app.pid +++ /dev/null @@ -1 +0,0 @@ -91694 diff --git a/backend/app/api/menu.py b/backend/app/api/menu.py index 4d04effe..f7bc6fe8 100644 --- a/backend/app/api/menu.py +++ b/backend/app/api/menu.py @@ -30,7 +30,7 @@ STATIC_MENU_TREE = [ "id": "CEL00000000000000000000000000001", "name": "CellStorage", "path": "cell-storage", - "component": "/index/index", + "component": "", "meta": { "title": "细胞存储", "icon": "ri:test-tube-line", @@ -80,7 +80,7 @@ STATIC_MENU_TREE = [ "id": "RSC00000000000000000000000000001", "name": "ResearchDonation", "path": "research-donation", - "component": "/index/index", + "component": "", "meta": { "title": "科研捐赠", "icon": "ri:hand-heart-line", @@ -116,7 +116,7 @@ STATIC_MENU_TREE = [ "id": "PIL00000000000000000000000000001", "name": "PilotService", "path": "pilot-service", - "component": "/index/index", + "component": "", "meta": { "title": "中试服务", "icon": "ri:flask-line", @@ -145,7 +145,7 @@ STATIC_MENU_TREE = [ "id": "BEX00000000000000000000000000001", "name": "BasicExperiment", "path": "basic-experiment", - "component": "/index/index", + "component": "", "meta": { "title": "基础实验", "icon": "ri:flask-line", @@ -193,7 +193,7 @@ STATIC_MENU_TREE = [ "id": "MKT00000000000000000000000000001", "name": "MarketInfo", "path": "market-info", - "component": "/index/index", + "component": "", "meta": { "title": "市场基础信息", "icon": "ri:price-tag-3-line", @@ -291,7 +291,7 @@ STATIC_MENU_TREE = [ "id": "CLI00000000000000000000000000001", "name": "ClinicalApplication", "path": "clinical-application", - "component": "/index/index", + "component": "", "meta": { "title": "临床应用", "icon": "ri:heart-pulse-line", @@ -386,7 +386,7 @@ STATIC_MENU_TREE = [ "id": "PRM00000000000000000000000000001", "name": "ProductionManage", "path": "production", - "component": "/index/index", + "component": "", "meta": { "title": "生产管理", "icon": "grid", @@ -433,7 +433,7 @@ STATIC_MENU_TREE = [ "id": "PRB00000000000000000000000000001", "name": "ProductionBase", "path": "production-base", - "component": "/index/index", + "component": "", "meta": { "title": "生产基础信息", "icon": "ri:tools-line", @@ -503,7 +503,7 @@ STATIC_MENU_TREE = [ "id": "QCM00000000000000000000000000001", "name": "QualityManage", "path": "quality-manage", - "component": "/index/index", + "component": "", "meta": { "title": "质检管理", "icon": "ri:shield-check-line", @@ -561,7 +561,7 @@ STATIC_MENU_TREE = [ "id": "QCB00000000000000000000000000001", "name": "QualityBase", "path": "quality-base", - "component": "/index/index", + "component": "", "meta": { "title": "质检基础信息", "icon": "ri:clipboard-line", @@ -624,7 +624,7 @@ STATIC_MENU_TREE = [ "id": "SYSB000000000000000000000000000001", "name": "SystemBase", "path": "system-base", - "component": "/index/index", + "component": "", "meta": { "title": "系统基础信息", "icon": "ri:archive-line", @@ -660,7 +660,7 @@ STATIC_MENU_TREE = [ "id": "OPS00000000000000000000000000001", "name": "Operations", "path": "operations", - "component": "/index/index", + "component": "", "meta": { "title": "运营支撑", "icon": "operation", @@ -709,7 +709,7 @@ STATIC_MENU_TREE = [ "id": "SYSM000000000000000000000000000001", "name": "SystemManage", "path": "system", - "component": "/index/index", + "component": "", "meta": { "title": "系统管理", "icon": "ri:settings-3-line", @@ -780,7 +780,7 @@ STATIC_MENU_TREE = [ "id": "WKF00000000000000000000000000001", "name": "Workflow", "path": "workflow", - "component": "/index/index", + "component": "", "meta": { "title": "工作流管理", "icon": "workflow", diff --git a/backend/app/graphify-out/cache/ast/1ec8afcf67f2a9cf1b0899d636ad4febda7c99852c8385ddf73f5e10a774e8e3.json b/backend/app/graphify-out/cache/ast/1ec8afcf67f2a9cf1b0899d636ad4febda7c99852c8385ddf73f5e10a774e8e3.json new file mode 100644 index 00000000..db93b2bc --- /dev/null +++ b/backend/app/graphify-out/cache/ast/1ec8afcf67f2a9cf1b0899d636ad4febda7c99852c8385ddf73f5e10a774e8e3.json @@ -0,0 +1 @@ +{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_services_web_auth_roles_py", "label": "web_auth_roles.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L1"}, {"id": "services_web_auth_roles_map_role_name_to_web", "label": "_map_role_name_to_web()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L16"}, {"id": "services_web_auth_roles_resolve_web_role_for_user", "label": "resolve_web_role_for_user()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L28"}, {"id": "services_web_auth_roles_iter_user_menu_perm_codes", "label": "iter_user_menu_perm_codes()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L56"}, {"id": "services_web_auth_roles_rationale_1", "label": "Web \u7ba1\u7406\u7aef\u767b\u5f55\uff1a\u57fa\u4e8e V0.3 sys_user / sys_user_role / sys_role \u7684\u89d2\u8272\u4e0e\u83dc\u5355\u6743\u9650\u89e3\u6790", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L1"}, {"id": "services_web_auth_roles_rationale_17", "label": "\u5c06 sys_role.role_name \u6620\u5c04\u4e3a web-admin \u4f7f\u7528\u7684 role \u5b57\u7b26\u4e32\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L17"}, {"id": "services_web_auth_roles_rationale_29", "label": "\u6839\u636e\u7528\u6237\u5173\u8054\u89d2\u8272\u89e3\u6790 Web \u7aef role\uff08admin / super_admin\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L29"}, {"id": "services_web_auth_roles_rationale_57", "label": "\u7528\u6237\u901a\u8fc7\u89d2\u8272\u5173\u8054\u5f97\u5230\u7684\u83dc\u5355\u6743\u9650\u6807\u8bc6\uff08sys_menu.perms\uff0c\u7a7a\u5219\u9000\u56de\u83dc\u5355 id\uff09\u3002 \u6ce8\uff1a\u4e00\u7ea7\u83dc\u5355\uff08market\u3001production\u3001quali", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L57"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_services_web_auth_roles_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_services_web_auth_roles_py", "target": "sqlalchemy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_services_web_auth_roles_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L7", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_services_web_auth_roles_py", "target": "app_core_config", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L9", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_services_web_auth_roles_py", "target": "app_models_models", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L10", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_services_web_auth_roles_py", "target": "services_web_auth_roles_map_role_name_to_web", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L16", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_services_web_auth_roles_py", "target": "services_web_auth_roles_resolve_web_role_for_user", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L28", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_services_web_auth_roles_py", "target": "services_web_auth_roles_iter_user_menu_perm_codes", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L56", "weight": 1.0}, {"source": "services_web_auth_roles_resolve_web_role_for_user", "target": "services_web_auth_roles_map_role_name_to_web", "relation": "calls", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L50", "weight": 1.0}, {"source": "services_web_auth_roles_rationale_1", "target": "users_wuzilong_work_00code_zkxw_backend_app_services_web_auth_roles_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L1", "weight": 1.0}, {"source": "services_web_auth_roles_rationale_17", "target": "services_web_auth_roles_map_role_name_to_web", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L17", "weight": 1.0}, {"source": "services_web_auth_roles_rationale_29", "target": "services_web_auth_roles_resolve_web_role_for_user", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L29", "weight": 1.0}, {"source": "services_web_auth_roles_rationale_57", "target": "services_web_auth_roles_iter_user_menu_perm_codes", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L57", "weight": 1.0}], "raw_calls": [{"caller_nid": "services_web_auth_roles_map_role_name_to_web", "callee": "strip", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L18"}, {"caller_nid": "services_web_auth_roles_resolve_web_role_for_user", "callee": "all", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L34"}, {"caller_nid": "services_web_auth_roles_resolve_web_role_for_user", "callee": "order_by", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L34"}, {"caller_nid": "services_web_auth_roles_resolve_web_role_for_user", "callee": "filter", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L34"}, {"caller_nid": "services_web_auth_roles_resolve_web_role_for_user", "callee": "join", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L34"}, {"caller_nid": "services_web_auth_roles_resolve_web_role_for_user", "callee": "query", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L34"}, {"caller_nid": "services_web_auth_roles_resolve_web_role_for_user", "callee": "desc", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L44"}, {"caller_nid": "services_web_auth_roles_resolve_web_role_for_user", "callee": "strip", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L47"}, {"caller_nid": "services_web_auth_roles_resolve_web_role_for_user", "callee": "str", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L47"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "set", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L63"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "distinct", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L67"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "filter", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L67"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "join", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L67"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "join", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L67"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "query", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L67"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "and_", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L70"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "and_", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L78"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "set", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L93"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "all", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L94"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "strip", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L95"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "add", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L97"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "add", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L99"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "strip", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L99"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "str", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L99"}, {"caller_nid": "services_web_auth_roles_iter_user_menu_perm_codes", "callee": "set", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py", "source_location": "L102"}]} \ No newline at end of file diff --git a/backend/app/graphify-out/cache/ast/b0bc99380087c1605c074518021c033a90e748ac2915f78b6f35a39933945e2e.json b/backend/app/graphify-out/cache/ast/b0bc99380087c1605c074518021c033a90e748ac2915f78b6f35a39933945e2e.json new file mode 100644 index 00000000..1d70b3d7 --- /dev/null +++ b/backend/app/graphify-out/cache/ast/b0bc99380087c1605c074518021c033a90e748ac2915f78b6f35a39933945e2e.json @@ -0,0 +1 @@ +{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_api_menu_py", "label": "menu.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py", "source_location": "L1"}, {"id": "api_menu_get_menu_list", "label": "get_menu_list()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py", "source_location": "L834"}, {"id": "api_menu_rationale_1", "label": "\u8fd0\u8425\u7aef\u83dc\u5355\u63a5\u53e3\uff08\u4e0e web-admin \u524d\u7aef\u9759\u6001\u8def\u7531 sqxp.ts \u5bf9\u9f50\uff0c5 \u4e2a\u4e00\u7ea7\u83dc\u5355\u5206\u7ec4\uff09", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py", "source_location": "L1"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_api_menu_py", "target": "fastapi", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_menu_py", "target": "app_core_menu_guard", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_menu_py", "target": "app_core_response", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_menu_py", "target": "api_menu_get_menu_list", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py", "source_location": "L834", "weight": 1.0}, {"source": "api_menu_rationale_1", "target": "users_wuzilong_work_00code_zkxw_backend_app_api_menu_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py", "source_location": "L1", "weight": 1.0}], "raw_calls": [{"caller_nid": "api_menu_get_menu_list", "callee": "success_response", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py", "source_location": "L836"}]} \ No newline at end of file diff --git a/backend/graphify-out/.graphify_analysis.json b/backend/graphify-out/.graphify_analysis.json index 042c2249..c3d2b5b9 100644 --- a/backend/graphify-out/.graphify_analysis.json +++ b/backend/graphify-out/.graphify_analysis.json @@ -1451,9 +1451,9 @@ "models_qc_param_bizqctaskresult", "models_qc_param_py", "services_web_auth_roles_rationale_1", - "services_web_auth_roles_rationale_14", - "services_web_auth_roles_rationale_26", - "services_web_auth_roles_rationale_54", + "services_web_auth_roles_rationale_17", + "services_web_auth_roles_rationale_29", + "services_web_auth_roles_rationale_57", "services_workflow_engine_rationale_1" ], "3": [ diff --git a/backend/graphify-out/.graphify_extract.json b/backend/graphify-out/.graphify_extract.json index 0de7470c..3a9479bd 100644 --- a/backend/graphify-out/.graphify_extract.json +++ b/backend/graphify-out/.graphify_extract.json @@ -21229,11 +21229,11 @@ "label": "get_menu_list()", "file_type": "code", "source_file": "api/menu.py", - "source_location": "L777" + "source_location": "L834" }, { "id": "api_menu_rationale_1", - "label": "\u8fd0\u8425\u7aef\u83dc\u5355\u63a5\u53e3\uff08\u4e0e web-admin \u524d\u7aef\u9759\u6001\u8def\u7531 sqxp.ts \u5bf9\u9f50\uff0c13 \u4e2a\u4e00\u7ea7\u83dc\u5355\uff09", + "label": "\u8fd0\u8425\u7aef\u83dc\u5355\u63a5\u53e3\uff08\u4e0e web-admin \u524d\u7aef\u9759\u6001\u8def\u7531 sqxp.ts \u5bf9\u9f50\uff0c5 \u4e2a\u4e00\u7ea7\u83dc\u5355\u5206\u7ec4\uff09", "file_type": "rationale", "source_file": "api/menu.py", "source_location": "L1" @@ -25457,21 +25457,21 @@ "label": "_map_role_name_to_web()", "file_type": "code", "source_file": "services/web_auth_roles.py", - "source_location": "L13" + "source_location": "L16" }, { "id": "services_web_auth_roles_resolve_web_role_for_user", "label": "resolve_web_role_for_user()", "file_type": "code", "source_file": "services/web_auth_roles.py", - "source_location": "L25" + "source_location": "L28" }, { "id": "services_web_auth_roles_iter_user_menu_perm_codes", "label": "iter_user_menu_perm_codes()", "file_type": "code", "source_file": "services/web_auth_roles.py", - "source_location": "L53" + "source_location": "L56" }, { "id": "services_web_auth_roles_rationale_1", @@ -25481,25 +25481,25 @@ "source_location": "L1" }, { - "id": "services_web_auth_roles_rationale_14", + "id": "services_web_auth_roles_rationale_17", "label": "\u5c06 sys_role.role_name \u6620\u5c04\u4e3a web-admin \u4f7f\u7528\u7684 role \u5b57\u7b26\u4e32\u3002", "file_type": "rationale", "source_file": "services/web_auth_roles.py", - "source_location": "L14" + "source_location": "L17" }, { - "id": "services_web_auth_roles_rationale_26", + "id": "services_web_auth_roles_rationale_29", "label": "\u6839\u636e\u7528\u6237\u5173\u8054\u89d2\u8272\u89e3\u6790 Web \u7aef role\uff08admin / super_admin\uff09\u3002", "file_type": "rationale", "source_file": "services/web_auth_roles.py", - "source_location": "L26" + "source_location": "L29" }, { - "id": "services_web_auth_roles_rationale_54", - "label": "\u7528\u6237\u901a\u8fc7\u89d2\u8272\u5173\u8054\u5f97\u5230\u7684\u83dc\u5355\u6743\u9650\u6807\u8bc6\uff08sys_menu.perms\uff0c\u7a7a\u5219\u9000\u56de\u83dc\u5355 id\uff09\u3002", + "id": "services_web_auth_roles_rationale_57", + "label": "\u7528\u6237\u901a\u8fc7\u89d2\u8272\u5173\u8054\u5f97\u5230\u7684\u83dc\u5355\u6743\u9650\u6807\u8bc6\uff08sys_menu.perms\uff0c\u7a7a\u5219\u9000\u56de\u83dc\u5355 id\uff09\u3002 \u6ce8\uff1a\u4e00\u7ea7\u83dc\u5355\uff08market\u3001production\u3001quali", "file_type": "rationale", "source_file": "services/web_auth_roles.py", - "source_location": "L54" + "source_location": "L57" }, { "id": "services_protocol_payment_installment_py", @@ -80490,7 +80490,7 @@ "relation": "contains", "confidence": "EXTRACTED", "source_file": "api/menu.py", - "source_location": "L777", + "source_location": "L834", "weight": 1.0 }, { @@ -92181,7 +92181,7 @@ "relation": "contains", "confidence": "EXTRACTED", "source_file": "services/web_auth_roles.py", - "source_location": "L13", + "source_location": "L16", "weight": 1.0 }, { @@ -92190,7 +92190,7 @@ "relation": "contains", "confidence": "EXTRACTED", "source_file": "services/web_auth_roles.py", - "source_location": "L25", + "source_location": "L28", "weight": 1.0 }, { @@ -92199,7 +92199,7 @@ "relation": "contains", "confidence": "EXTRACTED", "source_file": "services/web_auth_roles.py", - "source_location": "L53", + "source_location": "L56", "weight": 1.0 }, { @@ -92208,7 +92208,7 @@ "relation": "calls", "confidence": "EXTRACTED", "source_file": "services/web_auth_roles.py", - "source_location": "L47", + "source_location": "L50", "weight": 1.0 }, { @@ -92221,30 +92221,30 @@ "weight": 1.0 }, { - "source": "services_web_auth_roles_rationale_14", + "source": "services_web_auth_roles_rationale_17", "target": "services_web_auth_roles_map_role_name_to_web", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "services/web_auth_roles.py", - "source_location": "L14", + "source_location": "L17", "weight": 1.0 }, { - "source": "services_web_auth_roles_rationale_26", + "source": "services_web_auth_roles_rationale_29", "target": "services_web_auth_roles_resolve_web_role_for_user", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "services/web_auth_roles.py", - "source_location": "L26", + "source_location": "L29", "weight": 1.0 }, { - "source": "services_web_auth_roles_rationale_54", + "source": "services_web_auth_roles_rationale_57", "target": "services_web_auth_roles_iter_user_menu_perm_codes", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "services/web_auth_roles.py", - "source_location": "L54", + "source_location": "L57", "weight": 1.0 }, { @@ -151477,7 +151477,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_14", + "source": "services_web_auth_roles_rationale_17", "target": "models_models_sysmenu", "relation": "uses", "confidence": "INFERRED", @@ -151486,7 +151486,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_26", + "source": "services_web_auth_roles_rationale_29", "target": "models_models_sysmenu", "relation": "uses", "confidence": "INFERRED", @@ -151495,7 +151495,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_54", + "source": "services_web_auth_roles_rationale_57", "target": "models_models_sysmenu", "relation": "uses", "confidence": "INFERRED", @@ -151513,7 +151513,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_14", + "source": "services_web_auth_roles_rationale_17", "target": "models_models_sysrole", "relation": "uses", "confidence": "INFERRED", @@ -151522,7 +151522,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_26", + "source": "services_web_auth_roles_rationale_29", "target": "models_models_sysrole", "relation": "uses", "confidence": "INFERRED", @@ -151531,7 +151531,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_54", + "source": "services_web_auth_roles_rationale_57", "target": "models_models_sysrole", "relation": "uses", "confidence": "INFERRED", @@ -151549,7 +151549,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_14", + "source": "services_web_auth_roles_rationale_17", "target": "models_models_sysrolemenu", "relation": "uses", "confidence": "INFERRED", @@ -151558,7 +151558,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_26", + "source": "services_web_auth_roles_rationale_29", "target": "models_models_sysrolemenu", "relation": "uses", "confidence": "INFERRED", @@ -151567,7 +151567,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_54", + "source": "services_web_auth_roles_rationale_57", "target": "models_models_sysrolemenu", "relation": "uses", "confidence": "INFERRED", @@ -151585,7 +151585,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_14", + "source": "services_web_auth_roles_rationale_17", "target": "models_models_sysuserrole", "relation": "uses", "confidence": "INFERRED", @@ -151594,7 +151594,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_26", + "source": "services_web_auth_roles_rationale_29", "target": "models_models_sysuserrole", "relation": "uses", "confidence": "INFERRED", @@ -151603,7 +151603,7 @@ "weight": 0.8 }, { - "source": "services_web_auth_roles_rationale_54", + "source": "services_web_auth_roles_rationale_57", "target": "models_models_sysuserrole", "relation": "uses", "confidence": "INFERRED", @@ -175288,7 +175288,7 @@ "confidence": "INFERRED", "confidence_score": 0.8, "source_file": "api/menu.py", - "source_location": "L779", + "source_location": "L836", "weight": 1.0 }, { @@ -190128,7 +190128,7 @@ "confidence": "INFERRED", "confidence_score": 0.8, "source_file": "services/web_auth_roles.py", - "source_location": "L44", + "source_location": "L47", "weight": 1.0 }, { @@ -190138,7 +190138,7 @@ "confidence": "INFERRED", "confidence_score": 0.8, "source_file": "services/web_auth_roles.py", - "source_location": "L92", + "source_location": "L99", "weight": 1.0 }, { diff --git a/backend/graphify-out/GRAPH_REPORT.md b/backend/graphify-out/GRAPH_REPORT.md index 5016fb8f..9864f914 100644 --- a/backend/graphify-out/GRAPH_REPORT.md +++ b/backend/graphify-out/GRAPH_REPORT.md @@ -1,7 +1,7 @@ # Graph Report - app (2026-06-12) ## Corpus Check -- 189 files · ~201,737 words +- 189 files · ~201,863 words - Verdict: corpus is large enough that graph structure adds value. ## Summary @@ -238,7 +238,7 @@ Nodes (2): _auto_fill_create_dept_id(), ORM before_insert 钩子:当 create_de ### Community 38 - "Community 38" Cohesion: 0.67 -Nodes (2): get_menu_list(), 运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,13 个一级菜单) +Nodes (2): get_menu_list(), 运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,5 个一级菜单分组) ### Community 39 - "Community 39" Cohesion: 1.0 @@ -279,7 +279,7 @@ Nodes (1): 发送催单通知给配送员 Args: del Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 37`** (4 nodes): `_auto_fill_create_dept_id()`, `get_db()`, `database.py`, `ORM before_insert 钩子:当 create_dept_id 为空时,自动从请求上下文填充当前用户部门 ID` Too small to be a meaningful cluster - may be noise or needs more connections extracted. -- **Thin community `Community 38`** (3 nodes): `get_menu_list()`, `menu.py`, `运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,13 个一级菜单)` +- **Thin community `Community 38`** (3 nodes): `get_menu_list()`, `menu.py`, `运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,5 个一级菜单分组)` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 39`** (2 nodes): `context.py`, `请求级别的用户上下文变量 通过 contextvars 在请求处理链路中传递当前用户信息, 供 SQLAlchemy 事件监听器等底层机制使用,避免逐层手动传` Too small to be a meaningful cluster - may be noise or needs more connections extracted. diff --git a/backend/graphify-out/graph.html b/backend/graphify-out/graph.html index 19fa7bd6..b6416f0b 100644 --- a/backend/graphify-out/graph.html +++ b/backend/graphify-out/graph.html @@ -60,8 +60,8 @@
3596 nodes · 16321 edges · 53 communities