nxd-plugin 1.7.2 → 1.7.4

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