feat: virtual company module, team projects, PWA dishes app, and startup scripts overhaul

- Add company module (3-tier org, CEO planning, parallel departments)
- Add company orchestrator, knowledge extractor, presets, scheduler
- Add company API endpoints, models, and frontend views
- Add 今天吃啥 PWA app (69 dishes, real images, offline support)
- Add team_projects output directory structure
- Add unified manage.ps1 for service lifecycle
- Add Windows startup guide v1.0
- Add TTS troubleshooting doc
- Update frontend (AgentChat UX overhaul, new views)
- Update backend (voice engine fix, multi-tenant, RBAC)
- Remove deprecated startup scripts and old docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 22:37:56 +08:00
parent 3483c6b3be
commit f2e65a8fbb
259 changed files with 39239 additions and 3148 deletions

View File

@@ -151,7 +151,7 @@ async def get_workflows(
):
"""获取工作流列表(支持搜索、筛选、排序、工作区筛选)"""
# 管理员可以看到所有工作流普通用户只能看到自己拥有的或有read权限的
if current_user.role == "admin":
if current_user.has_permission("workflow:view_all"):
query = db.query(Workflow)
else:
# 获取用户拥有或有read权限的工作流
@@ -350,8 +350,8 @@ async def delete_workflow(
if not workflow:
raise NotFoundError("工作流", workflow_id)
# 只有工作流所有者可以删除
if workflow.user_id != current_user.id and current_user.role != "admin":
# 只有工作流所有者或管理员可以删除
if workflow.user_id != current_user.id and not current_user.has_permission("workflow:delete"):
raise HTTPException(status_code=403, detail="无权删除此工作流")
db.delete(workflow)