nxd-plugin 1.8.27 → 1.8.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./component-YCServiceSummary-LZ-2GeV8.mjs";
2
+ export { e as default };
@@ -13,7 +13,7 @@ var D = { class: "YCAIChatPanel" }, O = {
13
13
  }, j = ["innerHTML"], M = {
14
14
  key: 0,
15
15
  class: "YCAIChatPanel-subMenu"
16
- }, N = ["onClick"], ee = ["src"], te = { class: "YCAIChatPanel-footer" }, P = { class: "YCAIChatPanel-mainMenu" }, ne = ["onClick"], re = { class: "YCAIChatPanel-inputBar" }, ie = ["placeholder"], ae = ["disabled"], F = 2e3, oe = 300 * 1e3, se = "正在思考...", I = "做材料", L = /* @__PURE__ */ e(/* @__PURE__ */ f({
16
+ }, N = ["onClick"], P = ["src"], ee = { class: "YCAIChatPanel-footer" }, te = { class: "YCAIChatPanel-mainMenu" }, F = ["onClick"], ne = { class: "YCAIChatPanel-inputBar" }, re = ["placeholder"], ie = ["disabled"], ae = 2e3, I = 300 * 1e3, oe = "正在思考...", se = "做材料", L = /* @__PURE__ */ e(/* @__PURE__ */ f({
17
17
  __name: "YCAIChatPanel",
18
18
  props: [
19
19
  "appKey",
@@ -102,7 +102,7 @@ var D = { class: "YCAIChatPanel" }, O = {
102
102
  id: e.id
103
103
  }))
104
104
  };
105
- }).filter((e) => e.label && e.label !== I);
105
+ }).filter((e) => e.label && e.label !== se);
106
106
  } catch (e) {
107
107
  console.error("[YCAIChatPanel] 获取菜单失败:", e);
108
108
  }
@@ -121,7 +121,7 @@ var D = { class: "YCAIChatPanel" }, O = {
121
121
  status: "end"
122
122
  }), H.value.push({
123
123
  role: "ai",
124
- content: se,
124
+ content: oe,
125
125
  status: "thinking"
126
126
  }), p.value = "", m(() => {
127
127
  $(), Q();
@@ -167,12 +167,12 @@ var D = { class: "YCAIChatPanel" }, O = {
167
167
  await J(a, t, n, i);
168
168
  return;
169
169
  }
170
- V = setTimeout(() => J(a, t, n, i), F);
170
+ V = setTimeout(() => J(a, t, n, i), ae);
171
171
  } catch (e) {
172
172
  console.error("[YCAIChatPanel] mobileBot 对话失败:", e), Y("请求失败,请稍后重试", "error"), C.value = !1;
173
173
  }
174
174
  }, J = async (e, t, n, r) => {
175
- if (Date.now() - r > oe) {
175
+ if (Date.now() - r > I) {
176
176
  Y("查询超时,请稍后重试", "error"), C.value = !1, Z();
177
177
  return;
178
178
  }
@@ -181,7 +181,7 @@ var D = { class: "YCAIChatPanel" }, O = {
181
181
  if (i?.errorCode !== void 0 && i?.errorCode !== 0 && i?.errorCode !== 200) throw Error(i?.message || "查询结果失败");
182
182
  let a = i?.data || {}, o = a.status, s = a.markdown;
183
183
  if (o === "running") {
184
- V = setTimeout(() => J(e, t, n, r), F);
184
+ V = setTimeout(() => J(e, t, n, r), ae);
185
185
  return;
186
186
  }
187
187
  if (o === "fail") {
@@ -238,12 +238,12 @@ var D = { class: "YCAIChatPanel" }, O = {
238
238
  class: "YCAIChatPanel-subMenu-arrow",
239
239
  src: ue.value,
240
240
  alt: ""
241
- }, null, 8, ee)], 8, N))), 128))])) : o("", !0),
242
- c("div", te, [c("div", P, [(v(!0), s(i, null, b(U.value, (e) => (v(), s("button", {
241
+ }, null, 8, P)], 8, N))), 128))])) : o("", !0),
242
+ c("div", ee, [c("div", te, [(v(!0), s(i, null, b(U.value, (e) => (v(), s("button", {
243
243
  key: e.key,
244
244
  class: h(["YCAIChatPanel-mainMenu-btn", { "is-active": T.value === e.key }]),
245
245
  onClick: (t) => K(e.key)
246
- }, x(e.label), 11, ne))), 128))]), c("div", re, [w(c("textarea", {
246
+ }, x(e.label), 11, F))), 128))]), c("div", ne, [w(c("textarea", {
247
247
  ref_key: "textareaRef",
248
248
  ref: d,
249
249
  "onUpdate:modelValue": t[0] ||= (e) => p.value = e,
@@ -252,7 +252,7 @@ var D = { class: "YCAIChatPanel" }, O = {
252
252
  rows: "1",
253
253
  onInput: $,
254
254
  onKeydown: ve
255
- }, null, 40, ie), [[S, p.value]]), c("button", {
255
+ }, null, 40, re), [[S, p.value]]), c("button", {
256
256
  class: "YCAIChatPanel-send",
257
257
  disabled: !ce.value,
258
258
  onClick: q,
@@ -262,7 +262,7 @@ var D = { class: "YCAIChatPanel" }, O = {
262
262
  width: "16",
263
263
  height: "16",
264
264
  fill: "currentColor"
265
- }, [c("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })], -1)]], 8, ae)])])
265
+ }, [c("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })], -1)]], 8, ie)])])
266
266
  ]));
267
267
  }
268
268
  }), [["__scopeId", "data-v-c958b0ae"]]), R = ["element-loading-background"], z = "#ff4d4f", B = "#52c41a", V = /* @__PURE__ */ e(/* @__PURE__ */ f({
@@ -1220,15 +1220,15 @@ var D = { class: "YCAIChatPanel" }, O = {
1220
1220
  "showEditBtn"
1221
1221
  ],
1222
1222
  setup(e) {
1223
- let t = e, r = y([]), l = y(0), f = a(() => r.value[l.value]?.title || ""), g = a(() => r.value[l.value]?.warnInfo || ""), S = y(!1), w = a(() => t.showEditBtn != null && t.showEditBtn !== !1), T = y([]), E = y("交通气象服务材料"), D = y(""), O = y(!1), k = y(!1), A = y(""), j = y(null), M = null, N = a(() => D.value.split("/").pop() || `${E.value}.docx`), ee = (e) => e && (e.split("/").pop() || "").replace(/\.[^.]+$/, "") || "交通气象服务材料", te = (e) => !e || typeof e != "object" ? [] : Object.entries(e).map(([e, t]) => ({
1223
+ let t = e, r = y([]), l = y(0), f = a(() => r.value[l.value]?.title || ""), g = a(() => r.value[l.value]?.warnInfo || ""), S = y(!1), w = a(() => t.showEditBtn != null && t.showEditBtn !== !1), T = y([]), E = y("交通气象服务材料"), D = y(""), O = y(""), k = y(!1), A = y(!1), j = y(""), M = y(null), N = null, P = a(() => D.value.split("/").pop() || `${E.value}.docx`), ee = (e) => e && (e.split("/").pop() || "").replace(/\.[^.]+$/, "") || "交通气象服务材料", te = (e) => !e || typeof e != "object" ? [] : Object.entries(e).map(([e, t]) => ({
1224
1224
  label: e.includes(":") ? e : `${e}:`,
1225
1225
  value: String(t)
1226
- })), P = () => {
1226
+ })), F = () => {
1227
1227
  let e = r.value[l.value];
1228
- e && (T.value = e.imgUrl ? String(e.imgUrl).split(",").map((e) => e.trim()).filter(Boolean) : [], E.value = ee(e.workUrl), D.value = e.workUrl || "");
1228
+ e && (T.value = e.imgUrl ? String(e.imgUrl).split(",").map((e) => e.trim()).filter(Boolean) : [], E.value = ee(e.workUrl), D.value = e.workUrl || "", O.value = e.workflowId || "");
1229
1229
  };
1230
1230
  C(l, () => {
1231
- P();
1231
+ F();
1232
1232
  });
1233
1233
  let ne = async () => {
1234
1234
  let e = t.ids?.baseData;
@@ -1255,8 +1255,9 @@ var D = { class: "YCAIChatPanel" }, O = {
1255
1255
  rows: te(e.数据),
1256
1256
  warnInfo: e.预警信息 || "",
1257
1257
  workUrl: e.workUrl || "",
1258
- imgUrl: e.imgUrl || ""
1259
- })), l.value = 0, P();
1258
+ imgUrl: e.imgUrl || "",
1259
+ workflowId: e.workflowId || ""
1260
+ })), l.value = 0, F();
1260
1261
  } catch (e) {
1261
1262
  console.error("[YCServiceSummary] baseData 加载失败", e);
1262
1263
  }
@@ -1308,30 +1309,30 @@ var D = { class: "YCAIChatPanel" }, O = {
1308
1309
  setTimeout(r, 100);
1309
1310
  };
1310
1311
  r();
1311
- }), F = async () => {
1312
- let e = j.value;
1312
+ }), I = async () => {
1313
+ let e = M.value;
1313
1314
  if (e) {
1314
- k.value = !0, A.value = "";
1315
+ A.value = !0, j.value = "";
1315
1316
  try {
1316
1317
  await ae();
1317
1318
  let n = window.DocsAPI;
1318
1319
  if (!n?.DocEditor) {
1319
- A.value = "OnlyOffice API 不可用,请检查服务地址和代理";
1320
+ j.value = "OnlyOffice API 不可用,请检查服务地址和代理";
1320
1321
  return;
1321
1322
  }
1322
1323
  let r = encodeURI(re(D.value));
1323
1324
  if (!r) {
1324
- A.value = "文件地址为空";
1325
+ j.value = "文件地址为空";
1325
1326
  return;
1326
1327
  }
1327
- let i = (N.value.split(".").pop() || "docx").toLowerCase(), a = `yc-onlyoffice-editor-${Date.now()}`;
1328
- if (M) {
1328
+ let i = (P.value.split(".").pop() || "docx").toLowerCase(), a = `yc-onlyoffice-editor-${Date.now()}`;
1329
+ if (N) {
1329
1330
  try {
1330
- M.destroyEditor();
1331
+ N.destroyEditor();
1331
1332
  } catch (e) {
1332
1333
  console.warn("[YCServiceSummary] 销毁旧 OnlyOffice 编辑器失败:", e);
1333
1334
  }
1334
- M = null;
1335
+ N = null;
1335
1336
  }
1336
1337
  e.innerHTML = "";
1337
1338
  let o = document.createElement("div");
@@ -1342,10 +1343,10 @@ var D = { class: "YCAIChatPanel" }, O = {
1342
1343
  height: "100%",
1343
1344
  documentType: ie(i),
1344
1345
  document: {
1345
- title: N.value || "文档",
1346
+ title: P.value || "文档",
1346
1347
  url: r,
1347
1348
  fileType: i,
1348
- key: `yc_${Date.now()}_${Math.random().toString(36).slice(2)}`,
1349
+ key: `${O.value}_${Date.now()}_${Math.random().toString(36).slice(2)}`,
1349
1350
  permissions: {
1350
1351
  edit: !0,
1351
1352
  download: !0,
@@ -1404,13 +1405,13 @@ var D = { class: "YCAIChatPanel" }, O = {
1404
1405
  },
1405
1406
  events: {
1406
1407
  onReady: () => {
1407
- k.value = !1;
1408
+ A.value = !1;
1408
1409
  },
1409
1410
  onAppReady: () => {
1410
- k.value = !1;
1411
+ A.value = !1;
1411
1412
  },
1412
1413
  onError: (e) => {
1413
- k.value = !1, A.value = `文档加载失败:${e?.description || e?.data?.description || e?.message || JSON.stringify(e)}`, console.error("[YCServiceSummary] OnlyOffice onError:", e);
1414
+ A.value = !1, j.value = `文档加载失败:${e?.description || e?.data?.description || e?.message || JSON.stringify(e)}`, console.error("[YCServiceSummary] OnlyOffice onError:", e);
1414
1415
  },
1415
1416
  onWarning: (e) => {
1416
1417
  console.warn("[YCServiceSummary] OnlyOffice onWarning:", e);
@@ -1418,35 +1419,35 @@ var D = { class: "YCAIChatPanel" }, O = {
1418
1419
  }
1419
1420
  };
1420
1421
  try {
1421
- M = new n.DocEditor(a, s);
1422
+ N = new n.DocEditor(a, s);
1422
1423
  } catch (e) {
1423
- console.error("[YCServiceSummary] new DocEditor 抛出异常:", e), A.value = "OnlyOffice 编辑器创建失败";
1424
+ console.error("[YCServiceSummary] new DocEditor 抛出异常:", e), j.value = "OnlyOffice 编辑器创建失败";
1424
1425
  }
1425
1426
  } catch (e) {
1426
- console.error("[YCServiceSummary] 初始化 OnlyOffice 失败:", e), A.value = `打开文档失败:${e instanceof Error ? e.message : String(e)}`;
1427
+ console.error("[YCServiceSummary] 初始化 OnlyOffice 失败:", e), j.value = `打开文档失败:${e instanceof Error ? e.message : String(e)}`;
1427
1428
  } finally {
1428
- A.value && (k.value = !1);
1429
+ j.value && (A.value = !1);
1429
1430
  }
1430
1431
  }
1431
1432
  }, oe = () => {
1432
- O.value = !0, m(() => F());
1433
+ k.value = !0, m(() => I());
1433
1434
  }, se = () => {
1434
- if (M) {
1435
+ if (N) {
1435
1436
  try {
1436
- M.destroyEditor();
1437
+ N.destroyEditor();
1437
1438
  } catch (e) {
1438
1439
  console.warn("[YCServiceSummary] 销毁 OnlyOffice 编辑器失败:", e);
1439
1440
  }
1440
- M = null;
1441
+ N = null;
1441
1442
  }
1442
- j.value && (j.value.innerHTML = ""), O.value = !1, k.value = !1, A.value = "";
1443
- }, I = () => {
1443
+ M.value && (M.value.innerHTML = ""), k.value = !1, A.value = !1, j.value = "";
1444
+ }, R = () => {
1444
1445
  let e = re(D.value);
1445
1446
  if (!e) return;
1446
1447
  let t = document.createElement("a");
1447
- t.href = encodeURI(e), t.download = N.value, t.target = "_blank", t.click();
1448
- }, R = (e) => {
1449
- e === "edit" && oe(), e === "download" && I();
1448
+ t.href = encodeURI(e), t.download = P.value, t.target = "_blank", t.click();
1449
+ }, z = (e) => {
1450
+ e === "edit" && oe(), e === "download" && R();
1450
1451
  };
1451
1452
  return (e, n) => (v(), s("div", { class: h(["YCServiceSummary", { "is-dark": S.value }]) }, [
1452
1453
  c("div", we, [c("button", {
@@ -1489,7 +1490,7 @@ var D = { class: "YCAIChatPanel" }, O = {
1489
1490
  c("div", Je, [c("div", Ye, [c("span", Xe, x(E.value), 1), c("div", Ze, [w.value ? (v(), s("button", {
1490
1491
  key: 0,
1491
1492
  class: "YCServiceSummary-material-btn YCServiceSummary-material-btn--edit",
1492
- onClick: n[2] ||= (e) => R("edit")
1493
+ onClick: n[2] ||= (e) => z("edit")
1493
1494
  }, [...n[18] ||= [c("svg", {
1494
1495
  viewBox: "0 0 24 24",
1495
1496
  width: "12",
@@ -1497,7 +1498,7 @@ var D = { class: "YCAIChatPanel" }, O = {
1497
1498
  fill: "currentColor"
1498
1499
  }, [c("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 000-1.41l-2.34-2.34a.996.996 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" })], -1), u(" 编辑 ", -1)]])) : o("", !0), c("button", {
1499
1500
  class: "YCServiceSummary-material-btn YCServiceSummary-material-btn--download",
1500
- onClick: n[3] ||= (e) => R("download")
1501
+ onClick: n[3] ||= (e) => z("download")
1501
1502
  }, [...n[19] ||= [c("svg", {
1502
1503
  viewBox: "0 0 24 24",
1503
1504
  width: "12",
@@ -1511,9 +1512,9 @@ var D = { class: "YCAIChatPanel" }, O = {
1511
1512
  }, null, 8, $e))), 128))])])
1512
1513
  ]),
1513
1514
  c("div", et, [d(L, p(t, { theme: S.value ? "dark" : "light" }), null, 16, ["theme"])]),
1514
- O.value ? (v(), s("div", tt, [c("div", nt, [c("div", rt, [c("span", it, x(N.value), 1), c("div", { class: "YCServiceSummary-editorDialog-actions" }, [c("button", {
1515
+ k.value ? (v(), s("div", tt, [c("div", nt, [c("div", rt, [c("span", it, x(P.value), 1), c("div", { class: "YCServiceSummary-editorDialog-actions" }, [c("button", {
1515
1516
  class: "YCServiceSummary-editorDialog-btn",
1516
- onClick: I
1517
+ onClick: R
1517
1518
  }, [...n[20] ||= [c("svg", {
1518
1519
  viewBox: "0 0 24 24",
1519
1520
  width: "12",
@@ -1531,17 +1532,17 @@ var D = { class: "YCAIChatPanel" }, O = {
1531
1532
  }, [c("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]])])]), c("div", at, [
1532
1533
  c("div", {
1533
1534
  ref_key: "onlyofficeContainerRef",
1534
- ref: j,
1535
+ ref: M,
1535
1536
  class: "YCServiceSummary-editorDialog-container"
1536
1537
  }, null, 512),
1537
- k.value ? (v(), s("div", ot, [...n[22] ||= [c("span", { class: "YCServiceSummary-editorDialog-spinner" }, null, -1), c("span", null, "正在加载文档编辑器...", -1)]])) : o("", !0),
1538
- A.value ? (v(), s("div", st, [c("span", ct, x(A.value), 1), c("button", {
1538
+ A.value ? (v(), s("div", ot, [...n[22] ||= [c("span", { class: "YCServiceSummary-editorDialog-spinner" }, null, -1), c("span", null, "正在加载文档编辑器...", -1)]])) : o("", !0),
1539
+ j.value ? (v(), s("div", st, [c("span", ct, x(j.value), 1), c("button", {
1539
1540
  class: "YCServiceSummary-editorDialog-retryBtn",
1540
- onClick: F
1541
+ onClick: I
1541
1542
  }, "重试")])) : o("", !0)
1542
1543
  ])])])) : o("", !0)
1543
1544
  ], 2));
1544
1545
  }
1545
- }), [["__scopeId", "data-v-97f2834f"]]);
1546
+ }), [["__scopeId", "data-v-423267aa"]]);
1546
1547
  //#endregion
1547
1548
  export { lt as t };
@@ -72,7 +72,7 @@ import { t as _e } from "./chunks/component-GridForecastMsg-D8dHHVHX.mjs";
72
72
  import { t as ve } from "./chunks/component-HdMajorActivity-nIv4HBSm.mjs";
73
73
  import { defineAsyncComponent as $ } from "vue";
74
74
  //#region src/index.ts
75
- var ye = $(() => import("./chunks/YCServiceSummary-D-vVVtfC.mjs")), be = { install($) {
75
+ var ye = $(() => import("./chunks/YCServiceSummary-CSklmCPP.mjs")), be = { install($) {
76
76
  $.component("HighwayLiveAlarm", ee), $.component("HighwayLiveAlarmNew", n), $.component("HighwayStations", r), $.component("HighWayEarlyWarningRed", i), $.component("HighwayWeatherForecast", s), $.component("ServiceMaterialsBtn", l), $.component("YCHome", d), $.component("YCLoginNew", f), $.component("HighWayFreeze", p), $.component("RadarShortTerm", h), $.component("LithiumBatteryMiningArea", u), $.component("TimeBasedForecast", g), $.component("Typhoon", Q), $.component("WeatherForecast", _), $.component("ImageGeneration", v), $.component("WarningSignal", y), $.component("RadarChart", b), $.component("AqiMonitor", e), $.component("MapPopup", x), $.component("RadarTime", S), $.component("ServiceMaterial", C), $.component("WarningLine", w), $.component("RadarLegend", m), $.component("PieLegend", T), $.component("GeologyLiveAlarm", te), $.component("MaterialPreview", E), $.component("ReservoirLiveAlarm", D), $.component("IframeWeb", O), $.component("Duty", k), $.component("RenderMarkdown", A), $.component("EarlyWarningStatistic", j), $.component("EarlyWarningStatistic2", M), $.component("YCDataService", N), $.component("ChartCumulativePre", P), $.component("ChartServiceMaterial", F), $.component("YCHomeLegend", I), $.component("IntroducePic", L), $.component("HighQuality", R), $.component("AiChat", t), $.component("StationDialog", z), $.component("StationList", B), $.component("PrecipitationRanking", ne), $.component("Forecast72h", o), $.component("HdRadarTime", V), $.component("HdRadarTimeLine", H), $.component("HdStationTem", U), $.component("HdObservation", W), $.component("HdPreSituation", G), $.component("HdSeaCase", K), $.component("HdQxServiceEffects", q), $.component("HdHeatService", J), $.component("HdServiceRequirements", Y), $.component("HdSuggestion", X), $.component("HdForecastProducts", Z), $.component("HdThreeWeatherTrend", a), $.component("HdWaveForcast", re), $.component("HdServiceMarterial", ie), $.component("HdCameraList", ae), $.component("HdRadarList", oe), $.component("HdInsectList", se), $.component("HdInsectDetailList", ce), $.component("HdSoil", le), $.component("HdSoilDetailList", ue), $.component("HdHeatChart", de), $.component("HdHeatChartDialog", fe), $.component("HdRisk", pe), $.component("HdFarmStation", me), $.component("HdFarmStationDialog", c), $.component("Typhoon", Q), $.component("HDSeaLegend", he), $.component("YCHighWaySummary", ge), $.component("GridForecastMsg", _e), $.component("HdMajorActivity", ve), $.component("YCServiceSummary", ye);
77
77
  } };
78
78
  //#endregion