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