nxd-plugin 1.8.28 → 1.8.30
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/YCServiceSummary-Dx2AlXiv.mjs +2 -0
- package/dist/chunks/{component-Forecast72h-cgr5tls3.mjs → component-Forecast72h-yd9t3176.mjs} +249 -196
- package/dist/chunks/{component-HdCameraList-NlgDGDxS.mjs → component-HdCameraList-nPxzUdmB.mjs} +1 -1
- package/dist/chunks/{component-HdFarmStation-CUXisRVE.mjs → component-HdFarmStation-BDN_u87-.mjs} +1 -1
- package/dist/chunks/{component-HdFarmStationDialog-BtPMLdBf.mjs → component-HdFarmStationDialog-CMKGe0YJ.mjs} +8 -8
- package/dist/chunks/{component-HdMajorActivity-nIv4HBSm.mjs → component-HdMajorActivity-CyAgx0og.mjs} +222 -225
- package/dist/chunks/{component-HdObservation-CJi_RXM_.mjs → component-HdObservation-CY8TNPK8.mjs} +2 -2
- package/dist/chunks/{component-HdPreSituation-D5rfQ4Tv.mjs → component-HdPreSituation-CLXeQ_lX.mjs} +2 -2
- package/dist/chunks/{component-HdRadarList-C51u7j2s.mjs → component-HdRadarList--85ldZa2.mjs} +1 -1
- package/dist/chunks/{component-HdRisk-C0WY-wCs.mjs → component-HdRisk-HKXfRnuQ.mjs} +1 -1
- package/dist/chunks/{component-HdServiceMarterial-DYQVcfuq.mjs → component-HdServiceMarterial-DJA-s67d.mjs} +1 -1
- package/dist/chunks/{component-HdServiceRequirements-DGn7h63L.mjs → component-HdServiceRequirements-lXtnq5r2.mjs} +1 -1
- package/dist/chunks/{component-HdSoil-BZ4yph45.mjs → component-HdSoil-BtIq7NXx.mjs} +1 -1
- package/dist/chunks/{component-HdStationTem-Cyk1fdpJ.mjs → component-HdStationTem-CRfJb0wr.mjs} +122 -99
- package/dist/chunks/{component-HdSuggestion-CBvCk-c5.mjs → component-HdSuggestion-2aFJRsau.mjs} +1 -1
- package/dist/chunks/{component-HdThreeWeatherTrend-CrxdQnj5.mjs → component-HdThreeWeatherTrend-BWeGlUnt.mjs} +2 -2
- package/dist/chunks/{component-HdWaveForcast-D_Y_AoL1.mjs → component-HdWaveForcast-DgcqZuG9.mjs} +1 -1
- package/dist/chunks/{component-HighQuality-B6JxEYfF.mjs → component-HighQuality-BNvi5OuR.mjs} +59 -54
- package/dist/chunks/{component-HighwayWeatherForecast-UCOCLt-l.mjs → component-HighwayWeatherForecast-BAHrZUA9.mjs} +69 -69
- package/dist/chunks/{component-PrecipitationRanking-cy6YEcr-.mjs → component-PrecipitationRanking-Cp8wK9V7.mjs} +265 -300
- package/dist/chunks/component-StationDialog-CnAIJZcL.mjs +772 -0
- package/dist/chunks/{component-StationList-rA77RHJb.mjs → component-StationList-DvHUcP8A.mjs} +2 -2
- package/dist/chunks/{component-TimeBasedForecast-CTLJVn2P.mjs → component-TimeBasedForecast-DP7ZYRQB.mjs} +34 -34
- package/dist/chunks/{component-WeatherForecast-BTzDg7Mi.mjs → component-WeatherForecast-BhGvmaMS.mjs} +34 -34
- package/dist/chunks/{component-YCDataService-oOkpc1PC.mjs → component-YCDataService-CwOGPL98.mjs} +1 -1
- package/dist/chunks/{component-YCHome-DcmieyM7.mjs → component-YCHome-DRIi7AIB.mjs} +1 -1
- package/dist/chunks/{component-YCServiceSummary-LZ-2GeV8.mjs → component-YCServiceSummary-Dab20ncm.mjs} +2 -1
- package/dist/components/HdStationTem/HdStationTem.vue.d.ts +3 -2
- package/dist/components/PrecipitationRanking/PrecipitationRanking.vue.d.ts +1 -0
- package/dist/nxd-plugin.mjs +26 -26
- package/dist/styles/component-Forecast72h.css +1 -1
- package/dist/styles/component-HdMajorActivity.css +1 -1
- package/dist/styles/component-HdStationTem.css +1 -1
- package/dist/styles/component-HighQuality.css +1 -1
- package/dist/styles/component-PrecipitationRanking.css +1 -1
- package/dist/styles/component-StationDialog.css +1 -1
- package/dist/styles/component-YCLoginNew.css +1 -1
- package/dist/styles/component-YCServiceSummary.css +1 -1
- package/package.json +1 -1
- package/dist/chunks/YCServiceSummary-CSklmCPP.mjs +0 -2
- package/dist/chunks/component-StationDialog-NQdthKaR.mjs +0 -737
|
@@ -0,0 +1,772 @@
|
|
|
1
|
+
import { i as e } from "./rolldown-runtime-Dd0fQ6-X.mjs";
|
|
2
|
+
import { i as t, o as n } from "./component-AiChat-COULZNRK.mjs";
|
|
3
|
+
import { _ as r, a as i, c as a, d as o, f as s, g as c, h as ee, i as te, l as ne, m as re, n as ie, o as ae, p as oe, r as se, s as ce, u as le, v as ue, y as de } from "./component-Forecast72h-yd9t3176.mjs";
|
|
4
|
+
import { i as l, n as u } from "./component-HdFarmStationDialog-CMKGe0YJ.mjs";
|
|
5
|
+
import { ElConfigProvider as fe, ElDatePicker as pe, ElIcon as me, ElLoadingDirective as he, ElTable as ge, ElTableColumn as _e } from "element-plus/es";
|
|
6
|
+
import { Fragment as d, Teleport as ve, createBlock as ye, createCommentVNode as be, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, getCurrentInstance as xe, nextTick as _, normalizeClass as v, normalizeStyle as Se, onBeforeUnmount as Ce, onMounted as we, openBlock as y, ref as b, renderList as x, toDisplayString as S, unref as C, vShow as Te, watch as Ee, withCtx as w, withDirectives as De } from "vue";
|
|
7
|
+
import { Close as Oe, Download as ke, Histogram as Ae } from "@element-plus/icons-vue";
|
|
8
|
+
import * as T from "echarts";
|
|
9
|
+
import "element-plus/es/components/date-picker/style/css";
|
|
10
|
+
import "element-plus/es/components/table/style/css";
|
|
11
|
+
import "element-plus/es/components/table-column/style/css";
|
|
12
|
+
import je from "element-plus/es/locale/lang/zh-cn.mjs";
|
|
13
|
+
//#region src/components/StationDialog/StationDialog.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
+
var Me = /* @__PURE__ */ e(u()), Ne = {
|
|
15
|
+
class: "StationDialog-mask StationDialog",
|
|
16
|
+
"element-loading-text": "加载中...",
|
|
17
|
+
"element-loading-background": "rgba(0, 0, 0, 0.7)"
|
|
18
|
+
}, Pe = { class: "StationPop-title" }, Fe = { class: "StationPop-subtitle" }, Ie = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "StationPop-dataTime"
|
|
21
|
+
}, Le = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "StationPop-dataTime"
|
|
24
|
+
}, Re = { class: "StationPop-info" }, ze = { style: {
|
|
25
|
+
display: "grid",
|
|
26
|
+
"grid-template-columns": "repeat(3, 1fr)"
|
|
27
|
+
} }, Be = { class: "StationPop-infoItem" }, Ve = { class: "StationPop-infoValue" }, He = { class: "StationPop-infoItem" }, Ue = { class: "StationPop-infoValue" }, We = { class: "StationPop-infoItem" }, Ge = { class: "StationPop-infoValue" }, Ke = { style: {
|
|
28
|
+
display: "grid",
|
|
29
|
+
"grid-template-columns": "repeat(1, 1fr)",
|
|
30
|
+
gap: "4px"
|
|
31
|
+
} }, qe = { class: "StationPop-infoItem StationPop-infoItem--wide" }, Je = { class: "StationPop-infoValue" }, Ye = { class: "StationPop-infoItem StationPop-infoItem--wide" }, Xe = { class: "StationPop-infoValue" }, Ze = { class: "StationPop-main" }, Qe = { class: "StationPop-section StationPop-section--realtime" }, $e = { class: "StationPop-realtime" }, et = { class: "StationPop-realtimeItem" }, tt = { class: "StationPop-realtimeValue" }, nt = { class: "StationPop-realtimeItem" }, rt = { class: "StationPop-realtimeValue" }, it = { class: "StationPop-realtimeItem" }, at = { class: "StationPop-realtimeValue" }, ot = { class: "StationPop-realtimeItem" }, st = { class: "StationPop-realtimeValue" }, ct = { class: "StationPop-realtimeItem" }, lt = { class: "StationPop-realtimeValue" }, ut = { class: "StationPop-realtimeItem" }, dt = { class: "StationPop-realtimeValue" }, ft = { class: "StationPop-section StationPop-section--statistics" }, pt = { class: "StationPop-statistics" }, mt = { class: "StationPop-statisticsItem" }, ht = { class: "StationPop-statisticsValue" }, gt = { class: "StationPop-statisticsItem" }, _t = { class: "StationPop-statisticsValue" }, vt = { class: "StationPop-statisticsItem" }, yt = { class: "StationPop-statisticsValue" }, bt = { class: "StationPop-statisticsItem" }, xt = { class: "StationPop-statisticsValue" }, St = { class: "StationPop-statisticsItem" }, Ct = { class: "StationPop-statisticsValue" }, wt = { class: "StationPop-statisticsItem" }, Tt = { class: "StationPop-statisticsValue" }, Et = { class: "StationPop-section StationPop-section--chart" }, Dt = { class: "StationPop-tabs" }, Ot = ["onClick"], kt = {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: "StationPop-historyMask"
|
|
34
|
+
}, At = { class: "StationPop-historyPopup" }, jt = { class: "StationPop-historyHeader" }, Mt = { class: "StationPop-historyTitle" }, Nt = { class: "StationPop-historySubTitle" }, Pt = {
|
|
35
|
+
class: "StationPop-historyTabs",
|
|
36
|
+
style: { position: "relative" }
|
|
37
|
+
}, Ft = ["onClick"], It = { class: "StationPop-historyActions" }, Lt = { class: "StationPop-historyTableWrap" }, E = /* @__PURE__ */ t(/* @__PURE__ */ g({
|
|
38
|
+
__name: "StationDialog",
|
|
39
|
+
props: {
|
|
40
|
+
componentStyle: { default: () => ({}) },
|
|
41
|
+
stationCode: {},
|
|
42
|
+
stationName: { default: "" },
|
|
43
|
+
mock: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
baseHttp: { default: "" },
|
|
48
|
+
appKey: { default: "" },
|
|
49
|
+
appSalt: { default: "" },
|
|
50
|
+
ids: { default: () => ({}) },
|
|
51
|
+
mockData: { default: () => ({}) }
|
|
52
|
+
},
|
|
53
|
+
setup(e) {
|
|
54
|
+
let t = /* @__PURE__ */ Object.assign({
|
|
55
|
+
"../../assets/img/hd/wind/wind-0.png": de,
|
|
56
|
+
"../../assets/img/hd/wind/wind-1.png": ue,
|
|
57
|
+
"../../assets/img/hd/wind/wind-10.png": r,
|
|
58
|
+
"../../assets/img/hd/wind/wind-11.png": c,
|
|
59
|
+
"../../assets/img/hd/wind/wind-12.png": ee,
|
|
60
|
+
"../../assets/img/hd/wind/wind-13.png": re,
|
|
61
|
+
"../../assets/img/hd/wind/wind-14.png": oe,
|
|
62
|
+
"../../assets/img/hd/wind/wind-15.png": s,
|
|
63
|
+
"../../assets/img/hd/wind/wind-16.png": o,
|
|
64
|
+
"../../assets/img/hd/wind/wind-17.png": le,
|
|
65
|
+
"../../assets/img/hd/wind/wind-2.png": ne,
|
|
66
|
+
"../../assets/img/hd/wind/wind-3.png": a,
|
|
67
|
+
"../../assets/img/hd/wind/wind-4.png": ce,
|
|
68
|
+
"../../assets/img/hd/wind/wind-5.png": ae,
|
|
69
|
+
"../../assets/img/hd/wind/wind-6.png": i,
|
|
70
|
+
"../../assets/img/hd/wind/wind-7.png": te,
|
|
71
|
+
"../../assets/img/hd/wind/wind-8.png": se,
|
|
72
|
+
"../../assets/img/hd/wind/wind-9.png": ie
|
|
73
|
+
}), u = (e) => t[`../../assets/img/hd/wind/wind-${Math.max(0, Math.min(17, e))}.png`] || "", g = (e) => {
|
|
74
|
+
let t = [
|
|
75
|
+
.3,
|
|
76
|
+
1.6,
|
|
77
|
+
3.4,
|
|
78
|
+
5.5,
|
|
79
|
+
8,
|
|
80
|
+
10.8,
|
|
81
|
+
13.9,
|
|
82
|
+
17.2,
|
|
83
|
+
20.8,
|
|
84
|
+
24.5,
|
|
85
|
+
28.5,
|
|
86
|
+
32.7,
|
|
87
|
+
37,
|
|
88
|
+
41.5,
|
|
89
|
+
46.2,
|
|
90
|
+
51,
|
|
91
|
+
56.1,
|
|
92
|
+
9999
|
|
93
|
+
];
|
|
94
|
+
for (let n = 0; n < t.length; n++) if (e < t[n]) return n;
|
|
95
|
+
return 17;
|
|
96
|
+
}, E = (e) => {
|
|
97
|
+
if (W(e)) return 0;
|
|
98
|
+
let t = Number(e);
|
|
99
|
+
return isNaN(t) ? 0 : (360 - t) % 360;
|
|
100
|
+
}, Rt = xe()?.appContext.config.globalProperties.$bus, D = b(!1), O = e, k = b(null), A = b({
|
|
101
|
+
stationName: "",
|
|
102
|
+
stationCode: "",
|
|
103
|
+
address: "",
|
|
104
|
+
stationStatus: "",
|
|
105
|
+
monitorElement: "",
|
|
106
|
+
serviceType: ""
|
|
107
|
+
}), j = b(!1), M = b(""), N = b({}), P = b({}), F = b(null), I = null, L = b([]), R = b("temperature"), zt = [
|
|
108
|
+
{
|
|
109
|
+
label: "温度",
|
|
110
|
+
value: "temperature"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
label: "风力风向",
|
|
114
|
+
value: "wind"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
label: "湿度",
|
|
118
|
+
value: "humidity"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: "降水",
|
|
122
|
+
value: "precipitation"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: "气压",
|
|
126
|
+
value: "pressure"
|
|
127
|
+
}
|
|
128
|
+
], z = b({}), B = b(!1), V = b("day"), H = b([]), U = b([]), Bt = [{
|
|
129
|
+
label: "日统计",
|
|
130
|
+
value: "day"
|
|
131
|
+
}, {
|
|
132
|
+
label: "月统计",
|
|
133
|
+
value: "month"
|
|
134
|
+
}], Vt = () => {
|
|
135
|
+
j.value = !1, B.value = !1;
|
|
136
|
+
}, W = (e) => e == null || e === "" || e === 9999, G = (e, t) => W(e) ? "--" : t ? `${e}${t}` : String(e), Ht = (e) => {
|
|
137
|
+
let t = W(e.windSpeed) ? "--" : `${e.windSpeed}m/s`, n = e.windDirectionText;
|
|
138
|
+
return !n && e.windDirection !== void 0 && e.windDirection !== null && (n = l(e.windDirection), console.log("dir", n)), `${t} ${n || "--"}`;
|
|
139
|
+
}, K = (e) => {
|
|
140
|
+
let t = O.ids[e] || O.ids.data;
|
|
141
|
+
return t?.id ? t : null;
|
|
142
|
+
}, q = async (e, t = {}) => {
|
|
143
|
+
let r = K(e);
|
|
144
|
+
if (!r) throw Error(`缺少 ${e} 对应的工作流配置`);
|
|
145
|
+
return await n({
|
|
146
|
+
id: r.id,
|
|
147
|
+
baseHttp: O.baseHttp,
|
|
148
|
+
reqType: r.reqType,
|
|
149
|
+
variables: {
|
|
150
|
+
stationCode: O.stationCode,
|
|
151
|
+
stationIdC: k.value,
|
|
152
|
+
...t
|
|
153
|
+
},
|
|
154
|
+
isFormData: r.isFormData,
|
|
155
|
+
appKey: O.appKey,
|
|
156
|
+
appSalt: O.appSalt
|
|
157
|
+
});
|
|
158
|
+
}, J = (e) => e ? e.data === void 0 ? e.result === void 0 ? e : e.result : e.data?.result?.output === void 0 ? e.data?.result === void 0 ? e.data : e.data.result : e.data.result.output : null, Ut = async () => {
|
|
159
|
+
O.mock ? Wt() : await Gt();
|
|
160
|
+
}, Wt = () => {
|
|
161
|
+
let e = O.mockData;
|
|
162
|
+
e.baseInfo && (A.value = { ...e.baseInfo }), e.realTimeInfo && (N.value = { ...e.realTimeInfo }), e.statisticsInfo && (P.value = { ...e.statisticsInfo }), e.chartData && (z.value = { ...e.chartData }), M.value = e.dataTime || "", _(Q);
|
|
163
|
+
}, Gt = async () => {
|
|
164
|
+
try {
|
|
165
|
+
let e = J(await q("data"));
|
|
166
|
+
if (e && typeof e == "object") {
|
|
167
|
+
Kt(e), _(Q);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
} catch (e) {
|
|
171
|
+
console.warn("统一数据接口失败,尝试单独接口", e);
|
|
172
|
+
}
|
|
173
|
+
try {
|
|
174
|
+
let e = J(await q("baseInfo"));
|
|
175
|
+
e && (A.value = {
|
|
176
|
+
...A.value,
|
|
177
|
+
...e
|
|
178
|
+
});
|
|
179
|
+
} catch (e) {
|
|
180
|
+
console.warn("站点基础信息接口失败", e);
|
|
181
|
+
}
|
|
182
|
+
try {
|
|
183
|
+
let e = J(await q("realTime"));
|
|
184
|
+
e && (N.value = { ...e });
|
|
185
|
+
} catch (e) {
|
|
186
|
+
console.warn("实时监测接口失败", e);
|
|
187
|
+
}
|
|
188
|
+
try {
|
|
189
|
+
let e = J(await q("statistics"));
|
|
190
|
+
e && (P.value = { ...e });
|
|
191
|
+
} catch (e) {
|
|
192
|
+
console.warn("统计信息接口失败", e);
|
|
193
|
+
}
|
|
194
|
+
try {
|
|
195
|
+
if (K("chart")) {
|
|
196
|
+
let e = J(await q("chart"));
|
|
197
|
+
e && typeof e == "object" && (z.value = Z(e));
|
|
198
|
+
}
|
|
199
|
+
} catch (e) {
|
|
200
|
+
console.warn("图表数据接口失败", e);
|
|
201
|
+
}
|
|
202
|
+
_(Q);
|
|
203
|
+
}, Kt = (e) => {
|
|
204
|
+
e.baseInfo && (A.value = { ...e.baseInfo }), e.realTimeInfo && (N.value = { ...e.realTimeInfo }), e.statisticsInfo && (P.value = { ...e.statisticsInfo }), e.chartData && (z.value = Z(e.chartData)), e.dataTime && (M.value = e.dataTime), L.value = (Array.isArray(e.thresholdData) ? e.thresholdData : []).map((e) => ({
|
|
205
|
+
ele_code: String(e.ele_code || ""),
|
|
206
|
+
min: Number(e.min ?? e.thresholdMin ?? 0),
|
|
207
|
+
max: Number(e.max ?? e.thresholdMax ?? 0)
|
|
208
|
+
}));
|
|
209
|
+
let t = (Array.isArray(e.stationData) ? e.stationData : [])[0] || {};
|
|
210
|
+
t.station_name && (A.value = {
|
|
211
|
+
stationName: t.station_name || "",
|
|
212
|
+
stationCode: t.station_id_c || "",
|
|
213
|
+
address: qt(t.lat, t.lon),
|
|
214
|
+
stationStatus: t.operating_status || "",
|
|
215
|
+
monitorElement: t.monitoring_elements || "",
|
|
216
|
+
serviceType: t.service_type || ""
|
|
217
|
+
}), t.datetime_bj && (M.value = t.datetime_bj), (t.tem !== void 0 || t.pre_1h !== void 0) && (N.value = {
|
|
218
|
+
temperature: Y(t.tem),
|
|
219
|
+
humidity: Y(t.rhu),
|
|
220
|
+
windSpeed: Y(t.win_s_inst_max),
|
|
221
|
+
windDirection: Y(t.win_d_inst_max ?? t.win_d_avg ?? t.windDirection),
|
|
222
|
+
hourPrecipitation: Y(t.pre_1h),
|
|
223
|
+
pressure: Y(t.prs),
|
|
224
|
+
visibility: Y(t.vis),
|
|
225
|
+
evaporation: Y(t.evp_big),
|
|
226
|
+
monitorTime: t.datetime_bj || ""
|
|
227
|
+
});
|
|
228
|
+
let n = (Array.isArray(e.stationDayData) ? e.stationDayData : [])[0] || {};
|
|
229
|
+
(n.tem_max !== void 0 || n.tem_min !== void 0) && (P.value = {
|
|
230
|
+
dailyMinTemp: Y(n.tem_min),
|
|
231
|
+
dailyMaxTemp: Y(n.tem_max),
|
|
232
|
+
dailyPrecipitation: Y(n.pre_time_0808 ?? n.pre_time_2020),
|
|
233
|
+
historyMinTemp: Y(n.his_tem_min),
|
|
234
|
+
historyMaxTemp: Y(n.his_tem_max),
|
|
235
|
+
historyMaxPrecipitation: Y(n.his_pre_max)
|
|
236
|
+
});
|
|
237
|
+
let r = Array.isArray(e.elementData) ? e.elementData : [];
|
|
238
|
+
r.length && (z.value = Yt(r));
|
|
239
|
+
}, Y = (e) => {
|
|
240
|
+
if (e == null || e === "") return null;
|
|
241
|
+
let t = Number(e);
|
|
242
|
+
return isNaN(t) ? e : t >= 9999 ? null : t;
|
|
243
|
+
}, qt = (e, t) => !e && !t ? "" : `N${e || ""} E${t || ""}`, Jt = {
|
|
244
|
+
temperature: "tem",
|
|
245
|
+
wind: "win_s",
|
|
246
|
+
humidity: "rhu",
|
|
247
|
+
precipitation: "pre",
|
|
248
|
+
pressure: "prs"
|
|
249
|
+
}, X = (e) => {
|
|
250
|
+
let t = Jt[e];
|
|
251
|
+
if (!t) return;
|
|
252
|
+
let n = L.value.find((e) => e.ele_code === t);
|
|
253
|
+
if (n) return {
|
|
254
|
+
min: n.min,
|
|
255
|
+
max: n.max
|
|
256
|
+
};
|
|
257
|
+
}, Yt = (e) => {
|
|
258
|
+
let t = e.map((e) => {
|
|
259
|
+
if (!e.datetime_bj) return "";
|
|
260
|
+
let t = new Date(e.datetime_bj);
|
|
261
|
+
return isNaN(t.getTime()) ? e.datetime_bj : `${String(t.getHours()).padStart(2, "0")}时`;
|
|
262
|
+
}), n = (t, n, r, i = "line", a) => ({
|
|
263
|
+
name: n,
|
|
264
|
+
data: e.map((e) => Y(e[t])).map((e) => e === null ? null : e),
|
|
265
|
+
color: r,
|
|
266
|
+
type: i,
|
|
267
|
+
thresholdRange: X(a)
|
|
268
|
+
}), r = e.map((e) => Y(e.win_d_inst_max ?? e.win_d_avg ?? e.windDirection)), i = e.map((e) => Y(e.win_s_inst_max));
|
|
269
|
+
return {
|
|
270
|
+
temperature: {
|
|
271
|
+
times: t,
|
|
272
|
+
unit: "℃",
|
|
273
|
+
series: [n("tem", "正常值", "#00D9FF", "line", "temperature")]
|
|
274
|
+
},
|
|
275
|
+
wind: {
|
|
276
|
+
times: t,
|
|
277
|
+
unit: "m/s",
|
|
278
|
+
series: [{
|
|
279
|
+
...n("win_s_inst_max", "正常值", "#00D9FF", "line", "wind"),
|
|
280
|
+
directions: r,
|
|
281
|
+
windSpeeds: i
|
|
282
|
+
}]
|
|
283
|
+
},
|
|
284
|
+
humidity: {
|
|
285
|
+
times: t,
|
|
286
|
+
unit: "%",
|
|
287
|
+
series: [n("rhu", "正常值", "#00D9FF", "line", "humidity")]
|
|
288
|
+
},
|
|
289
|
+
precipitation: {
|
|
290
|
+
times: t,
|
|
291
|
+
unit: "mm",
|
|
292
|
+
series: [n("pre_1h", "正常值", "#00D9FF", "bar", "precipitation")]
|
|
293
|
+
},
|
|
294
|
+
pressure: {
|
|
295
|
+
times: t,
|
|
296
|
+
unit: "hPa",
|
|
297
|
+
series: [n("prs", "正常值", "#00D9FF", "line", "pressure")]
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
}, Z = (e) => {
|
|
301
|
+
let t = {};
|
|
302
|
+
return [
|
|
303
|
+
"temperature",
|
|
304
|
+
"wind",
|
|
305
|
+
"humidity",
|
|
306
|
+
"precipitation",
|
|
307
|
+
"pressure"
|
|
308
|
+
].forEach((n) => {
|
|
309
|
+
let r = e[n];
|
|
310
|
+
r && (t[n] = {
|
|
311
|
+
times: Array.isArray(r.times) ? r.times : [],
|
|
312
|
+
unit: r.unit || "",
|
|
313
|
+
series: Array.isArray(r.series) ? r.series.map((e) => ({
|
|
314
|
+
name: e.name || "",
|
|
315
|
+
data: Array.isArray(e.data) ? e.data : [],
|
|
316
|
+
directions: Array.isArray(e.directions) ? e.directions : void 0,
|
|
317
|
+
color: e.color,
|
|
318
|
+
type: e.type || "line",
|
|
319
|
+
threshold: e.threshold,
|
|
320
|
+
thresholdRange: e.thresholdRange
|
|
321
|
+
})) : []
|
|
322
|
+
});
|
|
323
|
+
}), t;
|
|
324
|
+
}, Xt = (e) => {
|
|
325
|
+
R.value = e, _(Q);
|
|
326
|
+
}, Q = () => {
|
|
327
|
+
if (!F.value) return;
|
|
328
|
+
I ||= T.init(F.value);
|
|
329
|
+
let e = z.value[R.value];
|
|
330
|
+
if (!e || !e.times.length) {
|
|
331
|
+
I.clear();
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
let t = R.value === "wind", n = e.series.some((e) => e.type === "bar"), r = [], i = X(R.value);
|
|
335
|
+
i && (isNaN(Number(i.min)) || r.push({
|
|
336
|
+
name: "最低阈值",
|
|
337
|
+
value: Number(i.min),
|
|
338
|
+
color: "#0000FF"
|
|
339
|
+
}), isNaN(Number(i.max)) || r.push({
|
|
340
|
+
name: "最高阈值",
|
|
341
|
+
value: Number(i.max),
|
|
342
|
+
color: "#FF0000"
|
|
343
|
+
}));
|
|
344
|
+
let a = e.series.map((e) => {
|
|
345
|
+
let r = {
|
|
346
|
+
name: e.name,
|
|
347
|
+
type: e.type || "line",
|
|
348
|
+
smooth: !0,
|
|
349
|
+
symbol: "circle",
|
|
350
|
+
symbolSize: 6,
|
|
351
|
+
data: e.data,
|
|
352
|
+
itemStyle: { color: e.color || "#00D9FF" },
|
|
353
|
+
lineStyle: { width: 2 }
|
|
354
|
+
};
|
|
355
|
+
if (e.type === "bar" && (r.barWidth = 12, r.itemStyle.borderRadius = [
|
|
356
|
+
4,
|
|
357
|
+
4,
|
|
358
|
+
0,
|
|
359
|
+
0
|
|
360
|
+
], delete r.smooth, delete r.symbol, delete r.symbolSize), !n && !t && (r.areaStyle = { color: new T.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
361
|
+
offset: 0,
|
|
362
|
+
color: Zt(e.color || "#00D9FF", .3)
|
|
363
|
+
}, {
|
|
364
|
+
offset: 1,
|
|
365
|
+
color: Zt(e.color || "#00D9FF", .01)
|
|
366
|
+
}]) }), t) {
|
|
367
|
+
let t = e.windSpeeds || [], n = e.directions || [];
|
|
368
|
+
r.symbol = function(e, n) {
|
|
369
|
+
let r = n.dataIndex, i = u(g(t[r] == null ? 0 : Number(t[r])));
|
|
370
|
+
return i ? `image://${i}` : "circle";
|
|
371
|
+
}, r.symbolSize = [12, 24], r.symbolRotate = function(e, t) {
|
|
372
|
+
let r = n[t.dataIndex];
|
|
373
|
+
return E(r);
|
|
374
|
+
}, r.data = e.data.map((e, r) => {
|
|
375
|
+
let i = g(t[r] == null ? e == null ? 0 : Number(e) : Number(t[r])), a = n[r], o = a == null ? "--" : l(a);
|
|
376
|
+
return {
|
|
377
|
+
value: e,
|
|
378
|
+
windLevel: i,
|
|
379
|
+
windLevelText: `${i}级`,
|
|
380
|
+
windDirectionText: o
|
|
381
|
+
};
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
return r;
|
|
385
|
+
});
|
|
386
|
+
r.forEach((t) => {
|
|
387
|
+
a.push({
|
|
388
|
+
name: t.name,
|
|
389
|
+
type: "line",
|
|
390
|
+
data: e.times.map(() => t.value),
|
|
391
|
+
itemStyle: { color: t.color },
|
|
392
|
+
lineStyle: {
|
|
393
|
+
type: "dashed",
|
|
394
|
+
width: 1
|
|
395
|
+
},
|
|
396
|
+
symbol: "none",
|
|
397
|
+
z: 5
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
let o = (() => {
|
|
401
|
+
let t = [];
|
|
402
|
+
if (e.series.forEach((e) => {
|
|
403
|
+
e.data.forEach((e) => {
|
|
404
|
+
let n = Number(e);
|
|
405
|
+
isNaN(n) || t.push(n);
|
|
406
|
+
});
|
|
407
|
+
}), r.forEach((e) => t.push(e.value)), !t.length) return {
|
|
408
|
+
min: void 0,
|
|
409
|
+
max: void 0
|
|
410
|
+
};
|
|
411
|
+
let n = Math.max(...t), i = Math.min(...t);
|
|
412
|
+
return {
|
|
413
|
+
min: Math.floor(i * 1.1),
|
|
414
|
+
max: Math.ceil(n * 1.1)
|
|
415
|
+
};
|
|
416
|
+
})(), s = [{
|
|
417
|
+
name: "正常值",
|
|
418
|
+
icon: "circle"
|
|
419
|
+
}];
|
|
420
|
+
r.forEach((e) => s.push({
|
|
421
|
+
name: e.name,
|
|
422
|
+
icon: "circle"
|
|
423
|
+
}));
|
|
424
|
+
let c = {
|
|
425
|
+
tooltip: {
|
|
426
|
+
trigger: "axis",
|
|
427
|
+
backgroundColor: "rgba(0, 20, 40, 0.9)",
|
|
428
|
+
borderColor: "#00D9FF",
|
|
429
|
+
textStyle: { color: "#fff" },
|
|
430
|
+
formatter: (n) => `${n[0]?.axisValue || ""}<br/>${n.map((n) => n.seriesName === "正常值" && t && n.data?.windLevelText ? `${n.marker} 风速: ${G(n.value, "m/s")}(${n.data.windLevelText})<br/>${n.marker} 风向: ${n.data?.windDirectionText || "--"}` : `${n.marker} ${n.seriesName}: ${G(n.value, e.unit)}`).join("<br/>")}`
|
|
431
|
+
},
|
|
432
|
+
legend: {
|
|
433
|
+
data: s,
|
|
434
|
+
right: 8,
|
|
435
|
+
top: 8,
|
|
436
|
+
textStyle: { color: "#fff" },
|
|
437
|
+
itemWidth: 12,
|
|
438
|
+
itemHeight: 12,
|
|
439
|
+
itemGap: 16
|
|
440
|
+
},
|
|
441
|
+
grid: {
|
|
442
|
+
left: 16,
|
|
443
|
+
right: 40,
|
|
444
|
+
top: 56,
|
|
445
|
+
bottom: 24,
|
|
446
|
+
containLabel: !0
|
|
447
|
+
},
|
|
448
|
+
xAxis: {
|
|
449
|
+
type: "category",
|
|
450
|
+
boundaryGap: n,
|
|
451
|
+
data: e.times,
|
|
452
|
+
axisLine: { lineStyle: { color: "rgba(255,255,255,0.3)" } },
|
|
453
|
+
axisLabel: {
|
|
454
|
+
color: "rgba(255,255,255,0.7)",
|
|
455
|
+
fontSize: 11,
|
|
456
|
+
interval: 0
|
|
457
|
+
},
|
|
458
|
+
axisTick: { show: !1 },
|
|
459
|
+
splitLine: { show: !1 }
|
|
460
|
+
},
|
|
461
|
+
yAxis: {
|
|
462
|
+
type: "value",
|
|
463
|
+
min: o.min,
|
|
464
|
+
max: o.max,
|
|
465
|
+
name: `单位:${e.unit}`,
|
|
466
|
+
nameTextStyle: {
|
|
467
|
+
color: "rgba(255,255,255,0.7)",
|
|
468
|
+
padding: [
|
|
469
|
+
0,
|
|
470
|
+
0,
|
|
471
|
+
0,
|
|
472
|
+
0
|
|
473
|
+
],
|
|
474
|
+
align: "left"
|
|
475
|
+
},
|
|
476
|
+
axisLine: { show: !1 },
|
|
477
|
+
axisLabel: {
|
|
478
|
+
color: "rgba(255,255,255,0.7)",
|
|
479
|
+
fontSize: 11
|
|
480
|
+
},
|
|
481
|
+
splitLine: { show: !1 },
|
|
482
|
+
axisTick: { show: !1 }
|
|
483
|
+
},
|
|
484
|
+
series: a
|
|
485
|
+
};
|
|
486
|
+
I.setOption(c, !0), I.resize();
|
|
487
|
+
}, Zt = (e, t) => `rgba(${parseInt(e.slice(1, 3), 16)}, ${parseInt(e.slice(3, 5), 16)}, ${parseInt(e.slice(5, 7), 16)}, ${t})`, Qt = () => {
|
|
488
|
+
I?.resize();
|
|
489
|
+
}, $t = () => {
|
|
490
|
+
B.value = !0, nn(), $();
|
|
491
|
+
}, en = () => {
|
|
492
|
+
B.value = !1, V.value = "day";
|
|
493
|
+
}, tn = (e) => {
|
|
494
|
+
V.value = e, nn(), $();
|
|
495
|
+
}, nn = () => {
|
|
496
|
+
let { startDate: e, endDate: t } = rn(V.value);
|
|
497
|
+
U.value = [e, t];
|
|
498
|
+
}, $ = async () => {
|
|
499
|
+
if (O.mock) {
|
|
500
|
+
H.value = O.mockData.historyData?.[V.value] || [];
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
if (!K("history")) {
|
|
504
|
+
console.warn("StationDialog 缺少历史数据工作流配置"), H.value = [];
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
let [e, t] = U.value.length === 2 ? U.value : [null, null], n = V.value === "day" ? "日统计" : "月统计";
|
|
508
|
+
if (!e || !t) {
|
|
509
|
+
console.warn("StationDialog 历史数据时间范围未选择"), H.value = [];
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
try {
|
|
513
|
+
H.value = sn(J(await q("history", {
|
|
514
|
+
startDate: e,
|
|
515
|
+
endDate: t,
|
|
516
|
+
type: n,
|
|
517
|
+
stationIdC: k.value
|
|
518
|
+
})), V.value);
|
|
519
|
+
} catch (e) {
|
|
520
|
+
console.error("历史数据加载失败", e), H.value = [];
|
|
521
|
+
}
|
|
522
|
+
}, rn = (e) => {
|
|
523
|
+
let t = /* @__PURE__ */ new Date();
|
|
524
|
+
if (e === "day") {
|
|
525
|
+
let e = new Date(t), n = new Date(t);
|
|
526
|
+
return n.setDate(e.getDate() - 6), {
|
|
527
|
+
startDate: an(n),
|
|
528
|
+
endDate: an(e)
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
let n = new Date(t.getFullYear(), t.getMonth(), 1);
|
|
532
|
+
return {
|
|
533
|
+
startDate: on(new Date(t.getFullYear(), t.getMonth() - 11, 1)),
|
|
534
|
+
endDate: on(n)
|
|
535
|
+
};
|
|
536
|
+
}, an = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, on = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`, sn = (e, t) => Array.isArray(e) ? e.map((e) => ({
|
|
537
|
+
datetime_bj: e.datetime_bj || e.date || e.month || "",
|
|
538
|
+
pre_time_0808: Y(e.pre_time_0808 ?? e.precipitation),
|
|
539
|
+
pre_time_2020: Y(e.pre_time_2020 ?? e.precipitation),
|
|
540
|
+
tem_max: Y(e.tem_max ?? e.temperature),
|
|
541
|
+
tem_min: Y(e.tem_min ?? e.temperature),
|
|
542
|
+
humidity: Y(e.rhu ?? e.humidity),
|
|
543
|
+
win_s_inst_max: Y(e.win_s_inst_max ?? e.windSpeed)
|
|
544
|
+
})) : [], cn = () => {
|
|
545
|
+
let e = H.value.map((e, t) => ({
|
|
546
|
+
序号: t + 1,
|
|
547
|
+
日期: e.datetime_bj || "",
|
|
548
|
+
降水08: G(e.pre_time_0808, "mm"),
|
|
549
|
+
降水20: G(e.pre_time_2020, "mm"),
|
|
550
|
+
最高温: G(e.tem_max, "℃"),
|
|
551
|
+
最低温: G(e.tem_min, "℃"),
|
|
552
|
+
风速: G(e.win_s_inst_max, "m/s")
|
|
553
|
+
})), t = V.value === "day" ? "日统计" : "月统计";
|
|
554
|
+
new Me.default({
|
|
555
|
+
fileName: `${A.value.stationName || O.stationName}_历史数据_${t}_${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
556
|
+
datas: [{
|
|
557
|
+
sheetData: e,
|
|
558
|
+
sheetName: t,
|
|
559
|
+
sheetFilter: [
|
|
560
|
+
"序号",
|
|
561
|
+
"日期",
|
|
562
|
+
"降水",
|
|
563
|
+
"温度",
|
|
564
|
+
"湿度",
|
|
565
|
+
"风速",
|
|
566
|
+
"风向",
|
|
567
|
+
"气压"
|
|
568
|
+
],
|
|
569
|
+
sheetHeader: [
|
|
570
|
+
"序号",
|
|
571
|
+
"日期",
|
|
572
|
+
"降水",
|
|
573
|
+
"温度",
|
|
574
|
+
"湿度",
|
|
575
|
+
"风速",
|
|
576
|
+
"风向",
|
|
577
|
+
"气压"
|
|
578
|
+
],
|
|
579
|
+
columnWidths: [
|
|
580
|
+
8,
|
|
581
|
+
18,
|
|
582
|
+
12,
|
|
583
|
+
12,
|
|
584
|
+
12,
|
|
585
|
+
12,
|
|
586
|
+
12,
|
|
587
|
+
14
|
|
588
|
+
]
|
|
589
|
+
}]
|
|
590
|
+
}).saveExcel();
|
|
591
|
+
};
|
|
592
|
+
Ee(j, (e) => {
|
|
593
|
+
e && _(() => {
|
|
594
|
+
!I && F.value ? Q() : I?.resize();
|
|
595
|
+
});
|
|
596
|
+
});
|
|
597
|
+
function ln() {
|
|
598
|
+
j.value = !0, D.value = !0, Ut().finally(() => {
|
|
599
|
+
D.value = !1;
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
return we(() => {
|
|
603
|
+
window.addEventListener("resize", Qt), Rt?.on("toComponent", (e) => {
|
|
604
|
+
e.componentName === "StationDialog" && (k.value = e.stationIdC, ln());
|
|
605
|
+
});
|
|
606
|
+
}), Ce(() => {
|
|
607
|
+
window.removeEventListener("resize", Qt), I &&= (I.dispose(), null);
|
|
608
|
+
}), (t, n) => {
|
|
609
|
+
let r = me, i = pe, a = fe, o = _e, s = ge, c = he;
|
|
610
|
+
return y(), ye(ve, { to: "body" }, [De((y(), f("div", Ne, [p("div", {
|
|
611
|
+
class: "StationPop",
|
|
612
|
+
style: Se(e.componentStyle)
|
|
613
|
+
}, [
|
|
614
|
+
p("div", {
|
|
615
|
+
class: "StationPop-close",
|
|
616
|
+
onClick: Vt
|
|
617
|
+
}, [h(r, { class: "StationPop-close-icon" }, {
|
|
618
|
+
default: w(() => [h(C(Oe))]),
|
|
619
|
+
_: 1
|
|
620
|
+
})]),
|
|
621
|
+
p("div", Pe, S(A.value.stationName || e.stationName), 1),
|
|
622
|
+
p("div", Fe, [M.value ? (y(), f("span", Ie, "数据时间:" + S(M.value), 1)) : (y(), f("span", Le, "数据时间:--"))]),
|
|
623
|
+
p("div", Re, [p("div", ze, [
|
|
624
|
+
p("div", Be, [n[1] ||= p("span", { class: "StationPop-infoLabel" }, "站 号:", -1), p("span", Ve, S(A.value.stationCode || "--"), 1)]),
|
|
625
|
+
p("div", He, [n[2] ||= p("span", { class: "StationPop-infoLabel" }, "位 置:", -1), p("span", Ue, S(A.value.address || "--"), 1)]),
|
|
626
|
+
p("div", We, [n[3] ||= p("span", { class: "StationPop-infoLabel" }, "运行状况:", -1), p("span", Ge, S(A.value.stationStatus || "--"), 1)])
|
|
627
|
+
]), p("div", Ke, [p("div", qe, [n[4] ||= p("span", { class: "StationPop-infoLabel" }, "监测要素:", -1), p("span", Je, S(A.value.monitorElement || "--"), 1)]), p("div", Ye, [n[5] ||= p("span", { class: "StationPop-infoLabel" }, "服务类别:", -1), p("span", Xe, S(A.value.serviceType || "--"), 1)])])]),
|
|
628
|
+
p("div", Ze, [
|
|
629
|
+
p("div", Qe, [n[12] ||= p("div", { class: "StationPop-sectionTitle" }, [p("span", { class: "StationPop-sectionBar" }), m(" 实时监测 ")], -1), p("div", $e, [
|
|
630
|
+
p("div", et, [n[6] ||= p("span", { class: "StationPop-realtimeLabel" }, "温度:", -1), p("span", tt, S(G(N.value.temperature, "℃")), 1)]),
|
|
631
|
+
p("div", nt, [n[7] ||= p("span", { class: "StationPop-realtimeLabel" }, "湿度:", -1), p("span", rt, S(G(N.value.humidity, "%")), 1)]),
|
|
632
|
+
p("div", it, [n[8] ||= p("span", { class: "StationPop-realtimeLabel" }, "风速风向:", -1), p("span", at, S(Ht(N.value)), 1)]),
|
|
633
|
+
p("div", ot, [n[9] ||= p("span", { class: "StationPop-realtimeLabel" }, "1小时累积降水:", -1), p("span", st, S(G(N.value.hourPrecipitation, "mm")), 1)]),
|
|
634
|
+
p("div", ct, [n[10] ||= p("span", { class: "StationPop-realtimeLabel" }, "气压:", -1), p("span", lt, S(G(N.value.pressure, "hPa")), 1)]),
|
|
635
|
+
p("div", ut, [n[11] ||= p("span", { class: "StationPop-realtimeLabel" }, "能见度:", -1), p("span", dt, S(G(N.value.visibility, "m")), 1)])
|
|
636
|
+
])]),
|
|
637
|
+
p("div", ft, [
|
|
638
|
+
n[20] ||= p("div", { class: "StationPop-sectionTitle" }, [p("span", { class: "StationPop-sectionBar" }), m(" 统计信息 ")], -1),
|
|
639
|
+
p("div", pt, [
|
|
640
|
+
p("div", mt, [n[13] ||= p("span", { class: "StationPop-statisticsLabel" }, "日最低温度:", -1), p("span", ht, S(G(P.value.dailyMinTemp, "℃")), 1)]),
|
|
641
|
+
p("div", gt, [n[14] ||= p("span", { class: "StationPop-statisticsLabel" }, "日最高温度:", -1), p("span", _t, S(G(P.value.dailyMaxTemp, "℃")), 1)]),
|
|
642
|
+
p("div", vt, [n[15] ||= p("span", { class: "StationPop-statisticsLabel" }, "日累计降水:", -1), p("span", yt, S(G(P.value.dailyPrecipitation, "mm")), 1)]),
|
|
643
|
+
p("div", bt, [n[16] ||= p("span", { class: "StationPop-statisticsLabel" }, "历史最低温:", -1), p("span", xt, S(G(P.value.historyMinTemp, "℃")), 1)]),
|
|
644
|
+
p("div", St, [n[17] ||= p("span", { class: "StationPop-statisticsLabel" }, "历史最高温:", -1), p("span", Ct, S(G(P.value.historyMaxTemp, "℃")), 1)]),
|
|
645
|
+
p("div", wt, [n[18] ||= p("span", { class: "StationPop-statisticsLabel" }, "历史最大累积降水:", -1), p("span", Tt, S(G(P.value.historyMaxPrecipitation, "mm")), 1)])
|
|
646
|
+
]),
|
|
647
|
+
p("button", {
|
|
648
|
+
class: "StationPop-historyBtn",
|
|
649
|
+
onClick: $t
|
|
650
|
+
}, [h(r, null, {
|
|
651
|
+
default: w(() => [h(C(Ae))]),
|
|
652
|
+
_: 1
|
|
653
|
+
}), n[19] ||= m(" 历史数据 ", -1)])
|
|
654
|
+
]),
|
|
655
|
+
p("div", Et, [p("div", Dt, [(y(), f(d, null, x(zt, (e) => p("div", {
|
|
656
|
+
key: e.value,
|
|
657
|
+
class: v(["StationPop-tab", { "StationPop-tab--active": R.value === e.value }]),
|
|
658
|
+
onClick: (t) => Xt(e.value)
|
|
659
|
+
}, S(e.label), 11, Ot)), 64))]), p("div", {
|
|
660
|
+
ref_key: "chartRef",
|
|
661
|
+
ref: F,
|
|
662
|
+
class: "StationPop-chart"
|
|
663
|
+
}, null, 512)])
|
|
664
|
+
])
|
|
665
|
+
], 4), B.value ? (y(), f("div", kt, [p("div", At, [
|
|
666
|
+
p("div", jt, [p("div", Mt, [n[21] ||= p("span", null, "历史数据", -1), p("span", Nt, S(A.value.stationName || e.stationName), 1)]), p("button", {
|
|
667
|
+
class: "StationPop-historyClose",
|
|
668
|
+
onClick: en
|
|
669
|
+
}, "✕")]),
|
|
670
|
+
p("div", Pt, [(y(), f(d, null, x(Bt, (e) => p("button", {
|
|
671
|
+
key: e.value,
|
|
672
|
+
class: v(["StationPop-historyTab", { "StationPop-historyTab--active": V.value === e.value }]),
|
|
673
|
+
onClick: (t) => tn(e.value)
|
|
674
|
+
}, S(e.label), 11, Ft)), 64)), p("div", It, [h(a, { locale: C(je) }, {
|
|
675
|
+
default: w(() => [h(i, {
|
|
676
|
+
modelValue: U.value,
|
|
677
|
+
"onUpdate:modelValue": n[0] ||= (e) => U.value = e,
|
|
678
|
+
clearable: !1,
|
|
679
|
+
class: "StationPop-historyDatePicker",
|
|
680
|
+
"popper-class": "StationPop-historyDatePickerPopper",
|
|
681
|
+
type: V.value === "day" ? "daterange" : "monthrange",
|
|
682
|
+
"value-format": V.value === "day" ? "YYYY-MM-DD" : "YYYY-MM",
|
|
683
|
+
"start-placeholder": V.value === "day" ? "开始日期" : "开始月份",
|
|
684
|
+
"end-placeholder": V.value === "day" ? "结束日期" : "结束月份",
|
|
685
|
+
size: "small",
|
|
686
|
+
onChange: $
|
|
687
|
+
}, null, 8, [
|
|
688
|
+
"modelValue",
|
|
689
|
+
"type",
|
|
690
|
+
"value-format",
|
|
691
|
+
"start-placeholder",
|
|
692
|
+
"end-placeholder"
|
|
693
|
+
])]),
|
|
694
|
+
_: 1
|
|
695
|
+
}, 8, ["locale"]), p("button", {
|
|
696
|
+
class: "StationPop-historyExport",
|
|
697
|
+
onClick: cn
|
|
698
|
+
}, [h(r, null, {
|
|
699
|
+
default: w(() => [h(C(ke))]),
|
|
700
|
+
_: 1
|
|
701
|
+
}), n[22] ||= m(" 导出 ", -1)])])]),
|
|
702
|
+
p("div", Lt, [h(s, {
|
|
703
|
+
data: H.value,
|
|
704
|
+
class: "StationPop-historyTable",
|
|
705
|
+
style: { width: "100%" },
|
|
706
|
+
"empty-text": "暂无数据"
|
|
707
|
+
}, {
|
|
708
|
+
default: w(() => [
|
|
709
|
+
h(o, {
|
|
710
|
+
type: "index",
|
|
711
|
+
label: "序号",
|
|
712
|
+
width: "60",
|
|
713
|
+
align: "center"
|
|
714
|
+
}),
|
|
715
|
+
h(o, {
|
|
716
|
+
label: V.value === "day" ? "日期" : "月份",
|
|
717
|
+
"min-width": "160",
|
|
718
|
+
"show-overflow-tooltip": "",
|
|
719
|
+
align: "left"
|
|
720
|
+
}, {
|
|
721
|
+
default: w(({ row: e }) => [p("span", null, S(e.datetime_bj || "--"), 1)]),
|
|
722
|
+
_: 1
|
|
723
|
+
}, 8, ["label"]),
|
|
724
|
+
h(o, {
|
|
725
|
+
label: "累计降水量08",
|
|
726
|
+
"min-width": "90",
|
|
727
|
+
align: "right"
|
|
728
|
+
}, {
|
|
729
|
+
default: w(({ row: e }) => [p("span", null, S(G(e.pre_time_0808, "mm")), 1)]),
|
|
730
|
+
_: 1
|
|
731
|
+
}),
|
|
732
|
+
h(o, {
|
|
733
|
+
label: "累计降水量20",
|
|
734
|
+
"min-width": "90",
|
|
735
|
+
align: "right"
|
|
736
|
+
}, {
|
|
737
|
+
default: w(({ row: e }) => [p("span", null, S(G(e.pre_time_2020, "mm")), 1)]),
|
|
738
|
+
_: 1
|
|
739
|
+
}),
|
|
740
|
+
h(o, {
|
|
741
|
+
label: "最高温",
|
|
742
|
+
"min-width": "80",
|
|
743
|
+
align: "right"
|
|
744
|
+
}, {
|
|
745
|
+
default: w(({ row: e }) => [p("span", null, S(G(e.tem_max, "℃")), 1)]),
|
|
746
|
+
_: 1
|
|
747
|
+
}),
|
|
748
|
+
h(o, {
|
|
749
|
+
label: "最低温",
|
|
750
|
+
"min-width": "80",
|
|
751
|
+
align: "right"
|
|
752
|
+
}, {
|
|
753
|
+
default: w(({ row: e }) => [p("span", null, S(G(e.tem_min, "℃")), 1)]),
|
|
754
|
+
_: 1
|
|
755
|
+
}),
|
|
756
|
+
h(o, {
|
|
757
|
+
label: "最大风力",
|
|
758
|
+
"min-width": "120",
|
|
759
|
+
align: "left"
|
|
760
|
+
}, {
|
|
761
|
+
default: w(({ row: e }) => [p("span", null, S(G(e.win_s_inst_max, "m/s")), 1)]),
|
|
762
|
+
_: 1
|
|
763
|
+
})
|
|
764
|
+
]),
|
|
765
|
+
_: 1
|
|
766
|
+
}, 8, ["data"])])
|
|
767
|
+
])])) : be("", !0)])), [[Te, j.value], [c, D.value]])]);
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
}), [["__scopeId", "data-v-8ee0ba62"]]);
|
|
771
|
+
//#endregion
|
|
772
|
+
export { E as t };
|