nxd-plugin 1.7.82 → 1.7.84

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 (100) hide show
  1. package/dist/chunks/{component-AiChat-BU0rzEqA.mjs → component-AiChat-BXNBLM1G.mjs} +382 -342
  2. package/dist/chunks/{component-AqiMonitor-B0X5SmQB.mjs → component-AqiMonitor-C_V1Nuf_.mjs} +1 -1
  3. package/dist/chunks/{component-ChartCumulativePre-D50ZlxtD.mjs → component-ChartCumulativePre-Bo28Bgaa.mjs} +2 -2
  4. package/dist/chunks/{component-ChartServiceMaterial-D35UWUD8.mjs → component-ChartServiceMaterial-DELVCsKj.mjs} +2 -2
  5. package/dist/chunks/{component-Duty-CuVSfL6B.mjs → component-Duty-dyZZ4vHt.mjs} +2 -2
  6. package/dist/chunks/{component-EarlyWarningStatistic-DBLY754e.mjs → component-EarlyWarningStatistic-CBJfrRsV.mjs} +2 -2
  7. package/dist/chunks/component-Forecast72h-BkVZSGhE.mjs +427 -0
  8. package/dist/chunks/{component-GeologyLiveAlarm-BGqrl_n2.mjs → component-GeologyLiveAlarm-B9jBWXf0.mjs} +2 -2
  9. package/dist/chunks/component-HdForecastProducts-D4x_Y0OB.mjs +211 -0
  10. package/dist/chunks/component-HdHeatService-Bf9XH3DP.mjs +412 -0
  11. package/dist/chunks/component-HdObservation-CM6HUrQ3.mjs +606 -0
  12. package/dist/chunks/component-HdPreSituation-CJ8-wiRO.mjs +639 -0
  13. package/dist/chunks/component-HdRadarTime-C4ZArOUM.mjs +461 -0
  14. package/dist/chunks/component-HdSeaCase-3-YFxSuM.mjs +219 -0
  15. package/dist/chunks/component-HdServiceMarterial-pSFQUH2x.mjs +316 -0
  16. package/dist/chunks/component-HdServiceRequirements-BjuiyyC5.mjs +142 -0
  17. package/dist/chunks/component-HdStationTem-Dit7Y8lu.mjs +573 -0
  18. package/dist/chunks/component-HdSuggestion-B_abfzRO.mjs +161 -0
  19. package/dist/chunks/component-HdThreeWeatherTrend-B2qzvOzb.mjs +372 -0
  20. package/dist/chunks/component-HdWaveForcast-D8UZrHzF.mjs +269 -0
  21. package/dist/chunks/{component-HighQuality-B-DNdjF7.mjs → component-HighQuality-1iqLOQAF.mjs} +3 -3
  22. package/dist/chunks/{component-HighWayEarlyWarningRed-DM_NXOxS.mjs → component-HighWayEarlyWarningRed-DlgG9rTx.mjs} +907 -759
  23. package/dist/chunks/{component-HighWayFreeze-Dldul9ds.mjs → component-HighWayFreeze-CCp1Rxpz.mjs} +2 -2
  24. package/dist/chunks/{component-HighwayLiveAlarm-7T0XNRUb.mjs → component-HighwayLiveAlarm-D7PKi5rG.mjs} +2 -2
  25. package/dist/chunks/{component-HighwayLiveAlarmNew-ClsfDywn.mjs → component-HighwayLiveAlarmNew-rH59lsj8.mjs} +3 -3
  26. package/dist/chunks/{component-HighwayStations-u3R83AXH.mjs → component-HighwayStations-DGt6Gsr9.mjs} +2 -2
  27. package/dist/chunks/{component-HighwayWeatherForecast-CHJuEi1V.mjs → component-HighwayWeatherForecast-BQrNGF7m.mjs} +73 -130
  28. package/dist/chunks/{component-IframeWeb-B_RCXBBe.mjs → component-IframeWeb-vLIWvbJY.mjs} +1 -1
  29. package/dist/chunks/{component-ImageGeneration-5zGtULQL.mjs → component-ImageGeneration-BtM7MHcE.mjs} +1 -1
  30. package/dist/chunks/{component-IntroducePic-DPf4yYOb.mjs → component-IntroducePic-D3FSEuKX.mjs} +1 -1
  31. package/dist/chunks/{component-LithiumBatteryMiningArea-D7EdisGO.mjs → component-LithiumBatteryMiningArea-B5aUe7T0.mjs} +2 -2
  32. package/dist/chunks/{component-MapPopup-pePSM1pe.mjs → component-MapPopup-UmWWAPBE.mjs} +1 -1
  33. package/dist/chunks/{component-MaterialPreview-CvHyZKau.mjs → component-MaterialPreview-1Hyl4bjM.mjs} +2 -2
  34. package/dist/chunks/{component-PieLegend-C_KQgtb2.mjs → component-PieLegend-C0Acehix.mjs} +1 -1
  35. package/dist/chunks/component-PrecipitationRanking-C63n87WI.mjs +658 -0
  36. package/dist/chunks/{component-RadarChart-Dkkpc2ex.mjs → component-RadarChart-BXfMyPPi.mjs} +2 -2
  37. package/dist/chunks/{component-RadarLegend-Bmyx7Z82.mjs → component-RadarLegend-B2ajP_0M.mjs} +1 -1
  38. package/dist/chunks/{component-RadarShortTerm-DNpfS5yC.mjs → component-RadarShortTerm-BeGEjbHr.mjs} +4 -4
  39. package/dist/chunks/{component-RadarTime-CBk6AMiD.mjs → component-RadarTime-DGRztCiR.mjs} +2 -2
  40. package/dist/chunks/{component-RenderMarkdown-DFiXNere.mjs → component-RenderMarkdown-Dv-UVGrS.mjs} +2 -2
  41. package/dist/chunks/{component-ReservoirLiveAlarm-DCzzEJ4U.mjs → component-ReservoirLiveAlarm-CRgl_ztt.mjs} +3 -3
  42. package/dist/chunks/{component-ServiceMaterial-CXBQpfHK.mjs → component-ServiceMaterial-BTWYke8W.mjs} +2 -2
  43. package/dist/chunks/{component-ServiceMaterialsBtn-CPZzLZl_.mjs → component-ServiceMaterialsBtn-CTWGd-Is.mjs} +1 -1
  44. package/dist/chunks/component-StationDialog-Ck8zd52d.mjs +956 -0
  45. package/dist/chunks/component-StationList-BvoVJwAU.mjs +337 -0
  46. package/dist/chunks/{component-TimeBasedForecast-WVO8WY-h.mjs → component-TimeBasedForecast-BaPiit4s.mjs} +36 -36
  47. package/dist/chunks/{component-WarningLine-BCPm8Eve.mjs → component-WarningLine-CcFfVzar.mjs} +2 -2
  48. package/dist/chunks/{component-WarningSignal-C2RJ8N64.mjs → component-WarningSignal-C0CnTLVH.mjs} +3 -3
  49. package/dist/chunks/component-WeatherForecast-DWdNramU.mjs +229 -0
  50. package/dist/chunks/{component-YCDataMonitor-Dx7ASmGD.mjs → component-YCDataMonitor-DPMFqIFB.mjs} +108 -110
  51. package/dist/chunks/{component-YCDataService-mj2SUWBC.mjs → component-YCDataService-CD042ss7.mjs} +4 -4
  52. package/dist/chunks/{component-YCHome-CUcEZHuo.mjs → component-YCHome-DjpIzt-5.mjs} +4 -4
  53. package/dist/chunks/{component-YCHomeLegend-DK6WU8YQ.mjs → component-YCHomeLegend-B-nlePS2.mjs} +1 -1
  54. package/dist/chunks/{component-YCLoginNew-D2RInKrk.mjs → component-YCLoginNew-Bx2LoLJz.mjs} +3 -3
  55. package/dist/components/AiChat/AiChat.vue.d.ts +0 -2
  56. package/dist/components/Forecast72h/Forecast72h.vue.d.ts +50 -0
  57. package/dist/components/HdForecastProducts/HdForecastProducts.vue.d.ts +49 -0
  58. package/dist/components/HdHeatService/HdHeatService.vue.d.ts +56 -0
  59. package/dist/components/HdObservation/HdObservation.vue.d.ts +43 -0
  60. package/dist/components/HdPreSituation/HdPreSituation.vue.d.ts +61 -0
  61. package/dist/components/HdQxServiceEffects/HdQxServiceEffects.vue.d.ts +59 -0
  62. package/dist/components/HdRadarTime/HdRadarTime.vue.d.ts +71 -0
  63. package/dist/components/HdSeaCase/HdSeaCase.vue.d.ts +46 -0
  64. package/dist/components/HdServiceMarterial/HdServiceMarterial.vue.d.ts +54 -0
  65. package/dist/components/HdServiceRequirements/HdServiceRequirements.vue.d.ts +51 -0
  66. package/dist/components/HdStationTem/HdStationTem.vue.d.ts +69 -0
  67. package/dist/components/HdSuggestion/HdSuggestion.vue.d.ts +49 -0
  68. package/dist/components/HdThreeWeatherTrend/HdThreeWeatherTrend.vue.d.ts +71 -0
  69. package/dist/components/HdWaveForcast/HdWaveForcast.vue.d.ts +70 -0
  70. package/dist/components/HighWayEarlyWarningRed/Call.vue.d.ts +18 -0
  71. package/dist/components/HighWayEarlyWarningRed/HighWayEarlyWarningRed.vue.d.ts +5 -0
  72. package/dist/components/PrecipitationRanking/PrecipitationRanking.vue.d.ts +62 -0
  73. package/dist/components/StationDialog/StationDialog.vue.d.ts +90 -0
  74. package/dist/components/StationList/StationList.vue.d.ts +64 -0
  75. package/dist/components/WeatherForecast/WeatherForecast.vue.d.ts +9 -0
  76. package/dist/index.d.ts +18 -1
  77. package/dist/nxd-plugin.mjs +56 -40
  78. package/dist/styles/component-Forecast72h.css +1 -0
  79. package/dist/styles/component-HdForecastProducts.css +1 -0
  80. package/dist/styles/component-HdHeatService.css +1 -0
  81. package/dist/styles/component-HdObservation.css +1 -0
  82. package/dist/styles/component-HdPreSituation.css +1 -0
  83. package/dist/styles/component-HdRadarTime.css +1 -0
  84. package/dist/styles/component-HdSeaCase.css +1 -0
  85. package/dist/styles/component-HdServiceMarterial.css +1 -0
  86. package/dist/styles/component-HdServiceRequirements.css +1 -0
  87. package/dist/styles/component-HdStationTem.css +1 -0
  88. package/dist/styles/component-HdSuggestion.css +1 -0
  89. package/dist/styles/component-HdThreeWeatherTrend.css +1 -0
  90. package/dist/styles/component-HdWaveForcast.css +1 -0
  91. package/dist/styles/component-HighQuality.css +1 -1
  92. package/dist/styles/component-HighWayEarlyWarningRed.css +1 -1
  93. package/dist/styles/component-PrecipitationRanking.css +1 -0
  94. package/dist/styles/component-StationDialog.css +1 -0
  95. package/dist/styles/component-StationList.css +1 -0
  96. package/dist/styles/component-WeatherForecast.css +1 -1
  97. package/dist/styles/component-YCDataMonitor.css +1 -1
  98. package/dist/styles/component-YCLoginNew.css +1 -1
  99. package/package.json +2 -1
  100. package/dist/chunks/component-WeatherForecast-CaLYtE37.mjs +0 -210
@@ -0,0 +1,639 @@
1
+ import { r as e } from "./rolldown-runtime-Cz5NsrRf.mjs";
2
+ import { n as t } from "./component-AqiMonitor-C_V1Nuf_.mjs";
3
+ import { i as n } from "./component-AiChat-BXNBLM1G.mjs";
4
+ import "./component-Forecast72h-BkVZSGhE.mjs";
5
+ import { n as r } from "./component-HdObservation-CM6HUrQ3.mjs";
6
+ import { ElConfigProvider as i, ElDatePicker as a, ElIcon as ee, ElLoadingDirective as te, ElOption as ne, ElSelect as re, ElTable as ie, ElTableColumn as ae } from "element-plus/es";
7
+ import { Fragment as o, computed as s, createBlock as oe, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, getCurrentInstance as p, nextTick as m, normalizeClass as se, normalizeStyle as h, onBeforeUnmount as g, onMounted as _, openBlock as v, ref as y, renderList as b, toDisplayString as x, unref as S, watch as ce, withCtx as C, withDirectives as le } from "vue";
8
+ import { Download as ue, TrendCharts as de } from "@element-plus/icons-vue";
9
+ import * as w from "echarts";
10
+ import { ElMessage as fe } from "element-plus";
11
+ import pe from "element-plus/es/locale/lang/zh-cn.mjs";
12
+ import "element-plus/dist/index.css";
13
+ //#region src/components/HdPreSituation/HdPreSituation.vue?vue&type=script&setup=true&lang.ts
14
+ var me = /* @__PURE__ */ e(r()), he = {
15
+ class: "HdPreSituation",
16
+ "element-loading-background": "rgba(0, 0, 0, 0.5)"
17
+ }, ge = { class: "HdPreSituation-header" }, _e = { class: "HdPreSituation-headerContent" }, ve = {
18
+ key: 0,
19
+ class: "HdPreSituation-dataTime"
20
+ }, ye = { class: "HdPreSituation-body" }, be = { class: "HdPreSituation-timeRange" }, xe = { class: "HdPreSituation-summary" }, Se = { class: "HdPreSituation-total" }, Ce = { class: "HdPreSituation-totalValue" }, we = { class: "HdPreSituation-splitBar" }, Te = { class: "HdPreSituation-section" }, Ee = { class: "HdPreSituation-levelList" }, De = { class: "HdPreSituation-levelRange" }, Oe = { class: "HdPreSituation-section HdPreSituation-section--table" }, T = { class: "HdPreSituation-tableHeader" }, ke = { class: "HdPreSituation-tableActions" }, Ae = { class: "HdPreSituation-tableWrap" }, je = {
21
+ key: 0,
22
+ class: "HdPreSituation-trendMask"
23
+ }, Me = { class: "HdPreSituation-trendPopup" }, Ne = { class: "HdPreSituation-trendHeader" }, Pe = { class: "HdPreSituation-trendActions" }, Fe = { class: "HdPreSituation-trendThreshold" }, E = /* @__PURE__ */ t(/* @__PURE__ */ f({
24
+ __name: "HdPreSituation",
25
+ props: {
26
+ mock: {
27
+ type: Boolean,
28
+ default: !0
29
+ },
30
+ baseHttp: { default: "" },
31
+ appKey: { default: "" },
32
+ appSalt: { default: "" },
33
+ ids: { default: () => ({}) },
34
+ refreshInterval: { default: 300 * 1e3 },
35
+ threshold: { default: 15 },
36
+ locateZoom: { default: 8 },
37
+ trendDefaultRegions: { default: 1e3 },
38
+ mockData: { default: () => ({
39
+ dataTime: "2026-08-12 14时",
40
+ timeRange: "2026年08月12日13时00分-2026年08月12日14时00分",
41
+ list: [
42
+ {
43
+ stationName: "临朐寺头",
44
+ stationCode: "54901",
45
+ region: "临朐",
46
+ lon: 114.9964643491507,
47
+ lat: 27.93822811514605,
48
+ precipitation: 25.8
49
+ },
50
+ {
51
+ stationName: "诸城朱解",
52
+ stationCode: "54902",
53
+ region: "诸城",
54
+ lon: 119.2,
55
+ lat: 36,
56
+ precipitation: 18.4
57
+ },
58
+ {
59
+ stationName: "诸城桃林",
60
+ stationCode: "54903",
61
+ region: "诸城",
62
+ lon: 119.4,
63
+ lat: 35.8,
64
+ precipitation: 14.2
65
+ },
66
+ {
67
+ stationName: "希望小学",
68
+ stationCode: "54904",
69
+ region: "安丘",
70
+ lon: 119.1,
71
+ lat: 36.3,
72
+ precipitation: 13
73
+ },
74
+ {
75
+ stationName: "诸城桃园",
76
+ stationCode: "54905",
77
+ region: "诸城",
78
+ lon: 119.3,
79
+ lat: 36.1,
80
+ precipitation: 10.6
81
+ },
82
+ {
83
+ stationName: "诸城昌标",
84
+ stationCode: "54906",
85
+ region: "诸城",
86
+ lon: 119.2,
87
+ lat: 36.2,
88
+ precipitation: 6.3
89
+ },
90
+ {
91
+ stationName: "诸城目标",
92
+ stationCode: "54907",
93
+ region: "诸城",
94
+ lon: 119.3,
95
+ lat: 36,
96
+ precipitation: 6.3
97
+ },
98
+ {
99
+ stationName: "昌邑青阜",
100
+ stationCode: "54908",
101
+ region: "昌邑",
102
+ lon: 119.5,
103
+ lat: 36.9,
104
+ precipitation: 6.3
105
+ },
106
+ {
107
+ stationName: "响嵩山水库",
108
+ stationCode: "54909",
109
+ region: "临朐",
110
+ lon: 118.8,
111
+ lat: 36.5,
112
+ precipitation: 4.6
113
+ },
114
+ {
115
+ stationName: "黄岛",
116
+ stationCode: "54910",
117
+ region: "黄岛",
118
+ lon: 120,
119
+ lat: 35.9,
120
+ precipitation: 2.3
121
+ }
122
+ ]
123
+ }) }
124
+ },
125
+ emits: ["close", "locate"],
126
+ setup(e, { emit: t }) {
127
+ let r = p()?.appContext.config.globalProperties.$bus, f = e, E = t, D = y(!1), O = y(""), k = y([]), A = y([]), j = y([]), M = y(null), N = y(null), P = null, F = null, I = null, L = y(!1), R = y([]), z = [
128
+ {
129
+ label: "小雨",
130
+ range: "0.1-1.6mm/h",
131
+ min: .1,
132
+ max: 1.6,
133
+ color: "#05ddfa"
134
+ },
135
+ {
136
+ label: "中雨",
137
+ range: "1.6-7mm/h",
138
+ min: 1.6,
139
+ max: 7,
140
+ color: "#165DFF"
141
+ },
142
+ {
143
+ label: "大雨",
144
+ range: "7-15mm/h",
145
+ min: 7,
146
+ max: 15,
147
+ color: "#00B42A"
148
+ },
149
+ {
150
+ label: "暴雨",
151
+ range: "15-40mm/h",
152
+ min: 15,
153
+ max: 40,
154
+ color: "#FF7D00"
155
+ },
156
+ {
157
+ label: "大暴雨",
158
+ range: "40-50mm/h",
159
+ min: 40,
160
+ max: 50,
161
+ color: "#F53F3F"
162
+ },
163
+ {
164
+ label: "特大暴雨",
165
+ range: "≥50mm/h",
166
+ min: 50,
167
+ max: Infinity,
168
+ color: "#820014"
169
+ }
170
+ ], B = s(() => A.value.filter((e) => e.precipitation >= f.threshold).length), V = s(() => A.value.length - B.value), H = s(() => A.value.length ? B.value / A.value.length * 100 : 0), Ie = s(() => 100 - H.value), U = s(() => [...A.value].filter((e) => !J(e.precipitation)).sort((e, t) => t.precipitation - e.precipitation).slice(0, 20).map((e) => ({
171
+ ...e,
172
+ isAlarm: e.precipitation >= f.threshold
173
+ }))), Le = s(() => z.map((e) => ({
174
+ ...e,
175
+ count: A.value.filter((t) => {
176
+ let n = t.precipitation;
177
+ return n >= e.min && n < e.max;
178
+ }).length
179
+ }))), W = s(() => Array.from(new Set(j.value.map((e) => e.region)))), G = s(() => {
180
+ let e = {};
181
+ return j.value.forEach((t) => {
182
+ e[t.region] = (e[t.region] || 0) + t.value;
183
+ }), Object.entries(e).sort((e, t) => t[1] - e[1]).slice(0, f.trendDefaultRegions).map(([e]) => e);
184
+ }), K = (e) => {
185
+ let t = (e) => String(e).padStart(2, "0");
186
+ return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
187
+ }, q = () => {
188
+ let e = /* @__PURE__ */ new Date();
189
+ k.value = [K(/* @__PURE__ */ new Date(e.getTime() - 3600 * 1e3)), K(e)];
190
+ }, J = (e) => e == null || e === "" || e === 9999, Y = (e) => {
191
+ if (J(e)) return "--";
192
+ let t = Number(e);
193
+ return isNaN(t) ? String(e) : t.toFixed(1);
194
+ }, Re = (e) => {
195
+ let t = z.find((t) => e >= t.min && e < t.max);
196
+ return t ? t.label : "--";
197
+ }, ze = () => {
198
+ E("close", "HdPreSituation");
199
+ }, Be = () => {
200
+ Z();
201
+ }, Ve = (e) => {
202
+ E("locate", {
203
+ stationName: e.stationName,
204
+ stationCode: e.stationCode,
205
+ region: e.region,
206
+ lon: e.lon,
207
+ lat: e.lat,
208
+ zoom: f.locateZoom
209
+ });
210
+ }, He = () => {
211
+ L.value = !0, R.value = G.value.length ? G.value : W.value.slice(0, f.trendDefaultRegions), m(() => {
212
+ Q();
213
+ });
214
+ }, Ue = () => {
215
+ L.value = !1, F &&= (F.dispose(), null);
216
+ }, We = (e) => {
217
+ let t = f.ids[e] || f.ids.data;
218
+ return t?.id ? t : null;
219
+ }, X = (e) => e ? e.data === void 0 ? e.result === void 0 ? e : e.result : e.data?.result?.output === void 0 ? e.data?.result === void 0 ? e.data : e.data.result : e.data.result.output : null, Ge = () => {
220
+ let e = f.mockData;
221
+ A.value = e.list || [], O.value = e.dataTime || "", k.value.length || q(), j.value = e.trend?.length ? e.trend : Ke();
222
+ }, Ke = () => {
223
+ let e = Array.from(new Set(A.value.map((e) => e.region))), t = [
224
+ "08时",
225
+ "09时",
226
+ "10时",
227
+ "11时",
228
+ "12时",
229
+ "13时",
230
+ "14时"
231
+ ], n = [];
232
+ return e.forEach((e) => {
233
+ t.forEach((t, r) => {
234
+ n.push({
235
+ time: t,
236
+ region: e,
237
+ value: Number((Math.random() * 10 + r * 2).toFixed(1))
238
+ });
239
+ });
240
+ }), n;
241
+ }, qe = async () => {
242
+ let e = We("data");
243
+ if (!e) {
244
+ console.warn("HdPreSituation 缺少数据工作流配置");
245
+ return;
246
+ }
247
+ k.value.length || q();
248
+ let [t, r] = k.value;
249
+ try {
250
+ let i = X(await n({
251
+ id: e.id,
252
+ baseHttp: f.baseHttp,
253
+ reqType: e.reqType,
254
+ variables: {
255
+ startTime: t || "",
256
+ endTime: r || ""
257
+ },
258
+ isFormData: e.isFormData,
259
+ appKey: f.appKey,
260
+ appSalt: f.appSalt
261
+ }));
262
+ i && (A.value = Array.isArray(i.list) ? i.list : [], O.value = i.dataTime || "", j.value = Array.isArray(i.trend) ? i.trend : []);
263
+ } catch (e) {
264
+ console.error("HdPreSituation 数据加载失败", e);
265
+ }
266
+ }, Z = async () => {
267
+ D.value = !0, f.mock ? Ge() : await qe(), D.value = !1, m(() => {
268
+ Je();
269
+ });
270
+ }, Je = () => {
271
+ if (!M.value) return;
272
+ P && P.dispose(), P = w.init(M.value);
273
+ let e = {
274
+ backgroundColor: "transparent",
275
+ tooltip: {
276
+ trigger: "item",
277
+ backgroundColor: "rgba(6, 32, 56, 0.95)",
278
+ borderColor: "rgba(64, 158, 255, 0.4)",
279
+ textStyle: { color: "#fff" },
280
+ formatter: "{b}: {c}站 ({d}%)"
281
+ },
282
+ legend: {
283
+ bottom: 0,
284
+ textStyle: {
285
+ color: "rgba(255,255,255,0.8)",
286
+ fontSize: 11
287
+ },
288
+ itemWidth: 10,
289
+ itemHeight: 10
290
+ },
291
+ series: [{
292
+ name: "报警统计",
293
+ type: "pie",
294
+ radius: ["35%", "60%"],
295
+ center: ["50%", "45%"],
296
+ avoidLabelOverlap: !1,
297
+ label: {
298
+ show: !0,
299
+ color: "#fff",
300
+ fontSize: 11,
301
+ formatter: "{b}\n{c}站"
302
+ },
303
+ labelLine: {
304
+ show: !0,
305
+ lineStyle: { color: "rgba(255,255,255,0.3)" }
306
+ },
307
+ data: [{
308
+ value: V.value,
309
+ name: "正常",
310
+ itemStyle: { color: "#00B42A" }
311
+ }, {
312
+ value: B.value,
313
+ name: "报警",
314
+ itemStyle: { color: "#F53F3F" }
315
+ }]
316
+ }]
317
+ };
318
+ P.setOption(e);
319
+ }, Ye = (e, t) => {
320
+ let n = [...e, t].filter((e) => !isNaN(Number(e)));
321
+ if (!n.length) return 20;
322
+ let r = Math.max(...n);
323
+ return Math.ceil(r * 1.1);
324
+ }, Q = () => {
325
+ if (!N.value) return;
326
+ F && F.dispose();
327
+ let e = Array.from(new Set(j.value.map((e) => e.time))), t = {};
328
+ j.value.forEach((e) => {
329
+ t[e.region] || (t[e.region] = []), t[e.region].push(e.value);
330
+ });
331
+ let n = R.value.filter((e) => t[e]), r = [
332
+ "#05ddfa",
333
+ "#FF7D00",
334
+ "#00B42A",
335
+ "#A855F7",
336
+ "#F53F3F",
337
+ "#165DFF",
338
+ "#FF4D4F",
339
+ "#EB2F96",
340
+ "#13C2C2",
341
+ "#FAAD14"
342
+ ], i = Ye(j.value.filter((e) => n.includes(e.region)).map((e) => e.value), f.threshold), a = {
343
+ backgroundColor: "transparent",
344
+ grid: {
345
+ top: 40,
346
+ right: 24,
347
+ bottom: 24,
348
+ left: 48
349
+ },
350
+ tooltip: {
351
+ trigger: "axis",
352
+ backgroundColor: "rgba(6, 32, 56, 0.95)",
353
+ borderColor: "rgba(64, 158, 255, 0.4)",
354
+ textStyle: { color: "#fff" },
355
+ formatter: (e) => `${e[0]?.axisValue || ""}<br/>${e.map((e) => `${e.marker} ${e.seriesName}: ${e.value}mm/h`).join("<br/>")}`
356
+ },
357
+ legend: {
358
+ data: [...n, "阈值"],
359
+ top: 0,
360
+ type: "scroll",
361
+ textStyle: {
362
+ color: "rgba(255,255,255,0.8)",
363
+ fontSize: 11
364
+ },
365
+ itemWidth: 12,
366
+ itemHeight: 8,
367
+ pageIconColor: "#05ddfa",
368
+ pageTextStyle: { color: "rgba(255,255,255,0.7)" }
369
+ },
370
+ xAxis: {
371
+ type: "category",
372
+ data: e,
373
+ axisLine: { lineStyle: { color: "rgba(255,255,255,0.2)" } },
374
+ axisLabel: {
375
+ color: "rgba(255,255,255,0.7)",
376
+ fontSize: 11
377
+ },
378
+ axisTick: { show: !1 }
379
+ },
380
+ yAxis: {
381
+ type: "value",
382
+ max: i,
383
+ name: "单位:mm/h",
384
+ nameTextStyle: {
385
+ color: "rgba(255,255,255,0.7)",
386
+ fontSize: 10,
387
+ padding: [
388
+ 0,
389
+ 0,
390
+ 0,
391
+ 8
392
+ ]
393
+ },
394
+ axisLine: { show: !1 },
395
+ axisLabel: {
396
+ color: "rgba(255,255,255,0.7)",
397
+ fontSize: 11
398
+ },
399
+ splitLine: { show: !1 },
400
+ axisTick: { show: !1 }
401
+ },
402
+ series: [{
403
+ name: "阈值",
404
+ type: "line",
405
+ data: e.map(() => f.threshold),
406
+ itemStyle: { color: "#F53F3F" },
407
+ lineStyle: {
408
+ type: "dashed",
409
+ width: 1
410
+ },
411
+ symbol: "none"
412
+ }, ...n.map((e, n) => ({
413
+ name: e,
414
+ type: "bar",
415
+ data: t[e],
416
+ barWidth: 12,
417
+ barGap: "20%",
418
+ itemStyle: {
419
+ color: r[n % r.length],
420
+ borderRadius: [
421
+ 4,
422
+ 4,
423
+ 0,
424
+ 0
425
+ ]
426
+ }
427
+ }))]
428
+ };
429
+ F = w.init(N.value), F.setOption(a);
430
+ };
431
+ ce(W, (e) => {
432
+ L.value && (R.value = e.slice(0, f.trendDefaultRegions), m(() => Q()));
433
+ });
434
+ let Xe = () => {
435
+ if (U.value.length == 0) {
436
+ fe.warning("暂无数据");
437
+ return;
438
+ }
439
+ let e = U.value.map((e, t) => ({
440
+ 序号: t + 1,
441
+ 区域: e.region,
442
+ 站名: e.stationName,
443
+ 站号: e.stationCode,
444
+ 降水量: Y(e.precipitation),
445
+ 单位: "mm/h",
446
+ 等级: Re(e.precipitation),
447
+ 是否报警: e.isAlarm ? "是" : "否"
448
+ }));
449
+ new me.default({
450
+ fileName: `降水实况统计_${(/* @__PURE__ */ new Date()).getTime()}`,
451
+ datas: [{
452
+ sheetData: e,
453
+ sheetName: "降水实况",
454
+ sheetFilter: [
455
+ "序号",
456
+ "区域",
457
+ "站名",
458
+ "站号",
459
+ "降水量",
460
+ "单位",
461
+ "等级",
462
+ "是否报警"
463
+ ],
464
+ sheetHeader: [
465
+ "序号",
466
+ "区域",
467
+ "站名",
468
+ "站号",
469
+ "降水量",
470
+ "单位",
471
+ "等级",
472
+ "是否报警"
473
+ ],
474
+ columnWidths: [
475
+ 8,
476
+ 12,
477
+ 18,
478
+ 12,
479
+ 12,
480
+ 8,
481
+ 12,
482
+ 12
483
+ ]
484
+ }]
485
+ }).saveExcel();
486
+ }, Ze = () => {
487
+ $(), !(f.refreshInterval <= 0) && (I = setInterval(() => {
488
+ Z();
489
+ }, f.refreshInterval));
490
+ }, $ = () => {
491
+ I &&= (clearInterval(I), null);
492
+ };
493
+ return _(() => {
494
+ r?.on("toComponent", (e) => {
495
+ e.componentName === "HdPreSituation" && Z();
496
+ }), Z(), Ze(), window.addEventListener("resize", () => {
497
+ P?.resize(), F?.resize();
498
+ });
499
+ }), g(() => {
500
+ $(), P &&= (P.dispose(), null), F &&= (F.dispose(), null);
501
+ }), (e, t) => {
502
+ let n = a, r = i, s = ee, p = ae, m = ie, g = ne, _ = re, y = te;
503
+ return le((v(), l("div", he, [
504
+ u("button", {
505
+ class: "HdPreSituation-close",
506
+ onClick: ze
507
+ }, [...t[2] ||= [u("span", null, "✕", -1)]]),
508
+ u("div", ge, [u("div", _e, [t[3] ||= u("h3", { class: "HdPreSituation-title" }, "降水实况统计", -1), O.value ? (v(), l("span", ve, "(数据时间:" + x(O.value) + ")", 1)) : c("", !0)]), t[4] ||= u("img", {
509
+ style: {
510
+ width: "100%",
511
+ "object-fit": "contain",
512
+ "margin-top": "4px"
513
+ },
514
+ src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbsAAAASBAMAAAAwI22/AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAwUExURQAAAAem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/5bu5GYAAAAPdFJOUwAFwAwc2M8ULQYDn/hGXGnV2UoAAAGZSURBVEjH7ZM/S8NAGId/JYGmmeLspptThurk0CHWRXGo0Nk/S50y6CYSHMRF7Efo4uQXEIpbwUnM6OhnEIeChXjv5ZLLXdLtLCX68vDCe0eGJ7/3AJN1VcL+UImB/SruVJwYTqSAW5V3LLyaPR1c+IIdH12OPZiLcyTAjccZEdccZ0Nn4bXpC3KpCuFu5tkdziX3FJxBSBZZdFk9HempCduMk4xSitJTpOgJSSIPrx10YAUB0tYOwrQ1g12k7ZyODIYXZmQpppLV26rtbDFOXVhua2Fn7WTWwUEyAe5Zc2hiLWTTC3jjk8Hw+jrSM9/Z8raKOAtZVmyr9jbpee4lU9hvSUStw6YvOpqwiXlK9d8IL0Oq5tuqvc3KLMs7q9uyCC0y22aKvDVp4u2SjnJ1c+Wecg7h9gV4CFV8NHpEaw7yF2wVGcIa6OBx/Ax3PI6pRWx6Am98alBbpSODNVTxgAbQUpF3KeVv0s80xMUow8N//YVaqWEV9BJDdby2PBUZ1/te0uU0YzeLa623jjrrvaLOep/+str9ACyAtv25BhHcAAAAAElFTkSuQmCC",
515
+ alt: ""
516
+ }, null, -1)]),
517
+ u("div", ye, [
518
+ u("div", be, [d(r, { locale: S(pe) }, {
519
+ default: C(() => [d(n, {
520
+ style: { width: "100%" },
521
+ modelValue: k.value,
522
+ "onUpdate:modelValue": t[0] ||= (e) => k.value = e,
523
+ class: "HdPreSituation-timePicker",
524
+ "popper-class": "HdPreSituation-timePopper",
525
+ type: "datetimerange",
526
+ format: "YYYY年MM月DD日 HH:mm",
527
+ "value-format": "YYYY-MM-DD HH:mm:ss",
528
+ "range-separator": "-",
529
+ "start-placeholder": "开始时间",
530
+ "end-placeholder": "结束时间",
531
+ size: "small",
532
+ onChange: Be
533
+ }, null, 8, ["modelValue"])]),
534
+ _: 1
535
+ }, 8, ["locale"])]),
536
+ u("div", xe, [u("div", Se, [t[5] ||= u("span", { class: "HdPreSituation-totalLabel" }, "总站数", -1), u("span", Ce, x(A.value.length), 1)]), u("div", we, [u("div", {
537
+ class: "HdPreSituation-splitBarItem HdPreSituation-splitBarItem--normal",
538
+ style: h({ width: Ie.value + "%" })
539
+ }, [u("span", null, "正常 " + x(V.value), 1)], 4), u("div", {
540
+ class: "HdPreSituation-splitBarItem HdPreSituation-splitBarItem--alarm",
541
+ style: h({ width: H.value + "%" })
542
+ }, [u("span", null, "报警 " + x(B.value), 1)], 4)])]),
543
+ u("div", Te, [t[6] ||= u("div", { class: "HdPreSituation-sectionTitle" }, "降水等级分布", -1), u("div", Ee, [(v(!0), l(o, null, b(Le.value, (e) => (v(), l("div", {
544
+ key: e.label,
545
+ class: "HdPreSituation-levelItem"
546
+ }, [
547
+ u("span", {
548
+ class: "HdPreSituation-levelName",
549
+ style: h({ color: e.color })
550
+ }, x(e.label), 5),
551
+ u("span", De, x(e.range), 1),
552
+ u("span", {
553
+ class: "HdPreSituation-levelCount",
554
+ style: h({ color: e.color })
555
+ }, x(e.count), 5)
556
+ ]))), 128))])]),
557
+ u("div", Oe, [u("div", T, [t[9] ||= u("span", { class: "HdPreSituation-sectionTitle" }, "区域降水排名", -1), u("div", ke, [u("button", {
558
+ class: "HdPreSituation-btn",
559
+ onClick: He
560
+ }, [d(s, null, {
561
+ default: C(() => [d(S(de))]),
562
+ _: 1
563
+ }), t[7] ||= u("span", { class: "HdPreSituation-btnText" }, "趋势图", -1)]), u("button", {
564
+ class: "HdPreSituation-btn",
565
+ onClick: Xe
566
+ }, [d(s, null, {
567
+ default: C(() => [d(S(ue))]),
568
+ _: 1
569
+ }), t[8] ||= u("span", { class: "HdPreSituation-btnText" }, "导出", -1)])])]), u("div", Ae, [d(m, {
570
+ data: U.value,
571
+ class: "HdPreSituation-table",
572
+ "max-height": "220",
573
+ "empty-text": "暂无数据",
574
+ onRowClick: Ve
575
+ }, {
576
+ default: C(() => [
577
+ d(p, {
578
+ prop: "region",
579
+ label: "区域",
580
+ align: "left",
581
+ "min-width": "50"
582
+ }),
583
+ d(p, {
584
+ prop: "stationName",
585
+ label: "站名",
586
+ align: "left",
587
+ "min-width": "60",
588
+ "show-overflow-tooltip": ""
589
+ }),
590
+ d(p, {
591
+ label: "降水量",
592
+ align: "left",
593
+ "min-width": "80"
594
+ }, {
595
+ default: C(({ row: e }) => [u("span", { class: se({ "HdPreSituation-alarmText": e.isAlarm }) }, x(Y(e.precipitation)) + "mm/h", 3)]),
596
+ _: 1
597
+ })
598
+ ]),
599
+ _: 1
600
+ }, 8, ["data"])])])
601
+ ]),
602
+ L.value ? (v(), l("div", je, [u("div", Me, [u("div", Ne, [t[10] ||= u("div", { class: "HdPreSituation-trendTitle" }, "区域降水趋势", -1), u("div", Pe, [
603
+ u("span", Fe, "阈值:" + x(f.threshold) + "mm/h", 1),
604
+ d(_, {
605
+ modelValue: R.value,
606
+ "onUpdate:modelValue": t[1] ||= (e) => R.value = e,
607
+ class: "HdPreSituation-regionSelect",
608
+ "popper-class": "HdPreSituation-regionPopper",
609
+ size: "small",
610
+ multiple: "",
611
+ effect: "dark",
612
+ "collapse-tags": "",
613
+ "collapse-tags-tooltip": "",
614
+ teleported: !1,
615
+ placeholder: "选择区域",
616
+ onChange: Q
617
+ }, {
618
+ default: C(() => [(v(!0), l(o, null, b(W.value, (e) => (v(), oe(g, {
619
+ key: e,
620
+ label: e,
621
+ value: e
622
+ }, null, 8, ["label", "value"]))), 128))]),
623
+ _: 1
624
+ }, 8, ["modelValue"]),
625
+ u("button", {
626
+ class: "HdPreSituation-trendClose",
627
+ onClick: Ue
628
+ }, "✕")
629
+ ])]), u("div", {
630
+ ref_key: "trendChartRef",
631
+ ref: N,
632
+ class: "HdPreSituation-trendChart"
633
+ }, null, 512)])])) : c("", !0)
634
+ ])), [[y, D.value]]);
635
+ };
636
+ }
637
+ }), [["__scopeId", "data-v-711c113a"]]);
638
+ //#endregion
639
+ export { E as t };