st-comp 0.0.127 → 0.0.129
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 +244 -237
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +124 -124
- package/lib/{index-9315299f.js → index-46222655.js} +6007 -6000
- package/lib/{python-e3723c58.js → python-477921cb.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/api.js +25 -25
- package/packages/KlineBasic/index.vue +7 -3
- 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 Oe } from "./el-overlay-6056c89a.js";
|
|
3
3
|
import "./el-input-ee7db655.js";
|
|
4
|
-
import { E as
|
|
5
|
-
import { E as
|
|
6
|
-
import { E as
|
|
7
|
-
import { E as We, a as
|
|
4
|
+
import { E as Ve } from "./el-input-number-63c21037.js";
|
|
5
|
+
import { E as Ae } from "./el-button-24f79286.js";
|
|
6
|
+
import { E as Ee } from "./el-empty-79c5f7a8.js";
|
|
7
|
+
import { E as We, a as Be } from "./el-menu-item-0d92e7dc.js";
|
|
8
8
|
import "./el-tooltip-4ed993c7.js";
|
|
9
9
|
import "./el-popper-d3eef7ed.js";
|
|
10
|
-
import { defineComponent as we, openBlock as H, createElementBlock as z, Fragment as me, renderList as _e, normalizeStyle as xe, toDisplayString as ve, computed as le, createVNode as
|
|
10
|
+
import { defineComponent as we, openBlock as H, createElementBlock as z, Fragment as me, renderList as _e, normalizeStyle as xe, toDisplayString as ve, computed as le, createVNode as q, ref as C, onMounted as Se, onUnmounted as ke, nextTick as Me, createElementVNode as ee, withCtx as Q, createBlock as Le, createCommentVNode as ae, renderSlot as $e, watch as Ie, createTextVNode as fe, pushScopeId as Pe, popScopeId as Ye } from "vue";
|
|
11
11
|
import * as ge from "echarts";
|
|
12
|
-
import { y as Ne, v as
|
|
12
|
+
import { y as Ne, v as Re, U as Ce, K as He, V as ue, x as be, D as je } from "./index-8542fe24.js";
|
|
13
13
|
import { E as pe } from "./el-message-71aa42ca.js";
|
|
14
14
|
import { _ as ce } from "./_plugin-vue_export-helper-dad06003.js";
|
|
15
15
|
import "./el-tag-6a31c968.js";
|
|
16
|
-
import { E as
|
|
16
|
+
import { E as qe, 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,24 +28,24 @@ 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
|
|
31
|
+
var Ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
32
32
|
function Ze(a) {
|
|
33
33
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
36
|
-
(function(a,
|
|
37
|
-
(function(
|
|
38
|
-
a.exports =
|
|
39
|
-
})(
|
|
40
|
-
var
|
|
35
|
+
var De = { exports: {} };
|
|
36
|
+
(function(a, F) {
|
|
37
|
+
(function(A, M) {
|
|
38
|
+
a.exports = M();
|
|
39
|
+
})(Ue, function() {
|
|
40
|
+
var A = 1e3, M = 6e4, L = 36e5, e = "millisecond", w = "second", S = "minute", f = "hour", g = "day", $ = "week", c = "month", m = "quarter", h = "year", b = "date", E = "Invalid Date", T = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, j = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, O = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(l) {
|
|
41
41
|
var r = ["th", "st", "nd", "rd"], n = l % 100;
|
|
42
42
|
return "[" + l + (r[(n - 20) % 10] || r[n] || r[0]) + "]";
|
|
43
|
-
} },
|
|
43
|
+
} }, U = function(l, r, n) {
|
|
44
44
|
var s = String(l);
|
|
45
45
|
return !s || s.length >= r ? l : "" + Array(r + 1 - s.length).join(n) + l;
|
|
46
|
-
}, _ = { s:
|
|
46
|
+
}, _ = { s: U, z: function(l) {
|
|
47
47
|
var r = -l.utcOffset(), n = Math.abs(r), s = Math.floor(n / 60), i = n % 60;
|
|
48
|
-
return (r <= 0 ? "+" : "-") +
|
|
48
|
+
return (r <= 0 ? "+" : "-") + U(s, 2, "0") + ":" + U(i, 2, "0");
|
|
49
49
|
}, m: function l(r, n) {
|
|
50
50
|
if (r.date() < n.date())
|
|
51
51
|
return -l(n, r);
|
|
@@ -57,37 +57,37 @@ var Te = { exports: {} };
|
|
|
57
57
|
return { M: c, y: h, w: $, d: g, D: b, h: f, m: S, s: w, ms: e, Q: m }[l] || String(l || "").toLowerCase().replace(/s$/, "");
|
|
58
58
|
}, u: function(l) {
|
|
59
59
|
return l === void 0;
|
|
60
|
-
} },
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
return l instanceof
|
|
64
|
-
},
|
|
60
|
+
} }, P = "en", Y = {};
|
|
61
|
+
Y[P] = O;
|
|
62
|
+
var ne = "$isDayjsObject", Z = function(l) {
|
|
63
|
+
return l instanceof re || !(!l || !l[ne]);
|
|
64
|
+
}, oe = function l(r, n, s) {
|
|
65
65
|
var i;
|
|
66
66
|
if (!r)
|
|
67
|
-
return
|
|
67
|
+
return P;
|
|
68
68
|
if (typeof r == "string") {
|
|
69
69
|
var o = r.toLowerCase();
|
|
70
|
-
|
|
70
|
+
Y[o] && (i = o), n && (Y[o] = n, i = o);
|
|
71
71
|
var t = r.split("-");
|
|
72
72
|
if (!i && t.length > 1)
|
|
73
73
|
return l(t[0]);
|
|
74
74
|
} else {
|
|
75
75
|
var u = r.name;
|
|
76
|
-
|
|
76
|
+
Y[u] = r, i = u;
|
|
77
77
|
}
|
|
78
|
-
return !s && i && (
|
|
79
|
-
},
|
|
78
|
+
return !s && i && (P = i), i || !s && P;
|
|
79
|
+
}, W = function(l, r) {
|
|
80
80
|
if (Z(l))
|
|
81
81
|
return l.clone();
|
|
82
82
|
var n = typeof r == "object" ? r : {};
|
|
83
|
-
return n.date = l, n.args = arguments, new
|
|
83
|
+
return n.date = l, n.args = arguments, new re(n);
|
|
84
84
|
}, x = _;
|
|
85
|
-
x.l =
|
|
86
|
-
return
|
|
85
|
+
x.l = oe, x.i = Z, x.w = function(l, r) {
|
|
86
|
+
return W(l, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
|
|
87
87
|
};
|
|
88
|
-
var
|
|
88
|
+
var re = function() {
|
|
89
89
|
function l(n) {
|
|
90
|
-
this.$L =
|
|
90
|
+
this.$L = oe(n.locale, null, !0), this.parse(n), this.$x = this.$x || n.x || {}, this[ne] = !0;
|
|
91
91
|
}
|
|
92
92
|
var r = l.prototype;
|
|
93
93
|
return r.parse = function(n) {
|
|
@@ -114,14 +114,14 @@ var Te = { exports: {} };
|
|
|
114
114
|
}, r.$utils = function() {
|
|
115
115
|
return x;
|
|
116
116
|
}, r.isValid = function() {
|
|
117
|
-
return this.$d.toString() !==
|
|
117
|
+
return this.$d.toString() !== E;
|
|
118
118
|
}, r.isSame = function(n, s) {
|
|
119
|
-
var i =
|
|
119
|
+
var i = W(n);
|
|
120
120
|
return this.startOf(s) <= i && i <= this.endOf(s);
|
|
121
121
|
}, r.isAfter = function(n, s) {
|
|
122
|
-
return
|
|
122
|
+
return W(n) < this.startOf(s);
|
|
123
123
|
}, r.isBefore = function(n, s) {
|
|
124
|
-
return this.endOf(s) <
|
|
124
|
+
return this.endOf(s) < W(n);
|
|
125
125
|
}, r.$g = function(n, s, i) {
|
|
126
126
|
return x.u(n) ? this[s] : this.set(i, n);
|
|
127
127
|
}, r.unix = function() {
|
|
@@ -129,12 +129,12 @@ var Te = { exports: {} };
|
|
|
129
129
|
}, r.valueOf = function() {
|
|
130
130
|
return this.$d.getTime();
|
|
131
131
|
}, r.startOf = function(n, s) {
|
|
132
|
-
var i = this, o = !!x.u(s) || s, t = x.p(n), u = function(B,
|
|
133
|
-
var
|
|
134
|
-
return o ?
|
|
135
|
-
}, d = function(B,
|
|
136
|
-
return x.w(i.toDate()[B].apply(i.toDate("s"), (o ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(
|
|
137
|
-
}, p = this.$W, y = this.$M, v = this.$D,
|
|
132
|
+
var i = this, o = !!x.u(s) || s, t = x.p(n), u = function(B, I) {
|
|
133
|
+
var R = x.w(i.$u ? Date.UTC(i.$y, I, B) : new Date(i.$y, I, B), i);
|
|
134
|
+
return o ? R : R.endOf(g);
|
|
135
|
+
}, d = function(B, I) {
|
|
136
|
+
return x.w(i.toDate()[B].apply(i.toDate("s"), (o ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(I)), i);
|
|
137
|
+
}, p = this.$W, y = this.$M, v = this.$D, V = "set" + (this.$u ? "UTC" : "");
|
|
138
138
|
switch (t) {
|
|
139
139
|
case h:
|
|
140
140
|
return o ? u(1, 0) : u(31, 11);
|
|
@@ -145,13 +145,13 @@ var Te = { exports: {} };
|
|
|
145
145
|
return u(o ? v - k : v + (6 - k), y);
|
|
146
146
|
case g:
|
|
147
147
|
case b:
|
|
148
|
-
return d(
|
|
148
|
+
return d(V + "Hours", 0);
|
|
149
149
|
case f:
|
|
150
|
-
return d(
|
|
150
|
+
return d(V + "Minutes", 1);
|
|
151
151
|
case S:
|
|
152
|
-
return d(
|
|
152
|
+
return d(V + "Seconds", 2);
|
|
153
153
|
case w:
|
|
154
|
-
return d(
|
|
154
|
+
return d(V + "Milliseconds", 3);
|
|
155
155
|
default:
|
|
156
156
|
return this.clone();
|
|
157
157
|
}
|
|
@@ -173,7 +173,7 @@ var Te = { exports: {} };
|
|
|
173
173
|
var i, o = this;
|
|
174
174
|
n = Number(n);
|
|
175
175
|
var t = x.p(s), u = function(y) {
|
|
176
|
-
var v =
|
|
176
|
+
var v = W(o);
|
|
177
177
|
return x.w(v.date(v.date() + Math.round(y * n)), o);
|
|
178
178
|
};
|
|
179
179
|
if (t === c)
|
|
@@ -184,25 +184,25 @@ var Te = { exports: {} };
|
|
|
184
184
|
return u(1);
|
|
185
185
|
if (t === $)
|
|
186
186
|
return u(7);
|
|
187
|
-
var d = (i = {}, i[S] =
|
|
187
|
+
var d = (i = {}, i[S] = M, i[f] = L, i[w] = A, i)[t] || 1, p = this.$d.getTime() + n * d;
|
|
188
188
|
return x.w(p, this);
|
|
189
189
|
}, r.subtract = function(n, s) {
|
|
190
190
|
return this.add(-1 * n, s);
|
|
191
191
|
}, r.format = function(n) {
|
|
192
192
|
var s = this, i = this.$locale();
|
|
193
193
|
if (!this.isValid())
|
|
194
|
-
return i.invalidDate ||
|
|
195
|
-
var o = n || "YYYY-MM-DDTHH:mm:ssZ", t = x.z(this), u = this.$H, d = this.$m, p = this.$M, y = i.weekdays, v = i.months,
|
|
196
|
-
return
|
|
197
|
-
}, k = function(
|
|
198
|
-
return x.s(u % 12 || 12,
|
|
199
|
-
}, B =
|
|
200
|
-
var X =
|
|
201
|
-
return
|
|
194
|
+
return i.invalidDate || E;
|
|
195
|
+
var o = n || "YYYY-MM-DDTHH:mm:ssZ", t = x.z(this), u = this.$H, d = this.$m, p = this.$M, y = i.weekdays, v = i.months, V = i.meridiem, D = function(I, R, N, X) {
|
|
196
|
+
return I && (I[R] || I(s, o)) || N[R].slice(0, X);
|
|
197
|
+
}, k = function(I) {
|
|
198
|
+
return x.s(u % 12 || 12, I, "0");
|
|
199
|
+
}, B = V || function(I, R, N) {
|
|
200
|
+
var X = I < 12 ? "AM" : "PM";
|
|
201
|
+
return N ? X.toLowerCase() : X;
|
|
202
202
|
};
|
|
203
|
-
return o.replace(j, function(
|
|
204
|
-
return
|
|
205
|
-
switch (
|
|
203
|
+
return o.replace(j, function(I, R) {
|
|
204
|
+
return R || function(N) {
|
|
205
|
+
switch (N) {
|
|
206
206
|
case "YY":
|
|
207
207
|
return String(s.$y).slice(-2);
|
|
208
208
|
case "YYYY":
|
|
@@ -253,12 +253,12 @@ var Te = { exports: {} };
|
|
|
253
253
|
return t;
|
|
254
254
|
}
|
|
255
255
|
return null;
|
|
256
|
-
}(
|
|
256
|
+
}(I) || t.replace(":", "");
|
|
257
257
|
});
|
|
258
258
|
}, r.utcOffset = function() {
|
|
259
259
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
260
260
|
}, r.diff = function(n, s, i) {
|
|
261
|
-
var o, t = this, u = x.p(s), d =
|
|
261
|
+
var o, t = this, u = x.p(s), d = W(n), p = (d.utcOffset() - this.utcOffset()) * M, y = this - d, v = function() {
|
|
262
262
|
return x.m(t, d);
|
|
263
263
|
};
|
|
264
264
|
switch (u) {
|
|
@@ -278,13 +278,13 @@ var Te = { exports: {} };
|
|
|
278
278
|
o = (y - p) / 864e5;
|
|
279
279
|
break;
|
|
280
280
|
case f:
|
|
281
|
-
o = y /
|
|
281
|
+
o = y / L;
|
|
282
282
|
break;
|
|
283
283
|
case S:
|
|
284
|
-
o = y /
|
|
284
|
+
o = y / M;
|
|
285
285
|
break;
|
|
286
286
|
case w:
|
|
287
|
-
o = y /
|
|
287
|
+
o = y / A;
|
|
288
288
|
break;
|
|
289
289
|
default:
|
|
290
290
|
o = y;
|
|
@@ -293,11 +293,11 @@ var Te = { exports: {} };
|
|
|
293
293
|
}, r.daysInMonth = function() {
|
|
294
294
|
return this.endOf(c).$D;
|
|
295
295
|
}, r.$locale = function() {
|
|
296
|
-
return
|
|
296
|
+
return Y[this.$L];
|
|
297
297
|
}, r.locale = function(n, s) {
|
|
298
298
|
if (!n)
|
|
299
299
|
return this.$L;
|
|
300
|
-
var i = this.clone(), o =
|
|
300
|
+
var i = this.clone(), o = oe(n, s, !0);
|
|
301
301
|
return o && (i.$L = o), i;
|
|
302
302
|
}, r.clone = function() {
|
|
303
303
|
return x.w(this.$d, this);
|
|
@@ -310,33 +310,35 @@ var Te = { exports: {} };
|
|
|
310
310
|
}, r.toString = function() {
|
|
311
311
|
return this.$d.toUTCString();
|
|
312
312
|
}, l;
|
|
313
|
-
}(), ie =
|
|
314
|
-
return
|
|
313
|
+
}(), ie = re.prototype;
|
|
314
|
+
return W.prototype = ie, [["$ms", e], ["$s", w], ["$m", S], ["$H", f], ["$W", g], ["$M", c], ["$y", h], ["$D", b]].forEach(function(l) {
|
|
315
315
|
ie[l[1]] = function(r) {
|
|
316
316
|
return this.$g(r, l[0], l[1]);
|
|
317
317
|
};
|
|
318
|
-
}),
|
|
319
|
-
return l.$i || (l(r,
|
|
320
|
-
},
|
|
321
|
-
return
|
|
322
|
-
},
|
|
318
|
+
}), W.extend = function(l, r) {
|
|
319
|
+
return l.$i || (l(r, re, W), l.$i = !0), W;
|
|
320
|
+
}, W.locale = oe, W.isDayjs = Z, W.unix = function(l) {
|
|
321
|
+
return W(1e3 * l);
|
|
322
|
+
}, W.en = Y[P], W.Ls = Y, W.p = {}, W;
|
|
323
323
|
});
|
|
324
|
-
})(
|
|
325
|
-
var Ke =
|
|
326
|
-
const Je = /* @__PURE__ */ Ze(Ke)
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
});
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
324
|
+
})(De);
|
|
325
|
+
var Ke = De.exports;
|
|
326
|
+
const Je = /* @__PURE__ */ Ze(Ke);
|
|
327
|
+
let te = null;
|
|
328
|
+
const Xe = (a) => {
|
|
329
|
+
const F = Ne(a, {
|
|
330
|
+
handleReq: (A) => {
|
|
331
|
+
Re() && (A.headers.token = Ce());
|
|
332
|
+
},
|
|
333
|
+
handleRes: (A) => {
|
|
334
|
+
const { data: M } = A;
|
|
335
|
+
if (M.code === 401)
|
|
336
|
+
return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` : He(), !0;
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
F.get, te = F.post;
|
|
340
|
+
}, Ge = (a) => te("/middleLayer/kline/getKlineBasic", { ...a, userId: ue("id") }), Qe = (a) => te("/middleLayer/kline/getKline", a), et = async (a) => te("/alarm/deliversign/addAlarmPrice", { ...a, userId: ue("id") }), tt = async (a) => te("/alarm/deliversign/findAlarmPriceByUserId", { ...a, userId: ue("id") }), Te = async (a) => te("/alarm/deliversign/updateAlarmPrice", { ...a, userId: ue("id") }), nt = async (a) => te("/alarm/deliversign/deleteAlarmPrice", { ...a, userId: ue("id") }), { round: se } = be, ot = (a, F, A, M) => {
|
|
341
|
+
const { data: L, time: e } = a, { gridTop: w, gridRight: S, gridLeft: f, maxShowCounts: g, showSubChart: $ } = F;
|
|
340
342
|
return {
|
|
341
343
|
animation: !1,
|
|
342
344
|
grid: {
|
|
@@ -348,8 +350,8 @@ const Ge = (a) => re("/middleLayer/kline/getKlineBasic", { ...a, userId: ue("id"
|
|
|
348
350
|
dataZoom: [
|
|
349
351
|
{
|
|
350
352
|
type: "inside",
|
|
351
|
-
startValue:
|
|
352
|
-
endValue:
|
|
353
|
+
startValue: A,
|
|
354
|
+
endValue: M,
|
|
353
355
|
maxValueSpan: g
|
|
354
356
|
}
|
|
355
357
|
],
|
|
@@ -395,7 +397,7 @@ const Ge = (a) => re("/middleLayer/kline/getKlineBasic", { ...a, userId: ue("id"
|
|
|
395
397
|
series: [
|
|
396
398
|
{
|
|
397
399
|
type: "candlestick",
|
|
398
|
-
data:
|
|
400
|
+
data: L,
|
|
399
401
|
itemStyle: {
|
|
400
402
|
color: "transparent",
|
|
401
403
|
color0: "#00FFFF",
|
|
@@ -419,13 +421,13 @@ const Ge = (a) => re("/middleLayer/kline/getKlineBasic", { ...a, userId: ue("id"
|
|
|
419
421
|
}))
|
|
420
422
|
]
|
|
421
423
|
};
|
|
422
|
-
}, rt = (a,
|
|
423
|
-
const { variety: e, featureId: w, featureType: S } =
|
|
424
|
-
return
|
|
424
|
+
}, rt = (a, F, A, M, L) => {
|
|
425
|
+
const { variety: e, featureId: w, featureType: S } = A, { gridTop: f, gridLeft: g, gridRight: $ } = M;
|
|
426
|
+
return F.reduce((c, m) => {
|
|
425
427
|
const { warnPrice: h } = m, b = a == null ? void 0 : a.convertToPixel({ yAxisIndex: 0 }, h);
|
|
426
428
|
if (b <= f || b >= (a == null ? void 0 : a.getHeight()))
|
|
427
429
|
return c;
|
|
428
|
-
let
|
|
430
|
+
let E = 0;
|
|
429
431
|
return [
|
|
430
432
|
...c,
|
|
431
433
|
{
|
|
@@ -471,22 +473,22 @@ const Ge = (a) => re("/middleLayer/kline/getKlineBasic", { ...a, userId: ue("id"
|
|
|
471
473
|
],
|
|
472
474
|
// 事件:开始拖拽
|
|
473
475
|
ondragstart: (T) => {
|
|
474
|
-
|
|
476
|
+
E = T.offsetY;
|
|
475
477
|
},
|
|
476
478
|
ondrag: (T) => {
|
|
477
479
|
var j;
|
|
478
480
|
if (T.target && T.target.childAt(1)) {
|
|
479
|
-
const
|
|
480
|
-
(j = T.target.childAt(1)) == null || j.animate("style", !1).when(1, { text: se(
|
|
481
|
+
const O = a.convertFromPixel({ yAxisIndex: 0 }, b + (T.offsetY - E));
|
|
482
|
+
(j = T.target.childAt(1)) == null || j.animate("style", !1).when(1, { text: se(O, 3) }).start();
|
|
481
483
|
}
|
|
482
484
|
},
|
|
483
485
|
// 事件:结束拖拽
|
|
484
486
|
ondragend: async (T) => {
|
|
485
|
-
const
|
|
486
|
-
if (
|
|
487
|
-
const
|
|
487
|
+
const O = T.offsetY - E;
|
|
488
|
+
if (O !== 0) {
|
|
489
|
+
const U = a == null ? void 0 : a.convertFromPixel({ yAxisIndex: 0 }, O + b), _ = {
|
|
488
490
|
id: m.id,
|
|
489
|
-
warnPrice: se(
|
|
491
|
+
warnPrice: se(U, 3),
|
|
490
492
|
featureId: w,
|
|
491
493
|
//品种id
|
|
492
494
|
featureCode: e,
|
|
@@ -494,7 +496,7 @@ const Ge = (a) => re("/middleLayer/kline/getKlineBasic", { ...a, userId: ue("id"
|
|
|
494
496
|
featureType: S
|
|
495
497
|
//品种类型
|
|
496
498
|
};
|
|
497
|
-
await
|
|
499
|
+
await Te(_), pe.success("画线预警修改成功"), L && L();
|
|
498
500
|
}
|
|
499
501
|
}
|
|
500
502
|
}
|
|
@@ -510,12 +512,12 @@ const Ge = (a) => re("/middleLayer/kline/getKlineBasic", { ...a, userId: ue("id"
|
|
|
510
512
|
}
|
|
511
513
|
},
|
|
512
514
|
setup(a) {
|
|
513
|
-
return (
|
|
514
|
-
(H(!0), z(me, null, _e(a.data, (
|
|
515
|
-
key:
|
|
515
|
+
return (F, A) => (H(), z("div", it, [
|
|
516
|
+
(H(!0), z(me, null, _e(a.data, (M, L) => (H(), z("div", {
|
|
517
|
+
key: L,
|
|
516
518
|
class: "kline-tips-item",
|
|
517
|
-
style: xe({ color:
|
|
518
|
-
}, ve(
|
|
519
|
+
style: xe({ color: M.color })
|
|
520
|
+
}, ve(M.label) + " " + ve(M.value), 5))), 128))
|
|
519
521
|
]));
|
|
520
522
|
}
|
|
521
523
|
});
|
|
@@ -534,28 +536,28 @@ const st = { class: "kline-tips" }, lt = {
|
|
|
534
536
|
}
|
|
535
537
|
},
|
|
536
538
|
setup(a) {
|
|
537
|
-
const { round:
|
|
538
|
-
const { data: w, activeIndex: S } =
|
|
539
|
+
const { round: F, formatValue: A } = be, M = a, L = le(() => {
|
|
540
|
+
const { data: w, activeIndex: S } = M;
|
|
539
541
|
if (w.data && w.data[S]) {
|
|
540
542
|
const f = w.data[S], g = [
|
|
541
|
-
{ label: "开", value:
|
|
542
|
-
{ label: "高", value:
|
|
543
|
-
{ label: "低", value:
|
|
544
|
-
{ label: "收", value:
|
|
543
|
+
{ label: "开", value: F(f[0]) },
|
|
544
|
+
{ label: "高", value: F(f[3]) },
|
|
545
|
+
{ label: "低", value: F(f[2]) },
|
|
546
|
+
{ label: "收", value: F(f[1]) }
|
|
545
547
|
];
|
|
546
|
-
f[4] !== null && g.push({ label: "额", value:
|
|
548
|
+
f[4] !== null && g.push({ label: "额", value: A(f[4]) });
|
|
547
549
|
let $;
|
|
548
|
-
return f[6] > 0 ? $ = "red" : f[6] < 0 && ($ = "green"), g.push({ label: "涨跌", value: `${
|
|
550
|
+
return f[6] > 0 ? $ = "red" : f[6] < 0 && ($ = "green"), g.push({ label: "涨跌", value: `${F(f[6])}%`, color: $ }), g;
|
|
549
551
|
}
|
|
550
552
|
return [];
|
|
551
553
|
}), e = le(() => {
|
|
552
554
|
var f;
|
|
553
|
-
const { data: w, activeIndex: S } =
|
|
554
|
-
return ((f = w == null ? void 0 : w.mainIndicator) == null ? void 0 : f.map((g) => ({ label: g.key, value:
|
|
555
|
+
const { data: w, activeIndex: S } = M;
|
|
556
|
+
return ((f = w == null ? void 0 : w.mainIndicator) == null ? void 0 : f.map((g) => ({ label: g.key, value: F(g.data[S]), color: g.color }))) || [];
|
|
555
557
|
});
|
|
556
558
|
return (w, S) => (H(), z("div", st, [
|
|
557
|
-
|
|
558
|
-
|
|
559
|
+
q(he, { data: L.value }, null, 8, ["data"]),
|
|
560
|
+
q(he, { data: e.value }, null, 8, ["data"])
|
|
559
561
|
]));
|
|
560
562
|
}
|
|
561
563
|
}, ut = /* @__PURE__ */ ce(lt, [["__scopeId", "data-v-64b5c2a3"]]);
|
|
@@ -573,10 +575,10 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
573
575
|
// 副图指标列表
|
|
574
576
|
},
|
|
575
577
|
emits: ["update:modelValue"],
|
|
576
|
-
setup(a, { expose:
|
|
577
|
-
const { round:
|
|
578
|
-
let
|
|
579
|
-
const w =
|
|
578
|
+
setup(a, { expose: F, emit: A }) {
|
|
579
|
+
const { round: M } = be;
|
|
580
|
+
let L, e;
|
|
581
|
+
const w = A, S = a, f = C(), g = le({
|
|
580
582
|
get() {
|
|
581
583
|
return S.modelValue;
|
|
582
584
|
},
|
|
@@ -586,24 +588,24 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
586
588
|
}), $ = le(() => {
|
|
587
589
|
var b;
|
|
588
590
|
const { data: m, activeIndex: h } = S;
|
|
589
|
-
return ((b = m == null ? void 0 : m.subIndicator) == null ? void 0 : b.map((
|
|
591
|
+
return ((b = m == null ? void 0 : m.subIndicator) == null ? void 0 : b.map((E) => ({ label: E.key, color: E.color, value: E.data[h] || "-" }))) || [];
|
|
590
592
|
});
|
|
591
593
|
Se(() => {
|
|
592
|
-
|
|
594
|
+
L = ge.init(f.value);
|
|
593
595
|
let m = !0;
|
|
594
596
|
e = new ResizeObserver(() => {
|
|
595
597
|
if (m) {
|
|
596
598
|
m = null;
|
|
597
599
|
return;
|
|
598
600
|
}
|
|
599
|
-
|
|
601
|
+
L.resize();
|
|
600
602
|
}), e.observe(f.value);
|
|
601
603
|
}), ke(() => {
|
|
602
|
-
|
|
604
|
+
L.dispose(), e.disconnect(), e = null;
|
|
603
605
|
});
|
|
604
606
|
const c = (m, h) => {
|
|
605
|
-
const b = m[h],
|
|
606
|
-
return b[0] === b[1] ? b[0] >=
|
|
607
|
+
const b = m[h], E = h === 0 ? m[h] : m[h - 1];
|
|
608
|
+
return b[0] === b[1] ? b[0] >= E[1] ? {
|
|
607
609
|
color: "transparent",
|
|
608
610
|
borderColor: "#FF0000"
|
|
609
611
|
} : {
|
|
@@ -615,14 +617,14 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
615
617
|
color: "#00FFFF"
|
|
616
618
|
};
|
|
617
619
|
};
|
|
618
|
-
return
|
|
620
|
+
return F({
|
|
619
621
|
connect: (m) => {
|
|
620
|
-
ge.connect([m,
|
|
622
|
+
ge.connect([m, L]);
|
|
621
623
|
},
|
|
622
624
|
// 联动
|
|
623
625
|
draw: (m, h) => {
|
|
624
626
|
Me(() => {
|
|
625
|
-
const { startValue: b, endValue:
|
|
627
|
+
const { startValue: b, endValue: E, maxValueSpan: T } = m, { leftYAxisRange: j, rightYAxisRange: O } = S.data.subIndicator[0], U = S.data.subIndicator.map((_) => {
|
|
626
628
|
if (_.series === "bar")
|
|
627
629
|
return {
|
|
628
630
|
name: "subMain",
|
|
@@ -631,16 +633,16 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
631
633
|
type: "bar",
|
|
632
634
|
silent: !0,
|
|
633
635
|
symbol: "none",
|
|
634
|
-
data: _.data.map((
|
|
635
|
-
value:
|
|
636
|
-
itemStyle: c(S.data.data,
|
|
636
|
+
data: _.data.map((P, Y) => _.seriesColor === "kline" ? {
|
|
637
|
+
value: P,
|
|
638
|
+
itemStyle: c(S.data.data, Y)
|
|
637
639
|
} : _.seriesColor === "value" ? {
|
|
638
|
-
value:
|
|
640
|
+
value: P,
|
|
639
641
|
itemStyle: {
|
|
640
|
-
color:
|
|
642
|
+
color: P >= 0 ? "#FF0000" : "#00FFFF"
|
|
641
643
|
}
|
|
642
644
|
} : {
|
|
643
|
-
value:
|
|
645
|
+
value: P,
|
|
644
646
|
itemStyle: {
|
|
645
647
|
color: _.seriesColor
|
|
646
648
|
}
|
|
@@ -663,7 +665,7 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
663
665
|
}
|
|
664
666
|
};
|
|
665
667
|
});
|
|
666
|
-
|
|
668
|
+
L.setOption(
|
|
667
669
|
{
|
|
668
670
|
animation: !1,
|
|
669
671
|
grid: {
|
|
@@ -676,7 +678,7 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
676
678
|
{
|
|
677
679
|
type: "inside",
|
|
678
680
|
startValue: b,
|
|
679
|
-
endValue:
|
|
681
|
+
endValue: E,
|
|
680
682
|
maxValueSpan: T
|
|
681
683
|
}
|
|
682
684
|
],
|
|
@@ -689,11 +691,11 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
689
691
|
label: {
|
|
690
692
|
rich: {},
|
|
691
693
|
formatter: (_) => {
|
|
692
|
-
const { axisDimension:
|
|
693
|
-
if (
|
|
694
|
-
return
|
|
694
|
+
const { axisDimension: P, value: Y } = _;
|
|
695
|
+
if (P === "x")
|
|
696
|
+
return Y;
|
|
695
697
|
if (_.axisIndex === 1)
|
|
696
|
-
return String(
|
|
698
|
+
return String(M(Y));
|
|
697
699
|
}
|
|
698
700
|
}
|
|
699
701
|
},
|
|
@@ -735,8 +737,8 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
735
737
|
},
|
|
736
738
|
{
|
|
737
739
|
position: "right",
|
|
738
|
-
min:
|
|
739
|
-
max:
|
|
740
|
+
min: O === "cover" ? (_) => _.min : null,
|
|
741
|
+
max: O === "cover" ? (_) => _.max : null,
|
|
740
742
|
splitNumber: 1,
|
|
741
743
|
axisLine: {
|
|
742
744
|
show: !1
|
|
@@ -749,7 +751,7 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
749
751
|
}
|
|
750
752
|
}
|
|
751
753
|
],
|
|
752
|
-
series:
|
|
754
|
+
series: U
|
|
753
755
|
},
|
|
754
756
|
!0
|
|
755
757
|
);
|
|
@@ -757,11 +759,11 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
757
759
|
}
|
|
758
760
|
// 重置
|
|
759
761
|
}), (m, h) => {
|
|
760
|
-
const b =
|
|
762
|
+
const b = qe, E = ze;
|
|
761
763
|
return H(), z("div", ct, [
|
|
762
764
|
ee("div", dt, [
|
|
763
765
|
$.value.length ? (H(), z("div", ft, [
|
|
764
|
-
|
|
766
|
+
q(E, {
|
|
765
767
|
modelValue: g.value,
|
|
766
768
|
"onUpdate:modelValue": h[0] || (h[0] = (T) => g.value = T),
|
|
767
769
|
size: "small",
|
|
@@ -769,7 +771,7 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
769
771
|
class: "element-dark subIndicator"
|
|
770
772
|
}, {
|
|
771
773
|
default: Q(() => [
|
|
772
|
-
(H(!0), z(me, null, _e(a.subIndicatorList, (T) => (H(),
|
|
774
|
+
(H(!0), z(me, null, _e(a.subIndicatorList, (T) => (H(), Le(b, {
|
|
773
775
|
key: T.value,
|
|
774
776
|
label: T.label,
|
|
775
777
|
value: T.value
|
|
@@ -778,7 +780,7 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
778
780
|
_: 1
|
|
779
781
|
}, 8, ["modelValue"])
|
|
780
782
|
])) : ae("", !0),
|
|
781
|
-
|
|
783
|
+
q(he, { data: $.value }, null, 8, ["data"])
|
|
782
784
|
]),
|
|
783
785
|
ee("div", {
|
|
784
786
|
class: "klineSub-chart",
|
|
@@ -791,31 +793,31 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
791
793
|
}, mt = /* @__PURE__ */ ce(pt, [["__scopeId", "data-v-c06321cd"]]), yt = /* @__PURE__ */ we({
|
|
792
794
|
__name: "index",
|
|
793
795
|
emits: ["closeContextMenuCallBack"],
|
|
794
|
-
setup(a, { emit:
|
|
795
|
-
const
|
|
796
|
+
setup(a, { emit: F }) {
|
|
797
|
+
const A = F, M = C(), L = C(), e = C({
|
|
796
798
|
display: "none",
|
|
797
799
|
top: "0px",
|
|
798
800
|
left: "0px"
|
|
799
801
|
}), w = () => {
|
|
800
|
-
e.value.display = "none",
|
|
802
|
+
e.value.display = "none", A("closeContextMenuCallBack"), document.removeEventListener("click", w);
|
|
801
803
|
}, S = (f) => {
|
|
802
804
|
if (f.preventDefault(), e.value.display === "block") {
|
|
803
|
-
const { offsetX: g, offsetY: $ } = f, { offsetWidth: c, offsetHeight: m } =
|
|
805
|
+
const { offsetX: g, offsetY: $ } = f, { offsetWidth: c, offsetHeight: m } = L.value;
|
|
804
806
|
if (g <= c && $ <= m)
|
|
805
807
|
return;
|
|
806
808
|
}
|
|
807
|
-
|
|
809
|
+
M.value.click(), e.value = {
|
|
808
810
|
display: "block",
|
|
809
811
|
top: `${f.offsetY}px`,
|
|
810
812
|
left: `${f.offsetX}px`
|
|
811
813
|
}, Me(() => {
|
|
812
|
-
const g =
|
|
814
|
+
const g = M.value.getBoundingClientRect(), $ = L.value.getBoundingClientRect();
|
|
813
815
|
$.left + $.width >= g.right && (e.value.left = `${f.offsetX - $.width}px`), $.top + $.height >= g.bottom && (console.log("高度超出"), e.value.top = `${f.offsetY - $.height}px`);
|
|
814
816
|
}), document.addEventListener("click", w);
|
|
815
817
|
};
|
|
816
818
|
return (f, g) => (H(), z("div", {
|
|
817
819
|
ref_key: "contextmenuRef",
|
|
818
|
-
ref:
|
|
820
|
+
ref: M,
|
|
819
821
|
class: "contextmenu",
|
|
820
822
|
onContextmenu: S,
|
|
821
823
|
onMouseleave: w
|
|
@@ -824,7 +826,7 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
824
826
|
e.value.display !== "none" ? (H(), z("div", {
|
|
825
827
|
key: 0,
|
|
826
828
|
ref_key: "contextmenuContentRef",
|
|
827
|
-
ref:
|
|
829
|
+
ref: L,
|
|
828
830
|
class: "contextmenu-popover",
|
|
829
831
|
style: xe(e.value)
|
|
830
832
|
}, [
|
|
@@ -834,7 +836,7 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
834
836
|
}
|
|
835
837
|
});
|
|
836
838
|
const vt = /* @__PURE__ */ ce(yt, [["__scopeId", "data-v-811db6b4"]]);
|
|
837
|
-
const
|
|
839
|
+
const Fe = (a) => (Pe("data-v-2134db21"), a = a(), Ye(), a), gt = { class: "klineBasic" }, ht = { class: "klineBasic-tips" }, _t = {
|
|
838
840
|
key: 0,
|
|
839
841
|
class: "klineBasic-sub"
|
|
840
842
|
}, xt = {
|
|
@@ -843,7 +845,7 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
843
845
|
}, bt = {
|
|
844
846
|
key: 2,
|
|
845
847
|
class: "klineBasic-error"
|
|
846
|
-
}, $t = /* @__PURE__ */
|
|
848
|
+
}, $t = /* @__PURE__ */ Fe(() => /* @__PURE__ */ ee("div", { class: "klineBasic-error-content" }, " 加载失败,请刷新重试 ", -1)), wt = { style: { "text-align": "center" } }, St = /* @__PURE__ */ Fe(() => /* @__PURE__ */ ee("span", { style: { "margin-right": "10px" } }, "预警价格:", -1)), kt = { class: "dialog-footer" }, Mt = {
|
|
847
849
|
__name: "index",
|
|
848
850
|
props: {
|
|
849
851
|
variety: {
|
|
@@ -897,14 +899,19 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
897
899
|
config: {
|
|
898
900
|
type: Object,
|
|
899
901
|
default: () => ({})
|
|
900
|
-
}
|
|
902
|
+
},
|
|
901
903
|
// 配置
|
|
904
|
+
env: {
|
|
905
|
+
type: Object,
|
|
906
|
+
default: () => ({})
|
|
907
|
+
}
|
|
908
|
+
// 环境变量
|
|
902
909
|
},
|
|
903
910
|
emits: ["change", "getFactorData"],
|
|
904
|
-
setup(a, { expose:
|
|
905
|
-
const
|
|
906
|
-
let
|
|
907
|
-
const $ =
|
|
911
|
+
setup(a, { expose: F, emit: A }) {
|
|
912
|
+
const M = [{ label: "画线预警", key: "drawWarningLine" }];
|
|
913
|
+
let L = null, e = null, w, S, f = !1, g = !1;
|
|
914
|
+
const $ = A, c = a, m = C(!1), h = C(!1), b = C(null), E = C(null), T = C("VOL"), j = C(0), O = C({}), U = C([]), _ = C({}), P = C(!1), Y = C(""), ne = C([...M]), Z = le(() => ({
|
|
908
915
|
defaultShowCounts: 500,
|
|
909
916
|
// 默认展示条数
|
|
910
917
|
addCounts: 2e3,
|
|
@@ -927,7 +934,7 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
927
934
|
// 是否获取因子数据
|
|
928
935
|
...c.config
|
|
929
936
|
}));
|
|
930
|
-
|
|
937
|
+
Ie(
|
|
931
938
|
() => {
|
|
932
939
|
var o, t;
|
|
933
940
|
return [
|
|
@@ -944,24 +951,24 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
944
951
|
},
|
|
945
952
|
{ deep: !0 }
|
|
946
953
|
), Se(() => {
|
|
947
|
-
|
|
954
|
+
Xe(c.env), x();
|
|
948
955
|
}), ke(() => {
|
|
949
|
-
e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(),
|
|
956
|
+
e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(), L == null || L.dispose();
|
|
950
957
|
});
|
|
951
|
-
const
|
|
952
|
-
e || (e = ge.init(b.value),
|
|
958
|
+
const oe = () => {
|
|
959
|
+
e || (e = ge.init(b.value), W(), Z.value.showSubChart && E.value.connect(e), L = je(b.value), L.listen(() => {
|
|
953
960
|
requestAnimationFrame(() => {
|
|
954
961
|
e.resize();
|
|
955
962
|
});
|
|
956
963
|
}));
|
|
957
|
-
},
|
|
964
|
+
}, W = () => {
|
|
958
965
|
e == null || e.on("datazoom", (t) => {
|
|
959
966
|
clearTimeout(S), S = setTimeout(() => {
|
|
960
967
|
var d, p, y, v;
|
|
961
968
|
const { loadCheckCounts: u } = Z.value;
|
|
962
969
|
if ((p = (d = e == null ? void 0 : e.getOption()) == null ? void 0 : d.dataZoom) != null && p[0]) {
|
|
963
|
-
const { startValue:
|
|
964
|
-
|
|
970
|
+
const { startValue: V } = (v = (y = e == null ? void 0 : e.getOption()) == null ? void 0 : y.dataZoom) == null ? void 0 : v[0];
|
|
971
|
+
V < u && f === !1 && g === !1 && (f = !0, re("history")), l();
|
|
965
972
|
}
|
|
966
973
|
clearTimeout(S);
|
|
967
974
|
}, 100);
|
|
@@ -979,7 +986,7 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
979
986
|
let o = null;
|
|
980
987
|
e == null || e.on("contextmenu", (t) => {
|
|
981
988
|
o = setTimeout(() => {
|
|
982
|
-
t.componentType === "graphic" && (_.value = t.info,
|
|
989
|
+
t.componentType === "graphic" && (_.value = t.info, ne.value = [
|
|
983
990
|
{ label: "删除画线", key: "deleteWarningLine" },
|
|
984
991
|
{ label: "修改画线", key: "changeWarningLine" }
|
|
985
992
|
]), clearTimeout(o), o = null;
|
|
@@ -992,24 +999,24 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
992
999
|
return;
|
|
993
1000
|
const {
|
|
994
1001
|
variety: v,
|
|
995
|
-
featureId:
|
|
1002
|
+
featureId: V,
|
|
996
1003
|
cycle: D,
|
|
997
1004
|
indicatorStore: k,
|
|
998
1005
|
mainIndicator: B,
|
|
999
|
-
right:
|
|
1000
|
-
startTime:
|
|
1001
|
-
endTime:
|
|
1006
|
+
right: I,
|
|
1007
|
+
startTime: R,
|
|
1008
|
+
endTime: N
|
|
1002
1009
|
} = c, { defaultShowCounts: X, addCounts: G, showWarningLine: ye, getFactorData: de } = Z.value, K = {
|
|
1003
1010
|
variety: v,
|
|
1004
|
-
featureId:
|
|
1011
|
+
featureId: V,
|
|
1005
1012
|
cycle: D,
|
|
1006
1013
|
mainIndicatorList: k.getIndicatorParams(B),
|
|
1007
1014
|
subIndicator: T.value,
|
|
1008
|
-
right:
|
|
1015
|
+
right: I,
|
|
1009
1016
|
showWarningLine: ye,
|
|
1010
1017
|
getFactorData: de
|
|
1011
1018
|
};
|
|
1012
|
-
|
|
1019
|
+
R && N ? (K.startTime = R, K.endTime = N) : R ? (K.startTime = R, K.limit = X + G) : N ? (K.endTime = N, K.limit = X + G) : (K.endTime = Je().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), K.limit = X + G);
|
|
1013
1020
|
const J = await Ge(K);
|
|
1014
1021
|
if ((u = (t = (o = J == null ? void 0 : J.body) == null ? void 0 : o.kline) == null ? void 0 : t.time) != null && u.length)
|
|
1015
1022
|
m.value = !1, h.value = !1;
|
|
@@ -1017,47 +1024,47 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1017
1024
|
m.value = !0, h.value = !1;
|
|
1018
1025
|
return;
|
|
1019
1026
|
}
|
|
1020
|
-
|
|
1027
|
+
O.value = (d = J == null ? void 0 : J.body) == null ? void 0 : d.kline, U.value = ((p = J == null ? void 0 : J.body) == null ? void 0 : p.warningLine) || [], ie(), l(), de && $("getFactorData", (y = J == null ? void 0 : J.body) == null ? void 0 : y.factor);
|
|
1021
1028
|
} catch (v) {
|
|
1022
1029
|
throw h.value = !0, m.value = !1, new Error(v);
|
|
1023
1030
|
}
|
|
1024
|
-
},
|
|
1025
|
-
const { variety: t, cycle: u, indicatorStore: d, mainIndicator: p, right: y } = c, { addCounts: v } = Z.value, { time:
|
|
1031
|
+
}, re = async (o) => {
|
|
1032
|
+
const { variety: t, cycle: u, indicatorStore: d, mainIndicator: p, right: y } = c, { addCounts: v } = Z.value, { time: V } = O.value;
|
|
1026
1033
|
if (o === "history") {
|
|
1027
1034
|
const D = await Qe({
|
|
1028
1035
|
variety: t,
|
|
1029
1036
|
cycle: u,
|
|
1030
|
-
endTime:
|
|
1037
|
+
endTime: V[0],
|
|
1031
1038
|
limit: v,
|
|
1032
1039
|
mainIndicatorList: d.getIndicatorParams(p),
|
|
1033
1040
|
subIndicator: T.value,
|
|
1034
1041
|
right: y
|
|
1035
1042
|
});
|
|
1036
|
-
|
|
1037
|
-
time: [...D.body.time, ...
|
|
1038
|
-
data: [...D.body.data, ...
|
|
1039
|
-
mainIndicator:
|
|
1043
|
+
O.value = {
|
|
1044
|
+
time: [...D.body.time, ...O.value.time.slice(1)],
|
|
1045
|
+
data: [...D.body.data, ...O.value.data.slice(1)],
|
|
1046
|
+
mainIndicator: O.value.mainIndicator.map((k, B) => ({
|
|
1040
1047
|
...k,
|
|
1041
1048
|
data: [...D.body.mainIndicator[B].data, ...k.data.slice(1)]
|
|
1042
1049
|
})),
|
|
1043
|
-
subIndicator:
|
|
1050
|
+
subIndicator: O.value.subIndicator.map((k, B) => ({
|
|
1044
1051
|
...k,
|
|
1045
1052
|
data: [...D.body.subIndicator[B].data, ...k.data.slice(1)]
|
|
1046
1053
|
}))
|
|
1047
1054
|
}, ie(!0), D.body.data.length < v && (g = !0), f = !1;
|
|
1048
1055
|
}
|
|
1049
1056
|
}, ie = (o = !1) => {
|
|
1050
|
-
var B,
|
|
1051
|
-
|
|
1052
|
-
const { time: t } =
|
|
1053
|
-
let
|
|
1057
|
+
var B, I, R;
|
|
1058
|
+
oe();
|
|
1059
|
+
const { time: t } = O.value, { gridRight: u, gridLeft: d, defaultShowCounts: p, maxShowCounts: y, showSubChart: v } = Z.value;
|
|
1060
|
+
let V = t.length - 1 - p, D = t.length - 1;
|
|
1054
1061
|
if (o) {
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1062
|
+
const N = e.getOption(), X = (I = (B = N == null ? void 0 : N.xAxis) == null ? void 0 : B[0]) == null ? void 0 : I.data, G = (R = N == null ? void 0 : N.dataZoom) == null ? void 0 : R[0], ye = X[G == null ? void 0 : G.startValue], de = X[G == null ? void 0 : G.endValue];
|
|
1063
|
+
V = t.findIndex((K) => K === ye), D = t.findIndex((K) => K === de);
|
|
1057
1064
|
}
|
|
1058
|
-
const k = ot(
|
|
1059
|
-
e.setOption(k, !0), j.value = D, v &&
|
|
1060
|
-
{ startValue:
|
|
1065
|
+
const k = ot(O.value, Z.value, V, D);
|
|
1066
|
+
e.setOption(k, !0), j.value = D, v && E.value.draw(
|
|
1067
|
+
{ startValue: V, endValue: D, maxValueSpan: y },
|
|
1061
1068
|
{ gridLeft: d, gridRight: u }
|
|
1062
1069
|
);
|
|
1063
1070
|
}, l = () => {
|
|
@@ -1068,7 +1075,7 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1068
1075
|
{
|
|
1069
1076
|
...o,
|
|
1070
1077
|
graphic: [
|
|
1071
|
-
...rt(e,
|
|
1078
|
+
...rt(e, U.value, c, Z.value, () => {
|
|
1072
1079
|
r();
|
|
1073
1080
|
})
|
|
1074
1081
|
]
|
|
@@ -1077,7 +1084,7 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1077
1084
|
));
|
|
1078
1085
|
}, r = async () => {
|
|
1079
1086
|
const o = await tt({ featureId: c.featureId });
|
|
1080
|
-
|
|
1087
|
+
U.value = (o == null ? void 0 : o.body) || [], l(), $("change", "warningLine", U.value);
|
|
1081
1088
|
}, n = async (o) => {
|
|
1082
1089
|
const { variety: t, varietyName: u, featureId: d, featureType: p } = c;
|
|
1083
1090
|
if (o.key === "drawWarningLine") {
|
|
@@ -1111,8 +1118,8 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1111
1118
|
}
|
|
1112
1119
|
}
|
|
1113
1120
|
});
|
|
1114
|
-
const
|
|
1115
|
-
e == null || e.getZr().off("mousedown",
|
|
1121
|
+
const V = async (D) => {
|
|
1122
|
+
e == null || e.getZr().off("mousedown", V);
|
|
1116
1123
|
const k = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 }, D.offsetY), B = Math.round(k * 1e3) / 1e3;
|
|
1117
1124
|
e == null || e.setOption({
|
|
1118
1125
|
...y,
|
|
@@ -1145,12 +1152,12 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1145
1152
|
warnPrice: B
|
|
1146
1153
|
}), pe.success("画线预警成功!"), r();
|
|
1147
1154
|
};
|
|
1148
|
-
e == null || e.getZr().on("mousedown",
|
|
1155
|
+
e == null || e.getZr().on("mousedown", V);
|
|
1149
1156
|
} else
|
|
1150
|
-
o.key === "deleteWarningLine" ? (await nt({ id: _.value.id }), pe.success("画线预警删除成功"), r()) : o.key === "changeWarningLine" && (
|
|
1157
|
+
o.key === "deleteWarningLine" ? (await nt({ id: _.value.id }), pe.success("画线预警删除成功"), r()) : o.key === "changeWarningLine" && (P.value = !0, Y.value = _.value.warnPrice);
|
|
1151
1158
|
}, s = async () => {
|
|
1152
1159
|
const { variety: o, varietyName: t, featureId: u, featureType: d } = c;
|
|
1153
|
-
await
|
|
1160
|
+
await Te({
|
|
1154
1161
|
id: _.value.id,
|
|
1155
1162
|
featureCode: o,
|
|
1156
1163
|
//品种代码
|
|
@@ -1160,23 +1167,23 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1160
1167
|
//品种id
|
|
1161
1168
|
featureType: d,
|
|
1162
1169
|
//品种类型
|
|
1163
|
-
warnPrice:
|
|
1170
|
+
warnPrice: Y.value
|
|
1164
1171
|
}), pe.success("画线预警修改成功"), r();
|
|
1165
1172
|
}, i = () => {
|
|
1166
|
-
|
|
1173
|
+
ne.value = [...M];
|
|
1167
1174
|
};
|
|
1168
|
-
return
|
|
1175
|
+
return F({
|
|
1169
1176
|
draw: (o, t) => {
|
|
1170
|
-
o === "warningLine" && (
|
|
1177
|
+
o === "warningLine" && (U.value = t, l());
|
|
1171
1178
|
}
|
|
1172
1179
|
}), (o, t) => {
|
|
1173
1180
|
var D;
|
|
1174
|
-
const u = We, d =
|
|
1181
|
+
const u = We, d = Be, p = Ee, y = Ae, v = Ve, V = Oe;
|
|
1175
1182
|
return H(), z(me, null, [
|
|
1176
1183
|
ee("div", gt, [
|
|
1177
1184
|
ee("div", ht, [
|
|
1178
|
-
|
|
1179
|
-
data:
|
|
1185
|
+
q(ut, {
|
|
1186
|
+
data: O.value,
|
|
1180
1187
|
activeIndex: j.value
|
|
1181
1188
|
}, null, 8, ["data", "activeIndex"])
|
|
1182
1189
|
]),
|
|
@@ -1184,16 +1191,16 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1184
1191
|
class: "klineBasic-main",
|
|
1185
1192
|
style: xe({ height: Z.value.showSubChart ? "70%" : "100%" })
|
|
1186
1193
|
}, [
|
|
1187
|
-
|
|
1194
|
+
q(vt, { onCloseContextMenuCallBack: i }, {
|
|
1188
1195
|
popover: Q(() => [
|
|
1189
|
-
|
|
1196
|
+
q(d, { style: {
|
|
1190
1197
|
borderRadius: "4px",
|
|
1191
1198
|
overflow: "hidden",
|
|
1192
1199
|
background: "#fff",
|
|
1193
1200
|
borderRight: 0
|
|
1194
1201
|
} }, {
|
|
1195
1202
|
default: Q(() => [
|
|
1196
|
-
(H(!0), z(me, null, _e(
|
|
1203
|
+
(H(!0), z(me, null, _e(ne.value, (k) => (H(), Le(u, {
|
|
1197
1204
|
style: { height: "36px" },
|
|
1198
1205
|
key: k.key,
|
|
1199
1206
|
index: k.key,
|
|
@@ -1219,18 +1226,18 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1219
1226
|
})
|
|
1220
1227
|
], 4),
|
|
1221
1228
|
Z.value.showSubChart ? (H(), z("div", _t, [
|
|
1222
|
-
|
|
1229
|
+
q(mt, {
|
|
1223
1230
|
ref_key: "klineSubRef",
|
|
1224
|
-
ref:
|
|
1231
|
+
ref: E,
|
|
1225
1232
|
modelValue: T.value,
|
|
1226
1233
|
"onUpdate:modelValue": t[0] || (t[0] = (k) => T.value = k),
|
|
1227
|
-
data:
|
|
1234
|
+
data: O.value,
|
|
1228
1235
|
activeIndex: j.value,
|
|
1229
1236
|
subIndicatorList: (D = a.indicatorStore) == null ? void 0 : D.subIndicatorList
|
|
1230
1237
|
}, null, 8, ["modelValue", "data", "activeIndex", "subIndicatorList"])
|
|
1231
1238
|
])) : ae("", !0),
|
|
1232
1239
|
m.value ? (H(), z("div", xt, [
|
|
1233
|
-
|
|
1240
|
+
q(p, {
|
|
1234
1241
|
class: "klineBasic-empty-content",
|
|
1235
1242
|
description: "暂无数据"
|
|
1236
1243
|
})
|
|
@@ -1238,7 +1245,7 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1238
1245
|
h.value ? (H(), z("div", bt, [
|
|
1239
1246
|
$t,
|
|
1240
1247
|
ee("div", wt, [
|
|
1241
|
-
|
|
1248
|
+
q(y, { onClick: x }, {
|
|
1242
1249
|
default: Q(() => [
|
|
1243
1250
|
fe("刷新")
|
|
1244
1251
|
]),
|
|
@@ -1247,24 +1254,24 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1247
1254
|
])
|
|
1248
1255
|
])) : ae("", !0)
|
|
1249
1256
|
]),
|
|
1250
|
-
|
|
1251
|
-
modelValue:
|
|
1252
|
-
"onUpdate:modelValue": t[3] || (t[3] = (k) =>
|
|
1257
|
+
q(V, {
|
|
1258
|
+
modelValue: P.value,
|
|
1259
|
+
"onUpdate:modelValue": t[3] || (t[3] = (k) => P.value = k),
|
|
1253
1260
|
title: "画线预警-修改价格",
|
|
1254
1261
|
width: "30%",
|
|
1255
1262
|
"align-center": ""
|
|
1256
1263
|
}, {
|
|
1257
1264
|
footer: Q(() => [
|
|
1258
1265
|
ee("span", kt, [
|
|
1259
|
-
|
|
1260
|
-
onClick: t[2] || (t[2] = (k) =>
|
|
1266
|
+
q(y, {
|
|
1267
|
+
onClick: t[2] || (t[2] = (k) => P.value = !1)
|
|
1261
1268
|
}, {
|
|
1262
1269
|
default: Q(() => [
|
|
1263
1270
|
fe("取消")
|
|
1264
1271
|
]),
|
|
1265
1272
|
_: 1
|
|
1266
1273
|
}),
|
|
1267
|
-
|
|
1274
|
+
q(y, {
|
|
1268
1275
|
type: "primary",
|
|
1269
1276
|
onClick: s
|
|
1270
1277
|
}, {
|
|
@@ -1277,9 +1284,9 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1277
1284
|
]),
|
|
1278
1285
|
default: Q(() => [
|
|
1279
1286
|
St,
|
|
1280
|
-
|
|
1281
|
-
modelValue:
|
|
1282
|
-
"onUpdate:modelValue": t[1] || (t[1] = (k) =>
|
|
1287
|
+
q(v, {
|
|
1288
|
+
modelValue: Y.value,
|
|
1289
|
+
"onUpdate:modelValue": t[1] || (t[1] = (k) => Y.value = k),
|
|
1283
1290
|
placeholder: "输入预警价格"
|
|
1284
1291
|
}, null, 8, ["modelValue"])
|
|
1285
1292
|
]),
|
|
@@ -1288,11 +1295,11 @@ const Oe = (a) => (Pe("data-v-327e4ef0"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1288
1295
|
], 64);
|
|
1289
1296
|
};
|
|
1290
1297
|
}
|
|
1291
|
-
},
|
|
1298
|
+
}, Lt = /* @__PURE__ */ ce(Mt, [["__scopeId", "data-v-2134db21"]]), on = {
|
|
1292
1299
|
install(a) {
|
|
1293
|
-
a.component("st-klineBasic",
|
|
1300
|
+
a.component("st-klineBasic", Lt);
|
|
1294
1301
|
}
|
|
1295
1302
|
};
|
|
1296
1303
|
export {
|
|
1297
|
-
|
|
1304
|
+
on as default
|
|
1298
1305
|
};
|