nxd-plugin 1.8.51 → 1.8.52

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 (39) hide show
  1. package/dist/chunks/GridData-D930GI5r.mjs +2 -0
  2. package/dist/chunks/YCServiceSummary-5zaYlO27.mjs +2 -0
  3. package/dist/chunks/{component-Forecast72h-CD6eT1xe.mjs → component-Forecast72h-PgbN_y9N.mjs} +170 -161
  4. package/dist/chunks/component-GridData-BK4jKmO-.mjs +399 -0
  5. package/dist/chunks/{component-HdCameraList-DuC-_0uH.mjs → component-HdCameraList-Ch0ojKDf.mjs} +1 -1
  6. package/dist/chunks/{component-HdFarmStation-BtYLSMAY.mjs → component-HdFarmStation-BV_kmLzl.mjs} +1 -1
  7. package/dist/chunks/component-HdMajorActivity-BS7LJXLj.mjs +718 -0
  8. package/dist/chunks/{component-HdObservation-DmRN3dBq.mjs → component-HdObservation-DrPL7XVh.mjs} +1 -1
  9. package/dist/chunks/{component-HdPreSituation-KMOE4Mt_.mjs → component-HdPreSituation-D0KUf8I4.mjs} +1 -1
  10. package/dist/chunks/{component-HdRadarList-Cx_cRpjb.mjs → component-HdRadarList-CspWsOEW.mjs} +1 -1
  11. package/dist/chunks/{component-HdRisk-Cx_Wuyuy.mjs → component-HdRisk-qQ1jbMi4.mjs} +1 -1
  12. package/dist/chunks/{component-HdServiceMarterial-D4nik4h0.mjs → component-HdServiceMarterial-DAf5Wr6D.mjs} +1 -1
  13. package/dist/chunks/{component-HdServiceRequirements-CrpxYdNK.mjs → component-HdServiceRequirements-CycjsvZT.mjs} +1 -1
  14. package/dist/chunks/{component-HdSoil-eQTGGIkq.mjs → component-HdSoil-BKDaVRnf.mjs} +1 -1
  15. package/dist/chunks/{component-HdStationTem-BCls8KKc.mjs → component-HdStationTem-Cb2YV_fB.mjs} +1 -1
  16. package/dist/chunks/{component-HdSuggestion-BnGlQLfg.mjs → component-HdSuggestion-fajQUBiB.mjs} +1 -1
  17. package/dist/chunks/{component-HdThreeWeatherTrend-D_dPqael.mjs → component-HdThreeWeatherTrend-CeAHvlR3.mjs} +1 -1
  18. package/dist/chunks/{component-HdWaveForcast-B-RPD_5H.mjs → component-HdWaveForcast-DRuTytq8.mjs} +1 -1
  19. package/dist/chunks/{component-HighwayWeatherForecast-BVj7aWS1.mjs → component-HighwayWeatherForecast-CUk0YFO6.mjs} +2 -2
  20. package/dist/chunks/{component-PrecipitationRanking-Ct4OY0FJ.mjs → component-PrecipitationRanking-Nq_SI95N.mjs} +1 -1
  21. package/dist/chunks/{component-StationDialog-_pkrpDnI.mjs → component-StationDialog-B-6V3oc5.mjs} +1 -1
  22. package/dist/chunks/{component-StationList-D4XTo6r2.mjs → component-StationList-qtk1j-fG.mjs} +1 -1
  23. package/dist/chunks/{component-TimeBasedForecast-4ZZ7ZnCH.mjs → component-TimeBasedForecast-DdTGq6GE.mjs} +1 -1
  24. package/dist/chunks/component-WeatherForecast-g9IL5upq.mjs +219 -0
  25. package/dist/chunks/{component-YCHome-BNYalrzu.mjs → component-YCHome-nJZqqhcF.mjs} +1 -1
  26. package/dist/components/HdMajorActivity/HdMajorActivity.vue.d.ts +6 -2
  27. package/dist/index.d.ts +2 -2
  28. package/dist/nxd-plugin.mjs +25 -26
  29. package/dist/styles/component-Forecast72h.css +1 -1
  30. package/dist/styles/component-GridData.css +1 -1
  31. package/dist/styles/component-HdMajorActivity.css +1 -1
  32. package/dist/styles/component-WeatherForecast.css +1 -1
  33. package/dist/styles/component-YCLoginNew.css +1 -1
  34. package/package.json +1 -1
  35. package/dist/chunks/YCServiceSummary-V18ZZfMw.mjs +0 -2
  36. package/dist/chunks/component-GridData-o7hipw0h.mjs +0 -756
  37. package/dist/chunks/component-HdMajorActivity-CQ76SEKD.mjs +0 -710
  38. package/dist/chunks/component-WeatherForecast-DqdD9JUX.mjs +0 -208
  39. /package/dist/chunks/{component-YCServiceSummary-B-ixNRkt.mjs → component-YCServiceSummary-BKkRTMKf.mjs} +0 -0
@@ -1,710 +0,0 @@
1
- import { g as e, p as t } from "./component-Agent-DwXtdLhK.mjs";
2
- import "./component-Forecast72h-CD6eT1xe.mjs";
3
- import { ElCarousel as n, ElCarouselItem as r, ElDatePicker as i, ElImageViewer as ee, ElLoadingDirective as te } from "element-plus/es";
4
- import { Fragment as a, Teleport as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createVNode as f, defineComponent as p, nextTick as m, normalizeClass as h, onMounted as ne, openBlock as g, ref as _, renderList as v, toDisplayString as y, vShow as b, watch as x, withCtx as re, withDirectives as S } from "vue";
5
- import * as ie from "echarts";
6
- import "element-plus/dist/index.css";
7
- //#region src/assets/img/hd/wwindDirection.png
8
- var ae = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAGFBMVEX/////qBX/owf/pAT/ogL/ogH/ogD/ogC7UYbMAAAAB3RSTlMDJENqg8HizO9CmQAAAE9JREFUeNpjIBMwmriAgBFcgKUcDErgAqwQgSIkASUQEMAtwAbRUowpgNACttYASQBCo1hbCqRRzRBAUREaGoyqBUgMEwGWMvSIMmKgBAAAftMfdMqbYD0AAAAASUVORK5CYII=", oe = {
9
- class: "HdMajorActivity",
10
- "element-loading-background": "rgba(0, 0, 0, 0.5)"
11
- }, se = { class: "HdMajorActivity-body" }, ce = { class: "HdMajorActivity-yearBar" }, le = {
12
- key: 0,
13
- class: "HdMajorActivity-cover"
14
- }, ue = ["src"], de = {
15
- key: 1,
16
- class: "HdMajorActivity-coverPlaceholder"
17
- }, fe = ["disabled"], pe = ["disabled"], me = { class: "HdMajorActivity-coverMask" }, he = { class: "HdMajorActivity-coverInfo" }, ge = { class: "HdMajorActivity-coverTitle" }, _e = { class: "HdMajorActivity-coverTime" }, ve = { class: "HdMajorActivity-coverTimeValue" }, ye = {
18
- key: 1,
19
- class: "HdMajorActivity-section"
20
- }, be = { class: "HdMajorActivity-introduction" }, xe = {
21
- key: 2,
22
- class: "HdMajorActivity-section"
23
- }, Se = ["src", "onClick"], Ce = {
24
- key: 3,
25
- class: "HdMajorActivity-noData"
26
- }, we = {
27
- key: 0,
28
- class: "HdMajorActivity-popupMask"
29
- }, Te = { class: "HdMajorActivity-popup" }, Ee = { class: "HdMajorActivity-popupHead" }, De = { class: "HdMajorActivity-popupHeadTitle" }, Oe = { class: "HdMajorActivity-popupBody" }, ke = { class: "HdMajorActivity-popupTop" }, Ae = { class: "HdMajorActivity-popupCover" }, je = ["src"], Me = {
30
- key: 1,
31
- class: "HdMajorActivity-popupCoverPlaceholder"
32
- }, Ne = { class: "HdMajorActivity-popupRealtime" }, Pe = { class: "HdMajorActivity-popupRealtimeTitle" }, Fe = {
33
- key: 0,
34
- class: "HdMajorActivity-popupRealtimeUpdate"
35
- }, Ie = {
36
- key: 0,
37
- class: "HdMajorActivity-popupLoading"
38
- }, Le = {
39
- key: 1,
40
- class: "HdMajorActivity-popupRealtimeGrid"
41
- }, Re = { class: "HdMajorActivity-popupRealtimeItem" }, ze = { class: "HdMajorActivity-popupRealtimeValue" }, Be = { class: "HdMajorActivity-popupRealtimeItem" }, Ve = { class: "HdMajorActivity-popupRealtimeValue" }, He = { class: "HdMajorActivity-popupRealtimeItem" }, Ue = { class: "HdMajorActivity-popupRealtimeValue" }, We = { class: "HdMajorActivity-popupRealtimeItem" }, Ge = { class: "HdMajorActivity-popupRealtimeValue" }, Ke = { class: "HdMajorActivity-popupRealtimeItem" }, qe = { class: "HdMajorActivity-popupRealtimeValue" }, Je = { class: "HdMajorActivity-popupRealtimeItem" }, Ye = { class: "HdMajorActivity-popupRealtimeValue" }, Xe = { class: "HdMajorActivity-popupRealtimeItem" }, Ze = { class: "HdMajorActivity-popupRealtimeValue" }, Qe = { class: "HdMajorActivity-popupRealtimeItem" }, $e = { class: "HdMajorActivity-popupRealtimeValue" }, et = { class: "HdMajorActivity-popupSection" }, tt = { class: "HdMajorActivity-popupSectionHead" }, nt = { class: "HdMajorActivity-popupTabs" }, rt = { class: "HdMajorActivity-popupElementTabs" }, it = ["onClick"], at = {
42
- key: 0,
43
- class: "HdMajorActivity-popupLoading"
44
- }, ot = { key: 1 }, st = { class: "HdMajorActivity-popupTableWrap" }, ct = { class: "HdMajorActivity-popupTable" }, lt = { key: 0 }, ut = /* @__PURE__ */ t(/* @__PURE__ */ p({
45
- __name: "HdMajorActivity",
46
- props: {
47
- mock: {
48
- type: Boolean,
49
- default: !1
50
- },
51
- baseHttp: { default: "" },
52
- appKey: { default: "" },
53
- appSalt: { default: "" },
54
- imgBaseUrl: { default: "" },
55
- ids: { default: () => ({}) },
56
- refreshInterval: { default: 0 },
57
- yearField: { default: "year" },
58
- stationField: { default: "stationIdC" },
59
- timeStartField: { default: "startTime" },
60
- timeEndField: { default: "endTime" },
61
- layerBaseUrl: { default: "" }
62
- },
63
- emits: [
64
- "close",
65
- "toComponent",
66
- "addMarker",
67
- "clearMarker",
68
- "addPolygon",
69
- "removePolygon",
70
- "addLayer",
71
- "removeLayer",
72
- "mapView"
73
- ],
74
- setup(t, { expose: p, emit: ut }) {
75
- let dt = (/* @__PURE__ */ new Date()).getFullYear(), ft = dt - 20, pt = dt + 10, C = t, w = ut, mt = {
76
- 青岛国际啤酒节: "重大活动保障-啤酒节",
77
- 沙滩马拉松: "重大活动保障-马拉松"
78
- }, T = _(!1), E = _([]), D = _(null), O = _(0), k = _(!1), ht = _(0), A = _(!1), j = _(null), M = _(!1), N = _(!1), P = _({}), F = _([]), I = _([]), L = _("chart"), R = _("temperature"), z = _(null), B = null, V = [
79
- {
80
- key: "temperature",
81
- label: "温度",
82
- valueField: "temp",
83
- unit: "°C",
84
- type: "line",
85
- realField: "tem",
86
- forecastField: "tmp",
87
- color: "#FF7D00",
88
- forecastColor: "#FFC72C"
89
- },
90
- {
91
- key: "humidity",
92
- label: "湿度",
93
- valueField: "humidity",
94
- unit: "%",
95
- type: "line",
96
- realField: "rhu_min",
97
- forecastField: "erh",
98
- color: "#00B42A",
99
- forecastColor: "#7CFC00"
100
- },
101
- {
102
- key: "wind",
103
- label: "风向风速",
104
- valueField: "windSpeed",
105
- unit: "m/s",
106
- type: "line",
107
- realField: "win_s_inst_max",
108
- forecastField: "eda10",
109
- color: "#05ddfa",
110
- forecastColor: "#00FFFF"
111
- },
112
- {
113
- key: "visibility",
114
- label: "能见度",
115
- valueField: "visibility",
116
- unit: "m",
117
- type: "line",
118
- realField: "vis_min",
119
- forecastField: "vis",
120
- color: "#F7BA1E",
121
- forecastColor: "#FFD700"
122
- },
123
- {
124
- key: "rain",
125
- label: "降水",
126
- valueField: "rain",
127
- unit: "mm",
128
- type: "bar",
129
- realField: "",
130
- forecastField: "er01",
131
- color: "#165DFF",
132
- forecastColor: "#5B8FF9"
133
- }
134
- ], gt = s(() => {
135
- let e = P.value, t = K(e.humidity), n = K(e.visibility), r = K(e.windSpeed);
136
- return n !== null && n < 1e3 && t !== null && t > 90 ? "雾" : n !== null && n < 4e3 ? "霾" : t !== null && t >= 80 ? "阴" : t !== null && t <= 30 ? "晴" : r !== null && r >= 10.8 ? "大风" : "多云";
137
- }), H = s(() => D.value ? E.value.filter((e) => {
138
- let t = e.year || St(e.start_time);
139
- return String(t) === String(D.value);
140
- }) : E.value), U = s(() => H.value[O.value] || null), _t = s(() => G(U.value?.cover_image)), W = s(() => {
141
- let e = U.value?.images;
142
- return e ? e.split(",").map((e) => G(e.trim())).filter(Boolean) : [];
143
- }), vt = s(() => G(j.value?.cover_image)), yt = s(() => F.value.map((e) => ({
144
- ...e,
145
- time: Y(e.time)
146
- }))), bt = (e) => {
147
- let t = e.getFullYear();
148
- return t < ft || t > pt;
149
- }, xt = () => {
150
- O.value = 0, Jt();
151
- }, St = (e) => {
152
- if (!e) return null;
153
- let t = new Date(e);
154
- return isNaN(t.getTime()) ? null : t.getFullYear();
155
- }, G = (e) => e ? e.startsWith("http://") || e.startsWith("https://") ? e : `${C.imgBaseUrl.replace(/\/$/, "")}${e.startsWith("/") ? e : `/${e}`}` : "", Ct = (e) => {
156
- if (e == null || e === "") return !0;
157
- let t = Number(e);
158
- return Number.isFinite(t) ? t === -1 || t === 999 || t === 9999 : !1;
159
- }, K = (e) => {
160
- if (Ct(e)) return null;
161
- let t = Number(e);
162
- return Number.isFinite(t) ? t : null;
163
- }, q = (e) => Ct(e) ? "--" : String(e), J = (e) => {
164
- let t = K(e);
165
- return t === null ? "--" : [
166
- "北风",
167
- "东北风",
168
- "东风",
169
- "东南风",
170
- "南风",
171
- "西南风",
172
- "西风",
173
- "西北风"
174
- ][Math.round((t % 360 + 360) % 360 / 45) % 8];
175
- }, Y = (e) => {
176
- if (!e) return "--";
177
- let t = new Date(e);
178
- return isNaN(t.getTime()) ? e : `${t.getFullYear()}-${X(t.getMonth() + 1)}-${X(t.getDate())} ${X(t.getHours())}:00`;
179
- }, X = (e) => e < 10 ? `0${e}` : `${e}`, wt = (e) => `${e.start_time ? e.start_time.split(" ")[0] : "--"} 至 ${e.end_time ? e.end_time.split(" ")[0] : "--"}`, Tt = (e) => {
180
- if (e.status === 0) return "未开始";
181
- if (e.status === 1) return "进行中";
182
- if (e.status === 2) return "已结束";
183
- let t = (/* @__PURE__ */ new Date()).getTime(), n = e.start_time ? new Date(e.start_time).getTime() : 0, r = e.end_time ? new Date(e.end_time).getTime() : 0;
184
- return n && t < n ? "未开始" : r && t > r ? "已结束" : "进行中";
185
- }, Et = (e) => {
186
- let t = Tt(e);
187
- return t === "未开始" ? "HdMajorActivity-status--pending" : t === "进行中" ? "HdMajorActivity-status--active" : "HdMajorActivity-status--ended";
188
- }, Dt = () => {
189
- O.value > 0 && O.value--;
190
- }, Ot = () => {
191
- O.value < H.value.length - 1 && O.value++;
192
- }, kt = (e) => {
193
- ht.value = e, k.value = !0;
194
- }, At = () => {
195
- k.value = !1;
196
- }, jt = () => {
197
- w("close", "HdMajorActivity");
198
- }, Mt = () => {
199
- w("clearMarker", "HdMajorActivity"), w("removePolygon", "HdMajorActivity"), w("removeLayer", { name: "HdMajorActivity" });
200
- }, Nt = (e) => {
201
- if (!e) return [];
202
- if (Array.isArray(e)) return e;
203
- try {
204
- let t = JSON.parse(e);
205
- if (Array.isArray(t)) return t;
206
- } catch {
207
- console.warn("HdMajorActivity 区域坐标解析失败", e);
208
- }
209
- return [];
210
- }, Pt = () => {
211
- let e = U.value;
212
- if (!e) {
213
- Mt();
214
- return;
215
- }
216
- Mt(), e.layer_id && C.layerBaseUrl && w("addLayer", {
217
- name: "HdMajorActivity",
218
- oneLayer: {
219
- mapUrl: C.layerBaseUrl,
220
- type: e.layer_id,
221
- opacity: 1
222
- },
223
- visible: !0,
224
- zIndex: 10
225
- });
226
- let t = Nt(e.area_coordinates);
227
- t.length >= 3 && !e.layer_id && w("addPolygon", {
228
- removePolygon: "HdMajorActivity",
229
- polygonArr: [{
230
- polygonJson: t.map(([e, t]) => ({
231
- lng: e,
232
- lat: t
233
- })),
234
- lineColor: "#FFD700",
235
- color: "#FFD700",
236
- weight: 2,
237
- fillColor: "#FFD700",
238
- fillOpacity: .2,
239
- otherData: { polyId: "HdMajorActivity" },
240
- zIndex: 10
241
- }]
242
- });
243
- let n = Number(e.center_latitude), r = Number(e.center_longitude);
244
- if (Number.isFinite(n) && Number.isFinite(r)) {
245
- let t = e.major_icon ? e.major_icon.trim().startsWith("<") ? e.major_icon : `<img src="${G(e.major_icon)}" width="24" height="24" style="display:block;" alt="" />` : "\n <svg viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"#05ddfa\" stroke=\"#fff\" stroke-width=\"1.5\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z\"/>\n <circle cx=\"12\" cy=\"9\" r=\"2.5\" fill=\"#fff\"/>\n </svg>\n ";
246
- w("addMarker", {
247
- mapMarker: {
248
- clickOpen: !0,
249
- spotObject: [{
250
- offsetX: -12,
251
- offsetY: -24,
252
- minZoom: 10,
253
- spotArrone: [{
254
- lng: r,
255
- lat: n,
256
- htmlString: `
257
- <div data-markerId="major-${e.id}" class="hd-major-marker" title="${e.location}" style="position:relative;display:inline-block;width:24px;height:24px;cursor:pointer;">
258
- ${t}
259
- </div>
260
- <div style="color:#fff;font-size:10px;text-shadow:0 0 5px #000;">${e.location}</div>
261
- `,
262
- data: e,
263
- otherData: {
264
- markId: "HdMajorActivity",
265
- activityId: e.id
266
- }
267
- }]
268
- }],
269
- drawArrObj: []
270
- },
271
- removeMarker: "HdMajorActivity"
272
- }), w("mapView", {
273
- lng: r,
274
- lat: n,
275
- zoom: 12
276
- });
277
- }
278
- }, Ft = (e) => {
279
- j.value = e, A.value = !0, L.value = "chart", I.value = [e.start_time ? e.start_time.split(" ")[0] : "", e.end_time ? e.end_time.split(" ")[0] : ""], Vt(e), Ht(e);
280
- }, It = () => {
281
- A.value = !1, j.value = null, B &&= (B.dispose(), null);
282
- }, Lt = (e) => {
283
- if (!e) return {};
284
- let t = Array.isArray(e) ? e[0] : e;
285
- if (!t || typeof t != "object") return {};
286
- let n = K(t.win_d_s_max);
287
- return {
288
- temp: t.tem,
289
- maxTemp: t.tem_max,
290
- minTemp: t.tem_min,
291
- windSpeed: t.win_s_inst_max,
292
- windDirectionAngle: t.win_d_s_max,
293
- windDirection: n === null ? "--" : J(n),
294
- pressure: t.prs,
295
- humidity: t.rhu_min,
296
- visibility: t.vis_min,
297
- updateTime: t.datetime_bj
298
- };
299
- }, Rt = (e) => {
300
- let t = K(e.win_d_s_max);
301
- return {
302
- time: e.datetime_bj,
303
- temp: e.tem,
304
- windSpeed: e.win_s_inst_max,
305
- windDirectionAngle: e.win_d_s_max,
306
- windDirection: t === null ? "--" : J(t),
307
- rain: null,
308
- humidity: e.rhu_min,
309
- pressure: e.prs,
310
- visibility: e.vis_min,
311
- type: "real"
312
- };
313
- }, zt = (e) => {
314
- let t = K(e.eda10_dir);
315
- return {
316
- time: e.f_time,
317
- temp: e.tmp,
318
- windSpeed: e.eda10,
319
- windDirectionAngle: e.eda10_dir,
320
- windDirection: t === null ? "--" : J(t),
321
- rain: e.er01,
322
- humidity: e.erh,
323
- pressure: null,
324
- visibility: e.vis,
325
- type: "forecast"
326
- };
327
- }, Bt = (e) => {
328
- let t = Array.isArray(e) ? e[0] : e;
329
- if (!t || typeof t != "object") return [];
330
- let n = Array.isArray(t.situationData) ? t.situationData : [], r = Array.isArray(t.forecastData) ? t.forecastData : [];
331
- return [...n.map(Rt), ...r.map(zt)].sort((e, t) => new Date(e.time).getTime() - new Date(t.time).getTime());
332
- }, Vt = async (t) => {
333
- let n = Q("realTime");
334
- if (!(!n || !t.station_id)) {
335
- M.value = !0;
336
- try {
337
- P.value = Lt($(await e({
338
- id: n.id,
339
- baseHttp: C.baseHttp,
340
- reqType: n.reqType,
341
- variables: {
342
- [C.stationField]: t.station_id,
343
- [C.timeStartField]: t.start_time,
344
- [C.timeEndField]: t.end_time
345
- },
346
- isFormData: n.isFormData,
347
- appKey: C.appKey,
348
- appSalt: C.appSalt
349
- })));
350
- } catch (e) {
351
- console.error("HdMajorActivity 实况数据加载失败", e);
352
- }
353
- M.value = !1;
354
- }
355
- }, Ht = async (t) => {
356
- let n = Q("timeSeries");
357
- if (!(!n || !t.station_id)) {
358
- N.value = !0;
359
- try {
360
- F.value = Bt($(await e({
361
- id: n.id,
362
- baseHttp: C.baseHttp,
363
- reqType: n.reqType,
364
- variables: {
365
- [C.stationField]: t.station_id,
366
- [C.timeStartField]: t.start_time,
367
- [C.timeEndField]: t.end_time
368
- },
369
- isFormData: n.isFormData,
370
- appKey: C.appKey,
371
- appSalt: C.appSalt
372
- }))), N.value = !1, await m(), Z();
373
- } catch (e) {
374
- console.error("HdMajorActivity 时序数据加载失败", e), N.value = !1;
375
- }
376
- }
377
- }, Z = () => {
378
- if (!z.value) return;
379
- B &&= (B.dispose(), null);
380
- let e = F.value;
381
- if (!e.length) return;
382
- let t = V.find((e) => e.key === R.value);
383
- if (!t) return;
384
- let n = e.filter((e) => e.type === "real"), r = e.filter((e) => e.type === "forecast"), i = Array.from(new Set([...n, ...r].map((e) => Y(e.time)))), ee = new Map(n.map((e) => [Y(e.time), K(e[t.valueField])])), te = new Map(r.map((e) => [Y(e.time), K(e[t.valueField])])), a = i.map((e) => ee.get(e) ?? null), o = i.map((e) => te.get(e) ?? null), s = t.key === "wind", c = `image://${ae}`, l = new Map(n.map((e) => [Y(e.time), K(e.windDirectionAngle)])), u = new Map(r.map((e) => [Y(e.time), K(e.windDirectionAngle)])), d = (e, t, n) => n ? i.map((n, r) => {
385
- let i = t.get(n);
386
- return {
387
- value: e[r],
388
- symbol: c,
389
- symbolSize: 18,
390
- symbolRotate: i == null ? 0 : -i
391
- };
392
- }) : e;
393
- B = ie.init(z.value);
394
- let f = {
395
- tooltip: {
396
- trigger: "axis",
397
- formatter: (e) => {
398
- let n = Array.isArray(e) ? e : [e], r = `<div style="font-weight:bold;margin-bottom:4px;">${n[0]?.axisValue}</div>`;
399
- return n.forEach((e) => {
400
- let n = e.value === null || e.value === void 0 ? "--" : e.value;
401
- if (r += `<div>${e.marker} ${e.seriesName}:${n}${t.unit}</div>`, s) {
402
- let t = (e.seriesName === "实况" ? l : u).get(i[e.dataIndex]), n = t == null ? "--" : J(t);
403
- r += `<div style="padding-left:16px;">风向:${n}</div>`;
404
- }
405
- }), r;
406
- }
407
- },
408
- legend: {
409
- data: ["实况", "预报"],
410
- textStyle: { color: "#fff" }
411
- },
412
- grid: {
413
- left: "3%",
414
- right: "4%",
415
- bottom: "3%",
416
- containLabel: !0
417
- },
418
- xAxis: {
419
- type: "category",
420
- data: i,
421
- axisLine: { lineStyle: { color: "rgba(255,255,255,0.4)" } },
422
- axisLabel: {
423
- color: "rgba(255,255,255,0.7)",
424
- rotate: 30
425
- }
426
- },
427
- yAxis: {
428
- type: "value",
429
- name: t.unit,
430
- axisLine: { lineStyle: { color: "rgba(255,255,255,0.4)" } },
431
- axisLabel: { color: "rgba(255,255,255,0.7)" },
432
- splitLine: { show: !1 }
433
- },
434
- series: [{
435
- name: "实况",
436
- type: t.type,
437
- data: d(a, l, s),
438
- smooth: !0,
439
- itemStyle: { color: t.color },
440
- lineStyle: { width: 2 },
441
- symbol: s ? c : "circle",
442
- symbolSize: s ? 18 : 6,
443
- ...t.type === "bar" ? {
444
- stack: "total",
445
- barMaxWidth: 16
446
- } : {}
447
- }, {
448
- name: "预报",
449
- type: t.type,
450
- data: d(o, u, s),
451
- smooth: !0,
452
- itemStyle: { color: t.forecastColor },
453
- lineStyle: {
454
- width: 2,
455
- type: "dashed"
456
- },
457
- symbol: s ? c : "circle",
458
- symbolSize: s ? 18 : 6,
459
- ...t.type === "bar" ? {
460
- stack: "total",
461
- barMaxWidth: 16
462
- } : {}
463
- }]
464
- };
465
- B.setOption(f), m(() => setTimeout(() => B?.resize(), 80));
466
- }, Ut = !1, Wt = () => {
467
- Ut ||= (document.addEventListener("click", (e) => {
468
- let t = e.target.closest(".hd-major-marker");
469
- if (!t) return;
470
- e.stopPropagation();
471
- let n = t.getAttribute("data-markerId")?.replace("major-", "") || "", r = E.value.find((e) => String(e.id) === String(n));
472
- r && Ft(r);
473
- }), !0);
474
- }, Q = (e) => {
475
- let t = C.ids[e];
476
- return t?.id ? t : null;
477
- }, $ = (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, Gt = () => D.value ? { [C.yearField]: Number(D.value) } : {}, Kt = () => {
478
- E.value = [{
479
- id: 1,
480
- name: "2018上合组织青岛峰会",
481
- location: "青岛国际会议中心",
482
- start_time: "2018-06-09 00:00:00",
483
- end_time: "2018-06-10 00:00:00",
484
- cover_image: "",
485
- images: "",
486
- introduction: "上海合作组织成员国元首理事会会议。",
487
- status: 2,
488
- year: 2018,
489
- area_coordinates: "[[120.3825,36.0612],[120.3912,36.0612],[120.3912,36.0558],[120.3825,36.0558]]",
490
- center_latitude: 36.0585,
491
- center_longitude: 120.3868,
492
- station_id: "54943"
493
- }, {
494
- id: 2,
495
- name: "啤酒节",
496
- location: "青岛会议中心",
497
- start_time: "2026-09-02 00:00:00",
498
- end_time: "2026-09-03 00:00:00",
499
- cover_image: "",
500
- images: "",
501
- introduction: "青岛国际啤酒节。",
502
- status: 1,
503
- year: 2026,
504
- layer_id: "",
505
- area_coordinates: "[[120.168,35.951],[120.1725,35.9495],[120.177,35.951],[120.1725,35.9525]]",
506
- center_latitude: 35.9508,
507
- center_longitude: 120.1725,
508
- station_id: "54943"
509
- }];
510
- }, qt = async () => {
511
- let t = Q("data");
512
- if (!t) {
513
- console.warn("HdMajorActivity 缺少工作流配置");
514
- return;
515
- }
516
- try {
517
- let n = $(await e({
518
- id: t.id,
519
- baseHttp: C.baseHttp,
520
- reqType: t.reqType,
521
- variables: Gt(),
522
- isFormData: t.isFormData,
523
- appKey: C.appKey,
524
- appSalt: C.appSalt
525
- }));
526
- Array.isArray(n) ? E.value = n : n && Array.isArray(n.list) ? E.value = n.list : E.value = [];
527
- } catch (e) {
528
- console.error("HdMajorActivity 数据加载失败", e);
529
- }
530
- }, Jt = async () => {
531
- T.value = !0, C.mock ? Kt() : await qt(), T.value = !1, Wt();
532
- };
533
- return ne(() => {
534
- Jt();
535
- }), x(U, () => {
536
- Pt();
537
- }, { immediate: !0 }), x(U, (e) => {
538
- let t = e?.name ? mt[e.name] : "";
539
- t && w("toComponent", {
540
- componentName: "HdServiceMarterial",
541
- categoryName: t
542
- });
543
- }, { immediate: !0 }), x(L, (e) => {
544
- e === "chart" && m(() => Z());
545
- }), x(R, () => {
546
- L.value === "chart" && m(() => Z());
547
- }), x(A, (e) => {
548
- e && L.value === "chart" && m(() => setTimeout(Z, 100));
549
- }), p({ openPopup: Ft }), (e, t) => {
550
- let s = i, p = r, m = n, ne = ee, _ = te;
551
- return S((g(), u("div", oe, [
552
- d("button", {
553
- class: "HdMajorActivity-close",
554
- onClick: jt
555
- }, [...t[4] ||= [d("span", null, "✕", -1)]]),
556
- t[24] ||= d("div", { class: "HdMajorActivity-header" }, [d("div", { class: "HdMajorActivity-headerContent" }, [d("h3", { class: "HdMajorActivity-title" }, "重大活动")]), d("img", {
557
- class: "HdMajorActivity-headerLine",
558
- 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",
559
- alt: ""
560
- })], -1),
561
- d("div", se, [
562
- d("div", ce, [t[5] ||= d("span", { class: "HdMajorActivity-yearLabel" }, "年份", -1), f(s, {
563
- modelValue: D.value,
564
- "onUpdate:modelValue": t[0] ||= (e) => D.value = e,
565
- type: "year",
566
- placeholder: "全部",
567
- "value-format": "YYYY",
568
- format: "YYYY",
569
- size: "small",
570
- clearable: !0,
571
- teleported: !1,
572
- class: "HdMajorActivity-yearPicker",
573
- "popper-class": "HdMajorActivity-yearPopper",
574
- "disabled-date": bt,
575
- onChange: xt
576
- }, null, 8, ["modelValue"])]),
577
- U.value ? (g(), u("div", le, [
578
- _t.value ? (g(), u("img", {
579
- key: 0,
580
- src: _t.value,
581
- alt: "活动封面"
582
- }, null, 8, ue)) : (g(), u("div", de, "暂无封面")),
583
- d("button", {
584
- class: "HdMajorActivity-coverArrow HdMajorActivity-coverArrow--left",
585
- disabled: O.value <= 0,
586
- onClick: Dt
587
- }, [...t[6] ||= [d("svg", {
588
- viewBox: "0 0 24 24",
589
- width: "16",
590
- height: "16",
591
- fill: "none",
592
- stroke: "currentColor",
593
- "stroke-width": "2"
594
- }, [d("polyline", { points: "15 18 9 12 15 6" })], -1)]], 8, fe),
595
- d("button", {
596
- class: "HdMajorActivity-coverArrow HdMajorActivity-coverArrow--right",
597
- disabled: O.value >= H.value.length - 1,
598
- onClick: Ot
599
- }, [...t[7] ||= [d("svg", {
600
- viewBox: "0 0 24 24",
601
- width: "16",
602
- height: "16",
603
- fill: "none",
604
- stroke: "currentColor",
605
- "stroke-width": "2"
606
- }, [d("polyline", { points: "9 18 15 12 9 6" })], -1)]], 8, pe),
607
- d("div", me, [d("div", he, [d("h4", ge, y(U.value.name), 1), d("div", _e, [t[8] ||= d("span", { class: "HdMajorActivity-coverTimeLabel" }, "服务时间:", -1), d("span", ve, y(wt(U.value)), 1)])]), d("div", null, [d("span", { class: h(["HdMajorActivity-coverStatus", Et(U.value)]) }, y(Tt(U.value)), 3)])])
608
- ])) : l("", !0),
609
- U.value ? (g(), u("div", ye, [t[9] ||= d("div", { class: "HdMajorActivity-sectionTitle" }, "活动介绍", -1), d("div", be, y(U.value.introduction || "暂无介绍"), 1)])) : l("", !0),
610
- W.value.length ? (g(), u("div", xe, [t[10] ||= d("div", { class: "HdMajorActivity-sectionTitle" }, "活动图片", -1), f(m, {
611
- class: "HdMajorActivity-carouselBox",
612
- height: "140px",
613
- autoplay: !1,
614
- "indicator-position": "outside",
615
- arrow: "always"
616
- }, {
617
- default: re(() => [(g(!0), u(a, null, v(W.value, (e, t) => (g(), c(p, { key: t }, {
618
- default: re(() => [d("img", {
619
- class: "HdMajorActivity-carouselImage",
620
- src: e,
621
- alt: "活动图片",
622
- onClick: (e) => kt(t)
623
- }, null, 8, Se)]),
624
- _: 2
625
- }, 1024))), 128))]),
626
- _: 1
627
- })])) : l("", !0),
628
- !H.value.length && !T.value ? (g(), u("div", Ce, "暂无活动数据")) : l("", !0)
629
- ]),
630
- (g(), c(o, { to: "body" }, [k.value ? (g(), c(ne, {
631
- key: 0,
632
- "url-list": W.value,
633
- "initial-index": ht.value,
634
- onClose: At
635
- }, null, 8, ["url-list", "initial-index"])) : l("", !0)])),
636
- (g(), c(o, { to: "body" }, [A.value ? (g(), u("div", we, [d("div", Te, [d("div", Ee, [d("span", De, y(j.value?.location || j.value?.name), 1), d("button", {
637
- class: "HdMajorActivity-popupClose",
638
- onClick: It
639
- }, [...t[11] ||= [d("span", null, "✕", -1)]])]), d("div", Oe, [d("div", ke, [d("div", Ae, [vt.value ? (g(), u("img", {
640
- key: 0,
641
- src: vt.value,
642
- alt: "封面"
643
- }, null, 8, je)) : (g(), u("div", Me, "暂无封面"))]), d("div", Ne, [d("div", Pe, [t[12] ||= d("span", null, "要素实况", -1), P.value.updateTime ? (g(), u("span", Fe, y(P.value.updateTime) + " 更新", 1)) : l("", !0)]), M.value ? (g(), u("div", Ie, "加载中...")) : (g(), u("div", Le, [
644
- d("div", Re, [t[13] ||= d("span", { class: "HdMajorActivity-popupRealtimeLabel" }, "天气", -1), d("span", ze, y(gt.value), 1)]),
645
- d("div", Be, [t[14] ||= d("span", { class: "HdMajorActivity-popupRealtimeLabel" }, "最高温度", -1), d("span", Ve, y(q(P.value.maxTemp)) + "°C", 1)]),
646
- d("div", He, [t[15] ||= d("span", { class: "HdMajorActivity-popupRealtimeLabel" }, "最低温度", -1), d("span", Ue, y(q(P.value.minTemp)) + "°C", 1)]),
647
- d("div", We, [t[16] ||= d("span", { class: "HdMajorActivity-popupRealtimeLabel" }, "风速", -1), d("span", Ge, y(q(P.value.windSpeed)) + " m/s", 1)]),
648
- d("div", Ke, [t[17] ||= d("span", { class: "HdMajorActivity-popupRealtimeLabel" }, "风向", -1), d("span", qe, y(P.value.windDirection || "--"), 1)]),
649
- d("div", Je, [t[18] ||= d("span", { class: "HdMajorActivity-popupRealtimeLabel" }, "气压", -1), d("span", Ye, y(q(P.value.pressure)) + " hPa", 1)]),
650
- d("div", Xe, [t[19] ||= d("span", { class: "HdMajorActivity-popupRealtimeLabel" }, "相对湿度", -1), d("span", Ze, y(q(P.value.humidity)) + "%", 1)]),
651
- d("div", Qe, [t[20] ||= d("span", { class: "HdMajorActivity-popupRealtimeLabel" }, "能见度", -1), d("span", $e, y(q(P.value.visibility)) + " m", 1)])
652
- ]))])]), d("div", et, [
653
- d("div", tt, [t[21] ||= d("span", { class: "HdMajorActivity-popupSectionTitle" }, "要素时序", -1), f(s, {
654
- modelValue: I.value,
655
- "onUpdate:modelValue": t[1] ||= (e) => I.value = e,
656
- type: "daterange",
657
- size: "small",
658
- disabled: !0,
659
- "value-format": "YYYY-MM-DD",
660
- format: "YYYY-MM-DD",
661
- "start-placeholder": "开始日期",
662
- "end-placeholder": "结束日期",
663
- class: "HdMajorActivity-popupTimePicker",
664
- "popper-class": "HdMajorActivity-yearPopper"
665
- }, null, 8, ["modelValue"])]),
666
- d("div", nt, [d("button", {
667
- class: h(["HdMajorActivity-popupTab", { "is-active": L.value === "chart" }]),
668
- onClick: t[2] ||= (e) => L.value = "chart"
669
- }, "图表", 2), d("button", {
670
- class: h(["HdMajorActivity-popupTab", { "is-active": L.value === "table" }]),
671
- onClick: t[3] ||= (e) => L.value = "table"
672
- }, "表格", 2)]),
673
- S(d("div", rt, [(g(), u(a, null, v(V, (e) => d("button", {
674
- key: e.key,
675
- class: h(["HdMajorActivity-popupElementTab", { "is-active": R.value === e.key }]),
676
- onClick: (t) => R.value = e.key
677
- }, y(e.label), 11, it)), 64))], 512), [[b, L.value === "chart"]]),
678
- N.value ? (g(), u("div", at, "加载中...")) : (g(), u("div", ot, [S(d("div", {
679
- ref_key: "chartRef",
680
- ref: z,
681
- class: "HdMajorActivity-popupChart"
682
- }, null, 512), [[b, L.value === "chart"]]), S(d("div", st, [d("table", ct, [t[23] ||= d("thead", null, [d("tr", null, [
683
- d("th", null, "时间"),
684
- d("th", null, "温度(°C)"),
685
- d("th", null, "风速(m/s)"),
686
- d("th", null, "风向"),
687
- d("th", null, "小时降水(mm)"),
688
- d("th", null, "相对湿度(%)"),
689
- d("th", null, "能见度(km)"),
690
- d("th", null, "类型")
691
- ])], -1), d("tbody", null, [(g(!0), u(a, null, v(yt.value, (e, t) => (g(), u("tr", { key: t }, [
692
- d("td", null, y(e.time), 1),
693
- d("td", null, y(q(e.temp)), 1),
694
- d("td", null, y(q(e.windSpeed)), 1),
695
- d("td", null, y(e.windDirection || "--"), 1),
696
- d("td", null, y(q(e.rain)), 1),
697
- d("td", null, y(q(e.humidity)), 1),
698
- d("td", null, y(q(e.visibility)), 1),
699
- d("td", null, [d("span", { class: h(["HdMajorActivity-popupTypeTag", `is-${e.type || "real"}`]) }, y(e.type === "forecast" ? "预报" : "实况"), 3)])
700
- ]))), 128)), yt.value.length ? l("", !0) : (g(), u("tr", lt, [...t[22] ||= [d("td", {
701
- colspan: "8",
702
- class: "HdMajorActivity-popupNoData"
703
- }, "暂无数据", -1)]]))])])], 512), [[b, L.value === "table"]])]))
704
- ])])])])) : l("", !0)]))
705
- ])), [[_, T.value]]);
706
- };
707
- }
708
- }), [["__scopeId", "data-v-1752b734"]]);
709
- //#endregion
710
- export { ut as t };