fix(workbench): 工作台待关注优化+隔离补漏——类型标签/排序固化/标题措辞 + my_dashboard按entity_id过滤 (dashboard-optimize)
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user