|
|
@@ -1,5 +1,5 @@
|
|
|
import { defineComponent, computed, unref, useSSRContext, ref, onMounted, watch, onBeforeUnmount, mergeProps, reactive, createSSRApp } from "vue";
|
|
|
-import { ssrRenderAttrs, ssrInterpolate, ssrRenderStyle, ssrRenderList, ssrRenderAttr, ssrRenderClass, ssrRenderComponent, renderToString } from "vue/server-renderer";
|
|
|
+import { ssrRenderAttrs, ssrInterpolate, ssrRenderStyle, ssrRenderList, ssrRenderAttr, ssrRenderClass, ssrRenderComponent, ssrIncludeBooleanAttr, renderToString } from "vue/server-renderer";
|
|
|
const ZH = {
|
|
|
"app.brand": "观澜",
|
|
|
"app.build": "最新完成构建",
|
|
|
@@ -866,7 +866,7 @@ const TABS = [
|
|
|
"report",
|
|
|
"system"
|
|
|
];
|
|
|
-const DONE = ["overview", "energy", "component", "fault", "vibration", "generation", "decision"];
|
|
|
+const DONE = ["overview", "energy", "component", "fault", "vibration", "generation", "decision", "assistant", "system"];
|
|
|
const ST$1 = { 危险: "bad", 报警: "warn", 不可判: "unk", 良好: "ok", 优秀: "ex" };
|
|
|
const ST_ALIAS$1 = {
|
|
|
critical: "bad",
|
|
|
@@ -948,7 +948,7 @@ const sysName = (value) => {
|
|
|
return SYS_ZH[key] ? t("sys." + key) : String(value ?? "");
|
|
|
};
|
|
|
const partName = (p) => sysName(p);
|
|
|
-const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
+const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
__name: "Component",
|
|
|
__ssrInlineRender: true,
|
|
|
props: {
|
|
|
@@ -1083,13 +1083,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
-const _sfc_setup$a = _sfc_main$a.setup;
|
|
|
-_sfc_main$a.setup = (props, ctx) => {
|
|
|
+const _sfc_setup$b = _sfc_main$b.setup;
|
|
|
+_sfc_main$b.setup = (props, ctx) => {
|
|
|
const ssrContext = useSSRContext();
|
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/Component.vue");
|
|
|
- return _sfc_setup$a ? _sfc_setup$a(props, ctx) : void 0;
|
|
|
+ return _sfc_setup$b ? _sfc_setup$b(props, ctx) : void 0;
|
|
|
};
|
|
|
-const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
+const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
__name: "EChart",
|
|
|
__ssrInlineRender: true,
|
|
|
props: {
|
|
|
@@ -1132,14 +1132,14 @@ const _export_sfc = (sfc, props) => {
|
|
|
}
|
|
|
return target;
|
|
|
};
|
|
|
-const _sfc_setup$9 = _sfc_main$9.setup;
|
|
|
-_sfc_main$9.setup = (props, ctx) => {
|
|
|
+const _sfc_setup$a = _sfc_main$a.setup;
|
|
|
+_sfc_main$a.setup = (props, ctx) => {
|
|
|
const ssrContext = useSSRContext();
|
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/EChart.vue");
|
|
|
- return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0;
|
|
|
+ return _sfc_setup$a ? _sfc_setup$a(props, ctx) : void 0;
|
|
|
};
|
|
|
-const EChart = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-999bee15"]]);
|
|
|
-const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
+const EChart = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-999bee15"]]);
|
|
|
+const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
__name: "Energy",
|
|
|
__ssrInlineRender: true,
|
|
|
props: {
|
|
|
@@ -1249,13 +1249,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
-const _sfc_setup$8 = _sfc_main$8.setup;
|
|
|
-_sfc_main$8.setup = (props, ctx) => {
|
|
|
+const _sfc_setup$9 = _sfc_main$9.setup;
|
|
|
+_sfc_main$9.setup = (props, ctx) => {
|
|
|
const ssrContext = useSSRContext();
|
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/Energy.vue");
|
|
|
- return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
|
|
|
+ return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0;
|
|
|
};
|
|
|
-const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
+const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
__name: "Fault",
|
|
|
__ssrInlineRender: true,
|
|
|
props: {
|
|
|
@@ -1503,11 +1503,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
-const _sfc_setup$7 = _sfc_main$7.setup;
|
|
|
-_sfc_main$7.setup = (props, ctx) => {
|
|
|
+const _sfc_setup$8 = _sfc_main$8.setup;
|
|
|
+_sfc_main$8.setup = (props, ctx) => {
|
|
|
const ssrContext = useSSRContext();
|
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/Fault.vue");
|
|
|
- return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
|
|
|
+ return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
|
|
|
};
|
|
|
const VIBJARGON = [
|
|
|
[/DE[/]NDE/g, "驱动端与非驱动端"],
|
|
|
@@ -1803,7 +1803,7 @@ function cmsHtml(V, err) {
|
|
|
<p class="small muted" style="margin-top:10px">${t("fus.cms_link")} <a href="http://localhost:8030/index.html" target="_blank" rel="noopener">${t("fus.cms_open")}</a> <a href="/windcms/index.html" target="_blank" rel="noopener">${t("fus.cms_static")}</a></p></div>`;
|
|
|
}
|
|
|
const FUS_SUBS = ["matrix", "loop", "units", "events", "cms"];
|
|
|
-const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
+const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
__name: "Vibration",
|
|
|
__ssrInlineRender: true,
|
|
|
props: {
|
|
|
@@ -1835,13 +1835,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
-const _sfc_setup$6 = _sfc_main$6.setup;
|
|
|
-_sfc_main$6.setup = (props, ctx) => {
|
|
|
+const _sfc_setup$7 = _sfc_main$7.setup;
|
|
|
+_sfc_main$7.setup = (props, ctx) => {
|
|
|
const ssrContext = useSSRContext();
|
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/Vibration.vue");
|
|
|
- return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
|
|
|
+ return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
|
|
|
};
|
|
|
-const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
+const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
__name: "Generation",
|
|
|
__ssrInlineRender: true,
|
|
|
props: {
|
|
|
@@ -1994,13 +1994,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
-const _sfc_setup$5 = _sfc_main$5.setup;
|
|
|
-_sfc_main$5.setup = (props, ctx) => {
|
|
|
+const _sfc_setup$6 = _sfc_main$6.setup;
|
|
|
+_sfc_main$6.setup = (props, ctx) => {
|
|
|
const ssrContext = useSSRContext();
|
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/Generation.vue");
|
|
|
- return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
|
|
|
+ return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
|
|
|
};
|
|
|
-const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
+const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
__name: "Decision",
|
|
|
__ssrInlineRender: true,
|
|
|
props: {
|
|
|
@@ -2047,14 +2047,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
-const _sfc_setup$4 = _sfc_main$4.setup;
|
|
|
-_sfc_main$4.setup = (props, ctx) => {
|
|
|
+const _sfc_setup$5 = _sfc_main$5.setup;
|
|
|
+_sfc_main$5.setup = (props, ctx) => {
|
|
|
const ssrContext = useSSRContext();
|
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/Decision.vue");
|
|
|
- return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
|
+ return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
|
|
|
};
|
|
|
const row = "display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:8px";
|
|
|
-const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
+const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
__name: "Assistant",
|
|
|
__ssrInlineRender: true,
|
|
|
setup(__props) {
|
|
|
@@ -2068,13 +2068,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
-const _sfc_setup$3 = _sfc_main$3.setup;
|
|
|
-_sfc_main$3.setup = (props, ctx) => {
|
|
|
+const _sfc_setup$4 = _sfc_main$4.setup;
|
|
|
+_sfc_main$4.setup = (props, ctx) => {
|
|
|
const ssrContext = useSSRContext();
|
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/Assistant.vue");
|
|
|
- return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
|
+ return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
|
};
|
|
|
-const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
+const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
__name: "System",
|
|
|
__ssrInlineRender: true,
|
|
|
props: {
|
|
|
@@ -2117,10 +2117,105 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
+const _sfc_setup$3 = _sfc_main$3.setup;
|
|
|
+_sfc_main$3.setup = (props, ctx) => {
|
|
|
+ const ssrContext = useSSRContext();
|
|
|
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/System.vue");
|
|
|
+ return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
|
+};
|
|
|
+const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
+ __name: "Report",
|
|
|
+ __ssrInlineRender: true,
|
|
|
+ props: {
|
|
|
+ d: {},
|
|
|
+ apis: {}
|
|
|
+ },
|
|
|
+ setup(__props) {
|
|
|
+ const props = __props;
|
|
|
+ const RPT_PRESETS = { month: ["kpi", "water", "emon", "blame", "ram", "pareto", "units", "plan", "caliber"], week: ["kpi", "frate", "units", "plan", "caliber"], topic: ["units", "chain", "ram", "loop", "caliber"], year: ["kpi", "water", "emon", "ram", "loop", "caliber"], blank: [] };
|
|
|
+ const RPT_BLOCKS = { kpi: "gen", water: "gen", emon: "gen", blame: "gen", ram: "rel", parts: "rel", attrib: "rel", pareto: "flt", quad: "flt", frate: "flt", units: "unit", chain: "unit", loop: "unit", plan: "end", caliber: "end", narr: "end" };
|
|
|
+ const RPT_ICON = { kpi: "▦", water: "▤", emon: "▥", blame: "◧", ram: "◈", parts: "▤", attrib: "▬", pareto: "▮", quad: "◇", frate: "▪", units: "☰", chain: "⛓", loop: "✓", plan: "✎", caliber: "⚑", narr: "✍" };
|
|
|
+ const MDL_LOC = { "qwen3:8b": "local", "qwen3.8:27b": "local", "qwen3:30b-a3b": "local", "deepseek-r1:14b": "local", "deepseek-r1:32b": "local", "deepseek-chat": "cloud", "kimi-fast": "cloud", "qwen-plus": "cloud", "deepseek-v4-pro": "cloud" };
|
|
|
+ const RPT_GROUPS = ["gen", "rel", "flt", "unit", "end"];
|
|
|
+ const RPT = reactive({
|
|
|
+ canvas: [],
|
|
|
+ aud: "in",
|
|
|
+ need: "",
|
|
|
+ model: "",
|
|
|
+ models: null,
|
|
|
+ compose: null,
|
|
|
+ narr: null,
|
|
|
+ out: ""
|
|
|
+ });
|
|
|
+ const askModels = computed(() => props.apis?.["/detail/api/ask_models"] ?? props.apis?.["/api/ask_models"] ?? null);
|
|
|
+ const models = computed(() => askModels.value ? askModels.value.models || {} : RPT.models);
|
|
|
+ const localDown = computed(() => !!askModels.value?.offline);
|
|
|
+ const mdlKey = (id, f) => t("mdl." + id + "." + f);
|
|
|
+ const mdlLabel = (id) => (mdlKey(id, "nm") || id) + (MDL_LOC[id] ? " · " + t("mdl." + MDL_LOC[id]) : "") + (mdlKey(id, "t") ? " · " + mdlKey(id, "t") : "");
|
|
|
+ const on = (k) => RPT.canvas.includes(k);
|
|
|
+ const canCompose = computed(() => RPT.compose === true && !!models.value && Object.keys(models.value).length > 0);
|
|
|
+ const opts = computed(() => {
|
|
|
+ const m = models.value;
|
|
|
+ if (m === null) return '<option value="">…</option>';
|
|
|
+ return Object.keys(m).length ? Object.keys(m).map((k) => `<option value="${esc(k)}" ${k === effectiveModel ? "selected" : ""}>${esc(mdlLabel(k))}</option>`).join("") : `<option value="">${localDown.value ? t("ask.local_down") : t("ask.no_models")}</option>`;
|
|
|
+ });
|
|
|
+ const libraryHtml = computed(() => RPT_GROUPS.map((g) => `<div class="small muted" style="text-align:right;white-space:nowrap">${t("rpt.g." + g)}</div><div style="display:flex;gap:6px;flex-wrap:wrap">` + Object.keys(RPT_BLOCKS).filter((k) => RPT_BLOCKS[k] === g).map((k) => `<button class="pill ${on(k) ? "on" : ""}" data-block="${k}" style="border-radius:7px;padding:5px 11px;font-size:12.5px;opacity:${on(k) ? 1 : 0.8}">${RPT_ICON[k]} ${t("rpt.b." + k + ".nm")}${on(k) ? " ✓" : ""}</button>`).join("") + `</div>`).join(""));
|
|
|
+ const factsHtml = computed(() => "");
|
|
|
+ const blockHtml = (_k) => "";
|
|
|
+ const effectiveModel = computed(() => {
|
|
|
+ const m = models.value;
|
|
|
+ if (m === null) return RPT.model;
|
|
|
+ const ks = Object.keys(m);
|
|
|
+ return !RPT.model || !ks.includes(RPT.model) ? ks[0] || "" : RPT.model;
|
|
|
+ });
|
|
|
+ const needHint = computed(() => t("rpt.need_hint") + (effectiveModel.value ? MDL_LOC[effectiveModel.value] === "local" ? t("rpt.local_note") : `<span style="color:var(--warning)">${t("rpt.cloud_note")}</span>` : ""));
|
|
|
+ const outText = computed(() => {
|
|
|
+ if (RPT.out) return RPT.out;
|
|
|
+ if (RPT.compose === false) return t("rpt.no_compose");
|
|
|
+ if (models.value && !Object.keys(models.value).length) return localDown.value ? t("ask.local_down") : t("rpt.no_models");
|
|
|
+ return "";
|
|
|
+ });
|
|
|
+ const asof = computed(() => (String(props.d?.fus?.数据时点 || "").match(/\d{4}-\d{2}-\d{2}/) || [""])[0]);
|
|
|
+ return (_ctx, _push, _parent, _attrs) => {
|
|
|
+ _push(`<section${ssrRenderAttrs(_attrs)}><div class="eyebrow">${ssrInterpolate(unref(t)("rpt.eyebrow"))}</div><div class="panel mb noprint"><div style="${ssrRenderStyle({ "display": "flex", "gap": "10px", "align-items": "center", "flex-wrap": "wrap", "margin-bottom": "10px" })}"><span class="small" style="${ssrRenderStyle({ "font-weight": "600" })}">${ssrInterpolate(unref(t)("rpt.presets"))}</span><!--[-->`);
|
|
|
+ ssrRenderList(Object.keys(RPT_PRESETS), (k) => {
|
|
|
+ _push(`<button class="pill"${ssrRenderAttr("data-preset", k)}>${ssrInterpolate(unref(t)("rpt.preset." + k))}</button>`);
|
|
|
+ });
|
|
|
+ _push(`<!--]--><span style="${ssrRenderStyle({ "flex": "1" })}"></span><select id="rptaud"><option value="in"${ssrIncludeBooleanAttr(RPT.aud === "in") ? " selected" : ""}>${ssrInterpolate(unref(t)("rpt.aud_in"))}</option><option value="up"${ssrIncludeBooleanAttr(RPT.aud === "up") ? " selected" : ""}>${ssrInterpolate(unref(t)("rpt.aud_up"))}</option></select><button class="btn quiet" id="rptprint">${ssrInterpolate(unref(t)("rpt.print"))}</button><button class="btn quiet" data-export="docx">${ssrInterpolate(unref(t)("rpt.export_docx"))}</button><button class="btn quiet" data-export="xlsx">${ssrInterpolate(unref(t)("rpt.export_xlsx"))}</button>`);
|
|
|
+ if (RPT.aud === "up") {
|
|
|
+ _push(`<span class="small" style="${ssrRenderStyle({ "color": "var(--warning)", "flex-basis": "100%" })}">${ssrInterpolate(unref(t)("rpt.up_note"))}</span>`);
|
|
|
+ } else {
|
|
|
+ _push(`<!---->`);
|
|
|
+ }
|
|
|
+ _push(`</div><div class="small" style="${ssrRenderStyle({ "font-weight": "600", "margin-bottom": "7px" })}">${ssrInterpolate(unref(t)("rpt.library"))} <span style="${ssrRenderStyle({ "font-weight": "400", "color": "var(--muted)" })}">${ssrInterpolate(unref(t)("rpt.library_note", { n: RPT.canvas.length }))}</span></div><div style="${ssrRenderStyle({ "display": "grid", "grid-template-columns": "auto 1fr", "gap": "6px 12px", "align-items": "center" })}">${libraryHtml.value ?? ""}</div><div id="rpthint" class="small muted" style="${ssrRenderStyle({ "margin-top": "9px", "padding-top": "8px", "border-top": "1px solid var(--line)", "min-height": "19px" })}">${ssrInterpolate(unref(t)("rpt.hint_idle"))}</div><div style="${ssrRenderStyle({ "margin-top": "11px", "padding-top": "10px", "border-top": "1px solid var(--line)" })}"><div class="small" style="${ssrRenderStyle({ "font-weight": "600", "margin-bottom": "6px" })}">${ssrInterpolate(unref(t)("rpt.need_head"))} <span id="rptmdlnote" style="${ssrRenderStyle({ "font-weight": "400", "color": "var(--muted)" })}">${needHint.value ?? ""}</span></div><div style="${ssrRenderStyle({ "display": "flex", "gap": "8px", "align-items": "center", "flex-wrap": "wrap" })}"><input id="rptneed"${ssrRenderAttr("placeholder", unref(esc)(unref(t)("rpt.need_ph")))}${ssrRenderAttr("value", RPT.need)} style="${ssrRenderStyle({ "flex": "1 1 300px", "min-width": "220px" })}"><select id="rptmdl">${opts.value ?? ""}</select><button class="btn" id="rptgo"${ssrIncludeBooleanAttr(!canCompose.value) ? " disabled" : ""}>${ssrInterpolate(unref(t)("rpt.compose"))}</button></div><div id="rptout" class="small muted" style="${ssrRenderStyle({ "margin-top": "7px" })}">${ssrInterpolate(outText.value)}</div></div></div>`);
|
|
|
+ if (!RPT.canvas.length) {
|
|
|
+ _push(`<div class="paper" style="${ssrRenderStyle({ "text-align": "center", "padding": "56px 40px" })}"><div class="small muted">${ssrInterpolate(unref(t)("rpt.preview_empty"))}</div></div>`);
|
|
|
+ } else {
|
|
|
+ _push(`<div class="paper"><div class="paper-hd"><div><div class="paper-ti">${ssrInterpolate(unref(t)("app.brand"))} · ${ssrInterpolate(unref(t)("rpt.paper_title"))}</div><div class="small muted" style="${ssrRenderStyle({ "margin-top": "3px" })}">${ssrInterpolate(unref(t)("rpt.paper_sub", { win: unref(winName)(__props.d.win), n: (__props.d.kpi || {}).全场 || 38 }))}${ssrInterpolate(RPT.aud === "up" ? " | " + unref(t)("rpt.up_tag") : "")}</div></div><div class="small muted" style="${ssrRenderStyle({ "text-align": "right" })}">${ssrInterpolate(unref(t)("rpt.chapters", { n: RPT.canvas.length }))}</div></div><!--[-->`);
|
|
|
+ ssrRenderList(RPT.canvas, (k, i) => {
|
|
|
+ _push(`<!--[-->`);
|
|
|
+ if (RPT_BLOCKS[k]) {
|
|
|
+ _push(`<div class="noprint" style="${ssrRenderStyle({ "display": "flex", "gap": "3px", "justify-content": "flex-end", "margin-bottom": "-6px", "position": "relative", "z-index": "2" })}"><button class="pill" data-mv="up"${ssrRenderAttr("data-k", k)}${ssrIncludeBooleanAttr(i === 0) ? " disabled" : ""} style="${ssrRenderStyle({ "padding": "1px 8px", "font-size": "11px", "opacity": ".7" })}">↑</button><button class="pill" data-mv="down"${ssrRenderAttr("data-k", k)}${ssrIncludeBooleanAttr(i === RPT.canvas.length - 1) ? " disabled" : ""} style="${ssrRenderStyle({ "padding": "1px 8px", "font-size": "11px", "opacity": ".7" })}">↓</button><button class="pill" data-mv="del"${ssrRenderAttr("data-k", k)} style="${ssrRenderStyle({ "padding": "1px 8px", "font-size": "11px", "opacity": ".7" })}">×</button></div>`);
|
|
|
+ } else {
|
|
|
+ _push(`<!---->`);
|
|
|
+ }
|
|
|
+ if (RPT_BLOCKS[k]) {
|
|
|
+ _push(`<div>${blockHtml()}</div>`);
|
|
|
+ } else {
|
|
|
+ _push(`<!---->`);
|
|
|
+ }
|
|
|
+ _push(`<!--]-->`);
|
|
|
+ });
|
|
|
+ _push(`<!--]--><div>${factsHtml.value ?? ""}</div><div class="paper-ft"><span>${ssrInterpolate(unref(t)("rpt.foot_src"))}${ssrInterpolate(asof.value ? " | " + unref(t)("rpt.foot_asof", { d: asof.value }) : "")}</span><span>${ssrInterpolate(unref(t)("rpt.foot_trace"))}${ssrInterpolate(RPT.aud === "up" ? " | " + unref(t)("rpt.foot_deid") : "")}</span></div></div>`);
|
|
|
+ }
|
|
|
+ _push(`</section>`);
|
|
|
+ };
|
|
|
+ }
|
|
|
+});
|
|
|
const _sfc_setup$2 = _sfc_main$2.setup;
|
|
|
_sfc_main$2.setup = (props, ctx) => {
|
|
|
const ssrContext = useSSRContext();
|
|
|
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/System.vue");
|
|
|
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/Report.vue");
|
|
|
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
|
};
|
|
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
@@ -2297,52 +2392,57 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
const emit = __emit;
|
|
|
const pending = computed(() => !DONE.includes(props.tab));
|
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
|
- _push(`<!--[--><nav class="wb-tabs" data-v-a738e9d0><!--[-->`);
|
|
|
+ _push(`<!--[--><nav class="wb-tabs" data-v-57d828dd><!--[-->`);
|
|
|
ssrRenderList(unref(TABS), (id) => {
|
|
|
- _push(`<button class="${ssrRenderClass({ on: id === __props.tab })}" data-v-a738e9d0>${ssrInterpolate(unref(t)("tab." + id))}`);
|
|
|
+ _push(`<button class="${ssrRenderClass({ on: id === __props.tab })}" data-v-57d828dd>${ssrInterpolate(unref(t)("tab." + id))}`);
|
|
|
if (!unref(DONE).includes(id)) {
|
|
|
- _push(`<sup class="todo" data-v-a738e9d0>迁移中</sup>`);
|
|
|
+ _push(`<sup class="todo" data-v-57d828dd>迁移中</sup>`);
|
|
|
} else {
|
|
|
_push(`<!---->`);
|
|
|
}
|
|
|
_push(`</button>`);
|
|
|
});
|
|
|
- _push(`<!--]--></nav><div class="page-head" data-v-a738e9d0><h1 data-v-a738e9d0>${ssrInterpolate(unref(t)("tab." + __props.tab))}</h1><span class="window-badge" data-v-a738e9d0>${ssrInterpolate(unref(t)("win.label"))} · ${ssrInterpolate(unref(winName)(__props.d?.win))}</span></div>`);
|
|
|
+ _push(`<!--]--></nav><div class="page-head" data-v-57d828dd><h1 data-v-57d828dd>${ssrInterpolate(unref(t)("tab." + __props.tab))}</h1><span class="window-badge" data-v-57d828dd>${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") {
|
|
|
- _push(ssrRenderComponent(_sfc_main$8, { d: __props.d }, null, _parent));
|
|
|
+ _push(ssrRenderComponent(_sfc_main$9, { d: __props.d }, null, _parent));
|
|
|
} else if (__props.tab === "component") {
|
|
|
- _push(ssrRenderComponent(_sfc_main$a, {
|
|
|
+ _push(ssrRenderComponent(_sfc_main$b, {
|
|
|
d: __props.d,
|
|
|
sys: __props.sys
|
|
|
}, null, _parent));
|
|
|
} else if (__props.tab === "fault") {
|
|
|
- _push(ssrRenderComponent(_sfc_main$7, { d: __props.d }, null, _parent));
|
|
|
+ _push(ssrRenderComponent(_sfc_main$8, { d: __props.d }, null, _parent));
|
|
|
} else if (__props.tab === "vibration") {
|
|
|
- _push(ssrRenderComponent(_sfc_main$6, {
|
|
|
+ _push(ssrRenderComponent(_sfc_main$7, {
|
|
|
d: __props.d,
|
|
|
sub: __props.sub,
|
|
|
cms: __props.cms,
|
|
|
onSub: ($event) => emit("sub", $event)
|
|
|
}, null, _parent));
|
|
|
} else if (__props.tab === "generation") {
|
|
|
- _push(ssrRenderComponent(_sfc_main$5, {
|
|
|
+ _push(ssrRenderComponent(_sfc_main$6, {
|
|
|
d: __props.d,
|
|
|
curves: __props.curves,
|
|
|
pending: !!__props.d.m9_pending
|
|
|
}, null, _parent));
|
|
|
} else if (__props.tab === "decision") {
|
|
|
- _push(ssrRenderComponent(_sfc_main$4, {
|
|
|
+ _push(ssrRenderComponent(_sfc_main$5, {
|
|
|
d: __props.d,
|
|
|
apis: __props.apis
|
|
|
}, null, _parent));
|
|
|
} else if (__props.tab === "assistant") {
|
|
|
- _push(ssrRenderComponent(_sfc_main$3, { d: __props.d }, null, _parent));
|
|
|
+ _push(ssrRenderComponent(_sfc_main$4, { d: __props.d }, null, _parent));
|
|
|
} else if (__props.tab === "system") {
|
|
|
- _push(ssrRenderComponent(_sfc_main$2, { apis: __props.apis }, null, _parent));
|
|
|
+ _push(ssrRenderComponent(_sfc_main$3, { apis: __props.apis }, null, _parent));
|
|
|
+ } else if (__props.tab === "report") {
|
|
|
+ _push(ssrRenderComponent(_sfc_main$2, {
|
|
|
+ d: __props.d,
|
|
|
+ apis: __props.apis
|
|
|
+ }, null, _parent));
|
|
|
} else if (pending.value) {
|
|
|
- _push(`<section class="card" data-v-a738e9d0><h2 data-v-a738e9d0>${ssrInterpolate(unref(t)("tab." + __props.tab))} <small data-v-a738e9d0>(本页签尚未迁移到 Vue)</small></h2><p class="hint" data-v-a738e9d0> 迁移纪律:页签逐个搬,每搬一个就用 <code data-v-a738e9d0>tools/render_parity.mjs</code> 与重构前页面 (现网 <code data-v-a738e9d0>/detail/v2</code>)对拍文案/数值/类名序列,**通过后**才删对应的 Python 前端源码。 当前已迁移:${ssrInterpolate(unref(DONE).join("、"))}。 </p></section>`);
|
|
|
+ _push(`<section class="card" data-v-57d828dd><h2 data-v-57d828dd>${ssrInterpolate(unref(t)("tab." + __props.tab))} <small data-v-57d828dd>(本页签尚未迁移到 Vue)</small></h2><p class="hint" data-v-57d828dd> 迁移纪律:页签逐个搬,每搬一个就用 <code data-v-57d828dd>tools/render_parity.mjs</code> 与重构前页面 (现网 <code data-v-57d828dd>/detail/v2</code>)对拍文案/数值/类名序列,**通过后**才删对应的 Python 前端源码。 当前已迁移:${ssrInterpolate(unref(DONE).join("、"))}。 </p></section>`);
|
|
|
} else {
|
|
|
_push(`<!---->`);
|
|
|
}
|
|
|
@@ -2356,7 +2456,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-a738e9d0"]]);
|
|
|
+const Workbench = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-57d828dd"]]);
|
|
|
async function renderTab(d, tab = "overview", sub, cms, curves, apis) {
|
|
|
const app = createSSRApp(Workbench, { d, tab, sub: sub ?? null, cms: cms ?? null, curves: curves ?? null, apis: apis ?? null });
|
|
|
return await renderToString(app);
|