@idmui/spot 0.0.2
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.
- package/README.md +18 -0
- package/dist/Spot/index.d.ts +4 -0
- package/dist/Spot/src/orm.vue.d.ts +71 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1388 -0
- package/dist/index.umd.cjs +1 -0
- package/dist/style.css +1 -0
- package/package.json +69 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1388 @@
|
|
|
1
|
+
import U from "moment";
|
|
2
|
+
import q from "moment-timezone";
|
|
3
|
+
import { Search as ge } from "@element-plus/icons-vue";
|
|
4
|
+
import { LngLatHelper as se } from "@idm-plugin/geo";
|
|
5
|
+
import * as re from "echarts";
|
|
6
|
+
import { markRaw as ve, resolveComponent as ae, openBlock as o, createElementBlock as n, createElementVNode as i, createVNode as le, withCtx as he, Fragment as x, renderList as _, createBlock as ye, toDisplayString as y, createCommentVNode as ie, normalizeClass as b, createTextVNode as D, normalizeStyle as $ } from "vue";
|
|
7
|
+
import de from "axios";
|
|
8
|
+
class ce {
|
|
9
|
+
static pickHourly(t, e) {
|
|
10
|
+
var h, s, u, C, W, P, N, I, H, v, S, a, l, R, T, E, G, A, F, V, O, B, J, w, k, M, Z, K, j, L, f, p, g, m;
|
|
11
|
+
const X = typeof e == "string" ? U(e) : e, Q = t.weather, pe = t.marine, oe = U(Q[0].hourly.date).utc(), ee = oe.clone().add(Q[0].hourly.time.at(0), "h"), ue = oe.clone().add(Q[0].hourly.time.at(-1), "h"), ne = [];
|
|
12
|
+
if (X.isBetween(ee, ue, "millisecond", "[]")) {
|
|
13
|
+
const d = X.utc().diff(ee, "h", !1);
|
|
14
|
+
let Y, z;
|
|
15
|
+
for (const te of Q) {
|
|
16
|
+
const c = te.hourly;
|
|
17
|
+
Y = {
|
|
18
|
+
temp: (h = c.temperature_2m) == null ? void 0 : h.at(d),
|
|
19
|
+
apparentTemp: (s = c.apparent_temperature) == null ? void 0 : s.at(d),
|
|
20
|
+
rh: (u = c.relative_humidity_2m) == null ? void 0 : u.at(d),
|
|
21
|
+
dp: (C = c.dew_point_2m) == null ? void 0 : C.at(d),
|
|
22
|
+
precip: {
|
|
23
|
+
probability: (W = c.precipitation_probability) == null ? void 0 : W.at(d),
|
|
24
|
+
sum: (P = c.precipitation) == null ? void 0 : P.at(d)
|
|
25
|
+
},
|
|
26
|
+
code: (N = c.weather_code) == null ? void 0 : N.at(d),
|
|
27
|
+
visibility: this.m2nm((I = c.visibility) == null ? void 0 : I.at(d)),
|
|
28
|
+
wind: {
|
|
29
|
+
speed: (H = c.wind_speed_10m) == null ? void 0 : H.at(d),
|
|
30
|
+
kts: (v = c.wind_speed_10m) == null ? void 0 : v.at(d),
|
|
31
|
+
degree: (S = c.wind_direction_10m) == null ? void 0 : S.at(d),
|
|
32
|
+
bearing: (((a = c.wind_direction_10m) == null ? void 0 : a.at(d)) + 180) % 360,
|
|
33
|
+
gusts: (l = c.wind_gusts_10m) == null ? void 0 : l.at(d)
|
|
34
|
+
},
|
|
35
|
+
isDay: (R = c.is_day) == null ? void 0 : R.at(d)
|
|
36
|
+
};
|
|
37
|
+
const { name: me, url: we } = this.parseWeatherCode(Y.code, Y.isDay);
|
|
38
|
+
Y.name = me, Y.url = we, Y.wind.scale = this.beaufort(this.kts2ms(Y.wind.kts)), Y.wind.direction = this.degree2Direction(Y.wind.degree);
|
|
39
|
+
}
|
|
40
|
+
for (const te of pe) {
|
|
41
|
+
const c = te.hourly;
|
|
42
|
+
z = {
|
|
43
|
+
wave: {
|
|
44
|
+
sig: {
|
|
45
|
+
height: (T = c.wave_height) == null ? void 0 : T.at(d),
|
|
46
|
+
degree: (E = c.wave_direction) == null ? void 0 : E.at(d),
|
|
47
|
+
bearing: (((G = c.wave_direction) == null ? void 0 : G.at(d)) + 180) % 360,
|
|
48
|
+
period: (A = c.wave_period) == null ? void 0 : A.at(d)
|
|
49
|
+
},
|
|
50
|
+
swell: {
|
|
51
|
+
height: (F = c.swell_wave_height) == null ? void 0 : F.at(d),
|
|
52
|
+
degree: (V = c.swell_wave_direction) == null ? void 0 : V.at(d),
|
|
53
|
+
bearing: (((O = c.swell_wave_direction) == null ? void 0 : O.at(d)) + 180) % 360,
|
|
54
|
+
period: (B = c.swell_wave_period) == null ? void 0 : B.at(d),
|
|
55
|
+
peakPeriod: (J = c.swell_wave_peak_period) == null ? void 0 : J.at(d)
|
|
56
|
+
},
|
|
57
|
+
wd: {
|
|
58
|
+
height: (w = c.wind_wave_height) == null ? void 0 : w.at(d),
|
|
59
|
+
degree: (k = c.wind_wave_direction) == null ? void 0 : k.at(d),
|
|
60
|
+
bearing: (((M = c.wind_wave_direction) == null ? void 0 : M.at(d)) + 180) % 360,
|
|
61
|
+
period: (Z = c.wind_wave_period) == null ? void 0 : Z.at(d),
|
|
62
|
+
peakPeriod: (K = c.wind_wave_peak_period) == null ? void 0 : K.at(d)
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
current: {
|
|
66
|
+
speed: (j = c.ocean_current_velocity) == null ? void 0 : j.at(d),
|
|
67
|
+
kts: (L = c.ocean_current_velocity) == null ? void 0 : L.at(d),
|
|
68
|
+
degree: (f = c.ocean_current_direction) == null ? void 0 : f.at(d),
|
|
69
|
+
bearing: (p = c.ocean_current_direction) == null ? void 0 : p.at(d)
|
|
70
|
+
},
|
|
71
|
+
sst: (g = c.sea_surface_temperature) == null ? void 0 : g.at(d),
|
|
72
|
+
height: (m = c.sea_level_height_msl) == null ? void 0 : m.at(d)
|
|
73
|
+
}, z.wave.sig.direction = this.degree2Direction(z.wave.sig.degree), z.wave.swell.direction = this.degree2Direction(z.wave.swell.degree), z.wave.wd.direction = this.degree2Direction(z.wave.wd.degree), z.wave.sig.scale = this.douglas(z.wave.sig.height), z.wave.swell.scale = this.douglas(z.wave.swell.height), z.wave.wd.scale = this.douglas(z.wave.wd.height), z.current.direction = this.degree2Direction(z.current.degree);
|
|
74
|
+
}
|
|
75
|
+
ne.push({
|
|
76
|
+
utc: ee.add(d, "h").format(),
|
|
77
|
+
weather: { ...Y },
|
|
78
|
+
...z
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return ne;
|
|
82
|
+
}
|
|
83
|
+
static pickDaily(t, e) {
|
|
84
|
+
var h, s, u, C, W, P, N, I, H, v, S, a, l, R, T, E, G, A, F, V, O, B, J;
|
|
85
|
+
const w = typeof e == "string" ? U(e) : e, k = t.weather, M = t.marine, Z = U(k[0].daily.time.at(0)), K = U(k[0].daily.time.at(-1)), j = [];
|
|
86
|
+
if (w.isBetween(Z, K, "millisecond", "[]")) {
|
|
87
|
+
let L, f;
|
|
88
|
+
const p = w.diff(Z, "d", !1);
|
|
89
|
+
for (const g of k) {
|
|
90
|
+
const m = g.daily;
|
|
91
|
+
L = {
|
|
92
|
+
code: (h = m.weather_code) == null ? void 0 : h.at(p),
|
|
93
|
+
temp: {
|
|
94
|
+
max: (s = m.temperature_2m_max) == null ? void 0 : s.at(p),
|
|
95
|
+
min: (u = m.temperature_2m_min) == null ? void 0 : u.at(p)
|
|
96
|
+
},
|
|
97
|
+
apparentTemp: {
|
|
98
|
+
max: (C = m.apparent_temperature_max) == null ? void 0 : C.at(p),
|
|
99
|
+
min: (W = m.apparent_temperature_min) == null ? void 0 : W.at(p)
|
|
100
|
+
},
|
|
101
|
+
precip: {
|
|
102
|
+
sum: (P = m.precipitation_sum) == null ? void 0 : P.at(p),
|
|
103
|
+
hours: (N = m.precipitation_hours) == null ? void 0 : N.at(p),
|
|
104
|
+
probability: (I = m.precipitation_probability_max) == null ? void 0 : I.at(p)
|
|
105
|
+
},
|
|
106
|
+
wind: {
|
|
107
|
+
speed: (H = m.wind_speed_10m_max) == null ? void 0 : H.at(p),
|
|
108
|
+
kts: (v = m.wind_speed_10m_max) == null ? void 0 : v.at(p),
|
|
109
|
+
degree: (S = m.wind_direction_10m_dominant) == null ? void 0 : S.at(p),
|
|
110
|
+
gusts: (a = m.wind_gusts_10m_max) == null ? void 0 : a.at(p)
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const { name: X, url: Q } = this.parseWeatherCode(L.code, !0);
|
|
114
|
+
L.name = X, L.url = Q, L.wind.scale = this.beaufort(this.kts2ms(L.wind.kts)), L.wind.direction = this.degree2Direction(L.wind.degree);
|
|
115
|
+
}
|
|
116
|
+
for (const g of M) {
|
|
117
|
+
const m = g.daily;
|
|
118
|
+
f = {
|
|
119
|
+
wave: {
|
|
120
|
+
sig: {
|
|
121
|
+
height: (l = m.wave_height_max) == null ? void 0 : l.at(p),
|
|
122
|
+
degree: (R = m.wave_direction_dominant) == null ? void 0 : R.at(p),
|
|
123
|
+
period: (T = m.wave_period_max) == null ? void 0 : T.at(p)
|
|
124
|
+
},
|
|
125
|
+
swell: {
|
|
126
|
+
height: (E = m.swell_wave_height_max) == null ? void 0 : E.at(p),
|
|
127
|
+
degree: (G = m.wave_direction_dominant) == null ? void 0 : G.at(p),
|
|
128
|
+
period: (A = m.swell_wave_period_max) == null ? void 0 : A.at(p),
|
|
129
|
+
peakPeriod: (F = m.swell_wave_peak_period_max) == null ? void 0 : F.at(p)
|
|
130
|
+
},
|
|
131
|
+
wd: {
|
|
132
|
+
height: (V = m.wind_wave_height_max) == null ? void 0 : V.at(p),
|
|
133
|
+
degree: (O = m.wind_wave_direction_dominant) == null ? void 0 : O.at(p),
|
|
134
|
+
period: (B = m.wind_wave_period_max) == null ? void 0 : B.at(p),
|
|
135
|
+
peakPeriod: (J = m.wind_wave_peak_period_max) == null ? void 0 : J.at(p)
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}, f.wave.sig.direction = this.degree2Direction(f.wave.sig.degree), f.wave.swell.direction = this.degree2Direction(f.wave.swell.degree), f.wave.wd.direction = this.degree2Direction(f.wave.wd.degree), f.wave.sig.scale = this.douglas(f.wave.sig.height), f.wave.swell.scale = this.douglas(f.wave.swell.height), f.wave.wd.scale = this.douglas(f.wave.wd.height);
|
|
139
|
+
}
|
|
140
|
+
j.push({
|
|
141
|
+
utc: Z.add(p, "d").utc().format(),
|
|
142
|
+
weather: { ...L },
|
|
143
|
+
...f
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
return j;
|
|
147
|
+
}
|
|
148
|
+
static parseWeatherCode(t, e) {
|
|
149
|
+
const h = this.weatherCode(t);
|
|
150
|
+
return e ? h.day : h.night;
|
|
151
|
+
}
|
|
152
|
+
static weatherCode(t) {
|
|
153
|
+
const e = {
|
|
154
|
+
code: t
|
|
155
|
+
};
|
|
156
|
+
switch (t) {
|
|
157
|
+
case 0:
|
|
158
|
+
e.day = {
|
|
159
|
+
name: "Sunny",
|
|
160
|
+
url: "https://osshz.idmwx.com/asset/weather/01d.svg"
|
|
161
|
+
}, e.night = {
|
|
162
|
+
name: "Clear",
|
|
163
|
+
url: "https://osshz.idmwx.com/asset/weather/01n.svg"
|
|
164
|
+
};
|
|
165
|
+
break;
|
|
166
|
+
case 1:
|
|
167
|
+
e.day = {
|
|
168
|
+
name: "Mainly Sunny",
|
|
169
|
+
url: "https://osshz.idmwx.com/asset/weather/01d.svg"
|
|
170
|
+
}, e.night = {
|
|
171
|
+
name: "Mainly Clear",
|
|
172
|
+
url: "https://osshz.idmwx.com/asset/weather/01n.svg"
|
|
173
|
+
};
|
|
174
|
+
break;
|
|
175
|
+
case 2:
|
|
176
|
+
e.day = {
|
|
177
|
+
name: "Partly Cloudy",
|
|
178
|
+
url: "https://osshz.idmwx.com/asset/weather/02d.svg"
|
|
179
|
+
}, e.night = {
|
|
180
|
+
name: "Partly Cloudy",
|
|
181
|
+
url: "https://osshz.idmwx.com/asset/weather/02n.svg"
|
|
182
|
+
};
|
|
183
|
+
break;
|
|
184
|
+
case 3:
|
|
185
|
+
e.day = {
|
|
186
|
+
name: "Cloudy",
|
|
187
|
+
url: "https://osshz.idmwx.com/asset/weather/03d.svg"
|
|
188
|
+
}, e.night = {
|
|
189
|
+
name: "Cloudy",
|
|
190
|
+
url: "https://osshz.idmwx.com/asset/weather/03n.svg"
|
|
191
|
+
};
|
|
192
|
+
break;
|
|
193
|
+
case 45:
|
|
194
|
+
e.day = {
|
|
195
|
+
name: "Foggy",
|
|
196
|
+
url: "https://osshz.idmwx.com/asset/weather/50d.svg"
|
|
197
|
+
}, e.night = {
|
|
198
|
+
name: "Foggy",
|
|
199
|
+
url: "https://osshz.idmwx.com/asset/weather/50n.svg"
|
|
200
|
+
};
|
|
201
|
+
break;
|
|
202
|
+
case 48:
|
|
203
|
+
e.day = {
|
|
204
|
+
name: "Rime Fog",
|
|
205
|
+
url: "https://osshz.idmwx.com/asset/weather/50d.svg"
|
|
206
|
+
}, e.night = {
|
|
207
|
+
name: "Rime Fog",
|
|
208
|
+
url: "https://osshz.idmwx.com/asset/weather/50n.svg"
|
|
209
|
+
};
|
|
210
|
+
break;
|
|
211
|
+
case 51:
|
|
212
|
+
e.day = {
|
|
213
|
+
name: "Light Drizzle",
|
|
214
|
+
url: "https://osshz.idmwx.com/asset/weather/09d.svg"
|
|
215
|
+
}, e.night = {
|
|
216
|
+
name: "Light Drizzle",
|
|
217
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
218
|
+
};
|
|
219
|
+
break;
|
|
220
|
+
case 53:
|
|
221
|
+
e.day = {
|
|
222
|
+
name: "Drizzle",
|
|
223
|
+
url: "https://osshz.idmwx.com/asset/weather/09d.svg"
|
|
224
|
+
}, e.night = {
|
|
225
|
+
name: "Drizzle",
|
|
226
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
227
|
+
};
|
|
228
|
+
break;
|
|
229
|
+
case 55:
|
|
230
|
+
e.day = {
|
|
231
|
+
name: "Heavy Drizzle",
|
|
232
|
+
url: "https://osshz.idmwx.com/asset/weather/09d.svg"
|
|
233
|
+
}, e.night = {
|
|
234
|
+
name: "Heavy Drizzle",
|
|
235
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
236
|
+
};
|
|
237
|
+
break;
|
|
238
|
+
case 56:
|
|
239
|
+
e.day = {
|
|
240
|
+
name: "Light Freezing Drizzle",
|
|
241
|
+
url: "https://osshz.idmwx.com/asset/weather/09d.svg"
|
|
242
|
+
}, e.night = {
|
|
243
|
+
name: "Light Freezing Drizzle",
|
|
244
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
245
|
+
};
|
|
246
|
+
break;
|
|
247
|
+
case 57:
|
|
248
|
+
e.day = {
|
|
249
|
+
name: "Freezing Drizzle",
|
|
250
|
+
url: "https://osshz.idmwx.com/asset/weather/09d.svg"
|
|
251
|
+
}, e.night = {
|
|
252
|
+
name: "Freezing Drizzle",
|
|
253
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
254
|
+
};
|
|
255
|
+
break;
|
|
256
|
+
case 61:
|
|
257
|
+
e.day = {
|
|
258
|
+
name: "Light Rain",
|
|
259
|
+
url: "https://osshz.idmwx.com/asset/weather/10d.svg"
|
|
260
|
+
}, e.night = {
|
|
261
|
+
name: "Light Rain",
|
|
262
|
+
url: "https://osshz.idmwx.com/asset/weather/10n.svg"
|
|
263
|
+
};
|
|
264
|
+
break;
|
|
265
|
+
case 63:
|
|
266
|
+
e.day = {
|
|
267
|
+
name: "Rain",
|
|
268
|
+
url: "https://osshz.idmwx.com/asset/weather/10d.svg"
|
|
269
|
+
}, e.night = {
|
|
270
|
+
name: "Rain",
|
|
271
|
+
url: "https://osshz.idmwx.com/asset/weather/10n.svg"
|
|
272
|
+
};
|
|
273
|
+
break;
|
|
274
|
+
case 65:
|
|
275
|
+
e.day = {
|
|
276
|
+
name: "Heavy Rain",
|
|
277
|
+
url: "https://osshz.idmwx.com/asset/weather/10d.svg"
|
|
278
|
+
}, e.night = {
|
|
279
|
+
name: "Heavy Rain",
|
|
280
|
+
url: "https://osshz.idmwx.com/asset/weather/10n.svg"
|
|
281
|
+
};
|
|
282
|
+
break;
|
|
283
|
+
case 66:
|
|
284
|
+
e.day = {
|
|
285
|
+
name: "Light Freezing Rain",
|
|
286
|
+
url: "https://osshz.idmwx.com/asset/weather/10d.svg"
|
|
287
|
+
}, e.night = {
|
|
288
|
+
name: "Light Freezing Rain",
|
|
289
|
+
url: "https://osshz.idmwx.com/asset/weather/10n.svg"
|
|
290
|
+
};
|
|
291
|
+
break;
|
|
292
|
+
case 67:
|
|
293
|
+
e.day = {
|
|
294
|
+
name: "Freezing Rain",
|
|
295
|
+
url: "https://osshz.idmwx.com/asset/weather/10d.svg"
|
|
296
|
+
}, e.night = {
|
|
297
|
+
name: "Freezing Rain",
|
|
298
|
+
url: "https://osshz.idmwx.com/asset/weather/10n.svg"
|
|
299
|
+
};
|
|
300
|
+
break;
|
|
301
|
+
case 71:
|
|
302
|
+
e.day = {
|
|
303
|
+
name: "Light Snow",
|
|
304
|
+
url: "https://osshz.idmwx.com/asset/weather/13d.svg"
|
|
305
|
+
}, e.night = {
|
|
306
|
+
name: "Light Snow",
|
|
307
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
308
|
+
};
|
|
309
|
+
break;
|
|
310
|
+
case 73:
|
|
311
|
+
e.day = {
|
|
312
|
+
name: "Snow",
|
|
313
|
+
url: "https://osshz.idmwx.com/asset/weather/13d.svg"
|
|
314
|
+
}, e.night = {
|
|
315
|
+
name: "Snow",
|
|
316
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
317
|
+
};
|
|
318
|
+
break;
|
|
319
|
+
case 75:
|
|
320
|
+
e.day = {
|
|
321
|
+
name: "Heavy Snow",
|
|
322
|
+
url: "https://osshz.idmwx.com/asset/weather/13d.svg"
|
|
323
|
+
}, e.night = {
|
|
324
|
+
name: "Heavy Snow",
|
|
325
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
326
|
+
};
|
|
327
|
+
break;
|
|
328
|
+
case 77:
|
|
329
|
+
e.day = {
|
|
330
|
+
name: "Snow Grains",
|
|
331
|
+
url: "https://osshz.idmwx.com/asset/weather/13d.svg"
|
|
332
|
+
}, e.night = {
|
|
333
|
+
name: "Snow Grains",
|
|
334
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
335
|
+
};
|
|
336
|
+
break;
|
|
337
|
+
case 80:
|
|
338
|
+
e.day = {
|
|
339
|
+
name: "Light Showers",
|
|
340
|
+
url: "https://osshz.idmwx.com/asset/weather/09d.svg"
|
|
341
|
+
}, e.night = {
|
|
342
|
+
name: "Light Showers",
|
|
343
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
344
|
+
};
|
|
345
|
+
break;
|
|
346
|
+
case 81:
|
|
347
|
+
e.day = {
|
|
348
|
+
name: "Showers",
|
|
349
|
+
url: "https://osshz.idmwx.com/asset/weather/09d.svg"
|
|
350
|
+
}, e.night = {
|
|
351
|
+
name: "Showers",
|
|
352
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
353
|
+
};
|
|
354
|
+
break;
|
|
355
|
+
case 82:
|
|
356
|
+
e.day = {
|
|
357
|
+
name: "Heavy Showers",
|
|
358
|
+
url: "https://osshz.idmwx.com/asset/weather/09d.svg"
|
|
359
|
+
}, e.night = {
|
|
360
|
+
name: "Heavy Showers",
|
|
361
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
362
|
+
};
|
|
363
|
+
break;
|
|
364
|
+
case 85:
|
|
365
|
+
e.day = {
|
|
366
|
+
name: "Light Snow Showers",
|
|
367
|
+
url: "https://osshz.idmwx.com/asset/weather/13d.svg"
|
|
368
|
+
}, e.night = {
|
|
369
|
+
name: "Light Snow Showers",
|
|
370
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
371
|
+
};
|
|
372
|
+
break;
|
|
373
|
+
case 86:
|
|
374
|
+
e.day = {
|
|
375
|
+
name: "Snow Showers",
|
|
376
|
+
url: "https://osshz.idmwx.com/asset/weather/13d.svg"
|
|
377
|
+
}, e.night = {
|
|
378
|
+
name: "Snow Showers",
|
|
379
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
380
|
+
};
|
|
381
|
+
break;
|
|
382
|
+
case 95:
|
|
383
|
+
e.day = {
|
|
384
|
+
name: "Thunderstorm",
|
|
385
|
+
url: "https://osshz.idmwx.com/asset/weather/11d.svg"
|
|
386
|
+
}, e.night = {
|
|
387
|
+
name: "Thunderstorm",
|
|
388
|
+
url: "https://osshz.idmwx.com/asset/weather/11n.svg"
|
|
389
|
+
};
|
|
390
|
+
break;
|
|
391
|
+
case 96:
|
|
392
|
+
e.day = {
|
|
393
|
+
name: "Light Thunderstorms With Hail",
|
|
394
|
+
url: "https://osshz.idmwx.com/asset/weather/11d.svg"
|
|
395
|
+
}, e.night = {
|
|
396
|
+
name: "Light Thunderstorms With Hail",
|
|
397
|
+
url: "https://osshz.idmwx.com/asset/weather/11n.svg"
|
|
398
|
+
};
|
|
399
|
+
break;
|
|
400
|
+
case 99:
|
|
401
|
+
e.day = {
|
|
402
|
+
name: "Thunderstorms With Hail",
|
|
403
|
+
url: "https://osshz.idmwx.com/asset/weather/11d.svg"
|
|
404
|
+
}, e.night = {
|
|
405
|
+
name: "Thunderstorms With Hail",
|
|
406
|
+
url: "https://osshz.idmwx.com/asset/weather/11n.svg"
|
|
407
|
+
};
|
|
408
|
+
break;
|
|
409
|
+
}
|
|
410
|
+
return e;
|
|
411
|
+
}
|
|
412
|
+
static kts2ms(t) {
|
|
413
|
+
return Number.isNaN(t) ? t : Math.round(t * 1852 / 3600 * 1e4) / 1e4;
|
|
414
|
+
}
|
|
415
|
+
static kts2kmh(t) {
|
|
416
|
+
return Number.isNaN(t) ? t : t * 1.852;
|
|
417
|
+
}
|
|
418
|
+
static m2nm(t) {
|
|
419
|
+
return Number.isNaN(t) ? t : Math.round(t / 1e3 / 1.852 * 1e4) / 1e4;
|
|
420
|
+
}
|
|
421
|
+
static kmh2kts(t) {
|
|
422
|
+
return Number.isNaN(t) ? t : this.ms2kts(t * 1e3 / 3600);
|
|
423
|
+
}
|
|
424
|
+
static ms2kts(t) {
|
|
425
|
+
return Number.isNaN(t) ? t : Math.round(t * 3600 / 1852 * 1e4) / 1e4;
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* 角度转为弧度
|
|
429
|
+
* @param degree
|
|
430
|
+
*/
|
|
431
|
+
static degree2Radian(t) {
|
|
432
|
+
if (Number.isNaN(t))
|
|
433
|
+
return t;
|
|
434
|
+
let e = t % 360 / 360 * 2 * Math.PI;
|
|
435
|
+
return e = e < 0 ? e + 2 * Math.PI : e, e;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* 将方位角转换为方向
|
|
439
|
+
* @param degree 角度[-360,360]
|
|
440
|
+
* @return {string}
|
|
441
|
+
*/
|
|
442
|
+
static degree2Direction(t) {
|
|
443
|
+
const e = this.degree2Radian(t);
|
|
444
|
+
let h = "N/A";
|
|
445
|
+
const s = Math.PI / 16;
|
|
446
|
+
return e < s ? h = "N" : e >= s && e < 3 * s ? h = "NNE" : e >= 3 * s && e < 5 * s ? h = "NE" : e >= 5 * s && e < 7 * s ? h = "ENE" : e >= 7 * s && e < 9 * s ? h = "E" : e >= 9 * s && e < 11 * s ? h = "ESE" : e >= 11 * s && e < 13 * s ? h = "SE" : e >= 13 * s && e < 15 * s ? h = "SSE" : e >= 15 * s && e < 17 * s ? h = "S" : e >= 17 * s && e < 19 * s ? h = "SSW" : e >= 19 * s && e < 21 * s ? h = "SW" : e >= 21 * s && e < 23 * s ? h = "WSW" : e >= 23 * s && e < 25 * s ? h = "W" : e >= 25 * s && e < 27 * s ? h = "WNW" : e >= 27 * s && e < 29 * s ? h = "NW" : e >= 29 * s && e < 31 * s ? h = "NNW" : e >= 31 * s && e < 32 * s && (h = "N"), h;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* 计算风力蒲福等级
|
|
450
|
+
* @param speed m/s
|
|
451
|
+
* @returns {number}
|
|
452
|
+
*/
|
|
453
|
+
static beaufort(t) {
|
|
454
|
+
let e = 0;
|
|
455
|
+
return isNaN(t) || (t = Math.round(t * 10) / 10, t <= 0.2 ? e = 0 : t <= 1.5 ? e = 1 : t <= 3.3 ? e = 2 : t <= 5.4 ? e = 3 : t <= 7.9 ? e = 4 : t <= 10.7 ? e = 5 : t <= 13.8 ? e = 6 : t <= 17.1 ? e = 7 : t <= 20.7 ? e = 8 : t <= 22.4 ? e = 9 : t <= 28.4 ? e = 10 : t <= 32.6 ? e = 11 : t > 32.6 && (e = 12)), e;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* 计算海浪等级
|
|
459
|
+
* @param height 高度 m
|
|
460
|
+
*/
|
|
461
|
+
static douglas(t) {
|
|
462
|
+
let e = "Calm";
|
|
463
|
+
return isNaN(t) || t <= 0.1 ? e = "Calm" : t <= 0.5 ? e = "Smooth" : t <= 1.25 ? e = "Slight" : t <= 2.5 ? e = "Moderate" : t <= 4 ? e = "Rough" : t <= 6 ? e = "VeryRough" : t <= 9 ? e = "High" : t <= 14 ? e = "VeryHigh" : e = "Precipitous", e;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
const fe = (r, t) => {
|
|
467
|
+
const e = r.__vccOpts || r;
|
|
468
|
+
for (const [h, s] of t)
|
|
469
|
+
e[h] = s;
|
|
470
|
+
return e;
|
|
471
|
+
}, xe = {
|
|
472
|
+
name: "SpotReport",
|
|
473
|
+
// components: { Search }, //Download
|
|
474
|
+
props: {
|
|
475
|
+
token: {
|
|
476
|
+
type: String,
|
|
477
|
+
default: ""
|
|
478
|
+
},
|
|
479
|
+
ts: {
|
|
480
|
+
type: String,
|
|
481
|
+
default: U().utc().format()
|
|
482
|
+
},
|
|
483
|
+
timeZone: {
|
|
484
|
+
type: Number,
|
|
485
|
+
default: 8
|
|
486
|
+
},
|
|
487
|
+
report: {
|
|
488
|
+
type: Object,
|
|
489
|
+
default: () => ({})
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
data() {
|
|
493
|
+
return {
|
|
494
|
+
placeholder: "search for port name or coordinates",
|
|
495
|
+
searchName: void 0,
|
|
496
|
+
rawSearchIcon: ve(ge),
|
|
497
|
+
positionGmt: void 0,
|
|
498
|
+
localDate: void 0,
|
|
499
|
+
meteoData: {},
|
|
500
|
+
a: void 0,
|
|
501
|
+
positionList: [],
|
|
502
|
+
position: void 0,
|
|
503
|
+
loading: !0,
|
|
504
|
+
activeIndex: void 0,
|
|
505
|
+
tableData: {},
|
|
506
|
+
pickedDate: void 0,
|
|
507
|
+
collectList: [],
|
|
508
|
+
isCollected: !1
|
|
509
|
+
};
|
|
510
|
+
},
|
|
511
|
+
computed: {
|
|
512
|
+
computeHourL() {
|
|
513
|
+
return function(r) {
|
|
514
|
+
return r ? `${q(r).tz(this.positionGmt).format("HH")}` : "-";
|
|
515
|
+
};
|
|
516
|
+
},
|
|
517
|
+
computeHourZ() {
|
|
518
|
+
return function(r) {
|
|
519
|
+
return r ? `${U(r).utc().format("HH")}Z` : "-";
|
|
520
|
+
};
|
|
521
|
+
},
|
|
522
|
+
computeWeek() {
|
|
523
|
+
return function(r) {
|
|
524
|
+
return r ? `${q(r).tz(this.positionGmt).format("dddd")}` : "-";
|
|
525
|
+
};
|
|
526
|
+
},
|
|
527
|
+
computeMMMDD() {
|
|
528
|
+
return function(r) {
|
|
529
|
+
return r ? `${q(r).tz(this.positionGmt).format("MMM-DD")}` : "-";
|
|
530
|
+
};
|
|
531
|
+
},
|
|
532
|
+
computeLat() {
|
|
533
|
+
return function(r, t = 4) {
|
|
534
|
+
return se.lat2pretty(r, t).pretty;
|
|
535
|
+
};
|
|
536
|
+
},
|
|
537
|
+
computeLng() {
|
|
538
|
+
return function(r, t = 4) {
|
|
539
|
+
return se.lng2pretty(r, t).pretty;
|
|
540
|
+
};
|
|
541
|
+
},
|
|
542
|
+
roundPrecision() {
|
|
543
|
+
return function(r, t = 4) {
|
|
544
|
+
return isNaN(r) ? "-" : se.roundPrecision(r, t);
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
watch: {
|
|
549
|
+
report: {
|
|
550
|
+
handler() {
|
|
551
|
+
var r, t;
|
|
552
|
+
this.report && (this.meteoData = this.report, this.position = {
|
|
553
|
+
id: this.report.portId,
|
|
554
|
+
lat: (r = this.report) == null ? void 0 : r.lat,
|
|
555
|
+
lng: (t = this.report) == null ? void 0 : t.lng,
|
|
556
|
+
name: this.computeLat(this.report.lat) + "," + this.computeLng(this.report.lng)
|
|
557
|
+
}, this.handleRender());
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
methods: {
|
|
562
|
+
handleRender() {
|
|
563
|
+
var r, t;
|
|
564
|
+
this.loading = !1, this.positionGmt = (t = (r = this.meteoData.weather) == null ? void 0 : r[0]) == null ? void 0 : t.timezone, this.localDate = q(this.ts).tz(this.positionGmt).format("MMM-DD/HHmm, YYYY [LT]"), this.activeIndex = q(this.ts).tz(this.positionGmt).hour(), this.pickedDate = q(this.ts).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.$nextTick(() => {
|
|
565
|
+
this.initInfo(), this.initTableData(), this.initEchart();
|
|
566
|
+
});
|
|
567
|
+
},
|
|
568
|
+
initInfo() {
|
|
569
|
+
this.collectList = JSON.parse(localStorage.getItem("idmCollectList") || "[]"), this.positionList = JSON.parse(JSON.stringify(this.collectList)), this.isCollected = this.collectList.some((r) => {
|
|
570
|
+
var t;
|
|
571
|
+
return r.name === ((t = this.position) == null ? void 0 : t.name);
|
|
572
|
+
});
|
|
573
|
+
},
|
|
574
|
+
initTableData() {
|
|
575
|
+
var r, t, e, h, s, u, C, W, P, N, I, H, v, S, a, l, R, T, E, G, A, F, V, O, B, J, w, k, M, Z, K, j, L;
|
|
576
|
+
this.tableData = {
|
|
577
|
+
hours: [],
|
|
578
|
+
utcHours: [],
|
|
579
|
+
weatherUrls: [],
|
|
580
|
+
temp: [],
|
|
581
|
+
precipProbability: [],
|
|
582
|
+
precip1h: [],
|
|
583
|
+
visibility: [],
|
|
584
|
+
humidity: [],
|
|
585
|
+
windSpeed: [],
|
|
586
|
+
windDir: [],
|
|
587
|
+
windGust: [],
|
|
588
|
+
sigwaveHeight: [],
|
|
589
|
+
sigwaveDir: [],
|
|
590
|
+
windwaveHeight: [],
|
|
591
|
+
windwaveDir: [],
|
|
592
|
+
windwavePeriod: [],
|
|
593
|
+
swellHeight: [],
|
|
594
|
+
swellDir: [],
|
|
595
|
+
swellPeriod: [],
|
|
596
|
+
currentSpeed: [],
|
|
597
|
+
currentDir: []
|
|
598
|
+
};
|
|
599
|
+
for (let f = 0; f < 24; f++) {
|
|
600
|
+
const p = U(this.pickedDate).clone().add(f, "h").format();
|
|
601
|
+
this.tableData.hours.push(p);
|
|
602
|
+
const g = ((r = ce.pickHourly(this.meteoData, p)) == null ? void 0 : r[0]) || {};
|
|
603
|
+
this.tableData.weatherUrls.push((t = g.weather) == null ? void 0 : t.url), this.tableData.temp.push(this.roundPrecision((e = g.weather) == null ? void 0 : e.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((s = (h = g.weather) == null ? void 0 : h.precip) == null ? void 0 : s.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((C = (u = g.weather) == null ? void 0 : u.precip) == null ? void 0 : C.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((W = g.weather) == null ? void 0 : W.visibility, 0) ?? "-"), this.tableData.humidity.push(this.roundPrecision((P = g.weather) == null ? void 0 : P.rh, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((I = (N = g.weather) == null ? void 0 : N.wind) == null ? void 0 : I.kts, 1)), this.tableData.windDir.push((v = (H = g.weather) == null ? void 0 : H.wind) == null ? void 0 : v.bearing), this.tableData.windGust.push(this.roundPrecision((a = (S = g.weather) == null ? void 0 : S.wind) == null ? void 0 : a.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((R = (l = g.wave) == null ? void 0 : l.sig) == null ? void 0 : R.height, 1) ?? "-"), this.tableData.sigwaveDir.push((E = (T = g.wave) == null ? void 0 : T.sig) == null ? void 0 : E.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((A = (G = g.wave) == null ? void 0 : G.wd) == null ? void 0 : A.height, 1) ?? "-"), this.tableData.windwaveDir.push((V = (F = g.wave) == null ? void 0 : F.wd) == null ? void 0 : V.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((B = (O = g.wave) == null ? void 0 : O.wd) == null ? void 0 : B.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((w = (J = g.wave) == null ? void 0 : J.swell) == null ? void 0 : w.height, 1) ?? "-"), this.tableData.swellDir.push((M = (k = g.wave) == null ? void 0 : k.swell) == null ? void 0 : M.bearing), this.tableData.swellPeriod.push(this.roundPrecision((K = (Z = g.wave) == null ? void 0 : Z.swell) == null ? void 0 : K.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((j = g.current) == null ? void 0 : j.speed, 1) ?? "-"), this.tableData.currentDir.push((L = g.current) == null ? void 0 : L.bearing);
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
initEchart() {
|
|
607
|
+
var l, R, T, E, G, A, F, V, O, B, J;
|
|
608
|
+
const r = [], t = [], e = [], h = [], s = [], u = [], C = [], W = [], P = [];
|
|
609
|
+
for (let w = 0; w < 7; w++) {
|
|
610
|
+
const k = U(this.pickedDate).clone().add(w, "d");
|
|
611
|
+
r.push(q(k).tz(this.positionGmt).format("yyyy-MM-DD")), t.push(this.computeMMMDD(k)), e.push(this.computeWeek(k));
|
|
612
|
+
const M = ((l = ce.pickDaily(this.meteoData, k)) == null ? void 0 : l[0]) || {};
|
|
613
|
+
h.push(this.roundPrecision((T = (R = M.weather) == null ? void 0 : R.temp) == null ? void 0 : T.min, 0)), s.push(this.roundPrecision((G = (E = M.weather) == null ? void 0 : E.temp) == null ? void 0 : G.max, 0)), C.push(this.roundPrecision((F = (A = M.weather) == null ? void 0 : A.wind) == null ? void 0 : F.kts, 1) + " kts"), P.push(this.roundPrecision((O = (V = M.weather) == null ? void 0 : V.precip) == null ? void 0 : O.sum, 0) + " mm"), u.push({ symbol: "image://" + ((B = M.weather) == null ? void 0 : B.url) }), W.push({ symbol: "image://" + ((J = M.weather) == null ? void 0 : J.url) });
|
|
614
|
+
}
|
|
615
|
+
const N = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) - Math.min(...h.filter((w) => typeof w == "number" && !isNaN(w))), I = Math.min(...h.filter((w) => typeof w == "number" && !isNaN(w))) - 1.5 * N, H = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) + 2 * N, v = 4 + 0.5 / r.length * 92 + "%", S = re.init(document.getElementById("weather-chart")), a = {
|
|
616
|
+
grid: {
|
|
617
|
+
bottom: 0,
|
|
618
|
+
top: 0,
|
|
619
|
+
left: "4%",
|
|
620
|
+
right: "4%"
|
|
621
|
+
},
|
|
622
|
+
tooltip: {
|
|
623
|
+
trigger: "none",
|
|
624
|
+
show: !1
|
|
625
|
+
},
|
|
626
|
+
legend: {
|
|
627
|
+
show: !1
|
|
628
|
+
},
|
|
629
|
+
xAxis: {
|
|
630
|
+
left: 0,
|
|
631
|
+
right: 0,
|
|
632
|
+
top: "50%",
|
|
633
|
+
height: "50%",
|
|
634
|
+
type: "category",
|
|
635
|
+
data: r,
|
|
636
|
+
show: !1
|
|
637
|
+
},
|
|
638
|
+
singleAxis: [
|
|
639
|
+
{
|
|
640
|
+
left: v,
|
|
641
|
+
right: v,
|
|
642
|
+
type: "category",
|
|
643
|
+
show: !1,
|
|
644
|
+
axisLine: {
|
|
645
|
+
show: !1
|
|
646
|
+
// 隐藏轴线
|
|
647
|
+
},
|
|
648
|
+
axisTick: {
|
|
649
|
+
show: !1
|
|
650
|
+
// 隐藏刻度
|
|
651
|
+
},
|
|
652
|
+
axisLabel: {
|
|
653
|
+
show: !1
|
|
654
|
+
// 隐藏刻度标签
|
|
655
|
+
},
|
|
656
|
+
splitLine: {
|
|
657
|
+
show: !1
|
|
658
|
+
// 隐藏分割线
|
|
659
|
+
},
|
|
660
|
+
boundaryGap: !1,
|
|
661
|
+
data: r,
|
|
662
|
+
top: "5%",
|
|
663
|
+
height: "2%"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
left: v,
|
|
667
|
+
right: v,
|
|
668
|
+
type: "category",
|
|
669
|
+
show: !1,
|
|
670
|
+
axisLine: {
|
|
671
|
+
show: !1
|
|
672
|
+
// 隐藏轴线
|
|
673
|
+
},
|
|
674
|
+
axisTick: {
|
|
675
|
+
show: !1
|
|
676
|
+
// 隐藏刻度
|
|
677
|
+
},
|
|
678
|
+
axisLabel: {
|
|
679
|
+
show: !1
|
|
680
|
+
// 隐藏刻度标签
|
|
681
|
+
},
|
|
682
|
+
splitLine: {
|
|
683
|
+
show: !1
|
|
684
|
+
// 隐藏分割线
|
|
685
|
+
},
|
|
686
|
+
boundaryGap: !1,
|
|
687
|
+
data: r,
|
|
688
|
+
top: "14%",
|
|
689
|
+
height: "2%"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
left: v,
|
|
693
|
+
right: v,
|
|
694
|
+
type: "category",
|
|
695
|
+
show: !1,
|
|
696
|
+
axisLine: {
|
|
697
|
+
show: !1
|
|
698
|
+
// 隐藏轴线
|
|
699
|
+
},
|
|
700
|
+
axisTick: {
|
|
701
|
+
show: !1
|
|
702
|
+
// 隐藏刻度
|
|
703
|
+
},
|
|
704
|
+
axisLabel: {
|
|
705
|
+
show: !1
|
|
706
|
+
// 隐藏刻度标签
|
|
707
|
+
},
|
|
708
|
+
splitLine: {
|
|
709
|
+
show: !1
|
|
710
|
+
// 隐藏分割线
|
|
711
|
+
},
|
|
712
|
+
boundaryGap: !1,
|
|
713
|
+
data: r,
|
|
714
|
+
top: "27%",
|
|
715
|
+
height: "2%"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
left: v,
|
|
719
|
+
right: v,
|
|
720
|
+
type: "category",
|
|
721
|
+
show: !1,
|
|
722
|
+
axisLine: {
|
|
723
|
+
show: !1
|
|
724
|
+
// 隐藏轴线
|
|
725
|
+
},
|
|
726
|
+
axisTick: {
|
|
727
|
+
show: !1
|
|
728
|
+
// 隐藏刻度
|
|
729
|
+
},
|
|
730
|
+
axisLabel: {
|
|
731
|
+
show: !1
|
|
732
|
+
// 隐藏刻度标签
|
|
733
|
+
},
|
|
734
|
+
splitLine: {
|
|
735
|
+
show: !1
|
|
736
|
+
// 隐藏分割线
|
|
737
|
+
},
|
|
738
|
+
boundaryGap: !1,
|
|
739
|
+
data: r,
|
|
740
|
+
top: "84%",
|
|
741
|
+
height: "2%"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
left: v,
|
|
745
|
+
right: v,
|
|
746
|
+
type: "category",
|
|
747
|
+
show: !1,
|
|
748
|
+
axisLine: {
|
|
749
|
+
show: !1
|
|
750
|
+
// 隐藏轴线
|
|
751
|
+
},
|
|
752
|
+
axisTick: {
|
|
753
|
+
show: !1
|
|
754
|
+
// 隐藏刻度
|
|
755
|
+
},
|
|
756
|
+
axisLabel: {
|
|
757
|
+
show: !1
|
|
758
|
+
// 隐藏刻度标签
|
|
759
|
+
},
|
|
760
|
+
splitLine: {
|
|
761
|
+
show: !1
|
|
762
|
+
// 隐藏分割线
|
|
763
|
+
},
|
|
764
|
+
boundaryGap: !1,
|
|
765
|
+
data: r,
|
|
766
|
+
top: "93%",
|
|
767
|
+
height: "2%"
|
|
768
|
+
}
|
|
769
|
+
],
|
|
770
|
+
yAxis: {
|
|
771
|
+
type: "value",
|
|
772
|
+
name: "温度(℃)",
|
|
773
|
+
show: !1,
|
|
774
|
+
min: I,
|
|
775
|
+
max: H,
|
|
776
|
+
axisLabel: {
|
|
777
|
+
formatter: "{value} °C"
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
series: [
|
|
781
|
+
{
|
|
782
|
+
singleAxisIndex: 0,
|
|
783
|
+
coordinateSystem: "singleAxis",
|
|
784
|
+
type: "scatter",
|
|
785
|
+
data: e,
|
|
786
|
+
label: {
|
|
787
|
+
show: !0,
|
|
788
|
+
color: "#000",
|
|
789
|
+
formatter: "{c}"
|
|
790
|
+
},
|
|
791
|
+
symbolSize: 0
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
singleAxisIndex: 1,
|
|
795
|
+
coordinateSystem: "singleAxis",
|
|
796
|
+
type: "scatter",
|
|
797
|
+
data: t,
|
|
798
|
+
label: {
|
|
799
|
+
show: !0,
|
|
800
|
+
color: "#000",
|
|
801
|
+
formatter: "{c}"
|
|
802
|
+
},
|
|
803
|
+
symbolSize: 0
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
singleAxisIndex: 2,
|
|
807
|
+
coordinateSystem: "singleAxis",
|
|
808
|
+
type: "scatter",
|
|
809
|
+
data: u,
|
|
810
|
+
symbolSize: 36
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
name: "温度(℃)",
|
|
814
|
+
type: "line",
|
|
815
|
+
data: h,
|
|
816
|
+
smooth: !0,
|
|
817
|
+
itemStyle: {
|
|
818
|
+
color: "#2a57b7"
|
|
819
|
+
},
|
|
820
|
+
label: {
|
|
821
|
+
show: !0,
|
|
822
|
+
position: [-10, 12],
|
|
823
|
+
formatter: "{c} °C",
|
|
824
|
+
fontSize: 10
|
|
825
|
+
},
|
|
826
|
+
markArea: {
|
|
827
|
+
itemStyle: {
|
|
828
|
+
color: "#e1f7ff"
|
|
829
|
+
},
|
|
830
|
+
data: [
|
|
831
|
+
[
|
|
832
|
+
{
|
|
833
|
+
x: "4%"
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
x: 4 + 1 / r.length * 92 + "%"
|
|
837
|
+
}
|
|
838
|
+
]
|
|
839
|
+
]
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
name: "温度(℃)",
|
|
844
|
+
type: "line",
|
|
845
|
+
data: s,
|
|
846
|
+
smooth: !0,
|
|
847
|
+
itemStyle: {
|
|
848
|
+
color: "#a7c4ff"
|
|
849
|
+
},
|
|
850
|
+
label: {
|
|
851
|
+
show: !0,
|
|
852
|
+
position: [-10, -12],
|
|
853
|
+
formatter: "{c} °C",
|
|
854
|
+
fontSize: 10
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
singleAxisIndex: 3,
|
|
859
|
+
coordinateSystem: "singleAxis",
|
|
860
|
+
type: "scatter",
|
|
861
|
+
data: C,
|
|
862
|
+
label: {
|
|
863
|
+
show: !0,
|
|
864
|
+
color: "#000",
|
|
865
|
+
formatter: "{c}"
|
|
866
|
+
},
|
|
867
|
+
symbolSize: 0
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
singleAxisIndex: 4,
|
|
871
|
+
coordinateSystem: "singleAxis",
|
|
872
|
+
type: "scatter",
|
|
873
|
+
data: P,
|
|
874
|
+
label: {
|
|
875
|
+
show: !0,
|
|
876
|
+
color: "#000",
|
|
877
|
+
formatter: "{c}"
|
|
878
|
+
},
|
|
879
|
+
symbolSize: 0
|
|
880
|
+
}
|
|
881
|
+
]
|
|
882
|
+
};
|
|
883
|
+
S.setOption(a), S.on("click", (w) => {
|
|
884
|
+
const k = w.dataIndex;
|
|
885
|
+
this.pickedDate = q(r[k]).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.initTableData(), a.series[3].markArea = {
|
|
886
|
+
itemStyle: {
|
|
887
|
+
color: "#e1f7ff"
|
|
888
|
+
},
|
|
889
|
+
data: [
|
|
890
|
+
[
|
|
891
|
+
{
|
|
892
|
+
x: 4 + k / r.length * 92 + "%"
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
x: 4 + (k + 1) / r.length * 92 + "%"
|
|
896
|
+
}
|
|
897
|
+
]
|
|
898
|
+
]
|
|
899
|
+
}, S.setOption(a);
|
|
900
|
+
});
|
|
901
|
+
},
|
|
902
|
+
handleCollect() {
|
|
903
|
+
this.isCollected = !this.isCollected, this.isCollected ? this.collectList.push({ name: this.position.name, lat: this.position.lat, lng: this.position.lng }) : this.collectList = this.collectList.filter((r) => r.name !== this.position.name), localStorage.setItem("idmCollectList", JSON.stringify(this.collectList));
|
|
904
|
+
},
|
|
905
|
+
async fetchSuggestPosition(r) {
|
|
906
|
+
var h;
|
|
907
|
+
const t = r.replaceAll(",", ",");
|
|
908
|
+
if (!t)
|
|
909
|
+
return this.positionList = this.collectList, !1;
|
|
910
|
+
const e = await de.get(`https://cbe.idmwx.com/api/arc/ports/suggest?n=${t}`, {
|
|
911
|
+
headers: {
|
|
912
|
+
Authorization: this.token
|
|
913
|
+
}
|
|
914
|
+
});
|
|
915
|
+
(e == null ? void 0 : e.data.code) === 0 && (this.positionList = (h = e == null ? void 0 : e.data.data) == null ? void 0 : h.map((s) => (s.name = s.id ? s.name : this.computeLat(s.lat) + ", " + this.computeLng(s.lng), s)));
|
|
916
|
+
},
|
|
917
|
+
async handleFetchMeteo() {
|
|
918
|
+
var e, h, s;
|
|
919
|
+
if (!this.searchName)
|
|
920
|
+
return !1;
|
|
921
|
+
this.position = {
|
|
922
|
+
portId: (e = this.positionList.find((u) => u.name === this.searchName)) == null ? void 0 : e.id,
|
|
923
|
+
lat: (h = this.positionList.find((u) => u.name === this.searchName)) == null ? void 0 : h.lat,
|
|
924
|
+
lng: (s = this.positionList.find((u) => u.name === this.searchName)) == null ? void 0 : s.lng,
|
|
925
|
+
name: this.searchName
|
|
926
|
+
}, this.handleClear();
|
|
927
|
+
const r = {
|
|
928
|
+
lat: this.position.lat,
|
|
929
|
+
lng: this.position.lng,
|
|
930
|
+
datetime: this.ts ? U(this.ts).utc().add(-1, "d").format() : U().add(-1, "d").utc().format(),
|
|
931
|
+
forecastDays: 8,
|
|
932
|
+
selfHosted: !1
|
|
933
|
+
}, t = await de.post("https://cbe.idmwx.com/api/arc/meteo2/spot/forecast", r, {
|
|
934
|
+
headers: {
|
|
935
|
+
Authorization: this.token
|
|
936
|
+
}
|
|
937
|
+
});
|
|
938
|
+
(t == null ? void 0 : t.data.code) === 0 && (this.meteoData = {
|
|
939
|
+
...t == null ? void 0 : t.data.data
|
|
940
|
+
}), this.handleRender();
|
|
941
|
+
},
|
|
942
|
+
handleClear() {
|
|
943
|
+
this.loading = !0, this.meteoData = {}, this.isCollected = !1, re.dispose(document.getElementById("weather-chart"));
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
}, _e = { class: "spot-report" }, be = { class: "header-box flex-between" }, ke = { class: "bg" }, De = { class: "search-box flex-start" }, ze = { class: "content-box" }, Se = { class: "title-box flex-between" }, Le = { class: "main-title" }, Ne = { class: "sub-title" }, Me = { class: "flex-end" }, Ce = {
|
|
947
|
+
key: 0,
|
|
948
|
+
id: "weather-chart"
|
|
949
|
+
}, Pe = {
|
|
950
|
+
key: 1,
|
|
951
|
+
class: "weather-chart flex-center"
|
|
952
|
+
}, Ie = {
|
|
953
|
+
key: 2,
|
|
954
|
+
class: "weather-chart flex-center"
|
|
955
|
+
}, He = {
|
|
956
|
+
key: 3,
|
|
957
|
+
class: "card-box"
|
|
958
|
+
}, We = { class: "date" }, Re = { class: "basic-table" }, Te = { class: "day" }, Ee = {
|
|
959
|
+
rowspan: "1",
|
|
960
|
+
colspan: "1",
|
|
961
|
+
class: "tr-title"
|
|
962
|
+
}, Ge = { class: "hour" }, Ae = { class: "icon" }, Fe = ["src"], Ve = { class: "text" }, Oe = { class: "text" }, Be = { class: "text" }, Je = { class: "text" }, Ue = { class: "text" }, Ye = { class: "text" }, Ze = { key: 1 }, je = { class: "text" }, qe = { class: "text" }, Ke = { class: "wave-current-table" }, Qe = { class: "text" }, Xe = { class: "text" }, $e = { key: 1 }, et = { class: "text" }, tt = { class: "text" }, st = { class: "text" }, at = { key: 1 }, it = { class: "text" }, ot = { class: "text" }, nt = { class: "text" }, rt = { key: 1 }, lt = { class: "text" }, ht = {
|
|
963
|
+
key: 4,
|
|
964
|
+
class: "card-box flex-center"
|
|
965
|
+
}, dt = {
|
|
966
|
+
key: 5,
|
|
967
|
+
class: "card-box flex-center"
|
|
968
|
+
};
|
|
969
|
+
function ct(r, t, e, h, s, u) {
|
|
970
|
+
var N, I, H, v, S;
|
|
971
|
+
const C = ae("ElOption"), W = ae("ElSelect"), P = ae("ElTooltip");
|
|
972
|
+
return o(), n("div", _e, [
|
|
973
|
+
i("div", be, [
|
|
974
|
+
i("div", ke, [
|
|
975
|
+
i("div", De, [
|
|
976
|
+
le(W, {
|
|
977
|
+
modelValue: s.searchName,
|
|
978
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => s.searchName = a),
|
|
979
|
+
filterable: "",
|
|
980
|
+
class: "input",
|
|
981
|
+
clearable: "",
|
|
982
|
+
remote: "",
|
|
983
|
+
placeholder: s.placeholder,
|
|
984
|
+
autocomplete: "",
|
|
985
|
+
"remote-show-suffix": "",
|
|
986
|
+
onFocus: t[1] || (t[1] = (a) => s.placeholder = ""),
|
|
987
|
+
onBlur: t[2] || (t[2] = (a) => s.placeholder = "search for port name or coordinates"),
|
|
988
|
+
"remote-method": u.fetchSuggestPosition,
|
|
989
|
+
onChange: u.handleFetchMeteo
|
|
990
|
+
}, {
|
|
991
|
+
default: he(() => [
|
|
992
|
+
(o(!0), n(x, null, _(s.positionList, (a) => (o(), ye(C, {
|
|
993
|
+
key: a.name,
|
|
994
|
+
label: a.name,
|
|
995
|
+
value: a.name
|
|
996
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
997
|
+
]),
|
|
998
|
+
_: 1
|
|
999
|
+
}, 8, ["modelValue", "placeholder", "remote-method", "onChange"])
|
|
1000
|
+
])
|
|
1001
|
+
])
|
|
1002
|
+
]),
|
|
1003
|
+
i("div", ze, [
|
|
1004
|
+
i("div", Se, [
|
|
1005
|
+
i("div", null, [
|
|
1006
|
+
i("div", Le, "Weather forecast for " + y(((N = s.position) == null ? void 0 : N.name) || "-") + " ( " + y(s.positionGmt) + " )", 1),
|
|
1007
|
+
i("div", Ne, "At " + y((I = s.position) != null && I.portId ? "port" : "coordinates") + ", issued " + y(s.localDate), 1)
|
|
1008
|
+
]),
|
|
1009
|
+
i("div", Me, [
|
|
1010
|
+
le(P, {
|
|
1011
|
+
placement: "left",
|
|
1012
|
+
effect: "light",
|
|
1013
|
+
content: s.isCollected ? "remove the port/coordinate from the search list" : "add the port/coordinate to the search list",
|
|
1014
|
+
"show-after": 1e3
|
|
1015
|
+
}, {
|
|
1016
|
+
default: he(() => [
|
|
1017
|
+
s.isCollected ? (o(), n("span", {
|
|
1018
|
+
key: 0,
|
|
1019
|
+
class: "iconfont icon active",
|
|
1020
|
+
onClick: t[3] || (t[3] = (...a) => u.handleCollect && u.handleCollect(...a))
|
|
1021
|
+
}, "")) : (o(), n("span", {
|
|
1022
|
+
key: 1,
|
|
1023
|
+
class: "iconfont icon",
|
|
1024
|
+
onClick: t[4] || (t[4] = (...a) => u.handleCollect && u.handleCollect(...a))
|
|
1025
|
+
}, ""))
|
|
1026
|
+
]),
|
|
1027
|
+
_: 1
|
|
1028
|
+
}, 8, ["content"])
|
|
1029
|
+
])
|
|
1030
|
+
]),
|
|
1031
|
+
(H = s.position) != null && H.name && !s.loading ? (o(), n("div", Ce)) : s.loading ? (o(), n("div", Pe, "Loading....")) : s.position.name ? ie("", !0) : (o(), n("div", Ie, "No Data")),
|
|
1032
|
+
(v = s.position) != null && v.name && !s.loading ? (o(), n("div", He, [
|
|
1033
|
+
i("div", We, y(u.computeWeek(s.pickedDate)) + " " + y(u.computeMMMDD(s.pickedDate)), 1),
|
|
1034
|
+
i("table", Re, [
|
|
1035
|
+
i("tr", Te, [
|
|
1036
|
+
i("th", Ee, "Local time (" + y(s.positionGmt) + ")", 1),
|
|
1037
|
+
(o(!0), n(x, null, _(s.tableData.hours, (a, l) => (o(), n("th", {
|
|
1038
|
+
rowspan: "1",
|
|
1039
|
+
colspan: "1",
|
|
1040
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1041
|
+
key: Math.random() + "local"
|
|
1042
|
+
}, y(u.computeHourL(a)), 3))), 128))
|
|
1043
|
+
]),
|
|
1044
|
+
i("tr", Ge, [
|
|
1045
|
+
t[5] || (t[5] = i("th", {
|
|
1046
|
+
rowspan: "1",
|
|
1047
|
+
colspan: "1",
|
|
1048
|
+
class: "tr-title"
|
|
1049
|
+
}, null, -1)),
|
|
1050
|
+
(o(!0), n(x, null, _(s.tableData.hours, (a, l) => (o(), n("th", {
|
|
1051
|
+
rowspan: "1",
|
|
1052
|
+
colspan: "1",
|
|
1053
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1054
|
+
key: Math.random() + "z"
|
|
1055
|
+
}, y(u.computeHourZ(a)), 3))), 128))
|
|
1056
|
+
]),
|
|
1057
|
+
i("tr", Ae, [
|
|
1058
|
+
t[6] || (t[6] = i("td", {
|
|
1059
|
+
rowspan: "1",
|
|
1060
|
+
colspan: "1",
|
|
1061
|
+
class: "tr-title"
|
|
1062
|
+
}, "Weather", -1)),
|
|
1063
|
+
(o(!0), n(x, null, _(s.tableData.weatherUrls, (a, l) => (o(), n("td", {
|
|
1064
|
+
rowspan: "1",
|
|
1065
|
+
colspan: "1",
|
|
1066
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1067
|
+
key: Math.random() + "url"
|
|
1068
|
+
}, [
|
|
1069
|
+
a ? (o(), n("img", {
|
|
1070
|
+
key: 0,
|
|
1071
|
+
class: "iconfont weather-icon",
|
|
1072
|
+
src: a
|
|
1073
|
+
}, null, 8, Fe)) : ie("", !0)
|
|
1074
|
+
], 2))), 128))
|
|
1075
|
+
]),
|
|
1076
|
+
i("tr", Ve, [
|
|
1077
|
+
t[7] || (t[7] = i("td", {
|
|
1078
|
+
rowspan: "1",
|
|
1079
|
+
colspan: "1",
|
|
1080
|
+
class: "tr-title"
|
|
1081
|
+
}, [
|
|
1082
|
+
D("Temperature"),
|
|
1083
|
+
i("span", { class: "unit" }, "°C")
|
|
1084
|
+
], -1)),
|
|
1085
|
+
(o(!0), n(x, null, _(s.tableData.temp, (a, l) => (o(), n("td", {
|
|
1086
|
+
rowspan: "1",
|
|
1087
|
+
colspan: "1",
|
|
1088
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1089
|
+
key: Math.random() + a
|
|
1090
|
+
}, y(a), 3))), 128))
|
|
1091
|
+
]),
|
|
1092
|
+
i("tr", Oe, [
|
|
1093
|
+
t[8] || (t[8] = i("td", {
|
|
1094
|
+
rowspan: "1",
|
|
1095
|
+
colspan: "1",
|
|
1096
|
+
class: "tr-title"
|
|
1097
|
+
}, [
|
|
1098
|
+
D("Precipitation Probability"),
|
|
1099
|
+
i("span", { class: "unit" }, "%")
|
|
1100
|
+
], -1)),
|
|
1101
|
+
(o(!0), n(x, null, _(s.tableData.precipProbability, (a, l) => (o(), n("td", {
|
|
1102
|
+
rowspan: "1",
|
|
1103
|
+
colspan: "1",
|
|
1104
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1105
|
+
key: Math.random() + a
|
|
1106
|
+
}, y(a), 3))), 128))
|
|
1107
|
+
]),
|
|
1108
|
+
i("tr", Be, [
|
|
1109
|
+
t[9] || (t[9] = i("td", {
|
|
1110
|
+
rowspan: "1",
|
|
1111
|
+
colspan: "1",
|
|
1112
|
+
class: "tr-title"
|
|
1113
|
+
}, [
|
|
1114
|
+
D("Precipitation 1h"),
|
|
1115
|
+
i("span", { class: "unit" }, "mm")
|
|
1116
|
+
], -1)),
|
|
1117
|
+
(o(!0), n(x, null, _(s.tableData.precip1h, (a, l) => (o(), n("td", {
|
|
1118
|
+
rowspan: "1",
|
|
1119
|
+
colspan: "1",
|
|
1120
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1121
|
+
key: Math.random() + a
|
|
1122
|
+
}, y(a), 3))), 128))
|
|
1123
|
+
]),
|
|
1124
|
+
i("tr", Je, [
|
|
1125
|
+
t[10] || (t[10] = i("td", {
|
|
1126
|
+
rowspan: "1",
|
|
1127
|
+
colspan: "1",
|
|
1128
|
+
class: "tr-title"
|
|
1129
|
+
}, [
|
|
1130
|
+
D("Visibility"),
|
|
1131
|
+
i("span", { class: "unit" }, "nm")
|
|
1132
|
+
], -1)),
|
|
1133
|
+
(o(!0), n(x, null, _(s.tableData.visibility, (a, l) => (o(), n("td", {
|
|
1134
|
+
rowspan: "1",
|
|
1135
|
+
colspan: "1",
|
|
1136
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1137
|
+
key: Math.random() + a
|
|
1138
|
+
}, y(a), 3))), 128))
|
|
1139
|
+
]),
|
|
1140
|
+
i("tr", Ue, [
|
|
1141
|
+
t[11] || (t[11] = i("td", {
|
|
1142
|
+
rowspan: "1",
|
|
1143
|
+
colspan: "1",
|
|
1144
|
+
class: "tr-title"
|
|
1145
|
+
}, [
|
|
1146
|
+
D("Relative Humidity"),
|
|
1147
|
+
i("span", { class: "unit" }, "%")
|
|
1148
|
+
], -1)),
|
|
1149
|
+
(o(!0), n(x, null, _(s.tableData.humidity, (a, l) => (o(), n("td", {
|
|
1150
|
+
rowspan: "1",
|
|
1151
|
+
colspan: "1",
|
|
1152
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1153
|
+
key: Math.random() + a
|
|
1154
|
+
}, y(a), 3))), 128))
|
|
1155
|
+
]),
|
|
1156
|
+
i("tr", Ye, [
|
|
1157
|
+
t[12] || (t[12] = i("td", {
|
|
1158
|
+
rowspan: "1",
|
|
1159
|
+
colspan: "1",
|
|
1160
|
+
class: "tr-title"
|
|
1161
|
+
}, [
|
|
1162
|
+
D("Wind direction"),
|
|
1163
|
+
i("span", { class: "unit" })
|
|
1164
|
+
], -1)),
|
|
1165
|
+
(o(!0), n(x, null, _(s.tableData.windDir, (a, l) => (o(), n("td", {
|
|
1166
|
+
rowspan: "1",
|
|
1167
|
+
colspan: "1",
|
|
1168
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1169
|
+
key: Math.random() + a
|
|
1170
|
+
}, [
|
|
1171
|
+
a ? (o(), n("span", {
|
|
1172
|
+
key: 0,
|
|
1173
|
+
class: "iconfont icon",
|
|
1174
|
+
style: $({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1175
|
+
}, "", 4)) : (o(), n("span", Ze, "-"))
|
|
1176
|
+
], 2))), 128))
|
|
1177
|
+
]),
|
|
1178
|
+
i("tr", je, [
|
|
1179
|
+
t[13] || (t[13] = i("td", {
|
|
1180
|
+
rowspan: "1",
|
|
1181
|
+
colspan: "1",
|
|
1182
|
+
class: "tr-title"
|
|
1183
|
+
}, [
|
|
1184
|
+
D("Wind speed"),
|
|
1185
|
+
i("span", { class: "unit" }, "kts")
|
|
1186
|
+
], -1)),
|
|
1187
|
+
(o(!0), n(x, null, _(s.tableData.windSpeed, (a, l) => (o(), n("td", {
|
|
1188
|
+
rowspan: "1",
|
|
1189
|
+
colspan: "1",
|
|
1190
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1191
|
+
key: Math.random() + a
|
|
1192
|
+
}, y(a), 3))), 128))
|
|
1193
|
+
]),
|
|
1194
|
+
i("tr", qe, [
|
|
1195
|
+
t[14] || (t[14] = i("td", {
|
|
1196
|
+
rowspan: "1",
|
|
1197
|
+
colspan: "1",
|
|
1198
|
+
class: "tr-title"
|
|
1199
|
+
}, [
|
|
1200
|
+
D("Wind gust"),
|
|
1201
|
+
i("span", { class: "unit" }, "kts")
|
|
1202
|
+
], -1)),
|
|
1203
|
+
(o(!0), n(x, null, _(s.tableData.windGust, (a, l) => (o(), n("td", {
|
|
1204
|
+
rowspan: "1",
|
|
1205
|
+
colspan: "1",
|
|
1206
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1207
|
+
key: Math.random() + a
|
|
1208
|
+
}, y(a), 3))), 128))
|
|
1209
|
+
])
|
|
1210
|
+
]),
|
|
1211
|
+
t[24] || (t[24] = i("div", { style: { "text-align": "center", padding: "3px 0 3px 200px" } }, "Wave & Current", -1)),
|
|
1212
|
+
i("table", Ke, [
|
|
1213
|
+
i("tr", Qe, [
|
|
1214
|
+
t[15] || (t[15] = i("td", {
|
|
1215
|
+
rowspan: "1",
|
|
1216
|
+
colspan: "1",
|
|
1217
|
+
class: "tr-title"
|
|
1218
|
+
}, [
|
|
1219
|
+
D("Wind wave height"),
|
|
1220
|
+
i("span", { class: "unit" }, "m")
|
|
1221
|
+
], -1)),
|
|
1222
|
+
(o(!0), n(x, null, _(s.tableData.windwaveHeight, (a, l) => (o(), n("td", {
|
|
1223
|
+
rowspan: "1",
|
|
1224
|
+
colspan: "1",
|
|
1225
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1226
|
+
key: Math.random() + a
|
|
1227
|
+
}, y(a), 3))), 128))
|
|
1228
|
+
]),
|
|
1229
|
+
i("tr", Xe, [
|
|
1230
|
+
t[16] || (t[16] = i("td", {
|
|
1231
|
+
rowspan: "1",
|
|
1232
|
+
colspan: "1",
|
|
1233
|
+
class: "tr-title"
|
|
1234
|
+
}, [
|
|
1235
|
+
D("Wind wave direction"),
|
|
1236
|
+
i("span", { class: "unit" })
|
|
1237
|
+
], -1)),
|
|
1238
|
+
(o(!0), n(x, null, _(s.tableData.windwaveDir, (a, l) => (o(), n("td", {
|
|
1239
|
+
rowspan: "1",
|
|
1240
|
+
colspan: "1",
|
|
1241
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1242
|
+
key: Math.random() + a
|
|
1243
|
+
}, [
|
|
1244
|
+
a ? (o(), n("span", {
|
|
1245
|
+
key: 0,
|
|
1246
|
+
class: "iconfont icon",
|
|
1247
|
+
style: $({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1248
|
+
}, "", 4)) : (o(), n("span", $e, "-"))
|
|
1249
|
+
], 2))), 128))
|
|
1250
|
+
]),
|
|
1251
|
+
i("tr", et, [
|
|
1252
|
+
t[17] || (t[17] = i("td", {
|
|
1253
|
+
rowspan: "1",
|
|
1254
|
+
colspan: "1",
|
|
1255
|
+
class: "tr-title"
|
|
1256
|
+
}, [
|
|
1257
|
+
D("Wind wave period"),
|
|
1258
|
+
i("span", { class: "unit" }, "s")
|
|
1259
|
+
], -1)),
|
|
1260
|
+
(o(!0), n(x, null, _(s.tableData.windwavePeriod, (a, l) => (o(), n("td", {
|
|
1261
|
+
rowspan: "1",
|
|
1262
|
+
colspan: "1",
|
|
1263
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1264
|
+
key: Math.random() + a
|
|
1265
|
+
}, y(a), 3))), 128))
|
|
1266
|
+
]),
|
|
1267
|
+
i("tr", tt, [
|
|
1268
|
+
t[18] || (t[18] = i("td", {
|
|
1269
|
+
rowspan: "1",
|
|
1270
|
+
colspan: "1",
|
|
1271
|
+
class: "tr-title"
|
|
1272
|
+
}, [
|
|
1273
|
+
D("Swell height"),
|
|
1274
|
+
i("span", { class: "unit" }, "m")
|
|
1275
|
+
], -1)),
|
|
1276
|
+
(o(!0), n(x, null, _(s.tableData.swellHeight, (a, l) => (o(), n("td", {
|
|
1277
|
+
rowspan: "1",
|
|
1278
|
+
colspan: "1",
|
|
1279
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1280
|
+
key: Math.random() + a
|
|
1281
|
+
}, y(a), 3))), 128))
|
|
1282
|
+
]),
|
|
1283
|
+
i("tr", st, [
|
|
1284
|
+
t[19] || (t[19] = i("td", {
|
|
1285
|
+
rowspan: "1",
|
|
1286
|
+
colspan: "1",
|
|
1287
|
+
class: "tr-title"
|
|
1288
|
+
}, [
|
|
1289
|
+
D("Swell direction"),
|
|
1290
|
+
i("span", { class: "unit" })
|
|
1291
|
+
], -1)),
|
|
1292
|
+
(o(!0), n(x, null, _(s.tableData.swellDir, (a, l) => (o(), n("td", {
|
|
1293
|
+
rowspan: "1",
|
|
1294
|
+
colspan: "1",
|
|
1295
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1296
|
+
key: Math.random() + a
|
|
1297
|
+
}, [
|
|
1298
|
+
a ? (o(), n("span", {
|
|
1299
|
+
key: 0,
|
|
1300
|
+
class: "iconfont icon",
|
|
1301
|
+
style: $({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1302
|
+
}, "", 4)) : (o(), n("span", at, "-"))
|
|
1303
|
+
], 2))), 128))
|
|
1304
|
+
]),
|
|
1305
|
+
i("tr", it, [
|
|
1306
|
+
t[20] || (t[20] = i("td", {
|
|
1307
|
+
rowspan: "1",
|
|
1308
|
+
colspan: "1",
|
|
1309
|
+
class: "tr-title"
|
|
1310
|
+
}, [
|
|
1311
|
+
D("Swell period"),
|
|
1312
|
+
i("span", { class: "unit" }, "s")
|
|
1313
|
+
], -1)),
|
|
1314
|
+
(o(!0), n(x, null, _(s.tableData.swellPeriod, (a, l) => (o(), n("td", {
|
|
1315
|
+
rowspan: "1",
|
|
1316
|
+
colspan: "1",
|
|
1317
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1318
|
+
key: Math.random() + a
|
|
1319
|
+
}, y(a), 3))), 128))
|
|
1320
|
+
]),
|
|
1321
|
+
i("tr", ot, [
|
|
1322
|
+
t[21] || (t[21] = i("td", {
|
|
1323
|
+
rowspan: "1",
|
|
1324
|
+
colspan: "1",
|
|
1325
|
+
class: "tr-title"
|
|
1326
|
+
}, [
|
|
1327
|
+
D("Sig wave height"),
|
|
1328
|
+
i("span", { class: "unit" }, "m")
|
|
1329
|
+
], -1)),
|
|
1330
|
+
(o(!0), n(x, null, _(s.tableData.sigwaveHeight, (a, l) => (o(), n("td", {
|
|
1331
|
+
rowspan: "1",
|
|
1332
|
+
colspan: "1",
|
|
1333
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1334
|
+
key: Math.random() + a
|
|
1335
|
+
}, y(a), 3))), 128))
|
|
1336
|
+
]),
|
|
1337
|
+
i("tr", nt, [
|
|
1338
|
+
t[22] || (t[22] = i("td", {
|
|
1339
|
+
rowspan: "1",
|
|
1340
|
+
colspan: "1",
|
|
1341
|
+
class: "tr-title"
|
|
1342
|
+
}, [
|
|
1343
|
+
D("Current direction"),
|
|
1344
|
+
i("span", { class: "unit" })
|
|
1345
|
+
], -1)),
|
|
1346
|
+
(o(!0), n(x, null, _(s.tableData.currentDir, (a, l) => (o(), n("td", {
|
|
1347
|
+
rowspan: "1",
|
|
1348
|
+
colspan: "1",
|
|
1349
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1350
|
+
key: Math.random() + a
|
|
1351
|
+
}, [
|
|
1352
|
+
a ? (o(), n("span", {
|
|
1353
|
+
key: 0,
|
|
1354
|
+
class: "iconfont icon",
|
|
1355
|
+
style: $({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1356
|
+
}, "", 4)) : (o(), n("span", rt, "-"))
|
|
1357
|
+
], 2))), 128))
|
|
1358
|
+
]),
|
|
1359
|
+
i("tr", lt, [
|
|
1360
|
+
t[23] || (t[23] = i("td", {
|
|
1361
|
+
rowspan: "1",
|
|
1362
|
+
colspan: "1",
|
|
1363
|
+
class: "tr-title"
|
|
1364
|
+
}, [
|
|
1365
|
+
D("Current speed"),
|
|
1366
|
+
i("span", { class: "unit" }, "kts")
|
|
1367
|
+
], -1)),
|
|
1368
|
+
(o(!0), n(x, null, _(s.tableData.currentSpeed, (a, l) => (o(), n("td", {
|
|
1369
|
+
rowspan: "1",
|
|
1370
|
+
colspan: "1",
|
|
1371
|
+
class: b(s.activeIndex === l ? "active" : ""),
|
|
1372
|
+
key: Math.random() + a
|
|
1373
|
+
}, y(a), 3))), 128))
|
|
1374
|
+
])
|
|
1375
|
+
])
|
|
1376
|
+
])) : s.loading ? (o(), n("div", ht, "Loading....")) : (S = s.position) != null && S.name ? ie("", !0) : (o(), n("div", dt, "No Data"))
|
|
1377
|
+
])
|
|
1378
|
+
]);
|
|
1379
|
+
}
|
|
1380
|
+
const pt = /* @__PURE__ */ fe(xe, [["render", ct], ["__scopeId", "data-v-a8325fc3"]]), ft = {
|
|
1381
|
+
install(r) {
|
|
1382
|
+
r.component("SpotReport", pt);
|
|
1383
|
+
}
|
|
1384
|
+
};
|
|
1385
|
+
export {
|
|
1386
|
+
pt as SpotReport,
|
|
1387
|
+
ft as SpotReportPlugin
|
|
1388
|
+
};
|