nxd-plugin 1.5.2 → 1.5.3

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 (20) hide show
  1. package/dist/chunks/{component-HighWayFreeze-Bu_esAjA.mjs → component-HighWayFreeze-Ckh45dhq.mjs} +338 -302
  2. package/dist/chunks/{component-HighwayLiveAlarm-D5A8U6nr.mjs → component-HighwayLiveAlarm-BJQZsDZ2.mjs} +69 -69
  3. package/dist/chunks/{component-HighwayLiveAlarmNew-CxvMvtxs.mjs → component-HighwayLiveAlarmNew-C5_-1nLA.mjs} +103 -103
  4. package/dist/chunks/{component-HighwayStations-EkqsQMyT.mjs → component-HighwayStations-C0dO_r1R.mjs} +2 -2
  5. package/dist/chunks/{component-HighwayWeatherForecast-BevrRin0.mjs → component-HighwayWeatherForecast-shTrLuFz.mjs} +1 -1
  6. package/dist/chunks/{component-ImageGeneration-lgL5b_fS.mjs → component-ImageGeneration-BNWh-LrZ.mjs} +219 -219
  7. package/dist/chunks/{component-LithiumBatteryMiningArea-BGW8lyaE.mjs → component-LithiumBatteryMiningArea-CAWkyWzC.mjs} +2 -2
  8. package/dist/chunks/component-RadarShortTerm-Csx21bzr.mjs +1148 -0
  9. package/dist/chunks/{component-ServiceMaterialsBtn-BdGlr36l.mjs → component-ServiceMaterialsBtn-DAtuOkqp.mjs} +54 -54
  10. package/dist/chunks/{component-TimeBasedForecast-BWXd609e.mjs → component-TimeBasedForecast-XI_q_qXB.mjs} +4 -4
  11. package/dist/chunks/{component-WeatherForecast-BvNqw-L8.mjs → component-WeatherForecast-1gjqAkui.mjs} +2 -2
  12. package/dist/chunks/{component-YCHome-nB5SMh8D.mjs → component-YCHome-ClXcF7Y4.mjs} +435 -435
  13. package/dist/chunks/{component-YCLogin-Wj7pyIOq.mjs → component-YCLogin-cziiUlrT.mjs} +6 -6
  14. package/dist/chunks/{component-YCLoginNew-a9ZNeE3r.mjs → component-YCLoginNew-vzP6cN1o.mjs} +7 -7
  15. package/dist/nxd-plugin.mjs +16 -16
  16. package/dist/styles/component-RadarShortTerm.css +1 -1
  17. package/dist/styles/component-YCLogin.css +1 -1
  18. package/dist/styles/component-YCLoginNew.css +1 -1
  19. package/package.json +1 -1
  20. package/dist/chunks/component-RadarShortTerm-Cm-V1SBa.mjs +0 -267
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nxd-plugin",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "main": "dist/nxd-plugin.mjs",
5
5
  "module": "dist/nxd-plugin.mjs",
6
6
  "types": "dist/src/index.d.ts",
@@ -1,267 +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 { n as ee } from "./component-HighwayLiveAlarmNew-CxvMvtxs.mjs";
5
- import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, onBeforeUnmount as _, onMounted as v, openBlock as y, ref as b, renderList as x, toDisplayString as S, unref as C, vShow as w, withCtx as T, withDirectives as E } from "vue";
6
- //#region src/components/RadarShortTerm/RadarShortTerm.vue?vue&type=script&setup=true&lang.ts
7
- var te = { class: "RadarShortTerm" }, ne = { class: "RadarShortTerm-setting-panel" }, re = { class: "display-setting" }, ie = { class: "setting-row setting-row-pile" }, ae = { class: "setting-pile-options" }, oe = { class: "RadarShortTerm-table" }, se = { class: "table-body" }, ce = ["onClick"], le = { class: "name" }, ue = ["onClick"], de = {
8
- key: 0,
9
- style: { color: "red" }
10
- }, fe = { class: "pile-panel" }, D = {
11
- key: 0,
12
- class: "pile-body"
13
- }, O = {
14
- key: 1,
15
- class: "pile-empty"
16
- }, k = { class: "RadarShortTerm-timeline" }, A = ["title"], pe = { class: "timeline-track" }, me = ["onClick"], j = /* @__PURE__ */ o(/* @__PURE__ */ h({
17
- __name: "RadarShortTerm",
18
- props: {
19
- appKey: {
20
- type: String,
21
- default: ""
22
- },
23
- appSalt: {
24
- type: String,
25
- default: ""
26
- },
27
- baseHttp: {
28
- type: String,
29
- default: ""
30
- },
31
- ids: {
32
- type: Object,
33
- default: () => ({})
34
- }
35
- },
36
- emits: [
37
- "close",
38
- "addImage",
39
- "clearImg",
40
- "addDataTitle",
41
- "removeDataTitle",
42
- "showRadarLegend"
43
- ],
44
- setup(o, { emit: h }) {
45
- 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("");
46
- v(() => {
47
- he();
48
- }), _(() => {
49
- Z();
50
- });
51
- let he = async () => {
52
- let e = await ge(), t = await i({
53
- appKey: j.appKey,
54
- appSalt: j.appSalt,
55
- id: j.ids.radar.id,
56
- variables: {},
57
- baseHttp: j.baseHttp,
58
- reqType: j.ids.radar.reqType,
59
- isFormData: j.ids.radar.isFormData
60
- });
61
- console.log("雷达", t.data.result), B.value = ve(t.data.result), F.value = B.value.ds.length >= 12 ? 11 : B.value.ds.length - 1, L.value = e.map((e) => {
62
- let t = be(e), n = Se(e.zhflds || []);
63
- return {
64
- name: e.name,
65
- tags: Ce(t),
66
- piles: n
67
- };
68
- }), N.value && X(), ye();
69
- }, ge = async () => {
70
- let e = await i({
71
- appKey: j.appKey,
72
- appSalt: j.appSalt,
73
- id: j.ids.shortTerm.id,
74
- variables: {},
75
- baseHttp: j.baseHttp,
76
- reqType: j.ids.shortTerm.reqType,
77
- isFormData: j.ids.shortTerm.isFormData
78
- });
79
- return console.log("短时预报", e.data.result.ds), e.data.result.ds || [];
80
- }, _e = (e) => {
81
- let t = String(e || "").split(",").map((e) => Number(e.trim()));
82
- return {
83
- lngStart: t[0],
84
- lngEnd: t[1],
85
- latStart: t[2],
86
- latEnd: t[3]
87
- };
88
- }, ve = (e) => {
89
- let t = Array.isArray(e?.ds) ? e : e?.ds, n = Array.isArray(t?.ds) ? t.ds : [], r = _e(n[0]?.extendstr || "");
90
- return n.length ? {
91
- ds: n,
92
- httpurl: t?.httpUrl || t?.httpurl || "",
93
- ...r
94
- } : {
95
- ds: [],
96
- httpurl: "",
97
- lngStart: null,
98
- lngEnd: null,
99
- latStart: null,
100
- latEnd: null
101
- };
102
- }, H = c(() => q(L.value, (e) => K(e.tags))), U = c(() => (B.value?.ds || []).slice(0, 12).reverse()), W = c(() => U.value.map((e) => {
103
- let t = new Date(e.focarcast_time);
104
- return `${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}`;
105
- })), G = c(() => ({
106
- httpurl: B.value?.httpurl || "",
107
- lngStart: B.value?.lngStart,
108
- latStart: B.value?.latStart,
109
- lngEnd: B.value?.lngEnd,
110
- latEnd: B.value?.latEnd
111
- })), ye = () => {
112
- let e = H.value.find((e) => K(e.tags)), t = {}, n = {};
113
- e && (t[e.name] = !0, n[e.name] = !0), R.value = t, z.value = n;
114
- }, be = (e) => {
115
- let t = e.zhflds || [];
116
- return {
117
- iswarnpre1h: t.some((e) => e?.iswarnpre1h === 1) ? 1 : 0,
118
- iswarnpre2h: t.some((e) => e?.iswarnpre2h === 1) ? 1 : 0,
119
- iswarnpre3h: t.some((e) => e?.iswarnpre3h === 1) ? 1 : 0
120
- };
121
- }, xe = (e) => {
122
- let t = [];
123
- return e?.iswarnpre1h === 1 && t.push(`未来R1h:${e.rain_1h}`), e?.iswarnpre2h === 1 && t.push(`未来R2h:${e.rain_2h}`), e?.iswarnpre3h === 1 && t.push(`未来R3h:${e.rain_3h}`), t.length ? t.join(",") : "无";
124
- }, Se = (e) => q((e || []).map((e) => ({
125
- pileNo: `${e.type || ""}${e.Name || ""}`,
126
- isWarn: e?.iswarnpre1h === 1 || e?.iswarnpre2h === 1 || e?.iswarnpre3h === 1,
127
- warnValue: xe(e)
128
- })), (e) => e.isWarn), Ce = (e) => [
129
- {
130
- label: "未来R1h",
131
- warn: e.iswarnpre1h === 1
132
- },
133
- {
134
- label: "未来R2h",
135
- warn: e.iswarnpre2h === 1
136
- },
137
- {
138
- label: "未来R3h",
139
- warn: e.iswarnpre3h === 1
140
- }
141
- ], K = (e) => e.some((e) => e.warn), q = (e, t) => [...e].sort((e, n) => Number(t(n)) - Number(t(e))), J = (e) => e.filter((e) => e.isWarn).length, we = (e) => e ? {
142
- alt: "",
143
- imgUrl: `${G.value.httpurl}${e.file_name}`,
144
- lngStart: G.value.lngStart,
145
- latStart: G.value.latStart,
146
- lngEnd: G.value.lngEnd,
147
- latEnd: G.value.latEnd,
148
- opacity: 1,
149
- otherData: { imgId: "radar_RadarShortTerm" }
150
- } : null, Y = (e) => {
151
- let t = U.value[e], n = { imgArr: [we(t)] };
152
- console.log(n), M("addImage", {
153
- removeImg: "radar_RadarShortTerm",
154
- data: n
155
- }), 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);
156
- }, X = () => {
157
- if (Q(), !U.value.length) return;
158
- let e = F.value >= 0 && F.value < U.value.length ? F.value : 0;
159
- F.value = e, Y(e);
160
- }, Z = () => {
161
- I.value &&= (clearInterval(I.value), null);
162
- }, Q = () => {
163
- P.value = !1, Z();
164
- }, Te = () => {
165
- W.value.length <= 1 || (P.value = !0, Z(), I.value = setInterval(() => {
166
- F.value = (F.value + 1) % W.value.length, Y(F.value);
167
- }, 3e3));
168
- }, $ = () => {
169
- if (P.value) {
170
- Q();
171
- return;
172
- }
173
- Te();
174
- }, Ee = (e) => {
175
- F.value = e, Y(e), Q();
176
- }, De = () => {
177
- if (!N.value) {
178
- M("clearImg", "radar_RadarShortTerm"), M("removeDataTitle", V.value), M("showRadarLegend", !1), Q();
179
- return;
180
- }
181
- X();
182
- }, Oe = (e) => {
183
- let t = !!R.value[e];
184
- R.value[e] = !t, t || (z.value[e] = !0);
185
- }, ke = (e) => {
186
- z.value[e] = !z.value[e];
187
- }, Ae = () => {
188
- M("close", "RadarShortTerm");
189
- };
190
- return (i, a) => {
191
- let o = ee, c = r;
192
- return y(), d("div", te, [
193
- f("div", { class: "RadarShortTerm-head" }, [f("div", { class: "RadarShortTerm-head-top" }, [a[1] ||= f("div", null, "雷达短临预报", -1), f("div", { class: "head-actions" }, [f("div", {
194
- class: "closeBtn",
195
- onClick: Ae,
196
- title: "关闭"
197
- })])]), a[2] ||= f("img", {
198
- class: "RadarShortTerm-head-line",
199
- 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",
200
- alt: ""
201
- }, null, -1)]),
202
- f("div", ne, [f("div", re, [f("div", ie, [a[4] ||= f("span", { class: "setting-label" }, "雷达展示:", -1), f("div", ae, [m(o, {
203
- modelValue: N.value,
204
- "onUpdate:modelValue": a[0] ||= (e) => N.value = e,
205
- class: "pile-checkbox",
206
- onChange: De
207
- }, {
208
- default: T(() => [...a[3] ||= [p(" 显示 ", -1)]]),
209
- _: 1
210
- }, 8, ["modelValue"])])])])]),
211
- f("div", oe, [a[7] ||= f("div", { class: "table-head" }, [
212
- f("span", null, "高速名称"),
213
- f("span", null, "状态要素"),
214
- f("span", { class: "head-arrow" })
215
- ], -1), f("div", se, [(y(!0), d(s, null, x(H.value, (e) => (y(), d("div", {
216
- class: "table-row",
217
- key: e.name
218
- }, [
219
- f("div", {
220
- class: "table-row-main",
221
- onClick: (t) => Oe(e.name)
222
- }, [
223
- f("span", le, S(e.name), 1),
224
- f("div", { class: g(["status-tags", { "has-warn": K(e.tags) }]) }, [(y(!0), d(s, null, x(e.tags, (t) => (y(), d("span", {
225
- class: g(["status-tag", { warn: t.warn }]),
226
- key: `${e.name}-${t.label}`
227
- }, [f("span", null, S(t.label), 1)], 2))), 128))], 2),
228
- f("span", {
229
- class: g(["expand-arrow", { expanded: R.value[e.name] }]),
230
- "aria-hidden": "true"
231
- }, [m(c, null, {
232
- default: T(() => [m(C(t))]),
233
- _: 1
234
- })], 2)
235
- ], 8, ce),
236
- E(f("div", {
237
- class: "pile-title",
238
- onClick: (t) => ke(e.name)
239
- }, [f("span", null, [a[5] ||= p(" 桩号数据 ", -1), J(e.piles) > 0 ? (y(), d("span", de, " (报警数量:" + S(J(e.piles)) + "个)", 1)) : u("", !0)]), f("span", { class: g(["panel-arrow", { expanded: z.value[e.name] }]) }, [m(c, null, {
240
- default: T(() => [m(C(t))]),
241
- _: 1
242
- })], 2)], 8, ue), [[w, R.value[e.name]]]),
243
- E(f("div", fe, [a[6] ||= f("div", { class: "pile-head" }, [f("span", null, "桩号"), f("span", null, "报警值")], -1), e.piles.length ? (y(), d("div", D, [(y(!0), d(s, null, x(e.piles, (e) => (y(), d("div", {
244
- class: g(["pile-row", { "is-warn": e.isWarn }]),
245
- key: e.pileNo
246
- }, [f("span", null, S(e.pileNo), 1), f("span", null, S(e.warnValue), 1)], 2))), 128))])) : (y(), d("div", O, "暂无数据"))], 512), [[w, R.value[e.name] && z.value[e.name]]])
247
- ]))), 128))])]),
248
- E(f("div", k, [f("button", {
249
- type: "button",
250
- class: "timeline-play-btn",
251
- title: P.value ? "暂停" : "播放",
252
- onClick: $
253
- }, [m(c, null, {
254
- default: T(() => [P.value ? (y(), l(C(e), { key: 0 })) : (y(), l(C(n), { key: 1 }))]),
255
- _: 1
256
- })], 8, A), f("div", pe, [(y(!0), d(s, null, x(W.value, (e, t) => (y(), d("button", {
257
- key: e,
258
- type: "button",
259
- class: g(["timeline-item", { active: F.value === t }]),
260
- onClick: (e) => Ee(Number(t))
261
- }, S(e), 11, me))), 128))])], 512), [[w, N.value]])
262
- ]);
263
- };
264
- }
265
- }), [["__scopeId", "data-v-cec5c9d4"]]);
266
- //#endregion
267
- export { j as t };