From 815acda0da637457a4b266dc15bda6eb72a25eed Mon Sep 17 00:00:00 2001 From: Hermes CI Fix Date: Mon, 31 Aug 2026 15:51:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(workbench):=20=E5=B7=A5=E4=BD=9C=E5=8F=B0?= =?UTF-8?q?=E5=BE=85=E5=85=B3=E6=B3=A8=E4=BC=98=E5=8C=96+=E9=9A=94?= =?UTF-8?q?=E7=A6=BB=E8=A1=A5=E6=BC=8F=E2=80=94=E2=80=94=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=A0=87=E7=AD=BE/=E6=8E=92=E5=BA=8F=E5=9B=BA=E5=8C=96/?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=8E=AA=E8=BE=9E=20+=20my=5Fdashboard?= =?UTF-8?q?=E6=8C=89entity=5Fid=E8=BF=87=E6=BB=A4=20(dashboard-optimize)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/api/dashboard.py | 8 ++++++-- frontend/src/views/MyDashboard.vue | 19 ++++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) 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 @@