hydro-graph 1.0.43 → 1.0.44

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