nxd-plugin 1.8.23 → 1.8.25

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.
Files changed (87) hide show
  1. package/dist/chunks/YCServiceSummary-ocAo3i11.mjs +2 -0
  2. package/dist/chunks/{component-AiChat-BwP3zj0h.mjs → component-AiChat-B4TFE3zE.mjs} +28 -8
  3. package/dist/chunks/{component-AqiMonitor-Cga2wb4h.mjs → component-AqiMonitor-DUYptVaD.mjs} +1 -1
  4. package/dist/chunks/{component-ChartCumulativePre-CkQrY-fM.mjs → component-ChartCumulativePre-Cq640rSZ.mjs} +2 -2
  5. package/dist/chunks/{component-ChartServiceMaterial-BSfXMgj4.mjs → component-ChartServiceMaterial-CErhwqxP.mjs} +2 -2
  6. package/dist/chunks/{component-Duty-DLMdCDNu.mjs → component-Duty-DbXk18Bv.mjs} +2 -2
  7. package/dist/chunks/{component-EarlyWarningStatistic-CHCmDM5w.mjs → component-EarlyWarningStatistic-C9qxnY7H.mjs} +2 -2
  8. package/dist/chunks/{component-EarlyWarningStatistic2-D_Uc9rbm.mjs → component-EarlyWarningStatistic2-J8YH_gad.mjs} +2 -2
  9. package/dist/chunks/{component-Forecast72h-CwDS2BCV.mjs → component-Forecast72h-BIjHpvOB.mjs} +1 -1
  10. package/dist/chunks/{component-GeologyLiveAlarm-TXjC0N1b.mjs → component-GeologyLiveAlarm-Dd8vj5oc.mjs} +2 -2
  11. package/dist/chunks/{component-GridForecastMsg-J7V2m_bm.mjs → component-GridForecastMsg-DKePezqT.mjs} +1 -1
  12. package/dist/chunks/{component-HDSeaLegend-BbW1vk-L.mjs → component-HDSeaLegend-B6Y_ExXl.mjs} +2 -2
  13. package/dist/chunks/{component-HdCameraList-ya7gQWsk.mjs → component-HdCameraList-DCj26p7y.mjs} +2 -2
  14. package/dist/chunks/{component-HdFarmStation-DbvF94Z6.mjs → component-HdFarmStation-yTK9kw5K.mjs} +2 -2
  15. package/dist/chunks/{component-HdFarmStationDialog-p3vjS1JB.mjs → component-HdFarmStationDialog-CZAGhZ09.mjs} +1 -1
  16. package/dist/chunks/{component-HdForecastProducts-2ZXLMLdw.mjs → component-HdForecastProducts-Bxavnbn_.mjs} +1 -1
  17. package/dist/chunks/{component-HdHeatChart-CM4uhNsK.mjs → component-HdHeatChart-CV_X4lUL.mjs} +1 -1
  18. package/dist/chunks/{component-HdHeatChartDialog-CxIaxIg5.mjs → component-HdHeatChartDialog-DFIBGFqt.mjs} +2 -2
  19. package/dist/chunks/{component-HdHeatService-BNRBwLEC.mjs → component-HdHeatService-C078t2Lb.mjs} +1 -1
  20. package/dist/chunks/{component-HdInsectDetailList-CNfJip9R.mjs → component-HdInsectDetailList-BK8f8Mnv.mjs} +1 -1
  21. package/dist/chunks/{component-HdInsectList-D0fRM6cx.mjs → component-HdInsectList-DIeZFohU.mjs} +1 -1
  22. package/dist/chunks/{component-HdMajorActivity-C95MgI5Y.mjs → component-HdMajorActivity-BVV0LmCT.mjs} +20 -21
  23. package/dist/chunks/{component-HdObservation-DUMGmfJN.mjs → component-HdObservation-C-VaYyH2.mjs} +3 -3
  24. package/dist/chunks/{component-HdPreSituation-IILymZ3h.mjs → component-HdPreSituation-B9AlfiGm.mjs} +3 -3
  25. package/dist/chunks/{component-HdQxServiceEffects-B-C0VBH3.mjs → component-HdQxServiceEffects-DoPAIo3K.mjs} +1 -1
  26. package/dist/chunks/{component-HdRadarList-DSMrSb-T.mjs → component-HdRadarList-Rd_r5Jyf.mjs} +3 -3
  27. package/dist/chunks/{component-HdRadarTime-FEhuGBEg.mjs → component-HdRadarTime-C9M0dU-8.mjs} +1 -1
  28. package/dist/chunks/{component-HdRadarTimeLine-UfzKKTgp.mjs → component-HdRadarTimeLine-B6OBf-Pg.mjs} +1 -1
  29. package/dist/chunks/{component-HdRisk-B3N71NoC.mjs → component-HdRisk-U40g5Xj3.mjs} +2 -2
  30. package/dist/chunks/{component-HdSeaCase-Cim-Y8hP.mjs → component-HdSeaCase-BmNDbHbK.mjs} +1 -1
  31. package/dist/chunks/{component-HdServiceMarterial-BxifbLBR.mjs → component-HdServiceMarterial-oPQAQBPf.mjs} +2 -2
  32. package/dist/chunks/{component-HdServiceRequirements-BawMn0jA.mjs → component-HdServiceRequirements-Cn2yQAFr.mjs} +2 -2
  33. package/dist/chunks/{component-HdSoil-DaGj6RPD.mjs → component-HdSoil-DW2r2PrO.mjs} +2 -2
  34. package/dist/chunks/{component-HdSoilDetailList-fBu8i74J.mjs → component-HdSoilDetailList-weEBkeWx.mjs} +1 -1
  35. package/dist/chunks/{component-HdStationTem-DgGFJ20c.mjs → component-HdStationTem-D9mqc9XD.mjs} +3 -3
  36. package/dist/chunks/{component-HdSuggestion-BnpgzKkp.mjs → component-HdSuggestion-2rU0ATuE.mjs} +2 -2
  37. package/dist/chunks/{component-HdThreeWeatherTrend-Bmire4sm.mjs → component-HdThreeWeatherTrend-CwAb4t7D.mjs} +3 -3
  38. package/dist/chunks/{component-HdWaveForcast-Bc3sB9Fn.mjs → component-HdWaveForcast-CtKZz_oX.mjs} +2 -2
  39. package/dist/chunks/{component-HighQuality-DjDZKwMT.mjs → component-HighQuality-DvkmQKTO.mjs} +1 -1
  40. package/dist/chunks/{component-HighWayEarlyWarningRed-CzBI_AJA.mjs → component-HighWayEarlyWarningRed-Dmg5HVlm.mjs} +2 -2
  41. package/dist/chunks/{component-HighWayFreeze-sFMx0umE.mjs → component-HighWayFreeze-DVkYDn2y.mjs} +2 -2
  42. package/dist/chunks/{component-HighwayLiveAlarm-Ozq7Y8qF.mjs → component-HighwayLiveAlarm-DXpnMrfu.mjs} +2 -2
  43. package/dist/chunks/{component-HighwayLiveAlarmNew-ByL2OYk0.mjs → component-HighwayLiveAlarmNew-CkTM9E69.mjs} +3 -3
  44. package/dist/chunks/{component-HighwayStations-DXj5h1vg.mjs → component-HighwayStations-dZXng1Pp.mjs} +2 -2
  45. package/dist/chunks/{component-HighwayWeatherForecast-6I714FL1.mjs → component-HighwayWeatherForecast-BOIJfq4A.mjs} +5 -5
  46. package/dist/chunks/{component-IframeWeb-DDYUNdVl.mjs → component-IframeWeb-AY4Q0ia0.mjs} +1 -1
  47. package/dist/chunks/{component-ImageGeneration-C0K8D1lM.mjs → component-ImageGeneration-DAfTyLyu.mjs} +2 -2
  48. package/dist/chunks/{component-IntroducePic-Bzsjmjql.mjs → component-IntroducePic-DiUfku2j.mjs} +1 -1
  49. package/dist/chunks/{component-LithiumBatteryMiningArea-ClvF3vsD.mjs → component-LithiumBatteryMiningArea-BobKwz-s.mjs} +2 -2
  50. package/dist/chunks/{component-MapPopup-BnKmR10m.mjs → component-MapPopup-Ch1uebfw.mjs} +1 -1
  51. package/dist/chunks/{component-MaterialPreview-DG5VgGJp.mjs → component-MaterialPreview-BEHh4GhA.mjs} +1 -1
  52. package/dist/chunks/{component-PieLegend-Y_AZPS0g.mjs → component-PieLegend-Ba1nxWHs.mjs} +1 -1
  53. package/dist/chunks/{component-PrecipitationRanking-71G9U_UP.mjs → component-PrecipitationRanking-CqS0mbBa.mjs} +3 -3
  54. package/dist/chunks/{component-RadarChart-u6Xs1TTB.mjs → component-RadarChart-LMmMA6A7.mjs} +2 -2
  55. package/dist/chunks/{component-RadarLegend-9ahVi99l.mjs → component-RadarLegend-l9w9vr_f.mjs} +1 -1
  56. package/dist/chunks/{component-RadarShortTerm-wwvpXBvp.mjs → component-RadarShortTerm-DizH0quo.mjs} +4 -4
  57. package/dist/chunks/{component-RadarTime-BqkIprmh.mjs → component-RadarTime-BWDaw-iw.mjs} +2 -2
  58. package/dist/chunks/{component-RenderMarkdown-Cip_f4e8.mjs → component-RenderMarkdown-Clw2xqOC.mjs} +2 -2
  59. package/dist/chunks/{component-ReservoirLiveAlarm-D6fDm2mR.mjs → component-ReservoirLiveAlarm-R3RefHIi.mjs} +3 -3
  60. package/dist/chunks/{component-ServiceMaterial-DHdRLUhG.mjs → component-ServiceMaterial-Da0ILm9y.mjs} +2 -2
  61. package/dist/chunks/{component-ServiceMaterialsBtn-B6fjh9Bc.mjs → component-ServiceMaterialsBtn-B_6-YIc5.mjs} +2 -2
  62. package/dist/chunks/{component-StationDialog-DP9cwrI_.mjs → component-StationDialog-K1wrh7kx.mjs} +2 -2
  63. package/dist/chunks/{component-StationList-Cfmz5c3d.mjs → component-StationList-Dq-63LLt.mjs} +3 -3
  64. package/dist/chunks/{component-TimeBasedForecast-DIBNCv4O.mjs → component-TimeBasedForecast-YzCCWp9R.mjs} +4 -4
  65. package/dist/chunks/{component-Typhoon-4Oj6wl91.mjs → component-Typhoon-BX0ATGhX.mjs} +2 -2
  66. package/dist/chunks/{component-WarningLine-XjCN_f4w.mjs → component-WarningLine-DnjWVWan.mjs} +2 -2
  67. package/dist/chunks/{component-WarningSignal-DPUOC73O.mjs → component-WarningSignal-hmEQJo1P.mjs} +3 -3
  68. package/dist/chunks/{component-WeatherForecast-Cl3G0gZG.mjs → component-WeatherForecast-fjqJA4vE.mjs} +4 -4
  69. package/dist/chunks/{component-YCDataMonitor-Cmugq2Hc.mjs → component-YCDataMonitor-DAlpbqC8.mjs} +1 -1
  70. package/dist/chunks/{component-YCDataService-Veq9EEB6.mjs → component-YCDataService-ZZ9R5J61.mjs} +3 -3
  71. package/dist/chunks/{component-YCHighWaySummary-BfcLGdxr.mjs → component-YCHighWaySummary-NIrrN5ax.mjs} +2 -2
  72. package/dist/chunks/{component-YCHome-BgGFtVlS.mjs → component-YCHome-Bb3kim15.mjs} +3 -3
  73. package/dist/chunks/{component-YCHomeLegend-jG8vwIka.mjs → component-YCHomeLegend-Bz8x145l.mjs} +2 -2
  74. package/dist/chunks/{component-YCLoginNew-BKMD-5TL.mjs → component-YCLoginNew-DwcT8Oy-.mjs} +2 -2
  75. package/dist/chunks/component-YCServiceSummary-_oIWF2bg.mjs +1547 -0
  76. package/dist/components/HdMajorActivity/HdMajorActivity.vue.d.ts +0 -1
  77. package/dist/components/YCServiceSummary/YCServiceSummary.vue.d.ts +3 -1
  78. package/dist/components/YCServiceSummary/YCServiceSummaryMiningAreaRefineAnalysis.vue.d.ts +24 -0
  79. package/dist/components/YCServiceSummary/YCServiceSummaryMiningAreaTrafficAnalysis.vue.d.ts +24 -0
  80. package/dist/nxd-plugin.mjs +73 -73
  81. package/dist/styles/component-AiChat.css +1 -1
  82. package/dist/styles/component-HdMajorActivity.css +1 -1
  83. package/dist/styles/component-YCLoginNew.css +1 -1
  84. package/dist/styles/component-YCServiceSummary.css +1 -1
  85. package/package.json +1 -1
  86. package/dist/chunks/YCServiceSummary-D9qP6hLO.mjs +0 -2
  87. package/dist/chunks/component-YCServiceSummary-C2K81UiN.mjs +0 -869
@@ -0,0 +1,1547 @@
1
+ import { i as e, n as t, o as n } from "./component-AiChat-B4TFE3zE.mjs";
2
+ import { ElLoadingDirective as r } from "element-plus/es";
3
+ import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createStaticVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeProps as p, nextTick as m, normalizeClass as h, onBeforeUnmount as g, onMounted as _, openBlock as v, ref as y, renderList as b, toDisplayString as x, vModelText as S, watch as C, withDirectives as w } from "vue";
4
+ import * as T from "echarts";
5
+ import E from "axios";
6
+ //#region src/components/YCServiceSummary/YCAIChatPanel.vue?vue&type=script&setup=true&lang.ts
7
+ var D = { class: "YCAIChatPanel" }, O = {
8
+ key: 0,
9
+ class: "YCAIChatPanel-message-avatar"
10
+ }, k = { class: "YCAIChatPanel-message-body" }, A = {
11
+ key: 0,
12
+ class: "YCAIChatPanel-message-line"
13
+ }, j = ["innerHTML"], M = {
14
+ key: 0,
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({
17
+ __name: "YCAIChatPanel",
18
+ props: [
19
+ "appKey",
20
+ "appSalt",
21
+ "baseHttp",
22
+ "interfaceBaseHttp",
23
+ "onlyofficeCallbackUrl",
24
+ "username",
25
+ "password",
26
+ "ids",
27
+ "theme"
28
+ ],
29
+ setup(e) {
30
+ let r = e, u = [
31
+ "查数据",
32
+ "查知识",
33
+ "查材料"
34
+ ], d = y(null), f = y(null), p = y(""), C = y(!1), T = y(""), L = y(""), R = y(null), z = y([]), B = y(r.appKey || ""), V = null, H = y([{
35
+ role: "ai",
36
+ content: "已接入实况与预报数据,请问需要什么帮助?",
37
+ status: "end"
38
+ }]), U = a(() => z.value.length ? z.value.map((e) => ({
39
+ key: e.label,
40
+ label: e.label
41
+ })) : u.map((e) => ({
42
+ key: e,
43
+ label: e
44
+ }))), W = a(() => T.value && z.value.find((e) => e.label === T.value)?.list || []), ce = a(() => !!T.value && !!p.value.trim() && !C.value), le = a(() => T.value ? "请输入问题" : "请先选择类别"), ue = a(() => r.theme === "dark" ? new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAgMAAADQNkYNAAAACVBMVEVHcEz////////mcEUwAAAAAnRSTlMAfVgnwLkAAAD9SURBVHja7dmhDcMwAETRJmoNwks8QqcwLgrpEpnGuCjAJDdlyVXFH4RUd/yDF8WSJV+yLMuyLDtxtxUn26DFLDWYFKnDZJEGTKp08ESNJ50mGFOEMUUYM4ljNo6pwQQTTDDBBBNMMMEEE0wwp2KuK8Y8DoqZpAYxs9QBxvUOMYs0AIYkxpDEGJIYQxJjUGIMSYwhiTEkMQYlxjghGCcE44RgnCCME4JxQjBOCMYJwjghGCcE44RgnBDM0wnAvJ0AjFhSeVJ4MqHEGJ5UnhSeTE4wZiC5QDILJwtPKk+2P0oe+m3nX6yDH9Jr6HSJXBnvr+/WPANlWZZl2Yn7ANxo7eonko39AAAAAElFTkSuQmCC", "" + import.meta.url).href : new URL("data:image/png;base64,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", "" + import.meta.url).href);
45
+ _(() => {
46
+ de();
47
+ }), g(() => {
48
+ Z();
49
+ });
50
+ let de = async () => {
51
+ await fe(), await pe(), !T.value && U.value.length && K(U.value[0].key);
52
+ }, fe = async () => {
53
+ if (!r.username || !r.password) {
54
+ console.warn("[YCAIChatPanel] 未配置 username/password,跳过登录");
55
+ return;
56
+ }
57
+ try {
58
+ let e = (r.interfaceBaseHttp || r.baseHttp).replace(/\/$/, "").replace(/\/userCenter\/mobileBot$/, ""), t = await E.post(`${e}/userCenter/auth/login`, {
59
+ account: r.username,
60
+ password: r.password,
61
+ validToken: "SLIDER_external"
62
+ }), n = t.data?.data?.token || t.data?.token || "";
63
+ n && (B.value = n);
64
+ } catch (e) {
65
+ console.error("[YCAIChatPanel] 登录失败:", e);
66
+ }
67
+ }, G = (e) => Array.isArray(e) ? e : !e || typeof e != "object" ? null : e.output ?? e.list ?? e.items ?? e.children ?? e.data ?? e.records ?? null, pe = async () => {
68
+ let e = r.ids?.subMenu;
69
+ if (!e?.id) {
70
+ console.warn("[YCAIChatPanel] 未配置 subMenu 工作流 id");
71
+ return;
72
+ }
73
+ try {
74
+ let t = await n({
75
+ appKey: r.appKey,
76
+ appSalt: r.appSalt,
77
+ id: e.id,
78
+ variables: { newParam: "subMenu" },
79
+ baseHttp: r.baseHttp.replace(/\/$/, ""),
80
+ reqType: e.reqType || "post",
81
+ isFormData: e.isFormData ?? !1
82
+ }), i = t?.data?.result ?? t?.data;
83
+ if (typeof i == "string") try {
84
+ i = JSON.parse(i);
85
+ } catch {
86
+ i = null;
87
+ }
88
+ let a = G(i);
89
+ if (typeof a == "string") try {
90
+ a = JSON.parse(a);
91
+ } catch {
92
+ a = null;
93
+ }
94
+ if (a = G(a) || a, !Array.isArray(a) || !a.length) return;
95
+ z.value = a.map((e) => {
96
+ let t = G(e) || e?.list || [];
97
+ return {
98
+ label: (e.label || e.name || e.title || "").trim(),
99
+ list: (t || []).map((e) => ({
100
+ title: (e.title || e.name || e.label || "").trim(),
101
+ content: (e.content || e.value || e.text || "").trim(),
102
+ id: e.id
103
+ }))
104
+ };
105
+ }).filter((e) => e.label && e.label !== I);
106
+ } catch (e) {
107
+ console.error("[YCAIChatPanel] 获取菜单失败:", e);
108
+ }
109
+ }, K = (e) => {
110
+ T.value = e, L.value = e, R.value = null, p.value = "", m(() => $());
111
+ }, me = (e) => {
112
+ R.value = e, p.value = e.content || "", m(() => {
113
+ $(), d.value?.focus();
114
+ });
115
+ }, he = (e) => t(e || "").replace(/>\n+</g, "><"), q = async () => {
116
+ let e = p.value.trim(), t = T.value || L.value;
117
+ if (!(!e || !t || C.value)) {
118
+ T.value = t, L.value = t, C.value = !0, H.value.push({
119
+ role: "user",
120
+ content: e,
121
+ status: "end"
122
+ }), H.value.push({
123
+ role: "ai",
124
+ content: se,
125
+ status: "thinking"
126
+ }), p.value = "", m(() => {
127
+ $(), Q();
128
+ }), Z();
129
+ try {
130
+ R.value?.id ? await ge(e, R.value.id) : await _e(e);
131
+ } catch (e) {
132
+ console.error("[YCAIChatPanel] 发送失败:", e), Y("请求失败,请稍后重试", "error"), C.value = !1;
133
+ }
134
+ }
135
+ }, ge = async (e, t) => {
136
+ try {
137
+ let i = await n({
138
+ appKey: r.appKey,
139
+ appSalt: r.appSalt,
140
+ id: t,
141
+ variables: { newParam: e },
142
+ baseHttp: r.baseHttp.replace(/\/$/, ""),
143
+ reqType: "post",
144
+ isFormData: !1
145
+ }), a = i?.data?.result || i?.data;
146
+ Y((typeof a?.output == "string" ? a.output : "") || "暂无返回结果");
147
+ } catch (e) {
148
+ console.error("[YCAIChatPanel] 工作流请求失败:", e), Y("请求失败,请稍后重试", "error");
149
+ } finally {
150
+ C.value = !1;
151
+ }
152
+ }, _e = async (e) => {
153
+ let t = (r.interfaceBaseHttp || "").replace(/\/$/, "");
154
+ if (!t) {
155
+ Y("未配置 interfaceBaseHttp", "error"), C.value = !1;
156
+ return;
157
+ }
158
+ let n = {};
159
+ B.value && (n["aiflowy-token"] = B.value);
160
+ let i = Date.now();
161
+ try {
162
+ let r = (await E.post(`${t}/chat`, { content: e }, { headers: n })).data;
163
+ if (r?.errorCode !== void 0 && r?.errorCode !== 0 && r?.errorCode !== 200) throw Error(r?.message || "提交问题失败");
164
+ let a = r?.data?.taskId, o = r?.data?.intentName || "", s = r?.data?.status;
165
+ if (!a) throw Error("未获取到 taskId");
166
+ if (o && X(`正在思考【${o}】...`), s === "done") {
167
+ await J(a, t, n, i);
168
+ return;
169
+ }
170
+ V = setTimeout(() => J(a, t, n, i), F);
171
+ } catch (e) {
172
+ console.error("[YCAIChatPanel] mobileBot 对话失败:", e), Y("请求失败,请稍后重试", "error"), C.value = !1;
173
+ }
174
+ }, J = async (e, t, n, r) => {
175
+ if (Date.now() - r > oe) {
176
+ Y("查询超时,请稍后重试", "error"), C.value = !1, Z();
177
+ return;
178
+ }
179
+ try {
180
+ let i = (await E.get(`${t}/result/${e}`, { headers: n })).data;
181
+ if (i?.errorCode !== void 0 && i?.errorCode !== 0 && i?.errorCode !== 200) throw Error(i?.message || "查询结果失败");
182
+ let a = i?.data || {}, o = a.status, s = a.markdown;
183
+ if (o === "running") {
184
+ V = setTimeout(() => J(e, t, n, r), F);
185
+ return;
186
+ }
187
+ if (o === "fail") {
188
+ Y(s || "查询失败", "error"), C.value = !1, Z();
189
+ return;
190
+ }
191
+ Y(s || ""), C.value = !1, Z();
192
+ } catch (e) {
193
+ console.error("[YCAIChatPanel] 轮询结果失败:", e), Y("查询结果失败,请稍后重试", "error"), C.value = !1, Z();
194
+ }
195
+ }, Y = (e, t = "end") => {
196
+ H.value.push({
197
+ role: "ai",
198
+ content: e,
199
+ status: t
200
+ }), Q();
201
+ }, X = (e) => {
202
+ let t = H.value[H.value.length - 1];
203
+ !t || t.role !== "ai" || t.status !== "thinking" || (t.content = e, Q());
204
+ }, Z = () => {
205
+ V &&= (clearTimeout(V), null);
206
+ }, Q = async () => {
207
+ await m();
208
+ let e = f.value;
209
+ e && (e.scrollTop = e.scrollHeight);
210
+ }, $ = () => {
211
+ let e = d.value;
212
+ if (!e) return;
213
+ e.style.height = "auto", e.style.overflowY = "hidden";
214
+ let t = Math.min(e.scrollHeight, 300);
215
+ e.style.height = `${t}px`, e.style.overflowY = e.scrollHeight > 300 ? "auto" : "hidden";
216
+ }, ve = (e) => {
217
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), q());
218
+ };
219
+ return (e, t) => (v(), s("div", D, [
220
+ t[3] ||= l("<div class=\"YCAIChatPanel-head\" data-v-c958b0ae><div class=\"YCAIChatPanel-head-title\" data-v-c958b0ae><span class=\"YCAIChatPanel-head-icon\" data-v-c958b0ae></span><span data-v-c958b0ae>智能助手</span></div><div class=\"YCAIChatPanel-head-status\" data-v-c958b0ae><span class=\"YCAIChatPanel-head-dot\" data-v-c958b0ae></span><span data-v-c958b0ae>在线</span></div></div>", 1),
221
+ c("div", {
222
+ class: "YCAIChatPanel-messages",
223
+ ref_key: "messagesRef",
224
+ ref: f
225
+ }, [(v(!0), s(i, null, b(H.value, (e, n) => (v(), s("div", {
226
+ key: n,
227
+ class: h(["YCAIChatPanel-message", `YCAIChatPanel-message--${e.role}`])
228
+ }, [e.role === "ai" ? (v(), s("div", O, [...t[1] ||= [c("span", null, "AI", -1)]])) : o("", !0), c("div", k, [e.role === "user" ? (v(), s("div", A, x(e.content), 1)) : (v(), s("div", {
229
+ key: 1,
230
+ class: "YCAIChatPanel-message-line",
231
+ innerHTML: he(e.content)
232
+ }, null, 8, j))])], 2))), 128))], 512),
233
+ W.value.length ? (v(), s("div", M, [(v(!0), s(i, null, b(W.value, (e) => (v(), s("div", {
234
+ key: e.id || e.title,
235
+ class: "YCAIChatPanel-subMenu-item",
236
+ onClick: (t) => me(e)
237
+ }, [c("span", null, x(e.title), 1), c("img", {
238
+ class: "YCAIChatPanel-subMenu-arrow",
239
+ src: ue.value,
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", {
243
+ key: e.key,
244
+ class: h(["YCAIChatPanel-mainMenu-btn", { "is-active": T.value === e.key }]),
245
+ onClick: (t) => K(e.key)
246
+ }, x(e.label), 11, ne))), 128))]), c("div", re, [w(c("textarea", {
247
+ ref_key: "textareaRef",
248
+ ref: d,
249
+ "onUpdate:modelValue": t[0] ||= (e) => p.value = e,
250
+ class: "YCAIChatPanel-textarea",
251
+ placeholder: le.value,
252
+ rows: "1",
253
+ onInput: $,
254
+ onKeydown: ve
255
+ }, null, 40, ie), [[S, p.value]]), c("button", {
256
+ class: "YCAIChatPanel-send",
257
+ disabled: !ce.value,
258
+ onClick: q,
259
+ title: "发送"
260
+ }, [...t[2] ||= [c("svg", {
261
+ viewBox: "0 0 24 24",
262
+ width: "16",
263
+ height: "16",
264
+ fill: "currentColor"
265
+ }, [c("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })], -1)]], 8, ae)])])
266
+ ]));
267
+ }
268
+ }), [["__scopeId", "data-v-c958b0ae"]]), R = ["element-loading-background"], z = "#ff4d4f", B = "#52c41a", V = /* @__PURE__ */ e(/* @__PURE__ */ f({
269
+ __name: "YCServiceSummaryRefineAnalysis",
270
+ props: [
271
+ "appKey",
272
+ "appSalt",
273
+ "baseHttp",
274
+ "interfaceBaseHttp",
275
+ "onlyofficeCallbackUrl",
276
+ "username",
277
+ "password",
278
+ "ids",
279
+ "theme"
280
+ ],
281
+ setup(e) {
282
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
283
+ let e = o.value;
284
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
285
+ };
286
+ _(() => {
287
+ p(), window.addEventListener("resize", O);
288
+ }), g(() => {
289
+ window.removeEventListener("resize", O), l && l.dispose();
290
+ });
291
+ let p = async () => {
292
+ let e = t.ids?.road;
293
+ if (!e?.id) {
294
+ console.warn("[YCServiceSummaryRefineAnalysis] ids.road 未配置");
295
+ return;
296
+ }
297
+ u.value = !0;
298
+ try {
299
+ let r = (await n({
300
+ appKey: t.appKey,
301
+ appSalt: t.appSalt,
302
+ id: e.id,
303
+ variables: {},
304
+ baseHttp: t.baseHttp,
305
+ reqType: e.reqType,
306
+ isFormData: e.isFormData
307
+ }))?.data?.result?.ds;
308
+ if (typeof r == "string") try {
309
+ r = JSON.parse(r);
310
+ } catch {
311
+ r = null;
312
+ }
313
+ i.value = (Array.isArray(r) ? r : r?.data || []).map((e) => {
314
+ let t = S(e), n = t.iswarnrainfall_1h || t.iswarnrainfall_6h || t.iswarntemp || t.iswarnvis ? z : B;
315
+ return {
316
+ value: 1,
317
+ name: e.name,
318
+ itemStyle: { color: n },
319
+ warnTags: E(t)
320
+ };
321
+ }), await m(), D();
322
+ } catch (e) {
323
+ console.error("[YCServiceSummaryRefineAnalysis] 实况数据加载失败", e);
324
+ } finally {
325
+ u.value = !1;
326
+ }
327
+ }, h = (e) => {
328
+ let t = Number(e);
329
+ return t < 999999 && t > -999999;
330
+ }, b = (e, t, n) => e.find((e) => e?.[t] === 1 && h(e?.[n])) || e.find((e) => e?.[t] === 1), x = (e, t) => (e || []).find((e) => e?.zdzds?.[t] === 1), S = (e) => {
331
+ let t = e.zdzds || [], n = e.zhds || [], r = b(t, "iswarnpre", "rainfall_1h"), i = b(t, "iswarnpre_6", "rainfall_6h"), a = b(t, "iswarntemp", "temperature"), o = b(t, "iswarnvis", "visibility_min"), s = x(n, "iswarnpre"), c = x(n, "iswarnpre_6"), l = x(n, "iswarntemp"), u = x(n, "iswarnvis");
332
+ return {
333
+ iswarnrainfall_1h: r || s ? 1 : 0,
334
+ iswarnrainfall_6h: i || c ? 1 : 0,
335
+ iswarntemp: a || l ? 1 : 0,
336
+ iswarnvis: o || u ? 1 : 0
337
+ };
338
+ }, E = (e) => {
339
+ let t = [];
340
+ return (e.iswarnrainfall_1h === 1 || e.iswarnrainfall_6h === 1) && t.push("降水"), e.iswarntemp === 1 && t.push("温度"), e.iswarnvis === 1 && t.push("能见度"), t;
341
+ }, D = () => {
342
+ if (!o.value) return;
343
+ let e = f();
344
+ l ||= T.init(o.value), l.setOption({
345
+ tooltip: {
346
+ trigger: "item",
347
+ formatter: (e) => {
348
+ let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || B;
349
+ return t.length ? `${e?.name ?? ""} <span style="color:${n};">${t.join("、")}报警</span>` : `${e?.name ?? ""} <span style="color:${n};">正常</span>`;
350
+ }
351
+ },
352
+ series: [{
353
+ type: "pie",
354
+ radius: ["30%", "65%"],
355
+ center: ["50%", "50%"],
356
+ label: {
357
+ show: !0,
358
+ position: "outside",
359
+ fontSize: 11,
360
+ color: e,
361
+ formatter: "{b}"
362
+ },
363
+ labelLine: {
364
+ length: 10,
365
+ length2: 8
366
+ },
367
+ data: i.value
368
+ }]
369
+ });
370
+ };
371
+ C(() => t.theme, async () => {
372
+ await m(), D();
373
+ });
374
+ let O = () => {
375
+ l?.resize();
376
+ };
377
+ return (e, t) => {
378
+ let n = r;
379
+ return w((v(), s("div", {
380
+ class: "YCServiceSummaryRefineAnalysis",
381
+ "element-loading-background": d.value,
382
+ "element-loading-text": "加载中"
383
+ }, [c("div", {
384
+ class: "YCServiceSummaryRefineAnalysis-chart",
385
+ ref_key: "chartRef",
386
+ ref: o
387
+ }, null, 512)], 8, R)), [[n, u.value]]);
388
+ };
389
+ }
390
+ }), [["__scopeId", "data-v-118dfe5e"]]), H = ["element-loading-background"], U = "#ff4d4f", W = "#52c41a", ce = /* @__PURE__ */ e(/* @__PURE__ */ f({
391
+ __name: "YCServiceSummaryTrafficAnalysis",
392
+ props: [
393
+ "appKey",
394
+ "appSalt",
395
+ "baseHttp",
396
+ "interfaceBaseHttp",
397
+ "onlyofficeCallbackUrl",
398
+ "username",
399
+ "password",
400
+ "ids",
401
+ "theme"
402
+ ],
403
+ setup(e) {
404
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
405
+ let e = o.value;
406
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
407
+ };
408
+ _(() => {
409
+ p(), window.addEventListener("resize", S);
410
+ }), g(() => {
411
+ window.removeEventListener("resize", S), l && l.dispose();
412
+ });
413
+ let p = async () => {
414
+ let e = t.ids?.shortTerm;
415
+ if (!e?.id) {
416
+ console.warn("[YCServiceSummaryTrafficAnalysis] ids.shortTerm 未配置");
417
+ return;
418
+ }
419
+ u.value = !0;
420
+ try {
421
+ let r = (await n({
422
+ appKey: t.appKey,
423
+ appSalt: t.appSalt,
424
+ id: e.id,
425
+ variables: {},
426
+ baseHttp: t.baseHttp,
427
+ reqType: e.reqType,
428
+ isFormData: e.isFormData
429
+ }))?.data?.result?.ds;
430
+ if (typeof r == "string") try {
431
+ r = JSON.parse(r);
432
+ } catch {
433
+ r = null;
434
+ }
435
+ i.value = (Array.isArray(r) ? r : []).map((e) => {
436
+ let t = h(e), n = t.iswarnpre1h || t.iswarnpre2h || t.iswarnpre3h ? U : W;
437
+ return {
438
+ value: 1,
439
+ name: e.name,
440
+ itemStyle: { color: n },
441
+ warnTags: b(t)
442
+ };
443
+ }), await m(), x();
444
+ } catch (e) {
445
+ console.error("[YCServiceSummaryTrafficAnalysis] 预报数据加载失败", e);
446
+ } finally {
447
+ u.value = !1;
448
+ }
449
+ }, h = (e) => {
450
+ let t = e.zhflds || [];
451
+ return {
452
+ iswarnpre1h: t.some((e) => e?.iswarnpre1h === 1) ? 1 : 0,
453
+ iswarnpre2h: t.some((e) => e?.iswarnpre2h === 1) ? 1 : 0,
454
+ iswarnpre3h: t.some((e) => e?.iswarnpre3h === 1) ? 1 : 0
455
+ };
456
+ }, b = (e) => {
457
+ let t = [];
458
+ return e.iswarnpre1h === 1 && t.push("未来R1h"), e.iswarnpre2h === 1 && t.push("未来R2h"), e.iswarnpre3h === 1 && t.push("未来R3h"), t;
459
+ }, x = () => {
460
+ if (!o.value) return;
461
+ let e = f();
462
+ l ||= T.init(o.value), l.setOption({
463
+ tooltip: {
464
+ trigger: "item",
465
+ formatter: (e) => {
466
+ let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || W;
467
+ return t.length ? `${e?.name ?? ""} <span style="color:${n};">${t.join("、")}报警</span>` : `${e?.name ?? ""} <span style="color:${n};">正常</span>`;
468
+ }
469
+ },
470
+ series: [{
471
+ type: "pie",
472
+ radius: ["30%", "65%"],
473
+ center: ["50%", "50%"],
474
+ label: {
475
+ show: !0,
476
+ position: "outside",
477
+ fontSize: 11,
478
+ color: e,
479
+ formatter: "{b}"
480
+ },
481
+ labelLine: {
482
+ length: 10,
483
+ length2: 8
484
+ },
485
+ data: i.value
486
+ }]
487
+ });
488
+ };
489
+ C(() => t.theme, async () => {
490
+ await m(), x();
491
+ });
492
+ let S = () => {
493
+ l?.resize();
494
+ };
495
+ return (e, t) => {
496
+ let n = r;
497
+ return w((v(), s("div", {
498
+ class: "YCServiceSummaryTrafficAnalysis",
499
+ "element-loading-background": d.value,
500
+ "element-loading-text": "加载中"
501
+ }, [c("div", {
502
+ class: "YCServiceSummaryTrafficAnalysis-chart",
503
+ ref_key: "chartRef",
504
+ ref: o
505
+ }, null, 512)], 8, H)), [[n, u.value]]);
506
+ };
507
+ }
508
+ }), [["__scopeId", "data-v-ec9e589d"]]), le = ["element-loading-background"], ue = "#ff4d4f", de = "#52c41a", fe = /* @__PURE__ */ e(/* @__PURE__ */ f({
509
+ __name: "YCServiceSummaryGeologyRefineAnalysis",
510
+ props: [
511
+ "appKey",
512
+ "appSalt",
513
+ "baseHttp",
514
+ "interfaceBaseHttp",
515
+ "onlyofficeCallbackUrl",
516
+ "username",
517
+ "password",
518
+ "ids",
519
+ "theme"
520
+ ],
521
+ setup(e) {
522
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
523
+ let e = o.value;
524
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
525
+ };
526
+ _(() => {
527
+ p(), window.addEventListener("resize", x);
528
+ }), g(() => {
529
+ window.removeEventListener("resize", x), l && l.dispose();
530
+ });
531
+ let p = async () => {
532
+ let e = t.ids?.data;
533
+ if (!e?.id) {
534
+ console.warn("[YCServiceSummaryGeologyRefineAnalysis] ids.data 未配置");
535
+ return;
536
+ }
537
+ u.value = !0;
538
+ try {
539
+ let r = (await n({
540
+ appKey: t.appKey,
541
+ appSalt: t.appSalt,
542
+ id: e.id,
543
+ variables: {},
544
+ baseHttp: t.baseHttp,
545
+ reqType: e.reqType,
546
+ isFormData: e.isFormData
547
+ }))?.data?.result?.ds;
548
+ if (typeof r == "string") try {
549
+ r = JSON.parse(r);
550
+ } catch {
551
+ r = null;
552
+ }
553
+ let a = Array.isArray(r) ? r : r?.data || [], o = 0, s = 0;
554
+ a.forEach((e) => {
555
+ let t = e.dzzhds || [];
556
+ o += t.length, t.forEach((e) => {
557
+ h(e) && s++;
558
+ });
559
+ }), i.value = [{
560
+ value: o - s,
561
+ name: "正常",
562
+ itemStyle: { color: de }
563
+ }, {
564
+ value: s,
565
+ name: "报警",
566
+ itemStyle: { color: ue }
567
+ }], await m(), b();
568
+ } catch (e) {
569
+ console.error("[YCServiceSummaryGeologyRefineAnalysis] 实况数据加载失败", e);
570
+ } finally {
571
+ u.value = !1;
572
+ }
573
+ }, h = (e) => e?.iswarnpre === 1 || e?.iswarnpre_6 === 1, b = () => {
574
+ if (!o.value) return;
575
+ let e = f();
576
+ l ||= T.init(o.value), l.setOption({
577
+ tooltip: {
578
+ trigger: "item",
579
+ formatter: (e) => `${e?.name ?? ""}: ${e?.value ?? 0}个`
580
+ },
581
+ series: [{
582
+ type: "pie",
583
+ radius: ["30%", "65%"],
584
+ center: ["50%", "50%"],
585
+ label: {
586
+ show: !0,
587
+ position: "outside",
588
+ fontSize: 11,
589
+ color: e,
590
+ formatter: "{b}"
591
+ },
592
+ labelLine: {
593
+ length: 10,
594
+ length2: 8
595
+ },
596
+ data: i.value
597
+ }]
598
+ });
599
+ };
600
+ C(() => t.theme, async () => {
601
+ await m(), b();
602
+ });
603
+ let x = () => {
604
+ l?.resize();
605
+ };
606
+ return (e, t) => {
607
+ let n = r;
608
+ return w((v(), s("div", {
609
+ class: "YCServiceSummaryGeologyRefineAnalysis",
610
+ "element-loading-background": d.value,
611
+ "element-loading-text": "加载中"
612
+ }, [c("div", {
613
+ class: "YCServiceSummaryGeologyRefineAnalysis-chart",
614
+ ref_key: "chartRef",
615
+ ref: o
616
+ }, null, 512)], 8, le)), [[n, u.value]]);
617
+ };
618
+ }
619
+ }), [["__scopeId", "data-v-faed9df7"]]), G = ["element-loading-background"], pe = "#ff4d4f", K = "#52c41a", me = /* @__PURE__ */ e(/* @__PURE__ */ f({
620
+ __name: "YCServiceSummaryGeologyTrafficAnalysis",
621
+ props: [
622
+ "appKey",
623
+ "appSalt",
624
+ "baseHttp",
625
+ "interfaceBaseHttp",
626
+ "onlyofficeCallbackUrl",
627
+ "username",
628
+ "password",
629
+ "ids",
630
+ "theme"
631
+ ],
632
+ setup(e) {
633
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
634
+ let e = o.value;
635
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
636
+ };
637
+ _(() => {
638
+ p(), window.addEventListener("resize", S);
639
+ }), g(() => {
640
+ window.removeEventListener("resize", S), l && l.dispose();
641
+ });
642
+ let p = async () => {
643
+ let e = t.ids?.geologyShortTerm;
644
+ if (!e?.id) {
645
+ console.warn("[YCServiceSummaryGeologyTrafficAnalysis] ids.geologyShortTerm 未配置");
646
+ return;
647
+ }
648
+ u.value = !0;
649
+ try {
650
+ let r = (await n({
651
+ appKey: t.appKey,
652
+ appSalt: t.appSalt,
653
+ id: e.id,
654
+ variables: {},
655
+ baseHttp: t.baseHttp,
656
+ reqType: e.reqType,
657
+ isFormData: e.isFormData
658
+ }))?.data?.result?.ds;
659
+ if (typeof r == "string") try {
660
+ r = JSON.parse(r);
661
+ } catch {
662
+ r = null;
663
+ }
664
+ i.value = (Array.isArray(r) ? r : []).map((e) => {
665
+ let t = h(e), n = t.iswarnpre1h || t.iswarnpre2h || t.iswarnpre3h ? pe : K;
666
+ return {
667
+ value: 1,
668
+ name: e.name,
669
+ itemStyle: { color: n },
670
+ warnTags: b(t)
671
+ };
672
+ }), await m(), x();
673
+ } catch (e) {
674
+ console.error("[YCServiceSummaryGeologyTrafficAnalysis] 预报数据加载失败", e);
675
+ } finally {
676
+ u.value = !1;
677
+ }
678
+ }, h = (e) => {
679
+ let t = e.pointflds || [];
680
+ return {
681
+ iswarnpre1h: t.some((e) => e?.iswarnpre1h === 1) ? 1 : 0,
682
+ iswarnpre2h: t.some((e) => e?.iswarnpre2h === 1) ? 1 : 0,
683
+ iswarnpre3h: t.some((e) => e?.iswarnpre3h === 1) ? 1 : 0
684
+ };
685
+ }, b = (e) => {
686
+ let t = [];
687
+ return e.iswarnpre1h === 1 && t.push("未来R1h"), e.iswarnpre2h === 1 && t.push("未来R2h"), e.iswarnpre3h === 1 && t.push("未来R3h"), t;
688
+ }, x = () => {
689
+ if (!o.value) return;
690
+ let e = f();
691
+ l ||= T.init(o.value), l.setOption({
692
+ tooltip: {
693
+ trigger: "item",
694
+ formatter: (e) => {
695
+ let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || K;
696
+ return t.length ? `${e?.name ?? ""} <span style="color:${n};">${t.join("、")}报警</span>` : `${e?.name ?? ""} <span style="color:${n};">正常</span>`;
697
+ }
698
+ },
699
+ series: [{
700
+ type: "pie",
701
+ radius: ["30%", "65%"],
702
+ center: ["50%", "50%"],
703
+ label: {
704
+ show: !0,
705
+ position: "outside",
706
+ fontSize: 11,
707
+ color: e,
708
+ formatter: "{b}"
709
+ },
710
+ labelLine: {
711
+ length: 10,
712
+ length2: 8
713
+ },
714
+ data: i.value
715
+ }]
716
+ });
717
+ };
718
+ C(() => t.theme, async () => {
719
+ await m(), x();
720
+ });
721
+ let S = () => {
722
+ l?.resize();
723
+ };
724
+ return (e, t) => {
725
+ let n = r;
726
+ return w((v(), s("div", {
727
+ class: "YCServiceSummaryGeologyTrafficAnalysis",
728
+ "element-loading-background": d.value,
729
+ "element-loading-text": "加载中"
730
+ }, [c("div", {
731
+ class: "YCServiceSummaryGeologyTrafficAnalysis-chart",
732
+ ref_key: "chartRef",
733
+ ref: o
734
+ }, null, 512)], 8, G)), [[n, u.value]]);
735
+ };
736
+ }
737
+ }), [["__scopeId", "data-v-32323a02"]]), he = ["element-loading-background"], q = "#ff4d4f", ge = "#52c41a", _e = /* @__PURE__ */ e(/* @__PURE__ */ f({
738
+ __name: "YCServiceSummaryReservoirRefineAnalysis",
739
+ props: [
740
+ "appKey",
741
+ "appSalt",
742
+ "baseHttp",
743
+ "interfaceBaseHttp",
744
+ "onlyofficeCallbackUrl",
745
+ "username",
746
+ "password",
747
+ "ids",
748
+ "theme"
749
+ ],
750
+ setup(e) {
751
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
752
+ let e = o.value;
753
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
754
+ };
755
+ _(() => {
756
+ p(), window.addEventListener("resize", x);
757
+ }), g(() => {
758
+ window.removeEventListener("resize", x), l && l.dispose();
759
+ });
760
+ let p = async () => {
761
+ let e = t.ids?.reservoirData;
762
+ if (!e?.id) {
763
+ console.warn("[YCServiceSummaryReservoirRefineAnalysis] ids.reservoirData 未配置");
764
+ return;
765
+ }
766
+ u.value = !0;
767
+ try {
768
+ let r = (await n({
769
+ appKey: t.appKey,
770
+ appSalt: t.appSalt,
771
+ id: e.id,
772
+ variables: {},
773
+ baseHttp: t.baseHttp,
774
+ reqType: e.reqType,
775
+ isFormData: e.isFormData
776
+ }))?.data?.result?.ds;
777
+ if (typeof r == "string") try {
778
+ r = JSON.parse(r);
779
+ } catch {
780
+ r = null;
781
+ }
782
+ let a = Array.isArray(r) ? r : r?.data || [], o = 0, s = 0;
783
+ a.forEach((e) => {
784
+ let t = e.skzhds || [];
785
+ o += t.length, t.forEach((e) => {
786
+ h(e) && s++;
787
+ });
788
+ }), i.value = [{
789
+ value: o - s,
790
+ name: "正常",
791
+ itemStyle: { color: ge }
792
+ }, {
793
+ value: s,
794
+ name: "报警",
795
+ itemStyle: { color: q }
796
+ }], await m(), b();
797
+ } catch (e) {
798
+ console.error("[YCServiceSummaryReservoirRefineAnalysis] 实况数据加载失败", e);
799
+ } finally {
800
+ u.value = !1;
801
+ }
802
+ }, h = (e) => e?.iswarnpre === 1 || e?.iswarnpre_6 === 1, b = () => {
803
+ if (!o.value) return;
804
+ let e = f();
805
+ l ||= T.init(o.value), l.setOption({
806
+ tooltip: {
807
+ trigger: "item",
808
+ formatter: (e) => `${e?.name ?? ""}: ${e?.value ?? 0}个`
809
+ },
810
+ series: [{
811
+ type: "pie",
812
+ radius: ["30%", "65%"],
813
+ center: ["50%", "50%"],
814
+ label: {
815
+ show: !0,
816
+ position: "outside",
817
+ fontSize: 11,
818
+ color: e,
819
+ formatter: "{b}"
820
+ },
821
+ labelLine: {
822
+ length: 10,
823
+ length2: 8
824
+ },
825
+ data: i.value
826
+ }]
827
+ });
828
+ };
829
+ C(() => t.theme, async () => {
830
+ await m(), b();
831
+ });
832
+ let x = () => {
833
+ l?.resize();
834
+ };
835
+ return (e, t) => {
836
+ let n = r;
837
+ return w((v(), s("div", {
838
+ class: "YCServiceSummaryReservoirRefineAnalysis",
839
+ "element-loading-background": d.value,
840
+ "element-loading-text": "加载中"
841
+ }, [c("div", {
842
+ class: "YCServiceSummaryReservoirRefineAnalysis-chart",
843
+ ref_key: "chartRef",
844
+ ref: o
845
+ }, null, 512)], 8, he)), [[n, u.value]]);
846
+ };
847
+ }
848
+ }), [["__scopeId", "data-v-8d675142"]]), J = ["element-loading-background"], Y = "#ff4d4f", X = "#52c41a", Z = /* @__PURE__ */ e(/* @__PURE__ */ f({
849
+ __name: "YCServiceSummaryReservoirTrafficAnalysis",
850
+ props: [
851
+ "appKey",
852
+ "appSalt",
853
+ "baseHttp",
854
+ "interfaceBaseHttp",
855
+ "onlyofficeCallbackUrl",
856
+ "username",
857
+ "password",
858
+ "ids",
859
+ "theme"
860
+ ],
861
+ setup(e) {
862
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
863
+ let e = o.value;
864
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
865
+ };
866
+ _(() => {
867
+ p(), window.addEventListener("resize", S);
868
+ }), g(() => {
869
+ window.removeEventListener("resize", S), l && l.dispose();
870
+ });
871
+ let p = async () => {
872
+ let e = t.ids?.reservoirShortTerm;
873
+ if (!e?.id) {
874
+ console.warn("[YCServiceSummaryReservoirTrafficAnalysis] ids.reservoirShortTerm 未配置");
875
+ return;
876
+ }
877
+ u.value = !0;
878
+ try {
879
+ let r = (await n({
880
+ appKey: t.appKey,
881
+ appSalt: t.appSalt,
882
+ id: e.id,
883
+ variables: {},
884
+ baseHttp: t.baseHttp,
885
+ reqType: e.reqType,
886
+ isFormData: e.isFormData
887
+ }))?.data?.result?.ds;
888
+ if (typeof r == "string") try {
889
+ r = JSON.parse(r);
890
+ } catch {
891
+ r = null;
892
+ }
893
+ i.value = (Array.isArray(r) ? r : []).map((e) => {
894
+ let t = h(e), n = t.iswarnpre1h || t.iswarnpre2h || t.iswarnpre3h ? Y : X;
895
+ return {
896
+ value: 1,
897
+ name: e.name,
898
+ itemStyle: { color: n },
899
+ warnTags: b(t)
900
+ };
901
+ }), await m(), x();
902
+ } catch (e) {
903
+ console.error("[YCServiceSummaryReservoirTrafficAnalysis] 预报数据加载失败", e);
904
+ } finally {
905
+ u.value = !1;
906
+ }
907
+ }, h = (e) => {
908
+ let t = e.pointflds || [];
909
+ return {
910
+ iswarnpre1h: t.some((e) => e?.iswarnpre1h === 1) ? 1 : 0,
911
+ iswarnpre2h: t.some((e) => e?.iswarnpre2h === 1) ? 1 : 0,
912
+ iswarnpre3h: t.some((e) => e?.iswarnpre3h === 1) ? 1 : 0
913
+ };
914
+ }, b = (e) => {
915
+ let t = [];
916
+ return e.iswarnpre1h === 1 && t.push("未来R1h"), e.iswarnpre2h === 1 && t.push("未来R2h"), e.iswarnpre3h === 1 && t.push("未来R3h"), t;
917
+ }, x = () => {
918
+ if (!o.value) return;
919
+ let e = f();
920
+ l ||= T.init(o.value), l.setOption({
921
+ tooltip: {
922
+ trigger: "item",
923
+ formatter: (e) => {
924
+ let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || X;
925
+ return t.length ? `${e?.name ?? ""} <span style="color:${n};">${t.join("、")}报警</span>` : `${e?.name ?? ""} <span style="color:${n};">正常</span>`;
926
+ }
927
+ },
928
+ series: [{
929
+ type: "pie",
930
+ radius: ["30%", "65%"],
931
+ center: ["50%", "50%"],
932
+ label: {
933
+ show: !0,
934
+ position: "outside",
935
+ fontSize: 11,
936
+ color: e,
937
+ formatter: "{b}"
938
+ },
939
+ labelLine: {
940
+ length: 10,
941
+ length2: 8
942
+ },
943
+ data: i.value
944
+ }]
945
+ });
946
+ };
947
+ C(() => t.theme, async () => {
948
+ await m(), x();
949
+ });
950
+ let S = () => {
951
+ l?.resize();
952
+ };
953
+ return (e, t) => {
954
+ let n = r;
955
+ return w((v(), s("div", {
956
+ class: "YCServiceSummaryReservoirTrafficAnalysis",
957
+ "element-loading-background": d.value,
958
+ "element-loading-text": "加载中"
959
+ }, [c("div", {
960
+ class: "YCServiceSummaryReservoirTrafficAnalysis-chart",
961
+ ref_key: "chartRef",
962
+ ref: o
963
+ }, null, 512)], 8, J)), [[n, u.value]]);
964
+ };
965
+ }
966
+ }), [["__scopeId", "data-v-56bb4ef3"]]), Q = ["element-loading-background"], $ = "#ff4d4f", ve = "#52c41a", ye = /* @__PURE__ */ e(/* @__PURE__ */ f({
967
+ __name: "YCServiceSummaryMiningAreaRefineAnalysis",
968
+ props: [
969
+ "appKey",
970
+ "appSalt",
971
+ "baseHttp",
972
+ "interfaceBaseHttp",
973
+ "onlyofficeCallbackUrl",
974
+ "username",
975
+ "password",
976
+ "ids",
977
+ "theme"
978
+ ],
979
+ setup(e) {
980
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
981
+ let e = o.value;
982
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
983
+ };
984
+ _(() => {
985
+ h(), window.addEventListener("resize", x);
986
+ }), g(() => {
987
+ window.removeEventListener("resize", x), l && l.dispose();
988
+ });
989
+ let p = (e, t) => {
990
+ let n = (Array.isArray(e) ? e : []).find((e) => e?.category === t);
991
+ return Array.isArray(n?.area) ? n.area : [];
992
+ }, h = async () => {
993
+ let e = t.ids?.miningAreaCharts;
994
+ if (!e?.id) {
995
+ console.warn("[YCServiceSummaryMiningAreaRefineAnalysis] ids.miningAreaCharts 未配置");
996
+ return;
997
+ }
998
+ u.value = !0;
999
+ try {
1000
+ let r = await n({
1001
+ appKey: t.appKey,
1002
+ appSalt: t.appSalt,
1003
+ id: e.id,
1004
+ variables: {},
1005
+ baseHttp: t.baseHttp,
1006
+ reqType: e.reqType,
1007
+ isFormData: e.isFormData
1008
+ }), a = r?.data?.result?.output ?? r?.data?.result?.ds;
1009
+ if (typeof a == "string") try {
1010
+ a = JSON.parse(a);
1011
+ } catch {
1012
+ a = null;
1013
+ }
1014
+ i.value = p(a, "realTime").map((e) => {
1015
+ let t = e?.isWarn === !0;
1016
+ return {
1017
+ value: 1,
1018
+ name: e?.name || "",
1019
+ itemStyle: { color: t ? $ : ve },
1020
+ warn: t
1021
+ };
1022
+ }), await m(), b();
1023
+ } catch (e) {
1024
+ console.error("[YCServiceSummaryMiningAreaRefineAnalysis] 实况数据加载失败", e);
1025
+ } finally {
1026
+ u.value = !1;
1027
+ }
1028
+ }, b = () => {
1029
+ if (!o.value) return;
1030
+ let e = f();
1031
+ l ||= T.init(o.value), l.setOption({
1032
+ tooltip: {
1033
+ trigger: "item",
1034
+ formatter: (e) => {
1035
+ let t = e?.data?.warn, n = e?.data?.itemStyle?.color || ve;
1036
+ return `${e?.name ?? ""} <span style="color:${n};">${t ? "报警" : "正常"}</span>`;
1037
+ }
1038
+ },
1039
+ series: [{
1040
+ type: "pie",
1041
+ radius: ["30%", "65%"],
1042
+ center: ["50%", "50%"],
1043
+ label: {
1044
+ show: !0,
1045
+ position: "outside",
1046
+ fontSize: 11,
1047
+ color: e,
1048
+ formatter: "{b}"
1049
+ },
1050
+ labelLine: {
1051
+ length: 10,
1052
+ length2: 8
1053
+ },
1054
+ data: i.value
1055
+ }]
1056
+ });
1057
+ };
1058
+ C(() => t.theme, async () => {
1059
+ await m(), b();
1060
+ });
1061
+ let x = () => {
1062
+ l?.resize();
1063
+ };
1064
+ return (e, t) => {
1065
+ let n = r;
1066
+ return w((v(), s("div", {
1067
+ class: "YCServiceSummaryMiningAreaRefineAnalysis",
1068
+ "element-loading-background": d.value,
1069
+ "element-loading-text": "加载中"
1070
+ }, [c("div", {
1071
+ class: "YCServiceSummaryMiningAreaRefineAnalysis-chart",
1072
+ ref_key: "chartRef",
1073
+ ref: o
1074
+ }, null, 512)], 8, Q)), [[n, u.value]]);
1075
+ };
1076
+ }
1077
+ }), [["__scopeId", "data-v-42e03332"]]), be = ["element-loading-background"], xe = "#ff4d4f", Se = "#52c41a", Ce = /* @__PURE__ */ e(/* @__PURE__ */ f({
1078
+ __name: "YCServiceSummaryMiningAreaTrafficAnalysis",
1079
+ props: [
1080
+ "appKey",
1081
+ "appSalt",
1082
+ "baseHttp",
1083
+ "interfaceBaseHttp",
1084
+ "onlyofficeCallbackUrl",
1085
+ "username",
1086
+ "password",
1087
+ "ids",
1088
+ "theme"
1089
+ ],
1090
+ setup(e) {
1091
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
1092
+ let e = o.value;
1093
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
1094
+ };
1095
+ _(() => {
1096
+ h(), window.addEventListener("resize", x);
1097
+ }), g(() => {
1098
+ window.removeEventListener("resize", x), l && l.dispose();
1099
+ });
1100
+ let p = (e, t) => {
1101
+ let n = (Array.isArray(e) ? e : []).find((e) => e?.category === t);
1102
+ return Array.isArray(n?.area) ? n.area : [];
1103
+ }, h = async () => {
1104
+ let e = t.ids?.miningAreaCharts;
1105
+ if (!e?.id) {
1106
+ console.warn("[YCServiceSummaryMiningAreaTrafficAnalysis] ids.miningAreaCharts 未配置");
1107
+ return;
1108
+ }
1109
+ u.value = !0;
1110
+ try {
1111
+ let r = await n({
1112
+ appKey: t.appKey,
1113
+ appSalt: t.appSalt,
1114
+ id: e.id,
1115
+ variables: {},
1116
+ baseHttp: t.baseHttp,
1117
+ reqType: e.reqType,
1118
+ isFormData: e.isFormData
1119
+ }), a = r?.data?.result?.output ?? r?.data?.result?.ds;
1120
+ if (typeof a == "string") try {
1121
+ a = JSON.parse(a);
1122
+ } catch {
1123
+ a = null;
1124
+ }
1125
+ i.value = p(a, "forecast").map((e) => {
1126
+ let t = e?.isWarn === !0;
1127
+ return {
1128
+ value: 1,
1129
+ name: e?.name || "",
1130
+ itemStyle: { color: t ? xe : Se },
1131
+ warn: t
1132
+ };
1133
+ }), await m(), b();
1134
+ } catch (e) {
1135
+ console.error("[YCServiceSummaryMiningAreaTrafficAnalysis] 预报数据加载失败", e);
1136
+ } finally {
1137
+ u.value = !1;
1138
+ }
1139
+ }, b = () => {
1140
+ if (!o.value) return;
1141
+ let e = f();
1142
+ l ||= T.init(o.value), l.setOption({
1143
+ tooltip: {
1144
+ trigger: "item",
1145
+ formatter: (e) => {
1146
+ let t = e?.data?.warn, n = e?.data?.itemStyle?.color || Se;
1147
+ return `${e?.name ?? ""} <span style="color:${n};">${t ? "报警" : "正常"}</span>`;
1148
+ }
1149
+ },
1150
+ series: [{
1151
+ type: "pie",
1152
+ radius: ["30%", "65%"],
1153
+ center: ["50%", "50%"],
1154
+ label: {
1155
+ show: !0,
1156
+ position: "outside",
1157
+ fontSize: 11,
1158
+ color: e,
1159
+ formatter: "{b}"
1160
+ },
1161
+ labelLine: {
1162
+ length: 10,
1163
+ length2: 8
1164
+ },
1165
+ data: i.value
1166
+ }]
1167
+ });
1168
+ };
1169
+ C(() => t.theme, async () => {
1170
+ await m(), b();
1171
+ });
1172
+ let x = () => {
1173
+ l?.resize();
1174
+ };
1175
+ return (e, t) => {
1176
+ let n = r;
1177
+ return w((v(), s("div", {
1178
+ class: "YCServiceSummaryMiningAreaTrafficAnalysis",
1179
+ "element-loading-background": d.value,
1180
+ "element-loading-text": "加载中"
1181
+ }, [c("div", {
1182
+ class: "YCServiceSummaryMiningAreaTrafficAnalysis-chart",
1183
+ ref_key: "chartRef",
1184
+ ref: o
1185
+ }, null, 512)], 8, be)), [[n, u.value]]);
1186
+ };
1187
+ }
1188
+ }), [["__scopeId", "data-v-71365fd2"]]), we = { class: "YCServiceSummary-themeToggle" }, Te = { class: "YCServiceSummary-left" }, Ee = { class: "YCServiceSummary-statPanel" }, De = { class: "YCServiceSummary-statPanel-content" }, Oe = ["onClick"], ke = { class: "YCServiceSummary-statCard-label" }, Ae = { class: "YCServiceSummary-statCard-list" }, je = { class: "value" }, Me = { class: "YCServiceSummary-aiPanel" }, Ne = { class: "YCServiceSummary-aiPanel-head" }, Pe = { class: "YCServiceSummary-aiPanel-title" }, Fe = { class: "YCServiceSummary-aiPanel-summary" }, Ie = {
1189
+ key: 0,
1190
+ class: "YCServiceSummary-aiPanel-charts"
1191
+ }, Le = { class: "YCServiceSummary-aiPanel-chartItem" }, Re = { class: "YCServiceSummary-aiPanel-chartItem" }, ze = {
1192
+ key: 1,
1193
+ class: "YCServiceSummary-aiPanel-charts"
1194
+ }, Be = { class: "YCServiceSummary-aiPanel-chartItem" }, Ve = { class: "YCServiceSummary-aiPanel-chartItem" }, He = {
1195
+ key: 2,
1196
+ class: "YCServiceSummary-aiPanel-charts"
1197
+ }, Ue = { class: "YCServiceSummary-aiPanel-chartItem" }, We = { class: "YCServiceSummary-aiPanel-chartItem" }, Ge = {
1198
+ key: 3,
1199
+ class: "YCServiceSummary-aiPanel-charts"
1200
+ }, Ke = { class: "YCServiceSummary-aiPanel-chartItem" }, qe = { class: "YCServiceSummary-aiPanel-chartItem" }, Je = { class: "YCServiceSummary-material" }, Ye = { class: "YCServiceSummary-material-head" }, Xe = { class: "YCServiceSummary-material-title" }, Ze = { class: "YCServiceSummary-material-actions" }, Qe = { class: "YCServiceSummary-material-body" }, $e = ["src", "alt"], et = { class: "YCServiceSummary-right" }, tt = {
1201
+ key: 0,
1202
+ class: "YCServiceSummary-editorMask"
1203
+ }, nt = { class: "YCServiceSummary-editorDialog" }, rt = { class: "YCServiceSummary-editorDialog-head" }, it = { class: "YCServiceSummary-editorDialog-title" }, at = { class: "YCServiceSummary-editorDialog-body" }, ot = {
1204
+ key: 0,
1205
+ class: "YCServiceSummary-editorDialog-loading"
1206
+ }, st = {
1207
+ key: 1,
1208
+ class: "YCServiceSummary-editorDialog-error"
1209
+ }, ct = { class: "YCServiceSummary-editorDialog-errorText" }, lt = /* @__PURE__ */ e(/* @__PURE__ */ f({
1210
+ __name: "YCServiceSummary",
1211
+ props: [
1212
+ "appKey",
1213
+ "appSalt",
1214
+ "baseHttp",
1215
+ "interfaceBaseHttp",
1216
+ "onlyofficeCallbackUrl",
1217
+ "username",
1218
+ "password",
1219
+ "ids",
1220
+ "showEditBtn"
1221
+ ],
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]) => ({
1224
+ label: e.includes(":") ? e : `${e}:`,
1225
+ value: String(t)
1226
+ })), P = () => {
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 || "");
1229
+ };
1230
+ C(l, () => {
1231
+ P();
1232
+ });
1233
+ let ne = async () => {
1234
+ let e = t.ids?.baseData;
1235
+ if (!e?.id) {
1236
+ console.warn("[YCServiceSummary] ids.baseData 未配置");
1237
+ return;
1238
+ }
1239
+ try {
1240
+ let i = (await n({
1241
+ appKey: t.appKey,
1242
+ appSalt: t.appSalt,
1243
+ id: e.id,
1244
+ variables: {},
1245
+ baseHttp: t.baseHttp,
1246
+ reqType: e.reqType,
1247
+ isFormData: e.isFormData
1248
+ }))?.data?.result?.output;
1249
+ if (!Array.isArray(i) || i.length === 0) {
1250
+ console.warn("[YCServiceSummary] baseData 返回为空");
1251
+ return;
1252
+ }
1253
+ r.value = i.map((e) => ({
1254
+ title: e.分类 || "",
1255
+ rows: te(e.数据),
1256
+ warnInfo: e.预警信息 || "",
1257
+ workUrl: e.workUrl || "",
1258
+ imgUrl: e.imgUrl || ""
1259
+ })), l.value = 0, P();
1260
+ } catch (e) {
1261
+ console.error("[YCServiceSummary] baseData 加载失败", e);
1262
+ }
1263
+ };
1264
+ _(() => {
1265
+ ne();
1266
+ });
1267
+ let re = (e) => e ? /^(https?:)?\/\//i.test(e) || e.startsWith("data:") || !t.baseHttp ? e : t.baseHttp.replace(/\/$/, "") + (e.startsWith("/") ? e : `/${e}`) : "", ie = (e) => {
1268
+ let t = (e || "docx").toLowerCase();
1269
+ return [
1270
+ "xls",
1271
+ "xlsx",
1272
+ "xlsm",
1273
+ "xlt",
1274
+ "xltx",
1275
+ "xltm",
1276
+ "ods",
1277
+ "fods",
1278
+ "ots",
1279
+ "csv"
1280
+ ].includes(t) ? "excel" : [
1281
+ "ppt",
1282
+ "pptx",
1283
+ "pptm",
1284
+ "pps",
1285
+ "ppsx",
1286
+ "ppsm",
1287
+ "pot",
1288
+ "potx",
1289
+ "potm",
1290
+ "odp",
1291
+ "fodp",
1292
+ "otp"
1293
+ ].includes(t) ? "ppt" : t === "pdf" ? "pdf" : "word";
1294
+ }, ae = () => new Promise((e, t) => {
1295
+ if (window.DocsAPI?.DocEditor) {
1296
+ e();
1297
+ return;
1298
+ }
1299
+ let n = Date.now(), r = () => {
1300
+ if (window.DocsAPI?.DocEditor) {
1301
+ e();
1302
+ return;
1303
+ }
1304
+ if (Date.now() - n > 1e4) {
1305
+ t(/* @__PURE__ */ Error("OnlyOffice API 未就绪,请在 HTML 中引入 api.js"));
1306
+ return;
1307
+ }
1308
+ setTimeout(r, 100);
1309
+ };
1310
+ r();
1311
+ }), F = async () => {
1312
+ let e = j.value;
1313
+ if (e) {
1314
+ k.value = !0, A.value = "";
1315
+ try {
1316
+ await ae();
1317
+ let n = window.DocsAPI;
1318
+ if (!n?.DocEditor) {
1319
+ A.value = "OnlyOffice API 不可用,请检查服务地址和代理";
1320
+ return;
1321
+ }
1322
+ let r = encodeURI(re(D.value));
1323
+ if (!r) {
1324
+ A.value = "文件地址为空";
1325
+ return;
1326
+ }
1327
+ let i = (N.value.split(".").pop() || "docx").toLowerCase(), a = `yc-onlyoffice-editor-${Date.now()}`;
1328
+ if (M) {
1329
+ try {
1330
+ M.destroyEditor();
1331
+ } catch (e) {
1332
+ console.warn("[YCServiceSummary] 销毁旧 OnlyOffice 编辑器失败:", e);
1333
+ }
1334
+ M = null;
1335
+ }
1336
+ e.innerHTML = "";
1337
+ let o = document.createElement("div");
1338
+ o.id = a, o.style.width = "100%", o.style.height = "100%", e.appendChild(o);
1339
+ let s = {
1340
+ type: "desktop",
1341
+ width: "100%",
1342
+ height: "100%",
1343
+ documentType: ie(i),
1344
+ document: {
1345
+ title: N.value || "文档",
1346
+ url: r,
1347
+ fileType: i,
1348
+ key: `yc_${Date.now()}_${Math.random().toString(36).slice(2)}`,
1349
+ permissions: {
1350
+ edit: !0,
1351
+ download: !0,
1352
+ print: !0,
1353
+ comment: !0,
1354
+ review: !1,
1355
+ modifyFilter: !0,
1356
+ modifyContentControl: !0,
1357
+ fillForms: !0,
1358
+ copy: !0,
1359
+ editCommentAuthorOnly: !1,
1360
+ deleteCommentAuthorOnly: !1
1361
+ }
1362
+ },
1363
+ editorConfig: {
1364
+ callbackUrl: t.onlyofficeCallbackUrl,
1365
+ mode: "edit",
1366
+ lang: "zh-CN",
1367
+ user: {
1368
+ id: t.username || "user1",
1369
+ name: t.username || "User"
1370
+ },
1371
+ customization: {
1372
+ forcesave: !0,
1373
+ autosave: !0,
1374
+ submitForm: !0,
1375
+ toolbar: !0,
1376
+ statusBar: !0,
1377
+ zoom: 100,
1378
+ spellcheck: !0,
1379
+ help: !0,
1380
+ compactToolbar: !1,
1381
+ showReviewChanges: !0,
1382
+ commentAuthorOnly: !1,
1383
+ leftMenu: !0,
1384
+ rightMenu: !0,
1385
+ hideRightMenu: !1,
1386
+ hideLeftMenu: !1,
1387
+ showComments: !0,
1388
+ showShareButton: !0,
1389
+ showHelpButton: !0,
1390
+ showFeedback: !0,
1391
+ enableMacros: !1,
1392
+ enablePlugins: !1,
1393
+ enableRightsManagement: !1,
1394
+ openInNewWindow: !1,
1395
+ saveFormat: i
1396
+ },
1397
+ permissions: {
1398
+ comment: !0,
1399
+ download: !0,
1400
+ edit: !0,
1401
+ print: !0,
1402
+ review: !0
1403
+ }
1404
+ },
1405
+ events: {
1406
+ onReady: () => {
1407
+ k.value = !1;
1408
+ },
1409
+ onAppReady: () => {
1410
+ k.value = !1;
1411
+ },
1412
+ 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
+ },
1415
+ onWarning: (e) => {
1416
+ console.warn("[YCServiceSummary] OnlyOffice onWarning:", e);
1417
+ }
1418
+ }
1419
+ };
1420
+ try {
1421
+ M = new n.DocEditor(a, s);
1422
+ } catch (e) {
1423
+ console.error("[YCServiceSummary] new DocEditor 抛出异常:", e), A.value = "OnlyOffice 编辑器创建失败";
1424
+ }
1425
+ } catch (e) {
1426
+ console.error("[YCServiceSummary] 初始化 OnlyOffice 失败:", e), A.value = `打开文档失败:${e instanceof Error ? e.message : String(e)}`;
1427
+ } finally {
1428
+ A.value && (k.value = !1);
1429
+ }
1430
+ }
1431
+ }, oe = () => {
1432
+ O.value = !0, m(() => F());
1433
+ }, se = () => {
1434
+ if (M) {
1435
+ try {
1436
+ M.destroyEditor();
1437
+ } catch (e) {
1438
+ console.warn("[YCServiceSummary] 销毁 OnlyOffice 编辑器失败:", e);
1439
+ }
1440
+ M = null;
1441
+ }
1442
+ j.value && (j.value.innerHTML = ""), O.value = !1, k.value = !1, A.value = "";
1443
+ }, I = () => {
1444
+ let e = re(D.value);
1445
+ if (!e) return;
1446
+ 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();
1450
+ };
1451
+ return (e, n) => (v(), s("div", { class: h(["YCServiceSummary", { "is-dark": S.value }]) }, [
1452
+ c("div", we, [c("button", {
1453
+ class: h(["YCServiceSummary-themeBtn", { "is-active": !S.value }]),
1454
+ onClick: n[0] ||= (e) => S.value = !1,
1455
+ title: "浅色"
1456
+ }, [...n[4] ||= [c("svg", {
1457
+ viewBox: "0 0 24 24",
1458
+ width: "12",
1459
+ height: "12",
1460
+ fill: "currentColor"
1461
+ }, [c("path", { d: "M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V22h-2v5.45zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z" })], -1), u(" 浅色 ", -1)]], 2), c("button", {
1462
+ class: h(["YCServiceSummary-themeBtn", { "is-active": S.value }]),
1463
+ onClick: n[1] ||= (e) => S.value = !0,
1464
+ title: "深色"
1465
+ }, [...n[5] ||= [c("svg", {
1466
+ viewBox: "0 0 24 24",
1467
+ width: "12",
1468
+ height: "12",
1469
+ fill: "currentColor"
1470
+ }, [c("path", { d: "M9 2c-1.05 0-2.05.16-3 .46 1.69 1.2 2.86 3.06 2.86 5.21 0 3.58-2.9 6.48-6.48 6.48-.63 0-1.25-.09-1.83-.26.52 2.64 2.28 4.85 4.59 5.93C7.21 21.22 9.46 22 12 22c5.52 0 10-4.48 10-10S17.52 2 12 2c-1 0-1.97.15-2.89.42C8.43 2.15 8.73 2 9 2z" })], -1), u(" 深色 ", -1)]], 2)]),
1471
+ c("div", Te, [
1472
+ c("div", Ee, [n[7] ||= c("div", { class: "YCServiceSummary-statPanel-title" }, "宜春气象服务", -1), c("div", De, [(v(!0), s(i, null, b(r.value, (e, t) => (v(), s("div", {
1473
+ key: e.title,
1474
+ class: h(["YCServiceSummary-statCard", { "is-active": l.value === t }]),
1475
+ onClick: (e) => l.value = t
1476
+ }, [c("div", ke, [n[6] ||= c("span", { class: "dot" }, null, -1), u(" " + x(e.title), 1)]), c("div", Ae, [(v(!0), s(i, null, b(e.rows, (e) => (v(), s("div", {
1477
+ key: e.label,
1478
+ class: "row"
1479
+ }, [c("span", null, x(e.label), 1), c("span", je, x(e.value), 1)]))), 128))])], 10, Oe))), 128))])]),
1480
+ c("div", Me, [
1481
+ c("div", Ne, [c("div", Pe, [n[8] ||= c("span", { class: "icon" }, null, -1), u(" " + x(f.value) + " AI 分析 ", 1)])]),
1482
+ n[17] ||= c("div", { class: "YCServiceSummary-aiPanel-warningTitle" }, "预警信号", -1),
1483
+ c("div", Fe, x(g.value), 1),
1484
+ f.value === "公路气象服务" ? (v(), s("div", Ie, [c("div", Le, [n[9] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "高速公路实况状态", -1), d(V, p(t, { theme: S.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", Re, [n[10] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "高速公路预报状态", -1), d(ce, p(t, { theme: S.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0),
1485
+ f.value === "地质灾害风险分析服务" ? (v(), s("div", ze, [c("div", Be, [n[11] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "地质灾害实况报警", -1), d(fe, p(t, { theme: S.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", Ve, [n[12] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "地质灾害预报报警", -1), d(me, p(t, { theme: S.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0),
1486
+ f.value === "水库灾害风险分析服务" ? (v(), s("div", He, [c("div", Ue, [n[13] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "水库灾害实况报警", -1), d(_e, p(t, { theme: S.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", We, [n[14] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "水库灾害预报报警", -1), d(Z, p(t, { theme: S.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0),
1487
+ f.value === "锂电矿区气象服务" ? (v(), s("div", Ge, [c("div", Ke, [n[15] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "锂电矿区实况预警", -1), d(ye, p(t, { theme: S.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", qe, [n[16] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "锂电矿区预报报警", -1), d(Ce, p(t, { theme: S.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0)
1488
+ ]),
1489
+ c("div", Je, [c("div", Ye, [c("span", Xe, x(E.value), 1), c("div", Ze, [w.value ? (v(), s("button", {
1490
+ key: 0,
1491
+ class: "YCServiceSummary-material-btn YCServiceSummary-material-btn--edit",
1492
+ onClick: n[2] ||= (e) => R("edit")
1493
+ }, [...n[18] ||= [c("svg", {
1494
+ viewBox: "0 0 24 24",
1495
+ width: "12",
1496
+ height: "12",
1497
+ fill: "currentColor"
1498
+ }, [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
+ class: "YCServiceSummary-material-btn YCServiceSummary-material-btn--download",
1500
+ onClick: n[3] ||= (e) => R("download")
1501
+ }, [...n[19] ||= [c("svg", {
1502
+ viewBox: "0 0 24 24",
1503
+ width: "12",
1504
+ height: "12",
1505
+ fill: "currentColor"
1506
+ }, [c("path", { d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" })], -1), u(" 下载 ", -1)]])])]), c("div", Qe, [(v(!0), s(i, null, b(T.value, (e, t) => (v(), s("img", {
1507
+ key: t,
1508
+ class: "YCServiceSummary-material-image",
1509
+ src: e,
1510
+ alt: E.value
1511
+ }, null, 8, $e))), 128))])])
1512
+ ]),
1513
+ 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
+ class: "YCServiceSummary-editorDialog-btn",
1516
+ onClick: I
1517
+ }, [...n[20] ||= [c("svg", {
1518
+ viewBox: "0 0 24 24",
1519
+ width: "12",
1520
+ height: "12",
1521
+ fill: "currentColor"
1522
+ }, [c("path", { d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" })], -1), u(" 下载 ", -1)]]), c("button", {
1523
+ class: "YCServiceSummary-editorDialog-close",
1524
+ title: "关闭",
1525
+ onClick: se
1526
+ }, [...n[21] ||= [c("svg", {
1527
+ viewBox: "0 0 24 24",
1528
+ width: "14",
1529
+ height: "14",
1530
+ fill: "currentColor"
1531
+ }, [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
+ c("div", {
1533
+ ref_key: "onlyofficeContainerRef",
1534
+ ref: j,
1535
+ class: "YCServiceSummary-editorDialog-container"
1536
+ }, 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", {
1539
+ class: "YCServiceSummary-editorDialog-retryBtn",
1540
+ onClick: F
1541
+ }, "重试")])) : o("", !0)
1542
+ ])])])) : o("", !0)
1543
+ ], 2));
1544
+ }
1545
+ }), [["__scopeId", "data-v-97f2834f"]]);
1546
+ //#endregion
1547
+ export { lt as t };