|
@@ -1,28 +1,23 @@
|
|
|
/**
|
|
/**
|
|
|
- * 待分派工单队列(团队主视角,册 5 工单域)。
|
|
|
|
|
|
|
+ * 待分派工单队列(册 5 工单域)。
|
|
|
*
|
|
*
|
|
|
* 数据面:`POST /ticket/pending_queue@v1`(行内自带 `candidates[]`,可分派性由服务端
|
|
* 数据面:`POST /ticket/pending_queue@v1`(行内自带 `candidates[]`,可分派性由服务端
|
|
|
* 按类型/范围/账号状态算好,⛔ 前端再判一遍"谁能接")+ `/ticket/assign@v1` +
|
|
* 按类型/范围/账号状态算好,⛔ 前端再判一遍"谁能接")+ `/ticket/assign@v1` +
|
|
|
* `/ticket/dispatch_auto@v1`(`team_id` 必填、团队须为 auto_avg,否则服务端拒绝,
|
|
* `/ticket/dispatch_auto@v1`(`team_id` 必填、团队须为 auto_avg,否则服务端拒绝,
|
|
|
* 回执原文直出)。队列范围由服务端按身份收口:团队主只见本团队。
|
|
* 回执原文直出)。队列范围由服务端按身份收口:团队主只见本团队。
|
|
|
*
|
|
*
|
|
|
- * 2026-11-17 界面重构:队列主体抽成 [`QueueBoard`],同时服务
|
|
|
|
|
- * - `/workspace/queue`(团队主工作台,团队口径)
|
|
|
|
|
- * - `/work-orders/queue`(「工单与任务」菜单,团队主看本团队、总运营/区域运营看权限范围内全部)
|
|
|
|
|
- * ⛔ 复制两份队列实现——分派口径与候选人口径必须是一把尺子。
|
|
|
|
|
|
|
+ * 团队主查看本团队的待分派工单,总运营和区域运营按各自的可见范围查看队列。
|
|
|
*/
|
|
*/
|
|
|
import { useState } from "react";
|
|
import { useState } from "react";
|
|
|
-import { ArrowRight, Check, ClipboardList, Clock3, Search, Shuffle, UserRoundCheck, UsersRound, X } from "lucide-react";
|
|
|
|
|
-import { Link, useSearchParams } from "react-router";
|
|
|
|
|
|
|
+import { Check, ClipboardList, Clock3, Search, Shuffle, UserRoundCheck, UsersRound, X } from "lucide-react";
|
|
|
|
|
+import { useSearchParams } from "react-router";
|
|
|
import { Button } from "../components/ui/button";
|
|
import { Button } from "../components/ui/button";
|
|
|
import { FilterSelect } from "../components/ui/filter-select";
|
|
import { FilterSelect } from "../components/ui/filter-select";
|
|
|
import { FieldHint } from "../components/ui/field-hint";
|
|
import { FieldHint } from "../components/ui/field-hint";
|
|
|
import { OpsDialog, OpsNotice } from "../components/OperationsKit";
|
|
import { OpsDialog, OpsNotice } from "../components/OperationsKit";
|
|
|
-import { WorkspaceEmpty, WorkspaceHeading } from "../components/RoleWorkspaceKit";
|
|
|
|
|
import { SearchInput } from "../components/ui/search-input";
|
|
import { SearchInput } from "../components/ui/search-input";
|
|
|
import { TicketState } from "../components/ticketState";
|
|
import { TicketState } from "../components/ticketState";
|
|
|
import { WorkOrderLedgerList } from "../components/work-order/WorkOrderLedgerList";
|
|
import { WorkOrderLedgerList } from "../components/work-order/WorkOrderLedgerList";
|
|
|
-import { useDemoIdentity } from "../lib/demo-session";
|
|
|
|
|
import { classifyTicketError, TICKET_PAGE_SIZE, usePendingQueue } from "../lib/ticket";
|
|
import { classifyTicketError, TICKET_PAGE_SIZE, usePendingQueue } from "../lib/ticket";
|
|
|
import {
|
|
import {
|
|
|
TICKET_TYPES, ticketAssign, ticketDispatchAuto, ticketPendingQueue, typeLabel,
|
|
TICKET_TYPES, ticketAssign, ticketDispatchAuto, ticketPendingQueue, typeLabel,
|
|
@@ -35,17 +30,6 @@ import "../styles/orders.css";
|
|
|
import "../styles/work-orders.css";
|
|
import "../styles/work-orders.css";
|
|
|
import "../styles/work-order-ledger.css";
|
|
import "../styles/work-order-ledger.css";
|
|
|
|
|
|
|
|
-export function TeamQueuePage() {
|
|
|
|
|
- const identity = useDemoIdentity();
|
|
|
|
|
- if (identity?.role !== "teamLead" || !identity.maintenanceTeamId) {
|
|
|
|
|
- return <WorkspaceEmpty title="请切换到运维团队主账号" description="待分派队列与分派操作由团队主在服务端权限内使用。" />;
|
|
|
|
|
- }
|
|
|
|
|
- return <section className="role-workspace order-page work-order-ledger page-fill">
|
|
|
|
|
- <WorkspaceHeading title="待分派工单" description={`为 ${identity.name} 的待分派工单安排接单人,候选人按工单类型、负责范围和账号状态筛选。`} aside={<Link className="workspace-link" to="/work-orders">查看团队工单 <ArrowRight size={15} /></Link>} />
|
|
|
|
|
- <QueueBoard teamId={identity.maintenanceTeamId} teamName={identity.name} canAutoDispatch />
|
|
|
|
|
- </section>;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
type QueueBoardProps = {
|
|
type QueueBoardProps = {
|
|
|
/** 团队口径(团队主必传);总运营/区域运营不传=服务端按权限范围内全部团队。 */
|
|
/** 团队口径(团队主必传);总运营/区域运营不传=服务端按权限范围内全部团队。 */
|
|
|
teamId?: string;
|
|
teamId?: string;
|