hydro-graph 1.0.42 → 1.0.44

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.
@@ -1,24 +1,24 @@
1
- import { ref as ie, watch as Ie, nextTick as Oe, onMounted as ln, resolveComponent as _, resolveDirective as on, withDirectives as xe, openBlock as H, createElementBlock as Z, createTextVNode as ke, toDisplayString as se, vShow as Fe, createBlock as X, createCommentVNode as K, Fragment as Ee, renderList as De, normalizeStyle as G, withCtx as W, createElementVNode as q, createVNode as de, unref as Ce, normalizeClass as rn, defineComponent as sn, computed as Te } from "vue";
2
- import * as ze from "echarts/core";
3
- import { LineChart as dn, BarChart as cn } from "echarts/charts";
4
- import { TooltipComponent as fn, GridComponent as un, LegendComponent as hn, DataZoomComponent as pn } from "echarts/components";
5
- import { LabelLayout as An } from "echarts/features";
6
- import { CanvasRenderer as xn } from "echarts/renderers";
7
- import O from "dayjs";
8
- import Le from "html2canvas";
9
- import { ElMessage as yn, ElCheckbox as gn, ElIcon as mn, ElDropdown as vn, ElDropdownMenu as bn, ElDropdownItem as En } from "element-plus";
10
- import { ArrowDown as Ne } from "@element-plus/icons-vue";
11
- function Mn() {
12
- let o = (/* @__PURE__ */ new Date()).getTime();
13
- return window.performance && typeof window.performance.now == "function" && (o += performance.now()), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
1
+ import { ref as fe, watch as Ce, nextTick as Te, onMounted as dn, resolveComponent as oe, resolveDirective as cn, withDirectives as me, openBlock as V, createElementBlock as ee, createTextVNode as ze, toDisplayString as ue, vShow as Le, createBlock as Z, createCommentVNode as _, Fragment as Se, renderList as Ne, normalizeStyle as W, withCtx as q, createElementVNode as te, createVNode as he, unref as Be, normalizeClass as fn, defineComponent as un, computed as Ye } from "vue";
2
+ import * as Re from "echarts/core";
3
+ import { LineChart as hn, BarChart as pn } from "echarts/charts";
4
+ import { TooltipComponent as An, GridComponent as yn, LegendComponent as xn, DataZoomComponent as gn } from "echarts/components";
5
+ import { LabelLayout as mn } from "echarts/features";
6
+ import { CanvasRenderer as vn } from "echarts/renderers";
7
+ import S from "dayjs";
8
+ import Ue from "html2canvas";
9
+ import { ElMessage as bn, ElCheckbox as En, ElIcon as Mn, ElDropdown as wn, ElDropdownMenu as Sn, ElDropdownItem as In } from "element-plus";
10
+ import { ArrowDown as He } from "@element-plus/icons-vue";
11
+ function On() {
12
+ let l = (/* @__PURE__ */ new Date()).getTime();
13
+ return window.performance && typeof window.performance.now == "function" && (l += performance.now()), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
14
14
  /[xy]/g,
15
- function(N) {
16
- const A = (o + Math.random() * 16) % 16 | 0;
17
- return o = Math.floor(o / 16), (N == "x" ? A : A & 3 | 8).toString(16);
15
+ function(Y) {
16
+ const h = (l + Math.random() * 16) % 16 | 0;
17
+ return l = Math.floor(l / 16), (Y == "x" ? h : h & 3 | 8).toString(16);
18
18
  }
19
19
  );
20
20
  }
21
- const Be = [
21
+ const Ve = [
22
22
  "#E3A8F7",
23
23
  "#5C2D91",
24
24
  "#8AE2C2",
@@ -72,20 +72,20 @@ const Be = [
72
72
  "#00B4DB",
73
73
  "#0083B0"
74
74
  ];
75
- function ye(o) {
76
- let m = /^(\d{4})-(\d{2})-(\d{2}) ([01]\d|2[0-3]):[0-5]\d$/, N = /^(\d{2})-(\d{2}) ([01]\d|2[0-3]):[0-5]\d$/, A = /^(\d{4})-(\d{2})-(\d{2})$/;
77
- return m.test(o) || N.test(o) || A.test(o);
75
+ function ve(l) {
76
+ let g = /^(\d{4})-(\d{2})-(\d{2}) ([01]\d|2[0-3]):[0-5]\d$/, Y = /^(\d{2})-(\d{2}) ([01]\d|2[0-3]):[0-5]\d$/, h = /^(\d{4})-(\d{2})-(\d{2})$/;
77
+ return g.test(l) || Y.test(l) || h.test(l);
78
78
  }
79
- function D(o, m, N) {
80
- let A = "";
81
- return m - o <= 1 ? A = 0.1 : m - o <= 5 ? A = 0.5 : m - o <= 10 ? A = 1 : m - o <= 25 ? A = 2.5 : m - o <= 50 ? A = 5 : m - o <= 100 ? A = 10 : m - o <= 250 ? A = 25 : m - o <= 500 ? A = 50 : m - o <= 1e3 ? A = 100 : m - o <= 2500 ? A = 250 : m - o <= 5e3 ? A = 500 : m - o <= 1e4 ? A = 1e3 : m - o <= 2e4 ? A = 2e3 : m - o <= 3e4 ? A = 3e3 : m - o <= 4e4 ? A = 4e3 : m - o <= 5e4 ? A = 5e3 : m - o <= 6e4 ? A = 6e3 : m - o <= 7e4 ? A = 7e3 : m - o <= 8e4 ? A = 8e3 : m - o <= 9e4 ? A = 9e3 : m - o <= 1e5 ? A = 1e4 : m - o <= 11e4 ? A = 11e3 : m - o <= 12e4 ? A = 12e3 : m - o <= 13e4 ? A = 13e3 : m - o <= 14e4 ? A = 14e3 : m - o <= 15e4 ? A = 15e3 : m - o <= 16e4 ? A = 16e3 : m - o <= 17e4 ? A = 17e3 : m - o <= 18e4 ? A = 18e3 : m - o <= 19e4 ? A = 19e3 : m - o <= 2e5 && (A = 2e4), N == 1 && (A = A * 2), A;
79
+ function C(l, g, Y) {
80
+ let h = "";
81
+ return g - l <= 1 ? h = 0.1 : g - l <= 5 ? h = 0.5 : g - l <= 10 ? h = 1 : g - l <= 25 ? h = 2.5 : g - l <= 50 ? h = 5 : g - l <= 100 ? h = 10 : g - l <= 250 ? h = 25 : g - l <= 500 ? h = 50 : g - l <= 1e3 ? h = 100 : g - l <= 2500 ? h = 250 : g - l <= 5e3 ? h = 500 : g - l <= 1e4 ? h = 1e3 : g - l <= 2e4 ? h = 2e3 : g - l <= 3e4 ? h = 3e3 : g - l <= 4e4 ? h = 4e3 : g - l <= 5e4 ? h = 5e3 : g - l <= 6e4 ? h = 6e3 : g - l <= 7e4 ? h = 7e3 : g - l <= 8e4 ? h = 8e3 : g - l <= 9e4 ? h = 9e3 : g - l <= 1e5 ? h = 1e4 : g - l <= 11e4 ? h = 11e3 : g - l <= 12e4 ? h = 12e3 : g - l <= 13e4 ? h = 13e3 : g - l <= 14e4 ? h = 14e3 : g - l <= 15e4 ? h = 15e3 : g - l <= 16e4 ? h = 16e3 : g - l <= 17e4 ? h = 17e3 : g - l <= 18e4 ? h = 18e3 : g - l <= 19e4 ? h = 19e3 : g - l <= 2e5 && (h = 2e4), Y == 1 && (h = h * 2), h;
82
82
  }
83
- function ee(o) {
84
- if (isNaN(o))
83
+ function le(l) {
84
+ if (isNaN(l))
85
85
  return "";
86
- var m = parseFloat(o);
87
- if (m > 1) {
88
- for (var N = 0, A = [
86
+ var g = parseFloat(l);
87
+ if (g > 1) {
88
+ for (var Y = 0, h = [
89
89
  1,
90
90
  10,
91
91
  100,
@@ -96,54 +96,54 @@ function ee(o) {
96
96
  1e7,
97
97
  1e8,
98
98
  1e9
99
- ], a = 0; a < A.length; a++)
100
- m >= A[a] && m < A[a + 1] && (N = A[a]);
101
- if (N == 0)
102
- return m.toString();
103
- var M = Math.round(m / N * 100) / 100;
104
- return M = M * N, M >= 100 ? M.toFixed(0) : M >= 10 ? M.toFixed(1) : M.toFixed(2);
99
+ ], n = 0; n < h.length; n++)
100
+ g >= h[n] && g < h[n + 1] && (Y = h[n]);
101
+ if (Y == 0)
102
+ return g.toString();
103
+ var M = Math.round(g / Y * 100) / 100;
104
+ return M = M * Y, M >= 100 ? M.toFixed(0) : M >= 10 ? M.toFixed(1) : M.toFixed(2);
105
105
  } else {
106
- if (m >= 0)
107
- return m.toFixed(3);
108
- if (m < 0)
109
- return "-" + ee(Math.abs(m));
106
+ if (g >= 0)
107
+ return g.toFixed(3);
108
+ if (g < 0)
109
+ return "-" + le(Math.abs(g));
110
110
  }
111
111
  }
112
- function Ye(o, m, N) {
113
- const A = [];
114
- let a = new Date(o);
115
- for (; a <= m; ) {
116
- const M = a.getMinutes();
117
- M % N === 0 && A.push(O(new Date(a)).format("YYYY-MM-DD HH:mm")), a.setMinutes(M + 1);
112
+ function Qe(l, g, Y) {
113
+ const h = [];
114
+ let n = new Date(l);
115
+ for (; n <= g; ) {
116
+ const M = n.getMinutes();
117
+ M % Y === 0 && h.push(S(new Date(n)).format("YYYY-MM-DD HH:mm")), n.setMinutes(M + 1);
118
118
  }
119
- return A;
119
+ return h;
120
120
  }
121
- function wn(o, m) {
122
- o = o.sort((a, M) => Date.parse(a) - Date.parse(M));
123
- let N, A = [];
124
- for (let a = 0; a < o.length; a++) {
125
- a == 0 && (N = o[a]);
126
- let M = O(o[a]).add(m, "minute").format("YYYY-MM-DD HH:mm");
127
- o.includes(M) || (A.push({ startTm: N, endTm: o[a] }), a + 1 < o.length && (N = o[a + 1]));
121
+ function Fn(l, g) {
122
+ l = l.sort((n, M) => Date.parse(n) - Date.parse(M));
123
+ let Y, h = [];
124
+ for (let n = 0; n < l.length; n++) {
125
+ n == 0 && (Y = l[n]);
126
+ let M = S(l[n]).add(g, "minute").format("YYYY-MM-DD HH:mm");
127
+ l.includes(M) || (h.push({ startTm: Y, endTm: l[n] }), n + 1 < l.length && (Y = l[n + 1]));
128
128
  }
129
- return A;
129
+ return h;
130
130
  }
131
- const Sn = (o) => new Promise((m) => {
131
+ const kn = (l) => new Promise((g) => {
132
132
  setTimeout(() => {
133
- m({ statusCode: 200, data: o.rzw * 1e3 });
133
+ g({ statusCode: 200, data: l.rzw * 1e3 });
134
134
  }, 100);
135
- }), In = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAk1BMVEUAAAAyMjIzMzMzMzMzMzMzMzMyMjIzMzMzMzMzMzM3NzcyMjIzMzMyMjIzMzMzMzMzMzMzMzMzMzMyMjIzMzMyMjIzMzMzMzMzMzMzMzMyMjIzMzMzMzMzMzMzMzMyMjIzMzMyMjIzMzM0NDQzMzMzMzMzMzMzMzMzMzMzMzM0NDQzMzMzMzMzMzMyMjI6OjozMzMnMcQ8AAAAMHRSTlMAgprMx7VSMqV6CWbkjtXRv5RiD/hEOe91cSng21w/Lq6piBwX6mtXTUkg9J68JAbdlNjNAAAFP0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LxDBNg1poQyEIiFriFbgjyDnTlgogUwkZhVdMmAfmsJCOZeILFlH6C2iL5RQILIOlSy8RfSFcgVF/GFf+jXCHGVARFQoF1kQERXKaSZEBIVSzoYIvtzZ+i0i1M+EiGANPsuCSJEE/HwRYU4Z/HSRvlNy9KdK6UQUTMSJUp+kExoxISdL5RAxHidHf9Z0gIMVTo7+PNMBjro4OfozppSaDxhOlDs6RDsIJ0d/WpROgw4z5EQp0QFapjg5+lOlQzSxcXL0p0IpjRUw6S7A+kGPM0GyEPmN3jLNV3lknE3kzOLXIW+/MJB5fkN5/CNb34QMrjn9CsIHysnJycnJycnJycnJycnB/AUiHJaNu/P1RgAAAABJRU5ErkJggg==", Re = (o, m) => {
136
- const N = o.__vccOpts || o;
137
- for (const [A, a] of m)
138
- N[A] = a;
139
- return N;
140
- }, Fn = { class: "title" }, Dn = { class: "subTitle" }, Cn = { style: { width: "20px", display: "flex", "justify-content": "center" } }, Tn = { class: "mychart" }, zn = ["id"], Ln = {
135
+ }), Dn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAk1BMVEUAAAAyMjIzMzMzMzMzMzMzMzMyMjIzMzMzMzMzMzM3NzcyMjIzMzMyMjIzMzMzMzMzMzMzMzMzMzMyMjIzMzMyMjIzMzMzMzMzMzMzMzMyMjIzMzMzMzMzMzMzMzMyMjIzMzMyMjIzMzM0NDQzMzMzMzMzMzMzMzMzMzMzMzM0NDQzMzMzMzMzMzMyMjI6OjozMzMnMcQ8AAAAMHRSTlMAgprMx7VSMqV6CWbkjtXRv5RiD/hEOe91cSng21w/Lq6piBwX6mtXTUkg9J68JAbdlNjNAAAFP0lEQVR42u3d13biMBAG4N/gDqabYnrokIR5/6fbmrMe7LCAJWFx9N3tDRtF1sxopBgYhmEYhmEYhmEYhmEYhmEYhmEYhmEY9wvn8X7X2Y6CYLTt7PbxPIRuju6w0qpTRr1VGbor6OHYeZ/QVY32rvSDiaMq3cSOYpTWcWjTH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JUp+kExoxISdL5RAxHidHf9Z0gIMVTo7+PNMBjro4OfozppSaDxhOlDs6RDsIJ0d/WpROgw4z5EQp0QFapjg5+lOlQzSxcXL0p0IpjRUw6S7A+kGPM0GyEPmN3jLNV3lknE3kzOLXIW+/MJB5fkN5/CNb34QMrjn9CsIHysnJycnJycnJycnJycnB/AUiHJaNu/P1RgAAAABJRU5ErkJggg==", Ge = (l, g) => {
136
+ const Y = l.__vccOpts || l;
137
+ for (const [h, n] of g)
138
+ Y[h] = n;
139
+ return Y;
140
+ }, zn = { class: "title" }, Ln = { class: "subTitle" }, Nn = { style: { width: "20px", display: "flex", "justify-content": "center" } }, Bn = { class: "mychart" }, Yn = ["id"], Rn = {
141
141
  __name: "HydroGraph",
142
142
  props: {
143
143
  id: {
144
144
  type: String,
145
145
  default() {
146
- return Mn();
146
+ return On();
147
147
  }
148
148
  },
149
149
  chartOption: {
@@ -177,74 +177,74 @@ const Sn = (o) => new Promise((m) => {
177
177
  }
178
178
  }
179
179
  },
180
- setup(o, { expose: m, emit: N }) {
181
- ze.use([
182
- fn,
183
- un,
180
+ setup(l, { expose: g, emit: Y }) {
181
+ Re.use([
182
+ An,
183
+ yn,
184
+ xn,
185
+ gn,
184
186
  hn,
185
187
  pn,
186
- dn,
187
- cn,
188
- An,
189
- xn
188
+ mn,
189
+ vn
190
190
  ]);
191
- const A = ie(), a = o;
192
- a.chartOption.series || (a.chartOption.series = []);
191
+ const h = fe(), n = l;
192
+ n.chartOption.series || (n.chartOption.series = []);
193
193
  let M = {};
194
- const Ue = N;
195
- let ne = {};
196
- Ie(
197
- () => a.chartOption,
194
+ const Pe = Y;
195
+ let re = {};
196
+ Ce(
197
+ () => n.chartOption,
198
198
  () => {
199
- Oe(() => {
200
- let c = setInterval(() => {
201
- document.getElementById(a.id) && document.getElementById(a.id).offsetHeight > 100 && document.getElementById(a.id).offsetWidth > 100 && (I && I.getOption() && !a.chartOption.restoreZoom && (ne = {
202
- ...I.getOption().dataZoom[0],
203
- moveOnMouseMove: a.chartOption.series.some(
199
+ Te(() => {
200
+ let s = setInterval(() => {
201
+ document.getElementById(n.id) && document.getElementById(n.id).offsetHeight > 100 && document.getElementById(n.id).offsetWidth > 100 && (k && k.getOption() && !n.chartOption.restoreZoom && (re = {
202
+ ...k.getOption().dataZoom[0],
203
+ moveOnMouseMove: n.chartOption.series.some(
204
204
  (f) => f.openBarDrag && (f.type == "line" || f.type == "markLine")
205
205
  ) ? "ctrl" : !0
206
- }), me(), clearInterval(c));
206
+ }), Ee(), clearInterval(s));
207
207
  }, 100);
208
208
  });
209
209
  },
210
210
  { deep: !0, immediate: !0 }
211
211
  );
212
- let ae = {};
213
- Ie(
214
- () => a.legendList,
212
+ let ie = {};
213
+ Ce(
214
+ () => n.legendList,
215
215
  () => {
216
- I && (ae = I.getOption().legend[0].selected);
217
- let c = a.legendList.map((s) => {
218
- let x = we.find((l) => l.code == s.name);
219
- return x ? {
220
- ...s,
221
- ...x
216
+ k && (ie = k.getOption().legend[0].selected);
217
+ let s = n.legendList.map((i) => {
218
+ let p = Oe.find((r) => r.code == i.name);
219
+ return p ? {
220
+ ...i,
221
+ ...p
222
222
  } : {
223
- ...s
223
+ ...i
224
224
  };
225
- }), f = JSON.parse(JSON.stringify(Q.value));
226
- M = {}, Q.value = c.map((s) => {
227
- const x = f.find((k) => k.name == s.name);
228
- M[s.name] = s, s.children && (s.children = s.children.map((k) => {
229
- M[k.name] = k;
230
- let y = "";
231
- return a.chartOption.isDefaultElement === !1 ? y = ae[k.name] != null ? ae[k.name] : k.isSelected : x && x.children && x.children.find((L) => L.name == k.name) ? y = x.children.find((L) => L.name == k.name).isSelected : y = k.isSelected, {
232
- ...k,
233
- isSelected: y,
225
+ }), f = JSON.parse(JSON.stringify(P.value));
226
+ M = {}, P.value = s.map((i) => {
227
+ const p = f.find((O) => O.name == i.name);
228
+ M[i.name] = i, i.children && (i.children = i.children.map((O) => {
229
+ M[O.name] = O;
230
+ let x = "";
231
+ return n.chartOption.isDefaultElement === !1 ? x = ie[O.name] != null ? ie[O.name] : O.isSelected : p && p.children && p.children.find((N) => N.name == O.name) ? x = p.children.find((N) => N.name == O.name).isSelected : x = O.isSelected, {
232
+ ...O,
233
+ isSelected: x,
234
234
  id: Math.random()
235
235
  };
236
236
  }));
237
- let l = "";
238
- return a.chartOption.isDefaultElement === !1 ? l = ae[s.name] != null ? ae[s.name] : s.isSelected : s.compel ? l = s.isSelected : x ? l = x.isSelected : l = s.isSelected, {
239
- ...s,
240
- isSelected: l,
237
+ let r = "";
238
+ return n.chartOption.isDefaultElement === !1 ? r = ie[i.name] != null ? ie[i.name] : i.isSelected : i.compel ? r = i.isSelected : p ? r = p.isSelected : r = i.isSelected, {
239
+ ...i,
240
+ isSelected: r,
241
241
  id: Math.random()
242
242
  };
243
243
  });
244
244
  },
245
245
  { deep: !0 }
246
246
  );
247
- const Me = [
247
+ const Ie = [
248
248
  { name: "实况雨量", type: "bar", color: "#0000ff", unit: "mm" },
249
249
  { name: "实测水位", type: "line", color: "#304755", unit: "m" },
250
250
  { name: "库容", type: "line", color: "#197e2b", unit: "万m³" },
@@ -260,133 +260,133 @@ const Sn = (o) => new Promise((m) => {
260
260
  { name: "累计降雨", type: "line", color: "red", unit: "mm" },
261
261
  { name: "可纳雨量", type: "bar", color: "#0000ff", unit: "mm" },
262
262
  { name: "作业预报时间", type: "markLine", color: "#ff0000" }
263
- ], we = [
263
+ ], Oe = [
264
264
  { name: "实况雨量", code: "P", color: "#0000ff", icon: "histogram" },
265
265
  { name: "实测水位", code: "RZ", color: "#304755", icon: "straightLine", iconWidth: "30", iconHeight: "30" },
266
266
  { name: "库容", code: "W", color: "#197e2b", icon: "straightLine", iconWidth: "30", iconHeight: "30" }
267
- ], Ve = ["校核洪水位", "设计洪水位", "正常高水位", "坝顶高程", "死水位", "主汛期"], Q = ie(
268
- a.legendList.map((c, f) => {
269
- let s = we.find((x) => x.code == c.name);
270
- return c.color || (c.color = Be[f]), s ? {
271
- ...c,
272
- ...s
267
+ ], Je = ["校核洪水位", "设计洪水位", "正常高水位", "坝顶高程", "死水位", "主汛期"], P = fe(
268
+ n.legendList.map((s, f) => {
269
+ let i = Oe.find((p) => p.code == s.name);
270
+ return s.color || (s.color = Ve[f]), i ? {
271
+ ...s,
272
+ ...i
273
273
  } : {
274
- ...c
274
+ ...s
275
275
  };
276
276
  })
277
277
  );
278
- Q.value.forEach((c) => {
279
- M[c.name] = c, c.children && c.children.forEach((f) => {
278
+ P.value.forEach((s) => {
279
+ M[s.name] = s, s.children && s.children.forEach((f) => {
280
280
  M[f.name] = f;
281
281
  });
282
282
  });
283
- const te = ie(!0);
284
- let Se = null;
285
- const Qe = (c) => {
286
- var s;
283
+ const se = fe(!0);
284
+ let Fe = null;
285
+ const We = (s) => {
286
+ var i;
287
287
  let f = [];
288
- te.value = c, Q.value.forEach((x) => {
289
- x.isSelected = c, f.push(x.name), x.children && x.children.forEach((l) => {
290
- l.isSelected = c, f.push(l.name);
288
+ se.value = s, P.value.forEach((p) => {
289
+ p.isSelected = s, f.push(p.name), p.children && p.children.forEach((r) => {
290
+ r.isSelected = s, f.push(r.name);
291
291
  });
292
- }), f.forEach((x) => {
293
- J[x] = c, he(x, c);
294
- }), ne = { ...(s = I.getOption()) == null ? void 0 : s.dataZoom[0] }, me();
295
- }, ce = (c, f) => {
296
- var x;
297
- let s = [];
298
- Q.value.forEach((l) => {
299
- l.name == f ? (l.isSelected = c, l.children ? l.children.forEach((k) => {
300
- k.isSelected = c, s.push(k.name);
301
- }) : s.push(l.name)) : l.children && l.children.forEach((k) => {
302
- k.name == f && (k.isSelected = c, s.push(k.name), l.children.filter((y) => y.isSelected).length == l.children.length ? l.isSelected = !0 : l.isSelected = !1);
292
+ }), f.forEach((p) => {
293
+ X[p] = s, xe(p, s);
294
+ }), re = { ...(i = k.getOption()) == null ? void 0 : i.dataZoom[0] }, Ee();
295
+ }, pe = (s, f) => {
296
+ var p;
297
+ let i = [];
298
+ P.value.forEach((r) => {
299
+ r.name == f ? (r.isSelected = s, r.children ? r.children.forEach((O) => {
300
+ O.isSelected = s, i.push(O.name);
301
+ }) : i.push(r.name)) : r.children && r.children.forEach((O) => {
302
+ O.name == f && (O.isSelected = s, i.push(O.name), r.children.filter((x) => x.isSelected).length == r.children.length ? r.isSelected = !0 : r.isSelected = !1);
303
303
  });
304
- }), s.forEach((l) => {
305
- Array.isArray(l) ? (J[l[0]] = c, J[l[1]] = c, he(l[0], c), he(l[1], c)) : (J[l] = c, he(l, c));
306
- }), Se = Q.value.some((l) => l.isSelected == !1), Se ? te.value = !1 : te.value = !0, ne = { ...(x = I.getOption()) == null ? void 0 : x.dataZoom[0] }, me();
304
+ }), i.forEach((r) => {
305
+ Array.isArray(r) ? (X[r[0]] = s, X[r[1]] = s, xe(r[0], s), xe(r[1], s)) : (X[r] = s, xe(r, s));
306
+ }), Fe = P.value.some((r) => r.isSelected == !1), Fe ? se.value = !1 : se.value = !0, re = { ...(p = k.getOption()) == null ? void 0 : p.dataZoom[0] }, Ee();
307
307
  };
308
- ln(() => {
309
- window.addEventListener("keydown", je);
308
+ dn(() => {
309
+ window.addEventListener("keydown", Xe);
310
310
  });
311
- let ge = {};
312
- const je = (c) => {
313
- if (c.key === "i") {
314
- let f = JSON.parse(JSON.stringify(I.getOption()));
315
- f.series.forEach((s) => {
316
- s.markPoint && s.markPoint.data.length != 0 ? s.markPoint.data = [] : s.markPoint && s.markPoint.data == 0 && (s.markPoint = ge[s.name]);
317
- }), I.setOption(f);
311
+ let be = {};
312
+ const Xe = (s) => {
313
+ if (s.key === "i") {
314
+ let f = JSON.parse(JSON.stringify(k.getOption()));
315
+ f.series.forEach((i) => {
316
+ i.markPoint && i.markPoint.data.length != 0 ? i.markPoint.data = [] : i.markPoint && i.markPoint.data == 0 && (i.markPoint = be[i.name]);
317
+ }), k.setOption(f);
318
318
  }
319
319
  };
320
- let J = {}, I, fe;
321
- const j = ie({}), me = async () => {
322
- let c = a.chartOption.series.map((e) => {
323
- let d = "";
324
- return e.code ? d = Me.find((n) => n.code == e.code) : d = Me.find((n) => n.name == e.name), d ? {
325
- ...d,
320
+ let X = {}, k, Ae;
321
+ const K = fe({}), Ee = async () => {
322
+ let s = n.chartOption.series.map((e) => {
323
+ let t = "";
324
+ return e.code ? t = Ie.find((o) => o.code == e.code) : t = Ie.find((o) => o.name == e.name), t ? {
325
+ ...t,
326
326
  ...e
327
327
  } : {
328
328
  ...e
329
329
  };
330
330
  });
331
- Q.value.forEach((e) => {
332
- J[e.name] = e.isSelected, e.children && e.children.forEach((d) => {
333
- J[d.name] = d.isSelected;
331
+ P.value.forEach((e) => {
332
+ X[e.name] = e.isSelected, e.children && e.children.forEach((t) => {
333
+ X[t.name] = t.isSelected;
334
334
  });
335
- }), fe = document.getElementById(a.id), I || (I = ze.init(fe));
336
- let f = c.filter((e) => Array.isArray(e.data));
337
- const s = f.every(
335
+ }), Ae = document.getElementById(n.id), k || (k = Re.init(Ae));
336
+ let f = s.filter((e) => Array.isArray(e.data));
337
+ const i = f.every(
338
338
  (e) => Array.isArray(e.data) && e.data.length === 0
339
- ), x = Ye(
340
- new Date(O().subtract(5, "day").format("YYYY-MM-DD 08:00")),
341
- new Date(O().format("YYYY-MM-DD HH:00")),
339
+ ), p = Qe(
340
+ new Date(S().subtract(5, "day").format("YYYY-MM-DD 08:00")),
341
+ new Date(S().format("YYYY-MM-DD HH:00")),
342
342
  60
343
343
  ).map((e) => [e, ""]);
344
- let l = [];
344
+ let r = [];
345
345
  f.forEach((e) => {
346
- l = l.concat(e.data);
347
- }), l = [...new Set(l.map((e) => e[0]))], l.sort((e, d) => Date.parse(e) - Date.parse(d)), l.some((e) => ye(e)) && (l = l.filter((e) => ye(e)));
348
- let k = l[0];
349
- a.chartOption.series.forEach((e) => {
350
- e.name == "开始" && e.sectionStartTime && (k = e.sectionStartTime);
346
+ r = r.concat(e.data);
347
+ }), r = [...new Set(r.map((e) => e[0]))], r.sort((e, t) => Date.parse(e) - Date.parse(t)), r.some((e) => ve(e)) && (r = r.filter((e) => ve(e)));
348
+ let O = r[0];
349
+ n.chartOption.series.forEach((e) => {
350
+ e.name == "开始" && e.sectionStartTime && (O = e.sectionStartTime);
351
351
  });
352
- let y = JSON.parse(JSON.stringify(a.chartOption.grid)), L = a.chartOption.xAxis.map((e, d) => {
353
- let n = "";
354
- e.show == !1 || y.length > 1 && d == 0 ? n = !1 : n = !0;
355
- let p = {
352
+ let x = JSON.parse(JSON.stringify(n.chartOption.grid)), N = n.chartOption.xAxis.map((e, t) => {
353
+ let o = "";
354
+ e.show == !1 || x.length > 1 && t == 0 ? o = !1 : o = !0;
355
+ let A = {
356
356
  type: e.type,
357
357
  logBase: e.logBase || 10,
358
358
  gridIndex: e.gridIndex,
359
- name: n && e.type == "time" ? "时间" : e.name,
360
- nameLocation: n && e.type == "time" ? "end" : "middle",
359
+ name: o && e.type == "time" ? "时间" : e.name,
360
+ nameLocation: o && e.type == "time" ? "end" : "middle",
361
361
  // x轴name处于x轴的什么位置
362
362
  nameTextStyle: {
363
363
  //x轴上方单位的颜色
364
364
  color: "#333",
365
- verticalAlign: n && e.type == "time" ? "top" : ""
365
+ verticalAlign: o && e.type == "time" ? "top" : ""
366
366
  },
367
367
  position: e.position,
368
368
  offset: e.offset ? e.offset : 0,
369
369
  inverse: e.inverse ? e.inverse : !1,
370
- nameGap: n && e.type == "time" ? 45 : e.nameGap ? e.nameGap : e.name ? 25 : 0,
370
+ nameGap: o && e.type == "time" ? 45 : e.nameGap ? e.nameGap : e.name ? 25 : 0,
371
371
  // x轴name与横纵坐标轴线的间距
372
372
  axisLabel: {
373
- show: n,
373
+ show: o,
374
374
  rotate: e.rotate,
375
- formatter: function(b) {
376
- return e.type == "time" ? Pe(O(O(b).format("YYYY-MM-DD HH:mm"))) ? a.chartOption.xTimeType ? `{a|${a.chartOption.xTimeType}}` : "{a|{yyyy}-{MM}-{dd} {HH}:{mm}}" : a.chartOption.xTimeType ? a.chartOption.xTimeType : "{MM}-{dd} {HH}:{mm}" : e.name ? e.name.includes("m³/s") ? ee(b) : e.name.includes("万m³") ? b.toFixed(2) : e.name.includes("mm") ? b.toFixed(1) : e.name.includes("m") ? b.toFixed(2) : (b || b == 0) && e.toFixed ? Number(b).toFixed(e.toFixed) : b : b;
375
+ formatter: function(v) {
376
+ return e.type == "time" ? Ke(S(S(v).format("YYYY-MM-DD HH:mm"))) ? n.chartOption.xTimeType ? `{a|${n.chartOption.xTimeType}}` : "{a|{yyyy}-{MM}-{dd} {HH}:{mm}}" : n.chartOption.xTimeType ? n.chartOption.xTimeType : "{MM}-{dd} {HH}:{mm}" : e.name ? e.name.includes("m³/s") ? le(v) : e.name.includes("万m³") ? v.toFixed(2) : e.name.includes("mm") ? v.toFixed(1) : e.name.includes("m") ? v.toFixed(2) : (v || v == 0) && e.toFixed ? Number(v).toFixed(e.toFixed) : v : v;
377
377
  },
378
378
  rich: {
379
379
  a: {
380
380
  fontWeight: "bold"
381
381
  }
382
382
  },
383
- color: a.chartOption.yAxisColor ? a.chartOption.yAxisColor : "#333",
383
+ color: n.chartOption.yAxisColor ? n.chartOption.yAxisColor : "#333",
384
384
  hideOverlap: !0
385
385
  },
386
386
  axisLine: {
387
387
  show: !0,
388
388
  lineStyle: {
389
- color: a.chartOption.yAxisColor ? a.chartOption.yAxisColor : "#8a949c"
389
+ color: n.chartOption.yAxisColor ? n.chartOption.yAxisColor : "#8a949c"
390
390
  }
391
391
  },
392
392
  splitLine: {
@@ -396,28 +396,28 @@ const Sn = (o) => new Promise((m) => {
396
396
  }
397
397
  },
398
398
  axisTick: {
399
- show: e.show == !1 ? !1 : !(y.length > 1 && d == 0),
399
+ show: e.show == !1 ? !1 : !(x.length > 1 && t == 0),
400
400
  // 不显示坐标轴上的文字
401
- alignWithLabel: a.chartOption.alignWithLabel != null ? a.chartOption.alignWithLabel : !0
401
+ alignWithLabel: n.chartOption.alignWithLabel != null ? n.chartOption.alignWithLabel : !0
402
402
  },
403
403
  boundaryGap: e.boundaryGap ? e.boundaryGap : ["1%", "1%"]
404
404
  };
405
- if (e.data && (p.data = e.data), e.type == "value" || e.type == "log") {
406
- let b = 0, F = 100, u = 10;
407
- e.name.includes("m³/s") ? (F = 1e3, u = 100) : e.name.includes("万m³") && (F = 1e4, u = 1e3);
408
- let t = a.chartOption.series.filter((h) => h.yAxisIndex == d), g = [], r = [], i = 0, S = 100;
409
- t.forEach((h) => {
410
- h.data instanceof Array && (g = g.concat(h.data));
411
- }), g[0] instanceof Array && (r = g.filter(
412
- (h) => h[0] != "" && h[0] != null && h[0] != null && !isNaN(h[0])
413
- ).map((h) => Number(h[0]))), r.length > 0 && (i = Math.min(...r), S = Math.max(...r), t.some((h) => h.type == "bar") || e.name.includes("雨") ? (b = 0, (i !== 0 || S !== 0) && (F = Math.ceil(S / D(0, S)) * D(0, S), u = D(0, S))) : e.min || e.min == 0 ? (b = e.min, (i !== 0 || S !== 0) && (F = Math.ceil(S / D(e.min, S)) * D(e.min, S), u = D(e.min, S))) : (i !== 0 || S !== 0) && (b = Math.floor(i / D(i, S)) * D(i, S), F = Math.ceil(S / D(i, S)) * D(i, S), u = D(i, S))), p.min = e.min != "" && e.min != null ? e.min : b, p.max = e.max != "" && e.max != null ? e.max : F, p.interval = e.interval && e.max && (e.min || e.min == 0) ? e.interval : u, e.interval && e.max && (e.min || e.min == 0) && e.interval, p.minorTick = {
405
+ if (e.data && (A.data = e.data), e.type == "value" || e.type == "log") {
406
+ let v = 0, E = 100, u = 10;
407
+ e.name.includes("m³/s") ? (E = 1e3, u = 100) : e.name.includes("万m³") && (E = 1e4, u = 1e3);
408
+ let a = n.chartOption.series.filter((c) => c.yAxisIndex == t), b = [], y = [], d = 0, w = 100;
409
+ a.forEach((c) => {
410
+ c.data instanceof Array && (b = b.concat(c.data));
411
+ }), b[0] instanceof Array && (y = b.filter(
412
+ (c) => c[0] != "" && c[0] != null && c[0] != null && !isNaN(c[0])
413
+ ).map((c) => Number(c[0]))), y.length > 0 && (d = Math.min(...y), w = Math.max(...y), a.some((c) => c.type == "bar") || e.name.includes("雨") ? (v = 0, (d !== 0 || w !== 0) && (E = Math.ceil(w / C(0, w)) * C(0, w), u = C(0, w))) : e.min || e.min == 0 ? (v = e.min, (d !== 0 || w !== 0) && (E = Math.ceil(w / C(e.min, w)) * C(e.min, w), u = C(e.min, w))) : (d !== 0 || w !== 0) && (v = Math.floor(d / C(d, w)) * C(d, w), E = Math.ceil(w / C(d, w)) * C(d, w), u = C(d, w))), A.min = e.min != "" && e.min != null ? e.min : v, A.max = e.max != "" && e.max != null ? e.max : E, A.interval = e.interval && e.max && (e.min || e.min == 0) ? e.interval : u, e.interval && e.max && (e.min || e.min == 0) && e.interval, A.minorTick = {
414
414
  show: !!e.isMinorSplitLineShow
415
415
  };
416
416
  }
417
- return p;
418
- }), R = a.chartOption.yAxis.map((e, d) => {
419
- let n = 0, p = 100, b = 10;
420
- if (e.name.includes("m³/s") ? (p = 1e3, b = 100) : e.name.includes("万m³") && (p = 1e4, b = 1e3), e.name == "可纳雨量(mm)")
417
+ return A;
418
+ }), Q = n.chartOption.yAxis.map((e, t) => {
419
+ let o = 0, A = 100, v = 10;
420
+ if (e.name.includes("m³/s") ? (A = 1e3, v = 100) : e.name.includes("万m³") && (A = 1e4, v = 1e3), e.name == "可纳雨量(mm)")
421
421
  return {
422
422
  gridIndex: e.index,
423
423
  name: e.name,
@@ -437,7 +437,7 @@ const Sn = (o) => new Promise((m) => {
437
437
  interval: e.interval,
438
438
  axisLabel: {
439
439
  // 内容格式器
440
- formatter: (F) => F.toFixed(1),
440
+ formatter: (E) => E.toFixed(1),
441
441
  color: "#333"
442
442
  },
443
443
  axisLine: {
@@ -458,39 +458,39 @@ const Sn = (o) => new Promise((m) => {
458
458
  }
459
459
  };
460
460
  {
461
- let F = a.chartOption.series.filter((h) => h.yAxisIndex == d && (J[h.name] || !Object.keys(J).includes(h.name))), u = [], t = [], g = [], r = 0, i = 100, S = null;
462
- if (F.forEach((h) => {
463
- h.data instanceof Array ? ((h.data2 ? h.data2 : h.data).forEach((w) => {
464
- if (w instanceof Array && w.length >= 2) {
465
- const C = w[1];
466
- if (C != "" && C != null && C != null && !isNaN(C)) {
467
- const z = Number(C);
468
- S === null && (S = z);
461
+ let E = n.chartOption.series.filter((c) => c.yAxisIndex == t && (X[c.name] || !Object.keys(X).includes(c.name))), u = [], a = [], b = [], y = 0, d = 100, w = null;
462
+ if (E.forEach((c) => {
463
+ c.data instanceof Array ? ((c.data2 ? c.data2 : c.data).forEach((D) => {
464
+ if (D instanceof Array && D.length >= 2) {
465
+ const T = D[1];
466
+ if (T != "" && T != null && T != null && !isNaN(T)) {
467
+ const F = Number(T);
468
+ w === null && (w = F);
469
469
  }
470
470
  }
471
- }), u = h.data2 ? u.concat(h.data2) : u.concat(h.data)) : h.data.name == "yAxis" && h.data.value && g.push(Number(h.data.value));
472
- }), u[0] instanceof Array ? t = u.filter(
473
- (h) => h[1] != "" && h[1] != null && h[1] != null && !isNaN(h[1])
474
- ).map((h) => Number(h[1])) : u[0] instanceof Object && u[0].value ? t = u.map((v) => v.value).filter(
475
- (v) => v != "" && v != null && v != null && !isNaN(v)
476
- ).map((v) => Number(v)) : t = u.filter(
477
- (h) => h != "" && h != null && h != null && !isNaN(h)
478
- ).map((h) => Number(h)), t.length > 0 || g.length > 0) {
479
- if (r = Math.min(...t, ...g), i = Math.max(...t, ...g), F.some((h) => h.type == "bar") || e.name.includes("雨"))
480
- n = 0, a.chartOption.xAxis.length > 1 && e.inverse ? (r !== 0 || i !== 0) && (p = Math.ceil(i / D(0, i, 1)) * D(0, i, 1) + D(0, i, 1) * (e.upIntervalNumber != null ? e.upIntervalNumber : 1), b = D(0, i, 1)) : (r !== 0 || i !== 0) && (p = Math.ceil(i / D(0, i)) * D(0, i) + D(0, i) * (e.upIntervalNumber != null ? e.upIntervalNumber : 1), b = D(0, i));
471
+ }), u = c.data2 ? u.concat(c.data2) : u.concat(c.data)) : c.data.name == "yAxis" && c.data.value && b.push(Number(c.data.value));
472
+ }), u[0] instanceof Array ? a = u.filter(
473
+ (c) => c[1] != "" && c[1] != null && c[1] != null && !isNaN(c[1])
474
+ ).map((c) => Number(c[1])) : u[0] instanceof Object && u[0].value ? a = u.map((I) => I.value).filter(
475
+ (I) => I != "" && I != null && I != null && !isNaN(I)
476
+ ).map((I) => Number(I)) : a = u.filter(
477
+ (c) => c != "" && c != null && c != null && !isNaN(c)
478
+ ).map((c) => Number(c)), a.length > 0 || b.length > 0) {
479
+ if (y = Math.min(...a, ...b), d = Math.max(...a, ...b), E.some((c) => c.type == "bar") || e.name.includes("雨"))
480
+ o = 0, n.chartOption.xAxis.length > 1 && e.inverse ? (y !== 0 || d !== 0) && (A = Math.ceil(d / C(0, d, 1)) * C(0, d, 1) + C(0, d, 1) * (e.upIntervalNumber != null ? e.upIntervalNumber : 1), v = C(0, d, 1)) : (y !== 0 || d !== 0) && (A = Math.ceil(d / C(0, d)) * C(0, d) + C(0, d) * (e.upIntervalNumber != null ? e.upIntervalNumber : 1), v = C(0, d));
481
481
  else if (e.min || e.min == 0)
482
- n = e.min, (r !== 0 || i !== 0) && (p = Math.ceil(i / D(e.min, i)) * D(e.min, i) + D(e.min, i) * (e.upIntervalNumber != null ? e.upIntervalNumber : 1), b = D(e.min, i));
483
- else if (r !== 0 || i !== 0)
484
- if (a.chartOption.xAxis.some((v) => v.type === "value") && S !== null) {
485
- n = S;
486
- const v = D(n, i);
487
- p = Math.ceil((i - n) / v) * v + n + v * (e.upIntervalNumber != null ? e.upIntervalNumber : 1), b = v;
482
+ o = e.min, (y !== 0 || d !== 0) && (A = Math.ceil(d / C(e.min, d)) * C(e.min, d) + C(e.min, d) * (e.upIntervalNumber != null ? e.upIntervalNumber : 1), v = C(e.min, d));
483
+ else if (y !== 0 || d !== 0)
484
+ if (n.chartOption.xAxis.some((I) => I.type === "value") && w !== null) {
485
+ o = w;
486
+ const I = C(o, d);
487
+ A = Math.ceil((d - o) / I) * I + o + I * (e.upIntervalNumber != null ? e.upIntervalNumber : 1), v = I;
488
488
  } else
489
- n = Math.floor(r / D(r, i)) * D(r, i) - D(r, i) * (e.downIntervalNumber != null ? e.downIntervalNumber : 1), p = Math.ceil(i / D(r, i)) * D(r, i) + D(r, i) * (e.upIntervalNumber != null ? e.upIntervalNumber : 1), b = D(r, i);
489
+ o = Math.floor(y / C(y, d)) * C(y, d) - C(y, d) * (e.downIntervalNumber != null ? e.downIntervalNumber : 1), A = Math.ceil(d / C(y, d)) * C(y, d) + C(y, d) * (e.upIntervalNumber != null ? e.upIntervalNumber : 1), v = C(y, d);
490
490
  }
491
491
  if (e.rangeType == 1) {
492
- let h = "", v = "";
493
- Math.abs(i) > Math.abs(r) ? v = Math.abs(i) : v = Math.abs(r), h = Math.ceil(v / D(0, v)) * D(0, v), p = h, n = 0 - h, b = D(0, Math.abs(h));
492
+ let c = "", I = "";
493
+ Math.abs(d) > Math.abs(y) ? I = Math.abs(d) : I = Math.abs(y), c = Math.ceil(I / C(0, I)) * C(0, I), A = c, o = 0 - c, v = C(0, Math.abs(c));
494
494
  }
495
495
  return {
496
496
  gridIndex: e.index,
@@ -499,7 +499,7 @@ const Sn = (o) => new Promise((m) => {
499
499
  // y轴name处于y轴的什么位置
500
500
  nameTextStyle: {
501
501
  //y轴上方单位的颜色
502
- color: a.chartOption.yAxisColor ? a.chartOption.yAxisColor : "#333"
502
+ color: n.chartOption.yAxisColor ? n.chartOption.yAxisColor : "#333"
503
503
  },
504
504
  nameGap: e.nameGap,
505
505
  // y轴name与横纵坐标轴线的间距
@@ -508,18 +508,18 @@ const Sn = (o) => new Promise((m) => {
508
508
  position: e.position,
509
509
  offset: e.offset ? e.offset : 0,
510
510
  inverse: e.inverse ? e.inverse : !1,
511
- min: e.min != "" && e.min != null ? e.min : n,
512
- max: e.max != "" && e.max != null ? e.max : p,
513
- interval: e.interval && e.max && (e.min || e.min == 0) ? e.interval : b,
511
+ min: e.min != "" && e.min != null ? e.min : o,
512
+ max: e.max != "" && e.max != null ? e.max : A,
513
+ interval: e.interval && e.max && (e.min || e.min == 0) ? e.interval : v,
514
514
  axisLabel: {
515
515
  // 内容格式器
516
- formatter: (h) => e.name.includes("m³/s") ? ee(h) : e.name.includes("万m³") ? h.toFixed(2) : e.name.includes("mm") ? h.toFixed(1) : e.name.includes("m") ? h.toFixed(2) : h,
517
- color: a.chartOption.yAxisColor ? a.chartOption.yAxisColor : "#333"
516
+ formatter: (c) => e.name.includes("m³/s") ? le(c) : e.name.includes("万m³") ? c.toFixed(2) : e.name.includes("mm") ? c.toFixed(1) : e.name.includes("m") ? c.toFixed(2) : c,
517
+ color: n.chartOption.yAxisColor ? n.chartOption.yAxisColor : "#333"
518
518
  },
519
519
  axisLine: {
520
520
  show: !0,
521
521
  lineStyle: {
522
- color: a.chartOption.yAxisColor ? a.chartOption.yAxisColor : "#8a949c"
522
+ color: n.chartOption.yAxisColor ? n.chartOption.yAxisColor : "#8a949c"
523
523
  }
524
524
  },
525
525
  axisTick: {
@@ -527,7 +527,7 @@ const Sn = (o) => new Promise((m) => {
527
527
  // 是否显示坐标轴刻度
528
528
  },
529
529
  splitLine: {
530
- show: !(y.length > 1 && e.index == 1 && e.position == "right" || y.length == 1 && e.index == 0 && e.position == "right" || e.splitLineHide),
530
+ show: !(x.length > 1 && e.index == 1 && e.position == "right" || x.length == 1 && e.index == 0 && e.position == "right" || e.splitLineHide),
531
531
  lineStyle: {
532
532
  color: "#e0e6f1"
533
533
  }
@@ -536,7 +536,7 @@ const Sn = (o) => new Promise((m) => {
536
536
  show: !0
537
537
  },
538
538
  minorSplitLine: {
539
- show: y.length > 1 && e.index == 1 && e.position == "right" || y.length == 1 && e.index == 0 && e.position == "right" || e.splitLineHide ? !1 : !e.minorSplitLineHide,
539
+ show: x.length > 1 && e.index == 1 && e.position == "right" || x.length == 1 && e.index == 0 && e.position == "right" || e.splitLineHide ? !1 : !e.minorSplitLineHide,
540
540
  lineStyle: {
541
541
  color: "#f4f7fd"
542
542
  }
@@ -547,17 +547,17 @@ const Sn = (o) => new Promise((m) => {
547
547
  }
548
548
  };
549
549
  }
550
- }), E = c.some((e) => e.openBarDrag), Y = c.map((e, d) => {
551
- var p, b, F;
552
- let n = {};
550
+ }), m = s.some((e) => e.openBarDrag), U = s.map((e, t) => {
551
+ var A, v, E;
552
+ let o = {};
553
553
  if (e.type == "bar")
554
- e.name == "可纳雨量" ? n = {
554
+ e.name == "可纳雨量" ? o = {
555
555
  name: e.name,
556
556
  type: e.type,
557
557
  xAxisIndex: e.xAxisIndex,
558
558
  yAxisIndex: e.yAxisIndex,
559
559
  barWidth: e.barWidth,
560
- data: s ? x : e.data,
560
+ data: i ? p : e.data,
561
561
  label: {
562
562
  show: !0,
563
563
  // 显示标签
@@ -584,7 +584,7 @@ const Sn = (o) => new Promise((m) => {
584
584
  },
585
585
  zlevel: 9,
586
586
  z: 9
587
- } : n = {
587
+ } : o = {
588
588
  name: e.name,
589
589
  type: e.type,
590
590
  xAxisIndex: e.xAxisIndex,
@@ -611,34 +611,34 @@ const Sn = (o) => new Promise((m) => {
611
611
  },
612
612
  itemStyle: e.itemStyle ? e.itemStyle : {
613
613
  color: function(u) {
614
- let t = M[e.name] ? M[e.name].color : e.color ? e.color : Be[d];
615
- return e.color2 && u.value[1] < 0 ? e.color2 : t;
614
+ let a = M[e.name] ? M[e.name].color : e.color ? e.color : Ve[t];
615
+ return e.color2 && u.value[1] < 0 ? e.color2 : a;
616
616
  },
617
617
  decal: {
618
618
  symbol: e.pattern ? e.pattern : "none"
619
619
  }
620
620
  },
621
- barCategoryGap: e.barCategoryGap ? e.barCategoryGap : R[e.yAxisIndex].inverse ? "0%" : "20%",
621
+ barCategoryGap: e.barCategoryGap ? e.barCategoryGap : Q[e.yAxisIndex].inverse ? "0%" : "20%",
622
622
  barGap: e.barGap ? e.barGap : "0%",
623
- data: s ? x : e.data,
623
+ data: i ? p : e.data,
624
624
  zlevel: 9,
625
625
  z: 9
626
- }, e.barWidth && (n.barWidth = e.barWidth, e.barGap ? n.barGap = e.barGap : n.barGap = "20%"), e.barMaxWidth && (n.barMaxWidth = e.barMaxWidth, e.barGap ? n.barGap = e.barGap : n.barGap = "20%");
626
+ }, e.barWidth && (o.barWidth = e.barWidth, e.barGap ? o.barGap = e.barGap : o.barGap = "20%"), e.barMaxWidth && (o.barMaxWidth = e.barMaxWidth, e.barGap ? o.barGap = e.barGap : o.barGap = "20%");
627
627
  else if (e.type == "line") {
628
628
  let u = "rgba(0, 0, 0, 0)";
629
- a.chartOption.isFace && (a.chartOption.faceNames ? a.chartOption.faceNames.includes(e.name) && (M[e.name] ? u = M[e.name].color : u = e.color) : M[e.name] ? u = M[e.name].color : u = e.color);
630
- let t = "", g = !1;
631
- if (e.showSymbol || ((p = M[e.name]) == null ? void 0 : p.icon) == "dottedLine" ? e.symbolSize ? t = e.symbolSize : t = 5 : a.chartOption.isTooltipItem ? (t = 10, g = !0) : t = 0, n = {
629
+ n.chartOption.isFace && (n.chartOption.faceNames ? n.chartOption.faceNames.includes(e.name) && (M[e.name] ? u = M[e.name].color : u = e.color) : M[e.name] ? u = M[e.name].color : u = e.color);
630
+ let a = "", b = !1;
631
+ if (e.showSymbol || ((A = M[e.name]) == null ? void 0 : A.icon) == "dottedLine" ? e.symbolSize ? a = e.symbolSize : a = 5 : n.chartOption.isTooltipItem ? (a = 10, b = !0) : a = 0, o = {
632
632
  name: e.name,
633
633
  type: e.type,
634
634
  xAxisIndex: e.xAxisIndex,
635
635
  yAxisIndex: e.yAxisIndex,
636
636
  itemStyle: {
637
637
  color: M[e.name] ? M[e.name].color : e.color,
638
- opacity: e.showSymbol || ((b = M[e.name]) == null ? void 0 : b.icon) == "dottedLine" ? 1 : 0
638
+ opacity: e.showSymbol || ((v = M[e.name]) == null ? void 0 : v.icon) == "dottedLine" ? 1 : 0
639
639
  },
640
640
  lineStyle: e.lineStyle ? e.lineStyle : {
641
- type: ((F = M[e.name]) == null ? void 0 : F.icon) == "dotted" ? "dotted" : "solid"
641
+ type: ((E = M[e.name]) == null ? void 0 : E.icon) == "dotted" ? "dotted" : "solid"
642
642
  },
643
643
  areaStyle: {
644
644
  color: u,
@@ -648,17 +648,17 @@ const Sn = (o) => new Promise((m) => {
648
648
  showSymbol: !0,
649
649
  symbol: e.symbol ? e.symbol : "circle",
650
650
  connectNulls: !0,
651
- symbolSize: t,
652
- data: s ? x : e.data,
653
- silent: E ? e.openBarDrag !== !0 : !1,
654
- triggerLineEvent: g,
651
+ symbolSize: a,
652
+ data: i ? p : e.data,
653
+ silent: m ? e.openBarDrag !== !0 : !1,
654
+ triggerLineEvent: b,
655
655
  zlevel: 9,
656
656
  z: 9
657
657
  }, e.isMaxMinShow && e.data.length > 0) {
658
- let r = e.data.filter((w) => !w[2]).filter((w) => w[1]), i = r.reduce((w, C) => parseFloat(C[1]) > parseFloat(w[1]) ? C : w, r[0]), S = i ? i[0] : "", h = i ? i[1] : "", v;
659
- l.forEach((w, C) => {
660
- O(w).isValid() && w == S && (w.markPointOffset || (C >= l.length / 5 * 4 ? v = [-200, 0] : C >= l.length / 5 * 3 ? v = [-150, 0] : C >= l.length / 5 * 2 ? v = [-100, 0] : C >= l.length / 5 * 1 ? v = [-50, 0] : C >= 0 && (v = [0, 0])));
661
- }), n.markPoint = {
658
+ let y = e.data.filter((D) => !D[2]).filter((D) => D[1]), d = y.reduce((D, T) => parseFloat(T[1]) > parseFloat(D[1]) ? T : D, y[0]), w = d ? d[0] : "", c = d ? d[1] : "", I;
659
+ r.forEach((D, T) => {
660
+ S(D).isValid() && D == w && (D.markPointOffset || (T >= r.length / 5 * 4 ? I = [-200, 0] : T >= r.length / 5 * 3 ? I = [-150, 0] : T >= r.length / 5 * 2 ? I = [-100, 0] : T >= r.length / 5 * 1 ? I = [-50, 0] : T >= 0 && (I = [0, 0])));
661
+ }), o.markPoint = {
662
662
  symbol: "pin",
663
663
  symbolSize: 20,
664
664
  label: {
@@ -676,17 +676,17 @@ const Sn = (o) => new Promise((m) => {
676
676
  padding: [4, 4, 4, 4],
677
677
  lineHeight: 30,
678
678
  color: e.markPointColor ? e.markPointColor : "#fff",
679
- formatter: (w) => {
680
- let C = "";
681
- if (w.data && w.data.coord && w.data.coord[0]) {
682
- let P = e.tmType ? e.tmType : "YYYY-MM-DD HH:mm";
683
- C = O(w.data.coord[0]).format(P);
679
+ formatter: (D) => {
680
+ let T = "";
681
+ if (D.data && D.data.coord && D.data.coord[0]) {
682
+ let ae = e.tmType ? e.tmType : "YYYY-MM-DD HH:mm";
683
+ T = S(D.data.coord[0]).format(ae);
684
684
  }
685
- let z = "", V = "";
686
- if (w.name == "Max")
687
- return z = e.maxText ? e.maxText : "最大值", e.unit.includes("m³") ? V = w.value ? ee(w.value) : "--" : e.unit.includes("mm") ? V = w.value ? Number(w.value).toFixed(1) : "--" : e.unit.includes("m") ? V = w.value ? Number(w.value).toFixed(2) : "--" : V = w.value, e.tmText ? `${z}: {a0|${V}} ${e.unit}
688
- ${e.tmText}: {a1|${C}}` : `${e.tmText2 ? e.tmText2 : "相应时间"}: {a1|${C}}
689
- ${z}: {a0|${V}} ${e.unit}`;
685
+ let F = "", H = "";
686
+ if (D.name == "Max")
687
+ return F = e.maxText ? e.maxText : "最大值", e.unit.includes("m³") ? H = D.value ? le(D.value) : "--" : e.unit.includes("mm") ? H = D.value ? Number(D.value).toFixed(1) : "--" : e.unit.includes("m") ? H = D.value ? Number(D.value).toFixed(2) : "--" : H = D.value, e.tmText ? `${F}: {a0|${H}} ${e.unit}
688
+ ${e.tmText}: {a1|${T}}` : `${e.tmText2 ? e.tmText2 : "相应时间"}: {a1|${T}}
689
+ ${F}: {a0|${H}} ${e.unit}`;
690
690
  },
691
691
  rich: {
692
692
  a0: {
@@ -703,22 +703,22 @@ ${z}: {a0|${V}} ${e.unit}`;
703
703
  {
704
704
  name: "Max",
705
705
  label: {
706
- offset: e.markPointOffset ? e.markPointOffset : v || [-120, 0]
706
+ offset: e.markPointOffset ? e.markPointOffset : I || [-120, 0]
707
707
  },
708
- xAxis: S,
709
- yAxis: h,
710
- value: h
708
+ xAxis: w,
709
+ yAxis: c,
710
+ value: c
711
711
  }
712
712
  ]
713
713
  };
714
714
  }
715
715
  } else if (e.type == "markLine") {
716
- let u = {}, t = [];
717
- e.labelType == 2 ? (e.name == "开始" ? t = [0, 0, -80, 180] : e.name == "结束" && (t = [0, 180, -120, 0]), u = {
716
+ let u = {}, a = [];
717
+ e.labelType == 2 ? (e.name == "开始" ? a = [0, 0, -80, 180] : e.name == "结束" && (a = [0, 180, -120, 0]), u = {
718
718
  show: !e.labelHide,
719
719
  position: "end",
720
720
  fontWeight: "bold",
721
- padding: t,
721
+ padding: a,
722
722
  fontFamily: "Times New Roman",
723
723
  lineHeight: 20,
724
724
  fontSize: 15
@@ -728,7 +728,7 @@ ${z}: {a0|${V}} ${e.unit}`;
728
728
  fontFamily: "Times New Roman",
729
729
  lineHeight: 20,
730
730
  fontSize: 15
731
- }, n = {
731
+ }, o = {
732
732
  name: e.name,
733
733
  type: "line",
734
734
  xAxisIndex: e.xAxisIndex,
@@ -750,16 +750,16 @@ ${z}: {a0|${V}} ${e.unit}`;
750
750
  fontFamily: "Times New Roman, serif",
751
751
  distance: -2,
752
752
  position: e.position ? e.position : "insideStartTop",
753
- formatter: function(g) {
753
+ formatter: function(b) {
754
754
  if (e.labelType == 2) {
755
- let r = "";
756
- return e.name == "开始" ? r = `${e.name}: ${g.value}` : e.name == "结束" && (r = `${e.name}: ${en(g.value)}`), e.labelArr && e.labelArr.forEach((i) => {
757
- r += `{a1|
758
- ${i.name}: ${i.value} ${i.unit}}`;
759
- }), r;
755
+ let y = "";
756
+ return e.name == "开始" ? y = `${e.name}: ${b.value}` : e.name == "结束" && (y = `${e.name}: ${ln(b.value)}`), e.labelArr && e.labelArr.forEach((d) => {
757
+ y += `{a1|
758
+ ${d.name}: ${d.value} ${d.unit}}`;
759
+ }), y;
760
760
  } else {
761
- let r = "";
762
- return (Ve.includes(e.name) || e.name.includes("梅汛期") || e.name.includes("台汛期")) && (r = "{a0|▽}"), e.data.name == "xAxis" ? e.name : ` ${r}${e.name}: ${e.data.value} ${e.unit} `;
761
+ let y = "";
762
+ return (Je.includes(e.name) || e.name.includes("梅汛期") || e.name.includes("台汛期")) && (y = "{a0|▽}"), e.data.name == "xAxis" ? e.name : ` ${y}${e.name}: ${e.data.value} ${e.unit} `;
763
763
  }
764
764
  },
765
765
  rich: {
@@ -782,7 +782,7 @@ ${i.name}: ${i.value} ${i.unit}}`;
782
782
  ]
783
783
  }
784
784
  };
785
- } else e.type == "scatter" ? n = {
785
+ } else e.type == "scatter" ? o = {
786
786
  name: e.name,
787
787
  type: e.type,
788
788
  xAxisIndex: e.xAxisIndex,
@@ -791,10 +791,10 @@ ${i.name}: ${i.value} ${i.unit}}`;
791
791
  itemStyle: {
792
792
  color: M[e.name] ? M[e.name].color : e.color
793
793
  },
794
- data: s ? x : e.data,
794
+ data: i ? p : e.data,
795
795
  zlevel: 9,
796
796
  z: 9
797
- } : e.type == "boxplot" && (n = {
797
+ } : e.type == "boxplot" && (o = {
798
798
  name: e.name,
799
799
  type: e.type,
800
800
  xAxisIndex: e.xAxisIndex,
@@ -812,16 +812,16 @@ ${i.name}: ${i.value} ${i.unit}}`;
812
812
  borderWidth: 2
813
813
  }
814
814
  },
815
- data: s ? x : e.data,
815
+ data: i ? p : e.data,
816
816
  zlevel: 9,
817
817
  z: 9
818
818
  });
819
- return e.markArea && (e.markArea.data ? n.markArea = {
819
+ return e.markArea && (e.markArea.data ? o.markArea = {
820
820
  silent: e.markArea.silent ? e.markArea.silent : !1,
821
821
  label: e.markArea.label ? e.markArea.label : {},
822
822
  itemStyle: e.markArea.itemStyle ? e.markArea.itemStyle : {},
823
823
  data: e.markArea.data
824
- } : n.markArea = {
824
+ } : o.markArea = {
825
825
  silent: !0,
826
826
  itemStyle: {
827
827
  opacity: e.markArea.opacity ? e.markArea.opacity : 0.3,
@@ -839,55 +839,55 @@ ${i.name}: ${i.value} ${i.unit}}`;
839
839
  }
840
840
  ]
841
841
  ]
842
- }), n;
843
- }), T = R.map((e) => e.name), le = {}, $ = {};
844
- if (T.includes("水位(m)") && T.includes("库容(万m³)") && a.chartOption.stationCode) {
845
- let e = R.find((t) => t.name == "水位(m)"), d = [];
846
- for (let t = e.min; t <= e.max; t += e.interval)
847
- d.push(t);
848
- let n = [];
849
- for (let t = 0; t < d.length; t++)
842
+ }), o;
843
+ }), L = Q.map((e) => e.name), de = {}, ne = {};
844
+ if (L.includes("水位(m)") && L.includes("库容(万m³)") && n.chartOption.stationCode) {
845
+ let e = Q.find((a) => a.name == "水位(m)"), t = [];
846
+ for (let a = e.min; a <= e.max; a += e.interval)
847
+ t.push(a);
848
+ let o = [];
849
+ for (let a = 0; a < t.length; a++)
850
850
  if (e.max == 100)
851
- n.push(t * 1e3);
852
- else if (d[t] == 0)
853
- n.push(0);
851
+ o.push(a * 1e3);
852
+ else if (t[a] == 0)
853
+ o.push(0);
854
854
  else {
855
- let g = await qe(d[t], t);
856
- n.push(g);
855
+ let b = await tn(t[a], a);
856
+ o.push(b);
857
857
  }
858
- R.forEach((t) => {
859
- t.name == "水位(m)" ? t.offset = 80 : t.name == "库容(万m³)" && (t.offset = 80, t.nameGap = -70, t.splitLine.show = !1, t.minorSplitLine.show = !1, t.axisLabel.inside = !0, t.axisTick.inside = !0, y.length > 1 ? t.gridIndex == 0 ? (y[t.gridIndex].left = 150, y[t.gridIndex].right = 20, y[1].left = 150, y[1].right = 20) : t.gridIndex == 1 && (y[0].left = 150, y[0].right = 70, y[t.gridIndex].left = 150, y[t.gridIndex].right = 70) : y.length == 1 && (y[t.gridIndex].left = 150, y[t.gridIndex].right = 20), t.position = "left", t.max = e.max, t.min = e.min, t.interval = e.interval, t.axisLabel.formatter = (g, r) => n[r] || n[r] == 0 ? Number(n[r]).toFixed(2) : "");
858
+ Q.forEach((a) => {
859
+ a.name == "水位(m)" ? a.offset = 80 : a.name == "库容(万m³)" && (a.offset = 80, a.nameGap = -70, a.splitLine.show = !1, a.minorSplitLine.show = !1, a.axisLabel.inside = !0, a.axisTick.inside = !0, x.length > 1 ? a.gridIndex == 0 ? (x[a.gridIndex].left = 150, x[a.gridIndex].right = 20, x[1].left = 150, x[1].right = 20) : a.gridIndex == 1 && (x[0].left = 150, x[0].right = 70, x[a.gridIndex].left = 150, x[a.gridIndex].right = 70) : x.length == 1 && (x[a.gridIndex].left = 150, x[a.gridIndex].right = 20), a.position = "left", a.max = e.max, a.min = e.min, a.interval = e.interval, a.axisLabel.formatter = (b, y) => o[y] || o[y] == 0 ? Number(o[y]).toFixed(2) : "");
860
860
  });
861
- let p = Y.find((t) => t.name == "库容"), b = Y.find((t) => t.name == "5分钟库容"), F = Y.find(
862
- (t) => t.name == "实测水位" || t.name == "水位"
863
- ), u = Y.find((t) => t.name == "5分钟水位");
864
- p && p.data && p.data.forEach((t) => {
865
- le[t[0]] = t[1];
866
- }), b && b.data && b.data.forEach((t) => {
867
- $[t[0]] = t[1];
868
- }), Y.forEach((t) => {
869
- t.name == "库容" ? t.data = F.data : t.name == "5分钟库容" && (t.data = u.data);
861
+ let A = U.find((a) => a.name == "库容"), v = U.find((a) => a.name == "5分钟库容"), E = U.find(
862
+ (a) => a.name == "实测水位" || a.name == "水位"
863
+ ), u = U.find((a) => a.name == "5分钟水位");
864
+ A && A.data && A.data.forEach((a) => {
865
+ de[a[0]] = a[1];
866
+ }), v && v.data && v.data.forEach((a) => {
867
+ ne[a[0]] = a[1];
868
+ }), U.forEach((a) => {
869
+ a.name == "库容" ? a.data = E.data : a.name == "5分钟库容" && (a.data = u.data);
870
870
  });
871
871
  }
872
- let oe = [...l];
873
- if (l.some((e) => ye(e)) && (oe = oe.filter((e) => {
874
- let d = O(e);
875
- if (ye(e) && d.minute() === 0 && d.second() === 0)
872
+ let ce = [...r];
873
+ if (r.some((e) => ve(e)) && (ce = ce.filter((e) => {
874
+ let t = S(e);
875
+ if (ve(e) && t.minute() === 0 && t.second() === 0)
876
876
  return e;
877
- })), y.length == 1 ? Y.push({
877
+ })), x.length == 1 ? U.push({
878
878
  name: "a",
879
879
  xAxisIndex: 0,
880
880
  yAxisIndex: 0,
881
- data: a.chartOption.series.length == 0 ? x : oe.map((e) => [e, void 0]),
881
+ data: n.chartOption.series.length == 0 ? p : ce.map((e) => [e, void 0]),
882
882
  type: "line",
883
883
  z: 9,
884
884
  zlevel: 9
885
- }) : Y.push(
885
+ }) : U.push(
886
886
  {
887
887
  name: "a",
888
888
  xAxisIndex: 0,
889
889
  yAxisIndex: 0,
890
- data: a.chartOption.series.length == 0 ? x : oe.map((e) => [e, void 0]),
890
+ data: n.chartOption.series.length == 0 ? p : ce.map((e) => [e, void 0]),
891
891
  type: "line",
892
892
  z: 9,
893
893
  zlevel: 9
@@ -895,26 +895,26 @@ ${i.name}: ${i.value} ${i.unit}}`;
895
895
  {
896
896
  name: "b",
897
897
  xAxisIndex: 1,
898
- yAxisIndex: R.findIndex((e) => e.gridIndex == 1),
899
- data: a.chartOption.series.length == 0 ? x : oe.map((e) => [e, void 0]),
898
+ yAxisIndex: Q.findIndex((e) => e.gridIndex == 1),
899
+ data: n.chartOption.series.length == 0 ? p : ce.map((e) => [e, void 0]),
900
900
  type: "line",
901
901
  z: 9,
902
902
  zlevel: 9
903
903
  }
904
- ), y.length == 1 ? y.forEach((e, d) => {
905
- e.top = e.newTop ? e.newTop : 10, e.bottom = e.newBottom ? e.newBottom : a.chartOption.xAxis[d].name ? 40 : 20;
906
- }) : y.length == 2 ? y.forEach((e, d) => {
907
- d == 0 ? (e.top = 10, e.height = a.chartOption.isTwoXAxis ? "48%" : "26%") : d == 1 && (e.top = a.chartOption.isTwoXAxis ? "52%" : "30%", e.bottom = a.chartOption.xAxis[d].name ? 40 : 20);
908
- }) : y.length == 3 && y.forEach((e, d) => {
909
- d == 0 ? (e.top = 10, e.height = "26%") : (d == 1 || d == 2) && (e.top = "30%", e.bottom = 40);
910
- }), j.value = {
904
+ ), x.length == 1 ? x.forEach((e, t) => {
905
+ e.top = e.newTop ? e.newTop : 10, e.bottom = e.newBottom ? e.newBottom : n.chartOption.xAxis[t].name ? 40 : 20;
906
+ }) : x.length == 2 ? x.forEach((e, t) => {
907
+ t == 0 ? (e.top = 10, e.height = n.chartOption.isTwoXAxis ? "48%" : "26%") : t == 1 && (e.top = n.chartOption.isTwoXAxis ? "52%" : "30%", e.bottom = n.chartOption.xAxis[t].name ? 40 : 20);
908
+ }) : x.length == 3 && x.forEach((e, t) => {
909
+ t == 0 ? (e.top = 10, e.height = "26%") : (t == 1 || t == 2) && (e.top = "30%", e.bottom = 40);
910
+ }), K.value = {
911
911
  animation: !0,
912
912
  // 将 animation 设置为 false 关闭动画效果
913
913
  tooltip: {
914
- show: !(a.chartOption.isTooltipItem || a.chartOption.tooltipShow == !1),
914
+ show: !(n.chartOption.isTooltipItem || n.chartOption.tooltipShow == !1),
915
915
  hideDelay: 0,
916
916
  triggerOn: "mousemove",
917
- trigger: a.chartOption.tooltipType == "1" ? "item" : "axis",
917
+ trigger: n.chartOption.tooltipType == "1" ? "item" : "axis",
918
918
  axisPointer: {
919
919
  animation: !1,
920
920
  animationDuration: 1e3,
@@ -923,413 +923,353 @@ ${i.name}: ${i.value} ${i.unit}}`;
923
923
  // 数据更新动画的时长
924
924
  },
925
925
  formatter: function(e) {
926
- if (a.chartOption.tooltipType == "1") {
926
+ if (n.chartOption.tooltipType == "1") {
927
927
  if (e.componentSubType == "boxplot") {
928
- let d = f[0] ? f[0].unit : "", n = e.name + "<br/>";
929
- return n += `<div style='padding-right:8px'>
928
+ let t = f[0] ? f[0].unit : "", o = e.name + "<br/>";
929
+ return o += `<div style='padding-right:8px'>
930
930
  <div style='display:flex;flex-direction: column;'>
931
931
  <div>${e.marker} ${e.seriesName}</div>
932
932
  <div style='display:flex;align-items: center;margin-left: 18px'>
933
933
  <div style='margin-right:5px;'>最大:${e.value[4] ? e.value[4] : "--"}</div>
934
- <div style='width:30px'>${d}</div>
934
+ <div style='width:30px'>${t}</div>
935
935
  </div>
936
936
  <div style='display:flex;align-items: center;margin-left: 18px'>
937
937
  <div style='margin-right:5px;'>平均:${e.value[3] ? e.value[3] : "--"}</div>
938
- <div style='width:30px'>${d}</div>
938
+ <div style='width:30px'>${t}</div>
939
939
  </div>
940
940
  <div style='display:flex;align-items: center;margin-left: 18px'>
941
941
  <div style='margin-right:5px;'>最小:${e.value[2] ? e.value[2] : "--"}</div>
942
- <div style='width:30px'>${d}</div>
942
+ <div style='width:30px'>${t}</div>
943
943
  </div>
944
944
  </div>
945
- </div>`, n;
945
+ </div>`, o;
946
946
  }
947
- } else if (a.chartOption.tooltipType == "2" || a.chartOption.tooltipType == "4") {
948
- let d = "";
949
- return f.forEach((n) => {
950
- let p = e.find((b) => b.seriesName == n.name);
951
- if (p) {
952
- let b = p.axisId, F = /[\u4e00-\u9fa5]+|\([^)]+\)/g, u = b.match(F), t = u[0], g = u[1] ? u[1].replace(/[\(\)]/g, "") : u[0], r = a.chartOption.yAxis[0].name.match(F), i = r[0], S = r[1] ? r[1].replace(/[\(\)]/g, "") : r[0];
953
- a.chartOption.tooltipType == "4" && (d += `<div style='font-weight: bold;color: ${n.color};'>${p.seriesName}</div>`), d += `<div style='padding-right:8px'>
947
+ } else if (n.chartOption.tooltipType == "2" || n.chartOption.tooltipType == "4") {
948
+ let t = "";
949
+ return f.forEach((o) => {
950
+ let A = e.find((v) => v.seriesName == o.name);
951
+ if (A) {
952
+ let v = A.axisId, E = /[\u4e00-\u9fa5]+|\([^)]+\)/g, u = v.match(E), a = u[0], b = u[1] ? u[1].replace(/[\(\)]/g, "") : u[0], y = n.chartOption.yAxis[0].name.match(E), d = y[0], w = y[1] ? y[1].replace(/[\(\)]/g, "") : y[0];
953
+ n.chartOption.tooltipType == "4" && (t += `<div style='font-weight: bold;color: ${o.color};'>${A.seriesName}</div>`), t += `<div style='padding-right:8px'>
954
954
  <div style='display:flex;align-items: center;justify-content: space-between'>
955
- <div style='margin-right:8px;'>${i}</div>
955
+ <div style='margin-right:8px;'>${d}</div>
956
956
  <div style='display:flex;align-items: center;'>
957
- <div style='margin-right:5px;'>${p.value[1] || p.value[1] === 0 ? p.value[1] : "--"}</div>
958
- <div style='width:30px'>${S || ""}</div>
957
+ <div style='margin-right:5px;'>${A.value[1] || A.value[1] === 0 ? A.value[1] : "--"}</div>
958
+ <div style='width:30px'>${w || ""}</div>
959
959
  </div>
960
960
  </div>
961
961
  <div style='display:flex;align-items: center;justify-content: space-between'>
962
- <div style='margin-right:8px;'>${t}</div>
962
+ <div style='margin-right:8px;'>${a}</div>
963
963
  <div style='display:flex;align-items: center;'>
964
- <div style='margin-right:5px;'>${p.value[0] || p.value[0] === 0 ? p.value[0] : "--"}</div>
965
- <div style='width:30px'>${g || ""}</div>
964
+ <div style='margin-right:5px;'>${A.value[0] || A.value[0] === 0 ? A.value[0] : "--"}</div>
965
+ <div style='width:30px'>${b || ""}</div>
966
966
  </div>
967
967
  </div>
968
968
  </div>`;
969
969
  }
970
- }), d;
971
- } else if (a.chartOption.tooltipType == "3") {
972
- let d = [];
970
+ }), t;
971
+ } else if (n.chartOption.tooltipType == "3") {
972
+ let t = [];
973
973
  e.forEach((u) => {
974
- d.push(u.seriesName.replace(/\d+/g, ""));
974
+ t.push(u.seriesName.replace(/\d+/g, ""));
975
975
  });
976
- let n = "预报潮位", p = e[0].value[0] + "<br/>", b = 0, F = "";
977
- return f.forEach((u, t) => {
978
- let g = e.find((i) => i.seriesName == u.name), r = "";
979
- if (u.name.includes(n) ? (r = a.chartOption.plan[b], b++, f.find((i) => i.name == "预报潮位1") && (F = `<div>${r}</div>`)) : F = "", g) {
980
- let i = "";
981
- g.value[1] && (i = `<div style='padding-right:8px'>
982
- ${F}
976
+ let o = "预报潮位", A = e[0].value[0] + "<br/>", v = 0, E = "";
977
+ return f.forEach((u, a) => {
978
+ let b = e.find((d) => d.seriesName == u.name), y = "";
979
+ if (u.name.includes(o) ? (y = n.chartOption.plan[v], v++, f.find((d) => d.name == "预报潮位1") && (E = `<div>${y}</div>`)) : E = "", b) {
980
+ let d = "";
981
+ b.value[1] && (d = `<div style='padding-right:8px'>
982
+ ${E}
983
983
  <div style='display:flex;align-items: center;justify-content: space-between'>
984
- <div style='margin-right:8px;'>${g.marker} ${g.seriesName.replace(/\d+/g, "")}</div>
984
+ <div style='margin-right:8px;'>${b.marker} ${b.seriesName.replace(/\d+/g, "")}</div>
985
985
  <div style='display:flex;align-items: center;'>
986
- <div style='margin-right:5px;'>${g.value[1] ? g.value[1] : "--"}</div>
986
+ <div style='margin-right:5px;'>${b.value[1] ? b.value[1] : "--"}</div>
987
987
  <div style='width:30px'>${u.unit ? u.unit : ""}</div>
988
988
  </div>
989
989
  </div>
990
- </div>`), p += i;
990
+ </div>`), A += d;
991
991
  }
992
- }), p;
992
+ }), A;
993
993
  } else {
994
- let d = "";
995
- return a.chartOption.tooltipNameTimeType ? Array.isArray(e[0].value) ? d = O(e[0].value[0]).format(
996
- a.chartOption.tooltipNameTimeType
997
- ) + "<br/>" : d = O(e[0].name).format(
998
- a.chartOption.tooltipNameTimeType
999
- ) + "<br/>" : Array.isArray(e[0].value) ? d = String(e[0].value[0]).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;") + "<br/>" : d = e[0].name + "<br/>", f.forEach((n) => {
1000
- var b;
1001
- let p = e.find((F) => F.seriesName == n.name);
1002
- if (p && !(Array.isArray(p.value) && p.value[2] === !0)) {
1003
- let F = "";
1004
- n.key ? F = n.key : Q.value.forEach((g) => {
1005
- g.name == p.seriesName ? F = g.key ? g.key : n.name : g.children && g.children.forEach((r) => {
1006
- r.name == p.seriesName && (F = r.key);
994
+ let t = "";
995
+ return n.chartOption.tooltipNameTimeType ? Array.isArray(e[0].value) ? t = S(e[0].value[0]).format(
996
+ n.chartOption.tooltipNameTimeType
997
+ ) + "<br/>" : t = S(e[0].name).format(
998
+ n.chartOption.tooltipNameTimeType
999
+ ) + "<br/>" : Array.isArray(e[0].value) ? t = String(e[0].value[0]).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;") + "<br/>" : t = e[0].name + "<br/>", f.forEach((o) => {
1000
+ var v;
1001
+ let A = e.find((E) => E.seriesName == o.name);
1002
+ if (A && !(Array.isArray(A.value) && A.value[2] === !0)) {
1003
+ let E = "";
1004
+ o.key ? E = o.key : P.value.forEach((b) => {
1005
+ b.name == A.seriesName ? E = b.key ? b.key : o.name : b.children && b.children.forEach((y) => {
1006
+ y.name == A.seriesName && (E = y.key);
1007
1007
  });
1008
1008
  });
1009
- let u = "", t = "";
1010
- if (p.marker == '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:transparent;"></span>' ? t = `<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:${(b = M[n.name]) == null ? void 0 : b.color};"></span>` : t = p.marker, p.value) {
1011
- let g = "";
1012
- n.data2 ? g = n.data2.find((i) => i[0] == p.value[0])[1] : Array.isArray(p.value) ? g = p.value[1] : g = p.value, JSON.stringify(le) != "{}" && p.seriesName == "库容" ? g = le[e[0].value[0]] : JSON.stringify($) != "{}" && p.seriesName == "5分钟库容" && (g = $[e[0].value[0]]), u = `<div style='padding-right:8px'>
1009
+ let u = "", a = "";
1010
+ if (A.marker == '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:transparent;"></span>' ? a = `<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:${(v = M[o.name]) == null ? void 0 : v.color};"></span>` : a = A.marker, A.value) {
1011
+ let b = "";
1012
+ o.data2 ? b = o.data2.find((d) => d[0] == A.value[0])[1] : Array.isArray(A.value) ? b = A.value[1] : b = A.value, JSON.stringify(de) != "{}" && A.seriesName == "库容" ? b = de[e[0].value[0]] : JSON.stringify(ne) != "{}" && A.seriesName == "5分钟库容" && (b = ne[e[0].value[0]]), u = `<div style='padding-right:8px'>
1013
1013
  <div style='display:flex;align-items: center;justify-content: space-between'>
1014
- <div style='margin-right:8px;'>${t} ${F || p.seriesName}</div>
1014
+ <div style='margin-right:8px;'>${a} ${E || A.seriesName}</div>
1015
1015
  <div style='display:flex;align-items: center;'>
1016
- <div style='margin-right:5px;'>${g || g === 0 ? g : "--"}</div>
1017
- <div style='width:30px'>${n.unit ? n.unit : ""}</div>
1016
+ <div style='margin-right:5px;'>${b || b === 0 ? b : "--"}</div>
1017
+ <div style='width:30px'>${o.unit ? o.unit : ""}</div>
1018
1018
  </div>
1019
1019
  </div>
1020
1020
  </div>`;
1021
1021
  }
1022
- d += u;
1022
+ t += u;
1023
1023
  }
1024
- }), d;
1024
+ }), t;
1025
1025
  }
1026
1026
  }
1027
1027
  },
1028
1028
  legend: {
1029
1029
  show: !1,
1030
- selected: J
1030
+ selected: X
1031
1031
  },
1032
- grid: y,
1032
+ grid: x,
1033
1033
  axisPointer: {
1034
1034
  link: {
1035
1035
  xAxisIndex: "all"
1036
1036
  }
1037
1037
  },
1038
- xAxis: L,
1039
- yAxis: R,
1038
+ xAxis: N,
1039
+ yAxis: Q,
1040
1040
  dataZoom: [
1041
1041
  {
1042
1042
  type: "inside",
1043
1043
  //内置滑动,随鼠标滚轮展示
1044
1044
  xAxisIndex: [0, 1],
1045
- zoomLock: !!a.chartOption.zoomLock,
1046
- start: a.chartOption.viewDataRange ? a.chartOption.viewDataRange[0] : 0,
1047
- end: a.chartOption.viewDataRange ? a.chartOption.viewDataRange[1] : 100,
1048
- moveOnMouseMove: a.chartOption.series.some(
1045
+ zoomLock: !!n.chartOption.zoomLock,
1046
+ start: n.chartOption.viewDataRange ? n.chartOption.viewDataRange[0] : 0,
1047
+ end: n.chartOption.viewDataRange ? n.chartOption.viewDataRange[1] : 100,
1048
+ moveOnMouseMove: n.chartOption.series.some(
1049
1049
  (e) => e.openBarDrag && (e.type == "line" || e.type == "markLine")
1050
1050
  ) ? "ctrl" : !0
1051
1051
  }
1052
1052
  ],
1053
- series: Y
1054
- }, a.chartOption.visualMap && (j.value.visualMap = a.chartOption.visualMap.map((e) => {
1055
- let d = Y[e.seriesIndex], n = [], p = [];
1056
- return e.step ? p = wn(e.pieces, e.step) : p = e.pieces, p.forEach((b, F) => {
1057
- let u = new Date(b.startTm).getTime(), t = new Date(b.endTm).getTime();
1058
- F == 0 ? n.push(
1053
+ series: U
1054
+ }, n.chartOption.visualMap && (K.value.visualMap = n.chartOption.visualMap.map((e) => {
1055
+ let t = U[e.seriesIndex], o = [], A = [];
1056
+ return e.step ? A = Fn(e.pieces, e.step) : A = e.pieces, A.forEach((v, E) => {
1057
+ let u = new Date(v.startTm).getTime(), a = new Date(v.endTm).getTime();
1058
+ E == 0 ? o.push(
1059
1059
  {
1060
1060
  lt: u,
1061
- color: d.itemStyle.color
1061
+ color: t.itemStyle.color
1062
1062
  },
1063
1063
  {
1064
1064
  gte: u,
1065
- lte: t,
1065
+ lte: a,
1066
1066
  color: e.color ? e.color : "red"
1067
1067
  }
1068
- ) : n.push(
1068
+ ) : o.push(
1069
1069
  {
1070
- gt: n[n.length - 1].lte,
1070
+ gt: o[o.length - 1].lte,
1071
1071
  lt: u,
1072
- color: d.itemStyle.color
1072
+ color: t.itemStyle.color
1073
1073
  },
1074
1074
  {
1075
1075
  gte: u,
1076
- lte: t,
1076
+ lte: a,
1077
1077
  color: e.color ? e.color : "red"
1078
1078
  }
1079
1079
  );
1080
- }), n.push({
1081
- gt: n[n.length - 1].lte,
1082
- color: d.itemStyle.color
1080
+ }), o.push({
1081
+ gt: o[o.length - 1].lte,
1082
+ color: t.itemStyle.color
1083
1083
  }), {
1084
1084
  show: !1,
1085
1085
  dimension: e.dimension ? e.dimension : 0,
1086
1086
  seriesIndex: e.seriesIndex,
1087
- pieces: n
1087
+ pieces: o
1088
1088
  };
1089
- })), JSON.stringify(ne) != "{}" && (j.value.dataZoom[0] = ne), console.log(j.value), I.setOption(j.value, !0), I.getOption().series.map((e) => {
1090
- e.markPoint && (ge[e.name] = e.markPoint);
1091
- }), a.chartOption.isTooltipItem) {
1089
+ })), JSON.stringify(re) != "{}" && (K.value.dataZoom[0] = re), console.log(K.value), k.setOption(K.value, !0), k.getOption().series.map((e) => {
1090
+ e.markPoint && (be[e.name] = e.markPoint);
1091
+ }), n.chartOption.isTooltipItem) {
1092
1092
  let e = document.createElement("div");
1093
- e.className = "line-name-tooltip-style", fe.appendChild(e), I.on("mouseover", function(d) {
1094
- d.componentType === "series" && d.seriesType === "line" ? (e.innerText = `${d.seriesName}`, e.style.left = `${d.event.offsetX}px`, e.style.top = `${d.event.offsetY}px`, e.style.opacity = "1") : e && (e.style.opacity = "0");
1095
- }), I.on("mouseout", function(d) {
1093
+ e.className = "line-name-tooltip-style", Ae.appendChild(e), k.on("mouseover", function(t) {
1094
+ t.componentType === "series" && t.seriesType === "line" ? (e.innerText = `${t.seriesName}`, e.style.left = `${t.event.offsetX}px`, e.style.top = `${t.event.offsetY}px`, e.style.opacity = "1") : e && (e.style.opacity = "0");
1095
+ }), k.on("mouseout", function(t) {
1096
1096
  e && (e.style.opacity = "0");
1097
1097
  });
1098
1098
  } else {
1099
- const e = fe.querySelectorAll(".line-name-tooltip-style");
1100
- e.length > 0 && e.forEach((d) => {
1101
- d.remove();
1099
+ const e = Ae.querySelectorAll(".line-name-tooltip-style");
1100
+ e.length > 0 && e.forEach((t) => {
1101
+ t.remove();
1102
1102
  });
1103
1103
  }
1104
- I.off("click"), I.on("click", (e) => {
1105
- var d;
1106
- if (f.find((n) => n.name == e.seriesName)) {
1107
- let n = f.find(
1108
- (p) => p.name == e.seriesName
1109
- );
1110
- if (e.seriesType === "line") {
1111
- const p = e.data, b = e.seriesIndex;
1112
- let F = I.getOption().series[b].markPoint ? I.getOption().series[b].markPoint.data : [], u = F.filter((r) => r.name != "Max" && r.name != "Min").map((r) => r.coord[0]), t = [], g;
1113
- l.forEach((r, i) => {
1114
- O(r).isValid() && r == p[0] && (i >= l.length / 5 * 4 ? g = [-200, 0] : i >= l.length / 5 * 3 ? g = [-150, 0] : i >= l.length / 5 * 2 ? g = [-100, 0] : i >= l.length / 5 * 1 ? g = [-50, 0] : i >= 0 && (g = [0, 0]));
1115
- }), u.includes(e.value[0]) ? t = F.filter(
1116
- (r) => r.name == "Max" || r.name == "Min" || r.coord[0] != e.value[0]
1117
- ) : t = [
1118
- ...F,
1119
- {
1120
- coord: p,
1121
- name: `${p[0]}
1122
- ${e.seriesName}: ${p[1]} ${n.unit}`,
1123
- label: {
1124
- offset: g || [-120, 0]
1125
- }
1126
- }
1127
- ], j.value.series[b].markPoint = {
1128
- symbol: "pin",
1129
- symbolSize: 20,
1130
- label: {
1131
- show: !0,
1132
- position: "top",
1133
- align: "left",
1134
- fontSize: 16,
1135
- backgroundColor: n.backgroundColor ? n.backgroundColor : M[n.name] ? M[n.name].color : n.color,
1136
- borderRadius: 6,
1137
- shadowColor: "#666666",
1138
- shadowBlur: 5,
1139
- shadowOffsetX: 3,
1140
- shadowOffsetY: 3,
1141
- fontWeight: "bold",
1142
- padding: [4, 4, 4, 4],
1143
- lineHeight: 30,
1144
- color: n.markPointColor ? n.markPointColor : "#fff",
1145
- formatter: (r) => {
1146
- let i = "", S = n.tmType ? n.tmType : "YYYY-MM-DD HH:mm";
1147
- r.data && r.data.coord && r.data.coord[0] && (i = O(r.data.coord[0]).format(S));
1148
- let h = "", v = "";
1149
- if (r.name == "Max" || r.name == "Min") {
1150
- if (r.name == "Max")
1151
- return h = n.maxText ? n.maxText : "最大值", n.unit.includes("m³") ? v = r.value ? ee(r.value) : "--" : n.unit.includes("mm") ? v = r.value ? Number(r.value).toFixed(1) : "--" : n.unit.includes("m") ? v = r.value ? Number(r.value).toFixed(2) : "--" : v = r.value, n.tmText ? `${h}: {a0|${v}} ${n.unit}
1152
- ${n.tmText}: {a1|${i}}` : `${n.tmText2 ? n.tmText2 : "相应时间"}: {a1|${i}}
1153
- ${h}: {a0|${v}} ${n.unit}`;
1154
- } else
1155
- return `相应时间: {a1|${O(r.data.coord[0]).format(
1156
- S
1157
- )}}
1158
- ${n.name}: {a0|${r.data.coord[1]}} ${n.unit}`;
1159
- },
1160
- rich: {
1161
- a0: {
1162
- fontSize: 25,
1163
- fontFamily: "Times New Roman"
1164
- },
1165
- a1: {
1166
- fontSize: 20,
1167
- fontFamily: "Times New Roman"
1168
- }
1169
- }
1170
- },
1171
- data: t
1172
- }, j.value.dataZoom[0] = { ...(d = I.getOption()) == null ? void 0 : d.dataZoom[0] }, I.setOption(j.value, !0), I.getOption().series.map((r) => {
1173
- r.markPoint && (ge[r.name] = r.markPoint);
1174
- });
1175
- }
1176
- }
1177
- }), I.on("mousedown", function(e) {
1178
- I.setOption({
1179
- tooltip: {
1180
- show: !1
1104
+ k.off("click"), k.on("click", (e) => {
1105
+ var I, D, T;
1106
+ const t = f.find((F) => F.name == e.seriesName);
1107
+ if (!t || e.seriesType !== "line") return;
1108
+ const { data: o, seriesIndex: A } = e, E = ((I = k.getOption().series[A].markPoint) == null ? void 0 : I.data) || [], u = r.findIndex(
1109
+ (F) => S(F).isValid() && F == o[0]
1110
+ ), a = u >= 0 ? [-Math.floor(u / (r.length / 5)) * 50, 0] : [-120, 0], y = new Set(
1111
+ E.filter((F) => F.name !== "Max" && F.name !== "Min").map((F) => F.coord[0])
1112
+ ).has(e.value[0]) ? E.filter(
1113
+ (F) => F.name === "Max" || F.name === "Min" || F.coord[0] !== e.value[0]
1114
+ ) : [
1115
+ ...E,
1116
+ {
1117
+ coord: o,
1118
+ name: `${o[0]}
1119
+ ${e.seriesName}: ${o[1]} ${t.unit}`,
1120
+ label: { offset: a }
1181
1121
  }
1182
- }), I.dispatchAction({
1183
- type: "hideTip"
1184
- });
1185
- let d = e.seriesIndex, n = a.chartOption.series[d], p = n.stepTM ? n.stepTM : 60, b = "", F = "", u = "";
1186
- if (n.openBarDrag) {
1187
- let t = {}, g = {}, r = a.chartOption.yAxis[n.yAxisIndex], i = [];
1188
- e.componentType == "markLine" && n.data.name == "xAxis" ? i = j.value.series.map((w, C) => w.name == "开始" || w.name == "结束" ? JSON.parse(JSON.stringify(w)) : {}) : i = j.value.series.map((w, C) => C == d ? {
1189
- data: JSON.parse(JSON.stringify(w.data))
1190
- } : {});
1191
- let S, h, v;
1192
- a.chartOption.fixedTimePeriod && (b = a.chartOption.series.find((w) => w.name == "开始").data.value, F = a.chartOption.series.find((w) => w.name == "结束").data.value, u = O(F).diff(O(b), "hour")), I.getZr().off("mousemove"), I.getZr().off("mouseup"), I.getZr().on("mousemove", function(w) {
1193
- if (e.componentType == "markLine" && n.data.name == "xAxis") {
1194
- let C = I.convertFromPixel(
1195
- { xAxisIndex: n.xAxisIndex },
1196
- w.offsetX
1197
- ), z = O(C).format("YYYY-MM-DD HH:00");
1198
- if (z !== S) {
1199
- const V = O(z), P = O(l[l.length - 1]), pe = k ? O(k) : "";
1200
- if (V.isAfter(P) || V.isBefore(pe))
1201
- return;
1202
- if (a.chartOption.fixedTimePeriod) {
1203
- if (n.name == "开始" ? v = O(z).add(u, "hours").format("YYYY-MM-DD HH:00") : n.name == "结束" && (v = O(z).add(-u, "hours").format("YYYY-MM-DD HH:00")), n.name == "开始" && O(v).isAfter(P))
1204
- return;
1205
- if (n.name == "结束" && O(v).isBefore(pe))
1206
- return;
1207
- i.forEach((B) => {
1208
- n.name == "开始" ? B.name == "开始" ? (B.markLine.data[0].xAxis = z, B.markArea.data[0][0].xAxis = z, B.markArea.data[0][1].xAxis = v) : B.name == "结束" && (B.markLine.data[0].xAxis = v) : n.name == "结束" && (B.name == "开始" ? (B.markLine.data[0].xAxis = v, B.markArea.data[0][0].xAxis = v, B.markArea.data[0][1].xAxis = z) : B.name == "结束" && (B.markLine.data[0].xAxis = z));
1209
- });
1210
- } else
1211
- i.forEach((B) => {
1212
- n.name == "开始" ? B.name == "开始" && (B.markLine.data[0].xAxis = z, B.markArea.data[0][0].xAxis = z) : n.name == "结束" && (B.name == "开始" ? B.markArea.data[0][1].xAxis = z : B.name == "结束" && (B.markLine.data[0].xAxis = z));
1213
- });
1214
- I.setOption({
1215
- series: i
1216
- }, {
1217
- notMerge: !1,
1218
- lazyUpdate: !0
1219
- }), S = z;
1220
- }
1221
- } else {
1222
- let [C, z] = I.convertFromPixel({ seriesIndex: d }, [
1223
- w.offsetX,
1224
- w.offsetY
1225
- ]);
1226
- if (O(C).format("YYYY-MM-DD HH:00") !== S || !h || Math.abs(z - h) >= 0.5) {
1227
- const V = O(C).format("YYYY-MM-DD HH:00");
1228
- g[V] = z;
1229
- let P = Object.keys(g), pe = new Set(P);
1230
- i[d].data.forEach((U) => {
1231
- pe.has(U[0]) && (U[1] = g[U[0]]);
1232
- });
1233
- let B = Ye(
1234
- new Date(P[0]),
1235
- new Date(P[P.length - 1]),
1236
- p
1237
- ), be = Object.entries(g), nn = new Set(P);
1238
- B.forEach((U) => {
1239
- nn.has(U) || be.push(_e(be, U));
1240
- });
1241
- let re = {};
1242
- be.forEach((U) => {
1243
- re[U[0]] = U[1];
1244
- });
1245
- let an = Object.keys(re), tn = new Set(an);
1246
- i[d].data.forEach((U) => {
1247
- if (tn.has(U[0])) {
1248
- let Ae = "";
1249
- r.name.includes("m³") ? Ae = ee(re[U[0]]) : r.name.includes("mm") ? Ae = re[U[0]].toFixed(1) : r.name.includes("m") && (Ae = re[U[0]].toFixed(2)), U[1] = Ae;
1250
- }
1251
- }), I.setOption({
1252
- series: i
1253
- }, {
1254
- notMerge: !1,
1255
- lazyUpdate: !0
1256
- }), S = V, h = z;
1122
+ ], d = (F, H) => F ? H.includes("m³") ? le(F) : H.includes("mm") ? Number(F).toFixed(1) : H.includes("m") ? Number(F).toFixed(2) : F : "--", w = t.tmType || "YYYY-MM-DD HH:mm", c = t.backgroundColor || ((D = M[t.name]) == null ? void 0 : D.color) || t.color;
1123
+ K.value.series[A].markPoint = {
1124
+ symbol: "pin",
1125
+ symbolSize: 20,
1126
+ label: {
1127
+ show: !0,
1128
+ position: "top",
1129
+ align: "left",
1130
+ fontSize: 16,
1131
+ backgroundColor: c,
1132
+ borderRadius: 6,
1133
+ shadowColor: "#666666",
1134
+ shadowBlur: 5,
1135
+ shadowOffsetX: 3,
1136
+ shadowOffsetY: 3,
1137
+ fontWeight: "bold",
1138
+ padding: [4, 4, 4, 4],
1139
+ lineHeight: 30,
1140
+ color: t.markPointColor || "#fff",
1141
+ formatter: (F) => {
1142
+ var J, B;
1143
+ const H = (B = (J = F.data) == null ? void 0 : J.coord) == null ? void 0 : B[0], ae = H ? S(H).format(w) : "";
1144
+ if (F.name === "Max") {
1145
+ const R = t.maxText || "最大值", z = d(F.value, t.unit), $ = t.tmText || t.tmText2 || "相应时间";
1146
+ return t.tmText ? `${R}: {a0|${z}} ${t.unit}
1147
+ ${$}: {a1|${ae}}` : `${$}: {a1|${ae}}
1148
+ ${R}: {a0|${z}} ${t.unit}`;
1257
1149
  }
1150
+ if (F.name !== "Min")
1151
+ return `相应时间: {a1|${S(H).format(w)}}
1152
+ ${t.name}: {a0|${F.data.coord[1]}} ${t.unit}`;
1153
+ },
1154
+ rich: {
1155
+ a0: { fontSize: 25, fontFamily: "Times New Roman" },
1156
+ a1: { fontSize: 20, fontFamily: "Times New Roman" }
1258
1157
  }
1259
- }), I.getZr().on("mouseup", function() {
1260
- if (I.getZr().off("mousemove"), I.getZr().off("mouseup"), e.componentType == "markLine" && n.data.name == "xAxis") {
1261
- if (S)
1262
- if (v) {
1263
- const w = O(l[l.length - 1]), C = k ? O(k) : "";
1264
- n.name == "开始" && O(v).isAfter(w) ? v = O(S).add(u, "hours").format("YYYY-MM-DD HH:00") : n.name == "结束" && O(v).isBefore(C) && (v = O(S).add(-u, "hours").format("YYYY-MM-DD HH:00")), t = {
1265
- name: "开始/结束",
1266
- value: n.name == "开始" ? `${S}/${v}` : `${v}/${S}`
1267
- };
1268
- } else
1269
- t = {
1270
- name: n.name,
1271
- value: S
1272
- };
1158
+ },
1159
+ data: y
1160
+ }, K.value.dataZoom[0] = { ...(T = k.getOption()) == null ? void 0 : T.dataZoom[0] }, k.setOption(K.value, !0), k.getOption().series.forEach((F) => {
1161
+ F.markPoint && (be[F.name] = F.markPoint);
1162
+ });
1163
+ }), k.on("mousedown", function(e) {
1164
+ k.setOption({ tooltip: { show: !1 } }), k.dispatchAction({ type: "hideTip" });
1165
+ const { seriesIndex: t } = e, o = n.chartOption.series[t];
1166
+ if (!(o != null && o.openBarDrag)) return;
1167
+ const A = o.stepTM || 60, v = e.componentType === "markLine" && o.data.name === "xAxis", E = o.name === "开始", u = n.chartOption.yAxis[o.yAxisIndex], a = {};
1168
+ let b = {}, y, d, w;
1169
+ const c = K.value.series.map((B, R) => v ? B.name === "开始" || B.name === "结束" ? JSON.parse(JSON.stringify(B)) : {} : R === t ? { data: JSON.parse(JSON.stringify(B.data)) } : {});
1170
+ let I = 0;
1171
+ if (n.chartOption.fixedTimePeriod) {
1172
+ const B = n.chartOption.series.find((z) => z.name === "开始").data.value, R = n.chartOption.series.find((z) => z.name === "结束").data.value;
1173
+ I = S(R).diff(S(B), "hour");
1174
+ }
1175
+ const D = S(r[r.length - 1]), T = O ? S(O) : null, F = (B) => {
1176
+ const R = u.name;
1177
+ return R.includes("m³") ? le(B) : R.includes("mm") ? B.toFixed(1) : R.includes("m") ? B.toFixed(2) : B;
1178
+ }, H = (B, R) => {
1179
+ c.forEach((z) => {
1180
+ z.name === "开始" ? (z.markLine.data[0].xAxis = B, z.markArea.data[0][0].xAxis = B, R != null && (z.markArea.data[0][1].xAxis = R)) : z.name === "结束" && (z.markLine.data[0].xAxis = R ?? z.markLine.data[0].xAxis);
1181
+ });
1182
+ }, ae = () => {
1183
+ k.setOption({ series: c }, { notMerge: !1, lazyUpdate: !0 });
1184
+ }, J = k.getZr();
1185
+ J.off("mousemove"), J.off("mouseup"), J.on("mousemove", function(B) {
1186
+ if (v) {
1187
+ const R = k.convertFromPixel({ xAxisIndex: o.xAxisIndex }, B.offsetX), z = S(R).format("YYYY-MM-DD HH:00");
1188
+ if (z === y) return;
1189
+ const $ = S(z);
1190
+ if ($.isAfter(D) || T && $.isBefore(T)) return;
1191
+ if (n.chartOption.fixedTimePeriod) {
1192
+ const G = E ? I : -I;
1193
+ if (w = S(z).add(G, "hours").format("YYYY-MM-DD HH:00"), E && S(w).isAfter(D) || !E && T && S(w).isBefore(T)) return;
1194
+ H(
1195
+ E ? z : w,
1196
+ E ? w : z
1197
+ );
1273
1198
  } else
1274
- t = {
1275
- name: e.seriesName,
1276
- data: i[d].data
1277
- };
1278
- t.name && Ue("getNewSeriesData", t), I.getZr().on("mousemove", function(w) {
1279
- let C = w.offsetX, z = w.offsetY;
1280
- I.dispatchAction({
1281
- type: "showTip",
1282
- x: C,
1283
- y: z
1199
+ E ? H(z, null) : c.forEach((G) => {
1200
+ G.name === "开始" && (G.markArea.data[0][1].xAxis = z), G.name === "结束" && (G.markLine.data[0].xAxis = z);
1284
1201
  });
1202
+ ae(), y = z;
1203
+ } else {
1204
+ const [R, z] = k.convertFromPixel({ seriesIndex: t }, [B.offsetX, B.offsetY]), $ = S(R).format("YYYY-MM-DD HH:00");
1205
+ if ($ === y && d && Math.abs(z - d) < 0.5) return;
1206
+ a[$] = z;
1207
+ const G = Object.keys(a).sort(), ke = new Set(G);
1208
+ c[t].data.forEach((j) => {
1209
+ ke.has(j[0]) && (j[1] = a[j[0]]);
1285
1210
  });
1211
+ const rn = Qe(new Date(G[0]), new Date(G[G.length - 1]), A);
1212
+ let ge = Object.entries(a).sort((j, we) => S(j[0]).valueOf() - S(we[0]).valueOf());
1213
+ const sn = rn.filter((j) => !ke.has(j)).map((j) => on(ge, j));
1214
+ ge = ge.concat(sn).sort((j, we) => S(j[0]).valueOf() - S(we[0]).valueOf());
1215
+ const De = new Map(ge);
1216
+ c[t].data.forEach((j) => {
1217
+ De.has(j[0]) && (j[1] = F(De.get(j[0])));
1218
+ }), ae(), y = $, d = z;
1219
+ }
1220
+ }), J.on("mouseup", function() {
1221
+ J.off("mousemove"), J.off("mouseup"), v ? y && (w ? (E && S(w).isAfter(D) ? w = S(y).add(I, "hours").format("YYYY-MM-DD HH:00") : !E && T && S(w).isBefore(T) && (w = S(y).add(-I, "hours").format("YYYY-MM-DD HH:00")), b = {
1222
+ name: "开始/结束",
1223
+ value: E ? `${y}/${w}` : `${w}/${y}`
1224
+ }) : b = { name: o.name, value: y }) : b = { name: e.seriesName, data: c[t].data }, b.name && Pe("getNewSeriesData", b), J.on("mousemove", ({ offsetX: B, offsetY: R }) => {
1225
+ k.dispatchAction({ type: "showTip", x: B, y: R });
1286
1226
  });
1287
- }
1227
+ });
1288
1228
  }), window.onresize = function() {
1289
- I.resize();
1229
+ k.resize();
1290
1230
  };
1291
- }, ue = (c) => {
1292
- Oe(() => {
1293
- I && I.resize();
1231
+ }, ye = () => {
1232
+ Te(() => {
1233
+ k && k.resize();
1294
1234
  });
1295
- }, he = (c, f) => {
1296
- I.dispatchAction({
1235
+ }, xe = (s, f) => {
1236
+ k.dispatchAction({
1297
1237
  type: f ? "legendSelect" : "legendUnSelect",
1298
1238
  // 图例名称
1299
- name: c
1239
+ name: s
1300
1240
  });
1301
1241
  };
1302
- function Pe(c) {
1303
- return c.month() === 0 && c.date() === 1 && c.hour() === 0 && c.minute() === 0;
1242
+ function Ke(s) {
1243
+ return s.month() === 0 && s.date() === 1 && s.hour() === 0 && s.minute() === 0;
1304
1244
  }
1305
- function Ge(c) {
1306
- c.preventDefault();
1245
+ function $e(s) {
1246
+ s.preventDefault();
1307
1247
  let f = document.querySelector("body .chartMenu");
1308
1248
  f && f.remove();
1309
- let s = c.pageX, x = c.pageY, l = document.createElement("ul");
1310
- l.style.position = "absolute", l.style.left = s + "px", l.style.top = x + "px", l.className = "chartMenu";
1311
- let k = document.createElement("li");
1312
- k.style.cursor = "pointer", k.innerHTML = `<div><img src='${In}'><span>还原缩放</span></div>`, l.appendChild(k);
1313
- let y = document.createElement("li");
1314
- y.style.cursor = "pointer", y.innerHTML = `<div><img src='${On}'><span>复制图片</span></div>`, l.appendChild(y);
1315
- let L = document.createElement("li");
1316
- L.style.cursor = "pointer", L.innerHTML = `<div><img src='${kn}'><span>导出图片</span></div>`, l.appendChild(L), k.addEventListener("click", () => {
1317
- I.dispatchAction({
1249
+ let i = s.pageX, p = s.pageY, r = document.createElement("ul");
1250
+ r.style.position = "absolute", r.style.left = i + "px", r.style.top = p + "px", r.className = "chartMenu";
1251
+ let O = document.createElement("li");
1252
+ O.style.cursor = "pointer", O.innerHTML = `<div><img src='${Dn}'><span>还原缩放</span></div>`, r.appendChild(O);
1253
+ let x = document.createElement("li");
1254
+ x.style.cursor = "pointer", x.innerHTML = `<div><img src='${Cn}'><span>复制图片</span></div>`, r.appendChild(x);
1255
+ let N = document.createElement("li");
1256
+ N.style.cursor = "pointer", N.innerHTML = `<div><img src='${Tn}'><span>导出图片</span></div>`, r.appendChild(N), O.addEventListener("click", () => {
1257
+ k.dispatchAction({
1318
1258
  type: "dataZoom",
1319
1259
  dataZoomIndex: 0,
1320
1260
  start: 0,
1321
1261
  end: 100
1322
1262
  });
1323
- }), y.addEventListener("click", () => {
1324
- Le(A.value, {
1263
+ }), x.addEventListener("click", () => {
1264
+ Ue(h.value, {
1325
1265
  // dpi: 300, // 精度,处理模糊问题
1326
1266
  useCORS: !0,
1327
1267
  // 允许跨域
1328
1268
  scale: 2,
1329
1269
  // 当前显示设备的物理像素分辨率与CSS像素分辨率之比
1330
- width: A.value.offsetWidth,
1270
+ width: h.value.offsetWidth,
1331
1271
  //图片宽度可自行设置
1332
- height: A.value.offsetHeight + 50,
1272
+ height: h.value.offsetHeight + 50,
1333
1273
  //图片高度可自行设置
1334
1274
  backgroundColor: "#fff",
1335
1275
  //图片背景色
@@ -1338,66 +1278,66 @@ ${n.name}: {a0|${r.data.coord[1]}} ${n.unit}`;
1338
1278
  removeContainer: !0
1339
1279
  // 清除临时创建的克隆dom元素
1340
1280
  // eslint-disable-next-line space-before-function-paren
1341
- }).then((R) => {
1342
- const E = R.toDataURL("image/png"), Y = Je(E, "图片");
1343
- Xe(Y), yn.success("复制成功");
1281
+ }).then((Q) => {
1282
+ const m = Q.toDataURL("image/png"), U = Ze(m, "图片");
1283
+ qe(U), bn.success("复制成功");
1344
1284
  });
1345
- }), L.addEventListener("click", () => {
1346
- Ze();
1347
- }), document.body.appendChild(l), document.addEventListener("click", () => {
1348
- l.parentNode && document.body.removeChild(l);
1285
+ }), N.addEventListener("click", () => {
1286
+ nn();
1287
+ }), document.body.appendChild(r), document.addEventListener("click", () => {
1288
+ r.parentNode && document.body.removeChild(r);
1349
1289
  });
1350
1290
  }
1351
- const Je = (c, f = "file") => {
1352
- const s = c.split(","), x = s[0].match(/:(.*?);/)[1], l = x.split("/")[1], k = window.atob(s[1]);
1353
- let y = k.length;
1354
- const L = new Uint8Array(y);
1355
- for (; y--; )
1356
- L[y] = k.charCodeAt(y);
1357
- return new File([L], `${f}.${l}`, {
1358
- type: x
1291
+ const Ze = (s, f = "file") => {
1292
+ const i = s.split(","), p = i[0].match(/:(.*?);/)[1], r = p.split("/")[1], O = window.atob(i[1]);
1293
+ let x = O.length;
1294
+ const N = new Uint8Array(x);
1295
+ for (; x--; )
1296
+ N[x] = O.charCodeAt(x);
1297
+ return new File([N], `${f}.${r}`, {
1298
+ type: p
1359
1299
  });
1360
- }, Xe = (c) => {
1300
+ }, qe = (s) => {
1361
1301
  const f = new FileReader();
1362
- f.onload = (s) => {
1363
- const x = s.target.result.toString(), l = new Image();
1364
- l.src = x, l.onload = () => {
1365
- let k = We(l), y = Ke(
1366
- k.replace("data:image/png;base64,", ""),
1302
+ f.onload = (i) => {
1303
+ const p = i.target.result.toString(), r = new Image();
1304
+ r.src = p, r.onload = () => {
1305
+ let O = _e(r), x = en(
1306
+ O.replace("data:image/png;base64,", ""),
1367
1307
  "image/png",
1368
1308
  512
1369
1309
  );
1370
1310
  navigator.clipboard.write([
1371
1311
  new ClipboardItem({
1372
- "image/png": y
1312
+ "image/png": x
1373
1313
  })
1374
1314
  ]);
1375
1315
  };
1376
- }, f.readAsDataURL(c);
1377
- }, We = (c) => {
1316
+ }, f.readAsDataURL(s);
1317
+ }, _e = (s) => {
1378
1318
  let f = document.createElement("canvas");
1379
- return f.width = c.width, f.height = c.height, f.getContext("2d").drawImage(c, 0, 0, c.width, c.height), f.toDataURL("image/png");
1380
- }, Ke = (c, f, s) => {
1381
- f = f || "", s = s || 512;
1382
- let x = window.atob(c), l = [];
1383
- for (let y = 0; y < x.length; y += s) {
1384
- let L = x.slice(y, y + s), R = new Array(L.length);
1385
- for (let Y = 0; Y < L.length; Y++)
1386
- R[Y] = L.charCodeAt(Y);
1387
- let E = new Uint8Array(R);
1388
- l.push(E);
1319
+ return f.width = s.width, f.height = s.height, f.getContext("2d").drawImage(s, 0, 0, s.width, s.height), f.toDataURL("image/png");
1320
+ }, en = (s, f, i) => {
1321
+ f = f || "", i = i || 512;
1322
+ let p = window.atob(s), r = [];
1323
+ for (let x = 0; x < p.length; x += i) {
1324
+ let N = p.slice(x, x + i), Q = new Array(N.length);
1325
+ for (let U = 0; U < N.length; U++)
1326
+ Q[U] = N.charCodeAt(U);
1327
+ let m = new Uint8Array(Q);
1328
+ r.push(m);
1389
1329
  }
1390
- return new Blob(l, { type: f });
1391
- }, Ze = () => {
1392
- Le(A.value, {
1330
+ return new Blob(r, { type: f });
1331
+ }, nn = () => {
1332
+ Ue(h.value, {
1393
1333
  // dpi: 300, // 精度,处理模糊问题
1394
1334
  useCORS: !0,
1395
1335
  // 允许跨域
1396
1336
  scale: 1,
1397
1337
  // 当前显示设备的物理像素分辨率与CSS像素分辨率之比
1398
- width: A.value.offsetWidth,
1338
+ width: h.value.offsetWidth,
1399
1339
  //图片宽度可自行设置
1400
- height: A.value.offsetHeight + 50,
1340
+ height: h.value.offsetHeight + 50,
1401
1341
  //图片高度可自行设置
1402
1342
  backgroundColor: "#fff",
1403
1343
  //图片背景色
@@ -1406,152 +1346,152 @@ ${n.name}: {a0|${r.data.coord[1]}} ${n.unit}`;
1406
1346
  removeContainer: !0
1407
1347
  // 清除临时创建的克隆dom元素
1408
1348
  // eslint-disable-next-line space-before-function-paren
1409
- }).then((c) => {
1410
- const f = c.toDataURL("image/png"), s = document.createElement("a");
1411
- s.href = f, s.download = a.chartOption.title, s.click();
1349
+ }).then((s) => {
1350
+ const f = s.toDataURL("image/png"), i = document.createElement("a");
1351
+ i.href = f, i.download = n.chartOption.title, i.click();
1412
1352
  });
1413
- }, ve = ie();
1414
- function $e() {
1415
- return ve.value ? ve.value.offsetHeight : 0;
1353
+ }, Me = fe();
1354
+ function an() {
1355
+ return Me.value ? Me.value.offsetHeight : 0;
1416
1356
  }
1417
- function qe(c, f) {
1418
- return new Promise((s) => {
1419
- Sn({
1420
- STCD: a.chartOption.stationCode,
1421
- rzw: c
1422
- }).then((x) => {
1423
- x.statusCode == 200 && x.data ? s(x.data) : s(f * 1e3);
1357
+ function tn(s, f) {
1358
+ return new Promise((i) => {
1359
+ kn({
1360
+ STCD: n.chartOption.stationCode,
1361
+ rzw: s
1362
+ }).then((p) => {
1363
+ p.statusCode == 200 && p.data ? i(p.data) : i(f * 1e3);
1424
1364
  });
1425
1365
  });
1426
1366
  }
1427
- function _e(c, f) {
1428
- if (c.length > 0) {
1429
- let s = c.filter(
1430
- (l) => O(l[0]).isBefore(O(f))
1431
- ), x = c.filter(
1432
- (l) => O(l[0]).isAfter(O(f))
1367
+ function on(s, f) {
1368
+ if (s.length > 0) {
1369
+ let i = s.filter(
1370
+ (r) => S(r[0]).isBefore(S(f))
1371
+ ), p = s.filter(
1372
+ (r) => S(r[0]).isAfter(S(f))
1433
1373
  );
1434
- if (s.length == 0)
1435
- return [f, x[0][1]];
1436
- if (x.length == 0)
1437
- return [f, s[s.length - 1][1]];
1374
+ if (i.length == 0)
1375
+ return [f, p[0][1]];
1376
+ if (p.length == 0)
1377
+ return [f, i[i.length - 1][1]];
1438
1378
  {
1439
- let l = O(f).diff(
1440
- O(s[s.length - 1][0]),
1379
+ let r = S(f).diff(
1380
+ S(i[i.length - 1][0]),
1441
1381
  "seconds"
1442
- ), k = x[0][1] - s[s.length - 1][1], y = O(x[0][0]).diff(
1443
- O(s[s.length - 1][0]),
1382
+ ), O = p[0][1] - i[i.length - 1][1], x = S(p[0][0]).diff(
1383
+ S(i[i.length - 1][0]),
1444
1384
  "seconds"
1445
- ), L = l * k / y + s[s.length - 1][1];
1446
- return [f, Number(L)];
1385
+ ), N = r * O / x + i[i.length - 1][1];
1386
+ return [f, Number(N)];
1447
1387
  }
1448
1388
  }
1449
1389
  }
1450
- function en(c) {
1451
- var y;
1452
- let f = (y = a.chartOption.series.find((L) => L.name == "开始")) == null ? void 0 : y.data.value;
1453
- const s = O(f), x = O(c), l = s.year() === x.year();
1454
- return l && s.month() === x.month() ? x.format("DD HH:mm") : l ? x.format("MM-DD HH:mm") : x.format("YYYY-MM-DD HH:mm");
1390
+ function ln(s) {
1391
+ var x;
1392
+ let f = (x = n.chartOption.series.find((N) => N.name == "开始")) == null ? void 0 : x.data.value;
1393
+ const i = S(f), p = S(s), r = i.year() === p.year();
1394
+ return r && i.month() === p.month() ? p.format("DD HH:mm") : r ? p.format("MM-DD HH:mm") : p.format("YYYY-MM-DD HH:mm");
1455
1395
  }
1456
- return m({
1457
- getLegendBoxHeight: $e,
1458
- onChange: ce
1459
- }), (c, f) => {
1460
- const s = _("el-checkbox"), x = _("svg-icon"), l = _("el-icon"), k = _("el-dropdown-item"), y = _("el-dropdown-menu"), L = _("el-dropdown"), R = on("resize");
1461
- return xe((H(), Z("div", {
1396
+ return g({
1397
+ getLegendBoxHeight: an,
1398
+ onChange: pe
1399
+ }), (s, f) => {
1400
+ const i = oe("el-checkbox"), p = oe("svg-icon"), r = oe("el-icon"), O = oe("el-dropdown-item"), x = oe("el-dropdown-menu"), N = oe("el-dropdown"), Q = cn("resize");
1401
+ return me((V(), ee("div", {
1462
1402
  class: "box",
1463
1403
  ref_key: "chartBox",
1464
- ref: A,
1465
- onContextmenu: f[1] || (f[1] = (E) => Ge(E))
1404
+ ref: h,
1405
+ onContextmenu: f[1] || (f[1] = (m) => $e(m))
1466
1406
  }, [
1467
- xe((H(), Z("div", Fn, [
1468
- ke(se(o.chartOption.title), 1)
1407
+ me((V(), ee("div", zn, [
1408
+ ze(ue(l.chartOption.title), 1)
1469
1409
  ])), [
1470
- [Fe, o.chartOption.title],
1471
- [R, ue]
1410
+ [Le, l.chartOption.title],
1411
+ [Q, ye]
1472
1412
  ]),
1473
- xe((H(), Z("div", Dn, [
1474
- ke(se(o.chartOption.subTitle), 1)
1413
+ me((V(), ee("div", Ln, [
1414
+ ze(ue(l.chartOption.subTitle), 1)
1475
1415
  ])), [
1476
- [Fe, o.chartOption.subTitle],
1477
- [R, ue]
1416
+ [Le, l.chartOption.subTitle],
1417
+ [Q, ye]
1478
1418
  ]),
1479
- xe((H(), Z("div", {
1419
+ me((V(), ee("div", {
1480
1420
  class: "legend-box",
1481
1421
  ref_key: "myLegend",
1482
- ref: ve
1422
+ ref: Me
1483
1423
  }, [
1484
- Q.value.length > 1 ? (H(), X(s, {
1424
+ P.value.length > 1 ? (V(), Z(i, {
1485
1425
  key: 0,
1486
- modelValue: te.value,
1487
- "onUpdate:modelValue": f[0] || (f[0] = (E) => te.value = E),
1426
+ modelValue: se.value,
1427
+ "onUpdate:modelValue": f[0] || (f[0] = (m) => se.value = m),
1488
1428
  label: "全选",
1489
- onChange: Qe,
1429
+ onChange: We,
1490
1430
  style: { "--fill-color": "#409EFF" }
1491
- }, null, 8, ["modelValue"])) : K("", !0),
1492
- (H(!0), Z(Ee, null, De(Q.value, (E, Y) => (H(), Z(Ee, { key: Y }, [
1493
- E.children ? K("", !0) : (H(), X(s, {
1431
+ }, null, 8, ["modelValue"])) : _("", !0),
1432
+ (V(!0), ee(Se, null, Ne(P.value, (m, U) => (V(), ee(Se, { key: U }, [
1433
+ m.children ? _("", !0) : (V(), Z(i, {
1494
1434
  key: 0,
1495
- modelValue: E.isSelected,
1496
- "onUpdate:modelValue": (T) => E.isSelected = T,
1497
- onChange: (T) => ce(T, E.name),
1498
- style: G({ "--fill-color": E.color ? E.color : "#409EFF" })
1435
+ modelValue: m.isSelected,
1436
+ "onUpdate:modelValue": (L) => m.isSelected = L,
1437
+ onChange: (L) => pe(L, m.name),
1438
+ style: W({ "--fill-color": m.color ? m.color : "#409EFF" })
1499
1439
  }, {
1500
- default: W(() => [
1501
- E.icon ? (H(), X(x, {
1440
+ default: q(() => [
1441
+ m.icon ? (V(), Z(p, {
1502
1442
  key: 0,
1503
- "icon-class": E.icon,
1504
- style: G({
1505
- width: E.iconWidth ? E.iconWidth + "px" : "20px",
1506
- height: E.iconHeight ? E.iconHeight + "px" : "20px"
1443
+ "icon-class": m.icon,
1444
+ style: W({
1445
+ width: m.iconWidth ? m.iconWidth + "px" : "20px",
1446
+ height: m.iconHeight ? m.iconHeight + "px" : "20px"
1507
1447
  }),
1508
- color: E.color
1509
- }, null, 8, ["icon-class", "style", "color"])) : K("", !0),
1510
- q("span", {
1511
- style: G({ color: E.color, marginLeft: "3px" })
1512
- }, se(E.key ? E.key : E.name), 5),
1513
- E.children && E.children.length > 0 ? (H(), X(l, {
1448
+ color: m.color
1449
+ }, null, 8, ["icon-class", "style", "color"])) : _("", !0),
1450
+ te("span", {
1451
+ style: W({ color: m.color, marginLeft: "3px" })
1452
+ }, ue(m.key ? m.key : m.name), 5),
1453
+ m.children && m.children.length > 0 ? (V(), Z(r, {
1514
1454
  key: 1,
1515
1455
  class: "el-icon--right"
1516
1456
  }, {
1517
- default: W(() => [
1518
- de(Ce(Ne))
1457
+ default: q(() => [
1458
+ he(Be(He))
1519
1459
  ]),
1520
1460
  _: 1
1521
- })) : K("", !0)
1461
+ })) : _("", !0)
1522
1462
  ]),
1523
1463
  _: 2
1524
1464
  }, 1032, ["modelValue", "onUpdate:modelValue", "onChange", "style"])),
1525
- E.children && E.children.length > 0 ? (H(), X(L, {
1465
+ m.children && m.children.length > 0 ? (V(), Z(N, {
1526
1466
  key: 1,
1527
1467
  "hide-on-click": !1
1528
1468
  }, {
1529
- dropdown: W(() => [
1530
- de(y, null, {
1531
- default: W(() => [
1532
- (H(!0), Z(Ee, null, De(E.children, (T, le) => (H(), X(k, { key: le }, {
1533
- default: W(() => [
1534
- de(s, {
1535
- modelValue: T.isSelected,
1536
- "onUpdate:modelValue": ($) => T.isSelected = $,
1537
- onChange: ($) => ce($, T.name),
1538
- style: G({ "--fill-color": T.color ? T.color : "#409EFF" })
1469
+ dropdown: q(() => [
1470
+ he(x, null, {
1471
+ default: q(() => [
1472
+ (V(!0), ee(Se, null, Ne(m.children, (L, de) => (V(), Z(O, { key: de }, {
1473
+ default: q(() => [
1474
+ he(i, {
1475
+ modelValue: L.isSelected,
1476
+ "onUpdate:modelValue": (ne) => L.isSelected = ne,
1477
+ onChange: (ne) => pe(ne, L.name),
1478
+ style: W({ "--fill-color": L.color ? L.color : "#409EFF" })
1539
1479
  }, {
1540
- default: W(() => [
1541
- q("div", Cn, [
1542
- T.icon ? (H(), X(x, {
1480
+ default: q(() => [
1481
+ te("div", Nn, [
1482
+ L.icon ? (V(), Z(p, {
1543
1483
  key: 0,
1544
- "icon-class": T.icon,
1545
- style: G({
1546
- width: T.iconWidth ? T.iconWidth + "px" : "20px",
1547
- height: T.iconHeight ? T.iconHeight + "px" : "20px"
1484
+ "icon-class": L.icon,
1485
+ style: W({
1486
+ width: L.iconWidth ? L.iconWidth + "px" : "20px",
1487
+ height: L.iconHeight ? L.iconHeight + "px" : "20px"
1548
1488
  }),
1549
- color: T.color
1550
- }, null, 8, ["icon-class", "style", "color"])) : K("", !0)
1489
+ color: L.color
1490
+ }, null, 8, ["icon-class", "style", "color"])) : _("", !0)
1551
1491
  ]),
1552
- q("span", {
1553
- style: G({ color: T.color, marginLeft: "3px" })
1554
- }, se(T.key ? T.key : T.name), 5)
1492
+ te("span", {
1493
+ style: W({ color: L.color, marginLeft: "3px" })
1494
+ }, ue(L.key ? L.key : L.name), 5)
1555
1495
  ]),
1556
1496
  _: 2
1557
1497
  }, 1032, ["modelValue", "onUpdate:modelValue", "onChange", "style"])
@@ -1562,57 +1502,57 @@ ${n.name}: {a0|${r.data.coord[1]}} ${n.unit}`;
1562
1502
  _: 2
1563
1503
  }, 1024)
1564
1504
  ]),
1565
- default: W(() => [
1566
- de(s, {
1567
- modelValue: E.isSelected,
1568
- "onUpdate:modelValue": (T) => E.isSelected = T,
1569
- onChange: (T) => ce(T, E.name),
1570
- style: G({ "--fill-color": E.color ? E.color : "#409EFF" })
1505
+ default: q(() => [
1506
+ he(i, {
1507
+ modelValue: m.isSelected,
1508
+ "onUpdate:modelValue": (L) => m.isSelected = L,
1509
+ onChange: (L) => pe(L, m.name),
1510
+ style: W({ "--fill-color": m.color ? m.color : "#409EFF" })
1571
1511
  }, {
1572
- default: W(() => [
1573
- E.icon ? (H(), X(x, {
1512
+ default: q(() => [
1513
+ m.icon ? (V(), Z(p, {
1574
1514
  key: 0,
1575
- "icon-class": E.icon,
1576
- style: G({
1577
- width: E.iconWidth ? E.iconWidth + "px" : "20px",
1578
- height: E.iconHeight ? E.iconHeight + "px" : "20px"
1515
+ "icon-class": m.icon,
1516
+ style: W({
1517
+ width: m.iconWidth ? m.iconWidth + "px" : "20px",
1518
+ height: m.iconHeight ? m.iconHeight + "px" : "20px"
1579
1519
  }),
1580
- color: E.color
1581
- }, null, 8, ["icon-class", "style", "color"])) : K("", !0),
1582
- q("span", {
1583
- style: G({ color: E.color, marginLeft: "3px" })
1584
- }, se(E.key ? E.key : E.name), 5),
1585
- E.children && E.children.length > 0 ? (H(), X(l, {
1520
+ color: m.color
1521
+ }, null, 8, ["icon-class", "style", "color"])) : _("", !0),
1522
+ te("span", {
1523
+ style: W({ color: m.color, marginLeft: "3px" })
1524
+ }, ue(m.key ? m.key : m.name), 5),
1525
+ m.children && m.children.length > 0 ? (V(), Z(r, {
1586
1526
  key: 1,
1587
1527
  class: "el-icon--right"
1588
1528
  }, {
1589
- default: W(() => [
1590
- de(Ce(Ne))
1529
+ default: q(() => [
1530
+ he(Be(He))
1591
1531
  ]),
1592
1532
  _: 1
1593
- })) : K("", !0)
1533
+ })) : _("", !0)
1594
1534
  ]),
1595
1535
  _: 2
1596
1536
  }, 1032, ["modelValue", "onUpdate:modelValue", "onChange", "style"])
1597
1537
  ]),
1598
1538
  _: 2
1599
- }, 1024)) : K("", !0)
1539
+ }, 1024)) : _("", !0)
1600
1540
  ], 64))), 128))
1601
1541
  ])), [
1602
- [R, ue]
1542
+ [Q, ye]
1603
1543
  ]),
1604
- q("div", Tn, [
1605
- q("div", {
1606
- id: o.id,
1607
- style: G({ width: o.width, height: o.height })
1608
- }, null, 12, zn)
1544
+ te("div", Bn, [
1545
+ te("div", {
1546
+ id: l.id,
1547
+ style: W({ width: l.width, height: l.height })
1548
+ }, null, 12, Yn)
1609
1549
  ])
1610
1550
  ], 32)), [
1611
- [R, ue]
1551
+ [Q, ye]
1612
1552
  ]);
1613
1553
  };
1614
1554
  }
1615
- }, He = /* @__PURE__ */ Re(Ln, [["__scopeId", "data-v-0d3f793e"]]), Nn = sn({
1555
+ }, je = /* @__PURE__ */ Ge(Rn, [["__scopeId", "data-v-adf77597"]]), Un = un({
1616
1556
  props: {
1617
1557
  iconClass: {
1618
1558
  type: String,
@@ -1627,30 +1567,30 @@ ${n.name}: {a0|${r.data.coord[1]}} ${n.unit}`;
1627
1567
  default: ""
1628
1568
  }
1629
1569
  },
1630
- setup(o) {
1570
+ setup(l) {
1631
1571
  return {
1632
1572
  // 开发环境使用 icon-[name] 格式
1633
- iconName: Te(() => `#icon-${o.iconClass}`),
1634
- svgClass: Te(() => o.className ? `svg-icon ${o.className}` : "svg-icon")
1573
+ iconName: Ye(() => `#icon-${l.iconClass}`),
1574
+ svgClass: Ye(() => l.className ? `svg-icon ${l.className}` : "svg-icon")
1635
1575
  };
1636
1576
  }
1637
- }), Bn = ["xlink:href", "fill"];
1638
- function Yn(o, m, N, A, a, M) {
1639
- return H(), Z("svg", {
1640
- class: rn(o.svgClass),
1577
+ }), Hn = ["xlink:href", "fill"];
1578
+ function Vn(l, g, Y, h, n, M) {
1579
+ return V(), ee("svg", {
1580
+ class: fn(l.svgClass),
1641
1581
  "aria-hidden": "true"
1642
1582
  }, [
1643
- q("use", {
1644
- "xlink:href": o.iconName,
1645
- fill: o.color
1646
- }, null, 8, Bn)
1583
+ te("use", {
1584
+ "xlink:href": l.iconName,
1585
+ fill: l.color
1586
+ }, null, 8, Hn)
1647
1587
  ], 2);
1648
1588
  }
1649
- const Hn = /* @__PURE__ */ Re(Nn, [["render", Yn]]);
1650
- He.install = (o) => {
1651
- o.component("ElCheckbox", gn), o.component("ElIcon", mn), o.component("ElDropdown", vn), o.component("ElDropdownMenu", bn), o.component("ElDropdownItem", En), o.component("SvgIcon", Hn), o.component("HydroGraph", He);
1589
+ const Qn = /* @__PURE__ */ Ge(Un, [["render", Vn]]);
1590
+ je.install = (l) => {
1591
+ l.component("ElCheckbox", En), l.component("ElIcon", Mn), l.component("ElDropdown", wn), l.component("ElDropdownMenu", Sn), l.component("ElDropdownItem", In), l.component("SvgIcon", Qn), l.component("HydroGraph", je);
1652
1592
  };
1653
1593
  export {
1654
- He as HydroGraph,
1655
- He as default
1594
+ je as HydroGraph,
1595
+ je as default
1656
1596
  };