/** * 待分派(册 5,「工单与任务」菜单入口)。 * * 与 `/workspace/queue` 共用 [`QueueBoard`]:团队主看本团队并可一键自动平均分派; * 总运营/区域运营看权限范围内全部团队的待分派单(多一列「团队」), * 自动分派按团队执行 ⇒ 总运营侧按钮禁用并说明原因,⛔ 让他点一下再吃服务端 `team_id` 必填。 * * 运维成员(`ops`/`worker`)不在 `pending_queue` 的角色集内(服务端 `guard::gate` 直拒), * 因此不给他们这个菜单,直接敲 URL 也落回我的待办。 */ import { Navigate } from "react-router"; import { PageIntro } from "../components/PageIntro"; import { Info } from "lucide-react"; import { QueueBoard } from "./TeamQueuePage"; import { useDemoIdentity } from "../lib/demo-session"; import "../styles/operations.css"; import "../styles/work-orders.css"; const QUEUE_ROLES = ["admin", "regAdmin", "teamLead"]; export function WorkOrderQueuePage() { const identity = useDemoIdentity(); if (identity && !QUEUE_ROLES.includes(identity.role)) return ; const teamLead = identity?.role === "teamLead" && identity.maintenanceTeamId ? identity : null; return

DISPATCH / 待分派

待分派

{teamLead ? `为 ${teamLead.name} 的待分派工单找合适的接单人,候选人按工单类型、负责范围和账号状态筛选。` : "在负责范围内逐张派单。需要自动平均分派时,请切到对应的团队主账号。"}
{!teamLead &&

自动平均分派以「团队」为作用域:服务端要求 `team_id` 且团队分派方式为自动平均。总部视角请到运维团队页切换分派方式,或在此逐张指定成员。

}
; }