|
@@ -14,10 +14,9 @@
|
|
|
* 一次最多取 100 张(服务端 `page_norm` 上限),实际还有更多时在页脚说明展示范围。
|
|
* 一次最多取 100 张(服务端 `page_norm` 上限),实际还有更多时在页脚说明展示范围。
|
|
|
*/
|
|
*/
|
|
|
import { useDetailLinkState, type DetailLinkState } from "../lib/detail-navigation";
|
|
import { useDetailLinkState, type DetailLinkState } from "../lib/detail-navigation";
|
|
|
-import { Link, Navigate, useLocation } from "react-router";
|
|
|
|
|
-import { PageIntro } from "../components/PageIntro";
|
|
|
|
|
-import { useState } from "react";
|
|
|
|
|
-import { ArrowRight, ClipboardCheck, ClipboardList, Clock3, Hourglass, LoaderCircle, TriangleAlert, Wrench } from "lucide-react";
|
|
|
|
|
|
|
+import { Link, Navigate, useLocation, useNavigate } from "react-router";
|
|
|
|
|
+import { useRef, useState } from "react";
|
|
|
|
|
+import { ArrowRight, CalendarDays, ClipboardCheck, ClipboardList, Hourglass, LoaderCircle, PanelRight, TriangleAlert, Wrench } from "lucide-react";
|
|
|
import { OpsTableColumns } from "../components/OperationsKit";
|
|
import { OpsTableColumns } from "../components/OperationsKit";
|
|
|
import { TicketState } from "../components/ticketState";
|
|
import { TicketState } from "../components/ticketState";
|
|
|
import { TicketStatusTag, TicketTypeTag } from "../components/work-order/TicketBadges";
|
|
import { TicketStatusTag, TicketTypeTag } from "../components/work-order/TicketBadges";
|
|
@@ -52,6 +51,7 @@ const MINE_QUEUES = [
|
|
|
{ id: "waiting", label: "待对方确认", icon: Hourglass },
|
|
{ id: "waiting", label: "待对方确认", icon: Hourglass },
|
|
|
] as const;
|
|
] as const;
|
|
|
type MineView = "all" | TodoGroupId;
|
|
type MineView = "all" | TodoGroupId;
|
|
|
|
|
+const WORK_DATE_FORMAT = new Intl.DateTimeFormat("zh-CN", { month: "long", day: "numeric", weekday: "long" });
|
|
|
|
|
|
|
|
export function WorkOrderMinePage() {
|
|
export function WorkOrderMinePage() {
|
|
|
const identity = useDemoIdentity();
|
|
const identity = useDemoIdentity();
|
|
@@ -62,6 +62,8 @@ export function WorkOrderMinePage() {
|
|
|
function WorkOrderMineInner() {
|
|
function WorkOrderMineInner() {
|
|
|
const linkState = useDetailLinkState();
|
|
const linkState = useDetailLinkState();
|
|
|
const location = useLocation();
|
|
const location = useLocation();
|
|
|
|
|
+ const navigate = useNavigate();
|
|
|
|
|
+ const preview = useRef<HTMLElement>(null);
|
|
|
const params = new URLSearchParams(location.search);
|
|
const params = new URLSearchParams(location.search);
|
|
|
const activeQueue = MINE_QUEUES.find(({ id }) => id === params.get("view")) ?? MINE_QUEUES[0];
|
|
const activeQueue = MINE_QUEUES.find(({ id }) => id === params.get("view")) ?? MINE_QUEUES[0];
|
|
|
|
|
|
|
@@ -73,117 +75,137 @@ function WorkOrderMineInner() {
|
|
|
const today = businessToday();
|
|
const today = businessToday();
|
|
|
const groups = groupTodoRows(rows, today);
|
|
const groups = groupTodoRows(rows, today);
|
|
|
const displayedGroups = activeQueue.id === "all" ? groups : groups.filter(({ id }) => id === activeQueue.id);
|
|
const displayedGroups = activeQueue.id === "all" ? groups : groups.filter(({ id }) => id === activeQueue.id);
|
|
|
- const truncated = total > rows.length;
|
|
|
|
|
|
|
+ const displayedRows = displayedGroups.flatMap((group) => group.rows);
|
|
|
const loaded = !list.loading && !fail;
|
|
const loaded = !list.loading && !fail;
|
|
|
|
|
+ const selection = params.get("selected");
|
|
|
|
|
+ const selected = loaded ? displayedRows.find((row) => row.ticket_id === selection) ?? displayedRows[0] : undefined;
|
|
|
|
|
|
|
|
// 开通类计划执行日当天可以执行,是否超期以服务端字段为准。
|
|
// 开通类计划执行日当天可以执行,是否超期以服务端字段为准。
|
|
|
const overdue = rows.filter((row) => row.status !== "completed" && row.overdue_7d === true).length;
|
|
const overdue = rows.filter((row) => row.status !== "completed" && row.overdue_7d === true).length;
|
|
|
const counts = { all: rows.length, due: 0, rest: 0, waiting: 0 };
|
|
const counts = { all: rows.length, due: 0, rest: 0, waiting: 0 };
|
|
|
for (const group of groups) counts[group.id] = group.rows.length;
|
|
for (const group of groups) counts[group.id] = group.rows.length;
|
|
|
-
|
|
|
|
|
const metrics = [
|
|
const metrics = [
|
|
|
- { label: "当前待办", value: rows.length, icon: ClipboardList, tone: "primary" },
|
|
|
|
|
- { label: "已超期", value: overdue, icon: Clock3, tone: overdue > 0 ? "warning" : undefined },
|
|
|
|
|
- { label: "待对方确认", value: counts.waiting, icon: Hourglass },
|
|
|
|
|
|
|
+ { label: "当前待办", value: rows.length },
|
|
|
|
|
+ { label: "已超期", value: overdue, warning: overdue > 0 },
|
|
|
|
|
+ { label: "待对方确认", value: counts.waiting },
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
|
|
+ function locationWith(next: URLSearchParams) {
|
|
|
|
|
+ return { pathname: location.pathname, search: next.toString(), hash: location.hash };
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
function queueUrl(view: MineView) {
|
|
function queueUrl(view: MineView) {
|
|
|
const next = new URLSearchParams(params);
|
|
const next = new URLSearchParams(params);
|
|
|
if (view === "all") next.delete("view");
|
|
if (view === "all") next.delete("view");
|
|
|
else next.set("view", view);
|
|
else next.set("view", view);
|
|
|
- return { pathname: location.pathname, search: next.toString(), hash: location.hash };
|
|
|
|
|
|
|
+ if (view !== activeQueue.id) next.delete("selected");
|
|
|
|
|
+ return locationWith(next);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function selectTicket(id: string) {
|
|
|
|
|
+ const next = new URLSearchParams(params);
|
|
|
|
|
+ next.set("selected", id);
|
|
|
|
|
+ navigate(locationWith(next), { replace: true, state: location.state, preventScrollReset: true });
|
|
|
|
|
+ if (window.matchMedia?.("(max-width: 1170px)")?.matches) preview.current?.scrollIntoView?.({ block: "nearest" });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return <section className="order-page work-order-mine-page">
|
|
return <section className="order-page work-order-mine-page">
|
|
|
- <header className="order-heading work-order-mine-heading">
|
|
|
|
|
- <div>
|
|
|
|
|
|
|
+ <header className="work-order-mine-hero">
|
|
|
|
|
+ <div className="work-order-mine-hero-copy">
|
|
|
|
|
+ <time dateTime={today}><CalendarDays size={15} aria-hidden="true" />{WORK_DATE_FORMAT.format(new Date(today + "T12:00:00"))}</time>
|
|
|
<h1>我的待办</h1>
|
|
<h1>我的待办</h1>
|
|
|
- <PageIntro>查看分派给你的工单,按期限安排处理和跟进。</PageIntro>
|
|
|
|
|
|
|
+ <p>查看分派给你的工单,安排处理与跟进。</p>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <dl className="work-order-mine-summary" aria-label="当前待办统计">
|
|
|
|
|
+ {metrics.map(({ label, value, warning }) => <div key={label} data-warning={warning || undefined}>
|
|
|
|
|
+ <dt>{label}</dt>
|
|
|
|
|
+ <dd>{list.loading ? "…" : fail ? "—" : value.toLocaleString("zh-CN")}</dd>
|
|
|
|
|
+ </div>)}
|
|
|
|
|
+ </dl>
|
|
|
|
|
+ </header>
|
|
|
|
|
+
|
|
|
|
|
+ <div className="work-order-mine-toolbar">
|
|
|
|
|
+ <nav className="work-order-mine-views" aria-label="待办分组">
|
|
|
|
|
+ {MINE_QUEUES.map(({ id, label, icon: Icon }) => <Link key={id} to={queueUrl(id)} replace state={location.state}
|
|
|
|
|
+ aria-current={activeQueue.id === id ? "page" : undefined}>
|
|
|
|
|
+ <Icon size={16} aria-hidden="true" />
|
|
|
|
|
+ <span>{label}</span>
|
|
|
|
|
+ {loaded && <small className="work-order-mine-view-count" data-priority={id === "due" && counts[id] > 0}>{counts[id]}</small>}
|
|
|
|
|
+ </Link>)}
|
|
|
|
|
+ </nav>
|
|
|
<div className="work-order-mine-links">
|
|
<div className="work-order-mine-links">
|
|
|
<MobileEntryHint />
|
|
<MobileEntryHint />
|
|
|
<Link className="work-order-mine-all" to="/work-orders">全部工单<ArrowRight size={15} aria-hidden="true" /></Link>
|
|
<Link className="work-order-mine-all" to="/work-orders">全部工单<ArrowRight size={15} aria-hidden="true" /></Link>
|
|
|
</div>
|
|
</div>
|
|
|
- </header>
|
|
|
|
|
-
|
|
|
|
|
- <dl className="work-order-mine-summary" aria-label="当前待办统计">
|
|
|
|
|
- {metrics.map(({ label, value, icon: Icon, tone }) => <div key={label} data-tone={tone}>
|
|
|
|
|
- <dt><span className="work-order-mine-metric-icon" aria-hidden="true"><Icon size={17} /></span>{label}</dt>
|
|
|
|
|
- <dd>{list.loading ? "…" : fail ? "—" : value.toLocaleString("zh-CN")}</dd>
|
|
|
|
|
- </div>)}
|
|
|
|
|
- </dl>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<div className="work-order-mine-desk">
|
|
<div className="work-order-mine-desk">
|
|
|
- <nav className="work-order-mine-nav" aria-label="待办分组">
|
|
|
|
|
- <h2>任务队列</h2>
|
|
|
|
|
- <div className="work-order-mine-views">
|
|
|
|
|
- {MINE_QUEUES.map(({ id, label, icon: Icon }) => <Link key={id} to={queueUrl(id)} replace state={location.state}
|
|
|
|
|
- aria-current={activeQueue.id === id ? "page" : undefined}>
|
|
|
|
|
- <Icon size={16} aria-hidden="true" />
|
|
|
|
|
- <span>{label}</span>
|
|
|
|
|
- {loaded && <small className="work-order-mine-view-count" data-priority={id === "due" && counts[id] > 0}>{counts[id]}</small>}
|
|
|
|
|
- </Link>)}
|
|
|
|
|
- </div>
|
|
|
|
|
- </nav>
|
|
|
|
|
-
|
|
|
|
|
<section className="order-list-shell work-order-mine-queue" aria-label={activeQueue.label}>
|
|
<section className="order-list-shell work-order-mine-queue" aria-label={activeQueue.label}>
|
|
|
{list.loading ? <div className="order-empty work-order-mine-empty" role="status">
|
|
{list.loading ? <div className="order-empty work-order-mine-empty" role="status">
|
|
|
<LoaderCircle size={23} className="work-order-mine-loading" aria-hidden="true" />正在读取待办…
|
|
<LoaderCircle size={23} className="work-order-mine-loading" aria-hidden="true" />正在读取待办…
|
|
|
</div> : fail ? <TicketState fail={fail} onRetry={list.reload} />
|
|
</div> : fail ? <TicketState fail={fail} onRetry={list.reload} />
|
|
|
- : !displayedGroups.length ? <div className="order-empty work-order-mine-empty">
|
|
|
|
|
- <ClipboardCheck size={26} aria-hidden="true" />
|
|
|
|
|
|
|
+ : !displayedRows.length ? <div className="order-empty work-order-mine-empty">
|
|
|
|
|
+ <ClipboardCheck size={27} aria-hidden="true" />
|
|
|
<h3>{rows.length ? "这一组暂无工单" : "暂无待办工单"}</h3>
|
|
<h3>{rows.length ? "这一组暂无工单" : "暂无待办工单"}</h3>
|
|
|
{!rows.length && <p>分派给你的工单会出现在这里。</p>}
|
|
{!rows.length && <p>分派给你的工单会出现在这里。</p>}
|
|
|
</div> : <div className="ops-table-wrap work-order-mine-scroll" role="region" aria-label="待办工单清单" tabIndex={0}>
|
|
</div> : <div className="ops-table-wrap work-order-mine-scroll" role="region" aria-label="待办工单清单" tabIndex={0}>
|
|
|
<table className="ops-table work-order-mine-table" aria-label="我的待办工单">
|
|
<table className="ops-table work-order-mine-table" aria-label="我的待办工单">
|
|
|
- <OpsTableColumns widths={[370, 205, 155, 270]} />
|
|
|
|
|
|
|
+ <OpsTableColumns widths={[345, 205, 180, 270]} />
|
|
|
<thead><tr>
|
|
<thead><tr>
|
|
|
- <th scope="col">工单事项</th>
|
|
|
|
|
- <th scope="col">类型 / 状态</th>
|
|
|
|
|
- <th scope="col">执行 / 期限</th>
|
|
|
|
|
- <th scope="col">下一步</th>
|
|
|
|
|
|
|
+ <th scope="col">工单 / 客户</th>
|
|
|
|
|
+ <th scope="col">进度</th>
|
|
|
|
|
+ <th scope="col">期限</th>
|
|
|
|
|
+ <th scope="col">办理</th>
|
|
|
</tr></thead>
|
|
</tr></thead>
|
|
|
{displayedGroups.map((group) => <tbody key={group.id}>
|
|
{displayedGroups.map((group) => <tbody key={group.id}>
|
|
|
{activeQueue.id === "all" && <tr className="work-order-mine-group" data-tone={group.tone}>
|
|
{activeQueue.id === "all" && <tr className="work-order-mine-group" data-tone={group.tone}>
|
|
|
- <th colSpan={4} scope="rowgroup">
|
|
|
|
|
- <span className="work-order-mine-group-label" title={group.hint}>
|
|
|
|
|
- {group.id === "due" ? <TriangleAlert size={14} aria-hidden="true" /> : group.id === "waiting"
|
|
|
|
|
- ? <Hourglass size={14} aria-hidden="true" /> : <ClipboardList size={14} aria-hidden="true" />}
|
|
|
|
|
|
|
+ <th colSpan={4} scope="rowgroup" title={group.hint}>
|
|
|
|
|
+ <span className="work-order-mine-group-label">
|
|
|
{MINE_QUEUES.find(({ id }) => id === group.id)?.label}
|
|
{MINE_QUEUES.find(({ id }) => id === group.id)?.label}
|
|
|
</span>
|
|
</span>
|
|
|
- {group.id === "due" && <span className="work-order-mine-group-hint">{group.hint}</span>}
|
|
|
|
|
|
|
+ <span className="work-order-mine-group-count">{group.rows.length}</span>
|
|
|
</th>
|
|
</th>
|
|
|
</tr>}
|
|
</tr>}
|
|
|
- {group.rows.map((row) => <MineQueueRow key={row.ticket_id} row={row} today={today} linkState={linkState} onUrged={list.reload} />)}
|
|
|
|
|
|
|
+ {group.rows.map((row) => <MineQueueRow key={row.ticket_id} row={row} today={today} linkState={linkState}
|
|
|
|
|
+ selected={selected?.ticket_id === row.ticket_id} onSelect={() => selectTicket(row.ticket_id)} onUrged={list.reload} />)}
|
|
|
</tbody>)}
|
|
</tbody>)}
|
|
|
</table>
|
|
</table>
|
|
|
</div>}
|
|
</div>}
|
|
|
- {loaded && truncated && <footer className="work-order-mine-footer">
|
|
|
|
|
|
|
+ {loaded && total > rows.length && <footer className="work-order-mine-footer">
|
|
|
<span>展示前 {rows.length} 张待办,共 {total.toLocaleString("zh-CN")} 张。各分组按当前展示的工单统计。</span>
|
|
<span>展示前 {rows.length} 张待办,共 {total.toLocaleString("zh-CN")} 张。各分组按当前展示的工单统计。</span>
|
|
|
<Link className="ops-table-action" to="/work-orders">去全部工单<ArrowRight size={14} aria-hidden="true" /></Link>
|
|
<Link className="ops-table-action" to="/work-orders">去全部工单<ArrowRight size={14} aria-hidden="true" /></Link>
|
|
|
</footer>}
|
|
</footer>}
|
|
|
</section>
|
|
</section>
|
|
|
|
|
+ {selected && <aside className="work-order-mine-preview" id="mine-preview" aria-label="工单预览" ref={preview}>
|
|
|
|
|
+ <MineTicketPreview row={selected} today={today} linkState={linkState} />
|
|
|
|
|
+ </aside>}
|
|
|
</div>
|
|
</div>
|
|
|
</section>;
|
|
</section>;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function MineQueueRow({ row, today, linkState, onUrged }: {
|
|
|
|
|
- row: TicketListItem; today: string; linkState: DetailLinkState; onUrged: () => void;
|
|
|
|
|
|
|
+function mineDeadline(row: TicketListItem, today: string) {
|
|
|
|
|
+ const { date, kind } = todoRowDeadline(row);
|
|
|
|
|
+ const planned = kind === "planned";
|
|
|
|
|
+ const left = row.status === "completed" ? null : daysUntil(date, today);
|
|
|
|
|
+ const label = kind === "deferred" ? "已延期至" : planned ? "计划执行" : "期限";
|
|
|
|
|
+ const relative = left === null ? null : left < 0 ? `已超 ${-left} 天` : left === 0
|
|
|
|
|
+ ? (planned ? "今天必须执行" : "今天到期") : `还剩 ${left} 天`;
|
|
|
|
|
+ const shortLabel = kind === "deferred" ? "延期" : planned ? "计划" : null;
|
|
|
|
|
+ return { date, label, shortLabel, relative, late: left !== null && left < (planned ? 0 : 1) };
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function MineQueueRow({ row, today, selected, onSelect, linkState, onUrged }: {
|
|
|
|
|
+ row: TicketListItem; today: string; selected: boolean; onSelect: () => void; linkState: DetailLinkState; onUrged: () => void;
|
|
|
}) {
|
|
}) {
|
|
|
const summary = todoRowSummary(row);
|
|
const summary = todoRowSummary(row);
|
|
|
const step = nextStepOf(row);
|
|
const step = nextStepOf(row);
|
|
|
- const deadline = todoRowDeadline(row);
|
|
|
|
|
|
|
+ const deadline = mineDeadline(row, today);
|
|
|
const ticketPath = `/work-orders/${encodeURIComponent(row.ticket_id)}`;
|
|
const ticketPath = `/work-orders/${encodeURIComponent(row.ticket_id)}`;
|
|
|
- const planned = deadline.kind === "planned";
|
|
|
|
|
- const left = row.status === "completed" ? null : daysUntil(deadline.date, today);
|
|
|
|
|
- const dateLabel = deadline.kind === "deferred" ? "已延期至" : planned ? "计划执行" : "期限";
|
|
|
|
|
- const relative = left === null ? null : left < 0 ? `已超 ${-left} 天` : left === 0
|
|
|
|
|
- ? (planned ? "今天必须执行" : "今天到期") : `还剩 ${left} 天`;
|
|
|
|
|
- const late = left !== null && left < (planned ? 0 : 1);
|
|
|
|
|
|
|
|
|
|
- return <tr className="work-order-mine-row">
|
|
|
|
|
|
|
+ return <tr className="work-order-mine-row" data-selected={selected || undefined}>
|
|
|
<td>
|
|
<td>
|
|
|
- <Link to={ticketPath} state={linkState} className="table-cell-title" title={summary.title}>{summary.title}</Link>
|
|
|
|
|
|
|
+ <button type="button" className="work-order-mine-ticket-button" onClick={onSelect} title={summary.title}
|
|
|
|
|
+ aria-controls="mine-preview" aria-pressed={selected}>{summary.title}</button>
|
|
|
{summary.meta && <small className="work-order-mine-meta" title={summary.meta}>{summary.meta}</small>}
|
|
{summary.meta && <small className="work-order-mine-meta" title={summary.meta}>{summary.meta}</small>}
|
|
|
</td>
|
|
</td>
|
|
|
<td><div className="work-order-mine-badges">
|
|
<td><div className="work-order-mine-badges">
|
|
@@ -193,7 +215,9 @@ function MineQueueRow({ row, today, linkState, onUrged }: {
|
|
|
<td className="work-order-mine-date">
|
|
<td className="work-order-mine-date">
|
|
|
{deadline.date ? <>
|
|
{deadline.date ? <>
|
|
|
<time dateTime={deadline.date}>{fmtDate(deadline.date)}</time>
|
|
<time dateTime={deadline.date}>{fmtDate(deadline.date)}</time>
|
|
|
- <small className={late ? "is-late" : undefined}>{dateLabel}{relative && ` · ${relative}`}</small>
|
|
|
|
|
|
|
+ <small className={deadline.late ? "is-late" : undefined}>
|
|
|
|
|
+ {deadline.relative ? [deadline.shortLabel, deadline.relative].filter(Boolean).join(" · ") : deadline.label}
|
|
|
|
|
+ </small>
|
|
|
</> : <span className="table-placeholder">按 SLA</span>}
|
|
</> : <span className="table-placeholder">按 SLA</span>}
|
|
|
</td>
|
|
</td>
|
|
|
<td>
|
|
<td>
|
|
@@ -201,16 +225,54 @@ function MineQueueRow({ row, today, linkState, onUrged }: {
|
|
|
{step.label
|
|
{step.label
|
|
|
? <Link className={`work-order-next-step tone-${step.tone}`}
|
|
? <Link className={`work-order-next-step tone-${step.tone}`}
|
|
|
to={step.action ? `${ticketPath}?act=${step.action}` : ticketPath} state={linkState}>
|
|
to={step.action ? `${ticketPath}?act=${step.action}` : ticketPath} state={linkState}>
|
|
|
- {step.label}<ArrowRight size={14} aria-hidden="true" />
|
|
|
|
|
|
|
+ {step.label}<ArrowRight size={13} aria-hidden="true" />
|
|
|
</Link>
|
|
</Link>
|
|
|
- : <span className={`work-order-next-step is-passive tone-${step.tone}`}>{passiveParts(step)}</span>}
|
|
|
|
|
|
|
+ : <span className="work-order-mine-passive">{passiveParts(step)}</span>}
|
|
|
<UrgeControl row={row} onSent={onUrged} />
|
|
<UrgeControl row={row} onSent={onUrged} />
|
|
|
</div>
|
|
</div>
|
|
|
- {step.hint && <small>{step.hint}</small>}
|
|
|
|
|
</td>
|
|
</td>
|
|
|
</tr>;
|
|
</tr>;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function MineTicketPreview({ row, today, linkState }: { row: TicketListItem; today: string; linkState: DetailLinkState }) {
|
|
|
|
|
+ const { title } = todoRowSummary(row);
|
|
|
|
|
+ const deadline = mineDeadline(row, today);
|
|
|
|
|
+ const step = nextStepOf(row);
|
|
|
|
|
+ const ticketPath = `/work-orders/${encodeURIComponent(row.ticket_id)}`;
|
|
|
|
|
+ return <>
|
|
|
|
|
+ <div className="work-order-mine-preview-head">
|
|
|
|
|
+ <span><PanelRight size={16} aria-hidden="true" />工单预览</span>
|
|
|
|
|
+ <Link to={ticketPath} state={linkState}>查看详情<ArrowRight size={14} aria-hidden="true" /></Link>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className="work-order-mine-preview-body">
|
|
|
|
|
+ <div className="work-order-mine-preview-heading">
|
|
|
|
|
+ {row.ticket_no && <p className="work-order-mine-number">{row.ticket_no}</p>}
|
|
|
|
|
+ <h2 aria-live="polite">{title}</h2>
|
|
|
|
|
+ <div className="work-order-mine-badges"><TicketTypeTag type={row.ticket_type} /><TicketStatusTag status={row.status} type={row.ticket_type} /></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <dl className="work-order-mine-facts">
|
|
|
|
|
+ {row.customer_name && <div><dt>客户</dt><dd>{row.customer_name}</dd></div>}
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <dt>{deadline.label}</dt>
|
|
|
|
|
+ <dd className={deadline.late ? "is-late" : undefined}>
|
|
|
|
|
+ {deadline.date ? <time dateTime={deadline.date}>{fmtDate(deadline.date)}</time> : "按 SLA"}
|
|
|
|
|
+ {deadline.relative && <small>{deadline.relative}</small>}
|
|
|
|
|
+ </dd>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </dl>
|
|
|
|
|
+ <div className="work-order-mine-inspect-next" data-tone={step.tone}>
|
|
|
|
|
+ <p>下一步</p>
|
|
|
|
|
+ {step.label
|
|
|
|
|
+ ? <Link to={step.action ? `${ticketPath}?act=${step.action}` : ticketPath} state={linkState} className="work-order-mine-preview-action">
|
|
|
|
|
+ {step.label}<ArrowRight size={15} aria-hidden="true" />
|
|
|
|
|
+ </Link>
|
|
|
|
|
+ : <div className="work-order-mine-passive">{passiveParts(step)}</div>}
|
|
|
|
|
+ {step.hint && <small>{step.hint}</small>}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </>;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 只读态文案的渲染片段:把对家**人名**套一层 `<strong>`(业主 2026-11-18 裁定:人名要加粗)。
|
|
* 只读态文案的渲染片段:把对家**人名**套一层 `<strong>`(业主 2026-11-18 裁定:人名要加粗)。
|
|
|
*
|
|
*
|