nxd-plugin 1.7.69 → 1.7.71
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/dist/chunks/component-YCDataMonitor-BGlcRDb4.mjs +326 -0
- package/dist/chunks/component-YCDataService-8077kO8a.mjs +399 -0
- package/dist/nxd-plugin.mjs +7 -7
- package/dist/src/components/YCDataService/YCDataService.vue.d.ts +66 -1
- package/dist/src/index.d.ts +1 -3
- package/dist/styles/component-YCDataMonitor.css +1 -0
- package/dist/styles/component-YCDataService.css +1 -1
- package/dist/styles/component-YCLoginNew.css +1 -1
- package/package.json +1 -1
- package/dist/chunks/component-YCDataService-CH46V7Oz.mjs +0 -715
- /package/dist/chunks/{component-ChartCumulativePre-B-8gpBKH.mjs → component-ChartCumulativePre-CqnTrs3A.mjs} +0 -0
- /package/dist/chunks/{component-ChartServiceMaterial-BJmsK4Yo.mjs → component-ChartServiceMaterial-DN-uO_OP.mjs} +0 -0
- /package/dist/chunks/{component-YCHomeLegend-Yq4pVH01.mjs → component-YCHomeLegend-CsgZ7ayU.mjs} +0 -0
|
@@ -1,715 +0,0 @@
|
|
|
1
|
-
import { n as e, r as t } from "./component-AqiMonitor-DbEiA-eq.mjs";
|
|
2
|
-
import { n } from "./component-HighwayWeatherForecast-jJgs1nWv.mjs";
|
|
3
|
-
import { ElConfigProvider as r, ElDatePicker as i, ElInput as a, ElLoadingDirective as o } from "element-plus/es";
|
|
4
|
-
import { Fragment as s, computed as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, onBeforeUnmount as g, onMounted as _, openBlock as v, ref as y, renderList as b, toDisplayString as x, unref as S, vShow as C, withCtx as w, withDirectives as T, withModifiers as E } from "vue";
|
|
5
|
-
import "element-plus/es/components/loading/style/css";
|
|
6
|
-
import { ElMessage as D } from "element-plus";
|
|
7
|
-
import "element-plus/es/components/input/style/css";
|
|
8
|
-
import "element-plus/es/components/message/style/css";
|
|
9
|
-
import O from "element-plus/es/locale/lang/zh-cn";
|
|
10
|
-
import "element-plus/es/components/date-picker/style/css";
|
|
11
|
-
//#region src/components/YCDataMonitor/YCDataMonitor.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var k = {
|
|
13
|
-
class: "YCDataMonitor",
|
|
14
|
-
"element-loading-background": "rgba(0, 0, 0, 0.3)"
|
|
15
|
-
}, A = { class: "YCDataMonitor-summary" }, j = { class: "summary-table" }, M = { class: "summary-head" }, N = ["onClick"], P = { class: "summary-body" }, F = { class: "summary-row" }, I = { class: "summary-row" }, L = { class: "summary-row" }, R = { class: "summary-row" }, ee = { class: "YCDataMonitor-toolbar" }, te = { class: "filter-group" }, ne = { class: "YCDataMonitor-detail" }, re = { class: "detail-table" }, ie = { class: "detail-head" }, ae = ["onClick"], oe = { class: "detail-body" }, se = { class: "detail-cell detail-cell-index" }, ce = { class: "detail-cell detail-cell-action" }, le = ["onClick"], ue = { class: "dialog-box" }, de = { class: "dialog-header" }, fe = { class: "dialog-title" }, pe = { class: "dialog-body" }, me = { class: "info-grid" }, he = { class: "info-row-inline" }, ge = { class: "info-item" }, _e = { class: "info-value" }, ve = { class: "info-item" }, ye = { class: "info-value" }, be = { class: "info-item" }, xe = { class: "info-value" }, Se = { class: "info-item info-item-full" }, Ce = { class: "info-header" }, we = { class: "info-value" }, Te = { class: "info-missing" }, Ee = { class: "missing-list" }, De = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "missing-empty"
|
|
18
|
-
}, Oe = {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: "info-action"
|
|
21
|
-
}, ke = { class: "info-item info-item-full" }, Ae = { class: "info-header" }, je = { class: "info-value" }, Me = { class: "info-missing" }, Ne = { class: "missing-list" }, Pe = {
|
|
22
|
-
key: 0,
|
|
23
|
-
class: "missing-empty"
|
|
24
|
-
}, Fe = {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: "info-action"
|
|
27
|
-
}, Ie = { class: "info-item info-item-full" }, Le = { class: "info-header" }, Re = { class: "info-value" }, ze = { class: "info-missing" }, Be = { class: "missing-list" }, Ve = {
|
|
28
|
-
key: 0,
|
|
29
|
-
class: "missing-empty"
|
|
30
|
-
}, He = {
|
|
31
|
-
key: 0,
|
|
32
|
-
class: "info-action"
|
|
33
|
-
}, Ue = { class: "info-item info-item-full" }, We = { class: "info-header" }, Ge = { class: "info-value" }, Ke = { class: "info-missing" }, qe = { class: "missing-list" }, Je = {
|
|
34
|
-
key: 0,
|
|
35
|
-
class: "missing-empty"
|
|
36
|
-
}, Ye = {
|
|
37
|
-
key: 0,
|
|
38
|
-
class: "info-action"
|
|
39
|
-
}, z = /* @__PURE__ */ e(/* @__PURE__ */ m({
|
|
40
|
-
__name: "YCDataMonitor",
|
|
41
|
-
props: {
|
|
42
|
-
appKey: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: ""
|
|
45
|
-
},
|
|
46
|
-
appSalt: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: ""
|
|
49
|
-
},
|
|
50
|
-
baseHttp: {
|
|
51
|
-
type: String,
|
|
52
|
-
default: ""
|
|
53
|
-
},
|
|
54
|
-
ids: {
|
|
55
|
-
type: Object,
|
|
56
|
-
default: () => ({})
|
|
57
|
-
},
|
|
58
|
-
date: {
|
|
59
|
-
type: String,
|
|
60
|
-
default: ""
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
setup(e, { expose: n }) {
|
|
64
|
-
let r = e, i = y(!1), m = y([]), S = y([]), C = [
|
|
65
|
-
{
|
|
66
|
-
key: "cnty",
|
|
67
|
-
label: "县名",
|
|
68
|
-
sortable: !1
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
key: "stationName",
|
|
72
|
-
label: "站名",
|
|
73
|
-
sortable: !1
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
key: "stationId",
|
|
77
|
-
label: "站号",
|
|
78
|
-
sortable: !0
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
key: "minuteWeather",
|
|
82
|
-
label: "分钟天气数据统计(实际/预期)",
|
|
83
|
-
sortable: !1
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
key: "minutePrecipitation",
|
|
87
|
-
label: "分钟降水数据统计(实际/预期)",
|
|
88
|
-
sortable: !1
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
key: "hourly",
|
|
92
|
-
label: "小时数据统计(实际/预期)",
|
|
93
|
-
sortable: !1
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
key: "daily",
|
|
97
|
-
label: "日数据统计(实际/预期)",
|
|
98
|
-
sortable: !1
|
|
99
|
-
}
|
|
100
|
-
], w = [
|
|
101
|
-
{
|
|
102
|
-
key: "index",
|
|
103
|
-
label: "序号",
|
|
104
|
-
sortable: !1
|
|
105
|
-
},
|
|
106
|
-
...C,
|
|
107
|
-
{
|
|
108
|
-
key: "action",
|
|
109
|
-
label: "操作",
|
|
110
|
-
sortable: !1
|
|
111
|
-
}
|
|
112
|
-
], O = y(null), z = y(!0), B = y(""), V = y(""), H = y(null), U = y(null), W = c(() => {
|
|
113
|
-
let e = S.value;
|
|
114
|
-
z.value || (e = e.filter((e) => e.cnty === "袁州区"));
|
|
115
|
-
let t = B.value.trim();
|
|
116
|
-
t && (e = e.filter((e) => e.cnty.includes(t)));
|
|
117
|
-
let n = V.value.trim();
|
|
118
|
-
return n && (e = e.filter((e) => e.stationName.includes(n))), e;
|
|
119
|
-
}), G = c(() => {
|
|
120
|
-
let e = [...W.value];
|
|
121
|
-
if (!H.value || !U.value) return e;
|
|
122
|
-
let t = H.value;
|
|
123
|
-
return e.sort((e, n) => {
|
|
124
|
-
let r = e[t], i = n[t], a = r === null || r === "" || r === void 0, o = i === null || i === "" || i === void 0;
|
|
125
|
-
if (a && o) return 0;
|
|
126
|
-
if (a) return 1;
|
|
127
|
-
if (o) return -1;
|
|
128
|
-
let s = K(String(r)), c = K(String(i));
|
|
129
|
-
return U.value === "asc" ? s - c : c - s;
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
_(() => {
|
|
133
|
-
Q(), O.value = setInterval(() => {
|
|
134
|
-
Q();
|
|
135
|
-
}, 1e3 * 60 * 10);
|
|
136
|
-
}), g(() => {
|
|
137
|
-
clearInterval(O.value), O.value = null;
|
|
138
|
-
});
|
|
139
|
-
let K = (e) => {
|
|
140
|
-
let t = e.match(/^(-?\d+(?:\.\d+)?)/);
|
|
141
|
-
return t ? Number(t[1]) : Number(e) || 0;
|
|
142
|
-
}, q = (e) => {
|
|
143
|
-
H.value === e ? U.value === "desc" ? U.value = "asc" : U.value === "asc" ? (H.value = null, U.value = null) : U.value = "desc" : (H.value = e, U.value = "desc");
|
|
144
|
-
}, J = y(!1), Y = y({}), X = (e) => {
|
|
145
|
-
Y.value = { ...e }, J.value = !0;
|
|
146
|
-
}, Z = async (e) => {
|
|
147
|
-
let n = JSON.parse(JSON.stringify(Y.value));
|
|
148
|
-
i.value = !0;
|
|
149
|
-
let a = await t({
|
|
150
|
-
appKey: r.appKey,
|
|
151
|
-
appSalt: r.appSalt,
|
|
152
|
-
id: r.ids.YCDataMonitor_getUrl.id,
|
|
153
|
-
variables: {
|
|
154
|
-
dataType: e,
|
|
155
|
-
stationIds: n.stationId,
|
|
156
|
-
missingTimes: n[e].missingTimes.toString()
|
|
157
|
-
},
|
|
158
|
-
baseHttp: r.baseHttp,
|
|
159
|
-
reqType: r.ids.YCDataMonitor_getUrl.reqType,
|
|
160
|
-
isFormData: r.ids.YCDataMonitor_getUrl.isFormData
|
|
161
|
-
}), o = JSON.parse(a.data.result.output || "{}"), s = await t({
|
|
162
|
-
appKey: r.appKey,
|
|
163
|
-
appSalt: r.appSalt,
|
|
164
|
-
id: r.ids.YCDataMonitor_toQuery.id,
|
|
165
|
-
variables: {
|
|
166
|
-
dataType: e,
|
|
167
|
-
urls: o.data.urls.toString()
|
|
168
|
-
},
|
|
169
|
-
baseHttp: r.baseHttp,
|
|
170
|
-
reqType: r.ids.YCDataMonitor_toQuery.reqType,
|
|
171
|
-
isFormData: r.ids.YCDataMonitor_toQuery.isFormData
|
|
172
|
-
}), c = JSON.parse(s.data.result.output || "{}");
|
|
173
|
-
D({
|
|
174
|
-
message: `当前补录共${n[e].missingTimes.length}条数据,成功${c.data.insertedRecords || 0}条数据`,
|
|
175
|
-
type: "success",
|
|
176
|
-
zIndex: 6e3
|
|
177
|
-
}), i.value = !1, J.value = !1, Q();
|
|
178
|
-
}, Q = async () => {
|
|
179
|
-
console.log("查询日期", r.date), i.value = !0, m.value = [], S.value = [];
|
|
180
|
-
let e = await t({
|
|
181
|
-
appKey: r.appKey,
|
|
182
|
-
appSalt: r.appSalt,
|
|
183
|
-
id: r.ids.YCDataMonitor_data.id,
|
|
184
|
-
variables: { date: r.date },
|
|
185
|
-
baseHttp: r.baseHttp,
|
|
186
|
-
reqType: r.ids.YCDataMonitor_data.reqType,
|
|
187
|
-
isFormData: r.ids.YCDataMonitor_data.isFormData
|
|
188
|
-
});
|
|
189
|
-
i.value = !1;
|
|
190
|
-
let n = JSON.parse(e.data.result.output || "{}").data || {};
|
|
191
|
-
console.log("list", n), m.value = n.nationalStations || [], S.value = n.regionalStations || [];
|
|
192
|
-
};
|
|
193
|
-
return n({ handleSearch: Q }), (e, t) => {
|
|
194
|
-
let n = a, r = o;
|
|
195
|
-
return T((v(), u("div", k, [
|
|
196
|
-
d("div", A, [d("div", j, [d("div", M, [t[9] ||= d("div", { class: "summary-cell summary-cell-label" }, "监测要素", -1), (v(!0), u(s, null, b(m.value, (e) => (v(), u("div", {
|
|
197
|
-
class: "summary-cell",
|
|
198
|
-
key: e.stationId
|
|
199
|
-
}, [f(x(e.stationName) + " ", 1), d("button", {
|
|
200
|
-
class: "view-btn",
|
|
201
|
-
onClick: (t) => X(e)
|
|
202
|
-
}, "查看", 8, N)]))), 128))]), d("div", P, [
|
|
203
|
-
d("div", F, [t[10] ||= d("div", { class: "summary-cell summary-cell-label" }, "分钟天气数据统计(实际/预期)", -1), (v(!0), u(s, null, b(m.value, (e) => (v(), u("div", {
|
|
204
|
-
class: "summary-cell",
|
|
205
|
-
key: e.stationId
|
|
206
|
-
}, x(e.minuteWeather?.actualCount ?? "-") + " /" + x(e.minuteWeather?.expectedCount ?? "-"), 1))), 128))]),
|
|
207
|
-
d("div", I, [t[11] ||= d("div", { class: "summary-cell summary-cell-label" }, "分钟降水数据统计(实际/预期)", -1), (v(!0), u(s, null, b(m.value, (e) => (v(), u("div", {
|
|
208
|
-
class: "summary-cell",
|
|
209
|
-
key: e.stationId
|
|
210
|
-
}, x(e.minutePrecipitation?.actualCount ?? "-") + " /" + x(e.minutePrecipitation?.expectedCount ?? "-"), 1))), 128))]),
|
|
211
|
-
d("div", L, [t[12] ||= d("div", { class: "summary-cell summary-cell-label" }, "小时数据统计(实际/预期)", -1), (v(!0), u(s, null, b(m.value, (e) => (v(), u("div", {
|
|
212
|
-
class: "summary-cell",
|
|
213
|
-
key: e.stationId
|
|
214
|
-
}, x(e.hourly?.actualCount ?? "-") + " /" + x(e.hourly?.expectedCount ?? "-"), 1))), 128))]),
|
|
215
|
-
d("div", R, [t[13] ||= d("div", { class: "summary-cell summary-cell-label" }, "日数据统计(实际/预期)", -1), (v(!0), u(s, null, b(m.value, (e) => (v(), u("div", {
|
|
216
|
-
class: "summary-cell",
|
|
217
|
-
key: e.stationId
|
|
218
|
-
}, x(e.daily?.actualCount ?? "-") + " /" + x(e.daily?.expectedCount ?? "-"), 1))), 128))])
|
|
219
|
-
])])]),
|
|
220
|
-
d("div", ee, [d("div", te, [
|
|
221
|
-
d("button", {
|
|
222
|
-
class: h(["city-btn", { active: z.value }]),
|
|
223
|
-
onClick: t[0] ||= (e) => z.value = !z.value
|
|
224
|
-
}, "全市", 2),
|
|
225
|
-
p(n, {
|
|
226
|
-
modelValue: B.value,
|
|
227
|
-
"onUpdate:modelValue": t[1] ||= (e) => B.value = e,
|
|
228
|
-
placeholder: "县名搜索",
|
|
229
|
-
clearable: "",
|
|
230
|
-
class: "filter-input"
|
|
231
|
-
}, null, 8, ["modelValue"]),
|
|
232
|
-
p(n, {
|
|
233
|
-
modelValue: V.value,
|
|
234
|
-
"onUpdate:modelValue": t[2] ||= (e) => V.value = e,
|
|
235
|
-
placeholder: "站名搜索",
|
|
236
|
-
clearable: "",
|
|
237
|
-
class: "filter-input"
|
|
238
|
-
}, null, 8, ["modelValue"])
|
|
239
|
-
])]),
|
|
240
|
-
d("div", ne, [d("div", re, [d("div", ie, [(v(), u(s, null, b(w, (e) => d("div", {
|
|
241
|
-
class: h(["detail-cell", {
|
|
242
|
-
"is-sortable": e.sortable,
|
|
243
|
-
"is-active": H.value === e.key,
|
|
244
|
-
"detail-cell-index": e.key === "index",
|
|
245
|
-
"detail-cell-action": e.key === "action"
|
|
246
|
-
}]),
|
|
247
|
-
key: e.key,
|
|
248
|
-
onClick: (t) => e.sortable && q(e.key)
|
|
249
|
-
}, [f(x(e.label) + " ", 1), e.sortable ? (v(), u("span", {
|
|
250
|
-
key: 0,
|
|
251
|
-
class: h(["sort-icon", H.value === e.key ? U.value : ""])
|
|
252
|
-
}, null, 2)) : l("", !0)], 10, ae)), 64))]), d("div", oe, [(v(!0), u(s, null, b(G.value, (e, t) => (v(), u("div", {
|
|
253
|
-
class: "detail-row",
|
|
254
|
-
key: e.stationId
|
|
255
|
-
}, [
|
|
256
|
-
d("div", se, x(t + 1), 1),
|
|
257
|
-
(v(), u(s, null, b(C, (t) => d("div", {
|
|
258
|
-
class: "detail-cell",
|
|
259
|
-
key: t.key
|
|
260
|
-
}, [t.key === "minuteWeather" ? (v(), u(s, { key: 0 }, [f(x(e.minuteWeather?.actualCount ?? "-") + "/" + x(e.minuteWeather?.expectedCount ?? "-"), 1)], 64)) : t.key === "minutePrecipitation" ? (v(), u(s, { key: 1 }, [f(x(e.minutePrecipitation?.actualCount ?? "-") + "/" + x(e.minutePrecipitation?.expectedCount ?? "-"), 1)], 64)) : t.key === "hourly" ? (v(), u(s, { key: 2 }, [f(x(e.hourly?.actualCount ?? "-") + "/" + x(e.hourly?.expectedCount ?? "-"), 1)], 64)) : t.key === "daily" ? (v(), u(s, { key: 3 }, [f(x(e.daily?.actualCount ?? "-") + "/" + x(e.daily?.expectedCount ?? "-"), 1)], 64)) : (v(), u(s, { key: 4 }, [f(x(e[t.key]), 1)], 64))])), 64)),
|
|
261
|
-
d("div", ce, [d("button", {
|
|
262
|
-
class: "view-btn",
|
|
263
|
-
onClick: (t) => X(e)
|
|
264
|
-
}, "查看", 8, le)])
|
|
265
|
-
]))), 128))])])]),
|
|
266
|
-
J.value ? (v(), u("div", {
|
|
267
|
-
key: 0,
|
|
268
|
-
class: "dialog-overlay",
|
|
269
|
-
onClick: t[8] ||= E((e) => J.value = !1, ["self"])
|
|
270
|
-
}, [d("div", ue, [d("div", de, [d("span", fe, "站点详情 - " + x(Y.value.stationName), 1), d("button", {
|
|
271
|
-
class: "dialog-close",
|
|
272
|
-
onClick: t[3] ||= (e) => J.value = !1
|
|
273
|
-
}, "×")]), d("div", pe, [d("div", me, [
|
|
274
|
-
d("div", he, [
|
|
275
|
-
d("div", ge, [t[14] ||= d("div", { class: "info-label" }, "县名:", -1), d("div", _e, x(Y.value.cnty || "-"), 1)]),
|
|
276
|
-
d("div", ve, [t[15] ||= d("div", { class: "info-label" }, "站名:", -1), d("div", ye, x(Y.value.stationName || "-"), 1)]),
|
|
277
|
-
d("div", be, [t[16] ||= d("div", { class: "info-label" }, "站号:", -1), d("div", xe, x(Y.value.stationId || "-"), 1)])
|
|
278
|
-
]),
|
|
279
|
-
d("div", Se, [
|
|
280
|
-
d("div", Ce, [t[17] ||= d("div", { class: "info-title" }, "分钟天气数据统计(实际/预期):", -1), d("div", we, x(Y.value.minuteWeather?.actualCount ?? "-") + "/" + x(Y.value.minuteWeather?.expectedCount ?? "-"), 1)]),
|
|
281
|
-
d("div", Te, [t[18] ||= d("div", { class: "missing-label" }, "缺失日期:", -1), d("div", Ee, [(v(!0), u(s, null, b(Y.value.minuteWeather?.missingTimes || [], (e, t) => (v(), u("span", {
|
|
282
|
-
class: "missing-tag",
|
|
283
|
-
key: t
|
|
284
|
-
}, x(e), 1))), 128)), Y.value.minuteWeather?.missingTimes?.length ? l("", !0) : (v(), u("span", De, "-"))])]),
|
|
285
|
-
Y.value.minuteWeather?.missingTimes?.length ? (v(), u("div", Oe, [d("button", {
|
|
286
|
-
class: "dialog-btn dialog-btn-small",
|
|
287
|
-
onClick: t[4] ||= (e) => Z("minuteWeather")
|
|
288
|
-
}, "补录")])) : l("", !0)
|
|
289
|
-
]),
|
|
290
|
-
d("div", ke, [
|
|
291
|
-
d("div", Ae, [t[19] ||= d("div", { class: "info-title" }, "分钟降水数据统计(实际/预期):", -1), d("div", je, x(Y.value.minutePrecipitation?.actualCount ?? "-") + "/" + x(Y.value.minutePrecipitation?.expectedCount ?? "-"), 1)]),
|
|
292
|
-
d("div", Me, [t[20] ||= d("div", { class: "missing-label" }, "缺失日期:", -1), d("div", Ne, [(v(!0), u(s, null, b(Y.value.minutePrecipitation?.missingTimes || [], (e, t) => (v(), u("span", {
|
|
293
|
-
class: "missing-tag",
|
|
294
|
-
key: t
|
|
295
|
-
}, x(e), 1))), 128)), Y.value.minutePrecipitation?.missingTimes?.length ? l("", !0) : (v(), u("span", Pe, "-"))])]),
|
|
296
|
-
Y.value.minutePrecipitation?.missingTimes?.length ? (v(), u("div", Fe, [d("button", {
|
|
297
|
-
class: "dialog-btn dialog-btn-small",
|
|
298
|
-
onClick: t[5] ||= (e) => Z("minutePrecipitation")
|
|
299
|
-
}, "补录 ")])) : l("", !0)
|
|
300
|
-
]),
|
|
301
|
-
d("div", Ie, [
|
|
302
|
-
d("div", Le, [t[21] ||= d("div", { class: "info-title" }, "小时数据统计(实际/预期):", -1), d("div", Re, x(Y.value.hourly?.actualCount ?? "-") + "/" + x(Y.value.hourly?.expectedCount ?? "-"), 1)]),
|
|
303
|
-
d("div", ze, [t[22] ||= d("div", { class: "missing-label" }, "缺失日期:", -1), d("div", Be, [(v(!0), u(s, null, b(Y.value.hourly?.missingTimes || [], (e, t) => (v(), u("span", {
|
|
304
|
-
class: "missing-tag",
|
|
305
|
-
key: t
|
|
306
|
-
}, x(e), 1))), 128)), Y.value.hourly?.missingTimes?.length ? l("", !0) : (v(), u("span", Ve, "-"))])]),
|
|
307
|
-
Y.value.hourly?.missingTimes?.length ? (v(), u("div", He, [d("button", {
|
|
308
|
-
class: "dialog-btn dialog-btn-small",
|
|
309
|
-
onClick: t[6] ||= (e) => Z("hourly")
|
|
310
|
-
}, "补录")])) : l("", !0)
|
|
311
|
-
]),
|
|
312
|
-
d("div", Ue, [
|
|
313
|
-
d("div", We, [t[23] ||= d("div", { class: "info-title" }, "日数据统计(实际/预期):", -1), d("div", Ge, x(Y.value.daily?.actualCount ?? "-") + "/" + x(Y.value.daily?.expectedCount ?? "-"), 1)]),
|
|
314
|
-
d("div", Ke, [t[24] ||= d("div", { class: "missing-label" }, "缺失日期:", -1), d("div", qe, [(v(!0), u(s, null, b(Y.value.daily?.missingTimes || [], (e, t) => (v(), u("span", {
|
|
315
|
-
class: "missing-tag",
|
|
316
|
-
key: t
|
|
317
|
-
}, x(e), 1))), 128)), Y.value.daily?.missingTimes?.length ? l("", !0) : (v(), u("span", Je, "-"))])]),
|
|
318
|
-
Y.value.daily?.missingTimes?.length ? (v(), u("div", Ye, [d("button", {
|
|
319
|
-
class: "dialog-btn dialog-btn-small",
|
|
320
|
-
onClick: t[7] ||= (e) => Z("daily")
|
|
321
|
-
}, "补录")])) : l("", !0)
|
|
322
|
-
])
|
|
323
|
-
])])])])) : l("", !0)
|
|
324
|
-
])), [[r, i.value]]);
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
}), [["__scopeId", "data-v-a699d20a"]]), B = {
|
|
328
|
-
class: "YCRealTimeTable",
|
|
329
|
-
"element-loading-background": "rgba(0, 0, 0, 0.3)"
|
|
330
|
-
}, V = { class: "YCRealTimeTable-summary" }, H = { class: "summary-table" }, U = { class: "summary-head" }, W = { class: "summary-body" }, G = { class: "summary-cell summary-cell-label" }, K = { class: "YCRealTimeTable-toolbar" }, q = { class: "filter-group" }, J = { class: "YCRealTimeTable-detail" }, Y = { class: "detail-table" }, X = { class: "detail-head" }, Z = ["onClick"], Q = { class: "detail-body" }, Xe = { class: "detail-cell detail-cell-index" }, Ze = { class: "detail-cell" }, Qe = { class: "detail-cell" }, $e = { class: "detail-cell" }, et = { class: "detail-cell" }, tt = { class: "detail-cell" }, nt = { class: "detail-cell" }, rt = { class: "detail-cell" }, it = { class: "detail-cell" }, $ = /* @__PURE__ */ e(/* @__PURE__ */ m({
|
|
331
|
-
__name: "YCRealTimeTable",
|
|
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 r = e, i = y(!1), m = y([]), S = [
|
|
352
|
-
"当前小时雨量(测试)",
|
|
353
|
-
"1小时雨量",
|
|
354
|
-
"3小时雨量",
|
|
355
|
-
"20时至当前雨量",
|
|
356
|
-
"24小时雨量",
|
|
357
|
-
"极大风速",
|
|
358
|
-
"能见度",
|
|
359
|
-
"最小能见度"
|
|
360
|
-
], C = y([]), w = y([]), E = [
|
|
361
|
-
{
|
|
362
|
-
key: "index",
|
|
363
|
-
label: "序号",
|
|
364
|
-
sortable: !1
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
key: "county",
|
|
368
|
-
label: "县名",
|
|
369
|
-
sortable: !1
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
key: "station",
|
|
373
|
-
label: "站名",
|
|
374
|
-
sortable: !1
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
key: "time",
|
|
378
|
-
label: "时间",
|
|
379
|
-
sortable: !0
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
key: "rain24",
|
|
383
|
-
label: "24小时雨量",
|
|
384
|
-
sortable: !0
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
key: "rain20",
|
|
388
|
-
label: "20时至现在雨量",
|
|
389
|
-
sortable: !0
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
key: "rain3",
|
|
393
|
-
label: "3小时雨量",
|
|
394
|
-
sortable: !0
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
key: "rain1",
|
|
398
|
-
label: "1小时雨量",
|
|
399
|
-
sortable: !0
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
key: "rainCurrent",
|
|
403
|
-
label: "当前小时雨量",
|
|
404
|
-
sortable: !0
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
key: "temp",
|
|
408
|
-
label: "气温",
|
|
409
|
-
sortable: !0
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
key: "windDir",
|
|
413
|
-
label: "极大风向",
|
|
414
|
-
sortable: !1
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
key: "windSpeed",
|
|
418
|
-
label: "极大风速",
|
|
419
|
-
sortable: !0
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
key: "humidity",
|
|
423
|
-
label: "湿度",
|
|
424
|
-
sortable: !0
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
key: "pressure",
|
|
428
|
-
label: "气压",
|
|
429
|
-
sortable: !0
|
|
430
|
-
},
|
|
431
|
-
{
|
|
432
|
-
key: "_voltage",
|
|
433
|
-
label: "电压",
|
|
434
|
-
sortable: !0
|
|
435
|
-
}
|
|
436
|
-
], D = y(!0), O = y(""), k = y(""), A = y(null), j = y(null), M = y(null), N = c(() => {
|
|
437
|
-
let e = w.value;
|
|
438
|
-
D.value || (e = e.filter((e) => e.county === "袁州区"));
|
|
439
|
-
let t = O.value.trim();
|
|
440
|
-
t && (e = e.filter((e) => e.county.includes(t)));
|
|
441
|
-
let n = k.value.trim();
|
|
442
|
-
return n && (e = e.filter((e) => e.station.includes(n))), e;
|
|
443
|
-
}), P = c(() => {
|
|
444
|
-
let e = [...N.value];
|
|
445
|
-
if (!A.value || !j.value) return e;
|
|
446
|
-
let t = A.value;
|
|
447
|
-
return e.sort((e, n) => {
|
|
448
|
-
let r = e[t], i = n[t], a = r === null || r === "" || r === void 0, o = i === null || i === "" || i === void 0;
|
|
449
|
-
if (a && o) return 0;
|
|
450
|
-
if (a) return 1;
|
|
451
|
-
if (o) return -1;
|
|
452
|
-
let s, c;
|
|
453
|
-
if (t === "time") {
|
|
454
|
-
if (s = I(String(r)), c = I(String(i)), s < 0 && c < 0) return 0;
|
|
455
|
-
if (s < 0) return 1;
|
|
456
|
-
if (c < 0) return -1;
|
|
457
|
-
} else s = Number(r), c = Number(i);
|
|
458
|
-
return j.value === "asc" ? s - c : c - s;
|
|
459
|
-
});
|
|
460
|
-
});
|
|
461
|
-
_(() => {
|
|
462
|
-
F(), M.value = setInterval(() => {
|
|
463
|
-
F();
|
|
464
|
-
}, 1e3 * 60 * 10);
|
|
465
|
-
}), g(() => {
|
|
466
|
-
clearInterval(M.value), M.value = null;
|
|
467
|
-
});
|
|
468
|
-
let F = async () => {
|
|
469
|
-
i.value = !0;
|
|
470
|
-
let e = await t({
|
|
471
|
-
appKey: r.appKey,
|
|
472
|
-
appSalt: r.appSalt,
|
|
473
|
-
id: r.ids.YCRealTimeTable_data.id,
|
|
474
|
-
variables: {},
|
|
475
|
-
baseHttp: r.baseHttp,
|
|
476
|
-
reqType: r.ids.YCRealTimeTable_data.reqType,
|
|
477
|
-
isFormData: r.ids.YCRealTimeTable_data.isFormData
|
|
478
|
-
}), a = e.data.result.output || "{}", o = JSON.parse(a);
|
|
479
|
-
console.log("res_output", o.data);
|
|
480
|
-
let s = e.data.result.voltage || [], c = new Map(s.map((e) => [e.station_id, e])), { nationalStations: l, otherStations: u } = o.data || {
|
|
481
|
-
nationalStations: [],
|
|
482
|
-
otherStations: []
|
|
483
|
-
};
|
|
484
|
-
m.value = (l || []).map((e) => e.stationName);
|
|
485
|
-
let d = (e) => e == null || e === "" ? "" : e;
|
|
486
|
-
C.value = S.map((e) => (l || []).map((t) => {
|
|
487
|
-
switch (e) {
|
|
488
|
-
case "当前小时雨量(测试)": return {
|
|
489
|
-
value: d(t.currentHourRain),
|
|
490
|
-
isWarn: t.currentHourRainThreshold === 1
|
|
491
|
-
};
|
|
492
|
-
case "1小时雨量": return {
|
|
493
|
-
value: d(t.rain1h),
|
|
494
|
-
isWarn: t.rain1hThreshold === 1
|
|
495
|
-
};
|
|
496
|
-
case "3小时雨量": return {
|
|
497
|
-
value: d(t.rain3h),
|
|
498
|
-
isWarn: t.rain3hThreshold === 1
|
|
499
|
-
};
|
|
500
|
-
case "20时至当前雨量": return {
|
|
501
|
-
value: d(t.rain20ToNow),
|
|
502
|
-
isWarn: !1
|
|
503
|
-
};
|
|
504
|
-
case "24小时雨量": return {
|
|
505
|
-
value: d(t.rain24h),
|
|
506
|
-
isWarn: !1
|
|
507
|
-
};
|
|
508
|
-
case "极大风速": return {
|
|
509
|
-
value: d(t.winSInstMax),
|
|
510
|
-
isWarn: !1
|
|
511
|
-
};
|
|
512
|
-
case "能见度": return {
|
|
513
|
-
value: d(t.visHor1mi),
|
|
514
|
-
isWarn: t.visHor1miThreshold === 1
|
|
515
|
-
};
|
|
516
|
-
case "最小能见度": return {
|
|
517
|
-
value: d(t.visMin),
|
|
518
|
-
isWarn: !1
|
|
519
|
-
};
|
|
520
|
-
default: return {
|
|
521
|
-
value: "",
|
|
522
|
-
isWarn: !1
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
})), w.value = (u || []).map((e) => {
|
|
526
|
-
let t = "";
|
|
527
|
-
if (e.datetime) {
|
|
528
|
-
let n = e.datetime.match(/(\d{2}):(\d{2}):\d{2}$/);
|
|
529
|
-
n && (t = `${n[1]}时${n[2]}分`);
|
|
530
|
-
}
|
|
531
|
-
let r = c.get(e.stationIdC), i = r ? d(r.ua) : "", a = r ? Number(r.ua) < Number(r.warning_ua) : !1;
|
|
532
|
-
return {
|
|
533
|
-
county: e.cnty || "",
|
|
534
|
-
station: e.stationName || "",
|
|
535
|
-
time: t,
|
|
536
|
-
rain24: d(e.rain24h),
|
|
537
|
-
rain20: d(e.rain20ToNow),
|
|
538
|
-
rain3: d(e.rain3h),
|
|
539
|
-
rain3Warn: e.rain3hThreshold === 1,
|
|
540
|
-
rain1: d(e.rain1h),
|
|
541
|
-
rain1Warn: e.rain1hThreshold === 1,
|
|
542
|
-
rainCurrent: d(e.currentHourRain),
|
|
543
|
-
rainCurrentWarn: e.currentHourRainThreshold === 1,
|
|
544
|
-
temp: d(e.tem),
|
|
545
|
-
tempWarn: e.temThreshold === 1,
|
|
546
|
-
windDir: e.winDInstMax ? n(e.winDInstMax) : "",
|
|
547
|
-
windSpeed: d(e.winSInstMax),
|
|
548
|
-
windSpeedWarn: e.winSInstMaxThreshold === 1,
|
|
549
|
-
humidity: d(e.rhu),
|
|
550
|
-
pressure: d(e.prs),
|
|
551
|
-
_voltage: i,
|
|
552
|
-
_voltageWarn: a
|
|
553
|
-
};
|
|
554
|
-
}), setTimeout(() => {
|
|
555
|
-
i.value = !1;
|
|
556
|
-
}, 300);
|
|
557
|
-
}, I = (e) => {
|
|
558
|
-
if (!e) return -1;
|
|
559
|
-
let t = e.match(/(\d+)时(\d+)分/);
|
|
560
|
-
return t ? Number(t[1]) * 60 + Number(t[2]) : -1;
|
|
561
|
-
}, L = (e, t) => t == null || t === "" ? "" : t, R = (e) => {
|
|
562
|
-
A.value === e ? j.value === "desc" ? j.value = "asc" : j.value === "asc" ? (A.value = null, j.value = null) : j.value = "desc" : (A.value = e, j.value = "desc");
|
|
563
|
-
};
|
|
564
|
-
return (e, t) => {
|
|
565
|
-
let n = a, r = o;
|
|
566
|
-
return T((v(), u("div", B, [
|
|
567
|
-
d("div", V, [d("div", H, [d("div", U, [t[3] ||= d("div", { class: "summary-cell summary-cell-label" }, "监测要素", -1), (v(!0), u(s, null, b(m.value, (e, t) => (v(), u("div", {
|
|
568
|
-
class: "summary-cell",
|
|
569
|
-
key: t
|
|
570
|
-
}, x(e), 1))), 128))]), d("div", W, [(v(), u(s, null, b(S, (e, t) => d("div", {
|
|
571
|
-
class: "summary-row",
|
|
572
|
-
key: e
|
|
573
|
-
}, [d("div", G, x(e), 1), (v(!0), u(s, null, b(m.value, (n, r) => (v(), u("div", {
|
|
574
|
-
class: h(["summary-cell", { "is-warn": C.value[t]?.[r]?.isWarn }]),
|
|
575
|
-
key: r
|
|
576
|
-
}, x(L(e, C.value[t]?.[r]?.value)), 3))), 128))])), 64))])])]),
|
|
577
|
-
d("div", K, [d("div", q, [
|
|
578
|
-
d("button", {
|
|
579
|
-
class: h(["city-btn", { active: D.value }]),
|
|
580
|
-
onClick: t[0] ||= (e) => D.value = !D.value
|
|
581
|
-
}, "全市", 2),
|
|
582
|
-
p(n, {
|
|
583
|
-
modelValue: O.value,
|
|
584
|
-
"onUpdate:modelValue": t[1] ||= (e) => O.value = e,
|
|
585
|
-
placeholder: "县名搜索",
|
|
586
|
-
clearable: "",
|
|
587
|
-
class: "filter-input"
|
|
588
|
-
}, null, 8, ["modelValue"]),
|
|
589
|
-
p(n, {
|
|
590
|
-
modelValue: k.value,
|
|
591
|
-
"onUpdate:modelValue": t[2] ||= (e) => k.value = e,
|
|
592
|
-
placeholder: "站名搜索",
|
|
593
|
-
clearable: "",
|
|
594
|
-
class: "filter-input"
|
|
595
|
-
}, null, 8, ["modelValue"])
|
|
596
|
-
])]),
|
|
597
|
-
d("div", J, [d("div", Y, [d("div", X, [(v(), u(s, null, b(E, (e) => d("div", {
|
|
598
|
-
class: h(["detail-cell", {
|
|
599
|
-
"is-sortable": e.sortable,
|
|
600
|
-
"is-active": A.value === e.key
|
|
601
|
-
}]),
|
|
602
|
-
key: e.key,
|
|
603
|
-
onClick: (t) => e.sortable && R(e.key)
|
|
604
|
-
}, [f(x(e.label) + " ", 1), e.sortable ? (v(), u("span", {
|
|
605
|
-
key: 0,
|
|
606
|
-
class: h(["sort-icon", A.value === e.key ? j.value : ""])
|
|
607
|
-
}, null, 2)) : l("", !0)], 10, Z)), 64))]), d("div", Q, [(v(!0), u(s, null, b(P.value, (e, t) => (v(), u("div", {
|
|
608
|
-
class: "detail-row",
|
|
609
|
-
key: `${e.county}-${e.station}-${t}`
|
|
610
|
-
}, [
|
|
611
|
-
d("div", Xe, x(t + 1), 1),
|
|
612
|
-
d("div", Ze, x(e.county), 1),
|
|
613
|
-
d("div", Qe, x(e.station), 1),
|
|
614
|
-
d("div", $e, x(e.time), 1),
|
|
615
|
-
d("div", et, x(e.rain24), 1),
|
|
616
|
-
d("div", tt, x(e.rain20), 1),
|
|
617
|
-
d("div", { class: h(["detail-cell", { "is-warn": e.rain3Warn }]) }, x(e.rain3), 3),
|
|
618
|
-
d("div", { class: h(["detail-cell", { "is-warn": e.rain1Warn }]) }, x(e.rain1), 3),
|
|
619
|
-
d("div", { class: h(["detail-cell", { "is-warn": e.rainCurrentWarn }]) }, x(e.rainCurrent), 3),
|
|
620
|
-
d("div", { class: h(["detail-cell", { "is-warn": e.tempWarn }]) }, x(e.temp), 3),
|
|
621
|
-
d("div", nt, x(e.windDir), 1),
|
|
622
|
-
d("div", { class: h(["detail-cell", { "is-warn": e.windSpeedWarn }]) }, x(e.windSpeed), 3),
|
|
623
|
-
d("div", rt, x(e.humidity), 1),
|
|
624
|
-
d("div", it, x(e.pressure), 1),
|
|
625
|
-
d("div", { class: h(["detail-cell", { "is-warn": e._voltageWarn }]) }, x(e._voltage), 3)
|
|
626
|
-
]))), 128))])])])
|
|
627
|
-
])), [[r, i.value]]);
|
|
628
|
-
};
|
|
629
|
-
}
|
|
630
|
-
}), [["__scopeId", "data-v-630ba040"]]), at = { class: "YCDataService" }, ot = { class: "YCDataService-topbar" }, st = { class: "page-switch" }, ct = {
|
|
631
|
-
key: 0,
|
|
632
|
-
class: "YCDataService-filter"
|
|
633
|
-
}, lt = /* @__PURE__ */ e(/* @__PURE__ */ m({
|
|
634
|
-
__name: "YCDataService",
|
|
635
|
-
props: {
|
|
636
|
-
appKey: {
|
|
637
|
-
type: String,
|
|
638
|
-
default: ""
|
|
639
|
-
},
|
|
640
|
-
appSalt: {
|
|
641
|
-
type: String,
|
|
642
|
-
default: ""
|
|
643
|
-
},
|
|
644
|
-
baseHttp: {
|
|
645
|
-
type: String,
|
|
646
|
-
default: ""
|
|
647
|
-
},
|
|
648
|
-
ids: {
|
|
649
|
-
type: Object,
|
|
650
|
-
default: () => ({})
|
|
651
|
-
}
|
|
652
|
-
},
|
|
653
|
-
setup(e) {
|
|
654
|
-
let t = y("dataService"), n = y((/* @__PURE__ */ new Date()).toISOString().slice(0, 10)), a = y(null), o = () => {
|
|
655
|
-
a.value?.handleSearch?.();
|
|
656
|
-
};
|
|
657
|
-
_(() => {
|
|
658
|
-
s();
|
|
659
|
-
});
|
|
660
|
-
let s = async () => {};
|
|
661
|
-
return (s, c) => {
|
|
662
|
-
let f = i, m = r, g = $, _ = z;
|
|
663
|
-
return v(), u("div", at, [
|
|
664
|
-
d("div", ot, [d("div", st, [d("div", {
|
|
665
|
-
class: h(["page-switch-item", { active: t.value === "dataService" }]),
|
|
666
|
-
onClick: c[0] ||= (e) => t.value = "dataService"
|
|
667
|
-
}, " 数据服务 ", 2), d("div", {
|
|
668
|
-
class: h(["page-switch-item", { active: t.value === "dataMonitor" }]),
|
|
669
|
-
onClick: c[1] ||= (e) => t.value = "dataMonitor"
|
|
670
|
-
}, " 数据质量检查 ", 2)]), t.value === "dataMonitor" ? (v(), u("div", ct, [p(m, { locale: S(O) }, {
|
|
671
|
-
default: w(() => [p(f, {
|
|
672
|
-
modelValue: n.value,
|
|
673
|
-
"onUpdate:modelValue": c[2] ||= (e) => n.value = e,
|
|
674
|
-
type: "date",
|
|
675
|
-
placeholder: "选择日期",
|
|
676
|
-
"value-format": "YYYY-MM-DD",
|
|
677
|
-
class: "date-picker"
|
|
678
|
-
}, null, 8, ["modelValue"])]),
|
|
679
|
-
_: 1
|
|
680
|
-
}, 8, ["locale"]), d("button", {
|
|
681
|
-
class: "search-btn",
|
|
682
|
-
onClick: o
|
|
683
|
-
}, "查询")])) : l("", !0)]),
|
|
684
|
-
T(p(g, {
|
|
685
|
-
appKey: e.appKey,
|
|
686
|
-
appSalt: e.appSalt,
|
|
687
|
-
baseHttp: e.baseHttp,
|
|
688
|
-
ids: e.ids
|
|
689
|
-
}, null, 8, [
|
|
690
|
-
"appKey",
|
|
691
|
-
"appSalt",
|
|
692
|
-
"baseHttp",
|
|
693
|
-
"ids"
|
|
694
|
-
]), [[C, t.value === "dataService"]]),
|
|
695
|
-
T(p(_, {
|
|
696
|
-
ref_key: "dataMonitorRef",
|
|
697
|
-
ref: a,
|
|
698
|
-
appKey: e.appKey,
|
|
699
|
-
appSalt: e.appSalt,
|
|
700
|
-
baseHttp: e.baseHttp,
|
|
701
|
-
ids: e.ids,
|
|
702
|
-
date: n.value
|
|
703
|
-
}, null, 8, [
|
|
704
|
-
"appKey",
|
|
705
|
-
"appSalt",
|
|
706
|
-
"baseHttp",
|
|
707
|
-
"ids",
|
|
708
|
-
"date"
|
|
709
|
-
]), [[C, t.value === "dataMonitor"]])
|
|
710
|
-
]);
|
|
711
|
-
};
|
|
712
|
-
}
|
|
713
|
-
}), [["__scopeId", "data-v-0bc9749c"]]);
|
|
714
|
-
//#endregion
|
|
715
|
-
export { $ as n, z as r, lt as t };
|