nxd-plugin 1.6.9 → 1.7.0

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 (24) hide show
  1. package/dist/chunks/{component-ImageGeneration-BY0gFwcr.mjs → component-ImageGeneration-DBGoJgau.mjs} +2 -2
  2. package/dist/chunks/{component-RadarShortTerm-Bp09mb4q.mjs → component-RadarShortTerm-spO4BGj9.mjs} +1 -1
  3. package/dist/chunks/component-RadarTime-YYlhiftO.mjs +539 -0
  4. package/dist/chunks/component-ServiceMaterial-Bx9kF9Yi.mjs +121 -0
  5. package/dist/chunks/{component-ServiceMaterialsBtn-7b7nWW__.mjs → component-ServiceMaterialsBtn-Cx4iw5kJ.mjs} +1 -1
  6. package/dist/chunks/component-WarningLine-D5PmJ8Si.mjs +373 -0
  7. package/dist/chunks/{component-WarningSignal-DDOj8BOp.mjs → component-WarningSignal-Dj3r1iCu.mjs} +245 -119
  8. package/dist/chunks/{component-YCHome-BRLok3CD.mjs → component-YCHome-Dt-2Vg08.mjs} +2 -2
  9. package/dist/chunks/{component-YCLogin-CuiUmF2L.mjs → component-YCLogin-HkPL9Pv5.mjs} +2 -2
  10. package/dist/chunks/{component-YCLoginNew-Dg4wckOL.mjs → component-YCLoginNew-C3n6QcTL.mjs} +2 -2
  11. package/dist/nxd-plugin.mjs +13 -11
  12. package/dist/src/components/RadarTime/RadarTime.vue.d.ts +6 -64
  13. package/dist/src/components/ServiceMaterial/ServiceMaterial.vue.d.ts +58 -0
  14. package/dist/src/components/WarningLine/WarningLine.vue.d.ts +65 -0
  15. package/dist/src/components/WarningSignal/WarningSignal.vue.d.ts +18 -0
  16. package/dist/src/index.d.ts +3 -1
  17. package/dist/styles/component-RadarTime.css +1 -1
  18. package/dist/styles/component-ServiceMaterial.css +1 -0
  19. package/dist/styles/component-WarningLine.css +1 -0
  20. package/dist/styles/component-WarningSignal.css +1 -1
  21. package/dist/styles/component-YCLogin.css +1 -1
  22. package/dist/styles/component-YCLoginNew.css +1 -1
  23. package/package.json +1 -1
  24. package/dist/chunks/component-RadarTime-aohD_Dpx.mjs +0 -500
@@ -20930,7 +20930,7 @@ var xx = class {
20930
20930
  });
20931
20931
  });
20932
20932
  }, ne = (e) => {
20933
- e.polygonArr.map((e, t) => {
20933
+ console.log(e, "画面"), e.polygonArr.map((e, t) => {
20934
20934
  let r = [];
20935
20935
  e.polygonJson.map((e, t) => {
20936
20936
  e.lat && e.lng ? r.push([e.lng, e.lat]) : r.push(e);
@@ -20950,7 +20950,7 @@ var xx = class {
20950
20950
  }),
20951
20951
  fill: new Im({ color: se(e.fillColor, e.fillOpacity) })
20952
20952
  }),
20953
- zIndex: 1
20953
+ zIndex: e.zIndex ?? 1
20954
20954
  }), o = {
20955
20955
  source: a,
20956
20956
  maxZoom: e.maxZoom,
@@ -1,7 +1,7 @@
1
1
  import "./rolldown-runtime-Dd0fQ6-X.mjs";
2
2
  import { A as e, S as t, j as n, m as r } from "./component-HighWayFreeze-C_Y5P0wN.mjs";
3
3
  import { a as i, n as a, r as o } from "./component-AqiMonitor-DoGm_NCt.mjs";
4
- import "./component-ImageGeneration-BY0gFwcr.mjs";
4
+ import "./component-ImageGeneration-DBGoJgau.mjs";
5
5
  import { n as ee } from "./component-HighwayLiveAlarmNew--cnSiMgV.mjs";
6
6
  import { n as s } from "./component-HighWayEarlyWarningRed-D89gFa50.mjs";
7
7
  import { Fragment as c, computed as l, createBlock as u, 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";
@@ -0,0 +1,539 @@
1
+ import "./rolldown-runtime-Dd0fQ6-X.mjs";
2
+ import { a as e, n as t, r as n } from "./component-AqiMonitor-DoGm_NCt.mjs";
3
+ import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, getCurrentInstance as l, normalizeClass as u, normalizeStyle as d, onMounted as f, onUnmounted as ee, openBlock as p, ref as m, renderList as h, toDisplayString as g, vShow as _, watch as te, withDirectives as v, withModifiers as y } from "vue";
4
+ //#region src/components/RadarTime/RadarTime.vue?vue&type=script&setup=true&lang.ts
5
+ var b = { class: "RadarTime" }, ne = { class: "RadarTime__head" }, re = { class: "RadarTime__head-top" }, ie = { class: "RadarTime__body" }, ae = { class: "RadarTime__toolbar" }, oe = { class: "RadarTime__display" }, se = { class: "RadarTime__panel" }, ce = { class: "RadarTime__time-list" }, le = ["onClick"], ue = {
6
+ key: 0,
7
+ class: "RadarTime__time-node"
8
+ }, de = { class: "RadarTime__node-value" }, fe = { class: "RadarTime__legend" }, pe = { class: "RadarTime__legend-bar" }, x = { class: "RadarTime__legend-labels" }, me = {
9
+ key: 0,
10
+ class: "RadarTime__station-bar"
11
+ }, he = { class: "RadarTime__station-name" }, ge = { class: "RadarTime__station-panel" }, _e = ["onClick"], ve = { class: "RadarTime__main" }, ye = { class: "RadarTime__play-wrapper" }, be = {
12
+ key: 0,
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: "22",
15
+ height: "22",
16
+ viewBox: "0 0 24 24",
17
+ fill: "#fff"
18
+ }, xe = {
19
+ key: 1,
20
+ xmlns: "http://www.w3.org/2000/svg",
21
+ width: "20",
22
+ height: "20",
23
+ viewBox: "0 0 24 24",
24
+ fill: "#fff"
25
+ }, Se = { class: "RadarTime__track-bg" }, Ce = { class: "RadarTime__track-content" }, we = ["onClick"], S = /* @__PURE__ */ t(/* @__PURE__ */ c({
26
+ __name: "RadarTime",
27
+ props: {
28
+ appKey: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ appSalt: {
33
+ type: String,
34
+ default: ""
35
+ },
36
+ showCloseBtn: {
37
+ type: Boolean,
38
+ default: !0
39
+ },
40
+ baseHttp: {
41
+ type: String,
42
+ default: ""
43
+ },
44
+ ids: {
45
+ type: Object,
46
+ default: () => ({})
47
+ },
48
+ title: {
49
+ type: String,
50
+ default: "雷达时间轴"
51
+ },
52
+ legendData: {
53
+ type: Array,
54
+ default: () => [
55
+ {
56
+ value: "0",
57
+ color: "rgb(192, 192, 253)"
58
+ },
59
+ {
60
+ value: "5",
61
+ color: "rgb(122, 114, 238)"
62
+ },
63
+ {
64
+ value: "10",
65
+ color: "rgb(30, 38, 208)"
66
+ },
67
+ {
68
+ value: "15",
69
+ color: "rgb(166, 252, 168)"
70
+ },
71
+ {
72
+ value: "20",
73
+ color: "rgb(0, 235, 0)"
74
+ },
75
+ {
76
+ value: "25",
77
+ color: "rgb(16, 146, 26)"
78
+ },
79
+ {
80
+ value: "30",
81
+ color: "rgb(252, 244, 100)"
82
+ },
83
+ {
84
+ value: "35",
85
+ color: "rgb(200, 200, 2)"
86
+ },
87
+ {
88
+ value: "40",
89
+ color: "rgb(140, 140, 0)"
90
+ },
91
+ {
92
+ value: "45",
93
+ color: "rgb(254, 172, 172)"
94
+ },
95
+ {
96
+ value: "50",
97
+ color: "rgb(254, 100, 92)"
98
+ },
99
+ {
100
+ value: "55",
101
+ color: "rgb(238, 2, 48)"
102
+ },
103
+ {
104
+ value: "60",
105
+ color: "rgb(212, 142, 254)"
106
+ },
107
+ {
108
+ value: "65",
109
+ color: "rgb(170, 36, 250)"
110
+ }
111
+ ]
112
+ }
113
+ },
114
+ emits: [
115
+ "close",
116
+ "addImage",
117
+ "clearImg",
118
+ "addPolygon",
119
+ "addMarker"
120
+ ],
121
+ setup(t, { emit: c }) {
122
+ let S = l()?.appContext.config.globalProperties.$bus, C = t, w = c, T = m(!1), E = m(!1), D = m([]), O = m([]), k = m([]), A = m(0), j = m([]), M = m(null), N = m(!1), P = m(null), F = m(!1), I = m(null), L = m(0), R = i(() => O.value.map((e) => ({
123
+ time: e.radar_time,
124
+ displayTime: e.radar_time?.substring(11, 16) || "",
125
+ selectedTime: e.radar_time?.substring(0, 16) || ""
126
+ }))), Te = i(() => R.value.length > 0 && L.value >= 0 && R.value[L.value]?.selectedTime || ""), z = m(!1);
127
+ te(() => R.value, (e) => {
128
+ e.length > 0 && !z.value && (z.value = !0, L.value = e.length - 1);
129
+ }, { immediate: !0 });
130
+ let B = () => {
131
+ F.value = !F.value;
132
+ }, V = () => {
133
+ F.value = !1;
134
+ }, H = (e) => {
135
+ I.value && !I.value.contains(e.target) && V(), P.value && !P.value.contains(e.target) && (N.value = !1);
136
+ }, Ee = () => {
137
+ N.value = !N.value;
138
+ }, De = async (e) => {
139
+ M.value?.ldCode !== e.ld_code && (M.value = e, N.value = !1, E.value = !1, O.value = [], k.value = [], D.value = [], A.value = 0, L.value = 0, z.value = !1, await Q());
140
+ }, Oe = async (e) => {
141
+ L.value = e;
142
+ let t = R.value[e]?.time;
143
+ t && (T.value = !0, await $(t), Z(e), T.value = !1), V();
144
+ }, U = i(() => {
145
+ if (!D.value || D.value.length <= 1) return 50;
146
+ let e = D.value.length, t = D.value.filter((e) => e.type === "live").length / e * 98;
147
+ return Math.max(t, 4);
148
+ }), ke = i(() => {
149
+ if (!D.value || D.value.length <= 1) return 0;
150
+ let e = A.value / (D.value.length - 1) * 98;
151
+ return Math.max(0, Math.min(98, e));
152
+ }), Ae = (e) => {
153
+ if (!D.value || D.value.length <= 1) return 0;
154
+ let t = e / (D.value.length - 1) * 98;
155
+ return Math.max(0, Math.min(98, t));
156
+ }, W = m(null), je = m(null), G = m(!1), Me = (e) => {
157
+ e.button === 0 && (G.value = !0, q(e), e.preventDefault());
158
+ }, Ne = (e) => {
159
+ G.value && q(e);
160
+ }, K = () => {
161
+ G.value &&= !1;
162
+ }, q = (e) => {
163
+ if (!W.value || !D.value || D.value.length === 0) return;
164
+ let t = W.value.getBoundingClientRect(), n = e.clientX - t.left;
165
+ n = Math.max(0, Math.min(n, t.width));
166
+ let r = n / t.width, i = Math.round(r * (D.value.length - 1));
167
+ X(Math.max(0, Math.min(D.value.length - 1, i)));
168
+ }, J = null, Pe = () => {
169
+ E.value = !E.value, E.value ? Fe() : Y();
170
+ }, Fe = () => {
171
+ Y(), J = setInterval(() => {
172
+ A.value < D.value.length - 1 ? X(A.value + 1) : X(0);
173
+ }, 1e3);
174
+ }, Y = () => {
175
+ J &&= (clearInterval(J), null);
176
+ }, X = (e) => {
177
+ A.value = e;
178
+ let t = D.value[e];
179
+ console.log(t, "选择的时间点"), t && t.png_path && t.bounds && t.bounds.length === 2 && (console.log(t, "item11"), w("addImage", {
180
+ removeImg: "radarLayer",
181
+ data: { imgArr: [{
182
+ imgUrl: t.png_path,
183
+ lngStart: String(t.bounds[0][0]),
184
+ latStart: String(t.bounds[0][1]),
185
+ lngEnd: String(t.bounds[1][0]),
186
+ latEnd: String(t.bounds[1][1]),
187
+ opacity: .8,
188
+ zIndex: 999,
189
+ otherData: { imgId: "radarLayer" }
190
+ }] }
191
+ }));
192
+ }, Z = (e) => {
193
+ let t = [];
194
+ if (O.value && O.value.length > 0) {
195
+ let n = typeof e == "number" ? e : 0;
196
+ O.value.slice(n).forEach((e, n) => {
197
+ t.push({
198
+ time: e.radar_time?.substring(11, 16) || "",
199
+ fullTime: e.radar_time || "",
200
+ type: "live",
201
+ index: n,
202
+ png_path: e.png_path || "",
203
+ bounds: e.bounds || []
204
+ });
205
+ });
206
+ }
207
+ k.value && k.value.length > 0 && k.value.forEach((e, n) => {
208
+ t.push({
209
+ time: e.radar_time?.substring(11, 16) || "",
210
+ fullTime: e.radar_time || "",
211
+ type: "forecast",
212
+ index: n,
213
+ png_path: e.png_path || "",
214
+ bounds: e.bounds || []
215
+ });
216
+ }), D.value = t, A.value = 0, setTimeout(() => {
217
+ X(0);
218
+ }, 0);
219
+ }, Q = async () => {
220
+ T.value = !0;
221
+ let e = {
222
+ appKey: C.appKey,
223
+ appSalt: C.appSalt,
224
+ id: C.ids.data.id2,
225
+ variables: {
226
+ dateTime: (() => {
227
+ let e = /* @__PURE__ */ new Date();
228
+ e.setHours(e.getHours());
229
+ let t = (e) => String(e).padStart(2, "0");
230
+ return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
231
+ })(),
232
+ ldCode: M.value?.ld_code || ""
233
+ },
234
+ baseHttp: C.baseHttp,
235
+ reqType: C.ids.data.reqType,
236
+ isFormData: C.ids.data.isFormData
237
+ };
238
+ try {
239
+ let t = (await n(e)).data?.result?.output || "", r = JSON.parse(t)?.data || [];
240
+ console.log(r, "雷达实况数据(标准版)"), r && r.length > 0 && (r = r.reverse(), O.value = r.map((e) => {
241
+ let t = "";
242
+ if (e.imagePath) {
243
+ let n = e.imagePath.replace(/\\/g, "/");
244
+ t = n.startsWith("D:/usr/uploadPath/tq") ? "/image-proxy" + n.substring(20) : n;
245
+ } else console.log("实况项 png_path 为空, imagePath:", e.imagePath);
246
+ return {
247
+ ...e,
248
+ png_path: t,
249
+ date_time: e.observationTime,
250
+ radar_time: e.observationTime,
251
+ bounds: [[e.lon_min, e.lat_min], [e.lon_max, e.lat_max]]
252
+ };
253
+ }), await $(), Z(L.value));
254
+ } catch (e) {
255
+ console.error("获取雷达实况数据失败:", e);
256
+ } finally {
257
+ T.value = !1;
258
+ }
259
+ }, $ = async (e) => {
260
+ let t = {
261
+ appKey: C.appKey,
262
+ appSalt: C.appSalt,
263
+ id: C.ids.data.forecastId,
264
+ variables: { dateTime: e || O.value[O.value.length - 1]?.date_time || "" },
265
+ baseHttp: C.baseHttp,
266
+ reqType: C.ids.data.reqType,
267
+ isFormData: C.ids.data.isFormData
268
+ };
269
+ try {
270
+ let e = await n(t);
271
+ console.log(e, "雷达外推数据");
272
+ let r = e.data?.result?.output || "", i = {};
273
+ try {
274
+ i = typeof r == "string" ? JSON.parse(r) : r;
275
+ } catch (e) {
276
+ console.error("解析外推数据失败:", e);
277
+ return;
278
+ }
279
+ let a = i?.data || {}, o = a?.elements || [];
280
+ Array.isArray(o) && o.length > 0 && Ie(o), a.riskJsonPath && await ze(a.riskJsonPath);
281
+ } catch (e) {
282
+ console.error("获取雷达外推数据失败:", e);
283
+ }
284
+ }, Ie = (e) => {
285
+ if (!Array.isArray(e) || e.length === 0) return;
286
+ let t = O.value.length > 0 && O.value[O.value.length - 1]?.radar_time || "";
287
+ k.value = e.map((e) => {
288
+ let n = e.forecast_time || "", r = Re(n, 0, 8), i = [[80.29, 41.17], [81.29, 42.17]], a = "";
289
+ if (e.image_path) {
290
+ let t = e.image_path.replace(/\\/g, "/");
291
+ a = t.startsWith("D:/usr/uploadPath/tq") ? "/image-proxy" + t.substring(20) : t;
292
+ } else console.log("外推项 png_path 为空, image_path:", e.image_path);
293
+ return {
294
+ ...e,
295
+ type: "forecast",
296
+ base_time: t,
297
+ radar_time: r,
298
+ fullTime: n,
299
+ png_path: a,
300
+ bounds: i
301
+ };
302
+ }), console.log(k.value, "forecastList 外推数据");
303
+ }, Le = async () => {
304
+ try {
305
+ let e = (await n({
306
+ appKey: C.appKey,
307
+ appSalt: C.appSalt,
308
+ id: C.ids.data.radarListId,
309
+ variables: {},
310
+ baseHttp: C.ids.baseHttp2,
311
+ reqType: C.ids.data.reqType,
312
+ isFormData: C.ids.data.isFormData
313
+ })).data?.result?.output || [];
314
+ e && e.length > 0 && (j.value = e, M.value = e[0], console.log(e, "雷达列表数据"));
315
+ } catch (e) {
316
+ console.error("获取雷达列表失败:", e);
317
+ }
318
+ }, Re = (e, t, n = 0) => {
319
+ if (!e) return "";
320
+ try {
321
+ let r, i = e.replace(/[-:T\s]/g, "");
322
+ if (r = /^\d{14}$/.test(i) ? new Date(Number(i.substring(0, 4)), Number(i.substring(4, 6)) - 1, Number(i.substring(6, 8)), Number(i.substring(8, 10)), Number(i.substring(10, 12)), Number(i.substring(12, 14))) : new Date(e), isNaN(r.getTime())) return "";
323
+ r.setHours(r.getHours() + n), r.setMinutes(r.getMinutes() + t);
324
+ let a = (e) => String(e).padStart(2, "0");
325
+ return `${r.getFullYear()}-${a(r.getMonth() + 1)}-${a(r.getDate())} ${a(r.getHours())}:${a(r.getMinutes())}:${a(r.getSeconds())}`;
326
+ } catch {
327
+ return "";
328
+ }
329
+ }, ze = async (e) => {
330
+ try {
331
+ let t;
332
+ if (e) {
333
+ let n = e.replace(/\\/g, "/"), r = "";
334
+ r = n.startsWith("D:/usr/uploadPath/tq") ? "/image-proxy" + n.substring(20) : e, console.log(r, "风险数据 json 路径"), t = await (await fetch(r)).json();
335
+ } else console.log("未获取到风险数据");
336
+ console.log(t, "风险数据 json 内容");
337
+ let n = (t?.risk_conclusion || {}).time_periods_summary || [];
338
+ if (!Array.isArray(n) || n.length === 0) {
339
+ console.log("无风险时间段数据");
340
+ return;
341
+ }
342
+ let r = {
343
+ low: {
344
+ line: "#52c41a",
345
+ fill: "#52c41a"
346
+ },
347
+ medium: {
348
+ line: "#faad14",
349
+ fill: "#faad14"
350
+ },
351
+ high: {
352
+ line: "#ff4d4f",
353
+ fill: "#ff4d4f"
354
+ }
355
+ }, i = [], a = [];
356
+ n.forEach((e, t) => {
357
+ Array.isArray(e.risks) && e.risks.forEach((n, o) => {
358
+ if (!n.bbox) return;
359
+ let { lon_min: s, lat_min: c, lon_max: l, lat_max: u } = n.bbox;
360
+ if ([
361
+ s,
362
+ c,
363
+ l,
364
+ u
365
+ ].some((e) => e === void 0)) return;
366
+ let d = r[n.risk_level || "low"] || r.low, f = `riskArea_p${t}_r${o}`;
367
+ i.push({
368
+ polygonJson: [
369
+ {
370
+ lng: s,
371
+ lat: c
372
+ },
373
+ {
374
+ lng: l,
375
+ lat: c
376
+ },
377
+ {
378
+ lng: l,
379
+ lat: u
380
+ },
381
+ {
382
+ lng: s,
383
+ lat: u
384
+ },
385
+ {
386
+ lng: s,
387
+ lat: c
388
+ }
389
+ ],
390
+ lineColor: d.line,
391
+ weight: 2,
392
+ zIndex: 999,
393
+ lineStyle: "solid",
394
+ fillColor: d.fill,
395
+ fillOpacity: .25,
396
+ otherData: { polyId: f },
397
+ bAni: !1,
398
+ minZoom: null,
399
+ maxZoom: null
400
+ }), n.centroid?.lon && n.centroid?.lat && a.push({
401
+ spotObject: [{
402
+ offsetX: -12,
403
+ offsetY: -30,
404
+ bAni: !1,
405
+ minZoom: null,
406
+ maxZoom: null,
407
+ spotArrone: [{
408
+ lng: String(n.centroid.lon),
409
+ lat: String(n.centroid.lat),
410
+ htmlString: `<div style="display:flex;color:${d.line};padding:2px 8px;font-size:12px;white-space:nowrap;">
411
+ <div>${e.period_label || ""}</div>
412
+ <div>${n.risk_type_label || ""}</div>
413
+ <div>${n.risk_level_label || ""}</div>
414
+ </div>`,
415
+ otherData: { markId: `riskMark_${f}` }
416
+ }]
417
+ }],
418
+ drawArrObj: [],
419
+ clickOpen: !1,
420
+ hoverOpen: !1
421
+ });
422
+ });
423
+ }), i.length > 0 && (w("addPolygon", {
424
+ removePolygon: "riskArea",
425
+ polygonArr: i
426
+ }), console.log(`绘制了 ${i.length} 个风险区域多边形`)), a.length > 0 && (a.forEach((e) => {
427
+ w("addMarker", {
428
+ removeMarker: "riskMark",
429
+ mapMarker: e
430
+ });
431
+ }), console.log(`绘制了 ${a.length} 个风险标记点`));
432
+ } catch (e) {
433
+ console.error("处理风险数据失败:", e);
434
+ }
435
+ };
436
+ f(() => {
437
+ S?.on("toComponent", (e) => {
438
+ e.componentName === "RadarTime" && Be();
439
+ }), document.addEventListener("click", H);
440
+ }), ee(() => {
441
+ document.removeEventListener("click", H), Y();
442
+ });
443
+ let Be = async () => {
444
+ await Le(), await Q();
445
+ }, Ve = () => {
446
+ Y(), w("clearImg", "radarLayer"), w("close", "RadarTime");
447
+ };
448
+ return (n, i) => {
449
+ let c = e;
450
+ return v((p(), o("div", b, [s("div", ne, [s("div", re, [t.showCloseBtn ? (p(), o("div", {
451
+ key: 0,
452
+ class: "closeBtn",
453
+ onClick: Ve,
454
+ title: "关闭"
455
+ })) : a("", !0)]), i[0] ||= s("img", {
456
+ class: "RadarTime__head-line",
457
+ 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",
458
+ alt: ""
459
+ }, null, -1)]), s("div", ie, [
460
+ s("div", ae, [
461
+ s("div", {
462
+ class: "RadarTime__dropdown",
463
+ ref_key: "dropdownRef",
464
+ ref: I
465
+ }, [s("div", {
466
+ class: "RadarTime__trigger",
467
+ onClick: B
468
+ }, [s("span", oe, g(Te.value || "选择时间"), 1), s("span", { class: u(["RadarTime__arrow", { "is-open": F.value }]) }, "▼", 2)]), v(s("div", se, [s("div", ce, [i[1] ||= s("div", { class: "RadarTime__time-item" }, " 暂无数据 ", -1), (p(!0), o(r, null, h(R.value, (e, t) => (p(), o("div", {
469
+ key: t,
470
+ class: u(["RadarTime__time-item", { "is-selected": L.value === t }]),
471
+ onClick: (e) => Oe(t)
472
+ }, g(e.time), 11, le))), 128))])], 512), [[_, F.value]])], 512),
473
+ D.value.length > 0 && A.value >= 0 ? (p(), o("div", ue, [i[2] ||= s("span", { class: "RadarTime__node-label" }, "当前:", -1), s("span", de, g(D.value[A.value]?.time || "--:--"), 1)])) : a("", !0),
474
+ s("div", fe, [i[3] ||= s("span", { class: "RadarTime__legend-title" }, "图例", -1), s("div", pe, [(p(!0), o(r, null, h(t.legendData, (e, t) => (p(), o("div", {
475
+ key: t,
476
+ class: "RadarTime__legend-segment",
477
+ style: d({ backgroundColor: e.color })
478
+ }, null, 4))), 128)), s("div", x, [(p(!0), o(r, null, h(t.legendData, (e, t) => (p(), o("span", { key: t }, g(e.value), 1))), 128))])])])
479
+ ]),
480
+ j.value.length > 0 ? (p(), o("div", me, [s("div", {
481
+ class: "RadarTime__station-dropdown",
482
+ ref_key: "stationDropdownRef",
483
+ ref: P
484
+ }, [
485
+ i[4] ||= s("label", { style: {
486
+ color: "#fff",
487
+ "font-size": "12px"
488
+ } }, "雷达:", -1),
489
+ s("div", {
490
+ class: "RadarTime__station-trigger",
491
+ onClick: Ee
492
+ }, [s("span", he, g(M.value?.ld_name || "选择雷达站"), 1), s("span", { class: u(["RadarTime__arrow", { "is-open": N.value }]) }, "▼", 2)]),
493
+ v(s("div", ge, [(p(!0), o(r, null, h(j.value, (e, t) => (p(), o("div", {
494
+ key: t,
495
+ class: u(["RadarTime__station-item", { "is-selected": M.value?.ldCode === e.ld_code }]),
496
+ onClick: (t) => De(e)
497
+ }, g(e.ld_name), 11, _e))), 128))], 512), [[_, N.value]])
498
+ ], 512)])) : a("", !0),
499
+ s("div", ve, [s("div", ye, [s("button", {
500
+ class: u(["RadarTime__play-btn", { playing: E.value }]),
501
+ onClick: Pe
502
+ }, [E.value ? (p(), o("svg", xe, [...i[6] ||= [s("path", { d: "M6 4h4v16H6V4zm8 0h4v16h-4V4z" }, null, -1)]])) : (p(), o("svg", be, [...i[5] ||= [s("path", { d: "M8 5v14l11-7z" }, null, -1)]]))], 2)]), s("div", {
503
+ class: "RadarTime__track-wrapper",
504
+ ref_key: "trackWrapper",
505
+ ref: W,
506
+ onMousedown: Me,
507
+ onMousemove: Ne,
508
+ onMouseup: K,
509
+ onMouseleave: K
510
+ }, [
511
+ s("div", Se, [s("div", {
512
+ class: "RadarTime__track-section RadarTime__track-live",
513
+ style: d({ width: U.value + "%" })
514
+ }, [...i[7] ||= [s("span", { class: "RadarTime__section-label" }, "实况", -1)]], 4), s("div", {
515
+ class: "RadarTime__track-section RadarTime__track-forecast",
516
+ style: d({ width: 100 - U.value + "%" })
517
+ }, [...i[8] ||= [s("span", {
518
+ class: "RadarTime__section-label",
519
+ style: { color: "#fff" }
520
+ }, "外推", -1)]], 4)]),
521
+ s("div", Ce, [(p(!0), o(r, null, h(D.value, (e, t) => (p(), o("div", {
522
+ key: t,
523
+ class: u(["RadarTime__tick", { active: A.value === t }]),
524
+ style: d({ left: Ae(t) + "%" }),
525
+ onClick: y((e) => X(t), ["stop"])
526
+ }, [...i[9] ||= [s("div", { class: "RadarTime__tick-dot" }, null, -1)]], 14, we))), 128))]),
527
+ s("div", {
528
+ class: "RadarTime__indicator",
529
+ style: d({ left: ke.value + "%" }),
530
+ ref_key: "positionIndicator",
531
+ ref: je
532
+ }, null, 4)
533
+ ], 544)])
534
+ ])])), [[c, T.value]]);
535
+ };
536
+ }
537
+ }), [["__scopeId", "data-v-7f07a478"]]);
538
+ //#endregion
539
+ export { S as t };
@@ -0,0 +1,121 @@
1
+ import { n as e, r as t } from "./component-AqiMonitor-DoGm_NCt.mjs";
2
+ import { Fragment as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, getCurrentInstance as s, onMounted as c, openBlock as l, ref as u, renderList as d, toDisplayString as f, withModifiers as p } from "vue";
3
+ //#region src/components/ServiceMaterial/ServiceMaterial.vue?vue&type=script&setup=true&lang.ts
4
+ var m = { class: "ServiceMaterial" }, h = { class: "ServiceMaterial__head" }, g = { class: "ServiceMaterial__head-top" }, _ = { class: "ServiceMaterial__body" }, v = { class: "ServiceMaterial__list" }, y = { class: "ServiceMaterial__list-container" }, b = { class: "ServiceMaterial__list-content" }, x = { class: "ServiceMaterial__list-col ServiceMaterial__list-col--name" }, S = ["title"], C = { class: "ServiceMaterial__list-col ServiceMaterial__list-col--time" }, w = { class: "ServiceMaterial__list-col ServiceMaterial__list-col--action" }, T = ["onClick"], E = ["onClick"], D = {
5
+ key: 0,
6
+ class: "ServiceMaterial__empty"
7
+ }, O = { class: "ServiceMaterial__list-footer" }, k = { class: "ServiceMaterial__total" }, A = /* @__PURE__ */ e(/* @__PURE__ */ o({
8
+ __name: "ServiceMaterial",
9
+ props: {
10
+ appKey: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ appSalt: {
15
+ type: String,
16
+ default: ""
17
+ },
18
+ baseHttp: {
19
+ type: String,
20
+ default: ""
21
+ },
22
+ ids: {
23
+ type: Object,
24
+ default: () => ({})
25
+ },
26
+ title: {
27
+ type: String,
28
+ default: "服务材料制作"
29
+ }
30
+ },
31
+ emits: [
32
+ "close",
33
+ "preview",
34
+ "download"
35
+ ],
36
+ setup(e, { emit: o }) {
37
+ let A = s()?.appContext.config.globalProperties.$bus, j = e, M = o, N = u(!1), P = u([]);
38
+ c(() => {
39
+ A?.on("toComponent", (e) => {
40
+ e.componentName === "ServiceMaterial" && F();
41
+ }), F();
42
+ });
43
+ let F = async () => {
44
+ await I();
45
+ }, I = async () => {
46
+ if (j.ids.data?.id) {
47
+ N.value = !0;
48
+ try {
49
+ let e = await t({
50
+ appKey: j.appKey,
51
+ appSalt: j.appSalt,
52
+ id: j.ids.data.id,
53
+ variables: {},
54
+ baseHttp: j.baseHttp,
55
+ reqType: j.ids.data.reqType,
56
+ isFormData: j.ids.data.isFormData
57
+ });
58
+ console.log(e, "服务材料数据");
59
+ let n = e.data?.result?.output || [];
60
+ Array.isArray(n) && n.length > 0 && (P.value = n.map((e) => ({
61
+ id: e.id || e.file_id,
62
+ name: e.name || e.file_name || e.title || "",
63
+ createTime: e.createTime || e.create_time || e.created_at || "",
64
+ fileUrl: e.fileUrl || e.file_url || e.url || "#",
65
+ previewUrl: e.previewUrl || e.preview_url || e.url || "#"
66
+ })));
67
+ } catch (e) {
68
+ console.error("获取服务材料失败:", e);
69
+ } finally {
70
+ N.value = !1;
71
+ }
72
+ }
73
+ }, L = (e) => {
74
+ M("preview", e), window.open(e.previewUrl, "_blank");
75
+ }, R = (e) => {
76
+ M("download", e), window.location.href = e.fileUrl;
77
+ }, z = () => {
78
+ window.open("http://58.213.50.38:9192/AICloud-user/#/chatAssistant?account=admin&password=123456", "_blank");
79
+ }, B = () => {
80
+ M("close", "ServiceMaterial");
81
+ };
82
+ return (t, o) => (l(), i("div", m, [a("div", h, [a("div", g, [a("div", null, f(e.title), 1), a("div", {
83
+ class: "closeBtn",
84
+ onClick: B,
85
+ title: "关闭"
86
+ })]), o[0] ||= a("img", {
87
+ class: "ServiceMaterial__head-line",
88
+ 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",
89
+ alt: ""
90
+ }, null, -1)]), a("div", _, [a("div", v, [a("div", y, [
91
+ o[1] ||= a("div", { class: "ServiceMaterial__list-header" }, [
92
+ a("div", { class: "ServiceMaterial__list-col ServiceMaterial__list-col--name" }, "材料名称"),
93
+ a("div", { class: "ServiceMaterial__list-col ServiceMaterial__list-col--time" }, "制作时间"),
94
+ a("div", { class: "ServiceMaterial__list-col ServiceMaterial__list-col--action" }, "操作")
95
+ ], -1),
96
+ a("div", b, [(l(!0), i(n, null, d(P.value, (e) => (l(), i("div", {
97
+ key: e.id,
98
+ class: "ServiceMaterial__list-row"
99
+ }, [
100
+ a("div", x, [a("span", {
101
+ class: "ServiceMaterial__file-name",
102
+ title: e.name
103
+ }, f(e.name), 9, S)]),
104
+ a("div", C, f(e.createTime), 1),
105
+ a("div", w, [a("span", {
106
+ class: "ServiceMaterial__link",
107
+ onClick: p((t) => L(e), ["stop"])
108
+ }, "预览", 8, T), a("span", {
109
+ class: "ServiceMaterial__link",
110
+ onClick: p((t) => R(e), ["stop"])
111
+ }, "下载", 8, E)])
112
+ ]))), 128)), !P.value || !P.value.length ? (l(), i("div", D, "暂无数据")) : r("", !0)]),
113
+ a("div", O, [a("span", k, "共 " + f(P.value.length) + " 份服务材料", 1), a("span", {
114
+ class: "ServiceMaterial__create-btn",
115
+ onClick: z
116
+ }, "去制作")])
117
+ ])])])]));
118
+ }
119
+ }), [["__scopeId", "data-v-9798930e"]]);
120
+ //#endregion
121
+ export { A as t };