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