nxd-plugin 1.5.9 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{component-HighWayFreeze-Ckh45dhq.mjs → component-HighWayFreeze-Bu_esAjA.mjs} +302 -338
- package/dist/chunks/{component-HighwayLiveAlarm-BJQZsDZ2.mjs → component-HighwayLiveAlarm-D5A8U6nr.mjs} +69 -69
- package/dist/chunks/{component-HighwayLiveAlarmNew-C5KlMjlj.mjs → component-HighwayLiveAlarmNew-HTEc2Sb9.mjs} +103 -103
- package/dist/chunks/{component-HighwayStations-C0dO_r1R.mjs → component-HighwayStations-EkqsQMyT.mjs} +2 -2
- package/dist/chunks/{component-HighwayWeatherForecast-shTrLuFz.mjs → component-HighwayWeatherForecast-BevrRin0.mjs} +1 -1
- package/dist/chunks/{component-ImageGeneration-fM3XhtlC.mjs → component-ImageGeneration-Dl868bT0.mjs} +219 -219
- package/dist/chunks/{component-LithiumBatteryMiningArea-CaghGyZC.mjs → component-LithiumBatteryMiningArea-UCOjHXW5.mjs} +2 -2
- package/dist/chunks/component-RadarShortTerm-DRcLYADs.mjs +327 -0
- package/dist/chunks/{component-ServiceMaterialsBtn-Cis_VgDG.mjs → component-ServiceMaterialsBtn-ATwSSBGA.mjs} +54 -54
- package/dist/chunks/{component-TimeBasedForecast-hko63_2i.mjs → component-TimeBasedForecast-BcpYv2vT.mjs} +4 -4
- package/dist/chunks/{component-WeatherForecast-B_d-ajBP.mjs → component-WeatherForecast-4vw_2TY8.mjs} +2 -2
- package/dist/chunks/{component-YCHome-C5nCaoI3.mjs → component-YCHome-Bkh0LsrR.mjs} +435 -435
- package/dist/chunks/{component-YCLogin-Dr5Q9rj3.mjs → component-YCLogin-DlL6em53.mjs} +6 -6
- package/dist/chunks/{component-YCLoginNew-BPxGi6F_.mjs → component-YCLoginNew-CC2fkd71.mjs} +7 -7
- package/dist/nxd-plugin.mjs +16 -16
- package/dist/src/components/RadarShortTerm/RadarShortTerm.vue.d.ts +3 -1
- package/dist/styles/component-RadarShortTerm.css +1 -1
- package/dist/styles/component-YCLogin.css +1 -1
- package/dist/styles/component-YCLoginNew.css +1 -1
- package/package.json +1 -1
- package/dist/chunks/component-RadarShortTerm-BlM8sLMP.mjs +0 -1160
|
@@ -1,1160 +0,0 @@
|
|
|
1
|
-
import "./rolldown-runtime-Dd0fQ6-X.mjs";
|
|
2
|
-
import { B as e, C as t, G as n, J as r, L as i, N as a, P as o, Q as s, S as c, Y as l, at as u, b as d, c as f, d as p, i as m, it as h, j as ee, k as g, l as _, m as v, ot as y, st as b, u as x } from "./component-HighWayFreeze-Ckh45dhq.mjs";
|
|
3
|
-
import { D as S, F as C, L as w, Nt as T, O as E, Pt as te, T as D, Ut as O, _ as ne, g as re, i as k, n as A, p as j, r as M, tn as N, w as P, z as F } from "./component-HighWayEarlyWarningRed-C4eUxLai.mjs";
|
|
4
|
-
import { i as ie, o as I } from "./component-ImageGeneration-fM3XhtlC.mjs";
|
|
5
|
-
import { n as ae } from "./component-HighwayLiveAlarmNew-C5KlMjlj.mjs";
|
|
6
|
-
import { Fragment as L, computed as R, createBlock as z, createCommentVNode as B, createElementBlock as V, createElementVNode as H, createSlots as oe, createTextVNode as U, createVNode as W, defineComponent as G, h as K, inject as se, nextTick as q, normalizeClass as J, normalizeStyle as ce, onBeforeUnmount as le, onMounted as ue, onUpdated as de, openBlock as Y, provide as fe, reactive as pe, ref as X, renderList as me, renderSlot as he, shallowRef as ge, toDisplayString as Z, toRefs as _e, unref as Q, vShow as ve, watch as ye, watchEffect as be, withCtx as $, withDirectives as xe, withKeys as Se, withModifiers as Ce } from "vue";
|
|
7
|
-
var we = "_RepeatClick", Te = {
|
|
8
|
-
beforeMount(e, t) {
|
|
9
|
-
let n = t.value, { interval: r = 100, delay: i = 600 } = te(n) ? {} : n, a, o, s = () => te(n) ? n() : n.handler(), c = () => {
|
|
10
|
-
o &&= (clearTimeout(o), void 0), a &&= (clearInterval(a), void 0);
|
|
11
|
-
}, l = (e) => {
|
|
12
|
-
e.button === 0 && (c(), s(), document.addEventListener("mouseup", c, { once: !0 }), o = setTimeout(() => {
|
|
13
|
-
a = setInterval(() => {
|
|
14
|
-
s();
|
|
15
|
-
}, r);
|
|
16
|
-
}, i));
|
|
17
|
-
};
|
|
18
|
-
e[we] = {
|
|
19
|
-
start: l,
|
|
20
|
-
clear: c
|
|
21
|
-
}, e.addEventListener("mousedown", l);
|
|
22
|
-
},
|
|
23
|
-
unmounted(e) {
|
|
24
|
-
if (!e[we]) return;
|
|
25
|
-
let { start: t, clear: n } = e[we];
|
|
26
|
-
t && e.removeEventListener("mousedown", t), n && (n(), document.removeEventListener("mouseup", n)), e[we] = null;
|
|
27
|
-
}
|
|
28
|
-
}, Ee = S({
|
|
29
|
-
id: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: void 0
|
|
32
|
-
},
|
|
33
|
-
step: {
|
|
34
|
-
type: Number,
|
|
35
|
-
default: 1
|
|
36
|
-
},
|
|
37
|
-
stepStrictly: Boolean,
|
|
38
|
-
max: {
|
|
39
|
-
type: Number,
|
|
40
|
-
default: 2 ** 53 - 1
|
|
41
|
-
},
|
|
42
|
-
min: {
|
|
43
|
-
type: Number,
|
|
44
|
-
default: -(2 ** 53 - 1)
|
|
45
|
-
},
|
|
46
|
-
modelValue: { type: [Number, null] },
|
|
47
|
-
readonly: Boolean,
|
|
48
|
-
disabled: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: void 0
|
|
51
|
-
},
|
|
52
|
-
size: j,
|
|
53
|
-
controls: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: !0
|
|
56
|
-
},
|
|
57
|
-
controlsPosition: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: "",
|
|
60
|
-
values: ["", "right"]
|
|
61
|
-
},
|
|
62
|
-
valueOnClear: {
|
|
63
|
-
type: E([
|
|
64
|
-
String,
|
|
65
|
-
Number,
|
|
66
|
-
null
|
|
67
|
-
]),
|
|
68
|
-
validator: (e) => e === null || C(e) || ["min", "max"].includes(e),
|
|
69
|
-
default: null
|
|
70
|
-
},
|
|
71
|
-
name: String,
|
|
72
|
-
placeholder: String,
|
|
73
|
-
precision: {
|
|
74
|
-
type: Number,
|
|
75
|
-
validator: (e) => e >= 0 && e === Number.parseInt(`${e}`, 10)
|
|
76
|
-
},
|
|
77
|
-
validateEvent: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: !0
|
|
80
|
-
},
|
|
81
|
-
...e(["ariaLabel"]),
|
|
82
|
-
inputmode: {
|
|
83
|
-
type: E(String),
|
|
84
|
-
default: void 0
|
|
85
|
-
},
|
|
86
|
-
align: {
|
|
87
|
-
type: E(String),
|
|
88
|
-
default: "center"
|
|
89
|
-
},
|
|
90
|
-
disabledScientific: Boolean
|
|
91
|
-
}), De = {
|
|
92
|
-
[h]: (e, t) => t !== e,
|
|
93
|
-
blur: (e) => e instanceof FocusEvent,
|
|
94
|
-
focus: (e) => e instanceof FocusEvent,
|
|
95
|
-
[u]: (e) => C(e) || F(e),
|
|
96
|
-
[y]: (e) => C(e) || F(e)
|
|
97
|
-
}, Oe = ["aria-label"], ke = ["aria-label"], Ae = i(/* @__PURE__ */ G({
|
|
98
|
-
name: "ElInputNumber",
|
|
99
|
-
__name: "input-number",
|
|
100
|
-
props: Ee,
|
|
101
|
-
emits: De,
|
|
102
|
-
setup(e, { expose: n, emit: i }) {
|
|
103
|
-
let a = e, o = i, { t: s } = ne(), c = re("input-number"), m = X(), _ = pe({
|
|
104
|
-
currentValue: a.modelValue,
|
|
105
|
-
userInput: null
|
|
106
|
-
}), { formItem: S } = f(), T = R(() => C(a.modelValue) && a.modelValue <= a.min), E = R(() => C(a.modelValue) && a.modelValue >= a.max), te = R(() => {
|
|
107
|
-
let e = I(a.step);
|
|
108
|
-
return w(a.precision) ? Math.max(I(a.modelValue), e) : (e > a.precision && P("InputNumber", "precision should not be less than the decimal places of step"), a.precision);
|
|
109
|
-
}), k = R(() => a.controls && a.controlsPosition === "right"), A = p(), j = x(), M = R(() => {
|
|
110
|
-
if (_.userInput !== null) return _.userInput;
|
|
111
|
-
let e = _.currentValue;
|
|
112
|
-
if (F(e)) return "";
|
|
113
|
-
if (C(e)) {
|
|
114
|
-
if (Number.isNaN(e)) return "";
|
|
115
|
-
w(a.precision) || (e = e.toFixed(a.precision));
|
|
116
|
-
}
|
|
117
|
-
return e;
|
|
118
|
-
}), N = (e, t) => {
|
|
119
|
-
if (w(t) && (t = te.value), t === 0) return Math.round(e);
|
|
120
|
-
let n = String(e), r = n.indexOf(".");
|
|
121
|
-
if (r === -1 || !n.replace(".", "").split("")[r + t]) return e;
|
|
122
|
-
let i = n.length;
|
|
123
|
-
return n.charAt(i - 1) === "5" && (n = `${n.slice(0, Math.max(0, i - 1))}6`), Number.parseFloat(Number(n).toFixed(t));
|
|
124
|
-
}, I = (e) => {
|
|
125
|
-
if (F(e)) return 0;
|
|
126
|
-
let t = e.toString(), n = t.indexOf("."), r = 0;
|
|
127
|
-
return n !== -1 && (r = t.length - n - 1), r;
|
|
128
|
-
}, ae = (e, t = 1) => C(e) ? e >= 2 ** 53 - 1 && t === 1 ? (P("InputNumber", "The value has reached the maximum safe integer limit."), e) : e <= -(2 ** 53 - 1) && t === -1 ? (P("InputNumber", "The value has reached the minimum safe integer limit."), e) : N(e + a.step * t) : _.currentValue, L = (e) => {
|
|
129
|
-
let t = r(e), n = l(e);
|
|
130
|
-
if (a.disabledScientific && ["e", "E"].includes(n)) {
|
|
131
|
-
e.preventDefault();
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
switch (t) {
|
|
135
|
-
case b.up:
|
|
136
|
-
e.preventDefault(), H();
|
|
137
|
-
break;
|
|
138
|
-
case b.down:
|
|
139
|
-
e.preventDefault(), U();
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
}, H = () => {
|
|
143
|
-
a.readonly || j.value || E.value || (K(ae(Number(M.value) || 0)), o(u, _.currentValue), ge());
|
|
144
|
-
}, U = () => {
|
|
145
|
-
a.readonly || j.value || T.value || (K(ae(Number(M.value) || 0, -1)), o(u, _.currentValue), ge());
|
|
146
|
-
}, G = (e, t) => {
|
|
147
|
-
let { max: n, min: r, step: i, precision: s, stepStrictly: c, valueOnClear: l } = a;
|
|
148
|
-
n < r && D("InputNumber", "min should not be greater than max.");
|
|
149
|
-
let u = Number(e);
|
|
150
|
-
if (F(e) || Number.isNaN(u)) return null;
|
|
151
|
-
if (e === "") {
|
|
152
|
-
if (l === null) return null;
|
|
153
|
-
u = O(l) ? {
|
|
154
|
-
min: r,
|
|
155
|
-
max: n
|
|
156
|
-
}[l] : l;
|
|
157
|
-
}
|
|
158
|
-
return c && (u = N(Math.round(N(u / i)) * i, s), u !== e && t && o("update:modelValue", u)), w(s) || (u = N(u, s)), (u > n || u < r) && (u = u > n ? n : r, t && o("update:modelValue", u)), u;
|
|
159
|
-
}, K = (e, t = !0) => {
|
|
160
|
-
let n = _.currentValue, r = G(e);
|
|
161
|
-
if (!t) {
|
|
162
|
-
o(y, r);
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
_.userInput = null, !(n === r && e) && (o(y, r), n !== r && o(h, r, n), a.validateEvent && S?.validate?.("change").catch((e) => P(e)), _.currentValue = r);
|
|
166
|
-
}, se = (e) => {
|
|
167
|
-
_.userInput = e;
|
|
168
|
-
let t = e === "" ? null : Number(e);
|
|
169
|
-
o(u, t), K(t, !1);
|
|
170
|
-
}, q = (e) => {
|
|
171
|
-
let t = e === "" ? "" : Number(e);
|
|
172
|
-
(C(t) && !Number.isNaN(t) || e === "") && K(t), ge(), _.userInput = null;
|
|
173
|
-
}, ce = () => {
|
|
174
|
-
m.value?.focus?.();
|
|
175
|
-
}, le = () => {
|
|
176
|
-
m.value?.blur?.();
|
|
177
|
-
}, fe = (e) => {
|
|
178
|
-
o("focus", e);
|
|
179
|
-
}, me = (e) => {
|
|
180
|
-
_.userInput = null, _.currentValue === null && m.value?.input && (m.value.input.value = ""), o("blur", e), a.validateEvent && S?.validate?.("blur").catch((e) => P(e));
|
|
181
|
-
}, ge = () => {
|
|
182
|
-
_.currentValue !== a.modelValue && (_.currentValue = a.modelValue);
|
|
183
|
-
}, Z = (e) => {
|
|
184
|
-
document.activeElement === e.target && e.preventDefault();
|
|
185
|
-
};
|
|
186
|
-
return ye(() => a.modelValue, (e, t) => {
|
|
187
|
-
let n = G(e, !0);
|
|
188
|
-
_.userInput === null && n !== t && (_.currentValue = n);
|
|
189
|
-
}, { immediate: !0 }), ye(() => a.precision, () => {
|
|
190
|
-
_.currentValue = G(a.modelValue);
|
|
191
|
-
}), ue(() => {
|
|
192
|
-
let { min: e, max: t, modelValue: n } = a, r = m.value?.input;
|
|
193
|
-
if (r.setAttribute("role", "spinbutton"), Number.isFinite(t) ? r.setAttribute("aria-valuemax", String(t)) : r.removeAttribute("aria-valuemax"), Number.isFinite(e) ? r.setAttribute("aria-valuemin", String(e)) : r.removeAttribute("aria-valuemin"), r.setAttribute("aria-valuenow", _.currentValue || _.currentValue === 0 ? String(_.currentValue) : ""), r.setAttribute("aria-disabled", String(j.value)), !C(n) && n != null) {
|
|
194
|
-
let e = Number(n);
|
|
195
|
-
Number.isNaN(e) && (e = null), o(y, e);
|
|
196
|
-
}
|
|
197
|
-
r.addEventListener("wheel", Z, { passive: !1 });
|
|
198
|
-
}), de(() => {
|
|
199
|
-
(m.value?.input)?.setAttribute("aria-valuenow", `${_.currentValue ?? ""}`);
|
|
200
|
-
}), n({
|
|
201
|
-
focus: ce,
|
|
202
|
-
blur: le
|
|
203
|
-
}), (n, r) => (Y(), V("div", {
|
|
204
|
-
class: J([
|
|
205
|
-
Q(c).b(),
|
|
206
|
-
Q(c).m(Q(A)),
|
|
207
|
-
Q(c).is("disabled", Q(j)),
|
|
208
|
-
Q(c).is("without-controls", !e.controls),
|
|
209
|
-
Q(c).is("controls-right", k.value),
|
|
210
|
-
Q(c).is(e.align, !!e.align)
|
|
211
|
-
]),
|
|
212
|
-
onDragstart: r[0] ||= Ce(() => {}, ["prevent"])
|
|
213
|
-
}, [
|
|
214
|
-
e.controls ? xe((Y(), V("span", {
|
|
215
|
-
key: 0,
|
|
216
|
-
role: "button",
|
|
217
|
-
"aria-label": Q(s)("el.inputNumber.decrease"),
|
|
218
|
-
class: J([Q(c).e("decrease"), Q(c).is("disabled", T.value)]),
|
|
219
|
-
onKeydown: Se(U, ["enter"])
|
|
220
|
-
}, [he(n.$slots, "decrease-icon", {}, () => [W(Q(v), null, {
|
|
221
|
-
default: $(() => [k.value ? (Y(), z(Q(d), { key: 0 })) : (Y(), z(Q(g), { key: 1 }))]),
|
|
222
|
-
_: 1
|
|
223
|
-
})])], 42, Oe)), [[Q(Te), U]]) : B("v-if", !0),
|
|
224
|
-
e.controls ? xe((Y(), V("span", {
|
|
225
|
-
key: 1,
|
|
226
|
-
role: "button",
|
|
227
|
-
"aria-label": Q(s)("el.inputNumber.increase"),
|
|
228
|
-
class: J([Q(c).e("increase"), Q(c).is("disabled", E.value)]),
|
|
229
|
-
onKeydown: Se(H, ["enter"])
|
|
230
|
-
}, [he(n.$slots, "increase-icon", {}, () => [W(Q(v), null, {
|
|
231
|
-
default: $(() => [k.value ? (Y(), z(Q(t), { key: 0 })) : (Y(), z(Q(ee), { key: 1 }))]),
|
|
232
|
-
_: 1
|
|
233
|
-
})])], 42, ke)), [[Q(Te), H]]) : B("v-if", !0),
|
|
234
|
-
W(Q(ie), {
|
|
235
|
-
id: e.id,
|
|
236
|
-
ref_key: "input",
|
|
237
|
-
ref: m,
|
|
238
|
-
type: "number",
|
|
239
|
-
step: e.step,
|
|
240
|
-
"model-value": M.value,
|
|
241
|
-
placeholder: e.placeholder,
|
|
242
|
-
readonly: e.readonly,
|
|
243
|
-
disabled: Q(j),
|
|
244
|
-
size: Q(A),
|
|
245
|
-
max: e.max,
|
|
246
|
-
min: e.min,
|
|
247
|
-
name: e.name,
|
|
248
|
-
"aria-label": e.ariaLabel,
|
|
249
|
-
"validate-event": !1,
|
|
250
|
-
inputmode: e.inputmode,
|
|
251
|
-
onKeydown: L,
|
|
252
|
-
onBlur: me,
|
|
253
|
-
onFocus: fe,
|
|
254
|
-
onInput: se,
|
|
255
|
-
onChange: q
|
|
256
|
-
}, oe({ _: 2 }, [n.$slots.prefix ? {
|
|
257
|
-
name: "prefix",
|
|
258
|
-
fn: $(() => [he(n.$slots, "prefix")]),
|
|
259
|
-
key: "0"
|
|
260
|
-
} : void 0, n.$slots.suffix ? {
|
|
261
|
-
name: "suffix",
|
|
262
|
-
fn: $(() => [he(n.$slots, "suffix")]),
|
|
263
|
-
key: "1"
|
|
264
|
-
} : void 0]), 1032, [
|
|
265
|
-
"id",
|
|
266
|
-
"step",
|
|
267
|
-
"model-value",
|
|
268
|
-
"placeholder",
|
|
269
|
-
"readonly",
|
|
270
|
-
"disabled",
|
|
271
|
-
"size",
|
|
272
|
-
"max",
|
|
273
|
-
"min",
|
|
274
|
-
"name",
|
|
275
|
-
"aria-label",
|
|
276
|
-
"inputmode"
|
|
277
|
-
])
|
|
278
|
-
], 34));
|
|
279
|
-
}
|
|
280
|
-
})), je = Symbol("sliderContextKey"), Me = S({
|
|
281
|
-
modelValue: {
|
|
282
|
-
type: E([Number, Array]),
|
|
283
|
-
default: 0
|
|
284
|
-
},
|
|
285
|
-
id: {
|
|
286
|
-
type: String,
|
|
287
|
-
default: void 0
|
|
288
|
-
},
|
|
289
|
-
min: {
|
|
290
|
-
type: Number,
|
|
291
|
-
default: 0
|
|
292
|
-
},
|
|
293
|
-
max: {
|
|
294
|
-
type: Number,
|
|
295
|
-
default: 100
|
|
296
|
-
},
|
|
297
|
-
step: {
|
|
298
|
-
type: E([Number, String]),
|
|
299
|
-
default: 1
|
|
300
|
-
},
|
|
301
|
-
showInput: Boolean,
|
|
302
|
-
showInputControls: {
|
|
303
|
-
type: Boolean,
|
|
304
|
-
default: !0
|
|
305
|
-
},
|
|
306
|
-
size: j,
|
|
307
|
-
inputSize: j,
|
|
308
|
-
showStops: Boolean,
|
|
309
|
-
showTooltip: {
|
|
310
|
-
type: Boolean,
|
|
311
|
-
default: !0
|
|
312
|
-
},
|
|
313
|
-
formatTooltip: {
|
|
314
|
-
type: E(Function),
|
|
315
|
-
default: void 0
|
|
316
|
-
},
|
|
317
|
-
disabled: {
|
|
318
|
-
type: Boolean,
|
|
319
|
-
default: void 0
|
|
320
|
-
},
|
|
321
|
-
range: Boolean,
|
|
322
|
-
vertical: Boolean,
|
|
323
|
-
height: String,
|
|
324
|
-
rangeStartLabel: {
|
|
325
|
-
type: String,
|
|
326
|
-
default: void 0
|
|
327
|
-
},
|
|
328
|
-
rangeEndLabel: {
|
|
329
|
-
type: String,
|
|
330
|
-
default: void 0
|
|
331
|
-
},
|
|
332
|
-
formatValueText: {
|
|
333
|
-
type: E(Function),
|
|
334
|
-
default: void 0
|
|
335
|
-
},
|
|
336
|
-
tooltipClass: {
|
|
337
|
-
type: String,
|
|
338
|
-
default: void 0
|
|
339
|
-
},
|
|
340
|
-
placement: {
|
|
341
|
-
type: String,
|
|
342
|
-
values: n,
|
|
343
|
-
default: "top"
|
|
344
|
-
},
|
|
345
|
-
marks: { type: E(Object) },
|
|
346
|
-
validateEvent: {
|
|
347
|
-
type: Boolean,
|
|
348
|
-
default: !0
|
|
349
|
-
},
|
|
350
|
-
persistent: {
|
|
351
|
-
type: Boolean,
|
|
352
|
-
default: !0
|
|
353
|
-
},
|
|
354
|
-
...e(["ariaLabel"])
|
|
355
|
-
}), Ne = (e) => C(e) || T(e) && e.every(C), Pe = {
|
|
356
|
-
[y]: Ne,
|
|
357
|
-
[u]: Ne,
|
|
358
|
-
[h]: Ne
|
|
359
|
-
}, Fe = (e, t, n) => {
|
|
360
|
-
let r = X();
|
|
361
|
-
return ue(async () => {
|
|
362
|
-
e.range ? (T(e.modelValue) ? (t.firstValue = Math.max(e.min, e.modelValue[0]), t.secondValue = Math.min(e.max, e.modelValue[1])) : (t.firstValue = e.min, t.secondValue = e.max), t.oldValue = [t.firstValue, t.secondValue]) : (!C(e.modelValue) || Number.isNaN(e.modelValue) ? t.firstValue = e.min : t.firstValue = Math.min(e.max, Math.max(e.min, e.modelValue)), t.oldValue = t.firstValue), N(window, "resize", n), await q(), n();
|
|
363
|
-
}), { sliderWrapper: r };
|
|
364
|
-
}, Ie = (e) => {
|
|
365
|
-
let t = R(() => e.marks ? Object.keys(e.marks).map(Number.parseFloat).sort((e, t) => e - t).filter((t) => t <= e.max && t >= e.min).map((t) => ({
|
|
366
|
-
point: t,
|
|
367
|
-
position: (t - e.min) * 100 / (e.max - e.min),
|
|
368
|
-
mark: e.marks[t]
|
|
369
|
-
})) : []);
|
|
370
|
-
return be(() => {
|
|
371
|
-
if (e.step === "mark" && !e.marks && P("ElSlider", "marks prop must be provided when step is mark"), e.marks) {
|
|
372
|
-
let n = Object.keys(e.marks), r = t.value.map((e) => e.point), i = n.filter((e) => {
|
|
373
|
-
let t = Number.parseFloat(e);
|
|
374
|
-
return Number.isNaN(t) || !r.includes(t);
|
|
375
|
-
});
|
|
376
|
-
i.length > 0 && P("ElSlider", `Some marks keys are invalid (not a number or out of [min, max]): [${i.map((e) => `'${e}'`).join(", ")}] and will be ignored.`);
|
|
377
|
-
}
|
|
378
|
-
}), t;
|
|
379
|
-
}, Le = (e, t, n) => {
|
|
380
|
-
let { formItem: r } = f(), i = ge(), a = X(), o = X(), s = {
|
|
381
|
-
firstButton: a,
|
|
382
|
-
secondButton: o
|
|
383
|
-
}, c = x(), l = R(() => Math.min(t.firstValue, t.secondValue)), d = R(() => Math.max(t.firstValue, t.secondValue)), p = R(() => e.range ? `${100 * (d.value - l.value) / (e.max - e.min)}%` : `${100 * (t.firstValue - e.min) / (e.max - e.min)}%`), m = R(() => e.range ? `${100 * (l.value - e.min) / (e.max - e.min)}%` : "0%"), ee = R(() => e.vertical ? { height: e.height } : {}), g = R(() => e.vertical ? {
|
|
384
|
-
height: p.value,
|
|
385
|
-
bottom: m.value
|
|
386
|
-
} : {
|
|
387
|
-
width: p.value,
|
|
388
|
-
left: m.value
|
|
389
|
-
}), _ = () => {
|
|
390
|
-
i.value && (t.sliderSize = i.value.getBoundingClientRect()[e.vertical ? "height" : "width"]);
|
|
391
|
-
}, v = (n) => {
|
|
392
|
-
let r = e.min + n * (e.max - e.min) / 100;
|
|
393
|
-
if (!e.range) return a;
|
|
394
|
-
let i;
|
|
395
|
-
return i = Math.abs(l.value - r) < Math.abs(d.value - r) ? t.firstValue < t.secondValue ? "firstButton" : "secondButton" : t.firstValue > t.secondValue ? "firstButton" : "secondButton", s[i];
|
|
396
|
-
}, b = (e) => {
|
|
397
|
-
let t = v(e);
|
|
398
|
-
return t.value.setPosition(e), t;
|
|
399
|
-
}, S = (n) => {
|
|
400
|
-
t.firstValue = n ?? e.min, w(e.range ? [l.value, d.value] : n ?? e.min);
|
|
401
|
-
}, C = (n) => {
|
|
402
|
-
t.secondValue = n, e.range && w([l.value, d.value]);
|
|
403
|
-
}, w = (e) => {
|
|
404
|
-
n(y, e), n(u, e);
|
|
405
|
-
}, T = async () => {
|
|
406
|
-
await q(), n(h, e.range ? [l.value, d.value] : e.modelValue);
|
|
407
|
-
}, E = (n) => {
|
|
408
|
-
if (c.value || t.dragging) return;
|
|
409
|
-
_();
|
|
410
|
-
let r = 0;
|
|
411
|
-
if (e.vertical) {
|
|
412
|
-
let e = n.touches?.item(0)?.clientY ?? n.clientY;
|
|
413
|
-
r = (i.value.getBoundingClientRect().bottom - e) / t.sliderSize * 100;
|
|
414
|
-
} else r = ((n.touches?.item(0)?.clientX ?? n.clientX) - i.value.getBoundingClientRect().left) / t.sliderSize * 100;
|
|
415
|
-
if (!(r < 0 || r > 100)) return b(r);
|
|
416
|
-
};
|
|
417
|
-
return {
|
|
418
|
-
elFormItem: r,
|
|
419
|
-
slider: i,
|
|
420
|
-
firstButton: a,
|
|
421
|
-
secondButton: o,
|
|
422
|
-
sliderDisabled: c,
|
|
423
|
-
minValue: l,
|
|
424
|
-
maxValue: d,
|
|
425
|
-
runwayStyle: ee,
|
|
426
|
-
barStyle: g,
|
|
427
|
-
resetSize: _,
|
|
428
|
-
setPosition: b,
|
|
429
|
-
emitChange: T,
|
|
430
|
-
onSliderWrapperPrevent: (e) => {
|
|
431
|
-
(s.firstButton.value?.dragging || s.secondButton.value?.dragging) && e.preventDefault();
|
|
432
|
-
},
|
|
433
|
-
onSliderClick: (e) => {
|
|
434
|
-
E(e) && T();
|
|
435
|
-
},
|
|
436
|
-
onSliderDown: async (e) => {
|
|
437
|
-
let t = E(e);
|
|
438
|
-
t && (await q(), t.value.onButtonDown(e));
|
|
439
|
-
},
|
|
440
|
-
onSliderMarkerDown: (e) => {
|
|
441
|
-
c.value || t.dragging || b(e) && T();
|
|
442
|
-
},
|
|
443
|
-
setFirstValue: S,
|
|
444
|
-
setSecondValue: C
|
|
445
|
-
};
|
|
446
|
-
}, Re = (e, t, n, r) => ({
|
|
447
|
-
stops: R(() => {
|
|
448
|
-
if (!e.showStops || e.min > e.max) return [];
|
|
449
|
-
if (e.step === "mark" || e.step === 0) return e.step === 0 && P("ElSlider", "step should not be 0."), [];
|
|
450
|
-
let i = Math.ceil((e.max - e.min) / e.step), a = 100 * e.step / (e.max - e.min), o = Array.from({ length: i - 1 }).map((e, t) => (t + 1) * a);
|
|
451
|
-
return e.range ? o.filter((t) => t < 100 * (n.value - e.min) / (e.max - e.min) || t > 100 * (r.value - e.min) / (e.max - e.min)) : o.filter((n) => n > 100 * (t.firstValue - e.min) / (e.max - e.min));
|
|
452
|
-
}),
|
|
453
|
-
getStopStyle: (t) => e.vertical ? { bottom: `${t}%` } : { left: `${t}%` }
|
|
454
|
-
}), ze = (e, t, n, r, i, a) => {
|
|
455
|
-
let o = (e) => {
|
|
456
|
-
i(y, e), i(u, e);
|
|
457
|
-
}, s = () => e.range ? ![n.value, r.value].every((e, n) => e === t.oldValue[n]) : e.modelValue !== t.oldValue, c = () => {
|
|
458
|
-
e.min > e.max && D("Slider", "min should not be greater than max.");
|
|
459
|
-
let n = e.modelValue;
|
|
460
|
-
e.range && T(n) ? n[1] < e.min ? o([e.min, e.min]) : n[0] > e.max ? o([e.max, e.max]) : n[0] < e.min ? o([e.min, n[1]]) : n[1] > e.max ? o([n[0], e.max]) : (t.firstValue = n[0], t.secondValue = n[1], s() && (e.validateEvent && a?.validate?.("change").catch((e) => P(e)), t.oldValue = n.slice())) : !e.range && C(n) && !Number.isNaN(n) && (n < e.min ? o(e.min) : n > e.max ? o(e.max) : (t.firstValue = n, s() && (e.validateEvent && a?.validate?.("change").catch((e) => P(e)), t.oldValue = n)));
|
|
461
|
-
};
|
|
462
|
-
c(), ye(() => t.dragging, (e) => {
|
|
463
|
-
e || c();
|
|
464
|
-
}), ye(() => e.modelValue, (e, n) => {
|
|
465
|
-
t.dragging || T(e) && T(n) && e.every((e, t) => e === n[t]) && t.firstValue === e[0] && t.secondValue === e[1] || c();
|
|
466
|
-
}, { deep: !0 }), ye(() => [e.min, e.max], () => {
|
|
467
|
-
c();
|
|
468
|
-
});
|
|
469
|
-
}, Be = (e, t, n) => {
|
|
470
|
-
let r = X(), i = X(!1), a = R(() => t.value instanceof Function);
|
|
471
|
-
return {
|
|
472
|
-
tooltip: r,
|
|
473
|
-
tooltipVisible: i,
|
|
474
|
-
formatValue: R(() => a.value && t.value(e.modelValue) || e.modelValue),
|
|
475
|
-
displayTooltip: I(() => {
|
|
476
|
-
n.value && (i.value = !0);
|
|
477
|
-
}, 50),
|
|
478
|
-
hideTooltip: I(() => {
|
|
479
|
-
n.value && (i.value = !1);
|
|
480
|
-
}, 50)
|
|
481
|
-
};
|
|
482
|
-
}, Ve = (e, t, n) => {
|
|
483
|
-
let { disabled: i, min: a, max: o, step: c, showTooltip: l, persistent: u, precision: d, sliderSize: f, formatTooltip: p, emitChange: m, resetSize: h, updateDragging: ee, markList: g } = se(je), { tooltip: _, tooltipVisible: v, formatValue: x, displayTooltip: S, hideTooltip: w } = Be(e, p, l), T = X(), E = R(() => `${(e.modelValue - a.value) / (o.value - a.value) * 100}%`), te = R(() => e.vertical ? { bottom: E.value } : { left: E.value }), D = R(() => c.value === "mark" && g.value.length > 0), O = () => {
|
|
484
|
-
t.hovering = !0, S();
|
|
485
|
-
}, ne = () => {
|
|
486
|
-
t.hovering = !1, t.dragging || w();
|
|
487
|
-
}, re = (e) => {
|
|
488
|
-
i.value || (e.preventDefault(), z(e), window.addEventListener("mousemove", B), window.addEventListener("touchmove", B), window.addEventListener("mouseup", V), window.addEventListener("touchend", V), window.addEventListener("contextmenu", V), T.value.focus());
|
|
489
|
-
}, k = (e) => {
|
|
490
|
-
i.value || (t.newPosition = Number.parseFloat(E.value) + e / (o.value - a.value) * 100, H(t.newPosition), m());
|
|
491
|
-
}, A = (t) => {
|
|
492
|
-
if (i.value || !g.value.length) return;
|
|
493
|
-
let n = e.modelValue, r = 2 ** -52, s = Math.abs(t), c;
|
|
494
|
-
if (t > 0) {
|
|
495
|
-
let e = g.value.findIndex((e) => e.point > n + r);
|
|
496
|
-
if (e !== -1) {
|
|
497
|
-
let t = Math.min(e + s - 1, g.value.length - 1);
|
|
498
|
-
c = g.value[t].point;
|
|
499
|
-
}
|
|
500
|
-
} else {
|
|
501
|
-
let e = -1;
|
|
502
|
-
for (let t = g.value.length - 1; t >= 0; t--) if (g.value[t].point < n - r) {
|
|
503
|
-
e = t;
|
|
504
|
-
break;
|
|
505
|
-
}
|
|
506
|
-
if (e !== -1) {
|
|
507
|
-
let t = Math.max(e - (s - 1), 0);
|
|
508
|
-
c = g.value[t].point;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
c !== void 0 && c !== n && (H((c - a.value) / (o.value - a.value) * 100), m());
|
|
512
|
-
}, j = () => {
|
|
513
|
-
D.value ? A(-1) : C(c.value) && k(-c.value);
|
|
514
|
-
}, M = () => {
|
|
515
|
-
D.value ? A(1) : C(c.value) && k(c.value);
|
|
516
|
-
}, P = () => {
|
|
517
|
-
D.value ? A(-4) : C(c.value) && k(-c.value * 4);
|
|
518
|
-
}, F = () => {
|
|
519
|
-
D.value ? A(4) : C(c.value) && k(c.value * 4);
|
|
520
|
-
}, ie = () => {
|
|
521
|
-
i.value || (H(0), m());
|
|
522
|
-
}, I = () => {
|
|
523
|
-
i.value || (H(100), m());
|
|
524
|
-
}, ae = (e) => {
|
|
525
|
-
let t = r(e), n = !0;
|
|
526
|
-
switch (t) {
|
|
527
|
-
case b.left:
|
|
528
|
-
case b.down:
|
|
529
|
-
j();
|
|
530
|
-
break;
|
|
531
|
-
case b.right:
|
|
532
|
-
case b.up:
|
|
533
|
-
M();
|
|
534
|
-
break;
|
|
535
|
-
case b.home:
|
|
536
|
-
ie();
|
|
537
|
-
break;
|
|
538
|
-
case b.end:
|
|
539
|
-
I();
|
|
540
|
-
break;
|
|
541
|
-
case b.pageDown:
|
|
542
|
-
P();
|
|
543
|
-
break;
|
|
544
|
-
case b.pageUp:
|
|
545
|
-
F();
|
|
546
|
-
break;
|
|
547
|
-
default:
|
|
548
|
-
n = !1;
|
|
549
|
-
break;
|
|
550
|
-
}
|
|
551
|
-
n && e.preventDefault();
|
|
552
|
-
}, L = (e) => {
|
|
553
|
-
let t, n;
|
|
554
|
-
return e.type.startsWith("touch") ? (n = e.touches[0].clientY, t = e.touches[0].clientX) : (n = e.clientY, t = e.clientX), {
|
|
555
|
-
clientX: t,
|
|
556
|
-
clientY: n
|
|
557
|
-
};
|
|
558
|
-
}, z = (n) => {
|
|
559
|
-
t.dragging = !0, t.isClick = !0;
|
|
560
|
-
let { clientX: r, clientY: i } = L(n);
|
|
561
|
-
e.vertical ? t.startY = i : t.startX = r, t.startPosition = Number.parseFloat(E.value), t.newPosition = t.startPosition;
|
|
562
|
-
}, B = (n) => {
|
|
563
|
-
if (t.dragging) {
|
|
564
|
-
t.isClick = !1, S(), h();
|
|
565
|
-
let r, { clientX: i, clientY: a } = L(n);
|
|
566
|
-
e.vertical ? (t.currentY = a, r = (t.startY - t.currentY) / f.value * 100) : (t.currentX = i, r = (t.currentX - t.startX) / f.value * 100), t.newPosition = t.startPosition + r, H(t.newPosition);
|
|
567
|
-
}
|
|
568
|
-
}, V = () => {
|
|
569
|
-
t.dragging && (setTimeout(() => {
|
|
570
|
-
t.dragging = !1, t.hovering || w(), t.isClick || H(t.newPosition), m();
|
|
571
|
-
}, 0), window.removeEventListener("mousemove", B), window.removeEventListener("touchmove", B), window.removeEventListener("mouseup", V), window.removeEventListener("touchend", V), window.removeEventListener("contextmenu", V));
|
|
572
|
-
}, H = async (r) => {
|
|
573
|
-
if (r === null || Number.isNaN(+r)) return;
|
|
574
|
-
r = s(r, 0, 100);
|
|
575
|
-
let i;
|
|
576
|
-
if (c.value === "mark") i = g.value.length === 0 ? r <= 50 ? a.value : o.value : g.value.reduce((e, t) => Math.abs(t.position - r) < Math.abs(e.position - r) ? t : e).point;
|
|
577
|
-
else {
|
|
578
|
-
let e = Math.floor((o.value - a.value) / c.value), t = e * c.value / (o.value - a.value) * 100, n = t + (100 - t) / 2;
|
|
579
|
-
if (r < t) {
|
|
580
|
-
let n = t / e, o = Math.round(r / n);
|
|
581
|
-
i = a.value + o * c.value;
|
|
582
|
-
} else i = r < n ? a.value + e * c.value : o.value;
|
|
583
|
-
i = Number.parseFloat(i.toFixed(d.value));
|
|
584
|
-
}
|
|
585
|
-
i !== e.modelValue && n(y, i), !t.dragging && e.modelValue !== t.oldValue && (t.oldValue = e.modelValue), await q(), t.dragging && S(), _.value.updatePopper();
|
|
586
|
-
};
|
|
587
|
-
return ye(() => t.dragging, (e) => {
|
|
588
|
-
ee(e);
|
|
589
|
-
}), N(T, "touchstart", re, { passive: !1 }), {
|
|
590
|
-
disabled: i,
|
|
591
|
-
button: T,
|
|
592
|
-
tooltip: _,
|
|
593
|
-
tooltipVisible: v,
|
|
594
|
-
showTooltip: l,
|
|
595
|
-
persistent: u,
|
|
596
|
-
wrapperStyle: te,
|
|
597
|
-
formatValue: x,
|
|
598
|
-
handleMouseEnter: O,
|
|
599
|
-
handleMouseLeave: ne,
|
|
600
|
-
onButtonDown: re,
|
|
601
|
-
onKeyDown: ae,
|
|
602
|
-
setPosition: H
|
|
603
|
-
};
|
|
604
|
-
}, He = S({
|
|
605
|
-
modelValue: {
|
|
606
|
-
type: Number,
|
|
607
|
-
default: 0
|
|
608
|
-
},
|
|
609
|
-
vertical: Boolean,
|
|
610
|
-
tooltipClass: String,
|
|
611
|
-
placement: {
|
|
612
|
-
type: String,
|
|
613
|
-
values: n,
|
|
614
|
-
default: "top"
|
|
615
|
-
}
|
|
616
|
-
}), Ue = { [y]: (e) => C(e) }, We = ["tabindex"], Ge = /* @__PURE__ */ G({
|
|
617
|
-
name: "ElSliderButton",
|
|
618
|
-
__name: "button",
|
|
619
|
-
props: He,
|
|
620
|
-
emits: Ue,
|
|
621
|
-
setup(e, { expose: t, emit: n }) {
|
|
622
|
-
let r = e, i = n, a = re("slider"), o = pe({
|
|
623
|
-
hovering: !1,
|
|
624
|
-
dragging: !1,
|
|
625
|
-
isClick: !1,
|
|
626
|
-
startX: 0,
|
|
627
|
-
currentX: 0,
|
|
628
|
-
startY: 0,
|
|
629
|
-
currentY: 0,
|
|
630
|
-
startPosition: 0,
|
|
631
|
-
newPosition: 0,
|
|
632
|
-
oldValue: r.modelValue
|
|
633
|
-
}), s = R(() => d.value ? f.value : !1), { disabled: c, button: l, tooltip: u, showTooltip: d, persistent: f, tooltipVisible: p, wrapperStyle: h, formatValue: ee, handleMouseEnter: g, handleMouseLeave: _, onButtonDown: v, onKeyDown: y, setPosition: b } = Ve(r, o, i), { hovering: x, dragging: S } = _e(o);
|
|
634
|
-
return t({
|
|
635
|
-
onButtonDown: v,
|
|
636
|
-
onKeyDown: y,
|
|
637
|
-
setPosition: b,
|
|
638
|
-
hovering: x,
|
|
639
|
-
dragging: S
|
|
640
|
-
}), (e, t) => (Y(), V("div", {
|
|
641
|
-
ref_key: "button",
|
|
642
|
-
ref: l,
|
|
643
|
-
class: J([Q(a).e("button-wrapper"), {
|
|
644
|
-
hover: Q(x),
|
|
645
|
-
dragging: Q(S)
|
|
646
|
-
}]),
|
|
647
|
-
style: ce(Q(h)),
|
|
648
|
-
tabindex: Q(c) ? void 0 : 0,
|
|
649
|
-
onMouseenter: t[0] ||= (...e) => Q(g) && Q(g)(...e),
|
|
650
|
-
onMouseleave: t[1] ||= (...e) => Q(_) && Q(_)(...e),
|
|
651
|
-
onMousedown: t[2] ||= (...e) => Q(v) && Q(v)(...e),
|
|
652
|
-
onFocus: t[3] ||= (...e) => Q(g) && Q(g)(...e),
|
|
653
|
-
onBlur: t[4] ||= (...e) => Q(_) && Q(_)(...e),
|
|
654
|
-
onKeydown: t[5] ||= (...e) => Q(y) && Q(y)(...e)
|
|
655
|
-
}, [W(Q(m), {
|
|
656
|
-
ref_key: "tooltip",
|
|
657
|
-
ref: u,
|
|
658
|
-
visible: Q(p),
|
|
659
|
-
placement: e.placement,
|
|
660
|
-
"fallback-placements": [
|
|
661
|
-
"top",
|
|
662
|
-
"bottom",
|
|
663
|
-
"right",
|
|
664
|
-
"left"
|
|
665
|
-
],
|
|
666
|
-
"stop-popper-mouse-event": !1,
|
|
667
|
-
"popper-class": e.tooltipClass,
|
|
668
|
-
disabled: !Q(d),
|
|
669
|
-
persistent: s.value
|
|
670
|
-
}, {
|
|
671
|
-
content: $(() => [H("span", null, Z(Q(ee)), 1)]),
|
|
672
|
-
default: $(() => [H("div", { class: J([Q(a).e("button"), {
|
|
673
|
-
hover: Q(x),
|
|
674
|
-
dragging: Q(S)
|
|
675
|
-
}]) }, null, 2)]),
|
|
676
|
-
_: 1
|
|
677
|
-
}, 8, [
|
|
678
|
-
"visible",
|
|
679
|
-
"placement",
|
|
680
|
-
"popper-class",
|
|
681
|
-
"disabled",
|
|
682
|
-
"persistent"
|
|
683
|
-
])], 46, We));
|
|
684
|
-
}
|
|
685
|
-
}), Ke = G({
|
|
686
|
-
name: "ElSliderMarker",
|
|
687
|
-
props: S({ mark: {
|
|
688
|
-
type: E([String, Object]),
|
|
689
|
-
default: void 0
|
|
690
|
-
} }),
|
|
691
|
-
setup(e) {
|
|
692
|
-
let t = re("slider"), n = R(() => O(e.mark) ? e.mark : e.mark.label), r = R(() => O(e.mark) ? void 0 : e.mark.style);
|
|
693
|
-
return () => K("div", {
|
|
694
|
-
class: t.e("marks-text"),
|
|
695
|
-
style: r.value
|
|
696
|
-
}, n.value);
|
|
697
|
-
}
|
|
698
|
-
}), qe = [
|
|
699
|
-
"id",
|
|
700
|
-
"role",
|
|
701
|
-
"aria-label",
|
|
702
|
-
"aria-labelledby"
|
|
703
|
-
], Je = { key: 1 }, Ye = i(/* @__PURE__ */ G({
|
|
704
|
-
name: "ElSlider",
|
|
705
|
-
__name: "slider",
|
|
706
|
-
props: Me,
|
|
707
|
-
emits: Pe,
|
|
708
|
-
setup(e, { expose: t, emit: n }) {
|
|
709
|
-
let r = e, i = n, a = re("slider"), { t: o } = ne(), s = pe({
|
|
710
|
-
firstValue: 0,
|
|
711
|
-
secondValue: 0,
|
|
712
|
-
oldValue: 0,
|
|
713
|
-
dragging: !1,
|
|
714
|
-
sliderSize: 1
|
|
715
|
-
}), { elFormItem: c, slider: l, firstButton: u, secondButton: d, sliderDisabled: f, minValue: m, maxValue: h, runwayStyle: ee, barStyle: g, resetSize: v, emitChange: y, onSliderWrapperPrevent: b, onSliderClick: x, onSliderDown: S, onSliderMarkerDown: w, setFirstValue: T, setSecondValue: E } = Le(r, s, i), { stops: te, getStopStyle: D } = Re(r, s, m, h), { inputId: O, isLabeledByFormItem: k } = _(r, { formItemContext: c }), A = p(), j = R(() => r.inputSize || A.value), M = R(() => r.showInput && !r.range && r.step !== "mark"), P = R(() => r.ariaLabel || o("el.slider.defaultLabel", {
|
|
716
|
-
min: r.min,
|
|
717
|
-
max: r.max
|
|
718
|
-
})), F = R(() => r.range ? r.rangeStartLabel || o("el.slider.defaultRangeStartLabel") : P.value), ie = R(() => r.formatValueText ? r.formatValueText(q.value) : `${q.value}`), I = R(() => r.rangeEndLabel || o("el.slider.defaultRangeEndLabel")), ae = R(() => r.formatValueText ? r.formatValueText(le.value) : `${le.value}`), oe = R(() => [
|
|
719
|
-
a.b(),
|
|
720
|
-
a.m(A.value),
|
|
721
|
-
a.is("vertical", r.vertical),
|
|
722
|
-
{ [a.m("with-input")]: M.value }
|
|
723
|
-
]), U = Ie(r);
|
|
724
|
-
ze(r, s, m, h, i, c);
|
|
725
|
-
let G = R(() => C(r.step) ? r.step : 1), K = R(() => {
|
|
726
|
-
let e = C(r.step) ? r.step : 1, t = [
|
|
727
|
-
r.min,
|
|
728
|
-
r.max,
|
|
729
|
-
e
|
|
730
|
-
].map((e) => {
|
|
731
|
-
let t = `${e}`.split(".")[1];
|
|
732
|
-
return t ? t.length : 0;
|
|
733
|
-
});
|
|
734
|
-
return Math.max.apply(null, t);
|
|
735
|
-
}), { sliderWrapper: se } = Fe(r, s, v), { firstValue: q, secondValue: le, sliderSize: ue } = _e(s), de = (e) => {
|
|
736
|
-
s.dragging = e;
|
|
737
|
-
};
|
|
738
|
-
return N(se, "touchstart", b, { passive: !1 }), N(se, "touchmove", b, { passive: !1 }), fe(je, {
|
|
739
|
-
..._e(r),
|
|
740
|
-
sliderSize: ue,
|
|
741
|
-
disabled: f,
|
|
742
|
-
precision: K,
|
|
743
|
-
markList: U,
|
|
744
|
-
emitChange: y,
|
|
745
|
-
resetSize: v,
|
|
746
|
-
updateDragging: de
|
|
747
|
-
}), t({ onSliderClick: x }), (e, t) => (Y(), V("div", {
|
|
748
|
-
id: e.range ? Q(O) : void 0,
|
|
749
|
-
ref_key: "sliderWrapper",
|
|
750
|
-
ref: se,
|
|
751
|
-
class: J(oe.value),
|
|
752
|
-
role: e.range ? "group" : void 0,
|
|
753
|
-
"aria-label": e.range && !Q(k) ? P.value : void 0,
|
|
754
|
-
"aria-labelledby": e.range && Q(k) ? Q(c)?.labelId : void 0
|
|
755
|
-
}, [H("div", {
|
|
756
|
-
ref_key: "slider",
|
|
757
|
-
ref: l,
|
|
758
|
-
class: J([
|
|
759
|
-
Q(a).e("runway"),
|
|
760
|
-
{ "show-input": M.value },
|
|
761
|
-
Q(a).is("disabled", Q(f))
|
|
762
|
-
]),
|
|
763
|
-
style: ce(Q(ee)),
|
|
764
|
-
onMousedown: t[0] ||= (...e) => Q(S) && Q(S)(...e),
|
|
765
|
-
onTouchstartPassive: t[1] ||= (...e) => Q(S) && Q(S)(...e)
|
|
766
|
-
}, [
|
|
767
|
-
H("div", {
|
|
768
|
-
class: J(Q(a).e("bar")),
|
|
769
|
-
style: ce(Q(g))
|
|
770
|
-
}, null, 6),
|
|
771
|
-
W(Ge, {
|
|
772
|
-
id: e.range ? void 0 : Q(O),
|
|
773
|
-
ref_key: "firstButton",
|
|
774
|
-
ref: u,
|
|
775
|
-
"model-value": Q(q),
|
|
776
|
-
vertical: e.vertical,
|
|
777
|
-
"tooltip-class": e.tooltipClass,
|
|
778
|
-
placement: e.placement,
|
|
779
|
-
role: "slider",
|
|
780
|
-
"aria-label": e.range || !Q(k) ? F.value : void 0,
|
|
781
|
-
"aria-labelledby": !e.range && Q(k) ? Q(c)?.labelId : void 0,
|
|
782
|
-
"aria-valuemin": e.min,
|
|
783
|
-
"aria-valuemax": e.range ? Q(le) : e.max,
|
|
784
|
-
"aria-valuenow": Q(q),
|
|
785
|
-
"aria-valuetext": ie.value,
|
|
786
|
-
"aria-orientation": e.vertical ? "vertical" : "horizontal",
|
|
787
|
-
"aria-disabled": Q(f),
|
|
788
|
-
"onUpdate:modelValue": Q(T)
|
|
789
|
-
}, null, 8, [
|
|
790
|
-
"id",
|
|
791
|
-
"model-value",
|
|
792
|
-
"vertical",
|
|
793
|
-
"tooltip-class",
|
|
794
|
-
"placement",
|
|
795
|
-
"aria-label",
|
|
796
|
-
"aria-labelledby",
|
|
797
|
-
"aria-valuemin",
|
|
798
|
-
"aria-valuemax",
|
|
799
|
-
"aria-valuenow",
|
|
800
|
-
"aria-valuetext",
|
|
801
|
-
"aria-orientation",
|
|
802
|
-
"aria-disabled",
|
|
803
|
-
"onUpdate:modelValue"
|
|
804
|
-
]),
|
|
805
|
-
e.range ? (Y(), z(Ge, {
|
|
806
|
-
key: 0,
|
|
807
|
-
ref_key: "secondButton",
|
|
808
|
-
ref: d,
|
|
809
|
-
"model-value": Q(le),
|
|
810
|
-
vertical: e.vertical,
|
|
811
|
-
"tooltip-class": e.tooltipClass,
|
|
812
|
-
placement: e.placement,
|
|
813
|
-
role: "slider",
|
|
814
|
-
"aria-label": I.value,
|
|
815
|
-
"aria-valuemin": Q(q),
|
|
816
|
-
"aria-valuemax": e.max,
|
|
817
|
-
"aria-valuenow": Q(le),
|
|
818
|
-
"aria-valuetext": ae.value,
|
|
819
|
-
"aria-orientation": e.vertical ? "vertical" : "horizontal",
|
|
820
|
-
"aria-disabled": Q(f),
|
|
821
|
-
"onUpdate:modelValue": Q(E)
|
|
822
|
-
}, null, 8, [
|
|
823
|
-
"model-value",
|
|
824
|
-
"vertical",
|
|
825
|
-
"tooltip-class",
|
|
826
|
-
"placement",
|
|
827
|
-
"aria-label",
|
|
828
|
-
"aria-valuemin",
|
|
829
|
-
"aria-valuemax",
|
|
830
|
-
"aria-valuenow",
|
|
831
|
-
"aria-valuetext",
|
|
832
|
-
"aria-orientation",
|
|
833
|
-
"aria-disabled",
|
|
834
|
-
"onUpdate:modelValue"
|
|
835
|
-
])) : B("v-if", !0),
|
|
836
|
-
e.showStops ? (Y(), V("div", Je, [(Y(!0), V(L, null, me(Q(te), (e, t) => (Y(), V("div", {
|
|
837
|
-
key: t,
|
|
838
|
-
class: J(Q(a).e("stop")),
|
|
839
|
-
style: ce(Q(D)(e))
|
|
840
|
-
}, null, 6))), 128))])) : B("v-if", !0),
|
|
841
|
-
Q(U).length > 0 ? (Y(), V(L, { key: 2 }, [H("div", null, [(Y(!0), V(L, null, me(Q(U), (e, t) => (Y(), V("div", {
|
|
842
|
-
key: t,
|
|
843
|
-
style: ce(Q(D)(e.position)),
|
|
844
|
-
class: J([Q(a).e("stop"), Q(a).e("marks-stop")])
|
|
845
|
-
}, null, 6))), 128))]), H("div", { class: J(Q(a).e("marks")) }, [(Y(!0), V(L, null, me(Q(U), (e, t) => (Y(), z(Q(Ke), {
|
|
846
|
-
key: t,
|
|
847
|
-
mark: e.mark,
|
|
848
|
-
style: ce(Q(D)(e.position)),
|
|
849
|
-
onMousedown: Ce((t) => Q(w)(e.position), ["stop"])
|
|
850
|
-
}, null, 8, [
|
|
851
|
-
"mark",
|
|
852
|
-
"style",
|
|
853
|
-
"onMousedown"
|
|
854
|
-
]))), 128))], 2)], 64)) : B("v-if", !0)
|
|
855
|
-
], 38), M.value ? (Y(), z(Q(Ae), {
|
|
856
|
-
key: 0,
|
|
857
|
-
ref: "input",
|
|
858
|
-
"model-value": Q(q),
|
|
859
|
-
class: J(Q(a).e("input")),
|
|
860
|
-
step: G.value,
|
|
861
|
-
disabled: Q(f),
|
|
862
|
-
controls: e.showInputControls,
|
|
863
|
-
min: e.min,
|
|
864
|
-
max: e.max,
|
|
865
|
-
precision: K.value,
|
|
866
|
-
size: j.value,
|
|
867
|
-
"onUpdate:modelValue": Q(T),
|
|
868
|
-
onChange: Q(y)
|
|
869
|
-
}, null, 8, [
|
|
870
|
-
"model-value",
|
|
871
|
-
"class",
|
|
872
|
-
"step",
|
|
873
|
-
"disabled",
|
|
874
|
-
"controls",
|
|
875
|
-
"min",
|
|
876
|
-
"max",
|
|
877
|
-
"precision",
|
|
878
|
-
"size",
|
|
879
|
-
"onUpdate:modelValue",
|
|
880
|
-
"onChange"
|
|
881
|
-
])) : B("v-if", !0)], 10, qe));
|
|
882
|
-
}
|
|
883
|
-
})), Xe = { class: "RadarShortTerm" }, Ze = { class: "RadarShortTerm-setting-panel" }, Qe = { class: "display-setting" }, $e = { class: "setting-row setting-row-pile" }, et = { class: "setting-pile-options" }, tt = { class: "RadarShortTerm-table" }, nt = { class: "table-body" }, rt = ["onClick"], it = { class: "name" }, at = ["onClick"], ot = {
|
|
884
|
-
key: 0,
|
|
885
|
-
style: { color: "red" }
|
|
886
|
-
}, st = { class: "pile-panel" }, ct = {
|
|
887
|
-
key: 0,
|
|
888
|
-
class: "pile-body"
|
|
889
|
-
}, lt = {
|
|
890
|
-
key: 1,
|
|
891
|
-
class: "pile-empty"
|
|
892
|
-
}, ut = { class: "RadarShortTerm-timeline" }, dt = ["title"], ft = { class: "timeline-slider-wrap" }, pt = { class: "timeline-time-label" }, mt = /* @__PURE__ */ M(/* @__PURE__ */ G({
|
|
893
|
-
__name: "RadarShortTerm",
|
|
894
|
-
props: {
|
|
895
|
-
appKey: {
|
|
896
|
-
type: String,
|
|
897
|
-
default: ""
|
|
898
|
-
},
|
|
899
|
-
appSalt: {
|
|
900
|
-
type: String,
|
|
901
|
-
default: ""
|
|
902
|
-
},
|
|
903
|
-
baseHttp: {
|
|
904
|
-
type: String,
|
|
905
|
-
default: ""
|
|
906
|
-
},
|
|
907
|
-
ids: {
|
|
908
|
-
type: Object,
|
|
909
|
-
default: () => ({})
|
|
910
|
-
}
|
|
911
|
-
},
|
|
912
|
-
emits: [
|
|
913
|
-
"close",
|
|
914
|
-
"addImage",
|
|
915
|
-
"clearImg",
|
|
916
|
-
"addDataTitle",
|
|
917
|
-
"removeDataTitle",
|
|
918
|
-
"showRadarLegend"
|
|
919
|
-
],
|
|
920
|
-
setup(e, { emit: t }) {
|
|
921
|
-
let n = e, r = t, i = X(!0), s = X(!1), l = X(0), u = X(null), d = X([]), f = X({}), p = X({}), m = X({}), h = X("");
|
|
922
|
-
ue(() => {
|
|
923
|
-
ee();
|
|
924
|
-
}), le(() => {
|
|
925
|
-
M();
|
|
926
|
-
});
|
|
927
|
-
let ee = async () => {
|
|
928
|
-
let e = await g(), t = await k({
|
|
929
|
-
appKey: n.appKey,
|
|
930
|
-
appSalt: n.appSalt,
|
|
931
|
-
id: n.ids.radar.id,
|
|
932
|
-
variables: {},
|
|
933
|
-
baseHttp: n.baseHttp,
|
|
934
|
-
reqType: n.ids.radar.reqType,
|
|
935
|
-
isFormData: n.ids.radar.isFormData
|
|
936
|
-
});
|
|
937
|
-
console.log("雷达", t.data.result), m.value = y(t.data.result), l.value = 0, i.value && setTimeout(() => {
|
|
938
|
-
j(0);
|
|
939
|
-
}, 1e3), d.value = e.map((e) => {
|
|
940
|
-
let t = T(e), n = E(e.zhflds || []);
|
|
941
|
-
return {
|
|
942
|
-
name: e.name,
|
|
943
|
-
tags: te(t),
|
|
944
|
-
piles: n
|
|
945
|
-
};
|
|
946
|
-
}), w();
|
|
947
|
-
}, g = async () => {
|
|
948
|
-
let e = await k({
|
|
949
|
-
appKey: n.appKey,
|
|
950
|
-
appSalt: n.appSalt,
|
|
951
|
-
id: n.ids.shortTerm.id,
|
|
952
|
-
variables: {},
|
|
953
|
-
baseHttp: n.baseHttp,
|
|
954
|
-
reqType: n.ids.shortTerm.reqType,
|
|
955
|
-
isFormData: n.ids.shortTerm.isFormData
|
|
956
|
-
});
|
|
957
|
-
return console.log("短时预报", e.data.result.ds), e.data.result.ds || [];
|
|
958
|
-
}, _ = (e) => {
|
|
959
|
-
let t = String(e || "").split(",").map((e) => Number(e.trim()));
|
|
960
|
-
return {
|
|
961
|
-
lngStart: t[0],
|
|
962
|
-
lngEnd: t[1],
|
|
963
|
-
latStart: t[2],
|
|
964
|
-
latEnd: t[3]
|
|
965
|
-
};
|
|
966
|
-
}, y = (e) => {
|
|
967
|
-
let t = Array.isArray(e?.ds) ? e : e?.ds, n = Array.isArray(t?.ds) ? t.ds : [];
|
|
968
|
-
n = [...n].reverse();
|
|
969
|
-
let r = _(n[0]?.extendstr || "");
|
|
970
|
-
return n.length ? {
|
|
971
|
-
ds: n,
|
|
972
|
-
httpurl: t?.httpUrl || t?.httpurl || "",
|
|
973
|
-
...r
|
|
974
|
-
} : {
|
|
975
|
-
ds: [],
|
|
976
|
-
httpurl: "",
|
|
977
|
-
lngStart: null,
|
|
978
|
-
lngEnd: null,
|
|
979
|
-
latStart: null,
|
|
980
|
-
latEnd: null
|
|
981
|
-
};
|
|
982
|
-
}, b = R(() => O(d.value, (e) => D(e.tags))), x = R(() => m.value?.ds || []), S = R(() => x.value.map((e) => {
|
|
983
|
-
let t = new Date(e.focarcast_time);
|
|
984
|
-
return `${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}`;
|
|
985
|
-
})), C = R(() => ({
|
|
986
|
-
httpurl: m.value?.httpurl || "",
|
|
987
|
-
lngStart: m.value?.lngStart,
|
|
988
|
-
latStart: m.value?.latStart,
|
|
989
|
-
lngEnd: m.value?.lngEnd,
|
|
990
|
-
latEnd: m.value?.latEnd
|
|
991
|
-
})), w = () => {
|
|
992
|
-
let e = b.value.find((e) => D(e.tags)), t = {}, n = {};
|
|
993
|
-
e && (t[e.name] = !0, n[e.name] = !0), f.value = t, p.value = n;
|
|
994
|
-
}, T = (e) => {
|
|
995
|
-
let t = e.zhflds || [];
|
|
996
|
-
return {
|
|
997
|
-
iswarnpre1h: t.some((e) => e?.iswarnpre1h === 1) ? 1 : 0,
|
|
998
|
-
iswarnpre2h: t.some((e) => e?.iswarnpre2h === 1) ? 1 : 0,
|
|
999
|
-
iswarnpre3h: t.some((e) => e?.iswarnpre3h === 1) ? 1 : 0
|
|
1000
|
-
};
|
|
1001
|
-
}, E = (e) => O((e || []).map((e) => ({
|
|
1002
|
-
pileNo: `${e.type || ""}${e.Name || ""}`,
|
|
1003
|
-
isWarn: e?.iswarnpre1h === 1 || e?.iswarnpre2h === 1 || e?.iswarnpre3h === 1,
|
|
1004
|
-
rain1h: e?.rain_1h ?? "-",
|
|
1005
|
-
rain2h: e?.rain_2h ?? "-",
|
|
1006
|
-
rain3h: e?.rain_3h ?? "-"
|
|
1007
|
-
})), (e) => e.isWarn), te = (e) => [
|
|
1008
|
-
{
|
|
1009
|
-
label: "未来R1h",
|
|
1010
|
-
warn: e.iswarnpre1h === 1
|
|
1011
|
-
},
|
|
1012
|
-
{
|
|
1013
|
-
label: "未来R2h",
|
|
1014
|
-
warn: e.iswarnpre2h === 1
|
|
1015
|
-
},
|
|
1016
|
-
{
|
|
1017
|
-
label: "未来R3h",
|
|
1018
|
-
warn: e.iswarnpre3h === 1
|
|
1019
|
-
}
|
|
1020
|
-
], D = (e) => e.some((e) => e.warn), O = (e, t) => [...e].sort((e, n) => Number(t(n)) - Number(t(e))), ne = (e) => e.filter((e) => e.isWarn).length, re = (e) => e ? {
|
|
1021
|
-
alt: "",
|
|
1022
|
-
imgUrl: `${C.value.httpurl}${e.file_name}`,
|
|
1023
|
-
lngStart: C.value.lngStart,
|
|
1024
|
-
latStart: C.value.latStart,
|
|
1025
|
-
lngEnd: C.value.lngEnd,
|
|
1026
|
-
latEnd: C.value.latEnd,
|
|
1027
|
-
opacity: 1,
|
|
1028
|
-
zIndex: 1e3,
|
|
1029
|
-
otherData: { imgId: "radar_RadarShortTerm" }
|
|
1030
|
-
} : null, j = (e) => {
|
|
1031
|
-
let t = x.value[e], n = { imgArr: [re(t)] };
|
|
1032
|
-
console.log(n), r("addImage", {
|
|
1033
|
-
removeImg: "radar_RadarShortTerm",
|
|
1034
|
-
data: n
|
|
1035
|
-
}), h.value && r("removeDataTitle", h.value), h.value = "雷达观测时间:" + A(t.focarcast_time).format("YYYY-MM-DD HH:mm "), console.log(h.value), r("addDataTitle", h.value), r("showRadarLegend", !0);
|
|
1036
|
-
}, M = () => {
|
|
1037
|
-
u.value &&= (clearInterval(u.value), null);
|
|
1038
|
-
}, N = () => {
|
|
1039
|
-
s.value = !1, M();
|
|
1040
|
-
}, P = () => {
|
|
1041
|
-
S.value.length <= 1 || (s.value = !0, M(), u.value = setInterval(() => {
|
|
1042
|
-
l.value = (l.value + 1) % S.value.length;
|
|
1043
|
-
}, 1e3));
|
|
1044
|
-
}, F = () => {
|
|
1045
|
-
if (s.value) {
|
|
1046
|
-
N();
|
|
1047
|
-
return;
|
|
1048
|
-
}
|
|
1049
|
-
P();
|
|
1050
|
-
};
|
|
1051
|
-
ye(l, (e) => {
|
|
1052
|
-
j(e);
|
|
1053
|
-
});
|
|
1054
|
-
let ie = () => {
|
|
1055
|
-
N();
|
|
1056
|
-
}, I = () => {
|
|
1057
|
-
if (!i.value) {
|
|
1058
|
-
r("clearImg", "radar_RadarShortTerm"), r("removeDataTitle", h.value), r("showRadarLegend", !1), N();
|
|
1059
|
-
return;
|
|
1060
|
-
}
|
|
1061
|
-
j(l.value);
|
|
1062
|
-
}, oe = (e) => {
|
|
1063
|
-
let t = !!f.value[e];
|
|
1064
|
-
f.value[e] = !t, t || (p.value[e] = !0);
|
|
1065
|
-
}, G = (e) => {
|
|
1066
|
-
p.value[e] = !p.value[e];
|
|
1067
|
-
}, K = () => {
|
|
1068
|
-
r("close", "RadarShortTerm");
|
|
1069
|
-
};
|
|
1070
|
-
return (e, t) => {
|
|
1071
|
-
let n = ae, r = v, u = Ye;
|
|
1072
|
-
return Y(), V("div", Xe, [
|
|
1073
|
-
H("div", { class: "RadarShortTerm-head" }, [H("div", { class: "RadarShortTerm-head-top" }, [t[2] ||= H("div", null, "雷达短临预报", -1), H("div", { class: "head-actions" }, [H("div", {
|
|
1074
|
-
class: "closeBtn",
|
|
1075
|
-
onClick: K,
|
|
1076
|
-
title: "关闭"
|
|
1077
|
-
})])]), t[3] ||= H("img", {
|
|
1078
|
-
class: "RadarShortTerm-head-line",
|
|
1079
|
-
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbsAAAASBAMAAAAwI22/AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAwUExURQAAAAem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/5bu5GYAAAAPdFJOUwAFwAwc2M8ULQYDn/hGXGnV2UoAAAGZSURBVEjH7ZM/S8NAGId/JYGmmeLspptThurk0CHWRXGo0Nk/S50y6CYSHMRF7Efo4uQXEIpbwUnM6OhnEIeChXjv5ZLLXdLtLCX68vDCe0eGJ7/3AJN1VcL+UImB/SruVJwYTqSAW5V3LLyaPR1c+IIdH12OPZiLcyTAjccZEdccZ0Nn4bXpC3KpCuFu5tkdziX3FJxBSBZZdFk9HempCduMk4xSitJTpOgJSSIPrx10YAUB0tYOwrQ1g12k7ZyODIYXZmQpppLV26rtbDFOXVhua2Fn7WTWwUEyAe5Zc2hiLWTTC3jjk8Hw+jrSM9/Z8raKOAtZVmyr9jbpee4lU9hvSUStw6YvOpqwiXlK9d8IL0Oq5tuqvc3KLMs7q9uyCC0y22aKvDVp4u2SjnJ1c+Wecg7h9gV4CFV8NHpEaw7yF2wVGcIa6OBx/Ax3PI6pRWx6Am98alBbpSODNVTxgAbQUpF3KeVv0s80xMUow8N//YVaqWEV9BJDdby2PBUZ1/te0uU0YzeLa623jjrrvaLOep/+str9ACyAtv25BhHcAAAAAElFTkSuQmCC",
|
|
1080
|
-
alt: ""
|
|
1081
|
-
}, null, -1)]),
|
|
1082
|
-
H("div", Ze, [H("div", Qe, [H("div", $e, [t[5] ||= H("span", { class: "setting-label" }, "雷达展示:", -1), H("div", et, [W(n, {
|
|
1083
|
-
modelValue: i.value,
|
|
1084
|
-
"onUpdate:modelValue": t[0] ||= (e) => i.value = e,
|
|
1085
|
-
class: "pile-checkbox",
|
|
1086
|
-
onChange: I
|
|
1087
|
-
}, {
|
|
1088
|
-
default: $(() => [...t[4] ||= [U(" 显示 ", -1)]]),
|
|
1089
|
-
_: 1
|
|
1090
|
-
}, 8, ["modelValue"])])])])]),
|
|
1091
|
-
H("div", tt, [t[8] ||= H("div", { class: "table-head" }, [
|
|
1092
|
-
H("span", null, "高速名称"),
|
|
1093
|
-
H("span", null, "状态要素"),
|
|
1094
|
-
H("span", { class: "head-arrow" })
|
|
1095
|
-
], -1), H("div", nt, [(Y(!0), V(L, null, me(b.value, (e) => (Y(), V("div", {
|
|
1096
|
-
class: "table-row",
|
|
1097
|
-
key: e.name
|
|
1098
|
-
}, [
|
|
1099
|
-
H("div", {
|
|
1100
|
-
class: "table-row-main",
|
|
1101
|
-
onClick: (t) => oe(e.name)
|
|
1102
|
-
}, [
|
|
1103
|
-
H("span", it, Z(e.name), 1),
|
|
1104
|
-
H("div", { class: J(["status-tags", { "has-warn": D(e.tags) }]) }, [(Y(!0), V(L, null, me(e.tags, (t) => (Y(), V("span", {
|
|
1105
|
-
class: J(["status-tag", { warn: t.warn }]),
|
|
1106
|
-
key: `${e.name}-${t.label}`
|
|
1107
|
-
}, [H("span", null, Z(t.label), 1)], 2))), 128))], 2),
|
|
1108
|
-
H("span", {
|
|
1109
|
-
class: J(["expand-arrow", { expanded: f.value[e.name] }]),
|
|
1110
|
-
"aria-hidden": "true"
|
|
1111
|
-
}, [W(r, null, {
|
|
1112
|
-
default: $(() => [W(Q(c))]),
|
|
1113
|
-
_: 1
|
|
1114
|
-
})], 2)
|
|
1115
|
-
], 8, rt),
|
|
1116
|
-
xe(H("div", {
|
|
1117
|
-
class: "pile-title",
|
|
1118
|
-
onClick: (t) => G(e.name)
|
|
1119
|
-
}, [H("span", null, [t[6] ||= U(" 桩号数据 ", -1), ne(e.piles) > 0 ? (Y(), V("span", ot, " (报警数量:" + Z(ne(e.piles)) + "个)", 1)) : B("", !0)]), H("span", { class: J(["panel-arrow", { expanded: p.value[e.name] }]) }, [W(r, null, {
|
|
1120
|
-
default: $(() => [W(Q(c))]),
|
|
1121
|
-
_: 1
|
|
1122
|
-
})], 2)], 8, at), [[ve, f.value[e.name]]]),
|
|
1123
|
-
xe(H("div", st, [t[7] ||= H("div", { class: "pile-head" }, [
|
|
1124
|
-
H("span", null, "桩号"),
|
|
1125
|
-
H("span", null, "未来R1h"),
|
|
1126
|
-
H("span", null, "未来R2h"),
|
|
1127
|
-
H("span", null, "未来R3h")
|
|
1128
|
-
], -1), e.piles.length ? (Y(), V("div", ct, [(Y(!0), V(L, null, me(e.piles, (e) => (Y(), V("div", {
|
|
1129
|
-
class: J(["pile-row", { "is-warn": e.isWarn }]),
|
|
1130
|
-
key: e.pileNo
|
|
1131
|
-
}, [
|
|
1132
|
-
H("span", null, Z(e.pileNo), 1),
|
|
1133
|
-
H("span", null, Z(e.rain1h), 1),
|
|
1134
|
-
H("span", null, Z(e.rain2h), 1),
|
|
1135
|
-
H("span", null, Z(e.rain3h), 1)
|
|
1136
|
-
], 2))), 128))])) : (Y(), V("div", lt, "暂无数据"))], 512), [[ve, f.value[e.name] && p.value[e.name]]])
|
|
1137
|
-
]))), 128))])]),
|
|
1138
|
-
xe(H("div", ut, [H("button", {
|
|
1139
|
-
type: "button",
|
|
1140
|
-
class: "timeline-play-btn",
|
|
1141
|
-
title: s.value ? "暂停" : "播放",
|
|
1142
|
-
onClick: F
|
|
1143
|
-
}, [W(r, null, {
|
|
1144
|
-
default: $(() => [s.value ? (Y(), z(Q(a), { key: 0 })) : (Y(), z(Q(o), { key: 1 }))]),
|
|
1145
|
-
_: 1
|
|
1146
|
-
})], 8, dt), H("div", ft, [H("span", pt, Z(S.value[l.value] || ""), 1), W(u, {
|
|
1147
|
-
modelValue: l.value,
|
|
1148
|
-
"onUpdate:modelValue": t[1] ||= (e) => l.value = e,
|
|
1149
|
-
min: 0,
|
|
1150
|
-
max: Math.max(0, S.value.length - 1),
|
|
1151
|
-
step: 1,
|
|
1152
|
-
"show-tooltip": !1,
|
|
1153
|
-
onChange: ie
|
|
1154
|
-
}, null, 8, ["modelValue", "max"])])], 512), [[ve, i.value]])
|
|
1155
|
-
]);
|
|
1156
|
-
};
|
|
1157
|
-
}
|
|
1158
|
-
}), [["__scopeId", "data-v-3d211c10"]]);
|
|
1159
|
-
//#endregion
|
|
1160
|
-
export { mt as t };
|