hydro-graph 1.0.43 → 1.0.45

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