/** * 施工指导只读区:开户见套餐权益;停机见开机施工参数;变更见前后对照+原施工参数。 */ import type { ConstructionGuide, PriorActivation, ConstructionPlanSummary } from "../../lib/api/ticket"; import { PLAN_FAMILY, PLAN_KIND, label } from "../../lib/api/labels"; function exitsText(v: ConstructionPlanSummary["line_exits"]): string { if (Array.isArray(v)) return v.filter(Boolean).join("、") || "—"; if (typeof v === "string" && v.trim()) { try { const parsed = JSON.parse(v) as unknown; if (Array.isArray(parsed)) return parsed.filter(Boolean).join("、") || "—"; } catch { /* plain csv */ } return v; } return "—"; } function PlanCard({ title, plan }: { title: string; plan: ConstructionPlanSummary | null | undefined }) { if (!plan) return null; return (
{plan.summary}
: null}来源开户单 {prior.ticket_no ?? prior.ticket_id ?? "—"} {prior.actual_opened_date ? ` · 实际开通 ${prior.actual_opened_date.slice(0, 10)}` : ""} (PIN/CPID 仅显示是否已登记)
{(prior.routes?.length ?? 0) > 0 && (| 分账号 | 网络账户 | 内网 IP | VLAN/VNI | 出口 PoP | 带宽 |
|---|---|---|---|---|---|
| {r.sub_account_id ?? "—"} | {r.network_account_name ?? "—"} | {[r.intranet_ip, r.subnet_mask].filter(Boolean).join(" / ") || "—"} | {[r.vlan, r.vni].filter(Boolean).join(" / ") || "—"} | {r.egress_pop ?? "—"} | {[r.down_mbps && `↓${r.down_mbps}`, r.up_mbps && `↑${r.up_mbps}`].filter(Boolean).join(" / ") || "—"} |
| 出境口岸 | 境外 IP | 类型 | 带宽档 | 凭据 |
|---|---|---|---|---|
| {r.egress ?? "—"} | {r.overseas_ip ?? "—"} | {r.ip_type ?? "—"} | {r.bandwidth_mbps ?? "—"} | PIN {r.pin_registered === "true" ? "✓" : "—"} / CPID {r.cpid_registered === "true" ? "✓" : "—"} |
暂无历史开通明细。
}系统建议(可改):出口 {exitsText(guide.defaults.line_exits)} {guide.defaults.suggest_down_mbps != null ? ` · 下行 ${guide.defaults.suggest_down_mbps} Mbps` : ""} {guide.defaults.suggest_up_mbps != null ? ` · 上行 ${guide.defaults.suggest_up_mbps} Mbps` : ""} {guide.defaults.suggest_ip_bandwidth_mbps != null ? ` · IP 档 ${guide.defaults.suggest_ip_bandwidth_mbps}` : ""} {guide.defaults.suggest_seat_count != null ? ` · 席位约 ${guide.defaults.suggest_seat_count}` : ""}
)}