nxd-plugin 1.8.47 → 1.8.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nxd-plugin",
3
- "version": "1.8.47",
3
+ "version": "1.8.48",
4
4
  "main": "dist/nxd-plugin.mjs",
5
5
  "module": "dist/nxd-plugin.mjs",
6
6
  "types": "dist/src/index.d.ts",
@@ -1,2 +0,0 @@
1
- import { t as e } from "./component-YCServiceSummary-CbPG7pl2.mjs";
2
- export { e as default };
@@ -1,412 +0,0 @@
1
- import { g as e, p as t } from "./component-Agent-DwXtdLhK.mjs";
2
- import { a as n } from "./component-HdFarmStationDialog-BHxuJEsh.mjs";
3
- import { t as r } from "./component-YCDataMonitor-BPflVY09.mjs";
4
- import { ElConfigProvider as i, ElDatePicker as a, ElInput as o, ElLoadingDirective as s } from "element-plus/es";
5
- import { Fragment as c, computed 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
- import "element-plus/es/components/loading/style/css";
7
- import "element-plus/es/components/input/style/css";
8
- import D from "element-plus/es/locale/lang/zh-cn";
9
- import "element-plus/es/components/date-picker/style/css";
10
- //#region src/components/YCRealTimeTable/YCRealTimeTable.vue?vue&type=script&setup=true&lang.ts
11
- var O = {
12
- class: "YCRealTimeTable",
13
- "element-loading-background": "rgba(0, 0, 0, 0.3)"
14
- }, k = { class: "YCRealTimeTable-summary" }, A = { class: "summary-table" }, j = { class: "summary-head" }, ee = { class: "summary-body" }, te = { class: "summary-cell summary-cell-label" }, ne = { class: "YCRealTimeTable-toolbar" }, re = { class: "filter-group" }, M = { class: "YCRealTimeTable-detail" }, N = { class: "detail-table" }, P = { class: "detail-head" }, F = ["onClick"], I = { class: "detail-body" }, L = { class: "detail-cell detail-cell-index" }, R = { class: "detail-cell" }, z = { class: "detail-cell" }, B = { class: "detail-cell" }, V = { class: "detail-cell" }, H = { class: "detail-cell" }, U = { class: "detail-cell" }, W = { class: "detail-cell" }, G = { class: "detail-cell" }, K = /* @__PURE__ */ t(/* @__PURE__ */ h({
15
- __name: "YCRealTimeTable",
16
- props: {
17
- appKey: {
18
- type: String,
19
- default: ""
20
- },
21
- appSalt: {
22
- type: String,
23
- default: ""
24
- },
25
- baseHttp: {
26
- type: String,
27
- default: ""
28
- },
29
- ids: {
30
- type: Object,
31
- default: () => ({})
32
- }
33
- },
34
- setup(t) {
35
- let r = t, i = b(!1), a = b([]), h = [
36
- "5分钟降水量",
37
- "当前小时雨量",
38
- "1小时雨量",
39
- "3小时雨量",
40
- "20时至当前雨量",
41
- "24小时雨量",
42
- "极大风速",
43
- "能见度",
44
- "最小能见度"
45
- ], C = b([]), w = b([]), T = [
46
- {
47
- key: "index",
48
- label: "序号",
49
- sortable: !1
50
- },
51
- {
52
- key: "county",
53
- label: "县名",
54
- sortable: !1
55
- },
56
- {
57
- key: "station",
58
- label: "站名",
59
- sortable: !1
60
- },
61
- {
62
- key: "time",
63
- label: "时间",
64
- sortable: !0
65
- },
66
- {
67
- key: "rain24",
68
- label: "24小时雨量",
69
- sortable: !0
70
- },
71
- {
72
- key: "rain20",
73
- label: "20时至现在雨量",
74
- sortable: !0
75
- },
76
- {
77
- key: "rain3",
78
- label: "3小时雨量",
79
- sortable: !0
80
- },
81
- {
82
- key: "rain1",
83
- label: "1小时雨量",
84
- sortable: !0
85
- },
86
- {
87
- key: "rainCurrent",
88
- label: "当前小时雨量",
89
- sortable: !0
90
- },
91
- {
92
- key: "rain5m",
93
- label: "5分钟降水量",
94
- sortable: !0
95
- },
96
- {
97
- key: "temp",
98
- label: "气温",
99
- sortable: !0
100
- },
101
- {
102
- key: "windDir",
103
- label: "极大风向",
104
- sortable: !1
105
- },
106
- {
107
- key: "windSpeed",
108
- label: "极大风速",
109
- sortable: !0
110
- },
111
- {
112
- key: "humidity",
113
- label: "湿度",
114
- sortable: !0
115
- },
116
- {
117
- key: "pressure",
118
- label: "气压",
119
- sortable: !0
120
- },
121
- {
122
- key: "_voltage",
123
- label: "电压",
124
- sortable: !0
125
- }
126
- ], D = b(!0), K = b(""), q = b(""), J = b(null), Y = b(null), X = b(null), Z = l(() => {
127
- let e = w.value;
128
- D.value || (e = e.filter((e) => e.county === "袁州区"));
129
- let t = K.value.trim();
130
- t && (e = e.filter((e) => e.county.includes(t)));
131
- let n = q.value.trim();
132
- return n && (e = e.filter((e) => e.station.includes(n))), e;
133
- }), ie = l(() => {
134
- let e = [...Z.value];
135
- if (!J.value || !Y.value) return e;
136
- let t = J.value;
137
- return e.sort((e, n) => {
138
- let r = e[t], i = n[t], a = r === null || r === "" || r === void 0, o = i === null || i === "" || i === void 0;
139
- if (a && o) return 0;
140
- if (a) return 1;
141
- if (o) return -1;
142
- let s, c;
143
- if (t === "time") {
144
- if (s = $(String(r)), c = $(String(i)), s < 0 && c < 0) return 0;
145
- if (s < 0) return 1;
146
- if (c < 0) return -1;
147
- } else s = Number(r), c = Number(i);
148
- return Y.value === "asc" ? s - c : c - s;
149
- });
150
- });
151
- v(() => {
152
- Q(), X.value = setInterval(() => {
153
- Q();
154
- }, 1e3 * 60 * 10);
155
- }), _(() => {
156
- clearInterval(X.value), X.value = null;
157
- });
158
- let Q = async () => {
159
- i.value = !0;
160
- let t = await e({
161
- appKey: r.appKey,
162
- appSalt: r.appSalt,
163
- id: r.ids.YCRealTimeTable_data.id,
164
- variables: {},
165
- baseHttp: r.baseHttp,
166
- reqType: r.ids.YCRealTimeTable_data.reqType,
167
- isFormData: r.ids.YCRealTimeTable_data.isFormData
168
- }), o = t.data.result.output || "{}", s = JSON.parse(o);
169
- console.log("res_output", s.data);
170
- let c = t.data.result.voltage || [], l = new Map(c.map((e) => [e.station_id, e])), { nationalStations: u, otherStations: d } = s.data || {
171
- nationalStations: [],
172
- otherStations: []
173
- };
174
- a.value = (u || []).map((e) => e.stationName);
175
- let f = (e) => e == null || e === "" ? "" : e;
176
- C.value = h.map((e) => (u || []).map((t) => {
177
- switch (e) {
178
- case "5分钟降水量": return {
179
- value: f(t.rain5m),
180
- isWarn: t.rain5mThreshold === 1
181
- };
182
- case "当前小时雨量": return {
183
- value: f(t.currentHourRain),
184
- isWarn: t.currentHourRainThreshold === 1
185
- };
186
- case "1小时雨量": return {
187
- value: f(t.rain1h),
188
- isWarn: t.rain1hThreshold === 1
189
- };
190
- case "3小时雨量": return {
191
- value: f(t.rain3h),
192
- isWarn: t.rain3hThreshold === 1
193
- };
194
- case "20时至当前雨量": return {
195
- value: f(t.rain20ToNow),
196
- isWarn: !1
197
- };
198
- case "24小时雨量": return {
199
- value: f(t.rain24h),
200
- isWarn: !1
201
- };
202
- case "极大风速": return {
203
- value: f(t.winSInstMax),
204
- isWarn: !1
205
- };
206
- case "能见度": return {
207
- value: f(t.visHor1mi),
208
- isWarn: t.visHor1miThreshold === 1
209
- };
210
- case "最小能见度": return {
211
- value: f(t.visMin),
212
- isWarn: !1
213
- };
214
- default: return {
215
- value: "",
216
- isWarn: !1
217
- };
218
- }
219
- })), w.value = (d || []).map((e) => {
220
- let t = "";
221
- if (e.datetime) {
222
- let n = e.datetime.match(/(\d{2}):(\d{2}):\d{2}$/);
223
- n && (t = `${n[1]}时${n[2]}分`);
224
- }
225
- let r = l.get(e.stationIdC), i = r ? f(r.ua) : "", a = r ? Number(r.ua) < Number(r.warning_ua) : !1;
226
- return {
227
- county: e.cnty || "",
228
- station: e.stationName || "",
229
- time: t,
230
- rain24: f(e.rain24h),
231
- rain20: f(e.rain20ToNow),
232
- rain3: f(e.rain3h),
233
- rain3Warn: e.rain3hThreshold === 1,
234
- rain1: f(e.rain1h),
235
- rain1Warn: e.rain1hThreshold === 1,
236
- rainCurrent: f(e.currentHourRain),
237
- rainCurrentWarn: e.currentHourRainThreshold === 1,
238
- rain5m: f(e.rain5m),
239
- rain5mWarn: e.rain5mThreshold === 1,
240
- temp: f(e.tem),
241
- tempWarn: e.temThreshold === 1,
242
- windDir: e.winDInstMax ? n(e.winDInstMax) : "",
243
- windSpeed: f(e.winSInstMax),
244
- windSpeedWarn: e.winSInstMaxThreshold === 1,
245
- humidity: f(e.rhu),
246
- pressure: f(e.prs),
247
- _voltage: i,
248
- _voltageWarn: a
249
- };
250
- }), setTimeout(() => {
251
- i.value = !1;
252
- }, 300);
253
- }, $ = (e) => {
254
- if (!e) return -1;
255
- let t = e.match(/(\d+)时(\d+)分/);
256
- return t ? Number(t[1]) * 60 + Number(t[2]) : -1;
257
- }, ae = (e, t) => t == null || t === "" ? "" : t, oe = (e) => {
258
- J.value === e ? Y.value === "desc" ? Y.value = "asc" : Y.value === "asc" ? (J.value = null, Y.value = null) : Y.value = "desc" : (J.value = e, Y.value = "desc");
259
- };
260
- return (e, t) => {
261
- let n = o, r = s;
262
- return E((y(), d("div", O, [
263
- f("div", k, [f("div", A, [f("div", j, [t[3] ||= f("div", { class: "summary-cell summary-cell-label" }, "监测要素", -1), (y(!0), d(c, null, x(a.value, (e, t) => (y(), d("div", {
264
- class: "summary-cell",
265
- key: t
266
- }, S(e), 1))), 128))]), f("div", ee, [(y(), d(c, null, x(h, (e, t) => f("div", {
267
- class: "summary-row",
268
- key: e
269
- }, [f("div", te, S(e), 1), (y(!0), d(c, null, x(a.value, (n, r) => (y(), d("div", {
270
- class: g(["summary-cell", { "is-warn": C.value[t]?.[r]?.isWarn }]),
271
- key: r
272
- }, S(ae(e, C.value[t]?.[r]?.value)), 3))), 128))])), 64))])])]),
273
- f("div", ne, [f("div", re, [
274
- f("button", {
275
- class: g(["city-btn", { active: D.value }]),
276
- onClick: t[0] ||= (e) => D.value = !D.value
277
- }, "全市", 2),
278
- m(n, {
279
- modelValue: K.value,
280
- "onUpdate:modelValue": t[1] ||= (e) => K.value = e,
281
- placeholder: "县名搜索",
282
- clearable: "",
283
- class: "filter-input"
284
- }, null, 8, ["modelValue"]),
285
- m(n, {
286
- modelValue: q.value,
287
- "onUpdate:modelValue": t[2] ||= (e) => q.value = e,
288
- placeholder: "站名搜索",
289
- clearable: "",
290
- class: "filter-input"
291
- }, null, 8, ["modelValue"])
292
- ])]),
293
- f("div", M, [f("div", N, [f("div", P, [(y(), d(c, null, x(T, (e) => f("div", {
294
- class: g(["detail-cell", {
295
- "is-sortable": e.sortable,
296
- "is-active": J.value === e.key
297
- }]),
298
- key: e.key,
299
- onClick: (t) => e.sortable && oe(e.key)
300
- }, [p(S(e.label) + " ", 1), e.sortable ? (y(), d("span", {
301
- key: 0,
302
- class: g(["sort-icon", J.value === e.key ? Y.value : ""])
303
- }, null, 2)) : u("", !0)], 10, F)), 64))]), f("div", I, [(y(!0), d(c, null, x(ie.value, (e, t) => (y(), d("div", {
304
- class: "detail-row",
305
- key: `${e.county}-${e.station}-${t}`
306
- }, [
307
- f("div", L, S(t + 1), 1),
308
- f("div", R, S(e.county), 1),
309
- f("div", z, S(e.station), 1),
310
- f("div", B, S(e.time), 1),
311
- f("div", V, S(e.rain24), 1),
312
- f("div", H, S(e.rain20), 1),
313
- f("div", { class: g(["detail-cell", { "is-warn": e.rain3Warn }]) }, S(e.rain3), 3),
314
- f("div", { class: g(["detail-cell", { "is-warn": e.rain1Warn }]) }, S(e.rain1), 3),
315
- f("div", { class: g(["detail-cell", { "is-warn": e.rainCurrentWarn }]) }, S(e.rainCurrent), 3),
316
- f("div", { class: g(["detail-cell", { "is-warn": e.rain5mWarn }]) }, S(e.rain5m), 3),
317
- f("div", { class: g(["detail-cell", { "is-warn": e.tempWarn }]) }, S(e.temp), 3),
318
- f("div", U, S(e.windDir), 1),
319
- f("div", { class: g(["detail-cell", { "is-warn": e.windSpeedWarn }]) }, S(e.windSpeed), 3),
320
- f("div", W, S(e.humidity), 1),
321
- f("div", G, S(e.pressure), 1),
322
- f("div", { class: g(["detail-cell", { "is-warn": e._voltageWarn }]) }, S(e._voltage), 3)
323
- ]))), 128))])])])
324
- ])), [[r, i.value]]);
325
- };
326
- }
327
- }), [["__scopeId", "data-v-d4a25ff6"]]), q = { class: "YCDataService" }, J = { class: "YCDataService-topbar" }, Y = { class: "page-switch" }, X = {
328
- key: 0,
329
- class: "YCDataService-filter"
330
- }, Z = /* @__PURE__ */ t(/* @__PURE__ */ h({
331
- __name: "YCDataService",
332
- props: {
333
- appKey: {
334
- type: String,
335
- default: ""
336
- },
337
- appSalt: {
338
- type: String,
339
- default: ""
340
- },
341
- baseHttp: {
342
- type: String,
343
- default: ""
344
- },
345
- ids: {
346
- type: Object,
347
- default: () => ({})
348
- }
349
- },
350
- setup(e) {
351
- let t = b("dataService"), n = b((/* @__PURE__ */ new Date()).toISOString().slice(0, 10)), o = b(null), s = () => {
352
- o.value?.handleSearch?.();
353
- };
354
- v(() => {
355
- c();
356
- });
357
- let c = async () => {};
358
- return (c, l) => {
359
- let p = a, h = i;
360
- return y(), d("div", q, [
361
- f("div", J, [f("div", Y, [f("div", {
362
- class: g(["page-switch-item", { active: t.value === "dataService" }]),
363
- onClick: l[0] ||= (e) => t.value = "dataService"
364
- }, " 数据服务 ", 2), f("div", {
365
- class: g(["page-switch-item", { active: t.value === "dataMonitor" }]),
366
- onClick: l[1] ||= (e) => t.value = "dataMonitor"
367
- }, " 数据质量检查 ", 2)]), t.value === "dataMonitor" ? (y(), d("div", X, [m(h, { locale: C(D) }, {
368
- default: T(() => [m(p, {
369
- modelValue: n.value,
370
- "onUpdate:modelValue": l[2] ||= (e) => n.value = e,
371
- type: "date",
372
- placeholder: "选择日期",
373
- "value-format": "YYYY-MM-DD",
374
- class: "date-picker"
375
- }, null, 8, ["modelValue"])]),
376
- _: 1
377
- }, 8, ["locale"]), f("button", {
378
- class: "search-btn",
379
- onClick: s
380
- }, "查询")])) : u("", !0)]),
381
- E(m(K, {
382
- appKey: e.appKey,
383
- appSalt: e.appSalt,
384
- baseHttp: e.baseHttp,
385
- ids: e.ids
386
- }, null, 8, [
387
- "appKey",
388
- "appSalt",
389
- "baseHttp",
390
- "ids"
391
- ]), [[w, t.value === "dataService"]]),
392
- E(m(r, {
393
- ref_key: "dataMonitorRef",
394
- ref: o,
395
- appKey: e.appKey,
396
- appSalt: e.appSalt,
397
- baseHttp: e.baseHttp,
398
- ids: e.ids,
399
- date: n.value
400
- }, null, 8, [
401
- "appKey",
402
- "appSalt",
403
- "baseHttp",
404
- "ids",
405
- "date"
406
- ]), [[w, t.value === "dataMonitor"]])
407
- ]);
408
- };
409
- }
410
- }), [["__scopeId", "data-v-7ea3b34c"]]);
411
- //#endregion
412
- export { Z as t };