diff --git a/backend/app/api/dashboard.py b/backend/app/api/dashboard.py index 915f1b53..4eec9d26 100644 --- a/backend/app/api/dashboard.py +++ b/backend/app/api/dashboard.py @@ -476,13 +476,17 @@ def my_dashboard( from app.models import ActionPlan if current_user.role == "ceo": # CEO/管理员查看全部行动方案(2026-08-26修复: 原逻辑只按assignee过滤导致工作台显示空) - my_plans = db.query(ActionPlan).order_by(ActionPlan.updated_at.desc()).all() + # 2026-08-31 隔离补漏: CEO 看全部也须按 entity_id 过滤,防跨账套待办串数据 + my_plans = db.query(ActionPlan).filter( + ActionPlan.entity_id == entity_id, + ).order_by(ActionPlan.updated_at.desc()).all() else: my_plans = db.query(ActionPlan).filter( or_( ActionPlan.assignee == username, ActionPlan.assignee == name, - ) + ), + ActionPlan.entity_id == entity_id, ).order_by(ActionPlan.updated_at.desc()).all() plan_list = [] diff --git a/frontend/src/views/MyDashboard.vue b/frontend/src/views/MyDashboard.vue index b43f0d27..92420f30 100644 --- a/frontend/src/views/MyDashboard.vue +++ b/frontend/src/views/MyDashboard.vue @@ -32,16 +32,17 @@