nxd-plugin 1.7.68 → 1.7.69

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.7.68",
3
+ "version": "1.7.69",
4
4
  "main": "dist/nxd-plugin.mjs",
5
5
  "module": "dist/nxd-plugin.mjs",
6
6
  "types": "dist/src/index.d.ts",
@@ -1,325 +0,0 @@
1
- import { n as e, r as t } from "./component-AqiMonitor-DbEiA-eq.mjs";
2
- import { ElInput as n, ElLoadingDirective as r } from "element-plus/es";
3
- import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, normalizeClass as f, onBeforeUnmount as ee, onMounted as te, openBlock as p, ref as m, renderList as h, toDisplayString as g, withDirectives as ne, withModifiers as re } from "vue";
4
- import { ElMessage as ie } from "element-plus";
5
- import "element-plus/es/components/input/style/css";
6
- import "element-plus/es/components/message/style/css";
7
- //#region src/components/YCDataMonitor/YCDataMonitor.vue?vue&type=script&setup=true&lang.ts
8
- var ae = {
9
- class: "YCDataMonitor",
10
- "element-loading-background": "rgba(0, 0, 0, 0.3)"
11
- }, oe = { class: "YCDataMonitor-summary" }, se = { class: "summary-table" }, ce = { class: "summary-head" }, le = ["onClick"], ue = { class: "summary-body" }, de = { class: "summary-row" }, fe = { class: "summary-row" }, pe = { class: "summary-row" }, me = { class: "summary-row" }, he = { class: "YCDataMonitor-toolbar" }, ge = { class: "filter-group" }, _e = { class: "YCDataMonitor-detail" }, ve = { class: "detail-table" }, _ = { class: "detail-head" }, v = ["onClick"], y = { class: "detail-body" }, b = { class: "detail-cell detail-cell-index" }, x = { class: "detail-cell detail-cell-action" }, S = ["onClick"], C = { class: "dialog-box" }, w = { class: "dialog-header" }, T = { class: "dialog-title" }, E = { class: "dialog-body" }, D = { class: "info-grid" }, O = { class: "info-row-inline" }, k = { class: "info-item" }, A = { class: "info-value" }, j = { class: "info-item" }, M = { class: "info-value" }, N = { class: "info-item" }, P = { class: "info-value" }, F = { class: "info-item info-item-full" }, ye = { class: "info-header" }, be = { class: "info-value" }, xe = { class: "info-missing" }, Se = { class: "missing-list" }, Ce = {
12
- key: 0,
13
- class: "missing-empty"
14
- }, we = {
15
- key: 0,
16
- class: "info-action"
17
- }, Te = { class: "info-item info-item-full" }, Ee = { class: "info-header" }, De = { class: "info-value" }, Oe = { class: "info-missing" }, I = { class: "missing-list" }, ke = {
18
- key: 0,
19
- class: "missing-empty"
20
- }, Ae = {
21
- key: 0,
22
- class: "info-action"
23
- }, je = { class: "info-item info-item-full" }, Me = { class: "info-header" }, Ne = { class: "info-value" }, Pe = { class: "info-missing" }, Fe = { class: "missing-list" }, Ie = {
24
- key: 0,
25
- class: "missing-empty"
26
- }, Le = {
27
- key: 0,
28
- class: "info-action"
29
- }, Re = { class: "info-item info-item-full" }, ze = { class: "info-header" }, Be = { class: "info-value" }, Ve = { class: "info-missing" }, He = { class: "missing-list" }, Ue = {
30
- key: 0,
31
- class: "missing-empty"
32
- }, We = {
33
- key: 0,
34
- class: "info-action"
35
- }, L = /* @__PURE__ */ e(/* @__PURE__ */ d({
36
- __name: "YCDataMonitor",
37
- props: {
38
- appKey: {
39
- type: String,
40
- default: ""
41
- },
42
- appSalt: {
43
- type: String,
44
- default: ""
45
- },
46
- baseHttp: {
47
- type: String,
48
- default: ""
49
- },
50
- ids: {
51
- type: Object,
52
- default: () => ({})
53
- },
54
- date: {
55
- type: String,
56
- default: ""
57
- }
58
- },
59
- setup(e, { expose: d }) {
60
- let L = e, R = m(!1), z = m([]), B = m([]), V = [
61
- {
62
- key: "cnty",
63
- label: "县名",
64
- sortable: !1
65
- },
66
- {
67
- key: "stationName",
68
- label: "站名",
69
- sortable: !1
70
- },
71
- {
72
- key: "stationId",
73
- label: "站号",
74
- sortable: !0
75
- },
76
- {
77
- key: "minuteWeather",
78
- label: "分钟天气数据统计(实际/预期)",
79
- sortable: !1
80
- },
81
- {
82
- key: "minutePrecipitation",
83
- label: "分钟降水数据统计(实际/预期)",
84
- sortable: !1
85
- },
86
- {
87
- key: "hourly",
88
- label: "小时数据统计(实际/预期)",
89
- sortable: !1
90
- },
91
- {
92
- key: "daily",
93
- label: "日数据统计(实际/预期)",
94
- sortable: !1
95
- }
96
- ], Ge = [
97
- {
98
- key: "index",
99
- label: "序号",
100
- sortable: !1
101
- },
102
- ...V,
103
- {
104
- key: "action",
105
- label: "操作",
106
- sortable: !1
107
- }
108
- ], H = m(null), U = m(!0), W = m(""), G = m(""), K = m(null), q = m(null), Ke = a(() => {
109
- let e = B.value;
110
- U.value || (e = e.filter((e) => e.cnty === "袁州区"));
111
- let t = W.value.trim();
112
- t && (e = e.filter((e) => e.cnty.includes(t)));
113
- let n = G.value.trim();
114
- return n && (e = e.filter((e) => e.stationName.includes(n))), e;
115
- }), qe = a(() => {
116
- let e = [...Ke.value];
117
- if (!K.value || !q.value) return e;
118
- let t = K.value;
119
- return e.sort((e, n) => {
120
- let r = e[t], i = n[t], a = r === null || r === "" || r === void 0, o = i === null || i === "" || i === void 0;
121
- if (a && o) return 0;
122
- if (a) return 1;
123
- if (o) return -1;
124
- let s = J(String(r)), c = J(String(i));
125
- return q.value === "asc" ? s - c : c - s;
126
- });
127
- });
128
- te(() => {
129
- $(), H.value = setInterval(() => {
130
- $();
131
- }, 1e3 * 60 * 10);
132
- }), ee(() => {
133
- clearInterval(H.value), H.value = null;
134
- });
135
- let J = (e) => {
136
- let t = e.match(/^(-?\d+(?:\.\d+)?)/);
137
- return t ? Number(t[1]) : Number(e) || 0;
138
- }, Je = (e) => {
139
- K.value === e ? q.value === "desc" ? q.value = "asc" : q.value === "asc" ? (K.value = null, q.value = null) : q.value = "desc" : (K.value = e, q.value = "desc");
140
- }, Y = m(!1), X = m({}), Z = (e) => {
141
- X.value = { ...e }, Y.value = !0;
142
- }, Q = async (e) => {
143
- let n = JSON.parse(JSON.stringify(X.value));
144
- R.value = !0;
145
- let r = await t({
146
- appKey: L.appKey,
147
- appSalt: L.appSalt,
148
- id: L.ids.YCDataMonitor_getUrl.id,
149
- variables: {
150
- dataType: e,
151
- stationIds: n.stationId,
152
- missingTimes: n[e].missingTimes.toString()
153
- },
154
- baseHttp: L.baseHttp,
155
- reqType: L.ids.YCDataMonitor_getUrl.reqType,
156
- isFormData: L.ids.YCDataMonitor_getUrl.isFormData
157
- }), i = JSON.parse(r.data.result.output || "{}"), a = await t({
158
- appKey: L.appKey,
159
- appSalt: L.appSalt,
160
- id: L.ids.YCDataMonitor_toQuery.id,
161
- variables: {
162
- dataType: e,
163
- urls: i.data.urls.toString()
164
- },
165
- baseHttp: L.baseHttp,
166
- reqType: L.ids.YCDataMonitor_toQuery.reqType,
167
- isFormData: L.ids.YCDataMonitor_toQuery.isFormData
168
- }), o = JSON.parse(a.data.result.output || "{}");
169
- ie({
170
- message: `当前补录共${n[e].missingTimes.length}条数据,成功${o.data.insertedRecords || 0}条数据`,
171
- type: "success",
172
- zIndex: 6e3
173
- }), R.value = !1, Y.value = !1, $();
174
- }, $ = async () => {
175
- console.log("查询日期", L.date), R.value = !0, z.value = [], B.value = [];
176
- let e = await t({
177
- appKey: L.appKey,
178
- appSalt: L.appSalt,
179
- id: L.ids.YCDataMonitor_data.id,
180
- variables: { date: L.date },
181
- baseHttp: L.baseHttp,
182
- reqType: L.ids.YCDataMonitor_data.reqType,
183
- isFormData: L.ids.YCDataMonitor_data.isFormData
184
- });
185
- R.value = !1;
186
- let n = JSON.parse(e.data.result.output || "{}").data || {};
187
- console.log("list", n), z.value = n.nationalStations || [], B.value = n.regionalStations || [];
188
- };
189
- return d({ handleSearch: $ }), (e, t) => {
190
- let a = n, d = r;
191
- return ne((p(), s("div", ae, [
192
- c("div", oe, [c("div", se, [c("div", ce, [t[9] ||= c("div", { class: "summary-cell summary-cell-label" }, "监测要素", -1), (p(!0), s(i, null, h(z.value, (e) => (p(), s("div", {
193
- class: "summary-cell",
194
- key: e.stationId
195
- }, [l(g(e.stationName) + " ", 1), c("button", {
196
- class: "view-btn",
197
- onClick: (t) => Z(e)
198
- }, "查看", 8, le)]))), 128))]), c("div", ue, [
199
- c("div", de, [t[10] ||= c("div", { class: "summary-cell summary-cell-label" }, "分钟天气数据统计(实际/预期)", -1), (p(!0), s(i, null, h(z.value, (e) => (p(), s("div", {
200
- class: "summary-cell",
201
- key: e.stationId
202
- }, g(e.minuteWeather?.actualCount ?? "-") + " /" + g(e.minuteWeather?.expectedCount ?? "-"), 1))), 128))]),
203
- c("div", fe, [t[11] ||= c("div", { class: "summary-cell summary-cell-label" }, "分钟降水数据统计(实际/预期)", -1), (p(!0), s(i, null, h(z.value, (e) => (p(), s("div", {
204
- class: "summary-cell",
205
- key: e.stationId
206
- }, g(e.minutePrecipitation?.actualCount ?? "-") + " /" + g(e.minutePrecipitation?.expectedCount ?? "-"), 1))), 128))]),
207
- c("div", pe, [t[12] ||= c("div", { class: "summary-cell summary-cell-label" }, "小时数据统计(实际/预期)", -1), (p(!0), s(i, null, h(z.value, (e) => (p(), s("div", {
208
- class: "summary-cell",
209
- key: e.stationId
210
- }, g(e.hourly?.actualCount ?? "-") + " /" + g(e.hourly?.expectedCount ?? "-"), 1))), 128))]),
211
- c("div", me, [t[13] ||= c("div", { class: "summary-cell summary-cell-label" }, "日数据统计(实际/预期)", -1), (p(!0), s(i, null, h(z.value, (e) => (p(), s("div", {
212
- class: "summary-cell",
213
- key: e.stationId
214
- }, g(e.daily?.actualCount ?? "-") + " /" + g(e.daily?.expectedCount ?? "-"), 1))), 128))])
215
- ])])]),
216
- c("div", he, [c("div", ge, [
217
- c("button", {
218
- class: f(["city-btn", { active: U.value }]),
219
- onClick: t[0] ||= (e) => U.value = !U.value
220
- }, "全市", 2),
221
- u(a, {
222
- modelValue: W.value,
223
- "onUpdate:modelValue": t[1] ||= (e) => W.value = e,
224
- placeholder: "县名搜索",
225
- clearable: "",
226
- class: "filter-input"
227
- }, null, 8, ["modelValue"]),
228
- u(a, {
229
- modelValue: G.value,
230
- "onUpdate:modelValue": t[2] ||= (e) => G.value = e,
231
- placeholder: "站名搜索",
232
- clearable: "",
233
- class: "filter-input"
234
- }, null, 8, ["modelValue"])
235
- ])]),
236
- c("div", _e, [c("div", ve, [c("div", _, [(p(), s(i, null, h(Ge, (e) => c("div", {
237
- class: f(["detail-cell", {
238
- "is-sortable": e.sortable,
239
- "is-active": K.value === e.key,
240
- "detail-cell-index": e.key === "index",
241
- "detail-cell-action": e.key === "action"
242
- }]),
243
- key: e.key,
244
- onClick: (t) => e.sortable && Je(e.key)
245
- }, [l(g(e.label) + " ", 1), e.sortable ? (p(), s("span", {
246
- key: 0,
247
- class: f(["sort-icon", K.value === e.key ? q.value : ""])
248
- }, null, 2)) : o("", !0)], 10, v)), 64))]), c("div", y, [(p(!0), s(i, null, h(qe.value, (e, t) => (p(), s("div", {
249
- class: "detail-row",
250
- key: e.stationId
251
- }, [
252
- c("div", b, g(t + 1), 1),
253
- (p(), s(i, null, h(V, (t) => c("div", {
254
- class: "detail-cell",
255
- key: t.key
256
- }, [t.key === "minuteWeather" ? (p(), s(i, { key: 0 }, [l(g(e.minuteWeather?.actualCount ?? "-") + "/" + g(e.minuteWeather?.expectedCount ?? "-"), 1)], 64)) : t.key === "minutePrecipitation" ? (p(), s(i, { key: 1 }, [l(g(e.minutePrecipitation?.actualCount ?? "-") + "/" + g(e.minutePrecipitation?.expectedCount ?? "-"), 1)], 64)) : t.key === "hourly" ? (p(), s(i, { key: 2 }, [l(g(e.hourly?.actualCount ?? "-") + "/" + g(e.hourly?.expectedCount ?? "-"), 1)], 64)) : t.key === "daily" ? (p(), s(i, { key: 3 }, [l(g(e.daily?.actualCount ?? "-") + "/" + g(e.daily?.expectedCount ?? "-"), 1)], 64)) : (p(), s(i, { key: 4 }, [l(g(e[t.key]), 1)], 64))])), 64)),
257
- c("div", x, [c("button", {
258
- class: "view-btn",
259
- onClick: (t) => Z(e)
260
- }, "查看", 8, S)])
261
- ]))), 128))])])]),
262
- Y.value ? (p(), s("div", {
263
- key: 0,
264
- class: "dialog-overlay",
265
- onClick: t[8] ||= re((e) => Y.value = !1, ["self"])
266
- }, [c("div", C, [c("div", w, [c("span", T, "站点详情 - " + g(X.value.stationName), 1), c("button", {
267
- class: "dialog-close",
268
- onClick: t[3] ||= (e) => Y.value = !1
269
- }, "×")]), c("div", E, [c("div", D, [
270
- c("div", O, [
271
- c("div", k, [t[14] ||= c("div", { class: "info-label" }, "县名:", -1), c("div", A, g(X.value.cnty || "-"), 1)]),
272
- c("div", j, [t[15] ||= c("div", { class: "info-label" }, "站名:", -1), c("div", M, g(X.value.stationName || "-"), 1)]),
273
- c("div", N, [t[16] ||= c("div", { class: "info-label" }, "站号:", -1), c("div", P, g(X.value.stationId || "-"), 1)])
274
- ]),
275
- c("div", F, [
276
- c("div", ye, [t[17] ||= c("div", { class: "info-title" }, "分钟天气数据统计(实际/预期):", -1), c("div", be, g(X.value.minuteWeather?.actualCount ?? "-") + "/" + g(X.value.minuteWeather?.expectedCount ?? "-"), 1)]),
277
- c("div", xe, [t[18] ||= c("div", { class: "missing-label" }, "缺失日期:", -1), c("div", Se, [(p(!0), s(i, null, h(X.value.minuteWeather?.missingTimes || [], (e, t) => (p(), s("span", {
278
- class: "missing-tag",
279
- key: t
280
- }, g(e), 1))), 128)), X.value.minuteWeather?.missingTimes?.length ? o("", !0) : (p(), s("span", Ce, "-"))])]),
281
- X.value.minuteWeather?.missingTimes?.length ? (p(), s("div", we, [c("button", {
282
- class: "dialog-btn dialog-btn-small",
283
- onClick: t[4] ||= (e) => Q("minuteWeather")
284
- }, "补录")])) : o("", !0)
285
- ]),
286
- c("div", Te, [
287
- c("div", Ee, [t[19] ||= c("div", { class: "info-title" }, "分钟降水数据统计(实际/预期):", -1), c("div", De, g(X.value.minutePrecipitation?.actualCount ?? "-") + "/" + g(X.value.minutePrecipitation?.expectedCount ?? "-"), 1)]),
288
- c("div", Oe, [t[20] ||= c("div", { class: "missing-label" }, "缺失日期:", -1), c("div", I, [(p(!0), s(i, null, h(X.value.minutePrecipitation?.missingTimes || [], (e, t) => (p(), s("span", {
289
- class: "missing-tag",
290
- key: t
291
- }, g(e), 1))), 128)), X.value.minutePrecipitation?.missingTimes?.length ? o("", !0) : (p(), s("span", ke, "-"))])]),
292
- X.value.minutePrecipitation?.missingTimes?.length ? (p(), s("div", Ae, [c("button", {
293
- class: "dialog-btn dialog-btn-small",
294
- onClick: t[5] ||= (e) => Q("minutePrecipitation")
295
- }, "补录 ")])) : o("", !0)
296
- ]),
297
- c("div", je, [
298
- c("div", Me, [t[21] ||= c("div", { class: "info-title" }, "小时数据统计(实际/预期):", -1), c("div", Ne, g(X.value.hourly?.actualCount ?? "-") + "/" + g(X.value.hourly?.expectedCount ?? "-"), 1)]),
299
- c("div", Pe, [t[22] ||= c("div", { class: "missing-label" }, "缺失日期:", -1), c("div", Fe, [(p(!0), s(i, null, h(X.value.hourly?.missingTimes || [], (e, t) => (p(), s("span", {
300
- class: "missing-tag",
301
- key: t
302
- }, g(e), 1))), 128)), X.value.hourly?.missingTimes?.length ? o("", !0) : (p(), s("span", Ie, "-"))])]),
303
- X.value.hourly?.missingTimes?.length ? (p(), s("div", Le, [c("button", {
304
- class: "dialog-btn dialog-btn-small",
305
- onClick: t[6] ||= (e) => Q("hourly")
306
- }, "补录")])) : o("", !0)
307
- ]),
308
- c("div", Re, [
309
- c("div", ze, [t[23] ||= c("div", { class: "info-title" }, "日数据统计(实际/预期):", -1), c("div", Be, g(X.value.daily?.actualCount ?? "-") + "/" + g(X.value.daily?.expectedCount ?? "-"), 1)]),
310
- c("div", Ve, [t[24] ||= c("div", { class: "missing-label" }, "缺失日期:", -1), c("div", He, [(p(!0), s(i, null, h(X.value.daily?.missingTimes || [], (e, t) => (p(), s("span", {
311
- class: "missing-tag",
312
- key: t
313
- }, g(e), 1))), 128)), X.value.daily?.missingTimes?.length ? o("", !0) : (p(), s("span", Ue, "-"))])]),
314
- X.value.daily?.missingTimes?.length ? (p(), s("div", We, [c("button", {
315
- class: "dialog-btn dialog-btn-small",
316
- onClick: t[7] ||= (e) => Q("daily")
317
- }, "补录")])) : o("", !0)
318
- ])
319
- ])])])])) : o("", !0)
320
- ])), [[d, R.value]]);
321
- };
322
- }
323
- }), [["__scopeId", "data-v-a699d20a"]]);
324
- //#endregion
325
- export { L as t };