|
|
@@ -867,33 +867,6 @@ const TABS = [
|
|
|
"system"
|
|
|
];
|
|
|
const DONE = ["overview", "energy", "component"];
|
|
|
-const SYS9 = ["叶片与叶根", "变桨", "偏航", "齿轮箱", "发电机", "主轴承", "变流器", "塔架与基础", "主控与传感网"];
|
|
|
-const SYS_KEY = {
|
|
|
- 叶片与叶根: "blade",
|
|
|
- 变桨: "pitch",
|
|
|
- 偏航: "yaw",
|
|
|
- 齿轮箱: "gearbox",
|
|
|
- 发电机: "generator",
|
|
|
- 主轴承: "main_bearing",
|
|
|
- 变流器: "converter",
|
|
|
- 塔架与基础: "tower",
|
|
|
- 主控与传感网: "control",
|
|
|
- 主轴: "main_bearing",
|
|
|
- 其他: "other"
|
|
|
-};
|
|
|
-const SYS_ZH = (() => {
|
|
|
- const out = {};
|
|
|
- for (const zh of SYS9) out[SYS_KEY[zh]] = zh;
|
|
|
- for (const [zh, k] of Object.entries(SYS_KEY)) if (!(k in out)) out[k] = zh;
|
|
|
- return out;
|
|
|
-})();
|
|
|
-const sysSlug = (value) => SYS_KEY[String(value)] || String(value);
|
|
|
-const sysFromSlug = (value) => SYS_ZH[String(value)] || String(value);
|
|
|
-const sysName = (value) => {
|
|
|
- const key = SYS_KEY[String(value)] || String(value);
|
|
|
- return SYS_ZH[key] ? t("sys." + key) : String(value ?? "");
|
|
|
-};
|
|
|
-const partName = (p) => sysName(p);
|
|
|
const ST = { 危险: "bad", 报警: "warn", 不可判: "unk", 良好: "ok", 优秀: "ex" };
|
|
|
const ST_ALIAS = {
|
|
|
critical: "bad",
|
|
|
@@ -948,6 +921,33 @@ const SEV = {
|
|
|
ex: "excellent"
|
|
|
};
|
|
|
const winName = (w) => String(w ?? "");
|
|
|
+const SYS9 = ["叶片与叶根", "变桨", "偏航", "齿轮箱", "发电机", "主轴承", "变流器", "塔架与基础", "主控与传感网"];
|
|
|
+const SYS_KEY = {
|
|
|
+ 叶片与叶根: "blade",
|
|
|
+ 变桨: "pitch",
|
|
|
+ 偏航: "yaw",
|
|
|
+ 齿轮箱: "gearbox",
|
|
|
+ 发电机: "generator",
|
|
|
+ 主轴承: "main_bearing",
|
|
|
+ 变流器: "converter",
|
|
|
+ 塔架与基础: "tower",
|
|
|
+ 主控与传感网: "control",
|
|
|
+ 主轴: "main_bearing",
|
|
|
+ 其他: "other"
|
|
|
+};
|
|
|
+const SYS_ZH = (() => {
|
|
|
+ const out = {};
|
|
|
+ for (const zh of SYS9) out[SYS_KEY[zh]] = zh;
|
|
|
+ for (const [zh, k] of Object.entries(SYS_KEY)) if (!(k in out)) out[k] = zh;
|
|
|
+ return out;
|
|
|
+})();
|
|
|
+const sysSlug = (value) => SYS_KEY[String(value)] || String(value);
|
|
|
+const sysFromSlug = (value) => SYS_ZH[String(value)] || String(value);
|
|
|
+const sysName = (value) => {
|
|
|
+ const key = SYS_KEY[String(value)] || String(value);
|
|
|
+ return SYS_ZH[key] ? t("sys." + key) : String(value ?? "");
|
|
|
+};
|
|
|
+const partName = (p) => sysName(p);
|
|
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
__name: "Component",
|
|
|
__ssrInlineRender: true,
|
|
|
@@ -968,6 +968,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
const col = a >= 8 ? "var(--critical)" : a >= 3 ? "var(--warning)" : a ? "var(--accent)" : "var(--good)";
|
|
|
return { s, dist, a, u, N, col };
|
|
|
}));
|
|
|
+ function hitHtml(w) {
|
|
|
+ return (w.syss || []).map((x) => `<a href="/problem/${w.t}/${encodeURIComponent(sysFromSlug(x) || x)}">${sysName(x)}</a>`).join(" · ");
|
|
|
+ }
|
|
|
+ const relEh = computed(() => {
|
|
|
+ const items = ((props.d?.control || {}).energy || {}).items || [];
|
|
|
+ const hit = items.filter((x) => x.k === "停机").map((x) => x.h)[0];
|
|
|
+ return hit == null ? null : hit;
|
|
|
+ });
|
|
|
const relRows = computed(() => {
|
|
|
const tb = rel.value?.表 || [];
|
|
|
const maxH = Math.max(1, ...tb.map((r) => r.停机时长h));
|
|
|
@@ -1041,50 +1049,34 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
c.dist[k] ? null : { display: "none" }
|
|
|
])}"></i>`);
|
|
|
});
|
|
|
- _push(`<!--]--></div><div class="small muted"><span>${unref(t)("cmp.alarm_n", { a: `<b style="color:${c.col}">${c.a}</b>` }) ?? ""}</span>`);
|
|
|
- if (c.u) {
|
|
|
- _push(`<span>${ssrInterpolate(unref(t)("cmp.unk_n", { u: c.u }))}</span>`);
|
|
|
- } else {
|
|
|
- _push(`<!---->`);
|
|
|
- }
|
|
|
- _push(`<span>${ssrInterpolate(unref(t)("cmp.fleet_n", { n: c.N }))}</span></div></div>`);
|
|
|
+ _push(`<!--]--></div><div class="small muted"><span>${unref(t)("cmp.alarm_n", { a: `<b style="color:${c.col}">${c.a}</b>` }) ?? ""}</span>${ssrInterpolate((c.u ? unref(t)("cmp.unk_n", { u: c.u }) : "") + unref(t)("cmp.fleet_n", { n: c.N }))}</div></div>`);
|
|
|
});
|
|
|
_push(`<!--]--></div><p class="small muted" style="${ssrRenderStyle({ "margin-top": "8px" })}">${ssrInterpolate(unref(t)("cmp.cards_note"))}</p></div></section>`);
|
|
|
if (__props.d.rel && __props.d.rel.err) {
|
|
|
_push(`<section><div class="panel mb" style="${ssrRenderStyle({ "border-left": "3px solid var(--critical)" })}"><p class="small">${ssrInterpolate(unref(t)("flt.block_err", { k: "rel", e: __props.d.rel.err }))}</p></div></section>`);
|
|
|
} else if (rel.value) {
|
|
|
- _push(`<section><div class="eyebrow">${ssrInterpolate(unref(t)("cmp.rel_eyebrow", { win: rel.value.窗 }))}</div><div class="panel mb"><h3>${ssrInterpolate(unref(t)("cmp.rel_head"))} <span class="small muted" style="${ssrRenderStyle({ "font-weight": "400" })}">${ssrInterpolate(unref(t)("cmp.rel_meta", { t: rel.value.总停机h === void 0 ? "" : unref(fmt)(rel.value.总停机h) }))}</span></h3><div class="tblwrap"><table><tr><th>${ssrInterpolate(unref(t)("cmp.rel_part"))}</th><th>${ssrInterpolate(unref(t)("cmp.rel_h"))}</th><th class="r">${ssrInterpolate(unref(t)("cmp.rel_ev"))}</th><th class="r">${ssrInterpolate(unref(t)("cmp.rel_mtbo"))}</th><th class="r">${ssrInterpolate(unref(t)("cmp.rel_mdt"))}</th><th class="r">${ssrInterpolate(unref(t)("cmp.rel_units"))}</th><th>${ssrInterpolate(unref(t)("cmp.rel_fm"))}</th></tr><!--[-->`);
|
|
|
+ _push(`<section><div class="eyebrow">${ssrInterpolate(unref(t)("cmp.rel_eyebrow", { win: rel.value.窗 }))}</div><div class="panel mb"><h3>${ssrInterpolate(unref(t)("cmp.rel_head"))} <span class="small muted" style="${ssrRenderStyle({ "font-weight": "400" })}">${ssrInterpolate(unref(t)("cmp.rel_meta", { t: rel.value.总停机h, a: rel.value.设备类停机h, b: rel.value.外部类停机h }))}</span></h3><p class="small muted" style="${ssrRenderStyle({ "margin": "-2px 0 8px" })}">${ssrInterpolate(unref(t)("cmp.rel_note", { h: relEh.value == null ? "" : " " + unref(fmt)(relEh.value) + "h" }))}</p><div class="tblwrap"><table><tr><th>${ssrInterpolate(unref(t)("cmp.rel_part"))}</th><th>${ssrInterpolate(unref(t)("cmp.rel_h"))}</th><th class="r">${ssrInterpolate(unref(t)("cmp.rel_ev"))}</th><th class="r">${ssrInterpolate(unref(t)("cmp.rel_mtbo"))}</th><th class="r">${ssrInterpolate(unref(t)("cmp.rel_mdt"))}</th><th class="r">${ssrInterpolate(unref(t)("cmp.rel_units"))}</th><th>${ssrInterpolate(unref(t)("cmp.rel_fm"))}</th></tr><!--[-->`);
|
|
|
ssrRenderList(relRows.value, (x) => {
|
|
|
_push(`<tr><td><b>${ssrInterpolate(unref(partName)(x.r.部件))}</b>`);
|
|
|
if (x.r.外部) {
|
|
|
- _push(`<span class="badge">${ssrInterpolate(unref(t)("cmp.external"))}</span>`);
|
|
|
+ _push(`<span>${ssrInterpolate(" ")}<span class="badge">${ssrInterpolate(unref(t)("cmp.external"))}</span></span>`);
|
|
|
} else {
|
|
|
_push(`<!---->`);
|
|
|
}
|
|
|
_push(`</td><td><i class="bar" style="${ssrRenderStyle(`width:${Math.round(x.r.停机时长h / x.maxH * 72)}px;background:${x.sev}`)}"></i><span class="num small">${ssrInterpolate(x.r.停机时长h)}h · ${ssrInterpolate((x.r["占停机"] * 100).toFixed(1))}%</span></td><td class="r">${ssrInterpolate(x.r.事件数)}</td><td class="r">${ssrInterpolate(x.r.外部 ? "—" : x.r.MTBF_h || "—")}</td><td class="r">${ssrInterpolate(x.r.MDT_h)}</td><td class="r">${ssrInterpolate(x.r.影响台数)}</td><td class="small">${ssrInterpolate(x.r.典型失效模式 || "—")}</td></tr>`);
|
|
|
});
|
|
|
- _push(`<!--]--></table></div></div></section>`);
|
|
|
+ _push(`<!--]--></table></div><p class="small muted">${ssrInterpolate(rel.value.口径)}</p></div></section>`);
|
|
|
} else {
|
|
|
_push(`<!---->`);
|
|
|
}
|
|
|
if (__props.d.fus && !__props.d.fus.err) {
|
|
|
- _push(`<section><div class="panel mb"><p class="small">${ssrInterpolate(unref(t)("cmp.fusion_moved"))} <a href="#tab=vibration"><b>${ssrInterpolate(unref(t)("tab.vibration"))}</b></a></p></div></section>`);
|
|
|
+ _push(`<section><div class="panel mb"><p class="small">${ssrInterpolate(unref(t)("cmp.fusion_moved"))} <a href="#tab=vibration"><b>${ssrInterpolate(unref(t)("tab.vibration"))}</b></a> ${ssrInterpolate(unref(t)("cmp.fusion_n", { n: (__props.d.fus.表 || []).length }))}</p></div></section>`);
|
|
|
} else {
|
|
|
_push(`<!---->`);
|
|
|
}
|
|
|
- _push(`<section><div class="eyebrow">${ssrInterpolate(unref(t)("cmp.cross_eyebrow"))}</div><div class="panel mb"><h3>${ssrInterpolate(unref(t)("cmp.watch_head", { n: (__props.d.watch || []).length }))}</h3><div class="tblwrap"><table><tr><th>${ssrInterpolate(unref(t)("ui.unit"))}</th><th class="r">${ssrInterpolate(unref(t)("cmp.watch_n"))}</th><th>${ssrInterpolate(unref(t)("cmp.watch_sys"))}</th></tr><!--[-->`);
|
|
|
+ _push(`<section><div class="eyebrow">${ssrInterpolate(unref(t)("cmp.cross_eyebrow"))}</div><div class="panel mb"><h3>${ssrInterpolate(unref(t)("cmp.watch_head", { n: (__props.d.watch || []).length }))}</h3><div class="tblwrap"><table><tr><th>${ssrInterpolate(unref(t)("ui.unit"))}</th><th class="r">${ssrInterpolate(unref(t)("cmp.n_sys"))}</th><th>${ssrInterpolate(unref(t)("cmp.hit_sys"))}</th><th>${ssrInterpolate(unref(t)("cmp.basis"))}</th></tr><!--[-->`);
|
|
|
ssrRenderList(__props.d.watch || [], (w) => {
|
|
|
- _push(`<tr><td><a${ssrRenderAttr("href", `/turbine/${w.t}`)}><b>${ssrInterpolate(unref(unitNo)(w.t))}</b></a></td><td class="r">${ssrInterpolate(w.n)}</td><td class="small"><!--[-->`);
|
|
|
- ssrRenderList(w.syss || [], (s, i) => {
|
|
|
- _push(`<a${ssrRenderAttr("href", `/problem/${w.t}/${encodeURIComponent(s)}`)}>`);
|
|
|
- if (i) {
|
|
|
- _push(`<span>、</span>`);
|
|
|
- } else {
|
|
|
- _push(`<!---->`);
|
|
|
- }
|
|
|
- _push(`${ssrInterpolate(unref(sysName)(s))}</a>`);
|
|
|
- });
|
|
|
- _push(`<!--]--></td></tr>`);
|
|
|
+ _push(`<tr><td><a${ssrRenderAttr("href", `/turbine/${w.t}`)}><b>${ssrInterpolate(unref(unitNo)(w.t))}</b></a></td><td class="r">${ssrInterpolate(w.n)}</td><td class="small">${hitHtml(w) ?? ""}</td><td class="small">${ssrInterpolate(w.why)}</td></tr>`);
|
|
|
});
|
|
|
_push(`<!--]--></table></div></div></section><!--]-->`);
|
|
|
}
|
|
|
@@ -1180,28 +1172,43 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
}
|
|
|
];
|
|
|
});
|
|
|
+ const blameCat = (k) => k.indexOf("限电") >= 0 || k.indexOf("调度") >= 0 ? 0 : k === "停机" ? 1 : 2;
|
|
|
+ const blameGroups = computed(() => {
|
|
|
+ const g = [0, 0, 0];
|
|
|
+ for (const x of E.value?.items || []) g[blameCat(x.k)] += x.loss;
|
|
|
+ return g;
|
|
|
+ });
|
|
|
const waterfallOption = computed(() => {
|
|
|
const e = E.value || {};
|
|
|
- const items = (e.items || []).map((x) => ({ name: x.k, value: Math.round(x.loss) }));
|
|
|
+ const items = (e.items || []).filter((x) => x.loss > 0).map((x) => ({ name: x.k, value: Math.round(x.loss) }));
|
|
|
+ const groups = blameGroups.value;
|
|
|
+ const tot = groups.reduce((a, b) => a + b, 0) || 1;
|
|
|
+ const pct = groups.map((v) => Math.round(v / tot * 100)).filter((p, i) => groups[i] / tot * 500 > 46);
|
|
|
return {
|
|
|
title: { text: t("en.balance"), left: "center", textStyle: { fontSize: 13 } },
|
|
|
tooltip: { trigger: "axis" },
|
|
|
- grid: { left: 60, right: 20, top: 44, bottom: 40 },
|
|
|
+ grid: { left: 70, right: 20, top: 44, bottom: 40 },
|
|
|
xAxis: { type: "category", data: items.map((x) => x.name) },
|
|
|
yAxis: { type: "value", name: "MWh" },
|
|
|
series: [{ type: "bar", data: items.map((x) => x.value), itemStyle: { color: "#0b5fa5" } }],
|
|
|
- __data__: { theo: e.theo, act: e.act, loss: e.loss, loss_pct: e.loss_pct, items }
|
|
|
+ // 与旧图数字集合同源:theo · act · Σitems · 各 item · 组占比%
|
|
|
+ __data__: [
|
|
|
+ Math.round(e.theo),
|
|
|
+ Math.round(e.act),
|
|
|
+ Math.round(items.reduce((a, x) => a + x.value, 0)),
|
|
|
+ ...items.map((x) => x.value),
|
|
|
+ ...pct
|
|
|
+ ]
|
|
|
};
|
|
|
});
|
|
|
const blameOption = computed(() => {
|
|
|
- const e = E.value || {};
|
|
|
- const items = (e.items || []).map((x) => ({ name: x.k, value: Math.round(x.loss) }));
|
|
|
+ const groups = blameGroups.value;
|
|
|
return {
|
|
|
- grid: { left: 80, right: 24, top: 20, bottom: 30 },
|
|
|
+ grid: { left: 90, right: 24, top: 20, bottom: 30 },
|
|
|
xAxis: { type: "value", name: "MWh" },
|
|
|
- yAxis: { type: "category", data: items.map((x) => x.name) },
|
|
|
- series: [{ type: "bar", data: items.map((x) => x.value), itemStyle: { color: "#2f7dbf" } }],
|
|
|
- __data__: { items }
|
|
|
+ yAxis: { type: "category", data: [t("ch.blame.n1"), t("ch.blame.n2"), t("ch.blame.n3")] },
|
|
|
+ series: [{ type: "bar", data: groups.map((v) => Math.round(v)), itemStyle: { color: "#2f7dbf" } }],
|
|
|
+ __data__: []
|
|
|
};
|
|
|
});
|
|
|
const mxp = computed(() => Math.max(1, ...S.value.map((x) => x.pct)));
|
|
|
@@ -1229,7 +1236,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
option: blameOption.value,
|
|
|
height: "240px"
|
|
|
}, null, _parent));
|
|
|
- _push(`<p class="small muted" style="${ssrRenderStyle({ "margin-top": "6px" })}">${ssrInterpolate(unref(t)("en.blame_note", { n: unref(fmt)(Math.round(((E.value.items || []).find((x) => x.k === "停机") || {}).loss || 0)) }))}</p></div><div class="panel"><h3>${ssrInterpolate(unref(t)("en.states"))} <span class="small muted" style="${ssrRenderStyle({ "font-weight": "400" })}">${ssrInterpolate(unref(t)("en.win", { win: unref(winName)(__props.d.win) }))}</span></h3><div class="tblwrap"><table><tr><th>${ssrInterpolate(unref(t)("en.state"))}</th><th>${ssrInterpolate(unref(t)("en.share"))}</th><th class="r" style="${ssrRenderStyle({ "width": "90px" })}">${ssrInterpolate(unref(t)("en.loss_mwh"))}</th></tr><!--[-->`);
|
|
|
+ _push(`<!--[-->`);
|
|
|
+ ssrRenderList(blameGroups.value, (v, i) => {
|
|
|
+ _push(`<div style="${ssrRenderStyle({ "display": "flex", "align-items": "baseline", "gap": "7px", "margin-top": "5px" })}"><i style="${ssrRenderStyle(`flex:none;width:9px;height:9px;border-radius:2px;background:${["var(--accent)", "var(--critical)", "var(--muted)"][i]};opacity:.55`)}"></i><span style="${ssrRenderStyle({ "font-weight": "600" })}">${ssrInterpolate(unref(t)(["ch.blame.n1", "ch.blame.n2", "ch.blame.n3"][i]))}</span><span class="num">${ssrInterpolate(unref(fmt)(Math.round(v)))} MWh</span><span class="small muted">${ssrInterpolate(unref(t)(["ch.blame.d1", "ch.blame.d2", "ch.blame.d3"][i]))}</span></div>`);
|
|
|
+ });
|
|
|
+ _push(`<!--]--><p class="small muted" style="${ssrRenderStyle({ "margin-top": "6px" })}">${ssrInterpolate(unref(t)("en.blame_note", { n: unref(fmt)(Math.round(((E.value.items || []).find((x) => x.k === "停机") || {}).loss || 0)) }))}</p></div><div class="panel"><h3>${ssrInterpolate(unref(t)("en.states"))} <span class="small muted" style="${ssrRenderStyle({ "font-weight": "400" })}">${ssrInterpolate(unref(t)("en.win", { win: unref(winName)(__props.d.win) }))}</span></h3><div class="tblwrap"><table><tr><th>${ssrInterpolate(unref(t)("en.state"))}</th><th>${ssrInterpolate(unref(t)("en.share"))}</th><th class="r" style="${ssrRenderStyle({ "width": "90px" })}">${ssrInterpolate(unref(t)("en.loss_mwh"))}</th></tr><!--[-->`);
|
|
|
ssrRenderList(S.value, (x) => {
|
|
|
_push(`<tr><td class="small">${ssrInterpolate(lossName(x.k))}</td><td><i class="bar" style="${ssrRenderStyle(`width:${Math.round(x.pct / mxp.value * 84)}px;background:${x.k.indexOf("停机") >= 0 && x.k.indexOf("调度") < 0 ? "var(--critical)" : "var(--accent)"}`)}"></i><span class="num small">${ssrInterpolate(x.pct)}% · ${ssrInterpolate(unref(fmt)(Math.round(x.h)))}h</span></td><td class="r small">${ssrInterpolate(unref(fmt)(Math.round(x.loss)))}</td></tr>`);
|
|
|
});
|
|
|
@@ -1270,11 +1281,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
{ v: fmt(LS.value["停机"]), u: "MWh", l: lossLabel, k: "", ti: "" },
|
|
|
{ v: fmt(LS.value["限电·绑定"]), u: "MWh", l: t("kpi.curtail"), k: "", ti: "" },
|
|
|
{
|
|
|
- v: `${fmt(props.d?.kpi?.报警台)} / ${fmt(props.d?.kpi?.全场)}`,
|
|
|
+ // 旧模板 `<b>${fmt(报警台)} <small>/ ${fmt(全场)}</small></b>` —— `vHtml` 保留 <small> 元素与节点边界
|
|
|
+ vRaw: `${fmt(props.d?.kpi?.报警台)} <small>/ ${fmt(props.d?.kpi?.全场)}</small>`,
|
|
|
u: "",
|
|
|
l: t("kpi.alarm_units"),
|
|
|
k: props.d?.kpi?.报警台 ? "warn" : "ok",
|
|
|
- ti: t("kpi.alarm_units.hint")
|
|
|
+ ti: t("kpi.alarm_units.hint"),
|
|
|
+ vHtml: true
|
|
|
}
|
|
|
];
|
|
|
});
|
|
|
@@ -1303,18 +1316,33 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
const stuckStep = stuckKey === "evidence" ? t("step.site_records") : t("step." + (stuckKey || "evidence"));
|
|
|
return t("step.stuck_at", { step: stuckStep });
|
|
|
}
|
|
|
+ const SYS_SEG = [["危险", "critical"], ["报警", "warning"], ["不可判", "unknown"], ["良好", "good"], ["优秀", "excellent"]];
|
|
|
+ const systems = computed(() => {
|
|
|
+ const dist = props.d?.sysdist || {};
|
|
|
+ return SYS9.map((s) => {
|
|
|
+ const c = dist[s] || {};
|
|
|
+ const n = Object.values(c).reduce((a, b) => a + b, 0) || 1;
|
|
|
+ return { name: sysName(s), slug: sysSlug(s), dist: c, n, seg: SYS_SEG.filter(([k]) => c[k]).map(([k, v]) => ({ k, v })) };
|
|
|
+ });
|
|
|
+ });
|
|
|
const mat = computed(() => F.value.矩阵 || []);
|
|
|
const hot = computed(() => new Set(rows.value.map((r) => r.t)));
|
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
|
_push(`<!--[--><section><div class="kpis"><!--[-->`);
|
|
|
ssrRenderList(kpi.value, (k, i) => {
|
|
|
- _push(`<div class="${ssrRenderClass([k.k, "kpi"])}"${ssrRenderAttr("title", k.ti || void 0)}><b>${ssrInterpolate(k.v)}`);
|
|
|
- if (k.u) {
|
|
|
- _push(`<small>${ssrInterpolate(k.u)}</small>`);
|
|
|
+ _push(`<div class="${ssrRenderClass([k.k, "kpi"])}"${ssrRenderAttr("title", k.ti || void 0)}>`);
|
|
|
+ if (k.vHtml) {
|
|
|
+ _push(`<b>${k.vRaw ?? ""}</b>`);
|
|
|
} else {
|
|
|
- _push(`<!---->`);
|
|
|
+ _push(`<b>${ssrInterpolate(k.v)}`);
|
|
|
+ if (k.u) {
|
|
|
+ _push(`<small>${ssrInterpolate(k.u)}</small>`);
|
|
|
+ } else {
|
|
|
+ _push(`<!---->`);
|
|
|
+ }
|
|
|
+ _push(`</b>`);
|
|
|
}
|
|
|
- _push(`</b><span>${ssrInterpolate(k.l)}</span></div>`);
|
|
|
+ _push(`<span>${ssrInterpolate(k.l)}</span></div>`);
|
|
|
});
|
|
|
_push(`<!--]--></div></section><section><div class="sechead"><h2>${ssrInterpolate(unref(t)("ov.attention"))}</h2><span class="meta">${ssrInterpolate(unref(t)("ov.attention_n", { n: rows.value.length }))}</span><span class="meta">${ssrInterpolate(unref(t)("ov.ranked_by"))}</span></div>`);
|
|
|
if (F.value.gap) {
|
|
|
@@ -1361,7 +1389,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
ssrRenderList(mat.value, (r) => {
|
|
|
_push(`<span class="${ssrRenderClass(hot.value.has(r.turbine) ? "hot" : "")}">${ssrInterpolate(unref(unitNo)(r.turbine).replace("#", ""))}</span>`);
|
|
|
});
|
|
|
- _push(`<!--]--></div><div class="quiet">${ssrInterpolate(rows.value.length ? unref(t)("ov.quiet", { n: Math.max(0, (mat.value.length || 38) - rows.value.length) }) : unref(t)("ov.quiet_all", { n: mat.value.length || 38 }))}</div></div></section><!--]-->`);
|
|
|
+ _push(`<!--]--></div><div class="quiet">${ssrInterpolate(rows.value.length ? unref(t)("ov.quiet", { n: Math.max(0, (mat.value.length || 38) - rows.value.length) }) : unref(t)("ov.quiet_all", { n: mat.value.length || 38 }))}</div></div></section><section><div class="sechead"><h2>${ssrInterpolate(unref(t)("ov.systems"))}</h2><span class="meta">${ssrInterpolate(unref(t)("ov.systems_hint"))}</span></div><div class="systems"><!--[-->`);
|
|
|
+ ssrRenderList(systems.value, (s) => {
|
|
|
+ _push(`<div class="sysc"><div class="t"><b>${ssrInterpolate(s.name)}</b><a${ssrRenderAttr("href", `#tab=component&sys=${encodeURIComponent(s.slug)}`)}>${ssrInterpolate(unref(t)("ui.open"))}</a></div><div class="bar"><!--[-->`);
|
|
|
+ ssrRenderList(s.seg, (k) => {
|
|
|
+ _push(`<i style="${ssrRenderStyle(`width:${(s.dist[k.k] / s.n * 100).toFixed(1)}%;background:var(--${k.v})`)}"></i>`);
|
|
|
+ });
|
|
|
+ _push(`<!--]--></div><div class="cnt"><!--[-->`);
|
|
|
+ ssrRenderList(s.seg, (k) => {
|
|
|
+ _push(`<span><i style="${ssrRenderStyle(`background:var(--${k.v})`)}"></i>${ssrInterpolate(s.dist[k.k])}</span>`);
|
|
|
+ });
|
|
|
+ _push(`<!--]--></div></div>`);
|
|
|
+ });
|
|
|
+ _push(`<!--]--></div></section><!--]-->`);
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
@@ -1384,17 +1424,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
const props = __props;
|
|
|
const pending = computed(() => !DONE.includes(props.tab));
|
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
|
- _push(`<!--[--><nav class="wb-tabs" data-v-3e81725a><!--[-->`);
|
|
|
+ _push(`<!--[--><nav class="wb-tabs" data-v-8bbd46d4><!--[-->`);
|
|
|
ssrRenderList(unref(TABS), (id) => {
|
|
|
- _push(`<button class="${ssrRenderClass({ on: id === __props.tab })}" data-v-3e81725a>${ssrInterpolate(unref(t)("tab." + id))}`);
|
|
|
+ _push(`<button class="${ssrRenderClass({ on: id === __props.tab })}" data-v-8bbd46d4>${ssrInterpolate(unref(t)("tab." + id))}`);
|
|
|
if (!unref(DONE).includes(id)) {
|
|
|
- _push(`<sup class="todo" data-v-3e81725a>迁移中</sup>`);
|
|
|
+ _push(`<sup class="todo" data-v-8bbd46d4>迁移中</sup>`);
|
|
|
} else {
|
|
|
_push(`<!---->`);
|
|
|
}
|
|
|
_push(`</button>`);
|
|
|
});
|
|
|
- _push(`<!--]--></nav><div class="page-head" data-v-3e81725a><h1 data-v-3e81725a>${ssrInterpolate(unref(t)("tab." + __props.tab))}</h1><span class="window-badge" data-v-3e81725a>${ssrInterpolate(unref(t)("win.l"))}${ssrInterpolate(__props.d?.win ?? "—")}</span></div>`);
|
|
|
+ _push(`<!--]--></nav><div class="page-head" data-v-8bbd46d4><h1 data-v-8bbd46d4>${ssrInterpolate(unref(t)("tab." + __props.tab))}</h1><span class="window-badge" data-v-8bbd46d4>${ssrInterpolate(unref(t)("win.label"))} · ${ssrInterpolate(unref(winName)(__props.d?.win))}</span></div>`);
|
|
|
if (__props.tab === "overview") {
|
|
|
_push(ssrRenderComponent(_sfc_main$1, { d: __props.d }, null, _parent));
|
|
|
} else if (__props.tab === "energy") {
|
|
|
@@ -1405,7 +1445,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
sys: __props.sys
|
|
|
}, null, _parent));
|
|
|
} else if (pending.value) {
|
|
|
- _push(`<section class="card" data-v-3e81725a><h2 data-v-3e81725a>${ssrInterpolate(unref(t)("tab." + __props.tab))} <small data-v-3e81725a>(本页签尚未迁移到 Vue)</small></h2><p class="hint" data-v-3e81725a> 迁移纪律:页签逐个搬,每搬一个就用 <code data-v-3e81725a>tools/render_parity.mjs</code> 与重构前页面 (现网 <code data-v-3e81725a>/detail/v2</code>)对拍文案/数值/类名序列,**通过后**才删对应的 Python 前端源码。 当前已迁移:${ssrInterpolate(unref(DONE).join("、"))}。 </p></section>`);
|
|
|
+ _push(`<section class="card" data-v-8bbd46d4><h2 data-v-8bbd46d4>${ssrInterpolate(unref(t)("tab." + __props.tab))} <small data-v-8bbd46d4>(本页签尚未迁移到 Vue)</small></h2><p class="hint" data-v-8bbd46d4> 迁移纪律:页签逐个搬,每搬一个就用 <code data-v-8bbd46d4>tools/render_parity.mjs</code> 与重构前页面 (现网 <code data-v-8bbd46d4>/detail/v2</code>)对拍文案/数值/类名序列,**通过后**才删对应的 Python 前端源码。 当前已迁移:${ssrInterpolate(unref(DONE).join("、"))}。 </p></section>`);
|
|
|
} else {
|
|
|
_push(`<!---->`);
|
|
|
}
|
|
|
@@ -1419,7 +1459,7 @@ _sfc_main.setup = (props, ctx) => {
|
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/Workbench.vue");
|
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
|
};
|
|
|
-const Workbench = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3e81725a"]]);
|
|
|
+const Workbench = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8bbd46d4"]]);
|
|
|
async function renderTab(d, tab = "overview") {
|
|
|
const app = createSSRApp(Workbench, { d, tab });
|
|
|
return await renderToString(app);
|