st-comp 0.0.206 → 0.0.207
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/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +6 -6
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +4 -4
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +118 -118
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +4 -4
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-66200fba.js → index-f27d8c7a.js} +7 -7
- package/lib/{python-3709061e.js → python-c345f0e2.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/components/KlineTips/index.vue +5 -5
package/es/KlineBasic.js
CHANGED
|
@@ -8,7 +8,7 @@ import { E as Ie } from "./el-empty-33cb66f1.js";
|
|
|
8
8
|
import { E as $e, a as Pe } from "./el-menu-item-7e881203.js";
|
|
9
9
|
import "./el-tooltip-4ed993c7.js";
|
|
10
10
|
import "./el-popper-b4f97157.js";
|
|
11
|
-
import { defineComponent as he, openBlock as
|
|
11
|
+
import { defineComponent as he, openBlock as V, createElementBlock as O, Fragment as le, renderList as me, normalizeStyle as ye, toDisplayString as ce, computed as J, createVNode as B, ref as F, onMounted as _e, onUnmounted as we, nextTick as De, createElementVNode as U, withCtx as K, createBlock as ke, createCommentVNode as X, renderSlot as Ye, watch as We, createTextVNode as re, pushScopeId as Ne, popScopeId as qe } from "vue";
|
|
12
12
|
import * as fe from "echarts";
|
|
13
13
|
import { d as u } from "./dayjs.min-8313b006.js";
|
|
14
14
|
import { y as Ce, v as ze, U as Ke, K as Ue, V as Q, x as ge, D as He } from "./index-7ed0999e.js";
|
|
@@ -36,19 +36,19 @@ import "./castArray-7741a212.js";
|
|
|
36
36
|
import "./debounce-8d53f4dd.js";
|
|
37
37
|
let Z = null;
|
|
38
38
|
const Xe = (n) => {
|
|
39
|
-
const
|
|
40
|
-
handleReq: (
|
|
41
|
-
ze() && (
|
|
39
|
+
const E = Ce(n, {
|
|
40
|
+
handleReq: (R) => {
|
|
41
|
+
ze() && (R.headers.token = Ke());
|
|
42
42
|
},
|
|
43
|
-
handleRes: (
|
|
44
|
-
const { data: D } =
|
|
43
|
+
handleRes: (R) => {
|
|
44
|
+
const { data: D } = R;
|
|
45
45
|
if (D.code === 401)
|
|
46
46
|
return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` : Ue(), !0;
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
-
|
|
50
|
-
}, Ge = (n) => Z("/middleLayer/kline/getKlineBasic", { ...n, userId: Q("id") }), Je = (n) => Z("/middleLayer/kline/getKline", n), Qe = async (n) => Z("/alarm/deliversign/addAlarmPrice", { ...n, userId: Q("id") }), et = async (n) => Z("/alarm/deliversign/findAlarmPriceByUserId", { ...n, userId: Q("id") }), Me = async (n) => Z("/alarm/deliversign/updateAlarmPrice", { ...n, userId: Q("id") }), tt = async (n) => Z("/alarm/deliversign/deleteAlarmPrice", { ...n, userId: Q("id") }), { round: G } = ge, nt = (n,
|
|
51
|
-
const { data: e, time: h } = n, { gridTop: b, gridRight: s, gridLeft: x, maxShowCounts: Y, showSubChart: r } =
|
|
49
|
+
E.get, Z = E.post;
|
|
50
|
+
}, Ge = (n) => Z("/middleLayer/kline/getKlineBasic", { ...n, userId: Q("id") }), Je = (n) => Z("/middleLayer/kline/getKline", n), Qe = async (n) => Z("/alarm/deliversign/addAlarmPrice", { ...n, userId: Q("id") }), et = async (n) => Z("/alarm/deliversign/findAlarmPriceByUserId", { ...n, userId: Q("id") }), Me = async (n) => Z("/alarm/deliversign/updateAlarmPrice", { ...n, userId: Q("id") }), tt = async (n) => Z("/alarm/deliversign/deleteAlarmPrice", { ...n, userId: Q("id") }), { round: G } = ge, nt = (n, E, R, D, g) => {
|
|
51
|
+
const { data: e, time: h } = n, { gridTop: b, gridRight: s, gridLeft: x, maxShowCounts: Y, showSubChart: r } = E;
|
|
52
52
|
return {
|
|
53
53
|
animation: !1,
|
|
54
54
|
grid: {
|
|
@@ -60,7 +60,7 @@ const Xe = (n) => {
|
|
|
60
60
|
dataZoom: [
|
|
61
61
|
{
|
|
62
62
|
type: "inside",
|
|
63
|
-
startValue:
|
|
63
|
+
startValue: R,
|
|
64
64
|
endValue: D,
|
|
65
65
|
maxValueSpan: Y
|
|
66
66
|
}
|
|
@@ -149,13 +149,13 @@ const Xe = (n) => {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
|
-
}, ot = (n,
|
|
153
|
-
const { variety: e, featureId: h, featureType: b } =
|
|
154
|
-
return
|
|
152
|
+
}, ot = (n, E, R, D, g) => {
|
|
153
|
+
const { variety: e, featureId: h, featureType: b } = R, { gridTop: s, gridLeft: x, gridRight: Y } = D;
|
|
154
|
+
return E.reduce((r, a) => {
|
|
155
155
|
const { warnPrice: _ } = a, p = n == null ? void 0 : n.convertToPixel({ yAxisIndex: 0 }, _);
|
|
156
156
|
if (p <= s || p >= (n == null ? void 0 : n.getHeight()))
|
|
157
157
|
return r;
|
|
158
|
-
let
|
|
158
|
+
let T = 0;
|
|
159
159
|
return [
|
|
160
160
|
...r,
|
|
161
161
|
{
|
|
@@ -200,23 +200,23 @@ const Xe = (n) => {
|
|
|
200
200
|
}
|
|
201
201
|
],
|
|
202
202
|
// 事件:开始拖拽
|
|
203
|
-
ondragstart: (
|
|
204
|
-
|
|
203
|
+
ondragstart: (k) => {
|
|
204
|
+
T = k.offsetY;
|
|
205
205
|
},
|
|
206
|
-
ondrag: (
|
|
206
|
+
ondrag: (k) => {
|
|
207
207
|
var P;
|
|
208
|
-
if (
|
|
209
|
-
const
|
|
210
|
-
(P =
|
|
208
|
+
if (k.target && k.target.childAt(1)) {
|
|
209
|
+
const M = n.convertFromPixel({ yAxisIndex: 0 }, p + (k.offsetY - T));
|
|
210
|
+
(P = k.target.childAt(1)) == null || P.animate("style", !1).when(1, { text: G(M, 3) }).start();
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
213
|
// 事件:结束拖拽
|
|
214
|
-
ondragend: async (
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
const
|
|
214
|
+
ondragend: async (k) => {
|
|
215
|
+
const M = k.offsetY - T;
|
|
216
|
+
if (M !== 0) {
|
|
217
|
+
const A = n == null ? void 0 : n.convertFromPixel({ yAxisIndex: 0 }, M + p), d = {
|
|
218
218
|
id: a.id,
|
|
219
|
-
warnPrice: G(
|
|
219
|
+
warnPrice: G(A, 3),
|
|
220
220
|
featureId: h,
|
|
221
221
|
//品种id
|
|
222
222
|
featureCode: e,
|
|
@@ -240,8 +240,8 @@ const Xe = (n) => {
|
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
setup(n) {
|
|
243
|
-
return (
|
|
244
|
-
(
|
|
243
|
+
return (E, R) => (V(), O("div", at, [
|
|
244
|
+
(V(!0), O(le, null, me(n.data, (D, g) => (V(), O("div", {
|
|
245
245
|
key: g,
|
|
246
246
|
class: "kline-tips-item",
|
|
247
247
|
style: ye({ color: D.color })
|
|
@@ -264,31 +264,31 @@ const it = { class: "kline-tips" }, lt = {
|
|
|
264
264
|
}
|
|
265
265
|
},
|
|
266
266
|
setup(n) {
|
|
267
|
-
const { round:
|
|
267
|
+
const { round: E, formatValue: R } = ge, D = n, g = J(() => {
|
|
268
268
|
const { data: h, activeIndex: b } = D;
|
|
269
269
|
if (h.data && h.data[b]) {
|
|
270
270
|
const s = h.data[b], x = [
|
|
271
|
-
{ label: "开", value:
|
|
272
|
-
{ label: "高", value:
|
|
273
|
-
{ label: "低", value:
|
|
274
|
-
{ label: "收", value:
|
|
271
|
+
{ label: "开", value: s[0] },
|
|
272
|
+
{ label: "高", value: s[3] },
|
|
273
|
+
{ label: "低", value: s[2] },
|
|
274
|
+
{ label: "收", value: s[1] }
|
|
275
275
|
];
|
|
276
|
-
s[4] !== null && x.push({ label: "额", value:
|
|
276
|
+
s[4] !== null && x.push({ label: "额", value: R(s[4]) });
|
|
277
277
|
let Y;
|
|
278
|
-
return s[6] > 0 ? Y = "red" : s[6] < 0 && (Y = "green"), x.push({ label: "涨跌", value: `${
|
|
278
|
+
return s[6] > 0 ? Y = "red" : s[6] < 0 && (Y = "green"), x.push({ label: "涨跌", value: `${s[6]}%`, color: Y }), x;
|
|
279
279
|
}
|
|
280
280
|
return [];
|
|
281
281
|
}), e = J(() => {
|
|
282
282
|
var s;
|
|
283
283
|
const { data: h, activeIndex: b } = D;
|
|
284
|
-
return ((s = h == null ? void 0 : h.mainIndicator) == null ? void 0 : s.map((x) => ({ label: x.key, value:
|
|
284
|
+
return ((s = h == null ? void 0 : h.mainIndicator) == null ? void 0 : s.map((x) => ({ label: x.key, value: E(x.data[b]), color: x.color }))) || [];
|
|
285
285
|
});
|
|
286
|
-
return (h, b) => (
|
|
286
|
+
return (h, b) => (V(), O("div", it, [
|
|
287
287
|
B(pe, { data: g.value }, null, 8, ["data"]),
|
|
288
288
|
B(pe, { data: e.value }, null, 8, ["data"])
|
|
289
289
|
]));
|
|
290
290
|
}
|
|
291
|
-
}, st = /* @__PURE__ */ ee(lt, [["__scopeId", "data-v-
|
|
291
|
+
}, st = /* @__PURE__ */ ee(lt, [["__scopeId", "data-v-b1a144a9"]]);
|
|
292
292
|
const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
293
293
|
key: 0,
|
|
294
294
|
class: "klineSub-tips-select"
|
|
@@ -308,10 +308,10 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
308
308
|
// 副图指标列表
|
|
309
309
|
},
|
|
310
310
|
emits: ["update:modelValue"],
|
|
311
|
-
setup(n, { expose:
|
|
311
|
+
setup(n, { expose: E, emit: R }) {
|
|
312
312
|
const { round: D } = ge;
|
|
313
313
|
let g, e;
|
|
314
|
-
const h =
|
|
314
|
+
const h = R, b = n, s = F(), x = J({
|
|
315
315
|
get() {
|
|
316
316
|
return b.modelValue;
|
|
317
317
|
},
|
|
@@ -321,7 +321,7 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
321
321
|
}), Y = J(() => {
|
|
322
322
|
var p;
|
|
323
323
|
const { data: a, activeIndex: _ } = b;
|
|
324
|
-
return ((p = a == null ? void 0 : a.subIndicator) == null ? void 0 : p.map((
|
|
324
|
+
return ((p = a == null ? void 0 : a.subIndicator) == null ? void 0 : p.map((T) => ({ label: T.key, color: T.color, value: T.data[_] || "-" }))) || [];
|
|
325
325
|
});
|
|
326
326
|
_e(() => {
|
|
327
327
|
g = fe.init(s.value);
|
|
@@ -337,8 +337,8 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
337
337
|
g.dispose(), e.disconnect(), e = null;
|
|
338
338
|
});
|
|
339
339
|
const r = (a, _) => {
|
|
340
|
-
const p = a[_],
|
|
341
|
-
return p[0] === p[1] ? p[0] >=
|
|
340
|
+
const p = a[_], T = _ === 0 ? a[_] : a[_ - 1];
|
|
341
|
+
return p[0] === p[1] ? p[0] >= T[1] ? {
|
|
342
342
|
color: "transparent",
|
|
343
343
|
borderColor: "#FF0000"
|
|
344
344
|
} : {
|
|
@@ -350,14 +350,14 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
350
350
|
color: "#00FFFF"
|
|
351
351
|
};
|
|
352
352
|
};
|
|
353
|
-
return
|
|
353
|
+
return E({
|
|
354
354
|
connect: (a) => {
|
|
355
355
|
fe.connect([a, g]);
|
|
356
356
|
},
|
|
357
357
|
// 联动
|
|
358
358
|
draw: (a, _) => {
|
|
359
359
|
De(() => {
|
|
360
|
-
const { startValue: p, endValue:
|
|
360
|
+
const { startValue: p, endValue: T, maxValueSpan: k } = a, { leftYAxisRange: P, rightYAxisRange: M } = b.data.subIndicator[0], A = b.data.subIndicator.map((d) => {
|
|
361
361
|
if (d.series === "bar")
|
|
362
362
|
return {
|
|
363
363
|
name: "subMain",
|
|
@@ -411,8 +411,8 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
411
411
|
{
|
|
412
412
|
type: "inside",
|
|
413
413
|
startValue: p,
|
|
414
|
-
endValue:
|
|
415
|
-
maxValueSpan:
|
|
414
|
+
endValue: T,
|
|
415
|
+
maxValueSpan: k
|
|
416
416
|
}
|
|
417
417
|
],
|
|
418
418
|
tooltip: {
|
|
@@ -469,8 +469,8 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
469
469
|
},
|
|
470
470
|
{
|
|
471
471
|
position: "right",
|
|
472
|
-
min:
|
|
473
|
-
max:
|
|
472
|
+
min: M === "cover" ? (d) => d.min : null,
|
|
473
|
+
max: M === "cover" ? (d) => d.max : null,
|
|
474
474
|
splitNumber: 1,
|
|
475
475
|
axisLine: {
|
|
476
476
|
show: !1
|
|
@@ -483,7 +483,7 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
],
|
|
486
|
-
series:
|
|
486
|
+
series: A
|
|
487
487
|
},
|
|
488
488
|
!0
|
|
489
489
|
);
|
|
@@ -491,22 +491,22 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
491
491
|
}
|
|
492
492
|
// 重置
|
|
493
493
|
}), (a, _) => {
|
|
494
|
-
const p = je,
|
|
495
|
-
return
|
|
494
|
+
const p = je, T = Ze;
|
|
495
|
+
return V(), O("div", ut, [
|
|
496
496
|
U("div", dt, [
|
|
497
|
-
Y.value.length ? (
|
|
498
|
-
B(
|
|
497
|
+
Y.value.length ? (V(), O("div", ct, [
|
|
498
|
+
B(T, {
|
|
499
499
|
modelValue: x.value,
|
|
500
|
-
"onUpdate:modelValue": _[0] || (_[0] = (
|
|
500
|
+
"onUpdate:modelValue": _[0] || (_[0] = (k) => x.value = k),
|
|
501
501
|
size: "small",
|
|
502
502
|
"popper-class": "element-dark",
|
|
503
503
|
class: "element-dark subIndicator"
|
|
504
504
|
}, {
|
|
505
505
|
default: K(() => [
|
|
506
|
-
(
|
|
507
|
-
key:
|
|
508
|
-
label:
|
|
509
|
-
value:
|
|
506
|
+
(V(!0), O(le, null, me(n.subIndicatorList, (k) => (V(), ke(p, {
|
|
507
|
+
key: k.value,
|
|
508
|
+
label: k.label,
|
|
509
|
+
value: k.value
|
|
510
510
|
}, null, 8, ["label", "value"]))), 128))
|
|
511
511
|
]),
|
|
512
512
|
_: 1
|
|
@@ -525,13 +525,13 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
525
525
|
}, pt = /* @__PURE__ */ ee(ft, [["__scopeId", "data-v-ab519de5"]]), mt = /* @__PURE__ */ he({
|
|
526
526
|
__name: "index",
|
|
527
527
|
emits: ["closeContextMenuCallBack"],
|
|
528
|
-
setup(n, { emit:
|
|
529
|
-
const
|
|
528
|
+
setup(n, { emit: E }) {
|
|
529
|
+
const R = E, D = F(), g = F(), e = F({
|
|
530
530
|
display: "none",
|
|
531
531
|
top: "0px",
|
|
532
532
|
left: "0px"
|
|
533
533
|
}), h = () => {
|
|
534
|
-
e.value.display = "none",
|
|
534
|
+
e.value.display = "none", R("closeContextMenuCallBack"), document.removeEventListener("click", h);
|
|
535
535
|
}, b = (s) => {
|
|
536
536
|
if (s.preventDefault(), e.value.display === "block") {
|
|
537
537
|
const { offsetX: x, offsetY: Y } = s, { offsetWidth: r, offsetHeight: a } = g.value;
|
|
@@ -547,7 +547,7 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
547
547
|
Y.left + Y.width >= x.right && (e.value.left = `${s.offsetX - Y.width}px`), Y.top + Y.height >= x.bottom && (console.log("高度超出"), e.value.top = `${s.offsetY - Y.height}px`);
|
|
548
548
|
}), document.addEventListener("click", h);
|
|
549
549
|
};
|
|
550
|
-
return (s, x) => (
|
|
550
|
+
return (s, x) => (V(), O("div", {
|
|
551
551
|
ref_key: "contextmenuRef",
|
|
552
552
|
ref: D,
|
|
553
553
|
class: "contextmenu",
|
|
@@ -555,7 +555,7 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
555
555
|
onMouseleave: h
|
|
556
556
|
}, [
|
|
557
557
|
Ye(s.$slots, "default", {}, void 0, !0),
|
|
558
|
-
e.value.display !== "none" ? (
|
|
558
|
+
e.value.display !== "none" ? (V(), O("div", {
|
|
559
559
|
key: 0,
|
|
560
560
|
ref_key: "contextmenuContentRef",
|
|
561
561
|
ref: g,
|
|
@@ -645,10 +645,10 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
645
645
|
// 时段框选
|
|
646
646
|
},
|
|
647
647
|
emits: ["change", "getFactorData"],
|
|
648
|
-
setup(n, { expose:
|
|
648
|
+
setup(n, { expose: E, emit: R }) {
|
|
649
649
|
const D = [{ label: "画线预警", key: "drawWarningLine" }];
|
|
650
650
|
let g = null, e = null, h, b, s = !1, x = !1;
|
|
651
|
-
const Y =
|
|
651
|
+
const Y = R, r = n, a = F(!1), _ = F(!1), p = F(!1), T = F(null), k = F(null), P = F("VOL"), M = F(0), A = F({}), d = F([]), N = F({}), C = F(!1), te = F(""), se = F([...D]), H = J(() => ({
|
|
652
652
|
defaultShowCounts: 500,
|
|
653
653
|
// 默认展示条数
|
|
654
654
|
addCounts: 2e3,
|
|
@@ -686,7 +686,7 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
686
686
|
e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(), g == null || g.dispose(), window.removeEventListener("keydown", ve);
|
|
687
687
|
});
|
|
688
688
|
const Le = () => {
|
|
689
|
-
e || (e = fe.init(
|
|
689
|
+
e || (e = fe.init(T.value), Te(), H.value.showSubChart && k.value.connect(e), g = He(T.value), g.listen(() => {
|
|
690
690
|
requestAnimationFrame(() => {
|
|
691
691
|
e.resize();
|
|
692
692
|
});
|
|
@@ -711,11 +711,11 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
711
711
|
break;
|
|
712
712
|
}
|
|
713
713
|
case "ArrowLeft": {
|
|
714
|
-
o > 0 && (o -= 1, l -= 1),
|
|
714
|
+
o > 0 && (o -= 1, l -= 1), M.value > 0 && (M.value -= 1);
|
|
715
715
|
break;
|
|
716
716
|
}
|
|
717
717
|
case "ArrowRight": {
|
|
718
|
-
l < f.length - 1 && (o += 1, l += 1), a.value &&
|
|
718
|
+
l < f.length - 1 && (o += 1, l += 1), a.value && M.value < f.length - 1 && (M.value += 1);
|
|
719
719
|
break;
|
|
720
720
|
}
|
|
721
721
|
}
|
|
@@ -726,10 +726,10 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
726
726
|
}), e.dispatchAction({
|
|
727
727
|
type: "updateAxisPointer",
|
|
728
728
|
seriesIndex: 0,
|
|
729
|
-
dataIndex: a.value ?
|
|
729
|
+
dataIndex: a.value ? M.value : null
|
|
730
730
|
}), e.dispatchAction({
|
|
731
731
|
type: "highlight",
|
|
732
|
-
dataIndex: a.value ?
|
|
732
|
+
dataIndex: a.value ? M.value : l
|
|
733
733
|
});
|
|
734
734
|
}
|
|
735
735
|
}, Te = () => {
|
|
@@ -747,12 +747,12 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
747
747
|
var c, f;
|
|
748
748
|
let m = t.dataIndex || -1;
|
|
749
749
|
t.batch && (m = typeof ((c = t == null ? void 0 : t.batch[0]) == null ? void 0 : c.dataIndex) == "number" ? (f = t == null ? void 0 : t.batch[0]) == null ? void 0 : f.dataIndex : -1), clearTimeout(h), h = setTimeout(() => {
|
|
750
|
-
|
|
750
|
+
M.value = m, clearTimeout(h);
|
|
751
751
|
}, 20);
|
|
752
752
|
}), e == null || e.on("globalout", () => {
|
|
753
753
|
var m, c, f;
|
|
754
754
|
const t = (f = (c = (m = e == null ? void 0 : e.getOption()) == null ? void 0 : m.dataZoom) == null ? void 0 : c[0]) == null ? void 0 : f.endValue;
|
|
755
|
-
|
|
755
|
+
M.value = t;
|
|
756
756
|
});
|
|
757
757
|
let i = null;
|
|
758
758
|
e == null || e.on("contextmenu", (t) => {
|
|
@@ -768,17 +768,17 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
768
768
|
try {
|
|
769
769
|
if (!r.variety || !r.cycle)
|
|
770
770
|
return;
|
|
771
|
-
const { variety: l, featureId: w, cycle:
|
|
771
|
+
const { variety: l, featureId: w, cycle: S, indicatorStore: v, mainIndicator: q, right: z, startTime: j, endTime: L } = r, { defaultShowCounts: I, addCounts: y, showWarningLine: de, getFactorData: ae } = H.value, $ = {
|
|
772
772
|
variety: l,
|
|
773
773
|
featureId: w,
|
|
774
|
-
cycle:
|
|
774
|
+
cycle: S,
|
|
775
775
|
mainIndicatorList: v.getIndicatorParams(q),
|
|
776
776
|
subIndicator: P.value,
|
|
777
777
|
right: z,
|
|
778
778
|
showWarningLine: de,
|
|
779
779
|
getFactorData: ae
|
|
780
780
|
};
|
|
781
|
-
j &&
|
|
781
|
+
j && L ? ($.startTime = j, $.endTime = L) : j ? ($.startTime = j, $.limit = I + y) : L ? ($.endTime = L, $.limit = I + y) : ($.endTime = u().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), $.limit = I + y);
|
|
782
782
|
const W = await Ge($);
|
|
783
783
|
if ((m = (t = (i = W == null ? void 0 : W.body) == null ? void 0 : i.kline) == null ? void 0 : t.time) != null && m.length)
|
|
784
784
|
_.value = !1, p.value = !1;
|
|
@@ -786,14 +786,14 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
786
786
|
_.value = !0, p.value = !1;
|
|
787
787
|
return;
|
|
788
788
|
}
|
|
789
|
-
|
|
789
|
+
A.value = (c = W == null ? void 0 : W.body) == null ? void 0 : c.kline, d.value = ((f = W == null ? void 0 : W.body) == null ? void 0 : f.warningLine) || [], be(), ne(), ae && Y("getFactorData", (o = W == null ? void 0 : W.body) == null ? void 0 : o.factor);
|
|
790
790
|
} catch (l) {
|
|
791
791
|
throw p.value = !0, _.value = !1, new Error(l);
|
|
792
792
|
}
|
|
793
793
|
}, Fe = async (i) => {
|
|
794
|
-
const { variety: t, cycle: m, indicatorStore: c, mainIndicator: f, right: o } = r, { addCounts: l } = H.value, { time: w } =
|
|
794
|
+
const { variety: t, cycle: m, indicatorStore: c, mainIndicator: f, right: o } = r, { addCounts: l } = H.value, { time: w } = A.value;
|
|
795
795
|
if (i === "history") {
|
|
796
|
-
const
|
|
796
|
+
const S = await Je({
|
|
797
797
|
variety: t,
|
|
798
798
|
cycle: m,
|
|
799
799
|
endTime: w[0],
|
|
@@ -802,65 +802,65 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
802
802
|
subIndicator: P.value,
|
|
803
803
|
right: o
|
|
804
804
|
});
|
|
805
|
-
|
|
806
|
-
time: [...
|
|
807
|
-
data: [...
|
|
808
|
-
mainIndicator:
|
|
805
|
+
A.value = {
|
|
806
|
+
time: [...S.body.time, ...A.value.time.slice(1)],
|
|
807
|
+
data: [...S.body.data, ...A.value.data.slice(1)],
|
|
808
|
+
mainIndicator: A.value.mainIndicator.map((v, q) => {
|
|
809
809
|
var z;
|
|
810
810
|
return {
|
|
811
811
|
...v,
|
|
812
|
-
data: [...((z =
|
|
812
|
+
data: [...((z = S.body.mainIndicator[q]) == null ? void 0 : z.data) ?? [], ...v.data.slice(1)]
|
|
813
813
|
};
|
|
814
814
|
}),
|
|
815
|
-
subIndicator:
|
|
815
|
+
subIndicator: A.value.subIndicator.map((v, q) => {
|
|
816
816
|
var z;
|
|
817
817
|
return {
|
|
818
818
|
...v,
|
|
819
|
-
data: [...((z =
|
|
819
|
+
data: [...((z = S.body.subIndicator[q]) == null ? void 0 : z.data) ?? [], ...v.data.slice(1)]
|
|
820
820
|
};
|
|
821
821
|
})
|
|
822
|
-
}, be(!0),
|
|
822
|
+
}, be(!0), S.body.data.length < l && (x = !0), s = !1;
|
|
823
823
|
}
|
|
824
824
|
}, be = (i = !1) => {
|
|
825
825
|
var q, z, j;
|
|
826
826
|
Le();
|
|
827
|
-
const { time: t } =
|
|
828
|
-
let w = t.length - 1 - f,
|
|
827
|
+
const { time: t } = A.value, { gridRight: m, gridLeft: c, defaultShowCounts: f, maxShowCounts: o, showSubChart: l } = H.value;
|
|
828
|
+
let w = t.length - 1 - f, S = t.length - 1;
|
|
829
829
|
if (i) {
|
|
830
|
-
const
|
|
831
|
-
w = t.findIndex(($) => $ === de),
|
|
830
|
+
const L = e.getOption(), I = (z = (q = L == null ? void 0 : L.xAxis) == null ? void 0 : q[0]) == null ? void 0 : z.data, y = (j = L == null ? void 0 : L.dataZoom) == null ? void 0 : j[0], de = I[y == null ? void 0 : y.startValue], ae = I[y == null ? void 0 : y.endValue];
|
|
831
|
+
w = t.findIndex(($) => $ === de), S = t.findIndex(($) => $ === ae);
|
|
832
832
|
}
|
|
833
|
-
const v = nt(
|
|
834
|
-
if (e.setOption(v, !0),
|
|
835
|
-
let
|
|
833
|
+
const v = nt(A.value, H.value, w, S, r.cycle);
|
|
834
|
+
if (e.setOption(v, !0), M.value = S, r.brushRange) {
|
|
835
|
+
let L = null, I = null;
|
|
836
836
|
switch (r.cycle) {
|
|
837
837
|
case "6": {
|
|
838
|
-
|
|
838
|
+
L = t.find((y) => new Date(y).getTime() >= new Date(r.brushRange[0]).getTime() || u(y).format("YYYY-MM-DD") === u(r.brushRange[0]).format("YYYY-MM-DD")), I = t.findLast((y) => new Date(y).getTime() <= new Date(r.brushRange[1]).getTime() || u(y).format("YYYY-MM-DD") === u(r.brushRange[1]).format("YYYY-MM-DD"));
|
|
839
839
|
break;
|
|
840
840
|
}
|
|
841
841
|
case "7": {
|
|
842
|
-
|
|
842
|
+
L = t.find((y) => u(y).day(5).format("YYYY-MM-DD") === u(r.brushRange[0]).day(5).format("YYYY-MM-DD")), I = t.findLast((y) => u(y).day(5).format("YYYY-MM-DD") === u(r.brushRange[1]).day(5).format("YYYY-MM-DD"));
|
|
843
843
|
break;
|
|
844
844
|
}
|
|
845
845
|
case "8": {
|
|
846
|
-
|
|
846
|
+
L = t.find((y) => u(y).endOf("month").format("YYYY-MM-DD") === u(r.brushRange[0]).endOf("month").format("YYYY-MM-DD")), I = t.findLast((y) => u(y).endOf("month").format("YYYY-MM-DD") === u(r.brushRange[1]).endOf("month").format("YYYY-MM-DD"));
|
|
847
847
|
break;
|
|
848
848
|
}
|
|
849
849
|
default:
|
|
850
|
-
|
|
850
|
+
L = t.find((y) => new Date(y).getTime() >= new Date(r.brushRange[0]).getTime()), I = t.findLast((y) => new Date(y).getTime() <= new Date(r.brushRange[1]).getTime());
|
|
851
851
|
}
|
|
852
|
-
console.log(
|
|
852
|
+
console.log(L, I), e.dispatchAction({
|
|
853
853
|
type: "brush",
|
|
854
854
|
areas: [
|
|
855
855
|
{
|
|
856
856
|
brushType: "lineX",
|
|
857
|
-
coordRange: [
|
|
857
|
+
coordRange: [L, I],
|
|
858
858
|
xAxisIndex: 0
|
|
859
859
|
}
|
|
860
860
|
]
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
|
-
l &&
|
|
863
|
+
l && k.value.draw({ startValue: w, endValue: S, maxValueSpan: o }, { gridLeft: c, gridRight: m }), xe();
|
|
864
864
|
}, ne = () => {
|
|
865
865
|
if (!e)
|
|
866
866
|
return;
|
|
@@ -877,7 +877,7 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
877
877
|
!0
|
|
878
878
|
), xe());
|
|
879
879
|
}, xe = () => {
|
|
880
|
-
const { time: i } =
|
|
880
|
+
const { time: i } = A.value;
|
|
881
881
|
if (r.brushRange && (i != null && i.length)) {
|
|
882
882
|
let t = u(r.brushRange[0]).format("YYYY-MM-DD 00:00:00"), m = u(r.brushRange[1]).format("YYYY-MM-DD 23:59:59"), c = null, f = null;
|
|
883
883
|
switch (r.cycle) {
|
|
@@ -944,14 +944,14 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
944
944
|
// 颜色改为透明
|
|
945
945
|
backgroundColor: "transparent",
|
|
946
946
|
// 仅显示Y轴值
|
|
947
|
-
formatter: (
|
|
947
|
+
formatter: (S) => ""
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
951
|
});
|
|
952
|
-
const w = async (
|
|
952
|
+
const w = async (S) => {
|
|
953
953
|
e == null || e.getZr().off("mousedown", w);
|
|
954
|
-
const v = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 },
|
|
954
|
+
const v = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 }, S.offsetY), q = Math.round(v * 1e3) / 1e3;
|
|
955
955
|
e == null || e.setOption({
|
|
956
956
|
...o,
|
|
957
957
|
// 指示器样式
|
|
@@ -1003,14 +1003,14 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1003
1003
|
}, Ve = () => {
|
|
1004
1004
|
se.value = [...D];
|
|
1005
1005
|
};
|
|
1006
|
-
return
|
|
1006
|
+
return E({
|
|
1007
1007
|
draw: (i, t) => {
|
|
1008
1008
|
i === "warningLine" && (d.value = t, ne());
|
|
1009
1009
|
}
|
|
1010
1010
|
}), (i, t) => {
|
|
1011
|
-
var
|
|
1011
|
+
var S;
|
|
1012
1012
|
const m = $e, c = Pe, f = Ie, o = Oe, l = Be, w = Ee;
|
|
1013
|
-
return
|
|
1013
|
+
return V(), O(le, null, [
|
|
1014
1014
|
U("div", {
|
|
1015
1015
|
class: "klineBasic",
|
|
1016
1016
|
onMousemove: t[1] || (t[1] = (v) => a.value = !0),
|
|
@@ -1018,8 +1018,8 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1018
1018
|
}, [
|
|
1019
1019
|
U("div", gt, [
|
|
1020
1020
|
B(st, {
|
|
1021
|
-
data:
|
|
1022
|
-
activeIndex:
|
|
1021
|
+
data: A.value,
|
|
1022
|
+
activeIndex: M.value
|
|
1023
1023
|
}, null, 8, ["data", "activeIndex"])
|
|
1024
1024
|
]),
|
|
1025
1025
|
U("div", {
|
|
@@ -1035,7 +1035,7 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1035
1035
|
borderRight: 0
|
|
1036
1036
|
} }, {
|
|
1037
1037
|
default: K(() => [
|
|
1038
|
-
(
|
|
1038
|
+
(V(!0), O(le, null, me(se.value, (v) => (V(), ke(m, {
|
|
1039
1039
|
style: { height: "36px" },
|
|
1040
1040
|
key: v.key,
|
|
1041
1041
|
index: v.key,
|
|
@@ -1053,32 +1053,32 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1053
1053
|
default: K(() => [
|
|
1054
1054
|
U("div", {
|
|
1055
1055
|
ref_key: "klineBasicMainRef",
|
|
1056
|
-
ref:
|
|
1056
|
+
ref: T,
|
|
1057
1057
|
style: { height: "100%" }
|
|
1058
1058
|
}, null, 512)
|
|
1059
1059
|
]),
|
|
1060
1060
|
_: 1
|
|
1061
1061
|
})
|
|
1062
1062
|
], 4),
|
|
1063
|
-
H.value.showSubChart ? (
|
|
1063
|
+
H.value.showSubChart ? (V(), O("div", vt, [
|
|
1064
1064
|
B(pt, {
|
|
1065
1065
|
ref_key: "klineSubRef",
|
|
1066
|
-
ref:
|
|
1066
|
+
ref: k,
|
|
1067
1067
|
modelValue: P.value,
|
|
1068
1068
|
"onUpdate:modelValue": t[0] || (t[0] = (v) => P.value = v),
|
|
1069
|
-
data:
|
|
1069
|
+
data: A.value,
|
|
1070
1070
|
cycle: n.cycle,
|
|
1071
|
-
activeIndex:
|
|
1072
|
-
subIndicatorList: (
|
|
1071
|
+
activeIndex: M.value,
|
|
1072
|
+
subIndicatorList: (S = n.indicatorStore) == null ? void 0 : S.subIndicatorList
|
|
1073
1073
|
}, null, 8, ["modelValue", "data", "cycle", "activeIndex", "subIndicatorList"])
|
|
1074
1074
|
])) : X("", !0),
|
|
1075
|
-
_.value ? (
|
|
1075
|
+
_.value ? (V(), O("div", bt, [
|
|
1076
1076
|
B(f, {
|
|
1077
1077
|
class: "klineBasic-empty-content",
|
|
1078
1078
|
description: "暂无数据"
|
|
1079
1079
|
})
|
|
1080
1080
|
])) : X("", !0),
|
|
1081
|
-
p.value ? (
|
|
1081
|
+
p.value ? (V(), O("div", xt, [
|
|
1082
1082
|
Yt,
|
|
1083
1083
|
U("div", ht, [
|
|
1084
1084
|
B(o, { onClick: ue }, {
|
package/es/VarietyTextCopy.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";require("./base-ef747d02.cjs");const v=require("./el-input-7fd293af.cjs");require("./el-tooltip-0ea8fbf8.cjs");const q=require("./el-popper-b6c99b28.cjs"),e=require("vue"),i=require("./index-098c2447.cjs"),V=require("./
|
|
2
|
-
`).reduce((s,a)=>{const t=a.trim().replace(/\s+/gi," ").split(" ")[0];return t&&s.push(t),s},[]):[];return u({validate:n=>new Promise(async(s,a)=>{try{if(p.required&&(!o.value||o.value.trim()===""))return
|
|
1
|
+
"use strict";require("./base-ef747d02.cjs");const v=require("./el-input-7fd293af.cjs");require("./el-tooltip-0ea8fbf8.cjs");const q=require("./el-popper-b6c99b28.cjs"),e=require("vue"),i=require("./index-098c2447.cjs"),V=require("./_plugin-vue_export-helper-f246444f.cjs"),f=require("./el-message-5e6a6be9.cjs");require("./use-form-common-props-fd9b61a0.cjs");require("./index-9780a537.cjs");require("./typescript-b63f8e83.cjs");require("./index-11547a0c.cjs");require("./use-global-config-30d7d8ce.cjs");require("./index-bb833443.cjs");require("./index-c108567d.cjs");require("./config-provider-a584d81e.cjs");const c=r=>(e.pushScopeId("data-v-445e2903"),r=r(),e.popScopeId(),r),h={class:"variety-text-copy"},y={class:"stats-container"},N={class:"stat-item"},g=c(()=>e.createElementVNode("span",{class:"label"},"品种数量统计:",-1)),E={class:"value"},C=c(()=>e.createElementVNode("br",null,null,-1)),I=c(()=>e.createElementVNode("br",null,null,-1)),w={__name:"index",props:{required:{type:Boolean,default:!0}},setup(r,{expose:u}){const d=e.inject("stConfig"),p=r,o=e.ref(""),_=e.computed(()=>l(o.value).length),l=n=>n?n.split(`
|
|
2
|
+
`).reduce((s,a)=>{const t=a.trim().replace(/\s+/gi," ").split(" ")[0];return t&&s.push(t),s},[]):[];return u({validate:n=>new Promise(async(s,a)=>{try{if(p.required&&(!o.value||o.value.trim()===""))return f.ElMessage.error("品种内容不可为空"),n(!1);const{body:t}=await d.request.post("/invest/analysis/strategy/verifyCodes",{codes:l(o.value)});return n(!0,t)}catch(t){return a(t)}})}),(n,s)=>{const a=i.ElIcon,t=q.ElTooltip,x=v.ElInput;return e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",y,[e.createElementVNode("div",N,[g,e.createElementVNode("span",E,e.toDisplayString(_.value),1),e.createVNode(t,{class:"box-item",effect:"dark",placement:"right"},{content:e.withCtx(()=>[e.createTextVNode(" 仅统计符合输入格式的数量, 输入格式示例(代码和名称需空格隔开, 名称可不写):"),C,e.createTextVNode("hc8888 热轧卷板期货指数 "),I,e.createTextVNode("sp8888 纸浆期货指数")]),default:e.withCtx(()=>[e.createVNode(a,null,{default:e.withCtx(()=>[e.createVNode(e.unref(i.info_filled_default))]),_:1})]),_:1})])]),e.createVNode(x,{class:"textarea",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=m=>o.value=m),resize:"none",type:"textarea",placeholder:`文本格式要求示例:
|
|
3
3
|
hc8888 热轧卷板期货指数
|
|
4
4
|
sp8888 纸浆期货指数
|
|
5
|
-
bu8888 石油沥青期货指数`},null,8,["modelValue"])])}}},S=
|
|
5
|
+
bu8888 石油沥青期货指数`},null,8,["modelValue"])])}}},S=V._export_sfc(w,[["__scopeId","data-v-445e2903"]]),T={install(r){r.component("st-varietyTextCopy",S)}};module.exports=T;
|
package/es/VarietyTextCopy.js
CHANGED
|
@@ -4,8 +4,8 @@ import "./el-tooltip-4ed993c7.js";
|
|
|
4
4
|
import { E as h } from "./el-popper-b4f97157.js";
|
|
5
5
|
import { inject as g, ref as E, computed as C, openBlock as V, createElementBlock as I, createElementVNode as n, toDisplayString as S, createVNode as i, withCtx as l, createTextVNode as c, unref as b, pushScopeId as w, popScopeId as T } from "vue";
|
|
6
6
|
import { i as q, E as B } from "./index-a871c3eb.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { _ as N } from "./_plugin-vue_export-helper-dad06003.js";
|
|
8
|
+
import { E as k } from "./el-message-e544a8f5.js";
|
|
9
9
|
import "./use-form-common-props-815d48a6.js";
|
|
10
10
|
import "./index-960806da.js";
|
|
11
11
|
import "./typescript-7ae59c4c.js";
|
|
@@ -28,7 +28,7 @@ const p = (t) => (w("data-v-445e2903"), t = t(), T(), t), j = { class: "variety-
|
|
|
28
28
|
return d({ validate: (s) => new Promise(async (r, a) => {
|
|
29
29
|
try {
|
|
30
30
|
if (m.required && (!o.value || o.value.trim() === ""))
|
|
31
|
-
return
|
|
31
|
+
return k.error("品种内容不可为空"), s(!1);
|
|
32
32
|
const { body: e } = await _.request.post("/invest/analysis/strategy/verifyCodes", { codes: u(o.value) });
|
|
33
33
|
return s(!0, e);
|
|
34
34
|
} catch (e) {
|
|
@@ -79,7 +79,7 @@ bu8888 石油沥青期货指数`
|
|
|
79
79
|
]);
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
}, G = /* @__PURE__ */
|
|
82
|
+
}, G = /* @__PURE__ */ N(A, [["__scopeId", "data-v-445e2903"]]), ne = {
|
|
83
83
|
install(t) {
|
|
84
84
|
t.component("st-varietyTextCopy", G);
|
|
85
85
|
}
|