nxd-plugin 1.7.83 → 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 (83) hide show
  1. package/dist/chunks/{component-AiChat-C1xBPkS5.mjs → component-AiChat-BXNBLM1G.mjs} +92 -93
  2. package/dist/chunks/{component-AqiMonitor-DoAVs1Jf.mjs → component-AqiMonitor-C_V1Nuf_.mjs} +1 -1
  3. package/dist/chunks/{component-ChartCumulativePre-BOIMPYxl.mjs → component-ChartCumulativePre-Bo28Bgaa.mjs} +2 -2
  4. package/dist/chunks/{component-ChartServiceMaterial-CmR3bmG_.mjs → component-ChartServiceMaterial-DELVCsKj.mjs} +2 -2
  5. package/dist/chunks/{component-Duty-gmt7ZcSc.mjs → component-Duty-dyZZ4vHt.mjs} +2 -2
  6. package/dist/chunks/{component-EarlyWarningStatistic-BWYWrz65.mjs → component-EarlyWarningStatistic-CBJfrRsV.mjs} +2 -2
  7. package/dist/chunks/{component-Forecast72h-BZ1kB2TJ.mjs → component-Forecast72h-BkVZSGhE.mjs} +2 -2
  8. package/dist/chunks/{component-GeologyLiveAlarm-CNpQPmGs.mjs → component-GeologyLiveAlarm-B9jBWXf0.mjs} +2 -2
  9. package/dist/chunks/component-HdForecastProducts-D4x_Y0OB.mjs +211 -0
  10. package/dist/chunks/{component-HdHeatService-ok6q8UuG.mjs → component-HdHeatService-Bf9XH3DP.mjs} +2 -2
  11. package/dist/chunks/{component-HdObservation-BmQdGJV6.mjs → component-HdObservation-CM6HUrQ3.mjs} +51 -45
  12. package/dist/chunks/{component-HdPreSituation-LBpO58bE.mjs → component-HdPreSituation-CJ8-wiRO.mjs} +168 -133
  13. package/dist/chunks/{component-HdRadarTime-D7hOn_ph.mjs → component-HdRadarTime-C4ZArOUM.mjs} +2 -2
  14. package/dist/chunks/{component-HdSeaCase-DYPQ7CdN.mjs → component-HdSeaCase-3-YFxSuM.mjs} +2 -2
  15. package/dist/chunks/component-HdServiceMarterial-pSFQUH2x.mjs +316 -0
  16. package/dist/chunks/{component-HdServiceRequirements-DcXrcIIV.mjs → component-HdServiceRequirements-BjuiyyC5.mjs} +38 -39
  17. package/dist/chunks/{component-HdStationTem-US6IRwbQ.mjs → component-HdStationTem-Dit7Y8lu.mjs} +100 -100
  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-B0OgPi3T.mjs → component-HighQuality-1iqLOQAF.mjs} +2 -2
  22. package/dist/chunks/{component-HighWayEarlyWarningRed-BTl2WWZ-.mjs → component-HighWayEarlyWarningRed-DlgG9rTx.mjs} +3 -3
  23. package/dist/chunks/{component-HighWayFreeze-B1aMHQWU.mjs → component-HighWayFreeze-CCp1Rxpz.mjs} +2 -2
  24. package/dist/chunks/{component-HighwayLiveAlarm-8u45ZdnN.mjs → component-HighwayLiveAlarm-D7PKi5rG.mjs} +2 -2
  25. package/dist/chunks/{component-HighwayLiveAlarmNew-DK827eVk.mjs → component-HighwayLiveAlarmNew-rH59lsj8.mjs} +3 -3
  26. package/dist/chunks/{component-HighwayStations-BzrbWP50.mjs → component-HighwayStations-DGt6Gsr9.mjs} +2 -2
  27. package/dist/chunks/{component-HighwayWeatherForecast-DER5XGc3.mjs → component-HighwayWeatherForecast-BQrNGF7m.mjs} +73 -130
  28. package/dist/chunks/{component-IframeWeb-DuBssYPk.mjs → component-IframeWeb-vLIWvbJY.mjs} +1 -1
  29. package/dist/chunks/{component-ImageGeneration-3G3j7utC.mjs → component-ImageGeneration-BtM7MHcE.mjs} +1 -1
  30. package/dist/chunks/{component-IntroducePic-L8VH8Yq8.mjs → component-IntroducePic-D3FSEuKX.mjs} +1 -1
  31. package/dist/chunks/{component-LithiumBatteryMiningArea-DSFTVepN.mjs → component-LithiumBatteryMiningArea-B5aUe7T0.mjs} +2 -2
  32. package/dist/chunks/{component-MapPopup-BNc18syw.mjs → component-MapPopup-UmWWAPBE.mjs} +1 -1
  33. package/dist/chunks/{component-MaterialPreview-DhLUbjcT.mjs → component-MaterialPreview-1Hyl4bjM.mjs} +2 -2
  34. package/dist/chunks/{component-PieLegend-Haojhtet.mjs → component-PieLegend-C0Acehix.mjs} +1 -1
  35. package/dist/chunks/component-PrecipitationRanking-C63n87WI.mjs +658 -0
  36. package/dist/chunks/{component-RadarChart-BYMbkI3K.mjs → component-RadarChart-BXfMyPPi.mjs} +2 -2
  37. package/dist/chunks/{component-RadarLegend-CiGsla7a.mjs → component-RadarLegend-B2ajP_0M.mjs} +1 -1
  38. package/dist/chunks/{component-RadarShortTerm-yPc2UWpz.mjs → component-RadarShortTerm-BeGEjbHr.mjs} +4 -4
  39. package/dist/chunks/{component-RadarTime-CkqIaTJh.mjs → component-RadarTime-DGRztCiR.mjs} +2 -2
  40. package/dist/chunks/{component-RenderMarkdown-D590sXEf.mjs → component-RenderMarkdown-Dv-UVGrS.mjs} +2 -2
  41. package/dist/chunks/{component-ReservoirLiveAlarm-DTtKdDQS.mjs → component-ReservoirLiveAlarm-CRgl_ztt.mjs} +3 -3
  42. package/dist/chunks/{component-ServiceMaterial-BKbVQbKm.mjs → component-ServiceMaterial-BTWYke8W.mjs} +2 -2
  43. package/dist/chunks/{component-ServiceMaterialsBtn-CskK-Qiz.mjs → component-ServiceMaterialsBtn-CTWGd-Is.mjs} +1 -1
  44. package/dist/chunks/{component-StationDialog-Bn7Fbk24.mjs → component-StationDialog-Ck8zd52d.mjs} +216 -157
  45. package/dist/chunks/{component-StationList-DRABlFdc.mjs → component-StationList-BvoVJwAU.mjs} +105 -91
  46. package/dist/chunks/{component-TimeBasedForecast-D1fJ4rGJ.mjs → component-TimeBasedForecast-BaPiit4s.mjs} +36 -36
  47. package/dist/chunks/{component-WarningLine-jN8sg45u.mjs → component-WarningLine-CcFfVzar.mjs} +2 -2
  48. package/dist/chunks/{component-WarningSignal-BkIKqyJB.mjs → component-WarningSignal-C0CnTLVH.mjs} +3 -3
  49. package/dist/chunks/component-WeatherForecast-DWdNramU.mjs +229 -0
  50. package/dist/chunks/{component-YCDataMonitor-vVlnkSzT.mjs → component-YCDataMonitor-DPMFqIFB.mjs} +108 -110
  51. package/dist/chunks/{component-YCDataService-okkY1-iU.mjs → component-YCDataService-CD042ss7.mjs} +4 -4
  52. package/dist/chunks/{component-YCHome-BfpbxDIg.mjs → component-YCHome-DjpIzt-5.mjs} +4 -4
  53. package/dist/chunks/{component-YCHomeLegend-CuT-BwNJ.mjs → component-YCHomeLegend-B-nlePS2.mjs} +1 -1
  54. package/dist/chunks/{component-YCLoginNew-KZoyW1EV.mjs → component-YCLoginNew-Bx2LoLJz.mjs} +3 -3
  55. package/dist/components/HdForecastProducts/HdForecastProducts.vue.d.ts +49 -0
  56. package/dist/components/HdPreSituation/HdPreSituation.vue.d.ts +0 -1
  57. package/dist/components/HdServiceMarterial/HdServiceMarterial.vue.d.ts +54 -0
  58. package/dist/components/HdSuggestion/HdSuggestion.vue.d.ts +49 -0
  59. package/dist/components/HdThreeWeatherTrend/HdThreeWeatherTrend.vue.d.ts +71 -0
  60. package/dist/components/HdWaveForcast/HdWaveForcast.vue.d.ts +70 -0
  61. package/dist/components/PrecipitationRanking/PrecipitationRanking.vue.d.ts +5 -0
  62. package/dist/components/WeatherForecast/WeatherForecast.vue.d.ts +9 -0
  63. package/dist/index.d.ts +6 -1
  64. package/dist/nxd-plugin.mjs +56 -51
  65. package/dist/styles/component-HdForecastProducts.css +1 -0
  66. package/dist/styles/component-HdObservation.css +1 -1
  67. package/dist/styles/component-HdPreSituation.css +1 -1
  68. package/dist/styles/component-HdServiceMarterial.css +1 -0
  69. package/dist/styles/component-HdServiceRequirements.css +1 -1
  70. package/dist/styles/component-HdStationTem.css +1 -1
  71. package/dist/styles/component-HdSuggestion.css +1 -0
  72. package/dist/styles/component-HdThreeWeatherTrend.css +1 -0
  73. package/dist/styles/component-HdWaveForcast.css +1 -0
  74. package/dist/styles/component-HighWayEarlyWarningRed.css +1 -1
  75. package/dist/styles/component-PrecipitationRanking.css +1 -1
  76. package/dist/styles/component-StationDialog.css +1 -1
  77. package/dist/styles/component-StationList.css +1 -1
  78. package/dist/styles/component-WeatherForecast.css +1 -1
  79. package/dist/styles/component-YCDataMonitor.css +1 -1
  80. package/dist/styles/component-YCLoginNew.css +1 -1
  81. package/package.json +1 -1
  82. package/dist/chunks/component-PrecipitationRanking-BanKrD3J.mjs +0 -608
  83. package/dist/chunks/component-WeatherForecast-CYsbJhYt.mjs +0 -225
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nxd-plugin",
3
- "version": "1.7.83",
3
+ "version": "1.7.84",
4
4
  "main": "dist/nxd-plugin.mjs",
5
5
  "module": "dist/nxd-plugin.mjs",
6
6
  "types": "dist/src/index.d.ts",
@@ -1,608 +0,0 @@
1
- import { r as e } from "./rolldown-runtime-Cz5NsrRf.mjs";
2
- import { n as t } from "./component-AqiMonitor-DoAVs1Jf.mjs";
3
- import { i as n } from "./component-AiChat-C1xBPkS5.mjs";
4
- import "./component-Forecast72h-BZ1kB2TJ.mjs";
5
- import { n as r } from "./component-HdObservation-BmQdGJV6.mjs";
6
- import { ElConfigProvider as i, ElDatePicker as ee, ElIcon as te, ElLoadingDirective as ne, ElTable as re, ElTableColumn as ie } from "element-plus/es";
7
- import { Fragment as ae, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as oe, createVNode as l, defineComponent as u, getCurrentInstance as d, nextTick as f, normalizeClass as p, normalizeStyle as se, onBeforeUnmount as m, onMounted as ce, openBlock as h, ref as g, renderList as le, toDisplayString as _, unref as v, withCtx as y, withDirectives as ue, withModifiers as b } from "vue";
8
- import { Download as de, Refresh as fe } from "@element-plus/icons-vue";
9
- import * as x from "echarts";
10
- import pe from "element-plus/es/locale/lang/zh-cn.mjs";
11
- //#region src/components/PrecipitationRanking/PrecipitationRanking.vue?vue&type=script&setup=true&lang.ts
12
- var me = /* @__PURE__ */ e(r()), he = {
13
- class: "PrecipitationRanking",
14
- "element-loading-background": "rgba(0, 0, 0, 0.5)"
15
- }, ge = { class: "PrecipitationRanking-header" }, _e = { class: "PrecipitationRanking-headerContent" }, ve = {
16
- key: 0,
17
- class: "PrecipitationRanking-dataTime"
18
- }, ye = { class: "PrecipitationRanking-toolbar" }, be = { class: "PrecipitationRanking-actions" }, xe = { class: "PrecipitationRanking-btnGroup" }, Se = { class: "PrecipitationRanking-timeWrap" }, Ce = { class: "PrecipitationRanking-timeTabs" }, we = ["onClick"], Te = {
19
- key: 0,
20
- class: "PrecipitationRanking-customPanel"
21
- }, S = { class: "PrecipitationRanking-content" }, C = { class: "PrecipitationRanking-tableWrap" }, w = ["onClick"], T = { class: "PrecipitationRanking-trendPopup" }, E = { class: "PrecipitationRanking-trendHeader" }, D = { class: "PrecipitationRanking-trendTitle" }, O = { class: "PrecipitationRanking-trendSubTitle" }, k = "30min", A = /* @__PURE__ */ t(/* @__PURE__ */ u({
22
- __name: "PrecipitationRanking",
23
- props: {
24
- mock: {
25
- type: Boolean,
26
- default: !0
27
- },
28
- baseHttp: { default: "" },
29
- tableHeight: { default: "40vh" },
30
- appKey: { default: "" },
31
- appSalt: { default: "" },
32
- ids: { default: () => ({}) },
33
- refreshInterval: { default: 300 * 1e3 },
34
- mockData: { default: () => ({
35
- dataTime: "2026-04-12 16时",
36
- list: [
37
- {
38
- stationName: "黄岛",
39
- district: "黄岛区",
40
- precipitation: 156.5
41
- },
42
- {
43
- stationName: "董家口",
44
- district: "黄岛区",
45
- precipitation: 128.3
46
- },
47
- {
48
- stationName: "金沙滩",
49
- district: "黄岛区",
50
- precipitation: 95.7
51
- },
52
- {
53
- stationName: "琅琊",
54
- district: "黄岛区",
55
- precipitation: 68.2
56
- },
57
- {
58
- stationName: "大场",
59
- district: "黄岛区",
60
- precipitation: 45.6
61
- },
62
- {
63
- stationName: "大村",
64
- district: "黄岛区",
65
- precipitation: 32.1
66
- },
67
- {
68
- stationName: "大涧山",
69
- district: "黄岛区",
70
- precipitation: 18.4
71
- },
72
- {
73
- stationName: "王台",
74
- district: "黄岛区",
75
- precipitation: 8.2
76
- },
77
- {
78
- stationName: "诸城",
79
- district: "诸城市",
80
- precipitation: 2.5
81
- },
82
- {
83
- stationName: "五莲",
84
- district: "五莲县",
85
- precipitation: 0
86
- }
87
- ]
88
- }) }
89
- },
90
- emits: [
91
- "close",
92
- "rowClick",
93
- "view"
94
- ],
95
- setup(e, { emit: t }) {
96
- let r = d()?.appContext.config.globalProperties.$bus, u = e, A = t, j = g(!1), M = g(!1), N = g(k), P = g(""), F = g([]), I = g([]), L = g(!1), R = g(null), z = g(null), B = null, V = null, Ee = [
97
- {
98
- label: "30分钟",
99
- value: "30min"
100
- },
101
- {
102
- label: "1小时",
103
- value: "1hour"
104
- },
105
- {
106
- label: "3小时",
107
- value: "3hour"
108
- },
109
- {
110
- label: "6小时",
111
- value: "6hour"
112
- },
113
- {
114
- label: "12小时",
115
- value: "12hour"
116
- }
117
- ], H = a(() => [...F.value].sort((e, t) => {
118
- let n = Number(e.precipitation) || 0;
119
- return (Number(t.precipitation) || 0) - n;
120
- })), U = (e) => e == null || e === "" || e === 9999, W = (e, t) => U(e) ? "--" : t ? `${e}${t}` : String(e), G = (e) => {
121
- let t = Number(e);
122
- return U(e) || isNaN(t) || t === 0 ? "无降水" : t < 10 ? "小雨" : t < 25 ? "中雨" : t < 50 ? "大雨" : t < 100 ? "暴雨" : t < 250 ? "大暴雨" : "特大暴雨";
123
- }, De = (e) => {
124
- let t = Number(e);
125
- return U(e) || isNaN(t) || t === 0 ? "rgba(255,255,255,0.6)" : t < 10 ? "#91cc75" : t < 25 ? "#fac858" : t < 50 ? "#ff9f43" : t < 100 ? "#ff6b6b" : t < 250 ? "#ff4d4f" : "#c0392b";
126
- }, Oe = () => {
127
- A("close", "PrecipitationRanking");
128
- }, ke = (e) => {
129
- A("rowClick", e);
130
- }, Ae = (e) => {
131
- R.value = e, L.value = !0, f(() => {
132
- Pe();
133
- });
134
- }, K = () => {
135
- L.value = !1, B &&= (B.dispose(), null);
136
- }, je = () => ({
137
- times: [
138
- "02时",
139
- "03时",
140
- "04时",
141
- "05时",
142
- "06时",
143
- "08时",
144
- "09时",
145
- "10时",
146
- "11时",
147
- "12时",
148
- "14时",
149
- "15时"
150
- ],
151
- unit: "mm",
152
- actual: [
153
- 0,
154
- 0,
155
- 0,
156
- 0,
157
- 0,
158
- .1,
159
- 0,
160
- 0,
161
- 0,
162
- 0,
163
- 0,
164
- 0
165
- ],
166
- forecast: [
167
- 0,
168
- 0,
169
- 0,
170
- 0,
171
- 0,
172
- 0,
173
- 0,
174
- .2,
175
- .5,
176
- 1.2,
177
- 2,
178
- 3.5
179
- ],
180
- threshold: [
181
- 30,
182
- 30,
183
- 30,
184
- 30,
185
- 30,
186
- 30,
187
- 30,
188
- 30,
189
- 30,
190
- 30,
191
- 30,
192
- 30
193
- ]
194
- }), Me = async () => {
195
- if (!R.value) return null;
196
- if (u.mock) return R.value.trendData || je();
197
- let e = J("trend");
198
- if (!e) return console.warn("PrecipitationRanking 缺少趋势图工作流配置"), null;
199
- try {
200
- return Y(await n({
201
- id: e.id,
202
- baseHttp: u.baseHttp,
203
- reqType: e.reqType,
204
- variables: {
205
- stationCode: R.value.stationCode,
206
- stationName: R.value.stationName
207
- },
208
- isFormData: e.isFormData,
209
- appKey: u.appKey,
210
- appSalt: u.appSalt
211
- })) || null;
212
- } catch (e) {
213
- return console.error("PrecipitationRanking 趋势图数据加载失败", e), null;
214
- }
215
- }, Ne = (e) => {
216
- let t = [];
217
- if (e.actual.forEach((e) => !isNaN(Number(e)) && t.push(Number(e))), e.forecast.forEach((e) => !isNaN(Number(e)) && t.push(Number(e))), e.threshold.forEach((e) => !isNaN(Number(e)) && t.push(Number(e))), !t.length) return;
218
- let n = Math.max(...t);
219
- return n <= 0 ? 10 : Math.ceil(n * 1.1);
220
- }, Pe = async () => {
221
- if (!z.value) return;
222
- let e = await Me();
223
- if (!e) return;
224
- B && B.dispose(), B = x.init(z.value);
225
- let t = {
226
- backgroundColor: "transparent",
227
- grid: {
228
- top: 40,
229
- right: 24,
230
- bottom: 32,
231
- left: 48
232
- },
233
- legend: {
234
- data: [
235
- "阈值",
236
- "正常值",
237
- "预测值"
238
- ],
239
- right: 0,
240
- top: 0,
241
- textStyle: {
242
- color: "rgba(255,255,255,0.8)",
243
- fontSize: 12
244
- },
245
- itemWidth: 12,
246
- itemHeight: 8
247
- },
248
- tooltip: {
249
- trigger: "axis",
250
- backgroundColor: "rgba(6, 32, 56, 0.95)",
251
- borderColor: "rgba(64, 158, 255, 0.4)",
252
- textStyle: { color: "#fff" },
253
- formatter: (t) => `${t[0]?.axisValue || ""}<br/>${t.map((t) => `${t.marker} ${t.seriesName}: ${t.value}${e.unit}`).join("<br/>")}`
254
- },
255
- xAxis: {
256
- type: "category",
257
- data: e.times,
258
- axisLine: { lineStyle: { color: "rgba(255,255,255,0.3)" } },
259
- axisLabel: {
260
- color: "rgba(255,255,255,0.7)",
261
- fontSize: 11
262
- },
263
- axisTick: { show: !1 }
264
- },
265
- yAxis: {
266
- type: "value",
267
- max: Ne(e),
268
- name: `单位:${e.unit}`,
269
- nameTextStyle: {
270
- color: "rgba(255,255,255,0.7)",
271
- padding: [
272
- 0,
273
- 0,
274
- 0,
275
- 8
276
- ]
277
- },
278
- axisLine: { show: !1 },
279
- axisLabel: {
280
- color: "rgba(255,255,255,0.7)",
281
- fontSize: 11
282
- },
283
- splitLine: { show: !1 },
284
- axisTick: { show: !1 }
285
- },
286
- series: [
287
- {
288
- name: "阈值",
289
- type: "line",
290
- data: e.threshold,
291
- itemStyle: { color: "#FF4D4F" },
292
- lineStyle: {
293
- type: "dashed",
294
- width: 1
295
- },
296
- symbol: "none",
297
- markLine: {
298
- silent: !0,
299
- symbol: "none",
300
- lineStyle: {
301
- color: "#FF4D4F",
302
- type: "dashed",
303
- width: 1
304
- },
305
- label: { show: !1 },
306
- data: e.threshold.map((t, n) => ({
307
- xAxis: e.times[n],
308
- yAxis: t
309
- }))
310
- }
311
- },
312
- {
313
- name: "正常值",
314
- type: "line",
315
- data: e.actual,
316
- itemStyle: { color: "#05ddfa" },
317
- lineStyle: { width: 2 },
318
- symbol: "circle",
319
- symbolSize: 5,
320
- areaStyle: { color: new x.graphic.LinearGradient(0, 0, 0, 1, [{
321
- offset: 0,
322
- color: "rgba(5, 221, 250, 0.3)"
323
- }, {
324
- offset: 1,
325
- color: "rgba(5, 221, 250, 0.02)"
326
- }]) }
327
- },
328
- {
329
- name: "预测值",
330
- type: "line",
331
- data: e.forecast,
332
- itemStyle: { color: "rgba(255,255,255,0.8)" },
333
- lineStyle: {
334
- type: "dashed",
335
- width: 2
336
- },
337
- symbol: "circle",
338
- symbolSize: 5
339
- }
340
- ]
341
- };
342
- B.setOption(t);
343
- }, Fe = ({ rowIndex: e }) => {
344
- if (e > 2) return "";
345
- let t = H.value[e];
346
- return !t || !Number(t.precipitation) ? "" : e === 0 ? "PrecipitationRanking-row--top1" : e === 1 ? "PrecipitationRanking-row--top2" : e === 2 ? "PrecipitationRanking-row--top3" : "";
347
- }, q = () => {
348
- N.value = k, I.value = [];
349
- }, Ie = (e) => {
350
- N.value = e, I.value = [], Q();
351
- }, Le = () => {
352
- if (N.value === "custom") {
353
- q(), Q();
354
- return;
355
- }
356
- N.value = "custom";
357
- }, Re = () => {
358
- I.value?.length === 2 && Q();
359
- }, J = (e) => {
360
- let t = u.ids[e] || u.ids.data;
361
- return t?.id ? t : null;
362
- }, Y = (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, ze = () => {
363
- if (N.value === "custom") return {
364
- startTime: I.value[0] || "",
365
- endTime: I.value[1] || ""
366
- };
367
- let e = /* @__PURE__ */ new Date(), t = new Date(e);
368
- switch (N.value) {
369
- case "30min":
370
- t.setMinutes(e.getMinutes() - 30);
371
- break;
372
- case "1hour":
373
- t.setHours(e.getHours() - 1);
374
- break;
375
- case "3hour":
376
- t.setHours(e.getHours() - 3);
377
- break;
378
- case "6hour":
379
- t.setHours(e.getHours() - 6);
380
- break;
381
- case "12hour":
382
- t.setHours(e.getHours() - 12);
383
- break;
384
- }
385
- return {
386
- startTime: X(t),
387
- endTime: X(e)
388
- };
389
- }, X = (e) => {
390
- let t = (e) => String(e).padStart(2, "0");
391
- return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
392
- }, Z = () => {
393
- let e = u.mockData;
394
- F.value = e.list || [], P.value = e.dataTime || "";
395
- }, Be = async () => {
396
- let e = J("data");
397
- if (!e) {
398
- console.warn("PrecipitationRanking 缺少工作流配置");
399
- return;
400
- }
401
- try {
402
- let { startTime: t, endTime: r } = ze(), i = Y(await n({
403
- id: e.id,
404
- baseHttp: u.baseHttp,
405
- reqType: e.reqType,
406
- variables: {
407
- startTime: t,
408
- endTime: r,
409
- type: N.value
410
- },
411
- isFormData: e.isFormData,
412
- appKey: u.appKey,
413
- appSalt: u.appSalt
414
- }));
415
- i && (F.value = Array.isArray(i.list) ? i.list : [], P.value = i.dataTime || "");
416
- } catch (e) {
417
- console.error("PrecipitationRanking 数据加载失败", e);
418
- }
419
- }, Q = async () => {
420
- j.value = !0, u.mock ? Z() : await Be(), j.value = !1;
421
- }, Ve = async () => {
422
- M.value = !0, q(), await Q(), setTimeout(() => {
423
- M.value = !1;
424
- }, 500);
425
- }, He = () => {
426
- let e = H.value.map((e, t) => ({
427
- 序号: t + 1,
428
- 站名: e.stationName,
429
- 行政区: e.district || "--",
430
- 累计降水量: W(e.precipitation, "mm"),
431
- 降水等级: G(e.precipitation),
432
- 数据时间: e.monitorTime || P.value || ""
433
- }));
434
- new me.default({
435
- fileName: `自动站降水排名_${(/* @__PURE__ */ new Date()).getTime()}`,
436
- datas: [{
437
- sheetData: e,
438
- sheetName: "降水排名",
439
- sheetFilter: [
440
- "序号",
441
- "站名",
442
- "行政区",
443
- "累计降水量",
444
- "降水等级",
445
- "数据时间"
446
- ],
447
- sheetHeader: [
448
- "序号",
449
- "站名",
450
- "行政区",
451
- "累计降水量",
452
- "降水等级",
453
- "数据时间"
454
- ],
455
- columnWidths: [
456
- 8,
457
- 18,
458
- 16,
459
- 18,
460
- 14,
461
- 20
462
- ]
463
- }]
464
- }).saveExcel();
465
- }, Ue = () => {
466
- $(), !(u.refreshInterval <= 0) && (V = setInterval(() => {
467
- Q();
468
- }, u.refreshInterval));
469
- }, $ = () => {
470
- V &&= (clearInterval(V), null);
471
- };
472
- return ce(() => {
473
- r?.on("toComponent", (e) => {
474
- e.componentName === "PrecipitationRanking" && Q();
475
- }), Q(), Ue();
476
- }), m(() => {
477
- $(), B &&= (B.dispose(), null);
478
- }), (t, n) => {
479
- let r = te, a = ee, u = i, d = ie, f = re, m = ne;
480
- return ue((h(), s("div", he, [
481
- c("button", {
482
- class: "PrecipitationRanking-close",
483
- onClick: Oe
484
- }, [...n[1] ||= [c("span", null, "✕", -1)]]),
485
- c("div", ge, [c("div", _e, [n[2] ||= c("h3", { class: "PrecipitationRanking-title" }, "自动站降水排名", -1), P.value ? (h(), s("span", ve, "(数据时间:" + _(P.value) + ")", 1)) : o("", !0)]), n[3] ||= c("img", {
486
- style: {
487
- width: "100%",
488
- "object-fit": "contain",
489
- "margin-top": "4px"
490
- },
491
- 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",
492
- alt: ""
493
- }, null, -1)]),
494
- c("div", ye, [c("div", be, [n[6] ||= c("span", { class: "PrecipitationRanking-toolbarLabel" }, "时间选择", -1), c("div", xe, [c("button", {
495
- class: "PrecipitationRanking-btn",
496
- onClick: He
497
- }, [l(r, { class: "PrecipitationRanking-icon" }, {
498
- default: y(() => [l(v(de))]),
499
- _: 1
500
- }), n[4] ||= c("span", null, "导出", -1)]), c("button", {
501
- class: "PrecipitationRanking-btn",
502
- onClick: Ve
503
- }, [l(r, { class: "PrecipitationRanking-icon" }, {
504
- default: y(() => [l(v(fe))]),
505
- _: 1
506
- }), n[5] ||= c("span", null, "刷新", -1)])])]), c("div", Se, [c("div", Ce, [(h(), s(ae, null, le(Ee, (e) => c("button", {
507
- key: e.value,
508
- class: p(["PrecipitationRanking-timeTab", { "PrecipitationRanking-timeTab--active": N.value === e.value }]),
509
- onClick: (t) => Ie(e.value)
510
- }, _(e.label), 11, we)), 64)), c("button", {
511
- class: p(["PrecipitationRanking-timeTab", { "PrecipitationRanking-timeTab--active": N.value === "custom" }]),
512
- onClick: Le
513
- }, " 自定义 ", 2)])])]),
514
- N.value === "custom" ? (h(), s("div", Te, [n[7] ||= c("span", { class: "PrecipitationRanking-customLabel" }, "时间范围", -1), l(u, { locale: v(pe) }, {
515
- default: y(() => [l(a, {
516
- modelValue: I.value,
517
- "onUpdate:modelValue": n[0] ||= (e) => I.value = e,
518
- type: "datetimerange",
519
- "range-separator": "至",
520
- "start-placeholder": "开始时间",
521
- "end-placeholder": "结束时间",
522
- "value-format": "YYYY-MM-DD HH",
523
- format: "YYYY-MM-DD HH",
524
- clearable: "",
525
- class: "PrecipitationRanking-datePicker",
526
- "popper-class": "PrecipitationRanking-datePopper",
527
- onChange: Re
528
- }, null, 8, ["modelValue"])]),
529
- _: 1
530
- }, 8, ["locale"])])) : o("", !0),
531
- c("div", S, [c("div", C, [l(f, {
532
- data: H.value,
533
- class: "PrecipitationRanking-table",
534
- height: e.tableHeight,
535
- "empty-text": "暂无数据",
536
- "row-class-name": Fe,
537
- onRowClick: ke
538
- }, {
539
- default: y(() => [
540
- l(d, {
541
- label: "序号",
542
- align: "center",
543
- width: "70"
544
- }, {
545
- default: y(({ $index: e }) => [c("span", { class: p(["PrecipitationRanking-rank", `PrecipitationRanking-rank--${e + 1}`]) }, _(e + 1), 3)]),
546
- _: 1
547
- }),
548
- l(d, {
549
- prop: "stationName",
550
- label: "站名",
551
- align: "left",
552
- "min-width": "80"
553
- }),
554
- l(d, {
555
- prop: "district",
556
- label: "行政区",
557
- align: "left",
558
- "min-width": "80"
559
- }),
560
- l(d, {
561
- prop: "precipitation",
562
- label: "累计降水量(mm)",
563
- align: "center",
564
- "min-width": "120"
565
- }, {
566
- default: y(({ row: e }) => [oe(_(W(e.precipitation, "")), 1)]),
567
- _: 1
568
- }),
569
- l(d, {
570
- label: "降水等级",
571
- align: "center",
572
- "min-width": "100"
573
- }, {
574
- default: y(({ row: e }) => [c("span", { style: se({ color: De(e.precipitation) }) }, _(G(e.precipitation)), 5)]),
575
- _: 1
576
- }),
577
- l(d, {
578
- label: "趋势",
579
- align: "center",
580
- width: "70"
581
- }, {
582
- default: y(({ row: e }) => [c("span", {
583
- class: "PrecipitationRanking-viewLink",
584
- onClick: b((t) => Ae(e), ["stop"])
585
- }, "查看", 8, w)]),
586
- _: 1
587
- })
588
- ]),
589
- _: 1
590
- }, 8, ["data", "height"])])]),
591
- L.value ? (h(), s("div", {
592
- key: 1,
593
- class: "PrecipitationRanking-trendMask",
594
- onClick: b(K, ["self"])
595
- }, [c("div", T, [c("div", E, [c("div", D, [n[8] ||= c("span", null, "趋势图表", -1), c("span", O, _(R.value?.stationName), 1)]), c("button", {
596
- class: "PrecipitationRanking-trendClose",
597
- onClick: K
598
- }, "✕")]), c("div", {
599
- ref_key: "trendChartRef",
600
- ref: z,
601
- class: "PrecipitationRanking-trendChart"
602
- }, null, 512)])])) : o("", !0)
603
- ])), [[m, j.value]]);
604
- };
605
- }
606
- }), [["__scopeId", "data-v-b49e3013"]]);
607
- //#endregion
608
- export { A as t };