|
@@ -11,7 +11,7 @@ import { useLayoutEffect, useEffect, useMemo, useRef, useState, type CSSProperti
|
|
|
import { createPortal } from "react-dom";
|
|
import { createPortal } from "react-dom";
|
|
|
import { ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, Building2, ChevronDown, ChevronRight, Download, Info, MapPinned, PencilLine, Plus, Search, Trash2, UserRound, Users, Wrench, X } from "lucide-react";
|
|
import { ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, Building2, ChevronDown, ChevronRight, Download, Info, MapPinned, PencilLine, Plus, Search, Trash2, UserRound, Users, Wrench, X } from "lucide-react";
|
|
|
import { Link, useParams, useSearchParams } from "react-router";
|
|
import { Link, useParams, useSearchParams } from "react-router";
|
|
|
-import { Button as FilterResetButton } from "../components/ui/button";
|
|
|
|
|
|
|
+import { Button as UiButton } from "../components/ui/button";
|
|
|
import { TreeSelect } from "../components/ui/tree-select";
|
|
import { TreeSelect } from "../components/ui/tree-select";
|
|
|
import { FieldHint } from "../components/ui/field-hint";
|
|
import { FieldHint } from "../components/ui/field-hint";
|
|
|
import { regionLevelText, regionParentInTree, regionTreeNodes } from "../lib/region-tree";
|
|
import { regionLevelText, regionParentInTree, regionTreeNodes } from "../lib/region-tree";
|
|
@@ -61,8 +61,30 @@ const maintenanceTicketCodes = maintenanceTicketOptions.map((option) => option.v
|
|
|
/** 团队档案上的类型码集合;缺省=全部类型(⛔ 用中文标签当值,后端会按非法码拒绝)。 */
|
|
/** 团队档案上的类型码集合;缺省=全部类型(⛔ 用中文标签当值,后端会按非法码拒绝)。 */
|
|
|
const teamTicketTypes = (team: MaintenanceTeam) => team.ticketTypes?.length ? team.ticketTypes : maintenanceTicketCodes;
|
|
const teamTicketTypes = (team: MaintenanceTeam) => team.ticketTypes?.length ? team.ticketTypes : maintenanceTicketCodes;
|
|
|
|
|
|
|
|
-function PageHead({ eyebrow, title, description, action }: { eyebrow: string; title: string; description?: string; action?: ReactNode }) {
|
|
|
|
|
- return <div className="org-page-head"><div><p className="org-eyebrow">{eyebrow}</p><h1>{title}</h1>{description && <PageIntro>{description}</PageIntro>}</div>{action}</div>;
|
|
|
|
|
|
|
+function PageHead({ eyebrow, title, description, action, exportCsv }: {
|
|
|
|
|
+ eyebrow: string;
|
|
|
|
|
+ title: string;
|
|
|
|
|
+ description?: string;
|
|
|
|
|
+ action?: ReactNode;
|
|
|
|
|
+ exportCsv?: { onClick: () => void; disabled: boolean };
|
|
|
|
|
+}) {
|
|
|
|
|
+ return (
|
|
|
|
|
+ <div className="org-page-head">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p className="org-eyebrow">{eyebrow}</p>
|
|
|
|
|
+ <h1>{title}</h1>
|
|
|
|
|
+ {description && <PageIntro>{description}</PageIntro>}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {exportCsv ? (
|
|
|
|
|
+ <div className="org-page-head-actions">
|
|
|
|
|
+ <UiButton variant="outline" disabled={exportCsv.disabled} onClick={exportCsv.onClick}>
|
|
|
|
|
+ <Download size={16} aria-hidden="true" />导出 CSV
|
|
|
|
|
+ </UiButton>
|
|
|
|
|
+ {action}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ ) : action}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** 账号列手机号展示:后端§5.4 已掩码则原样;偶发明文 11 位时再罩一层(⛔ 当拨号明文)。 */
|
|
/** 账号列手机号展示:后端§5.4 已掩码则原样;偶发明文 11 位时再罩一层(⛔ 当拨号明文)。 */
|
|
@@ -1093,7 +1115,7 @@ export function OperatorManagementPage() {
|
|
|
return <DirectorySortHeader label={label} direction={sortKey === key ? sortDir : undefined} onSort={() => toggleSort(key)} />;
|
|
return <DirectorySortHeader label={label} direction={sortKey === key ? sortDir : undefined} onSort={() => toggleSort(key)} />;
|
|
|
}
|
|
}
|
|
|
return <div className="org-page org-operator-page page-fill">
|
|
return <div className="org-page org-operator-page page-fill">
|
|
|
- <PageHead eyebrow="组织与区域 / 02" title="运营商管理" description="按所属区域建立结算对手方档案,集中核对对账口径。" action={<Button onClick={() => setEditor({ kind: "operator" })}><Plus size={16} /> 新增运营商</Button>} />
|
|
|
|
|
|
|
+ <PageHead eyebrow="组织与区域 / 02" title="运营商管理" exportCsv={{ onClick: exportRows, disabled: !rows.length }} description="按所属区域建立结算对手方档案,集中核对对账口径。" action={<Button onClick={() => setEditor({ kind: "operator" })}><Plus size={16} /> 新增运营商</Button>} />
|
|
|
<OrgFetchState status={status} collections={["operators"]} />
|
|
<OrgFetchState status={status} collections={["operators"]} />
|
|
|
<CollectionFailed status={status} collection="operators" title="运营商" />
|
|
<CollectionFailed status={status} collection="operators" title="运营商" />
|
|
|
{invalidRegion && <p className="org-form-error" role="status">区域参数无效({invalidRegion}),已回落为全部区域。</p>}
|
|
{invalidRegion && <p className="org-form-error" role="status">区域参数无效({invalidRegion}),已回落为全部区域。</p>}
|
|
@@ -1105,8 +1127,7 @@ export function OperatorManagementPage() {
|
|
|
<option value="">全部周期</option>
|
|
<option value="">全部周期</option>
|
|
|
{payCycleOptions.map((value) => <option key={value} value={value}>{value}</option>)}
|
|
{payCycleOptions.map((value) => <option key={value} value={value}>{value}</option>)}
|
|
|
</FilterSelect>
|
|
</FilterSelect>
|
|
|
- {(query || region || cycle) && <FilterResetButton variant="ghost" size="sm" onClick={resetFilters}>重置筛选</FilterResetButton>}
|
|
|
|
|
- <FilterResetButton variant="ghost" size="sm" disabled={!rows.length} onClick={exportRows}><Download size={14} /> 导出 CSV</FilterResetButton>
|
|
|
|
|
|
|
+ {(query || region || cycle) && <UiButton variant="ghost" size="sm" onClick={resetFilters}>重置筛选</UiButton>}
|
|
|
</div>
|
|
</div>
|
|
|
<div ref={tableOverflow.ref} tabIndex={0} role="region" aria-label="运营商列表,可横向滚动查看字段" className={`measured-table-scroll org-table-wrap org-operator-table-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.width >= 600 ? " can-pin-identity" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`}>
|
|
<div ref={tableOverflow.ref} tabIndex={0} role="region" aria-label="运营商列表,可横向滚动查看字段" className={`measured-table-scroll org-table-wrap org-operator-table-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.width >= 600 ? " can-pin-identity" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`}>
|
|
|
<table className="org-table org-operator-ledger" style={{ minWidth: minimumTableWidth }}>
|
|
<table className="org-table org-operator-ledger" style={{ minWidth: minimumTableWidth }}>
|
|
@@ -1215,12 +1236,12 @@ export function PartnerManagementPage() {
|
|
|
function sortHeader(key: PtSort, label: string) {
|
|
function sortHeader(key: PtSort, label: string) {
|
|
|
return <DirectorySortHeader label={label} direction={sortKey === key ? sortDir : undefined} onSort={() => toggleSort(key)} />;
|
|
return <DirectorySortHeader label={label} direction={sortKey === key ? sortDir : undefined} onSort={() => toggleSort(key)} />;
|
|
|
}
|
|
}
|
|
|
- return <div className="org-page org-partner-page page-fill"><PageHead eyebrow="组织与区域 / 03" title="合伙人管理" description="为渠道合伙人建档,明确客户覆盖范围和分成约定。" action={<Button onClick={() => setEditor({ kind: "partner" })}><Plus size={16} /> 新建合伙人</Button>} />
|
|
|
|
|
|
|
+ return <div className="org-page org-partner-page page-fill"><PageHead eyebrow="组织与区域 / 03" title="合伙人管理" exportCsv={{ onClick: exportRows, disabled: !rows.length }} description="为渠道合伙人建档,明确客户覆盖范围和分成约定。" action={<Button onClick={() => setEditor({ kind: "partner" })}><Plus size={16} /> 新建合伙人</Button>} />
|
|
|
<OrgFetchState status={status} collections={["partners"]} />
|
|
<OrgFetchState status={status} collections={["partners"]} />
|
|
|
<CollectionFailed status={status} collection="partners" title="合伙人" />
|
|
<CollectionFailed status={status} collection="partners" title="合伙人" />
|
|
|
{invalidRegion && <p className="org-form-error" role="status">区域参数无效({invalidRegion}),已回落为全部区域。</p>}
|
|
{invalidRegion && <p className="org-form-error" role="status">区域参数无效({invalidRegion}),已回落为全部区域。</p>}
|
|
|
<div className="org-ledger list-shell-fill"><section className="org-ledger-main list-shell-fill">
|
|
<div className="org-ledger list-shell-fill"><section className="org-ledger-main list-shell-fill">
|
|
|
- <div className="org-filterbar"><SearchBox onChange={(value) => { setQuery(value); paging.resetPage(); }} placeholder="搜索合伙人名称、渠道说明或通知地址" value={query} /><RegionSelect all data={data} onChange={(value) => { setRegion(value); paging.resetPage(); }} value={region} />{(query || region) && <FilterResetButton variant="ghost" size="sm" onClick={() => { setQuery(""); setRegion(""); paging.resetPage(); }}>重置筛选</FilterResetButton>}<FilterResetButton variant="ghost" size="sm" disabled={!rows.length} onClick={exportRows}><Download size={14} /> 导出 CSV</FilterResetButton></div>
|
|
|
|
|
|
|
+ <div className="org-filterbar"><SearchBox onChange={(value) => { setQuery(value); paging.resetPage(); }} placeholder="搜索合伙人名称、渠道说明或通知地址" value={query} /><RegionSelect all data={data} onChange={(value) => { setRegion(value); paging.resetPage(); }} value={region} />{(query || region) && <UiButton variant="ghost" size="sm" onClick={() => { setQuery(""); setRegion(""); paging.resetPage(); }}>重置筛选</UiButton>}</div>
|
|
|
<div ref={tableOverflow.ref} tabIndex={0} role="region" aria-label="合伙人名录,可横向滚动查看字段" className={`measured-table-scroll org-table-wrap org-partner-table-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.width >= 600 ? " can-pin-identity" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`}>
|
|
<div ref={tableOverflow.ref} tabIndex={0} role="region" aria-label="合伙人名录,可横向滚动查看字段" className={`measured-table-scroll org-table-wrap org-partner-table-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.width >= 600 ? " can-pin-identity" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`}>
|
|
|
<table className="org-table org-partner-ledger" style={{ minWidth: minimumTableWidth }}>
|
|
<table className="org-table org-partner-ledger" style={{ minWidth: minimumTableWidth }}>
|
|
|
<OpsTableColumns widths={columnWidths} />
|
|
<OpsTableColumns widths={columnWidths} />
|
|
@@ -1338,12 +1359,12 @@ export function OperationsTeamManagementPage() {
|
|
|
}
|
|
}
|
|
|
const sortAria = (key: EntSort) => sortKey === key ? (sortDir === "asc" ? "ascending" : "descending") : "none";
|
|
const sortAria = (key: EntSort) => sortKey === key ? (sortDir === "asc" ? "ascending" : "descending") : "none";
|
|
|
return <div className="org-page org-operations-ledger-page page-fill">
|
|
return <div className="org-page org-operations-ledger-page page-fill">
|
|
|
- <PageHead eyebrow="组织与区域 / 04" title="运营团队" description="理清各运营团队负责的区域、客户和成员。" action={teamReadOnly ? <span className="org-helper">档案只读,不能新建团队;本团队成员账号可管理</span> : <Button onClick={() => setEditor({ kind: "operations" })}><Plus size={16} /> 新建运营团队</Button>} />
|
|
|
|
|
|
|
+ <PageHead eyebrow="组织与区域 / 04" title="运营团队" exportCsv={{ onClick: exportRows, disabled: !teams.length }} description="理清各运营团队负责的区域、客户和成员。" action={teamReadOnly ? <span className="org-helper">档案只读,不能新建团队;本团队成员账号可管理</span> : <Button onClick={() => setEditor({ kind: "operations" })}><Plus size={16} /> 新建运营团队</Button>} />
|
|
|
<OrgFetchState status={status} collections={["operationsTeams"]} />
|
|
<OrgFetchState status={status} collections={["operationsTeams"]} />
|
|
|
<CollectionFailed status={status} collection="operationsTeams" title="运营团队" />
|
|
<CollectionFailed status={status} collection="operationsTeams" title="运营团队" />
|
|
|
{invalidRegion && <p className="org-form-error" role="status">区域参数无效({invalidRegion}),已回落为全部区域。</p>}
|
|
{invalidRegion && <p className="org-form-error" role="status">区域参数无效({invalidRegion}),已回落为全部区域。</p>}
|
|
|
<div className="org-maintenance-ledger-shell list-shell-fill">
|
|
<div className="org-maintenance-ledger-shell list-shell-fill">
|
|
|
- <div className="ops-toolbar"><SearchBox onChange={(value) => { setQuery(value); paging.resetPage(); }} placeholder="搜索团队名称、说明或负责范围" value={query} /><RegionSelect all data={data} onChange={(value) => { setRegionFilter(value); paging.resetPage(); }} value={regionFilter} />{(query || regionFilter) && <FilterResetButton variant="ghost" size="sm" onClick={() => { setQuery(""); setRegionFilter(""); paging.resetPage(); }}>重置筛选</FilterResetButton>}<FilterResetButton variant="ghost" size="sm" disabled={!teams.length} onClick={exportRows}><Download size={14} /> 导出 CSV</FilterResetButton></div>
|
|
|
|
|
|
|
+ <div className="ops-toolbar"><SearchBox onChange={(value) => { setQuery(value); paging.resetPage(); }} placeholder="搜索团队名称、说明或负责范围" value={query} /><RegionSelect all data={data} onChange={(value) => { setRegionFilter(value); paging.resetPage(); }} value={regionFilter} />{(query || regionFilter) && <UiButton variant="ghost" size="sm" onClick={() => { setQuery(""); setRegionFilter(""); paging.resetPage(); }}>重置筛选</UiButton>}</div>
|
|
|
<div ref={tableOverflow.ref} tabIndex={0} role="region" aria-label="运营团队台账,可横向滚动查看字段" className={`measured-table-scroll org-table-wrap org-team-table-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`}><table className="org-table org-operations-ledger-table org-team-ledger"><OpsTableColumns widths={columnWidths} /><thead><tr><th className="sortable" aria-sort={sortAria("name")} onClick={() => toggleSort("name")}>团队 / 说明</th><th className="sortable" aria-sort={sortAria("region")} onClick={() => toggleSort("region")}>所属区域</th><th>分成规则</th><th>负责范围</th><th className="sortable" aria-sort={sortAria("coverage")} onClick={() => toggleSort("coverage")}>覆盖客户</th><th className="sortable" aria-sort={sortAria("members")} onClick={() => toggleSort("members")}>成员账号</th><th className="org-table-actions-heading">操作</th></tr></thead><tbody>{pageTeams.map((team) => {
|
|
<div ref={tableOverflow.ref} tabIndex={0} role="region" aria-label="运营团队台账,可横向滚动查看字段" className={`measured-table-scroll org-table-wrap org-team-table-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`}><table className="org-table org-operations-ledger-table org-team-ledger"><OpsTableColumns widths={columnWidths} /><thead><tr><th className="sortable" aria-sort={sortAria("name")} onClick={() => toggleSort("name")}>团队 / 说明</th><th className="sortable" aria-sort={sortAria("region")} onClick={() => toggleSort("region")}>所属区域</th><th>分成规则</th><th>负责范围</th><th className="sortable" aria-sort={sortAria("coverage")} onClick={() => toggleSort("coverage")}>覆盖客户</th><th className="sortable" aria-sort={sortAria("members")} onClick={() => toggleSort("members")}>成员账号</th><th className="org-table-actions-heading">操作</th></tr></thead><tbody>{pageTeams.map((team) => {
|
|
|
return <tr key={team.id}><td><div className="org-operations-team-name"><strong className="table-cell-title" title={team.name}>{team.name}</strong>{team.hq && <OpsTag tone="brand">总部内置</OpsTag>}</div><small title={team.desc || "尚未填写团队说明"}>{team.desc || <span className="table-placeholder">尚未填写团队说明</span>}</small></td><td>{team.hq ? "总部 · 不限区域" : operationsRegionLabel(data, team.region)}</td><td className="org-maintenance-share"><strong>{shareText(team)}</strong><small>{team.shareMode}</small></td><td className="org-maintenance-scope-cell" title={scopeSummary(data, team.scope)}><TableValueText>{scopeSummary(data, team.scope)}</TableValueText></td><td className="org-directory-customer-count"><Count v={team.coverageCustomers} />{typeof team.coverageCustomers === "number" ? " 家" : null}</td><td className="org-directory-customer-count">{team.members.length || (team.memberCount ?? 0) > 0 ? <span className="org-member-count" title={team.membersPending || undefined}><span><Count v={team.memberCount} />{typeof team.memberCount === "number" ? " 个" : null}</span>{team.membersPending ? <span aria-label={team.membersPending} className="org-member-count-hint" role="img" title={team.membersPending}><Info aria-hidden="true" size={13} /></span> : null}</span> : <OrganizationAccountStatus status="未开通" />}</td><td className="org-table-actions-cell"><div className="org-table-actions is-icons"><Link className="org-maintenance-account-link" to={`/organization/operations-teams/${encodeURIComponent(team.id)}/accounts`}><UserRound size={15} />账号</Link>{!teamReadOnly && <OpsResponsiveActions expanded={expandedActions} items={[
|
|
return <tr key={team.id}><td><div className="org-operations-team-name"><strong className="table-cell-title" title={team.name}>{team.name}</strong>{team.hq && <OpsTag tone="brand">总部内置</OpsTag>}</div><small title={team.desc || "尚未填写团队说明"}>{team.desc || <span className="table-placeholder">尚未填写团队说明</span>}</small></td><td>{team.hq ? "总部 · 不限区域" : operationsRegionLabel(data, team.region)}</td><td className="org-maintenance-share"><strong>{shareText(team)}</strong><small>{team.shareMode}</small></td><td className="org-maintenance-scope-cell" title={scopeSummary(data, team.scope)}><TableValueText>{scopeSummary(data, team.scope)}</TableValueText></td><td className="org-directory-customer-count"><Count v={team.coverageCustomers} />{typeof team.coverageCustomers === "number" ? " 家" : null}</td><td className="org-directory-customer-count">{team.members.length || (team.memberCount ?? 0) > 0 ? <span className="org-member-count" title={team.membersPending || undefined}><span><Count v={team.memberCount} />{typeof team.memberCount === "number" ? " 个" : null}</span>{team.membersPending ? <span aria-label={team.membersPending} className="org-member-count-hint" role="img" title={team.membersPending}><Info aria-hidden="true" size={13} /></span> : null}</span> : <OrganizationAccountStatus status="未开通" />}</td><td className="org-table-actions-cell"><div className="org-table-actions is-icons"><Link className="org-maintenance-account-link" to={`/organization/operations-teams/${encodeURIComponent(team.id)}/accounts`}><UserRound size={15} />账号</Link>{!teamReadOnly && <OpsResponsiveActions expanded={expandedActions} items={[
|
|
|
{ label: "编辑团队", shortLabel: "编辑", icon: <PencilLine size={15} />, onSelect: () => setEditor({ kind: "operations", id: team.id }) },
|
|
{ label: "编辑团队", shortLabel: "编辑", icon: <PencilLine size={15} />, onSelect: () => setEditor({ kind: "operations", id: team.id }) },
|
|
@@ -1493,9 +1514,9 @@ export function MaintenanceTeamLedgerPage() {
|
|
|
<OrgFetchState status={status} collections={["maintenanceTeams"]} />
|
|
<OrgFetchState status={status} collections={["maintenanceTeams"]} />
|
|
|
<CollectionFailed status={status} collection="maintenanceTeams" title="运维团队" />
|
|
<CollectionFailed status={status} collection="maintenanceTeams" title="运维团队" />
|
|
|
{invalidRegion && <p className="org-form-error" role="status">区域参数无效({invalidRegion}),已回落为全部区域。</p>}
|
|
{invalidRegion && <p className="org-form-error" role="status">区域参数无效({invalidRegion}),已回落为全部区域。</p>}
|
|
|
- <PageHead eyebrow="组织与区域 / 05" title="运维团队" description="明确哪支团队服务哪些客户,以及能承接哪些工单。" action={<Button onClick={() => setEditor({ kind: "maintenance" })}><Plus size={16} /> 开通运维团队</Button>} />
|
|
|
|
|
|
|
+ <PageHead eyebrow="组织与区域 / 05" title="运维团队" exportCsv={{ onClick: exportRows, disabled: !teams.length }} description="明确哪支团队服务哪些客户,以及能承接哪些工单。" action={<Button onClick={() => setEditor({ kind: "maintenance" })}><Plus size={16} /> 开通运维团队</Button>} />
|
|
|
<div className="org-maintenance-ledger-shell list-shell-fill">
|
|
<div className="org-maintenance-ledger-shell list-shell-fill">
|
|
|
- <div className="ops-toolbar"><SearchBox onChange={(value) => { setQuery(value); paging.resetPage(); }} placeholder="搜索团队名称、区域路径、说明或成员" value={query} /><RegionSelect all data={data} onChange={(value) => { setRegionFilter(value); paging.resetPage(); }} value={regionFilter} /><FilterSelect icon="assignment" aria-label="分派方式" onChange={(event) => { setModeFilter(event.target.value); paging.resetPage(); }} value={modeFilter}><option value="">全部分派方式</option><option value="手工">手工</option><option value="自动平均">自动平均</option></FilterSelect>{(query || regionFilter || modeFilter) && <FilterResetButton variant="ghost" size="sm" onClick={() => { setQuery(""); setRegionFilter(""); setModeFilter(""); paging.resetPage(); }}>重置筛选</FilterResetButton>}<FilterResetButton variant="ghost" size="sm" disabled={!teams.length} onClick={exportRows}><Download size={14} /> 导出 CSV</FilterResetButton></div>
|
|
|
|
|
|
|
+ <div className="ops-toolbar"><SearchBox onChange={(value) => { setQuery(value); paging.resetPage(); }} placeholder="搜索团队名称、区域路径、说明或成员" value={query} /><RegionSelect all data={data} onChange={(value) => { setRegionFilter(value); paging.resetPage(); }} value={regionFilter} /><FilterSelect icon="assignment" aria-label="分派方式" onChange={(event) => { setModeFilter(event.target.value); paging.resetPage(); }} value={modeFilter}><option value="">全部分派方式</option><option value="手工">手工</option><option value="自动平均">自动平均</option></FilterSelect>{(query || regionFilter || modeFilter) && <UiButton variant="ghost" size="sm" onClick={() => { setQuery(""); setRegionFilter(""); setModeFilter(""); paging.resetPage(); }}>重置筛选</UiButton>}</div>
|
|
|
<div ref={tableRef} tabIndex={0} role="region" aria-label="运维团队台账,可横向滚动查看字段" className={`measured-table-scroll org-table-wrap org-team-table-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`}><table className="org-table org-maintenance-ledger-table org-team-ledger"><OpsTableColumns widths={columnWidths} /><thead><tr><th className="sortable" aria-sort={sortAria("name")} onClick={() => toggleSort("name")}>团队 / 分派</th><th className="sortable" aria-sort={sortAria("region")} onClick={() => toggleSort("region")}>所属区域</th><th className="org-maintenance-ticket-types"><span>可分配工单类型</span></th><th>分成规则</th><th>负责范围</th><th className="sortable" aria-sort={sortAria("coverage")} onClick={() => toggleSort("coverage")}>覆盖客户</th><th className="sortable" aria-sort={sortAria("open")} onClick={() => toggleSort("open")}>未完成</th><th>超期未完成</th><th className="sortable" aria-sort={sortAria("members")} onClick={() => toggleSort("members")}>成员账号</th><th className="org-table-actions-heading">操作</th></tr></thead><tbody>{pageTeams.map((team) => {
|
|
<div ref={tableRef} tabIndex={0} role="region" aria-label="运维团队台账,可横向滚动查看字段" className={`measured-table-scroll org-table-wrap org-team-table-scroll${tableOverflow.overflow ? " has-horizontal-overflow" : ""}${tableOverflow.canScrollLeft ? " can-scroll-left" : ""}${tableOverflow.canScrollRight ? " can-scroll-right" : ""}`}><table className="org-table org-maintenance-ledger-table org-team-ledger"><OpsTableColumns widths={columnWidths} /><thead><tr><th className="sortable" aria-sort={sortAria("name")} onClick={() => toggleSort("name")}>团队 / 分派</th><th className="sortable" aria-sort={sortAria("region")} onClick={() => toggleSort("region")}>所属区域</th><th className="org-maintenance-ticket-types"><span>可分配工单类型</span></th><th>分成规则</th><th>负责范围</th><th className="sortable" aria-sort={sortAria("coverage")} onClick={() => toggleSort("coverage")}>覆盖客户</th><th className="sortable" aria-sort={sortAria("open")} onClick={() => toggleSort("open")}>未完成</th><th>超期未完成</th><th className="sortable" aria-sort={sortAria("members")} onClick={() => toggleSort("members")}>成员账号</th><th className="org-table-actions-heading">操作</th></tr></thead><tbody>{pageTeams.map((team) => {
|
|
|
return <tr key={team.id}><td><strong className="table-cell-title" title={team.name}>{team.name}</strong><small>{team.mode}分派</small></td><td title={regionPath(data, team.region)}>{regionPath(data, team.region)}</td><td className="org-maintenance-ticket-types"><TeamTicketTypes types={teamTicketTypes(team)} /></td><td className="org-maintenance-share"><strong>{shareText(team)}</strong><small>{team.shareMode}</small></td><td className="org-maintenance-scope-cell" title={scopeSummary(data, team.scope)}><TableValueText>{scopeSummary(data, team.scope)}</TableValueText></td><td className="org-number"><Count v={team.coverageCustomers} /></td><td className="org-number"><Count v={team.openTickets} /></td><td>{team.overdueOpenTickets === undefined || team.overdueOpenTickets === null ? <Tri tone="missing" text={FIELD_UNAVAILABLE} title={team.loadPending} /> : team.overdueOpenTickets > 0 ? <OpsStatus tone="danger">超期 {team.overdueOpenTickets}</OpsStatus> : <OpsStatus tone="brand">正常</OpsStatus>}</td><td><strong><Count v={team.memberCount} /></strong><small>{team.membersPending ?? `成员 ${team.members.length} 人`}</small></td><td className="org-table-actions-cell"><div className="org-table-actions is-icons"><Link className="org-maintenance-account-link" to={`/organization/maintenance-teams/${encodeURIComponent(team.id)}/accounts`}><UserRound size={15} />账号</Link><OpsResponsiveActions expanded={expandedActions} items={[
|
|
return <tr key={team.id}><td><strong className="table-cell-title" title={team.name}>{team.name}</strong><small>{team.mode}分派</small></td><td title={regionPath(data, team.region)}>{regionPath(data, team.region)}</td><td className="org-maintenance-ticket-types"><TeamTicketTypes types={teamTicketTypes(team)} /></td><td className="org-maintenance-share"><strong>{shareText(team)}</strong><small>{team.shareMode}</small></td><td className="org-maintenance-scope-cell" title={scopeSummary(data, team.scope)}><TableValueText>{scopeSummary(data, team.scope)}</TableValueText></td><td className="org-number"><Count v={team.coverageCustomers} /></td><td className="org-number"><Count v={team.openTickets} /></td><td>{team.overdueOpenTickets === undefined || team.overdueOpenTickets === null ? <Tri tone="missing" text={FIELD_UNAVAILABLE} title={team.loadPending} /> : team.overdueOpenTickets > 0 ? <OpsStatus tone="danger">超期 {team.overdueOpenTickets}</OpsStatus> : <OpsStatus tone="brand">正常</OpsStatus>}</td><td><strong><Count v={team.memberCount} /></strong><small>{team.membersPending ?? `成员 ${team.members.length} 人`}</small></td><td className="org-table-actions-cell"><div className="org-table-actions is-icons"><Link className="org-maintenance-account-link" to={`/organization/maintenance-teams/${encodeURIComponent(team.id)}/accounts`}><UserRound size={15} />账号</Link><OpsResponsiveActions expanded={expandedActions} items={[
|
|
|
// 负责范围已并入「编辑团队」弹窗(2026-11-16 业主指示),⛔ 再单列一条动作。
|
|
// 负责范围已并入「编辑团队」弹窗(2026-11-16 业主指示),⛔ 再单列一条动作。
|