nxd-plugin 1.6.0 → 1.6.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.
Files changed (25) hide show
  1. package/dist/chunks/{component-HighWayEarlyWarningRed-C4eUxLai.mjs → component-HighWayEarlyWarningRed-B24zorkZ.mjs} +2 -2
  2. package/dist/chunks/{component-HighWayFreeze-Bu_esAjA.mjs → component-HighWayFreeze-DTZgUHLb.mjs} +22 -18
  3. package/dist/chunks/{component-HighwayLiveAlarm-D5A8U6nr.mjs → component-HighwayLiveAlarm-DH_Radnp.mjs} +2 -2
  4. package/dist/chunks/{component-HighwayLiveAlarmNew-HTEc2Sb9.mjs → component-HighwayLiveAlarmNew-BRmrckoI.mjs} +3 -3
  5. package/dist/chunks/{component-HighwayStations-EkqsQMyT.mjs → component-HighwayStations-BADne1O5.mjs} +3 -3
  6. package/dist/chunks/{component-HighwayWeatherForecast-BevrRin0.mjs → component-HighwayWeatherForecast-D3pduycn.mjs} +2 -2
  7. package/dist/chunks/{component-ImageGeneration-Dl868bT0.mjs → component-ImageGeneration-BWVqHs7l.mjs} +4 -4
  8. package/dist/chunks/{component-LithiumBatteryMiningArea-UCOjHXW5.mjs → component-LithiumBatteryMiningArea-QPD9ERqx.mjs} +3 -3
  9. package/dist/chunks/component-RadarShortTerm-BktH6eB6.mjs +345 -0
  10. package/dist/chunks/{component-ServiceMaterialsBtn-ATwSSBGA.mjs → component-ServiceMaterialsBtn-IIYNTWxy.mjs} +4 -4
  11. package/dist/chunks/{component-TimeBasedForecast-BcpYv2vT.mjs → component-TimeBasedForecast-9At0jrIg.mjs} +5 -5
  12. package/dist/chunks/{component-WeatherForecast-4vw_2TY8.mjs → component-WeatherForecast-DFqXrhZl.mjs} +3 -3
  13. package/dist/chunks/{component-YCHome-Bkh0LsrR.mjs → component-YCHome-BGMzJhDv.mjs} +8 -8
  14. package/dist/chunks/{component-YCLogin-DlL6em53.mjs → component-YCLogin-CFe09txe.mjs} +4 -4
  15. package/dist/chunks/{component-YCLoginNew-CC2fkd71.mjs → component-YCLoginNew-BDpy2huY.mjs} +5 -5
  16. package/dist/nxd-plugin.mjs +15 -15
  17. package/dist/src/components/RadarShortTerm/RadarShortTerm.vue.d.ts +2 -0
  18. package/dist/styles/component-HighWayEarlyWarningRed.css +1 -1
  19. package/dist/styles/component-HighWayFreeze.css +1 -1
  20. package/dist/styles/component-RadarShortTerm.css +1 -1
  21. package/dist/styles/component-YCHome.css +1 -1
  22. package/dist/styles/component-YCLogin.css +1 -1
  23. package/dist/styles/component-YCLoginNew.css +1 -1
  24. package/package.json +1 -1
  25. package/dist/chunks/component-RadarShortTerm-DRcLYADs.mjs +0 -327
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nxd-plugin",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "main": "dist/nxd-plugin.mjs",
5
5
  "module": "dist/nxd-plugin.mjs",
6
6
  "types": "dist/src/index.d.ts",
@@ -1,327 +0,0 @@
1
- import "./rolldown-runtime-Dd0fQ6-X.mjs";
2
- import { A as e, S as t, j as n, m as r } from "./component-HighWayFreeze-Bu_esAjA.mjs";
3
- import { i, n as a, r as o } from "./component-HighWayEarlyWarningRed-C4eUxLai.mjs";
4
- import "./component-ImageGeneration-Dl868bT0.mjs";
5
- import { n as s } from "./component-HighwayLiveAlarmNew-HTEc2Sb9.mjs";
6
- import { Fragment as c, computed as l, createBlock as u, createCommentVNode as ee, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, nextTick as te, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as ne, onMounted as v, openBlock as y, ref as b, renderList as x, toDisplayString as S, unref as C, vShow as w, watch as T, withCtx as E, withDirectives as D } from "vue";
7
- //#region src/components/RadarShortTerm/RadarShortTerm.vue?vue&type=script&setup=true&lang.ts
8
- var re = { class: "RadarShortTerm" }, ie = { class: "RadarShortTerm-setting-panel" }, ae = { class: "display-setting" }, oe = { class: "setting-row setting-row-pile" }, se = { class: "setting-pile-options" }, ce = { class: "RadarShortTerm-table" }, O = { class: "table-body" }, le = ["onClick"], ue = { class: "name" }, de = ["onClick"], k = {
9
- key: 0,
10
- style: { color: "red" }
11
- }, A = { class: "pile-panel" }, fe = {
12
- key: 0,
13
- class: "pile-body"
14
- }, pe = {
15
- key: 1,
16
- class: "pile-empty"
17
- }, me = { class: "RadarShortTerm-timeline" }, he = ["title"], ge = { class: "timeline-slider-wrap" }, _e = { class: "timeline-time-label" }, ve = { class: "radarAxis-li" }, ye = ["onClick"], be = { class: "radarAxis-li-node-text" }, j = /* @__PURE__ */ o(/* @__PURE__ */ h({
18
- __name: "RadarShortTerm",
19
- props: {
20
- appKey: {
21
- type: String,
22
- default: ""
23
- },
24
- appSalt: {
25
- type: String,
26
- default: ""
27
- },
28
- baseHttp: {
29
- type: String,
30
- default: ""
31
- },
32
- ids: {
33
- type: Object,
34
- default: () => ({})
35
- }
36
- },
37
- emits: [
38
- "close",
39
- "addImage",
40
- "clearImg",
41
- "addDataTitle",
42
- "removeDataTitle",
43
- "showRadarLegend"
44
- ],
45
- setup(o, { emit: h }) {
46
- let j = o, M = h, N = b(!0), P = b(!1), F = b(0), I = b(null), L = b([]), R = b({}), z = b({}), B = b({}), V = b(""), H = b(null);
47
- v(() => {
48
- xe();
49
- }), ne(() => {
50
- Q();
51
- });
52
- let xe = async () => {
53
- let e = await Se(), t = await i({
54
- appKey: j.appKey,
55
- appSalt: j.appSalt,
56
- id: j.ids.radar.id,
57
- variables: {},
58
- baseHttp: j.baseHttp,
59
- reqType: j.ids.radar.reqType,
60
- isFormData: j.ids.radar.isFormData
61
- });
62
- console.log("雷达", t.data.result);
63
- let n = await i({
64
- appKey: j.appKey,
65
- appSalt: j.appSalt,
66
- id: j.ids.historyRadar.id,
67
- variables: {},
68
- baseHttp: j.baseHttp,
69
- reqType: j.ids.historyRadar.reqType,
70
- isFormData: j.ids.historyRadar.isFormData
71
- });
72
- console.log("历史雷达", n.data.result);
73
- let r = U(t.data.result), a = U(n.data.result), o = a.frames.slice(0, 3).reverse().map((e, t) => ({
74
- ...e,
75
- focarcast_time: e.observation_time,
76
- _isHistory: !0,
77
- _label: t === 0 ? "-2" : t === 1 ? "-1" : "现在",
78
- _httpurl: (a.httpurl || "") + (e.observation_time || "").slice(0, 10).replaceAll("-", "") + "/"
79
- })), s = r.frames.map((e, t) => ({
80
- ...e,
81
- _isHistory: !1,
82
- _label: `+${t + 1}`,
83
- _httpurl: r.httpurl || ""
84
- }));
85
- B.value = {
86
- ds: [...o, ...s],
87
- httpurl: r.httpurl,
88
- ...r.extent
89
- }, F.value = 2, N.value && setTimeout(() => {
90
- Z(0);
91
- }, 1e3), L.value = e.map((e) => {
92
- let t = Te(e), n = Ee(e.zhflds || []);
93
- return {
94
- name: e.name,
95
- tags: De(t),
96
- piles: n
97
- };
98
- }), we();
99
- }, Se = async () => {
100
- let e = await i({
101
- appKey: j.appKey,
102
- appSalt: j.appSalt,
103
- id: j.ids.shortTerm.id,
104
- variables: {},
105
- baseHttp: j.baseHttp,
106
- reqType: j.ids.shortTerm.reqType,
107
- isFormData: j.ids.shortTerm.isFormData
108
- });
109
- return console.log("短时预报", e.data.result.ds), e.data.result.ds || [];
110
- }, Ce = (e) => {
111
- let t = String(e || "").split(",").map((e) => Number(e.trim()));
112
- return {
113
- lngStart: t[0],
114
- lngEnd: t[1],
115
- latStart: t[2],
116
- latEnd: t[3]
117
- };
118
- }, U = (e) => {
119
- let t = Array.isArray(e?.ds) ? e : e?.ds, n = Array.isArray(t?.ds) ? t.ds : [];
120
- n = [...n].reverse();
121
- let r = Ce(n[0]?.extendstr || ""), i = t?.httpUrl || t?.httpurl || "";
122
- return {
123
- frames: n,
124
- httpurl: i,
125
- extent: r
126
- };
127
- }, W = l(() => Y(L.value, (e) => J(e.tags))), G = l(() => B.value?.ds || []), K = l(() => G.value.map((e) => {
128
- let t = new Date(e.focarcast_time);
129
- return `${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}`;
130
- })), q = l(() => ({
131
- httpurl: B.value?.httpurl || "",
132
- lngStart: B.value?.lngStart,
133
- latStart: B.value?.latStart,
134
- lngEnd: B.value?.lngEnd,
135
- latEnd: B.value?.latEnd
136
- })), we = () => {
137
- let e = W.value.find((e) => J(e.tags)), t = {}, n = {};
138
- e && (t[e.name] = !0, n[e.name] = !0), R.value = t, z.value = n;
139
- }, Te = (e) => {
140
- let t = e.zhflds || [];
141
- return {
142
- iswarnpre1h: t.some((e) => e?.iswarnpre1h === 1) ? 1 : 0,
143
- iswarnpre2h: t.some((e) => e?.iswarnpre2h === 1) ? 1 : 0,
144
- iswarnpre3h: t.some((e) => e?.iswarnpre3h === 1) ? 1 : 0
145
- };
146
- }, Ee = (e) => Y((e || []).map((e) => ({
147
- pileNo: `${e.type || ""}${e.Name || ""}`,
148
- isWarn: e?.iswarnpre1h === 1 || e?.iswarnpre2h === 1 || e?.iswarnpre3h === 1,
149
- rain1h: e?.rain_1h ?? "-",
150
- rain2h: e?.rain_2h ?? "-",
151
- rain3h: e?.rain_3h ?? "-"
152
- })), (e) => e.isWarn), De = (e) => [
153
- {
154
- label: "未来R1h",
155
- warn: e.iswarnpre1h === 1
156
- },
157
- {
158
- label: "未来R2h",
159
- warn: e.iswarnpre2h === 1
160
- },
161
- {
162
- label: "未来R3h",
163
- warn: e.iswarnpre3h === 1
164
- }
165
- ], J = (e) => e.some((e) => e.warn), Y = (e, t) => [...e].sort((e, n) => Number(t(n)) - Number(t(e))), X = (e) => e.filter((e) => e.isWarn).length, Oe = (e) => {
166
- if (!e) return null;
167
- let t = String(e?._httpurl || q.value.httpurl || ""), n = String(e?.file_name || "");
168
- return {
169
- alt: "",
170
- imgUrl: n.startsWith("http") ? n : `${t}${n.replace(/^\/+/, "")}`,
171
- lngStart: q.value.lngStart,
172
- latStart: q.value.latStart,
173
- lngEnd: q.value.lngEnd,
174
- latEnd: q.value.latEnd,
175
- opacity: 1,
176
- zIndex: 1e3,
177
- otherData: { imgId: "radar_RadarShortTerm" }
178
- };
179
- }, Z = (e) => {
180
- let t = G.value[e], n = { imgArr: [Oe(t)] };
181
- console.log(n), M("addImage", {
182
- removeImg: "radar_RadarShortTerm",
183
- data: n
184
- }), V.value && M("removeDataTitle", V.value), V.value = "雷达观测时间:" + a(t.focarcast_time).format("YYYY-MM-DD HH:mm "), console.log(V.value), M("addDataTitle", V.value), M("showRadarLegend", !0);
185
- }, Q = () => {
186
- I.value &&= (clearInterval(I.value), null);
187
- }, $ = () => {
188
- P.value = !1, Q();
189
- }, ke = () => {
190
- K.value.length <= 1 || (P.value = !0, Q(), I.value = setInterval(() => {
191
- F.value = (F.value + 1) % K.value.length;
192
- }, 1e3));
193
- }, Ae = () => {
194
- if (P.value) {
195
- $();
196
- return;
197
- }
198
- ke();
199
- };
200
- T(F, (e) => {
201
- Z(e);
202
- }), T(F, () => {
203
- te(() => {
204
- let e = H.value;
205
- if (!e) return;
206
- let t = e.querySelectorAll(".radarAxis-li")[F.value];
207
- t && t.scrollIntoView({
208
- behavior: "smooth",
209
- inline: "center",
210
- block: "nearest"
211
- });
212
- });
213
- });
214
- let je = () => {
215
- $();
216
- }, Me = () => {
217
- if (!N.value) {
218
- M("clearImg", "radar_RadarShortTerm"), M("removeDataTitle", V.value), M("showRadarLegend", !1), $();
219
- return;
220
- }
221
- Z(F.value);
222
- }, Ne = (e) => {
223
- let t = !!R.value[e];
224
- R.value[e] = !t, t || (z.value[e] = !0);
225
- }, Pe = (e) => {
226
- z.value[e] = !z.value[e];
227
- }, Fe = () => {
228
- M("close", "RadarShortTerm");
229
- };
230
- return (i, a) => {
231
- let o = s, l = r;
232
- return y(), d("div", re, [
233
- f("div", { class: "RadarShortTerm-head" }, [f("div", { class: "RadarShortTerm-head-top" }, [a[1] ||= f("div", null, "雷达短临预报", -1), f("div", { class: "head-actions" }, [f("div", {
234
- class: "closeBtn",
235
- onClick: Fe,
236
- title: "关闭"
237
- })])]), a[2] ||= f("img", {
238
- class: "RadarShortTerm-head-line",
239
- 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",
240
- alt: ""
241
- }, null, -1)]),
242
- f("div", ie, [f("div", ae, [f("div", oe, [a[4] ||= f("span", { class: "setting-label" }, "雷达展示:", -1), f("div", se, [m(o, {
243
- modelValue: N.value,
244
- "onUpdate:modelValue": a[0] ||= (e) => N.value = e,
245
- class: "pile-checkbox",
246
- onChange: Me
247
- }, {
248
- default: E(() => [...a[3] ||= [p(" 显示 ", -1)]]),
249
- _: 1
250
- }, 8, ["modelValue"])])])])]),
251
- f("div", ce, [a[7] ||= f("div", { class: "table-head" }, [
252
- f("span", null, "高速名称"),
253
- f("span", null, "状态要素"),
254
- f("span", { class: "head-arrow" })
255
- ], -1), f("div", O, [(y(!0), d(c, null, x(W.value, (e) => (y(), d("div", {
256
- class: "table-row",
257
- key: e.name
258
- }, [
259
- f("div", {
260
- class: "table-row-main",
261
- onClick: (t) => Ne(e.name)
262
- }, [
263
- f("span", ue, S(e.name), 1),
264
- f("div", { class: g(["status-tags", { "has-warn": J(e.tags) }]) }, [(y(!0), d(c, null, x(e.tags, (t) => (y(), d("span", {
265
- class: g(["status-tag", { warn: t.warn }]),
266
- key: `${e.name}-${t.label}`
267
- }, [f("span", null, S(t.label), 1)], 2))), 128))], 2),
268
- f("span", {
269
- class: g(["expand-arrow", { expanded: R.value[e.name] }]),
270
- "aria-hidden": "true"
271
- }, [m(l, null, {
272
- default: E(() => [m(C(t))]),
273
- _: 1
274
- })], 2)
275
- ], 8, le),
276
- D(f("div", {
277
- class: "pile-title",
278
- onClick: (t) => Pe(e.name)
279
- }, [f("span", null, [a[5] ||= p(" 桩号数据 ", -1), X(e.piles) > 0 ? (y(), d("span", k, " (报警数量:" + S(X(e.piles)) + "个)", 1)) : ee("", !0)]), f("span", { class: g(["panel-arrow", { expanded: z.value[e.name] }]) }, [m(l, null, {
280
- default: E(() => [m(C(t))]),
281
- _: 1
282
- })], 2)], 8, de), [[w, R.value[e.name]]]),
283
- D(f("div", A, [a[6] ||= f("div", { class: "pile-head" }, [
284
- f("span", null, "桩号"),
285
- f("span", null, "未来R1h"),
286
- f("span", null, "未来R2h"),
287
- f("span", null, "未来R3h")
288
- ], -1), e.piles.length ? (y(), d("div", fe, [(y(!0), d(c, null, x(e.piles, (e) => (y(), d("div", {
289
- class: g(["pile-row", { "is-warn": e.isWarn }]),
290
- key: e.pileNo
291
- }, [
292
- f("span", null, S(e.pileNo), 1),
293
- f("span", null, S(e.rain1h), 1),
294
- f("span", null, S(e.rain2h), 1),
295
- f("span", null, S(e.rain3h), 1)
296
- ], 2))), 128))])) : (y(), d("div", pe, "暂无数据"))], 512), [[w, R.value[e.name] && z.value[e.name]]])
297
- ]))), 128))])]),
298
- D(f("div", me, [f("button", {
299
- type: "button",
300
- class: "timeline-play-btn",
301
- title: P.value ? "暂停" : "播放",
302
- onClick: Ae
303
- }, [m(l, null, {
304
- default: E(() => [P.value ? (y(), u(C(e), { key: 0 })) : (y(), u(C(n), { key: 1 }))]),
305
- _: 1
306
- })], 8, he), f("div", ge, [f("span", _e, S(K.value[F.value] || ""), 1), f("div", {
307
- class: "radarAxis",
308
- ref_key: "ref_radarAxis",
309
- ref: H
310
- }, [(y(!0), d(c, null, x(G.value, (e, t) => (y(), d("div", ve, [f("div", {
311
- class: "radarAxis-li-node",
312
- onClick: (e) => (F.value = Number(t), je())
313
- }, [
314
- f("i", { style: _({ backgroundColor: e._isHistory ? "" : "#ca9e64" }) }, null, 4),
315
- D(f("span", null, [...a[8] ||= [f("i", null, null, -1)]], 512), [[w, t === F.value]]),
316
- f("div", be, [f("b", null, S(e._label), 1)])
317
- ], 8, ye), (y(), d(c, null, x(4, (n) => D(f("div", {
318
- class: "radarAxis-li-point",
319
- key: n,
320
- style: _({ backgroundColor: e._isHistory ? "" : "#ca9e64" })
321
- }, null, 4), [[w, t !== G.value.length - 1]])), 64))]))), 256))], 512)])], 512), [[w, N.value]])
322
- ]);
323
- };
324
- }
325
- }), [["__scopeId", "data-v-88b2f561"]]);
326
- //#endregion
327
- export { j as t };