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.cjs +1 -1
- package/es/KlineBasic.js +720 -659
- 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-a4c847b6.js} +19665 -19604
- package/lib/{python-cb6db8ac.js → python-c7133f50.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/index.vue +281 -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 Re } from "./el-overlay-6056c89a.js";
|
|
3
3
|
import "./el-input-ee7db655.js";
|
|
4
|
-
import { E as
|
|
5
|
-
import { E as
|
|
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
|
|
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
|
|
11
|
-
import * as
|
|
12
|
-
import { y as
|
|
13
|
-
import { E as
|
|
14
|
-
import { _ as
|
|
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
|
|
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
|
-
}, oe = function
|
|
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, 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
|
|
76
|
-
|
|
75
|
+
var t = i.name;
|
|
76
|
+
C[t] = i, o = t;
|
|
77
77
|
}
|
|
78
|
-
return !
|
|
79
|
-
},
|
|
80
|
-
if (
|
|
81
|
-
return
|
|
82
|
-
var
|
|
83
|
-
return
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
return
|
|
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
|
|
89
|
-
function
|
|
90
|
-
this.$L = oe(
|
|
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
|
|
93
|
-
return
|
|
94
|
-
this.$d = function(
|
|
95
|
-
var
|
|
96
|
-
if (
|
|
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 (
|
|
98
|
+
if (b.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(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(
|
|
110
|
-
}(
|
|
111
|
-
},
|
|
112
|
-
var
|
|
113
|
-
this.$y =
|
|
114
|
-
},
|
|
115
|
-
return
|
|
116
|
-
},
|
|
117
|
-
return this.$d.toString() !==
|
|
118
|
-
},
|
|
119
|
-
var
|
|
120
|
-
return this.startOf(
|
|
121
|
-
},
|
|
122
|
-
return
|
|
123
|
-
},
|
|
124
|
-
return this.endOf(
|
|
125
|
-
},
|
|
126
|
-
return
|
|
127
|
-
},
|
|
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
|
-
},
|
|
129
|
+
}, i.valueOf = function() {
|
|
130
130
|
return this.$d.getTime();
|
|
131
|
-
},
|
|
132
|
-
var
|
|
133
|
-
var
|
|
134
|
-
return
|
|
135
|
-
}, d = function(
|
|
136
|
-
return
|
|
137
|
-
},
|
|
138
|
-
switch (
|
|
139
|
-
case
|
|
140
|
-
return
|
|
141
|
-
case
|
|
142
|
-
return
|
|
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
|
-
|
|
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
|
-
},
|
|
159
|
-
return this.startOf(
|
|
160
|
-
},
|
|
161
|
-
var
|
|
162
|
-
if (
|
|
163
|
-
var
|
|
164
|
-
|
|
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
|
-
|
|
166
|
+
t && this.$d[t](d);
|
|
167
167
|
return this.init(), this;
|
|
168
|
-
},
|
|
169
|
-
return this.clone().$set(
|
|
170
|
-
},
|
|
171
|
-
return this[
|
|
172
|
-
},
|
|
173
|
-
var
|
|
174
|
-
|
|
175
|
-
var
|
|
176
|
-
var
|
|
177
|
-
return
|
|
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 (
|
|
180
|
-
return this.set(
|
|
181
|
-
if (
|
|
182
|
-
return this.set(
|
|
183
|
-
if (
|
|
184
|
-
return
|
|
185
|
-
if (
|
|
186
|
-
return
|
|
187
|
-
var d = (
|
|
188
|
-
return
|
|
189
|
-
},
|
|
190
|
-
return this.add(-1 *
|
|
191
|
-
},
|
|
192
|
-
var
|
|
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
|
|
195
|
-
var
|
|
196
|
-
return
|
|
197
|
-
},
|
|
198
|
-
return
|
|
199
|
-
},
|
|
200
|
-
var
|
|
201
|
-
return
|
|
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
|
|
204
|
-
return
|
|
205
|
-
switch (
|
|
203
|
+
return f.replace(q, function(L, X) {
|
|
204
|
+
return X || function(J) {
|
|
205
|
+
switch (J) {
|
|
206
206
|
case "YY":
|
|
207
|
-
return String(
|
|
207
|
+
return String(u.$y).slice(-2);
|
|
208
208
|
case "YYYY":
|
|
209
|
-
return
|
|
209
|
+
return b.s(u.$y, 4, "0");
|
|
210
210
|
case "M":
|
|
211
|
-
return
|
|
211
|
+
return l + 1;
|
|
212
212
|
case "MM":
|
|
213
|
-
return
|
|
213
|
+
return b.s(l + 1, 2, "0");
|
|
214
214
|
case "MMM":
|
|
215
|
-
return
|
|
215
|
+
return E(o.monthsShort, l, D, 3);
|
|
216
216
|
case "MMMM":
|
|
217
|
-
return D
|
|
217
|
+
return E(D, l);
|
|
218
218
|
case "D":
|
|
219
|
-
return
|
|
219
|
+
return u.$D;
|
|
220
220
|
case "DD":
|
|
221
|
-
return
|
|
221
|
+
return b.s(u.$D, 2, "0");
|
|
222
222
|
case "d":
|
|
223
|
-
return String(
|
|
223
|
+
return String(u.$W);
|
|
224
224
|
case "dd":
|
|
225
|
-
return
|
|
225
|
+
return E(o.weekdaysMin, u.$W, m, 2);
|
|
226
226
|
case "ddd":
|
|
227
|
-
return
|
|
227
|
+
return E(o.weekdaysShort, u.$W, m, 3);
|
|
228
228
|
case "dddd":
|
|
229
|
-
return
|
|
229
|
+
return m[u.$W];
|
|
230
230
|
case "H":
|
|
231
|
-
return String(
|
|
231
|
+
return String(t);
|
|
232
232
|
case "HH":
|
|
233
|
-
return
|
|
233
|
+
return b.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 _(t, d, !0);
|
|
240
240
|
case "A":
|
|
241
|
-
return
|
|
241
|
+
return _(t, d, !1);
|
|
242
242
|
case "m":
|
|
243
243
|
return String(d);
|
|
244
244
|
case "mm":
|
|
245
|
-
return
|
|
245
|
+
return b.s(d, 2, "0");
|
|
246
246
|
case "s":
|
|
247
|
-
return String(
|
|
247
|
+
return String(u.$s);
|
|
248
248
|
case "ss":
|
|
249
|
-
return
|
|
249
|
+
return b.s(u.$s, 2, "0");
|
|
250
250
|
case "SSS":
|
|
251
|
-
return
|
|
251
|
+
return b.s(u.$ms, 3, "0");
|
|
252
252
|
case "Z":
|
|
253
|
-
return
|
|
253
|
+
return n;
|
|
254
254
|
}
|
|
255
255
|
return null;
|
|
256
|
-
}(
|
|
256
|
+
}(L) || n.replace(":", "");
|
|
257
257
|
});
|
|
258
|
-
},
|
|
258
|
+
}, i.utcOffset = function() {
|
|
259
259
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
260
|
-
},
|
|
261
|
-
var
|
|
262
|
-
return
|
|
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 (
|
|
265
|
-
case
|
|
266
|
-
|
|
264
|
+
switch (t) {
|
|
265
|
+
case y:
|
|
266
|
+
f = D() / 12;
|
|
267
267
|
break;
|
|
268
|
-
case
|
|
269
|
-
|
|
268
|
+
case a:
|
|
269
|
+
f = D();
|
|
270
270
|
break;
|
|
271
|
-
case
|
|
272
|
-
|
|
271
|
+
case g:
|
|
272
|
+
f = D() / 3;
|
|
273
273
|
break;
|
|
274
|
-
case
|
|
275
|
-
|
|
274
|
+
case w:
|
|
275
|
+
f = (m - l) / 6048e5;
|
|
276
276
|
break;
|
|
277
|
-
case
|
|
278
|
-
|
|
277
|
+
case h:
|
|
278
|
+
f = (m - l) / 864e5;
|
|
279
279
|
break;
|
|
280
|
-
case
|
|
281
|
-
|
|
280
|
+
case p:
|
|
281
|
+
f = m / k;
|
|
282
282
|
break;
|
|
283
|
-
case
|
|
284
|
-
|
|
283
|
+
case M:
|
|
284
|
+
f = m / S;
|
|
285
285
|
break;
|
|
286
|
-
case
|
|
287
|
-
|
|
286
|
+
case Y:
|
|
287
|
+
f = m / I;
|
|
288
288
|
break;
|
|
289
289
|
default:
|
|
290
|
-
|
|
290
|
+
f = m;
|
|
291
291
|
}
|
|
292
|
-
return
|
|
293
|
-
},
|
|
294
|
-
return this.endOf(
|
|
295
|
-
},
|
|
296
|
-
return
|
|
297
|
-
},
|
|
298
|
-
if (!
|
|
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
|
|
301
|
-
return
|
|
302
|
-
},
|
|
303
|
-
return
|
|
304
|
-
},
|
|
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
|
-
},
|
|
306
|
+
}, i.toJSON = function() {
|
|
307
307
|
return this.isValid() ? this.toISOString() : null;
|
|
308
|
-
},
|
|
308
|
+
}, i.toISOString = function() {
|
|
309
309
|
return this.$d.toISOString();
|
|
310
|
-
},
|
|
310
|
+
}, i.toString = function() {
|
|
311
311
|
return this.$d.toUTCString();
|
|
312
|
-
},
|
|
313
|
-
}(),
|
|
314
|
-
return
|
|
315
|
-
|
|
316
|
-
return this.$g(
|
|
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
|
-
}),
|
|
319
|
-
return
|
|
320
|
-
},
|
|
321
|
-
return
|
|
322
|
-
},
|
|
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
|
-
})(
|
|
325
|
-
var
|
|
326
|
-
const
|
|
327
|
-
let
|
|
328
|
-
const
|
|
329
|
-
const
|
|
330
|
-
handleReq: (
|
|
331
|
-
|
|
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: (
|
|
334
|
-
const { data:
|
|
335
|
-
if (
|
|
336
|
-
return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` :
|
|
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
|
-
|
|
340
|
-
},
|
|
341
|
-
const { data:
|
|
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: `${
|
|
346
|
-
right: `${
|
|
347
|
-
bottom:
|
|
348
|
-
left: `${
|
|
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:
|
|
354
|
-
endValue:
|
|
355
|
-
maxValueSpan:
|
|
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: (
|
|
367
|
-
const { axisDimension:
|
|
368
|
-
return
|
|
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: (
|
|
395
|
-
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:
|
|
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
|
-
...
|
|
410
|
-
name:
|
|
409
|
+
...s.mainIndicator.map((a) => ({
|
|
410
|
+
name: a.key,
|
|
411
411
|
type: "line",
|
|
412
412
|
silent: !0,
|
|
413
413
|
symbol: "none",
|
|
414
|
-
data:
|
|
414
|
+
data: a.data,
|
|
415
415
|
lineStyle: {
|
|
416
|
-
width:
|
|
416
|
+
width: a.width || 1
|
|
417
417
|
},
|
|
418
418
|
itemStyle: {
|
|
419
|
-
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
|
-
},
|
|
425
|
-
const { variety: e, featureId:
|
|
426
|
-
return
|
|
427
|
-
const { warnPrice:
|
|
428
|
-
if (
|
|
429
|
-
return
|
|
430
|
-
let
|
|
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
|
-
...
|
|
447
|
+
...a,
|
|
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: x,
|
|
446
461
|
// 开始Y坐标
|
|
447
|
-
x2: (
|
|
462
|
+
x2: (s == null ? void 0 : s.getWidth()) - w,
|
|
448
463
|
// 结束X坐标
|
|
449
|
-
y2:
|
|
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:
|
|
462
|
-
x: (
|
|
463
|
-
y:
|
|
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:
|
|
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: (
|
|
476
|
-
|
|
490
|
+
ondragstart: (F) => {
|
|
491
|
+
W = F.offsetY;
|
|
477
492
|
},
|
|
478
|
-
ondrag: (
|
|
479
|
-
var
|
|
480
|
-
if (
|
|
481
|
-
const
|
|
482
|
-
(
|
|
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 (
|
|
487
|
-
const
|
|
488
|
-
if (
|
|
489
|
-
const
|
|
490
|
-
id:
|
|
491
|
-
warnPrice:
|
|
492
|
-
featureId:
|
|
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:
|
|
511
|
+
featureType: M
|
|
497
512
|
//品种类型
|
|
498
513
|
};
|
|
499
|
-
await
|
|
514
|
+
await Oe(v), ge.success("画线预警修改成功"), k && k();
|
|
500
515
|
}
|
|
501
516
|
}
|
|
502
517
|
}
|
|
503
518
|
];
|
|
504
519
|
}, []);
|
|
505
|
-
}, it = { class: "kline-tips" },
|
|
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(
|
|
515
|
-
return (
|
|
516
|
-
(
|
|
517
|
-
key:
|
|
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:
|
|
520
|
-
}, ve(
|
|
534
|
+
style: we({ color: S.color })
|
|
535
|
+
}, ve(S.label) + " " + ve(S.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:
|
|
541
|
-
if (
|
|
542
|
-
const
|
|
543
|
-
{ label: "开", value:
|
|
544
|
-
{ label: "高", value:
|
|
545
|
-
{ label: "低", value:
|
|
546
|
-
{ label: "收", value:
|
|
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
|
-
|
|
549
|
-
let
|
|
550
|
-
return
|
|
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 =
|
|
554
|
-
var
|
|
555
|
-
const { data:
|
|
556
|
-
return ((
|
|
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 (
|
|
559
|
-
|
|
560
|
-
|
|
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
|
-
},
|
|
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:
|
|
580
|
-
let
|
|
581
|
-
const
|
|
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
|
|
598
|
+
return M.modelValue;
|
|
584
599
|
},
|
|
585
|
-
set(
|
|
586
|
-
|
|
600
|
+
set(g) {
|
|
601
|
+
Y("update:modelValue", g);
|
|
587
602
|
}
|
|
588
|
-
}),
|
|
589
|
-
var
|
|
590
|
-
const { data:
|
|
591
|
-
return ((
|
|
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
|
-
|
|
594
|
-
|
|
595
|
-
let
|
|
608
|
+
$e(() => {
|
|
609
|
+
k = be.init(p.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
|
-
|
|
602
|
-
}), e.observe(
|
|
603
|
-
}),
|
|
604
|
-
|
|
616
|
+
k.resize();
|
|
617
|
+
}), e.observe(p.value);
|
|
618
|
+
}), Se(() => {
|
|
619
|
+
k.dispose(), e.disconnect(), e = null;
|
|
605
620
|
});
|
|
606
|
-
const
|
|
607
|
-
const
|
|
608
|
-
return
|
|
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
|
-
} :
|
|
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
|
|
621
|
-
connect: (
|
|
622
|
-
|
|
635
|
+
return B({
|
|
636
|
+
connect: (g) => {
|
|
637
|
+
be.connect([g, k]);
|
|
623
638
|
},
|
|
624
639
|
// 联动
|
|
625
|
-
draw: (
|
|
626
|
-
|
|
627
|
-
const { startValue:
|
|
628
|
-
if (
|
|
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:
|
|
637
|
-
value:
|
|
638
|
-
itemStyle:
|
|
639
|
-
} :
|
|
640
|
-
value:
|
|
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:
|
|
657
|
+
color: N >= 0 ? "#FF0000" : "#00FFFF"
|
|
643
658
|
}
|
|
644
659
|
} : {
|
|
645
|
-
value:
|
|
660
|
+
value: N,
|
|
646
661
|
itemStyle: {
|
|
647
|
-
color:
|
|
662
|
+
color: v.seriesColor
|
|
648
663
|
}
|
|
649
664
|
})
|
|
650
665
|
};
|
|
651
|
-
if (
|
|
666
|
+
if (v.series === "line")
|
|
652
667
|
return {
|
|
653
668
|
xAxisIndex: 0,
|
|
654
|
-
yAxisIndex:
|
|
655
|
-
name:
|
|
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:
|
|
674
|
+
data: v.data,
|
|
660
675
|
lineStyle: {
|
|
661
676
|
width: 1
|
|
662
677
|
},
|
|
663
678
|
itemStyle: {
|
|
664
|
-
color:
|
|
679
|
+
color: v.color
|
|
665
680
|
}
|
|
666
681
|
};
|
|
667
682
|
});
|
|
668
|
-
|
|
683
|
+
k.setOption(
|
|
669
684
|
{
|
|
670
685
|
animation: !1,
|
|
671
686
|
grid: {
|
|
672
|
-
left: `${
|
|
687
|
+
left: `${y.gridLeft}px`,
|
|
673
688
|
top: "10px",
|
|
674
|
-
right: `${
|
|
689
|
+
right: `${y.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: 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:
|
|
695
|
-
if (
|
|
696
|
-
return
|
|
697
|
-
if (
|
|
698
|
-
return String(
|
|
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:
|
|
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:
|
|
725
|
-
max:
|
|
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:
|
|
741
|
-
max:
|
|
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:
|
|
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, 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:
|
|
774
|
-
(
|
|
775
|
-
key:
|
|
776
|
-
label:
|
|
777
|
-
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
|
-
])) :
|
|
783
|
-
|
|
797
|
+
])) : le("", !0),
|
|
798
|
+
z(xe, { data: w.value }, null, 8, ["data"])
|
|
784
799
|
]),
|
|
785
|
-
|
|
800
|
+
ne("div", {
|
|
786
801
|
class: "klineSub-chart",
|
|
787
802
|
ref_key: "subChartRef",
|
|
788
|
-
ref:
|
|
803
|
+
ref: p
|
|
789
804
|
}, null, 512)
|
|
790
805
|
]);
|
|
791
806
|
};
|
|
792
807
|
}
|
|
793
|
-
},
|
|
808
|
+
}, gt = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-c06321cd"]]), ht = /* @__PURE__ */ Me({
|
|
794
809
|
__name: "index",
|
|
795
810
|
emits: ["closeContextMenuCallBack"],
|
|
796
|
-
setup(
|
|
797
|
-
const
|
|
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
|
-
}),
|
|
802
|
-
e.value.display = "none",
|
|
803
|
-
},
|
|
804
|
-
if (
|
|
805
|
-
const { offsetX:
|
|
806
|
-
if (
|
|
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
|
-
|
|
824
|
+
S.value.click(), e.value = {
|
|
810
825
|
display: "block",
|
|
811
|
-
top: `${
|
|
812
|
-
left: `${
|
|
813
|
-
},
|
|
814
|
-
const
|
|
815
|
-
|
|
816
|
-
}), document.addEventListener("click",
|
|
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 (
|
|
833
|
+
return (p, h) => (j(), U("div", {
|
|
819
834
|
ref_key: "contextmenuRef",
|
|
820
|
-
ref:
|
|
835
|
+
ref: S,
|
|
821
836
|
class: "contextmenu",
|
|
822
|
-
onContextmenu:
|
|
823
|
-
onMouseleave:
|
|
837
|
+
onContextmenu: M,
|
|
838
|
+
onMouseleave: Y
|
|
824
839
|
}, [
|
|
825
|
-
|
|
826
|
-
e.value.display !== "none" ? (
|
|
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:
|
|
844
|
+
ref: k,
|
|
830
845
|
class: "contextmenu-popover",
|
|
831
|
-
style:
|
|
846
|
+
style: we(e.value)
|
|
832
847
|
}, [
|
|
833
|
-
|
|
834
|
-
], 4)) :
|
|
848
|
+
Ye(p.$slots, "popover", {}, void 0, !0)
|
|
849
|
+
], 4)) : le("", !0)
|
|
835
850
|
], 544));
|
|
836
851
|
}
|
|
837
852
|
});
|
|
838
|
-
const
|
|
839
|
-
const Fe = (
|
|
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
|
-
},
|
|
857
|
+
}, _t = {
|
|
843
858
|
key: 1,
|
|
844
859
|
class: "klineBasic-empty"
|
|
845
|
-
},
|
|
860
|
+
}, wt = {
|
|
846
861
|
key: 2,
|
|
847
862
|
class: "klineBasic-error"
|
|
848
|
-
},
|
|
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(
|
|
912
|
-
const
|
|
913
|
-
let
|
|
914
|
-
const
|
|
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
|
-
...
|
|
955
|
+
...a.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 [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
|
-
|
|
963
|
+
b();
|
|
951
964
|
},
|
|
952
965
|
{ deep: !0 }
|
|
953
|
-
),
|
|
954
|
-
|
|
955
|
-
}),
|
|
956
|
-
e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.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 =
|
|
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
|
-
},
|
|
977
|
+
}, P = () => {
|
|
965
978
|
e == null || e.on("datazoom", (t) => {
|
|
966
|
-
clearTimeout(
|
|
967
|
-
var
|
|
968
|
-
const { loadCheckCounts:
|
|
969
|
-
if ((
|
|
970
|
-
const { startValue:
|
|
971
|
-
|
|
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(
|
|
986
|
+
clearTimeout(M);
|
|
974
987
|
}, 100);
|
|
975
988
|
}), e == null || e.on("highlight", (t) => {
|
|
976
|
-
var
|
|
977
|
-
let
|
|
978
|
-
t.batch && (
|
|
979
|
-
|
|
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
|
|
983
|
-
const t = (
|
|
984
|
-
|
|
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
|
|
999
|
+
let n = null;
|
|
987
1000
|
e == null || e.on("contextmenu", (t) => {
|
|
988
|
-
|
|
989
|
-
t.componentType === "graphic" && (
|
|
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(
|
|
1005
|
+
]), clearTimeout(n), n = null;
|
|
993
1006
|
});
|
|
994
1007
|
});
|
|
995
|
-
},
|
|
996
|
-
var
|
|
1008
|
+
}, b = async () => {
|
|
1009
|
+
var n, t, d, l, m, D;
|
|
997
1010
|
try {
|
|
998
|
-
if (!
|
|
1011
|
+
if (!a.variety || !a.cycle)
|
|
999
1012
|
return;
|
|
1000
|
-
const {
|
|
1001
|
-
variety:
|
|
1002
|
-
featureId:
|
|
1003
|
-
cycle:
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
right:
|
|
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:
|
|
1021
|
+
getFactorData: pe
|
|
1018
1022
|
};
|
|
1019
|
-
|
|
1020
|
-
const
|
|
1021
|
-
if ((
|
|
1022
|
-
|
|
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
|
-
|
|
1028
|
+
g.value = !0, y.value = !1;
|
|
1025
1029
|
return;
|
|
1026
1030
|
}
|
|
1027
|
-
|
|
1028
|
-
} catch (
|
|
1029
|
-
throw
|
|
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
|
-
},
|
|
1032
|
-
const { variety: t, cycle:
|
|
1033
|
-
if (
|
|
1034
|
-
const
|
|
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:
|
|
1037
|
-
endTime:
|
|
1038
|
-
limit:
|
|
1039
|
-
mainIndicatorList:
|
|
1040
|
-
subIndicator:
|
|
1041
|
-
right:
|
|
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
|
-
|
|
1044
|
-
time: [...
|
|
1045
|
-
data: [...
|
|
1046
|
-
mainIndicator:
|
|
1047
|
-
...
|
|
1048
|
-
data: [...
|
|
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:
|
|
1051
|
-
...
|
|
1052
|
-
data: [...
|
|
1054
|
+
subIndicator: V.value.subIndicator.map((_, L) => ({
|
|
1055
|
+
..._,
|
|
1056
|
+
data: [...R.body.subIndicator[L].data, ..._.data.slice(1)]
|
|
1053
1057
|
}))
|
|
1054
|
-
},
|
|
1058
|
+
}, se(!0), R.body.data.length < T && (h = !0), p = !1;
|
|
1055
1059
|
}
|
|
1056
|
-
},
|
|
1057
|
-
var
|
|
1060
|
+
}, se = (n = !1) => {
|
|
1061
|
+
var L, X, J;
|
|
1058
1062
|
oe();
|
|
1059
|
-
const { time: t } =
|
|
1060
|
-
let
|
|
1061
|
-
if (
|
|
1062
|
-
const
|
|
1063
|
-
|
|
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
|
|
1066
|
-
e.setOption(
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
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
|
|
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
|
+
...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
|
|
1087
|
-
|
|
1088
|
-
},
|
|
1089
|
-
const { variety: t, varietyName:
|
|
1090
|
-
if (
|
|
1091
|
-
const
|
|
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
|
-
...
|
|
1154
|
+
...D,
|
|
1094
1155
|
// 指示器样式
|
|
1095
1156
|
tooltip: {
|
|
1096
|
-
...
|
|
1157
|
+
...T,
|
|
1097
1158
|
// 坐标轴指示器
|
|
1098
1159
|
axisPointer: {
|
|
1099
1160
|
// 保留原有部分配置
|
|
1100
|
-
...
|
|
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
|
-
...
|
|
1173
|
+
...T.axisPointer.label,
|
|
1113
1174
|
// 颜色改为透明
|
|
1114
1175
|
backgroundColor: "transparent",
|
|
1115
1176
|
// 仅显示Y轴值
|
|
1116
|
-
formatter: (
|
|
1177
|
+
formatter: (R) => ""
|
|
1117
1178
|
}
|
|
1118
1179
|
}
|
|
1119
1180
|
}
|
|
1120
1181
|
});
|
|
1121
|
-
const
|
|
1122
|
-
e == null || e.getZr().off("mousedown",
|
|
1123
|
-
const
|
|
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
|
-
...
|
|
1186
|
+
...D,
|
|
1126
1187
|
// 指示器样式
|
|
1127
1188
|
tooltip: {
|
|
1128
|
-
...
|
|
1189
|
+
...T,
|
|
1129
1190
|
axisPointer: {
|
|
1130
|
-
...
|
|
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
|
-
...
|
|
1199
|
+
...T.axisPointer.label,
|
|
1139
1200
|
backgroundColor: null
|
|
1140
1201
|
}
|
|
1141
1202
|
}
|
|
1142
1203
|
}
|
|
1143
|
-
}), await
|
|
1204
|
+
}), await tt({
|
|
1144
1205
|
featureCode: t,
|
|
1145
1206
|
//品种代码
|
|
1146
|
-
featureName:
|
|
1207
|
+
featureName: d,
|
|
1147
1208
|
//品种名称
|
|
1148
|
-
featureId:
|
|
1209
|
+
featureId: l,
|
|
1149
1210
|
//品种id
|
|
1150
|
-
featureType:
|
|
1211
|
+
featureType: m,
|
|
1151
1212
|
//品种类型
|
|
1152
|
-
warnPrice:
|
|
1153
|
-
}),
|
|
1213
|
+
warnPrice: L
|
|
1214
|
+
}), ge.success("画线预警成功!"), r();
|
|
1154
1215
|
};
|
|
1155
|
-
e == null || e.getZr().on("mousedown",
|
|
1216
|
+
e == null || e.getZr().on("mousedown", E);
|
|
1156
1217
|
} else
|
|
1157
|
-
|
|
1158
|
-
},
|
|
1159
|
-
const { variety:
|
|
1160
|
-
await
|
|
1161
|
-
id:
|
|
1162
|
-
featureCode:
|
|
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:
|
|
1227
|
+
featureId: d,
|
|
1167
1228
|
//品种id
|
|
1168
|
-
featureType:
|
|
1229
|
+
featureType: l,
|
|
1169
1230
|
//品种类型
|
|
1170
|
-
warnPrice:
|
|
1171
|
-
}),
|
|
1172
|
-
},
|
|
1173
|
-
|
|
1231
|
+
warnPrice: C.value
|
|
1232
|
+
}), ge.success("画线预警修改成功"), r();
|
|
1233
|
+
}, f = () => {
|
|
1234
|
+
ae.value = [...S];
|
|
1174
1235
|
};
|
|
1175
|
-
return
|
|
1176
|
-
draw: (
|
|
1177
|
-
|
|
1236
|
+
return B({
|
|
1237
|
+
draw: (n, t) => {
|
|
1238
|
+
n === "warningLine" && (Z.value = t, c());
|
|
1178
1239
|
}
|
|
1179
|
-
}), (
|
|
1180
|
-
var
|
|
1181
|
-
const
|
|
1182
|
-
return
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
data:
|
|
1187
|
-
activeIndex:
|
|
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
|
-
|
|
1251
|
+
ne("div", {
|
|
1191
1252
|
class: "klineBasic-main",
|
|
1192
|
-
style:
|
|
1253
|
+
style: we({ height: K.value.showSubChart ? "70%" : "100%" })
|
|
1193
1254
|
}, [
|
|
1194
|
-
|
|
1195
|
-
popover:
|
|
1196
|
-
|
|
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:
|
|
1203
|
-
(
|
|
1263
|
+
default: te(() => [
|
|
1264
|
+
(j(!0), U(he, null, _e(ae.value, (_) => (j(), Te(d, {
|
|
1204
1265
|
style: { height: "36px" },
|
|
1205
|
-
key:
|
|
1206
|
-
index:
|
|
1207
|
-
onClick: (
|
|
1266
|
+
key: _.key,
|
|
1267
|
+
index: _.key,
|
|
1268
|
+
onClick: (L) => u(_)
|
|
1208
1269
|
}, {
|
|
1209
|
-
default:
|
|
1210
|
-
|
|
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:
|
|
1219
|
-
|
|
1279
|
+
default: te(() => [
|
|
1280
|
+
ne("div", {
|
|
1220
1281
|
ref_key: "klineBasicMainRef",
|
|
1221
|
-
ref:
|
|
1282
|
+
ref: x,
|
|
1222
1283
|
style: { height: "100%" }
|
|
1223
1284
|
}, null, 512)
|
|
1224
1285
|
]),
|
|
1225
1286
|
_: 1
|
|
1226
1287
|
})
|
|
1227
1288
|
], 4),
|
|
1228
|
-
|
|
1229
|
-
|
|
1289
|
+
K.value.showSubChart ? (j(), U("div", xt, [
|
|
1290
|
+
z(gt, {
|
|
1230
1291
|
ref_key: "klineSubRef",
|
|
1231
|
-
ref:
|
|
1232
|
-
modelValue:
|
|
1233
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1234
|
-
data:
|
|
1235
|
-
activeIndex:
|
|
1236
|
-
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
|
-
])) :
|
|
1239
|
-
|
|
1240
|
-
|
|
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
|
-
])) :
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
default:
|
|
1250
|
-
|
|
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
|
-
])) :
|
|
1316
|
+
])) : le("", !0)
|
|
1256
1317
|
]),
|
|
1257
|
-
|
|
1258
|
-
modelValue:
|
|
1259
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
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:
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
onClick: t[2] || (t[2] = (
|
|
1325
|
+
footer: te(() => [
|
|
1326
|
+
ne("span", $t, [
|
|
1327
|
+
z(D, {
|
|
1328
|
+
onClick: t[2] || (t[2] = (_) => N.value = !1)
|
|
1268
1329
|
}, {
|
|
1269
|
-
default:
|
|
1270
|
-
|
|
1330
|
+
default: te(() => [
|
|
1331
|
+
me("取消")
|
|
1271
1332
|
]),
|
|
1272
1333
|
_: 1
|
|
1273
1334
|
}),
|
|
1274
|
-
|
|
1335
|
+
z(D, {
|
|
1275
1336
|
type: "primary",
|
|
1276
|
-
onClick:
|
|
1337
|
+
onClick: o
|
|
1277
1338
|
}, {
|
|
1278
|
-
default:
|
|
1279
|
-
|
|
1339
|
+
default: te(() => [
|
|
1340
|
+
me("确定")
|
|
1280
1341
|
]),
|
|
1281
1342
|
_: 1
|
|
1282
1343
|
})
|
|
1283
1344
|
])
|
|
1284
1345
|
]),
|
|
1285
|
-
default:
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
modelValue:
|
|
1289
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
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
|
-
},
|
|
1299
|
-
install(
|
|
1300
|
-
|
|
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
|
-
|
|
1365
|
+
an as default
|
|
1305
1366
|
};
|