st-comp 0.0.133 → 0.0.134

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/KlineBasic.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import "./base-3ecbc734.js";
2
- import { E as Oe } from "./el-overlay-6056c89a.js";
2
+ import { E as Re } from "./el-overlay-6056c89a.js";
3
3
  import "./el-input-ee7db655.js";
4
- import { E as Ve } from "./el-input-number-63c21037.js";
5
- import { E as Ae } from "./el-button-24f79286.js";
4
+ import { E as Ae } from "./el-input-number-63c21037.js";
5
+ import { E as Ve } from "./el-button-24f79286.js";
6
6
  import { E as Ee } from "./el-empty-79c5f7a8.js";
7
- import { E as We, a as Be } from "./el-menu-item-0d92e7dc.js";
7
+ import { E as Be, a as Ie } from "./el-menu-item-0d92e7dc.js";
8
8
  import "./el-tooltip-4ed993c7.js";
9
9
  import "./el-popper-d3eef7ed.js";
10
- import { defineComponent as we, openBlock as H, createElementBlock as z, Fragment as me, renderList as _e, normalizeStyle as xe, toDisplayString as ve, computed as le, createVNode as q, ref as C, onMounted as Se, onUnmounted as ke, nextTick as Me, createElementVNode as ee, withCtx as Q, createBlock as Le, createCommentVNode as ae, renderSlot as $e, watch as Ie, createTextVNode as fe, pushScopeId as Pe, popScopeId as Ye } from "vue";
11
- import * as ge from "echarts";
12
- import { y as Ne, v as Re, U as Ce, K as He, V as ue, x as be, D as je } from "./index-8542fe24.js";
13
- import { E as pe } from "./el-message-71aa42ca.js";
14
- import { _ as ce } from "./_plugin-vue_export-helper-dad06003.js";
10
+ import { defineComponent as Me, openBlock as j, createElementBlock as U, Fragment as he, renderList as _e, normalizeStyle as we, toDisplayString as ve, computed as ce, createVNode as z, ref as H, onMounted as $e, onUnmounted as Se, nextTick as ke, createElementVNode as ne, withCtx as te, createBlock as Te, createCommentVNode as le, renderSlot as Ye, watch as We, createTextVNode as me, pushScopeId as Pe, popScopeId as Ne } from "vue";
11
+ import * as be from "echarts";
12
+ import { y as Ce, v as He, U as je, K as qe, V as de, x as De, D as ze } from "./index-8542fe24.js";
13
+ import { E as ge } from "./el-message-71aa42ca.js";
14
+ import { _ as fe } from "./_plugin-vue_export-helper-dad06003.js";
15
15
  import "./el-tag-6a31c968.js";
16
- import { E as qe, a as ze } from "./el-select-5fb7d469.js";
16
+ import { E as Ue, a as Ze } from "./el-select-5fb7d469.js";
17
17
  import "./el-scrollbar-66f3bb72.js";
18
18
  import "./vnode-cfcdab70.js";
19
19
  import "./index-fa07a823.js";
@@ -28,331 +28,331 @@ import "./index-657047bb.js";
28
28
  import "./config-provider-83904b4d.js";
29
29
  import "./castArray-7d3fc921.js";
30
30
  import "./debounce-7344b088.js";
31
- var Ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
32
- function Ze(a) {
33
- return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
31
+ var Ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
32
+ function Xe(s) {
33
+ return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
34
34
  }
35
- var De = { exports: {} };
36
- (function(a, F) {
37
- (function(A, M) {
38
- a.exports = M();
39
- })(Ue, function() {
40
- var A = 1e3, M = 6e4, L = 36e5, e = "millisecond", w = "second", S = "minute", f = "hour", g = "day", $ = "week", c = "month", m = "quarter", h = "year", b = "date", E = "Invalid Date", T = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, j = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, O = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(l) {
41
- var r = ["th", "st", "nd", "rd"], n = l % 100;
42
- return "[" + l + (r[(n - 20) % 10] || r[n] || r[0]) + "]";
43
- } }, U = function(l, r, n) {
44
- var s = String(l);
45
- return !s || s.length >= r ? l : "" + Array(r + 1 - s.length).join(n) + l;
46
- }, _ = { s: U, z: function(l) {
47
- var r = -l.utcOffset(), n = Math.abs(r), s = Math.floor(n / 60), i = n % 60;
48
- return (r <= 0 ? "+" : "-") + U(s, 2, "0") + ":" + U(i, 2, "0");
49
- }, m: function l(r, n) {
50
- if (r.date() < n.date())
51
- return -l(n, r);
52
- var s = 12 * (n.year() - r.year()) + (n.month() - r.month()), i = r.clone().add(s, c), o = n - i < 0, t = r.clone().add(s + (o ? -1 : 1), c);
53
- return +(-(s + (n - i) / (o ? i - t : t - i)) || 0);
54
- }, a: function(l) {
55
- return l < 0 ? Math.ceil(l) || 0 : Math.floor(l);
56
- }, p: function(l) {
57
- return { M: c, y: h, w: $, d: g, D: b, h: f, m: S, s: w, ms: e, Q: m }[l] || String(l || "").toLowerCase().replace(/s$/, "");
58
- }, u: function(l) {
59
- return l === void 0;
60
- } }, P = "en", Y = {};
61
- Y[P] = O;
62
- var ne = "$isDayjsObject", Z = function(l) {
63
- return l instanceof re || !(!l || !l[ne]);
64
- }, oe = function l(r, n, s) {
65
- var i;
66
- if (!r)
67
- return P;
68
- if (typeof r == "string") {
69
- var o = r.toLowerCase();
70
- Y[o] && (i = o), n && (Y[o] = n, i = o);
71
- var t = r.split("-");
72
- if (!i && t.length > 1)
73
- return l(t[0]);
35
+ var Le = { exports: {} };
36
+ (function(s, B) {
37
+ (function(I, S) {
38
+ s.exports = S();
39
+ })(Ke, function() {
40
+ var I = 1e3, S = 6e4, k = 36e5, e = "millisecond", Y = "second", M = "minute", p = "hour", h = "day", w = "week", a = "month", g = "quarter", y = "year", x = "date", W = "Invalid Date", F = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, q = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, V = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(c) {
41
+ var i = ["th", "st", "nd", "rd"], r = c % 100;
42
+ return "[" + c + (i[(r - 20) % 10] || i[r] || i[0]) + "]";
43
+ } }, Z = function(c, i, r) {
44
+ var u = String(c);
45
+ return !u || u.length >= i ? c : "" + Array(i + 1 - u.length).join(r) + c;
46
+ }, v = { s: Z, z: function(c) {
47
+ var i = -c.utcOffset(), r = Math.abs(i), u = Math.floor(r / 60), o = r % 60;
48
+ return (i <= 0 ? "+" : "-") + Z(u, 2, "0") + ":" + Z(o, 2, "0");
49
+ }, m: function c(i, r) {
50
+ if (i.date() < r.date())
51
+ return -c(r, i);
52
+ var u = 12 * (r.year() - i.year()) + (r.month() - i.month()), o = i.clone().add(u, a), f = r - o < 0, n = i.clone().add(u + (f ? -1 : 1), a);
53
+ return +(-(u + (r - o) / (f ? o - n : n - o)) || 0);
54
+ }, a: function(c) {
55
+ return c < 0 ? Math.ceil(c) || 0 : Math.floor(c);
56
+ }, p: function(c) {
57
+ return { M: a, y, w, d: h, D: x, h: p, m: M, s: Y, ms: e, Q: g }[c] || String(c || "").toLowerCase().replace(/s$/, "");
58
+ }, u: function(c) {
59
+ return c === void 0;
60
+ } }, N = "en", C = {};
61
+ C[N] = V;
62
+ var ae = "$isDayjsObject", K = function(c) {
63
+ return c instanceof ie || !(!c || !c[ae]);
64
+ }, oe = function c(i, r, u) {
65
+ var o;
66
+ if (!i)
67
+ return N;
68
+ if (typeof i == "string") {
69
+ var f = i.toLowerCase();
70
+ C[f] && (o = f), r && (C[f] = r, o = f);
71
+ var n = i.split("-");
72
+ if (!o && n.length > 1)
73
+ return c(n[0]);
74
74
  } else {
75
- var u = r.name;
76
- Y[u] = r, i = u;
75
+ var t = i.name;
76
+ C[t] = i, o = t;
77
77
  }
78
- return !s && i && (P = i), i || !s && P;
79
- }, W = function(l, r) {
80
- if (Z(l))
81
- return l.clone();
82
- var n = typeof r == "object" ? r : {};
83
- return n.date = l, n.args = arguments, new re(n);
84
- }, x = _;
85
- x.l = oe, x.i = Z, x.w = function(l, r) {
86
- return W(l, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
78
+ return !u && o && (N = o), o || !u && N;
79
+ }, P = function(c, i) {
80
+ if (K(c))
81
+ return c.clone();
82
+ var r = typeof i == "object" ? i : {};
83
+ return r.date = c, r.args = arguments, new ie(r);
84
+ }, b = v;
85
+ b.l = oe, b.i = K, b.w = function(c, i) {
86
+ return P(c, { locale: i.$L, utc: i.$u, x: i.$x, $offset: i.$offset });
87
87
  };
88
- var re = function() {
89
- function l(n) {
90
- this.$L = oe(n.locale, null, !0), this.parse(n), this.$x = this.$x || n.x || {}, this[ne] = !0;
88
+ var ie = function() {
89
+ function c(r) {
90
+ this.$L = oe(r.locale, null, !0), this.parse(r), this.$x = this.$x || r.x || {}, this[ae] = !0;
91
91
  }
92
- var r = l.prototype;
93
- return r.parse = function(n) {
94
- this.$d = function(s) {
95
- var i = s.date, o = s.utc;
96
- if (i === null)
92
+ var i = c.prototype;
93
+ return i.parse = function(r) {
94
+ this.$d = function(u) {
95
+ var o = u.date, f = u.utc;
96
+ if (o === null)
97
97
  return /* @__PURE__ */ new Date(NaN);
98
- if (x.u(i))
98
+ if (b.u(o))
99
99
  return /* @__PURE__ */ new Date();
100
- if (i instanceof Date)
101
- return new Date(i);
102
- if (typeof i == "string" && !/Z$/i.test(i)) {
103
- var t = i.match(T);
104
- if (t) {
105
- var u = t[2] - 1 || 0, d = (t[7] || "0").substring(0, 3);
106
- return o ? new Date(Date.UTC(t[1], u, t[3] || 1, t[4] || 0, t[5] || 0, t[6] || 0, d)) : new Date(t[1], u, t[3] || 1, t[4] || 0, t[5] || 0, t[6] || 0, d);
100
+ if (o instanceof Date)
101
+ return new Date(o);
102
+ if (typeof o == "string" && !/Z$/i.test(o)) {
103
+ var n = o.match(F);
104
+ if (n) {
105
+ var t = n[2] - 1 || 0, d = (n[7] || "0").substring(0, 3);
106
+ return f ? new Date(Date.UTC(n[1], t, n[3] || 1, n[4] || 0, n[5] || 0, n[6] || 0, d)) : new Date(n[1], t, n[3] || 1, n[4] || 0, n[5] || 0, n[6] || 0, d);
107
107
  }
108
108
  }
109
- return new Date(i);
110
- }(n), this.init();
111
- }, r.init = function() {
112
- var n = this.$d;
113
- this.$y = n.getFullYear(), this.$M = n.getMonth(), this.$D = n.getDate(), this.$W = n.getDay(), this.$H = n.getHours(), this.$m = n.getMinutes(), this.$s = n.getSeconds(), this.$ms = n.getMilliseconds();
114
- }, r.$utils = function() {
115
- return x;
116
- }, r.isValid = function() {
117
- return this.$d.toString() !== E;
118
- }, r.isSame = function(n, s) {
119
- var i = W(n);
120
- return this.startOf(s) <= i && i <= this.endOf(s);
121
- }, r.isAfter = function(n, s) {
122
- return W(n) < this.startOf(s);
123
- }, r.isBefore = function(n, s) {
124
- return this.endOf(s) < W(n);
125
- }, r.$g = function(n, s, i) {
126
- return x.u(n) ? this[s] : this.set(i, n);
127
- }, r.unix = function() {
109
+ return new Date(o);
110
+ }(r), this.init();
111
+ }, i.init = function() {
112
+ var r = this.$d;
113
+ this.$y = r.getFullYear(), this.$M = r.getMonth(), this.$D = r.getDate(), this.$W = r.getDay(), this.$H = r.getHours(), this.$m = r.getMinutes(), this.$s = r.getSeconds(), this.$ms = r.getMilliseconds();
114
+ }, i.$utils = function() {
115
+ return b;
116
+ }, i.isValid = function() {
117
+ return this.$d.toString() !== W;
118
+ }, i.isSame = function(r, u) {
119
+ var o = P(r);
120
+ return this.startOf(u) <= o && o <= this.endOf(u);
121
+ }, i.isAfter = function(r, u) {
122
+ return P(r) < this.startOf(u);
123
+ }, i.isBefore = function(r, u) {
124
+ return this.endOf(u) < P(r);
125
+ }, i.$g = function(r, u, o) {
126
+ return b.u(r) ? this[u] : this.set(o, r);
127
+ }, i.unix = function() {
128
128
  return Math.floor(this.valueOf() / 1e3);
129
- }, r.valueOf = function() {
129
+ }, i.valueOf = function() {
130
130
  return this.$d.getTime();
131
- }, r.startOf = function(n, s) {
132
- var i = this, o = !!x.u(s) || s, t = x.p(n), u = function(B, I) {
133
- var R = x.w(i.$u ? Date.UTC(i.$y, I, B) : new Date(i.$y, I, B), i);
134
- return o ? R : R.endOf(g);
135
- }, d = function(B, I) {
136
- return x.w(i.toDate()[B].apply(i.toDate("s"), (o ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(I)), i);
137
- }, p = this.$W, y = this.$M, v = this.$D, V = "set" + (this.$u ? "UTC" : "");
138
- switch (t) {
139
- case h:
140
- return o ? u(1, 0) : u(31, 11);
141
- case c:
142
- return o ? u(1, y) : u(0, y + 1);
143
- case $:
144
- var D = this.$locale().weekStart || 0, k = (p < D ? p + 7 : p) - D;
145
- return u(o ? v - k : v + (6 - k), y);
146
- case g:
147
- case b:
148
- return d(V + "Hours", 0);
149
- case f:
150
- return d(V + "Minutes", 1);
151
- case S:
152
- return d(V + "Seconds", 2);
131
+ }, i.startOf = function(r, u) {
132
+ var o = this, f = !!b.u(u) || u, n = b.p(r), t = function(_, L) {
133
+ var X = b.w(o.$u ? Date.UTC(o.$y, L, _) : new Date(o.$y, L, _), o);
134
+ return f ? X : X.endOf(h);
135
+ }, d = function(_, L) {
136
+ return b.w(o.toDate()[_].apply(o.toDate("s"), (f ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(L)), o);
137
+ }, l = this.$W, m = this.$M, D = this.$D, T = "set" + (this.$u ? "UTC" : "");
138
+ switch (n) {
139
+ case y:
140
+ return f ? t(1, 0) : t(31, 11);
141
+ case a:
142
+ return f ? t(1, m) : t(0, m + 1);
153
143
  case w:
154
- return d(V + "Milliseconds", 3);
144
+ var E = this.$locale().weekStart || 0, R = (l < E ? l + 7 : l) - E;
145
+ return t(f ? D - R : D + (6 - R), m);
146
+ case h:
147
+ case x:
148
+ return d(T + "Hours", 0);
149
+ case p:
150
+ return d(T + "Minutes", 1);
151
+ case M:
152
+ return d(T + "Seconds", 2);
153
+ case Y:
154
+ return d(T + "Milliseconds", 3);
155
155
  default:
156
156
  return this.clone();
157
157
  }
158
- }, r.endOf = function(n) {
159
- return this.startOf(n, !1);
160
- }, r.$set = function(n, s) {
161
- var i, o = x.p(n), t = "set" + (this.$u ? "UTC" : ""), u = (i = {}, i[g] = t + "Date", i[b] = t + "Date", i[c] = t + "Month", i[h] = t + "FullYear", i[f] = t + "Hours", i[S] = t + "Minutes", i[w] = t + "Seconds", i[e] = t + "Milliseconds", i)[o], d = o === g ? this.$D + (s - this.$W) : s;
162
- if (o === c || o === h) {
163
- var p = this.clone().set(b, 1);
164
- p.$d[u](d), p.init(), this.$d = p.set(b, Math.min(this.$D, p.daysInMonth())).$d;
158
+ }, i.endOf = function(r) {
159
+ return this.startOf(r, !1);
160
+ }, i.$set = function(r, u) {
161
+ var o, f = b.p(r), n = "set" + (this.$u ? "UTC" : ""), t = (o = {}, o[h] = n + "Date", o[x] = n + "Date", o[a] = n + "Month", o[y] = n + "FullYear", o[p] = n + "Hours", o[M] = n + "Minutes", o[Y] = n + "Seconds", o[e] = n + "Milliseconds", o)[f], d = f === h ? this.$D + (u - this.$W) : u;
162
+ if (f === a || f === y) {
163
+ var l = this.clone().set(x, 1);
164
+ l.$d[t](d), l.init(), this.$d = l.set(x, Math.min(this.$D, l.daysInMonth())).$d;
165
165
  } else
166
- u && this.$d[u](d);
166
+ t && this.$d[t](d);
167
167
  return this.init(), this;
168
- }, r.set = function(n, s) {
169
- return this.clone().$set(n, s);
170
- }, r.get = function(n) {
171
- return this[x.p(n)]();
172
- }, r.add = function(n, s) {
173
- var i, o = this;
174
- n = Number(n);
175
- var t = x.p(s), u = function(y) {
176
- var v = W(o);
177
- return x.w(v.date(v.date() + Math.round(y * n)), o);
168
+ }, i.set = function(r, u) {
169
+ return this.clone().$set(r, u);
170
+ }, i.get = function(r) {
171
+ return this[b.p(r)]();
172
+ }, i.add = function(r, u) {
173
+ var o, f = this;
174
+ r = Number(r);
175
+ var n = b.p(u), t = function(m) {
176
+ var D = P(f);
177
+ return b.w(D.date(D.date() + Math.round(m * r)), f);
178
178
  };
179
- if (t === c)
180
- return this.set(c, this.$M + n);
181
- if (t === h)
182
- return this.set(h, this.$y + n);
183
- if (t === g)
184
- return u(1);
185
- if (t === $)
186
- return u(7);
187
- var d = (i = {}, i[S] = M, i[f] = L, i[w] = A, i)[t] || 1, p = this.$d.getTime() + n * d;
188
- return x.w(p, this);
189
- }, r.subtract = function(n, s) {
190
- return this.add(-1 * n, s);
191
- }, r.format = function(n) {
192
- var s = this, i = this.$locale();
179
+ if (n === a)
180
+ return this.set(a, this.$M + r);
181
+ if (n === y)
182
+ return this.set(y, this.$y + r);
183
+ if (n === h)
184
+ return t(1);
185
+ if (n === w)
186
+ return t(7);
187
+ var d = (o = {}, o[M] = S, o[p] = k, o[Y] = I, o)[n] || 1, l = this.$d.getTime() + r * d;
188
+ return b.w(l, this);
189
+ }, i.subtract = function(r, u) {
190
+ return this.add(-1 * r, u);
191
+ }, i.format = function(r) {
192
+ var u = this, o = this.$locale();
193
193
  if (!this.isValid())
194
- return i.invalidDate || E;
195
- var o = n || "YYYY-MM-DDTHH:mm:ssZ", t = x.z(this), u = this.$H, d = this.$m, p = this.$M, y = i.weekdays, v = i.months, V = i.meridiem, D = function(I, R, N, X) {
196
- return I && (I[R] || I(s, o)) || N[R].slice(0, X);
197
- }, k = function(I) {
198
- return x.s(u % 12 || 12, I, "0");
199
- }, B = V || function(I, R, N) {
200
- var X = I < 12 ? "AM" : "PM";
201
- return N ? X.toLowerCase() : X;
194
+ return o.invalidDate || W;
195
+ var f = r || "YYYY-MM-DDTHH:mm:ssZ", n = b.z(this), t = this.$H, d = this.$m, l = this.$M, m = o.weekdays, D = o.months, T = o.meridiem, E = function(L, X, J, A) {
196
+ return L && (L[X] || L(u, f)) || J[X].slice(0, A);
197
+ }, R = function(L) {
198
+ return b.s(t % 12 || 12, L, "0");
199
+ }, _ = T || function(L, X, J) {
200
+ var A = L < 12 ? "AM" : "PM";
201
+ return J ? A.toLowerCase() : A;
202
202
  };
203
- return o.replace(j, function(I, R) {
204
- return R || function(N) {
205
- switch (N) {
203
+ return f.replace(q, function(L, X) {
204
+ return X || function(J) {
205
+ switch (J) {
206
206
  case "YY":
207
- return String(s.$y).slice(-2);
207
+ return String(u.$y).slice(-2);
208
208
  case "YYYY":
209
- return x.s(s.$y, 4, "0");
209
+ return b.s(u.$y, 4, "0");
210
210
  case "M":
211
- return p + 1;
211
+ return l + 1;
212
212
  case "MM":
213
- return x.s(p + 1, 2, "0");
213
+ return b.s(l + 1, 2, "0");
214
214
  case "MMM":
215
- return D(i.monthsShort, p, v, 3);
215
+ return E(o.monthsShort, l, D, 3);
216
216
  case "MMMM":
217
- return D(v, p);
217
+ return E(D, l);
218
218
  case "D":
219
- return s.$D;
219
+ return u.$D;
220
220
  case "DD":
221
- return x.s(s.$D, 2, "0");
221
+ return b.s(u.$D, 2, "0");
222
222
  case "d":
223
- return String(s.$W);
223
+ return String(u.$W);
224
224
  case "dd":
225
- return D(i.weekdaysMin, s.$W, y, 2);
225
+ return E(o.weekdaysMin, u.$W, m, 2);
226
226
  case "ddd":
227
- return D(i.weekdaysShort, s.$W, y, 3);
227
+ return E(o.weekdaysShort, u.$W, m, 3);
228
228
  case "dddd":
229
- return y[s.$W];
229
+ return m[u.$W];
230
230
  case "H":
231
- return String(u);
231
+ return String(t);
232
232
  case "HH":
233
- return x.s(u, 2, "0");
233
+ return b.s(t, 2, "0");
234
234
  case "h":
235
- return k(1);
235
+ return R(1);
236
236
  case "hh":
237
- return k(2);
237
+ return R(2);
238
238
  case "a":
239
- return B(u, d, !0);
239
+ return _(t, d, !0);
240
240
  case "A":
241
- return B(u, d, !1);
241
+ return _(t, d, !1);
242
242
  case "m":
243
243
  return String(d);
244
244
  case "mm":
245
- return x.s(d, 2, "0");
245
+ return b.s(d, 2, "0");
246
246
  case "s":
247
- return String(s.$s);
247
+ return String(u.$s);
248
248
  case "ss":
249
- return x.s(s.$s, 2, "0");
249
+ return b.s(u.$s, 2, "0");
250
250
  case "SSS":
251
- return x.s(s.$ms, 3, "0");
251
+ return b.s(u.$ms, 3, "0");
252
252
  case "Z":
253
- return t;
253
+ return n;
254
254
  }
255
255
  return null;
256
- }(I) || t.replace(":", "");
256
+ }(L) || n.replace(":", "");
257
257
  });
258
- }, r.utcOffset = function() {
258
+ }, i.utcOffset = function() {
259
259
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
260
- }, r.diff = function(n, s, i) {
261
- var o, t = this, u = x.p(s), d = W(n), p = (d.utcOffset() - this.utcOffset()) * M, y = this - d, v = function() {
262
- return x.m(t, d);
260
+ }, i.diff = function(r, u, o) {
261
+ var f, n = this, t = b.p(u), d = P(r), l = (d.utcOffset() - this.utcOffset()) * S, m = this - d, D = function() {
262
+ return b.m(n, d);
263
263
  };
264
- switch (u) {
265
- case h:
266
- o = v() / 12;
264
+ switch (t) {
265
+ case y:
266
+ f = D() / 12;
267
267
  break;
268
- case c:
269
- o = v();
268
+ case a:
269
+ f = D();
270
270
  break;
271
- case m:
272
- o = v() / 3;
271
+ case g:
272
+ f = D() / 3;
273
273
  break;
274
- case $:
275
- o = (y - p) / 6048e5;
274
+ case w:
275
+ f = (m - l) / 6048e5;
276
276
  break;
277
- case g:
278
- o = (y - p) / 864e5;
277
+ case h:
278
+ f = (m - l) / 864e5;
279
279
  break;
280
- case f:
281
- o = y / L;
280
+ case p:
281
+ f = m / k;
282
282
  break;
283
- case S:
284
- o = y / M;
283
+ case M:
284
+ f = m / S;
285
285
  break;
286
- case w:
287
- o = y / A;
286
+ case Y:
287
+ f = m / I;
288
288
  break;
289
289
  default:
290
- o = y;
290
+ f = m;
291
291
  }
292
- return i ? o : x.a(o);
293
- }, r.daysInMonth = function() {
294
- return this.endOf(c).$D;
295
- }, r.$locale = function() {
296
- return Y[this.$L];
297
- }, r.locale = function(n, s) {
298
- if (!n)
292
+ return o ? f : b.a(f);
293
+ }, i.daysInMonth = function() {
294
+ return this.endOf(a).$D;
295
+ }, i.$locale = function() {
296
+ return C[this.$L];
297
+ }, i.locale = function(r, u) {
298
+ if (!r)
299
299
  return this.$L;
300
- var i = this.clone(), o = oe(n, s, !0);
301
- return o && (i.$L = o), i;
302
- }, r.clone = function() {
303
- return x.w(this.$d, this);
304
- }, r.toDate = function() {
300
+ var o = this.clone(), f = oe(r, u, !0);
301
+ return f && (o.$L = f), o;
302
+ }, i.clone = function() {
303
+ return b.w(this.$d, this);
304
+ }, i.toDate = function() {
305
305
  return new Date(this.valueOf());
306
- }, r.toJSON = function() {
306
+ }, i.toJSON = function() {
307
307
  return this.isValid() ? this.toISOString() : null;
308
- }, r.toISOString = function() {
308
+ }, i.toISOString = function() {
309
309
  return this.$d.toISOString();
310
- }, r.toString = function() {
310
+ }, i.toString = function() {
311
311
  return this.$d.toUTCString();
312
- }, l;
313
- }(), ie = re.prototype;
314
- return W.prototype = ie, [["$ms", e], ["$s", w], ["$m", S], ["$H", f], ["$W", g], ["$M", c], ["$y", h], ["$D", b]].forEach(function(l) {
315
- ie[l[1]] = function(r) {
316
- return this.$g(r, l[0], l[1]);
312
+ }, c;
313
+ }(), se = ie.prototype;
314
+ return P.prototype = se, [["$ms", e], ["$s", Y], ["$m", M], ["$H", p], ["$W", h], ["$M", a], ["$y", y], ["$D", x]].forEach(function(c) {
315
+ se[c[1]] = function(i) {
316
+ return this.$g(i, c[0], c[1]);
317
317
  };
318
- }), W.extend = function(l, r) {
319
- return l.$i || (l(r, re, W), l.$i = !0), W;
320
- }, W.locale = oe, W.isDayjs = Z, W.unix = function(l) {
321
- return W(1e3 * l);
322
- }, W.en = Y[P], W.Ls = Y, W.p = {}, W;
318
+ }), P.extend = function(c, i) {
319
+ return c.$i || (c(i, ie, P), c.$i = !0), P;
320
+ }, P.locale = oe, P.isDayjs = K, P.unix = function(c) {
321
+ return P(1e3 * c);
322
+ }, P.en = C[N], P.Ls = C, P.p = {}, P;
323
323
  });
324
- })(De);
325
- var Ke = De.exports;
326
- const Je = /* @__PURE__ */ Ze(Ke);
327
- let te = null;
328
- const Xe = (a) => {
329
- const F = Ne(a, {
330
- handleReq: (A) => {
331
- Re() && (A.headers.token = Ce());
324
+ })(Le);
325
+ var Je = Le.exports;
326
+ const O = /* @__PURE__ */ Xe(Je);
327
+ let re = null;
328
+ const Ge = (s) => {
329
+ const B = Ce(s, {
330
+ handleReq: (I) => {
331
+ He() && (I.headers.token = je());
332
332
  },
333
- handleRes: (A) => {
334
- const { data: M } = A;
335
- if (M.code === 401)
336
- return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` : He(), !0;
333
+ handleRes: (I) => {
334
+ const { data: S } = I;
335
+ if (S.code === 401)
336
+ return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` : qe(), !0;
337
337
  }
338
338
  });
339
- F.get, te = F.post;
340
- }, Ge = (a) => te("/middleLayer/kline/getKlineBasic", { ...a, userId: ue("id") }), Qe = (a) => te("/middleLayer/kline/getKline", a), et = async (a) => te("/alarm/deliversign/addAlarmPrice", { ...a, userId: ue("id") }), tt = async (a) => te("/alarm/deliversign/findAlarmPriceByUserId", { ...a, userId: ue("id") }), Te = async (a) => te("/alarm/deliversign/updateAlarmPrice", { ...a, userId: ue("id") }), nt = async (a) => te("/alarm/deliversign/deleteAlarmPrice", { ...a, userId: ue("id") }), { round: se } = be, ot = (a, F, A, M) => {
341
- const { data: L, time: e } = a, { gridTop: w, gridRight: S, gridLeft: f, maxShowCounts: g, showSubChart: $ } = F;
339
+ B.get, re = B.post;
340
+ }, Qe = (s) => re("/middleLayer/kline/getKlineBasic", { ...s, userId: de("id") }), et = (s) => re("/middleLayer/kline/getKline", s), tt = async (s) => re("/alarm/deliversign/addAlarmPrice", { ...s, userId: de("id") }), nt = async (s) => re("/alarm/deliversign/findAlarmPriceByUserId", { ...s, userId: de("id") }), Oe = async (s) => re("/alarm/deliversign/updateAlarmPrice", { ...s, userId: de("id") }), rt = async (s) => re("/alarm/deliversign/deleteAlarmPrice", { ...s, userId: de("id") }), { round: ue } = De, at = (s, B, I, S) => {
341
+ const { data: k, time: e } = s, { gridTop: Y, gridRight: M, gridLeft: p, maxShowCounts: h, showSubChart: w } = B;
342
342
  return {
343
343
  animation: !1,
344
344
  grid: {
345
- top: `${w}px`,
346
- right: `${S}px`,
347
- bottom: $ ? "6px" : "24px",
348
- left: `${f}px`
345
+ top: `${Y}px`,
346
+ right: `${M}px`,
347
+ bottom: w ? "6px" : "24px",
348
+ left: `${p}px`
349
349
  },
350
350
  dataZoom: [
351
351
  {
352
352
  type: "inside",
353
- startValue: A,
354
- endValue: M,
355
- maxValueSpan: g
353
+ startValue: I,
354
+ endValue: S,
355
+ maxValueSpan: h
356
356
  }
357
357
  ],
358
358
  tooltip: {
@@ -363,16 +363,16 @@ const Xe = (a) => {
363
363
  type: "cross",
364
364
  label: {
365
365
  rich: {},
366
- formatter: (c) => {
367
- const { axisDimension: m, value: h } = c;
368
- return m === "x" ? $ ? "" : h : String(se(h));
366
+ formatter: (a) => {
367
+ const { axisDimension: g, value: y } = a;
368
+ return g === "x" ? w ? "" : y : String(ue(y));
369
369
  }
370
370
  }
371
371
  },
372
372
  formatter: () => ""
373
373
  },
374
374
  xAxis: {
375
- show: !$,
375
+ show: !w,
376
376
  type: "category",
377
377
  data: e,
378
378
  splitLine: {
@@ -391,13 +391,13 @@ const Xe = (a) => {
391
391
  color: "#333"
392
392
  }
393
393
  },
394
- min: (c) => se(c.min),
395
- max: (c) => se(c.max)
394
+ min: (a) => ue(a.min),
395
+ max: (a) => ue(a.max)
396
396
  },
397
397
  series: [
398
398
  {
399
399
  type: "candlestick",
400
- data: L,
400
+ data: k,
401
401
  itemStyle: {
402
402
  color: "transparent",
403
403
  color0: "#00FFFF",
@@ -406,47 +406,62 @@ const Xe = (a) => {
406
406
  borderWidth: 1
407
407
  }
408
408
  },
409
- ...a.mainIndicator.map((c) => ({
410
- name: c.key,
409
+ ...s.mainIndicator.map((a) => ({
410
+ name: a.key,
411
411
  type: "line",
412
412
  silent: !0,
413
413
  symbol: "none",
414
- data: c.data,
414
+ data: a.data,
415
415
  lineStyle: {
416
- width: c.width || 1
416
+ width: a.width || 1
417
417
  },
418
418
  itemStyle: {
419
- color: c.color
419
+ color: a.color
420
420
  }
421
421
  }))
422
- ]
422
+ ],
423
+ toolbox: {
424
+ show: !1
425
+ },
426
+ brush: {
427
+ xAxisIndex: "all",
428
+ brushLink: "all",
429
+ transformable: !1,
430
+ outOfBrush: {
431
+ colorAlpha: 2
432
+ },
433
+ brushStyle: {
434
+ color: "rgba(255,255,255,0.1)",
435
+ borderColor: "rgba(255,255,255,0.4)"
436
+ }
437
+ }
423
438
  };
424
- }, rt = (a, F, A, M, L) => {
425
- const { variety: e, featureId: w, featureType: S } = A, { gridTop: f, gridLeft: g, gridRight: $ } = M;
426
- return F.reduce((c, m) => {
427
- const { warnPrice: h } = m, b = a == null ? void 0 : a.convertToPixel({ yAxisIndex: 0 }, h);
428
- if (b <= f || b >= (a == null ? void 0 : a.getHeight()))
429
- return c;
430
- let E = 0;
439
+ }, ot = (s, B, I, S, k) => {
440
+ const { variety: e, featureId: Y, featureType: M } = I, { gridTop: p, gridLeft: h, gridRight: w } = S;
441
+ return B.reduce((a, g) => {
442
+ const { warnPrice: y } = g, x = s == null ? void 0 : s.convertToPixel({ yAxisIndex: 0 }, y);
443
+ if (x <= p || x >= (s == null ? void 0 : s.getHeight()))
444
+ return a;
445
+ let W = 0;
431
446
  return [
432
- ...c,
447
+ ...a,
433
448
  {
434
449
  type: "group",
435
450
  name: "warningLine",
436
- info: m,
451
+ info: g,
437
452
  draggable: "vertical",
438
453
  children: [
439
454
  {
440
455
  type: "line",
441
- info: m,
456
+ info: g,
442
457
  shape: {
443
- x1: g,
458
+ x1: h,
444
459
  // 开始X坐标
445
- y1: b,
460
+ y1: x,
446
461
  // 开始Y坐标
447
- x2: (a == null ? void 0 : a.getWidth()) - $,
462
+ x2: (s == null ? void 0 : s.getWidth()) - w,
448
463
  // 结束X坐标
449
- y2: b
464
+ y2: x
450
465
  // 结束Y坐标
451
466
  },
452
467
  style: {
@@ -458,12 +473,12 @@ const Xe = (a) => {
458
473
  },
459
474
  {
460
475
  type: "text",
461
- info: m,
462
- x: (a == null ? void 0 : a.getWidth()) - $,
463
- y: b - 5,
476
+ info: g,
477
+ x: (s == null ? void 0 : s.getWidth()) - w,
478
+ y: x - 5,
464
479
  style: {
465
480
  fill: "#FFF",
466
- text: h,
481
+ text: y,
467
482
  stroke: "#000",
468
483
  lineWidth: 1,
469
484
  opacity: 1
@@ -472,37 +487,37 @@ const Xe = (a) => {
472
487
  }
473
488
  ],
474
489
  // 事件:开始拖拽
475
- ondragstart: (T) => {
476
- E = T.offsetY;
490
+ ondragstart: (F) => {
491
+ W = F.offsetY;
477
492
  },
478
- ondrag: (T) => {
479
- var j;
480
- if (T.target && T.target.childAt(1)) {
481
- const O = a.convertFromPixel({ yAxisIndex: 0 }, b + (T.offsetY - E));
482
- (j = T.target.childAt(1)) == null || j.animate("style", !1).when(1, { text: se(O, 3) }).start();
493
+ ondrag: (F) => {
494
+ var q;
495
+ if (F.target && F.target.childAt(1)) {
496
+ const V = s.convertFromPixel({ yAxisIndex: 0 }, x + (F.offsetY - W));
497
+ (q = F.target.childAt(1)) == null || q.animate("style", !1).when(1, { text: ue(V, 3) }).start();
483
498
  }
484
499
  },
485
500
  // 事件:结束拖拽
486
- ondragend: async (T) => {
487
- const O = T.offsetY - E;
488
- if (O !== 0) {
489
- const U = a == null ? void 0 : a.convertFromPixel({ yAxisIndex: 0 }, O + b), _ = {
490
- id: m.id,
491
- warnPrice: se(U, 3),
492
- featureId: w,
501
+ ondragend: async (F) => {
502
+ const V = F.offsetY - W;
503
+ if (V !== 0) {
504
+ const Z = s == null ? void 0 : s.convertFromPixel({ yAxisIndex: 0 }, V + x), v = {
505
+ id: g.id,
506
+ warnPrice: ue(Z, 3),
507
+ featureId: Y,
493
508
  //品种id
494
509
  featureCode: e,
495
510
  //品种代码
496
- featureType: S
511
+ featureType: M
497
512
  //品种类型
498
513
  };
499
- await Te(_), pe.success("画线预警修改成功"), L && L();
514
+ await Oe(v), ge.success("画线预警修改成功"), k && k();
500
515
  }
501
516
  }
502
517
  }
503
518
  ];
504
519
  }, []);
505
- }, it = { class: "kline-tips" }, at = /* @__PURE__ */ we({
520
+ }, it = { class: "kline-tips" }, st = /* @__PURE__ */ Me({
506
521
  __name: "index",
507
522
  props: {
508
523
  // 提示数据
@@ -511,18 +526,18 @@ const Xe = (a) => {
511
526
  require: !0
512
527
  }
513
528
  },
514
- setup(a) {
515
- return (F, A) => (H(), z("div", it, [
516
- (H(!0), z(me, null, _e(a.data, (M, L) => (H(), z("div", {
517
- key: L,
529
+ setup(s) {
530
+ return (B, I) => (j(), U("div", it, [
531
+ (j(!0), U(he, null, _e(s.data, (S, k) => (j(), U("div", {
532
+ key: k,
518
533
  class: "kline-tips-item",
519
- style: xe({ color: M.color })
520
- }, ve(M.label) + " " + ve(M.value), 5))), 128))
534
+ style: we({ color: S.color })
535
+ }, ve(S.label) + " " + ve(S.value), 5))), 128))
521
536
  ]));
522
537
  }
523
538
  });
524
- const he = /* @__PURE__ */ ce(at, [["__scopeId", "data-v-f83b6b36"]]);
525
- const st = { class: "kline-tips" }, lt = {
539
+ const xe = /* @__PURE__ */ fe(st, [["__scopeId", "data-v-f83b6b36"]]);
540
+ const lt = { class: "kline-tips" }, ut = {
526
541
  __name: "index",
527
542
  props: {
528
543
  // 提示数据
@@ -535,36 +550,36 @@ const st = { class: "kline-tips" }, lt = {
535
550
  require: !0
536
551
  }
537
552
  },
538
- setup(a) {
539
- const { round: F, formatValue: A } = be, M = a, L = le(() => {
540
- const { data: w, activeIndex: S } = M;
541
- if (w.data && w.data[S]) {
542
- const f = w.data[S], g = [
543
- { label: "开", value: F(f[0]) },
544
- { label: "高", value: F(f[3]) },
545
- { label: "低", value: F(f[2]) },
546
- { label: "收", value: F(f[1]) }
553
+ setup(s) {
554
+ const { round: B, formatValue: I } = De, S = s, k = ce(() => {
555
+ const { data: Y, activeIndex: M } = S;
556
+ if (Y.data && Y.data[M]) {
557
+ const p = Y.data[M], h = [
558
+ { label: "开", value: B(p[0]) },
559
+ { label: "高", value: B(p[3]) },
560
+ { label: "低", value: B(p[2]) },
561
+ { label: "收", value: B(p[1]) }
547
562
  ];
548
- f[4] !== null && g.push({ label: "额", value: A(f[4]) });
549
- let $;
550
- return f[6] > 0 ? $ = "red" : f[6] < 0 && ($ = "green"), g.push({ label: "涨跌", value: `${F(f[6])}%`, color: $ }), g;
563
+ p[4] !== null && h.push({ label: "额", value: I(p[4]) });
564
+ let w;
565
+ return p[6] > 0 ? w = "red" : p[6] < 0 && (w = "green"), h.push({ label: "涨跌", value: `${B(p[6])}%`, color: w }), h;
551
566
  }
552
567
  return [];
553
- }), e = le(() => {
554
- var f;
555
- const { data: w, activeIndex: S } = M;
556
- return ((f = w == null ? void 0 : w.mainIndicator) == null ? void 0 : f.map((g) => ({ label: g.key, value: F(g.data[S]), color: g.color }))) || [];
568
+ }), e = ce(() => {
569
+ var p;
570
+ const { data: Y, activeIndex: M } = S;
571
+ return ((p = Y == null ? void 0 : Y.mainIndicator) == null ? void 0 : p.map((h) => ({ label: h.key, value: B(h.data[M]), color: h.color }))) || [];
557
572
  });
558
- return (w, S) => (H(), z("div", st, [
559
- q(he, { data: L.value }, null, 8, ["data"]),
560
- q(he, { data: e.value }, null, 8, ["data"])
573
+ return (Y, M) => (j(), U("div", lt, [
574
+ z(xe, { data: k.value }, null, 8, ["data"]),
575
+ z(xe, { data: e.value }, null, 8, ["data"])
561
576
  ]));
562
577
  }
563
- }, ut = /* @__PURE__ */ ce(lt, [["__scopeId", "data-v-64b5c2a3"]]);
564
- const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
578
+ }, ct = /* @__PURE__ */ fe(ut, [["__scopeId", "data-v-64b5c2a3"]]);
579
+ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
565
580
  key: 0,
566
581
  class: "klineSub-tips-select"
567
- }, pt = {
582
+ }, mt = {
568
583
  __name: "index",
569
584
  props: {
570
585
  data: { type: Object, require: !0 },
@@ -575,57 +590,57 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
575
590
  // 副图指标列表
576
591
  },
577
592
  emits: ["update:modelValue"],
578
- setup(a, { expose: F, emit: A }) {
579
- const { round: M } = be;
580
- let L, e;
581
- const w = A, S = a, f = C(), g = le({
593
+ setup(s, { expose: B, emit: I }) {
594
+ const { round: S } = De;
595
+ let k, e;
596
+ const Y = I, M = s, p = H(), h = ce({
582
597
  get() {
583
- return S.modelValue;
598
+ return M.modelValue;
584
599
  },
585
- set(m) {
586
- w("update:modelValue", m);
600
+ set(g) {
601
+ Y("update:modelValue", g);
587
602
  }
588
- }), $ = le(() => {
589
- var b;
590
- const { data: m, activeIndex: h } = S;
591
- return ((b = m == null ? void 0 : m.subIndicator) == null ? void 0 : b.map((E) => ({ label: E.key, color: E.color, value: E.data[h] || "-" }))) || [];
603
+ }), w = ce(() => {
604
+ var x;
605
+ const { data: g, activeIndex: y } = M;
606
+ return ((x = g == null ? void 0 : g.subIndicator) == null ? void 0 : x.map((W) => ({ label: W.key, color: W.color, value: W.data[y] || "-" }))) || [];
592
607
  });
593
- Se(() => {
594
- L = ge.init(f.value);
595
- let m = !0;
608
+ $e(() => {
609
+ k = be.init(p.value);
610
+ let g = !0;
596
611
  e = new ResizeObserver(() => {
597
- if (m) {
598
- m = null;
612
+ if (g) {
613
+ g = null;
599
614
  return;
600
615
  }
601
- L.resize();
602
- }), e.observe(f.value);
603
- }), ke(() => {
604
- L.dispose(), e.disconnect(), e = null;
616
+ k.resize();
617
+ }), e.observe(p.value);
618
+ }), Se(() => {
619
+ k.dispose(), e.disconnect(), e = null;
605
620
  });
606
- const c = (m, h) => {
607
- const b = m[h], E = h === 0 ? m[h] : m[h - 1];
608
- return b[0] === b[1] ? b[0] >= E[1] ? {
621
+ const a = (g, y) => {
622
+ const x = g[y], W = y === 0 ? g[y] : g[y - 1];
623
+ return x[0] === x[1] ? x[0] >= W[1] ? {
609
624
  color: "transparent",
610
625
  borderColor: "#FF0000"
611
626
  } : {
612
627
  color: "#00FFFF"
613
- } : b[1] > b[0] ? {
628
+ } : x[1] > x[0] ? {
614
629
  color: "transparent",
615
630
  borderColor: "#FF0000"
616
631
  } : {
617
632
  color: "#00FFFF"
618
633
  };
619
634
  };
620
- return F({
621
- connect: (m) => {
622
- ge.connect([m, L]);
635
+ return B({
636
+ connect: (g) => {
637
+ be.connect([g, k]);
623
638
  },
624
639
  // 联动
625
- draw: (m, h) => {
626
- Me(() => {
627
- const { startValue: b, endValue: E, maxValueSpan: T } = m, { leftYAxisRange: j, rightYAxisRange: O } = S.data.subIndicator[0], U = S.data.subIndicator.map((_) => {
628
- if (_.series === "bar")
640
+ draw: (g, y) => {
641
+ ke(() => {
642
+ const { startValue: x, endValue: W, maxValueSpan: F } = g, { leftYAxisRange: q, rightYAxisRange: V } = M.data.subIndicator[0], Z = M.data.subIndicator.map((v) => {
643
+ if (v.series === "bar")
629
644
  return {
630
645
  name: "subMain",
631
646
  xAxisIndex: 0,
@@ -633,53 +648,53 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
633
648
  type: "bar",
634
649
  silent: !0,
635
650
  symbol: "none",
636
- data: _.data.map((P, Y) => _.seriesColor === "kline" ? {
637
- value: P,
638
- itemStyle: c(S.data.data, Y)
639
- } : _.seriesColor === "value" ? {
640
- value: P,
651
+ data: v.data.map((N, C) => v.seriesColor === "kline" ? {
652
+ value: N,
653
+ itemStyle: a(M.data.data, C)
654
+ } : v.seriesColor === "value" ? {
655
+ value: N,
641
656
  itemStyle: {
642
- color: P >= 0 ? "#FF0000" : "#00FFFF"
657
+ color: N >= 0 ? "#FF0000" : "#00FFFF"
643
658
  }
644
659
  } : {
645
- value: P,
660
+ value: N,
646
661
  itemStyle: {
647
- color: _.seriesColor
662
+ color: v.seriesColor
648
663
  }
649
664
  })
650
665
  };
651
- if (_.series === "line")
666
+ if (v.series === "line")
652
667
  return {
653
668
  xAxisIndex: 0,
654
- yAxisIndex: _.yAxis === "right" ? 2 : 1,
655
- name: _.key,
669
+ yAxisIndex: v.yAxis === "right" ? 2 : 1,
670
+ name: v.key,
656
671
  type: "line",
657
672
  silent: !0,
658
673
  symbol: "none",
659
- data: _.data,
674
+ data: v.data,
660
675
  lineStyle: {
661
676
  width: 1
662
677
  },
663
678
  itemStyle: {
664
- color: _.color
679
+ color: v.color
665
680
  }
666
681
  };
667
682
  });
668
- L.setOption(
683
+ k.setOption(
669
684
  {
670
685
  animation: !1,
671
686
  grid: {
672
- left: `${h.gridLeft}px`,
687
+ left: `${y.gridLeft}px`,
673
688
  top: "10px",
674
- right: `${h.gridRight}px`,
689
+ right: `${y.gridRight}px`,
675
690
  bottom: "20px"
676
691
  },
677
692
  dataZoom: [
678
693
  {
679
694
  type: "inside",
680
- startValue: b,
681
- endValue: E,
682
- maxValueSpan: T
695
+ startValue: x,
696
+ endValue: W,
697
+ maxValueSpan: F
683
698
  }
684
699
  ],
685
700
  tooltip: {
@@ -690,12 +705,12 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
690
705
  type: "cross",
691
706
  label: {
692
707
  rich: {},
693
- formatter: (_) => {
694
- const { axisDimension: P, value: Y } = _;
695
- if (P === "x")
696
- return Y;
697
- if (_.axisIndex === 1)
698
- return String(M(Y));
708
+ formatter: (v) => {
709
+ const { axisDimension: N, value: C } = v;
710
+ if (N === "x")
711
+ return C;
712
+ if (v.axisIndex === 1)
713
+ return String(S(C));
699
714
  }
700
715
  }
701
716
  },
@@ -703,7 +718,7 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
703
718
  },
704
719
  xAxis: {
705
720
  type: "category",
706
- data: S.data.time,
721
+ data: M.data.time,
707
722
  axisLine: {
708
723
  show: !0
709
724
  },
@@ -712,7 +727,7 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
712
727
  },
713
728
  axisLabel: {
714
729
  show: !0,
715
- formatter: (_) => _
730
+ formatter: (v) => v
716
731
  }
717
732
  },
718
733
  yAxis: [
@@ -721,8 +736,8 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
721
736
  },
722
737
  {
723
738
  position: "left",
724
- min: j === "cover" ? (_) => _.min : null,
725
- max: j === "cover" ? (_) => _.max : null,
739
+ min: q === "cover" ? (v) => v.min : null,
740
+ max: q === "cover" ? (v) => v.max : null,
726
741
  splitNumber: 1,
727
742
  axisLine: {
728
743
  show: !0
@@ -737,8 +752,8 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
737
752
  },
738
753
  {
739
754
  position: "right",
740
- min: O === "cover" ? (_) => _.min : null,
741
- max: O === "cover" ? (_) => _.max : null,
755
+ min: V === "cover" ? (v) => v.min : null,
756
+ max: V === "cover" ? (v) => v.max : null,
742
757
  splitNumber: 1,
743
758
  axisLine: {
744
759
  show: !1
@@ -751,101 +766,101 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
751
766
  }
752
767
  }
753
768
  ],
754
- series: U
769
+ series: Z
755
770
  },
756
771
  !0
757
772
  );
758
773
  });
759
774
  }
760
775
  // 重置
761
- }), (m, h) => {
762
- const b = qe, E = ze;
763
- return H(), z("div", ct, [
764
- ee("div", dt, [
765
- $.value.length ? (H(), z("div", ft, [
766
- q(E, {
767
- modelValue: g.value,
768
- "onUpdate:modelValue": h[0] || (h[0] = (T) => g.value = T),
776
+ }), (g, y) => {
777
+ const x = Ue, W = Ze;
778
+ return j(), U("div", dt, [
779
+ ne("div", ft, [
780
+ w.value.length ? (j(), U("div", pt, [
781
+ z(W, {
782
+ modelValue: h.value,
783
+ "onUpdate:modelValue": y[0] || (y[0] = (F) => h.value = F),
769
784
  size: "small",
770
785
  "popper-class": "element-dark",
771
786
  class: "element-dark subIndicator"
772
787
  }, {
773
- default: Q(() => [
774
- (H(!0), z(me, null, _e(a.subIndicatorList, (T) => (H(), Le(b, {
775
- key: T.value,
776
- label: T.label,
777
- value: T.value
788
+ default: te(() => [
789
+ (j(!0), U(he, null, _e(s.subIndicatorList, (F) => (j(), Te(x, {
790
+ key: F.value,
791
+ label: F.label,
792
+ value: F.value
778
793
  }, null, 8, ["label", "value"]))), 128))
779
794
  ]),
780
795
  _: 1
781
796
  }, 8, ["modelValue"])
782
- ])) : ae("", !0),
783
- q(he, { data: $.value }, null, 8, ["data"])
797
+ ])) : le("", !0),
798
+ z(xe, { data: w.value }, null, 8, ["data"])
784
799
  ]),
785
- ee("div", {
800
+ ne("div", {
786
801
  class: "klineSub-chart",
787
802
  ref_key: "subChartRef",
788
- ref: f
803
+ ref: p
789
804
  }, null, 512)
790
805
  ]);
791
806
  };
792
807
  }
793
- }, mt = /* @__PURE__ */ ce(pt, [["__scopeId", "data-v-c06321cd"]]), yt = /* @__PURE__ */ we({
808
+ }, gt = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-c06321cd"]]), ht = /* @__PURE__ */ Me({
794
809
  __name: "index",
795
810
  emits: ["closeContextMenuCallBack"],
796
- setup(a, { emit: F }) {
797
- const A = F, M = C(), L = C(), e = C({
811
+ setup(s, { emit: B }) {
812
+ const I = B, S = H(), k = H(), e = H({
798
813
  display: "none",
799
814
  top: "0px",
800
815
  left: "0px"
801
- }), w = () => {
802
- e.value.display = "none", A("closeContextMenuCallBack"), document.removeEventListener("click", w);
803
- }, S = (f) => {
804
- if (f.preventDefault(), e.value.display === "block") {
805
- const { offsetX: g, offsetY: $ } = f, { offsetWidth: c, offsetHeight: m } = L.value;
806
- if (g <= c && $ <= m)
816
+ }), Y = () => {
817
+ e.value.display = "none", I("closeContextMenuCallBack"), document.removeEventListener("click", Y);
818
+ }, M = (p) => {
819
+ if (p.preventDefault(), e.value.display === "block") {
820
+ const { offsetX: h, offsetY: w } = p, { offsetWidth: a, offsetHeight: g } = k.value;
821
+ if (h <= a && w <= g)
807
822
  return;
808
823
  }
809
- M.value.click(), e.value = {
824
+ S.value.click(), e.value = {
810
825
  display: "block",
811
- top: `${f.offsetY}px`,
812
- left: `${f.offsetX}px`
813
- }, Me(() => {
814
- const g = M.value.getBoundingClientRect(), $ = L.value.getBoundingClientRect();
815
- $.left + $.width >= g.right && (e.value.left = `${f.offsetX - $.width}px`), $.top + $.height >= g.bottom && (console.log("高度超出"), e.value.top = `${f.offsetY - $.height}px`);
816
- }), document.addEventListener("click", w);
826
+ top: `${p.offsetY}px`,
827
+ left: `${p.offsetX}px`
828
+ }, ke(() => {
829
+ const h = S.value.getBoundingClientRect(), w = k.value.getBoundingClientRect();
830
+ w.left + w.width >= h.right && (e.value.left = `${p.offsetX - w.width}px`), w.top + w.height >= h.bottom && (console.log("高度超出"), e.value.top = `${p.offsetY - w.height}px`);
831
+ }), document.addEventListener("click", Y);
817
832
  };
818
- return (f, g) => (H(), z("div", {
833
+ return (p, h) => (j(), U("div", {
819
834
  ref_key: "contextmenuRef",
820
- ref: M,
835
+ ref: S,
821
836
  class: "contextmenu",
822
- onContextmenu: S,
823
- onMouseleave: w
837
+ onContextmenu: M,
838
+ onMouseleave: Y
824
839
  }, [
825
- $e(f.$slots, "default", {}, void 0, !0),
826
- e.value.display !== "none" ? (H(), z("div", {
840
+ Ye(p.$slots, "default", {}, void 0, !0),
841
+ e.value.display !== "none" ? (j(), U("div", {
827
842
  key: 0,
828
843
  ref_key: "contextmenuContentRef",
829
- ref: L,
844
+ ref: k,
830
845
  class: "contextmenu-popover",
831
- style: xe(e.value)
846
+ style: we(e.value)
832
847
  }, [
833
- $e(f.$slots, "popover", {}, void 0, !0)
834
- ], 4)) : ae("", !0)
848
+ Ye(p.$slots, "popover", {}, void 0, !0)
849
+ ], 4)) : le("", !0)
835
850
  ], 544));
836
851
  }
837
852
  });
838
- const vt = /* @__PURE__ */ ce(yt, [["__scopeId", "data-v-811db6b4"]]);
839
- const Fe = (a) => (Pe("data-v-2134db21"), a = a(), Ye(), a), gt = { class: "klineBasic" }, ht = { class: "klineBasic-tips" }, _t = {
853
+ const yt = /* @__PURE__ */ fe(ht, [["__scopeId", "data-v-811db6b4"]]);
854
+ const Fe = (s) => (Pe("data-v-bce59e7d"), s = s(), Ne(), s), vt = { class: "klineBasic" }, bt = { class: "klineBasic-tips" }, xt = {
840
855
  key: 0,
841
856
  class: "klineBasic-sub"
842
- }, xt = {
857
+ }, _t = {
843
858
  key: 1,
844
859
  class: "klineBasic-empty"
845
- }, bt = {
860
+ }, wt = {
846
861
  key: 2,
847
862
  class: "klineBasic-error"
848
- }, $t = /* @__PURE__ */ Fe(() => /* @__PURE__ */ ee("div", { class: "klineBasic-error-content" }, " 加载失败,请刷新重试 ", -1)), wt = { style: { "text-align": "center" } }, St = /* @__PURE__ */ Fe(() => /* @__PURE__ */ ee("span", { style: { "margin-right": "10px" } }, "预警价格:", -1)), kt = { class: "dialog-footer" }, Mt = {
863
+ }, Dt = /* @__PURE__ */ Fe(() => /* @__PURE__ */ ne("div", { class: "klineBasic-error-content" }, "加载失败,请刷新重试", -1)), Yt = { style: { "text-align": "center" } }, Mt = /* @__PURE__ */ Fe(() => /* @__PURE__ */ ne("span", { style: { "margin-right": "10px" } }, "预警价格:", -1)), $t = { class: "dialog-footer" }, St = {
849
864
  __name: "index",
850
865
  props: {
851
866
  variety: {
@@ -904,14 +919,19 @@ const Fe = (a) => (Pe("data-v-2134db21"), a = a(), Ye(), a), gt = { class: "klin
904
919
  env: {
905
920
  type: Object,
906
921
  default: () => ({})
907
- }
922
+ },
908
923
  // 环境变量
924
+ brushRange: {
925
+ type: [Array, null],
926
+ default: () => null
927
+ }
928
+ // 时段框选
909
929
  },
910
930
  emits: ["change", "getFactorData"],
911
- setup(a, { expose: F, emit: A }) {
912
- const M = [{ label: "画线预警", key: "drawWarningLine" }];
913
- let L = null, e = null, w, S, f = !1, g = !1;
914
- const $ = A, c = a, m = C(!1), h = C(!1), b = C(null), E = C(null), T = C("VOL"), j = C(0), O = C({}), U = C([]), _ = C({}), P = C(!1), Y = C(""), ne = C([...M]), Z = le(() => ({
931
+ setup(s, { expose: B, emit: I }) {
932
+ const S = [{ label: "画线预警", key: "drawWarningLine" }];
933
+ let k = null, e = null, Y, M, p = !1, h = !1;
934
+ const w = I, a = s, g = H(!1), y = H(!1), x = H(null), W = H(null), F = H("VOL"), q = H(0), V = H({}), Z = H([]), v = H({}), N = H(!1), C = H(""), ae = H([...S]), K = ce(() => ({
915
935
  defaultShowCounts: 500,
916
936
  // 默认展示条数
917
937
  addCounts: 2e3,
@@ -932,172 +952,213 @@ const Fe = (a) => (Pe("data-v-2134db21"), a = a(), Ye(), a), gt = { class: "klin
932
952
  // 是否展示预警线
933
953
  getFactorData: !0,
934
954
  // 是否获取因子数据
935
- ...c.config
955
+ ...a.config
936
956
  }));
937
- Ie(
957
+ We(
938
958
  () => {
939
- var o, t;
940
- return [
941
- c.variety,
942
- c.cycle,
943
- c.mainIndicator,
944
- T.value,
945
- (o = c.indicatorStore) == null ? void 0 : o.filterIndicator,
946
- (t = c.indicatorStore) == null ? void 0 : t.customIndicator
947
- ];
959
+ var n, t;
960
+ return [a.variety, a.cycle, a.mainIndicator, F.value, (n = a.indicatorStore) == null ? void 0 : n.filterIndicator, (t = a.indicatorStore) == null ? void 0 : t.customIndicator];
948
961
  },
949
962
  () => {
950
- x();
963
+ b();
951
964
  },
952
965
  { deep: !0 }
953
- ), Se(() => {
954
- Xe(c.env), x();
955
- }), ke(() => {
956
- e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(), L == null || L.dispose();
966
+ ), $e(() => {
967
+ Ge(a.env), b();
968
+ }), Se(() => {
969
+ e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(), k == null || k.dispose();
957
970
  });
958
971
  const oe = () => {
959
- e || (e = ge.init(b.value), W(), Z.value.showSubChart && E.value.connect(e), L = je(b.value), L.listen(() => {
972
+ e || (e = be.init(x.value), P(), K.value.showSubChart && W.value.connect(e), k = ze(x.value), k.listen(() => {
960
973
  requestAnimationFrame(() => {
961
974
  e.resize();
962
975
  });
963
976
  }));
964
- }, W = () => {
977
+ }, P = () => {
965
978
  e == null || e.on("datazoom", (t) => {
966
- clearTimeout(S), S = setTimeout(() => {
967
- var d, p, y, v;
968
- const { loadCheckCounts: u } = Z.value;
969
- if ((p = (d = e == null ? void 0 : e.getOption()) == null ? void 0 : d.dataZoom) != null && p[0]) {
970
- const { startValue: V } = (v = (y = e == null ? void 0 : e.getOption()) == null ? void 0 : y.dataZoom) == null ? void 0 : v[0];
971
- V < u && f === !1 && g === !1 && (f = !0, re("history")), l();
979
+ clearTimeout(M), M = setTimeout(() => {
980
+ var l, m, D, T;
981
+ const { loadCheckCounts: d } = K.value;
982
+ if ((m = (l = e == null ? void 0 : e.getOption()) == null ? void 0 : l.dataZoom) != null && m[0]) {
983
+ const { startValue: E } = (T = (D = e == null ? void 0 : e.getOption()) == null ? void 0 : D.dataZoom) == null ? void 0 : T[0];
984
+ E < d && p === !1 && h === !1 && (p = !0, ie("history")), c();
972
985
  }
973
- clearTimeout(S);
986
+ clearTimeout(M);
974
987
  }, 100);
975
988
  }), e == null || e.on("highlight", (t) => {
976
- var d, p;
977
- let u = t.dataIndex || -1;
978
- t.batch && (u = typeof ((d = t == null ? void 0 : t.batch[0]) == null ? void 0 : d.dataIndex) == "number" ? (p = t == null ? void 0 : t.batch[0]) == null ? void 0 : p.dataIndex : -1), clearTimeout(w), w = setTimeout(() => {
979
- j.value = u, clearTimeout(w);
989
+ var l, m;
990
+ let d = t.dataIndex || -1;
991
+ t.batch && (d = typeof ((l = t == null ? void 0 : t.batch[0]) == null ? void 0 : l.dataIndex) == "number" ? (m = t == null ? void 0 : t.batch[0]) == null ? void 0 : m.dataIndex : -1), clearTimeout(Y), Y = setTimeout(() => {
992
+ q.value = d, clearTimeout(Y);
980
993
  }, 20);
981
994
  }), e == null || e.on("globalout", () => {
982
- var u, d, p;
983
- const t = (p = (d = (u = e == null ? void 0 : e.getOption()) == null ? void 0 : u.dataZoom) == null ? void 0 : d[0]) == null ? void 0 : p.endValue;
984
- j.value = t;
995
+ var d, l, m;
996
+ const t = (m = (l = (d = e == null ? void 0 : e.getOption()) == null ? void 0 : d.dataZoom) == null ? void 0 : l[0]) == null ? void 0 : m.endValue;
997
+ q.value = t;
985
998
  });
986
- let o = null;
999
+ let n = null;
987
1000
  e == null || e.on("contextmenu", (t) => {
988
- o = setTimeout(() => {
989
- t.componentType === "graphic" && (_.value = t.info, ne.value = [
1001
+ n = setTimeout(() => {
1002
+ t.componentType === "graphic" && (v.value = t.info, ae.value = [
990
1003
  { label: "删除画线", key: "deleteWarningLine" },
991
1004
  { label: "修改画线", key: "changeWarningLine" }
992
- ]), clearTimeout(o), o = null;
1005
+ ]), clearTimeout(n), n = null;
993
1006
  });
994
1007
  });
995
- }, x = async () => {
996
- var o, t, u, d, p, y;
1008
+ }, b = async () => {
1009
+ var n, t, d, l, m, D;
997
1010
  try {
998
- if (!c.variety || !c.cycle)
1011
+ if (!a.variety || !a.cycle)
999
1012
  return;
1000
- const {
1001
- variety: v,
1002
- featureId: V,
1003
- cycle: D,
1004
- indicatorStore: k,
1005
- mainIndicator: B,
1006
- right: I,
1007
- startTime: R,
1008
- endTime: N
1009
- } = c, { defaultShowCounts: X, addCounts: G, showWarningLine: ye, getFactorData: de } = Z.value, K = {
1010
- variety: v,
1011
- featureId: V,
1012
- cycle: D,
1013
- mainIndicatorList: k.getIndicatorParams(B),
1014
- subIndicator: T.value,
1015
- right: I,
1013
+ const { variety: T, featureId: E, cycle: R, indicatorStore: _, mainIndicator: L, right: X, startTime: J, endTime: A } = a, { defaultShowCounts: G, addCounts: $, showWarningLine: ye, getFactorData: pe } = K.value, Q = {
1014
+ variety: T,
1015
+ featureId: E,
1016
+ cycle: R,
1017
+ mainIndicatorList: _.getIndicatorParams(L),
1018
+ subIndicator: F.value,
1019
+ right: X,
1016
1020
  showWarningLine: ye,
1017
- getFactorData: de
1021
+ getFactorData: pe
1018
1022
  };
1019
- R && N ? (K.startTime = R, K.endTime = N) : R ? (K.startTime = R, K.limit = X + G) : N ? (K.endTime = N, K.limit = X + G) : (K.endTime = Je().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), K.limit = X + G);
1020
- const J = await Ge(K);
1021
- if ((u = (t = (o = J == null ? void 0 : J.body) == null ? void 0 : o.kline) == null ? void 0 : t.time) != null && u.length)
1022
- m.value = !1, h.value = !1;
1023
+ J && A ? (Q.startTime = J, Q.endTime = A) : J ? (Q.startTime = J, Q.limit = G + $) : A ? (Q.endTime = A, Q.limit = G + $) : (Q.endTime = O().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), Q.limit = G + $);
1024
+ const ee = await Qe(Q);
1025
+ if ((d = (t = (n = ee == null ? void 0 : ee.body) == null ? void 0 : n.kline) == null ? void 0 : t.time) != null && d.length)
1026
+ g.value = !1, y.value = !1;
1023
1027
  else {
1024
- m.value = !0, h.value = !1;
1028
+ g.value = !0, y.value = !1;
1025
1029
  return;
1026
1030
  }
1027
- O.value = (d = J == null ? void 0 : J.body) == null ? void 0 : d.kline, U.value = ((p = J == null ? void 0 : J.body) == null ? void 0 : p.warningLine) || [], ie(), l(), de && $("getFactorData", (y = J == null ? void 0 : J.body) == null ? void 0 : y.factor);
1028
- } catch (v) {
1029
- throw h.value = !0, m.value = !1, new Error(v);
1031
+ V.value = (l = ee == null ? void 0 : ee.body) == null ? void 0 : l.kline, Z.value = ((m = ee == null ? void 0 : ee.body) == null ? void 0 : m.warningLine) || [], se(), c(), pe && w("getFactorData", (D = ee == null ? void 0 : ee.body) == null ? void 0 : D.factor);
1032
+ } catch (T) {
1033
+ throw y.value = !0, g.value = !1, new Error(T);
1030
1034
  }
1031
- }, re = async (o) => {
1032
- const { variety: t, cycle: u, indicatorStore: d, mainIndicator: p, right: y } = c, { addCounts: v } = Z.value, { time: V } = O.value;
1033
- if (o === "history") {
1034
- const D = await Qe({
1035
+ }, ie = async (n) => {
1036
+ const { variety: t, cycle: d, indicatorStore: l, mainIndicator: m, right: D } = a, { addCounts: T } = K.value, { time: E } = V.value;
1037
+ if (n === "history") {
1038
+ const R = await et({
1035
1039
  variety: t,
1036
- cycle: u,
1037
- endTime: V[0],
1038
- limit: v,
1039
- mainIndicatorList: d.getIndicatorParams(p),
1040
- subIndicator: T.value,
1041
- right: y
1040
+ cycle: d,
1041
+ endTime: E[0],
1042
+ limit: T,
1043
+ mainIndicatorList: l.getIndicatorParams(m),
1044
+ subIndicator: F.value,
1045
+ right: D
1042
1046
  });
1043
- O.value = {
1044
- time: [...D.body.time, ...O.value.time.slice(1)],
1045
- data: [...D.body.data, ...O.value.data.slice(1)],
1046
- mainIndicator: O.value.mainIndicator.map((k, B) => ({
1047
- ...k,
1048
- data: [...D.body.mainIndicator[B].data, ...k.data.slice(1)]
1047
+ V.value = {
1048
+ time: [...R.body.time, ...V.value.time.slice(1)],
1049
+ data: [...R.body.data, ...V.value.data.slice(1)],
1050
+ mainIndicator: V.value.mainIndicator.map((_, L) => ({
1051
+ ..._,
1052
+ data: [...R.body.mainIndicator[L].data, ..._.data.slice(1)]
1049
1053
  })),
1050
- subIndicator: O.value.subIndicator.map((k, B) => ({
1051
- ...k,
1052
- data: [...D.body.subIndicator[B].data, ...k.data.slice(1)]
1054
+ subIndicator: V.value.subIndicator.map((_, L) => ({
1055
+ ..._,
1056
+ data: [...R.body.subIndicator[L].data, ..._.data.slice(1)]
1053
1057
  }))
1054
- }, ie(!0), D.body.data.length < v && (g = !0), f = !1;
1058
+ }, se(!0), R.body.data.length < T && (h = !0), p = !1;
1055
1059
  }
1056
- }, ie = (o = !1) => {
1057
- var B, I, R;
1060
+ }, se = (n = !1) => {
1061
+ var L, X, J;
1058
1062
  oe();
1059
- const { time: t } = O.value, { gridRight: u, gridLeft: d, defaultShowCounts: p, maxShowCounts: y, showSubChart: v } = Z.value;
1060
- let V = t.length - 1 - p, D = t.length - 1;
1061
- if (o) {
1062
- const N = e.getOption(), X = (I = (B = N == null ? void 0 : N.xAxis) == null ? void 0 : B[0]) == null ? void 0 : I.data, G = (R = N == null ? void 0 : N.dataZoom) == null ? void 0 : R[0], ye = X[G == null ? void 0 : G.startValue], de = X[G == null ? void 0 : G.endValue];
1063
- V = t.findIndex((K) => K === ye), D = t.findIndex((K) => K === de);
1063
+ const { time: t } = V.value, { gridRight: d, gridLeft: l, defaultShowCounts: m, maxShowCounts: D, showSubChart: T } = K.value;
1064
+ let E = t.length - 1 - m, R = t.length - 1;
1065
+ if (n) {
1066
+ const A = e.getOption(), G = (X = (L = A == null ? void 0 : A.xAxis) == null ? void 0 : L[0]) == null ? void 0 : X.data, $ = (J = A == null ? void 0 : A.dataZoom) == null ? void 0 : J[0], ye = G[$ == null ? void 0 : $.startValue], pe = G[$ == null ? void 0 : $.endValue];
1067
+ E = t.findIndex((Q) => Q === ye), R = t.findIndex((Q) => Q === pe);
1064
1068
  }
1065
- const k = ot(O.value, Z.value, V, D);
1066
- e.setOption(k, !0), j.value = D, v && E.value.draw(
1067
- { startValue: V, endValue: D, maxValueSpan: y },
1068
- { gridLeft: d, gridRight: u }
1069
- );
1070
- }, l = () => {
1069
+ const _ = at(V.value, K.value, E, R);
1070
+ if (e.setOption(_, !0), q.value = R, a.brushRange) {
1071
+ let A = null, G = null;
1072
+ switch (a.cycle) {
1073
+ case "6": {
1074
+ A = t.find(($) => new Date($).getTime() >= new Date(a.brushRange[0]).getTime() || O($).format("YYYY-MM-DD") === O(a.brushRange[0]).format("YYYY-MM-DD")), G = t.findLast(($) => new Date($).getTime() <= new Date(a.brushRange[1]).getTime() || O($).format("YYYY-MM-DD") === O(a.brushRange[1]).format("YYYY-MM-DD"));
1075
+ break;
1076
+ }
1077
+ case "7": {
1078
+ A = t.find(($) => O($).day(5).format("YYYY-MM-DD") === O(a.brushRange[0]).day(5).format("YYYY-MM-DD")), G = t.findLast(($) => O($).day(5).format("YYYY-MM-DD") === O(a.brushRange[1]).day(5).format("YYYY-MM-DD"));
1079
+ break;
1080
+ }
1081
+ case "8": {
1082
+ A = t.find(($) => O($).endOf("month").format("YYYY-MM-DD") === O(a.brushRange[0]).endOf("month").format("YYYY-MM-DD")), G = t.findLast(($) => O($).endOf("month").format("YYYY-MM-DD") === O(a.brushRange[1]).endOf("month").format("YYYY-MM-DD"));
1083
+ break;
1084
+ }
1085
+ default:
1086
+ A = t.find(($) => new Date($).getTime() >= new Date(a.brushRange[0]).getTime()), G = t.findLast(($) => new Date($).getTime() <= new Date(a.brushRange[1]).getTime());
1087
+ }
1088
+ console.log(A, G), e.dispatchAction({
1089
+ type: "brush",
1090
+ areas: [
1091
+ {
1092
+ brushType: "lineX",
1093
+ coordRange: [A, G],
1094
+ xAxisIndex: 0
1095
+ }
1096
+ ]
1097
+ });
1098
+ }
1099
+ T && W.value.draw({ startValue: E, endValue: R, maxValueSpan: D }, { gridLeft: l, gridRight: d }), i();
1100
+ }, c = () => {
1071
1101
  if (!e)
1072
1102
  return;
1073
- const o = e == null ? void 0 : e.getOption();
1074
- o && (e == null || e.setOption(
1103
+ const n = e == null ? void 0 : e.getOption();
1104
+ n && (e == null || e.setOption(
1075
1105
  {
1076
- ...o,
1106
+ ...n,
1077
1107
  graphic: [
1078
- ...rt(e, U.value, c, Z.value, () => {
1108
+ ...ot(e, Z.value, a, K.value, () => {
1079
1109
  r();
1080
1110
  })
1081
1111
  ]
1082
1112
  },
1083
1113
  !0
1084
- ));
1114
+ ), i());
1115
+ }, i = () => {
1116
+ if (a.brushRange) {
1117
+ const { time: n } = V.value;
1118
+ let t = null, d = null;
1119
+ switch (a.cycle) {
1120
+ case "6": {
1121
+ t = n.find((l) => new Date(l).getTime() >= new Date(a.brushRange[0]).getTime() || O(l).format("YYYY-MM-DD") === O(a.brushRange[0]).format("YYYY-MM-DD")), d = n.findLast((l) => new Date(l).getTime() <= new Date(a.brushRange[1]).getTime() || O(l).format("YYYY-MM-DD") === O(a.brushRange[1]).format("YYYY-MM-DD"));
1122
+ break;
1123
+ }
1124
+ case "7": {
1125
+ t = n.find((l) => O(l).day(5).format("YYYY-MM-DD") === O(a.brushRange[0]).day(5).format("YYYY-MM-DD")), d = n.findLast((l) => O(l).day(5).format("YYYY-MM-DD") === O(a.brushRange[1]).day(5).format("YYYY-MM-DD"));
1126
+ break;
1127
+ }
1128
+ case "8": {
1129
+ t = n.find((l) => O(l).endOf("month").format("YYYY-MM-DD") === O(a.brushRange[0]).endOf("month").format("YYYY-MM-DD")), d = n.findLast((l) => O(l).endOf("month").format("YYYY-MM-DD") === O(a.brushRange[1]).endOf("month").format("YYYY-MM-DD"));
1130
+ break;
1131
+ }
1132
+ default:
1133
+ t = n.find((l) => new Date(l).getTime() >= new Date(a.brushRange[0]).getTime()), d = n.findLast((l) => new Date(l).getTime() <= new Date(a.brushRange[1]).getTime());
1134
+ }
1135
+ console.log(t, d), e.dispatchAction({
1136
+ type: "brush",
1137
+ areas: [
1138
+ {
1139
+ brushType: "lineX",
1140
+ coordRange: [t, d],
1141
+ xAxisIndex: 0
1142
+ }
1143
+ ]
1144
+ });
1145
+ }
1085
1146
  }, r = async () => {
1086
- const o = await tt({ featureId: c.featureId });
1087
- U.value = (o == null ? void 0 : o.body) || [], l(), $("change", "warningLine", U.value);
1088
- }, n = async (o) => {
1089
- const { variety: t, varietyName: u, featureId: d, featureType: p } = c;
1090
- if (o.key === "drawWarningLine") {
1091
- const y = e == null ? void 0 : e.getOption(), v = y.tooltip[0];
1147
+ const n = await nt({ featureId: a.featureId });
1148
+ Z.value = (n == null ? void 0 : n.body) || [], c(), w("change", "warningLine", Z.value);
1149
+ }, u = async (n) => {
1150
+ const { variety: t, varietyName: d, featureId: l, featureType: m } = a;
1151
+ if (n.key === "drawWarningLine") {
1152
+ const D = e == null ? void 0 : e.getOption(), T = D.tooltip[0];
1092
1153
  e == null || e.setOption({
1093
- ...y,
1154
+ ...D,
1094
1155
  // 指示器样式
1095
1156
  tooltip: {
1096
- ...v,
1157
+ ...T,
1097
1158
  // 坐标轴指示器
1098
1159
  axisPointer: {
1099
1160
  // 保留原有部分配置
1100
- ...v.axisPointer,
1161
+ ...T.axisPointer,
1101
1162
  // X轴指示线的宽度
1102
1163
  lineStyle: {
1103
1164
  width: 0
@@ -1109,25 +1170,25 @@ const Fe = (a) => (Pe("data-v-2134db21"), a = a(), Ye(), a), gt = { class: "klin
1109
1170
  // 文本标签
1110
1171
  label: {
1111
1172
  // 保留原有部分配置
1112
- ...v.axisPointer.label,
1173
+ ...T.axisPointer.label,
1113
1174
  // 颜色改为透明
1114
1175
  backgroundColor: "transparent",
1115
1176
  // 仅显示Y轴值
1116
- formatter: (D) => ""
1177
+ formatter: (R) => ""
1117
1178
  }
1118
1179
  }
1119
1180
  }
1120
1181
  });
1121
- const V = async (D) => {
1122
- e == null || e.getZr().off("mousedown", V);
1123
- const k = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 }, D.offsetY), B = Math.round(k * 1e3) / 1e3;
1182
+ const E = async (R) => {
1183
+ e == null || e.getZr().off("mousedown", E);
1184
+ const _ = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 }, R.offsetY), L = Math.round(_ * 1e3) / 1e3;
1124
1185
  e == null || e.setOption({
1125
- ...y,
1186
+ ...D,
1126
1187
  // 指示器样式
1127
1188
  tooltip: {
1128
- ...v,
1189
+ ...T,
1129
1190
  axisPointer: {
1130
- ...v.axisPointer,
1191
+ ...T.axisPointer,
1131
1192
  lineStyle: {
1132
1193
  width: 1
1133
1194
  },
@@ -1135,79 +1196,79 @@ const Fe = (a) => (Pe("data-v-2134db21"), a = a(), Ye(), a), gt = { class: "klin
1135
1196
  width: 1
1136
1197
  },
1137
1198
  label: {
1138
- ...v.axisPointer.label,
1199
+ ...T.axisPointer.label,
1139
1200
  backgroundColor: null
1140
1201
  }
1141
1202
  }
1142
1203
  }
1143
- }), await et({
1204
+ }), await tt({
1144
1205
  featureCode: t,
1145
1206
  //品种代码
1146
- featureName: u,
1207
+ featureName: d,
1147
1208
  //品种名称
1148
- featureId: d,
1209
+ featureId: l,
1149
1210
  //品种id
1150
- featureType: p,
1211
+ featureType: m,
1151
1212
  //品种类型
1152
- warnPrice: B
1153
- }), pe.success("画线预警成功!"), r();
1213
+ warnPrice: L
1214
+ }), ge.success("画线预警成功!"), r();
1154
1215
  };
1155
- e == null || e.getZr().on("mousedown", V);
1216
+ e == null || e.getZr().on("mousedown", E);
1156
1217
  } else
1157
- o.key === "deleteWarningLine" ? (await nt({ id: _.value.id }), pe.success("画线预警删除成功"), r()) : o.key === "changeWarningLine" && (P.value = !0, Y.value = _.value.warnPrice);
1158
- }, s = async () => {
1159
- const { variety: o, varietyName: t, featureId: u, featureType: d } = c;
1160
- await Te({
1161
- id: _.value.id,
1162
- featureCode: o,
1218
+ n.key === "deleteWarningLine" ? (await rt({ id: v.value.id }), ge.success("画线预警删除成功"), r()) : n.key === "changeWarningLine" && (N.value = !0, C.value = v.value.warnPrice);
1219
+ }, o = async () => {
1220
+ const { variety: n, varietyName: t, featureId: d, featureType: l } = a;
1221
+ await Oe({
1222
+ id: v.value.id,
1223
+ featureCode: n,
1163
1224
  //品种代码
1164
1225
  featureName: t,
1165
1226
  //品种名称
1166
- featureId: u,
1227
+ featureId: d,
1167
1228
  //品种id
1168
- featureType: d,
1229
+ featureType: l,
1169
1230
  //品种类型
1170
- warnPrice: Y.value
1171
- }), pe.success("画线预警修改成功"), r();
1172
- }, i = () => {
1173
- ne.value = [...M];
1231
+ warnPrice: C.value
1232
+ }), ge.success("画线预警修改成功"), r();
1233
+ }, f = () => {
1234
+ ae.value = [...S];
1174
1235
  };
1175
- return F({
1176
- draw: (o, t) => {
1177
- o === "warningLine" && (U.value = t, l());
1236
+ return B({
1237
+ draw: (n, t) => {
1238
+ n === "warningLine" && (Z.value = t, c());
1178
1239
  }
1179
- }), (o, t) => {
1180
- var D;
1181
- const u = We, d = Be, p = Ee, y = Ae, v = Ve, V = Oe;
1182
- return H(), z(me, null, [
1183
- ee("div", gt, [
1184
- ee("div", ht, [
1185
- q(ut, {
1186
- data: O.value,
1187
- activeIndex: j.value
1240
+ }), (n, t) => {
1241
+ var R;
1242
+ const d = Be, l = Ie, m = Ee, D = Ve, T = Ae, E = Re;
1243
+ return j(), U(he, null, [
1244
+ ne("div", vt, [
1245
+ ne("div", bt, [
1246
+ z(ct, {
1247
+ data: V.value,
1248
+ activeIndex: q.value
1188
1249
  }, null, 8, ["data", "activeIndex"])
1189
1250
  ]),
1190
- ee("div", {
1251
+ ne("div", {
1191
1252
  class: "klineBasic-main",
1192
- style: xe({ height: Z.value.showSubChart ? "70%" : "100%" })
1253
+ style: we({ height: K.value.showSubChart ? "70%" : "100%" })
1193
1254
  }, [
1194
- q(vt, { onCloseContextMenuCallBack: i }, {
1195
- popover: Q(() => [
1196
- q(d, { style: {
1255
+ z(yt, { onCloseContextMenuCallBack: f }, {
1256
+ popover: te(() => [
1257
+ z(l, { style: {
1197
1258
  borderRadius: "4px",
1198
1259
  overflow: "hidden",
1199
1260
  background: "#fff",
1200
1261
  borderRight: 0
1201
1262
  } }, {
1202
- default: Q(() => [
1203
- (H(!0), z(me, null, _e(ne.value, (k) => (H(), Le(u, {
1263
+ default: te(() => [
1264
+ (j(!0), U(he, null, _e(ae.value, (_) => (j(), Te(d, {
1204
1265
  style: { height: "36px" },
1205
- key: k.key,
1206
- index: k.key,
1207
- onClick: (B) => n(k)
1266
+ key: _.key,
1267
+ index: _.key,
1268
+ onClick: (L) => u(_)
1208
1269
  }, {
1209
- default: Q(() => [
1210
- fe(ve(k.label), 1)
1270
+ default: te(() => [
1271
+ me(ve(_.label), 1)
1211
1272
  ]),
1212
1273
  _: 2
1213
1274
  }, 1032, ["index", "onClick"]))), 128))
@@ -1215,78 +1276,78 @@ const Fe = (a) => (Pe("data-v-2134db21"), a = a(), Ye(), a), gt = { class: "klin
1215
1276
  _: 1
1216
1277
  })
1217
1278
  ]),
1218
- default: Q(() => [
1219
- ee("div", {
1279
+ default: te(() => [
1280
+ ne("div", {
1220
1281
  ref_key: "klineBasicMainRef",
1221
- ref: b,
1282
+ ref: x,
1222
1283
  style: { height: "100%" }
1223
1284
  }, null, 512)
1224
1285
  ]),
1225
1286
  _: 1
1226
1287
  })
1227
1288
  ], 4),
1228
- Z.value.showSubChart ? (H(), z("div", _t, [
1229
- q(mt, {
1289
+ K.value.showSubChart ? (j(), U("div", xt, [
1290
+ z(gt, {
1230
1291
  ref_key: "klineSubRef",
1231
- ref: E,
1232
- modelValue: T.value,
1233
- "onUpdate:modelValue": t[0] || (t[0] = (k) => T.value = k),
1234
- data: O.value,
1235
- activeIndex: j.value,
1236
- subIndicatorList: (D = a.indicatorStore) == null ? void 0 : D.subIndicatorList
1292
+ ref: W,
1293
+ modelValue: F.value,
1294
+ "onUpdate:modelValue": t[0] || (t[0] = (_) => F.value = _),
1295
+ data: V.value,
1296
+ activeIndex: q.value,
1297
+ subIndicatorList: (R = s.indicatorStore) == null ? void 0 : R.subIndicatorList
1237
1298
  }, null, 8, ["modelValue", "data", "activeIndex", "subIndicatorList"])
1238
- ])) : ae("", !0),
1239
- m.value ? (H(), z("div", xt, [
1240
- q(p, {
1299
+ ])) : le("", !0),
1300
+ g.value ? (j(), U("div", _t, [
1301
+ z(m, {
1241
1302
  class: "klineBasic-empty-content",
1242
1303
  description: "暂无数据"
1243
1304
  })
1244
- ])) : ae("", !0),
1245
- h.value ? (H(), z("div", bt, [
1246
- $t,
1247
- ee("div", wt, [
1248
- q(y, { onClick: x }, {
1249
- default: Q(() => [
1250
- fe("刷新")
1305
+ ])) : le("", !0),
1306
+ y.value ? (j(), U("div", wt, [
1307
+ Dt,
1308
+ ne("div", Yt, [
1309
+ z(D, { onClick: b }, {
1310
+ default: te(() => [
1311
+ me("刷新")
1251
1312
  ]),
1252
1313
  _: 1
1253
1314
  })
1254
1315
  ])
1255
- ])) : ae("", !0)
1316
+ ])) : le("", !0)
1256
1317
  ]),
1257
- q(V, {
1258
- modelValue: P.value,
1259
- "onUpdate:modelValue": t[3] || (t[3] = (k) => P.value = k),
1318
+ z(E, {
1319
+ modelValue: N.value,
1320
+ "onUpdate:modelValue": t[3] || (t[3] = (_) => N.value = _),
1260
1321
  title: "画线预警-修改价格",
1261
1322
  width: "30%",
1262
1323
  "align-center": ""
1263
1324
  }, {
1264
- footer: Q(() => [
1265
- ee("span", kt, [
1266
- q(y, {
1267
- onClick: t[2] || (t[2] = (k) => P.value = !1)
1325
+ footer: te(() => [
1326
+ ne("span", $t, [
1327
+ z(D, {
1328
+ onClick: t[2] || (t[2] = (_) => N.value = !1)
1268
1329
  }, {
1269
- default: Q(() => [
1270
- fe("取消")
1330
+ default: te(() => [
1331
+ me("取消")
1271
1332
  ]),
1272
1333
  _: 1
1273
1334
  }),
1274
- q(y, {
1335
+ z(D, {
1275
1336
  type: "primary",
1276
- onClick: s
1337
+ onClick: o
1277
1338
  }, {
1278
- default: Q(() => [
1279
- fe("确定")
1339
+ default: te(() => [
1340
+ me("确定")
1280
1341
  ]),
1281
1342
  _: 1
1282
1343
  })
1283
1344
  ])
1284
1345
  ]),
1285
- default: Q(() => [
1286
- St,
1287
- q(v, {
1288
- modelValue: Y.value,
1289
- "onUpdate:modelValue": t[1] || (t[1] = (k) => Y.value = k),
1346
+ default: te(() => [
1347
+ Mt,
1348
+ z(T, {
1349
+ modelValue: C.value,
1350
+ "onUpdate:modelValue": t[1] || (t[1] = (_) => C.value = _),
1290
1351
  placeholder: "输入预警价格"
1291
1352
  }, null, 8, ["modelValue"])
1292
1353
  ]),
@@ -1295,11 +1356,11 @@ const Fe = (a) => (Pe("data-v-2134db21"), a = a(), Ye(), a), gt = { class: "klin
1295
1356
  ], 64);
1296
1357
  };
1297
1358
  }
1298
- }, Lt = /* @__PURE__ */ ce(Mt, [["__scopeId", "data-v-2134db21"]]), on = {
1299
- install(a) {
1300
- a.component("st-klineBasic", Lt);
1359
+ }, kt = /* @__PURE__ */ fe(St, [["__scopeId", "data-v-bce59e7d"]]), an = {
1360
+ install(s) {
1361
+ s.component("st-klineBasic", kt);
1301
1362
  }
1302
1363
  };
1303
1364
  export {
1304
- on as default
1365
+ an as default
1305
1366
  };