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/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 E, createElementBlock as O, Fragment as le, renderList as me, normalizeStyle as ye, toDisplayString as ce, computed as J, createVNode as B, ref as R, 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";
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 k = Ce(n, {
40
- handleReq: (A) => {
41
- ze() && (A.headers.token = Ke());
39
+ const E = Ce(n, {
40
+ handleReq: (R) => {
41
+ ze() && (R.headers.token = Ke());
42
42
  },
43
- handleRes: (A) => {
44
- const { data: D } = A;
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
- k.get, Z = k.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, k, A, D, g) => {
51
- const { data: e, time: h } = n, { gridTop: b, gridRight: s, gridLeft: x, maxShowCounts: Y, showSubChart: r } = k;
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: A,
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, k, A, D, g) => {
153
- const { variety: e, featureId: h, featureType: b } = A, { gridTop: s, gridLeft: x, gridRight: Y } = D;
154
- return k.reduce((r, a) => {
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 F = 0;
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: (M) => {
204
- F = M.offsetY;
203
+ ondragstart: (k) => {
204
+ T = k.offsetY;
205
205
  },
206
- ondrag: (M) => {
206
+ ondrag: (k) => {
207
207
  var P;
208
- if (M.target && M.target.childAt(1)) {
209
- const S = n.convertFromPixel({ yAxisIndex: 0 }, p + (M.offsetY - F));
210
- (P = M.target.childAt(1)) == null || P.animate("style", !1).when(1, { text: G(S, 3) }).start();
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 (M) => {
215
- const S = M.offsetY - F;
216
- if (S !== 0) {
217
- const V = n == null ? void 0 : n.convertFromPixel({ yAxisIndex: 0 }, S + p), d = {
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(V, 3),
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 (k, A) => (E(), O("div", at, [
244
- (E(!0), O(le, null, me(n.data, (D, g) => (E(), O("div", {
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: k, formatValue: A } = ge, D = n, g = J(() => {
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: k(s[0]) },
272
- { label: "高", value: k(s[3]) },
273
- { label: "低", value: k(s[2]) },
274
- { label: "收", value: k(s[1]) }
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: A(s[4]) });
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: `${k(s[6])}%`, color: Y }), x;
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: k(x.data[b]), color: x.color }))) || [];
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) => (E(), O("div", it, [
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-64b5c2a3"]]);
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: k, emit: A }) {
311
+ setup(n, { expose: E, emit: R }) {
312
312
  const { round: D } = ge;
313
313
  let g, e;
314
- const h = A, b = n, s = R(), x = J({
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((F) => ({ label: F.key, color: F.color, value: F.data[_] || "-" }))) || [];
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[_], F = _ === 0 ? a[_] : a[_ - 1];
341
- return p[0] === p[1] ? p[0] >= F[1] ? {
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 k({
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: F, maxValueSpan: M } = a, { leftYAxisRange: P, rightYAxisRange: S } = b.data.subIndicator[0], V = b.data.subIndicator.map((d) => {
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: F,
415
- maxValueSpan: M
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: S === "cover" ? (d) => d.min : null,
473
- max: S === "cover" ? (d) => d.max : null,
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: V
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, F = Ze;
495
- return E(), O("div", ut, [
494
+ const p = je, T = Ze;
495
+ return V(), O("div", ut, [
496
496
  U("div", dt, [
497
- Y.value.length ? (E(), O("div", ct, [
498
- B(F, {
497
+ Y.value.length ? (V(), O("div", ct, [
498
+ B(T, {
499
499
  modelValue: x.value,
500
- "onUpdate:modelValue": _[0] || (_[0] = (M) => x.value = M),
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
- (E(!0), O(le, null, me(n.subIndicatorList, (M) => (E(), ke(p, {
507
- key: M.value,
508
- label: M.label,
509
- value: M.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: k }) {
529
- const A = k, D = R(), g = R(), e = R({
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", A("closeContextMenuCallBack"), document.removeEventListener("click", h);
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) => (E(), O("div", {
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" ? (E(), O("div", {
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: k, emit: A }) {
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 = A, r = n, a = R(!1), _ = R(!1), p = R(!1), F = R(null), M = R(null), P = R("VOL"), S = R(0), V = R({}), d = R([]), N = R({}), C = R(!1), te = R(""), se = R([...D]), H = J(() => ({
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(F.value), Te(), H.value.showSubChart && M.value.connect(e), g = He(F.value), g.listen(() => {
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), S.value > 0 && (S.value -= 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 && S.value < f.length - 1 && (S.value += 1);
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 ? S.value : null
729
+ dataIndex: a.value ? M.value : null
730
730
  }), e.dispatchAction({
731
731
  type: "highlight",
732
- dataIndex: a.value ? S.value : l
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
- S.value = m, clearTimeout(h);
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
- S.value = t;
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: L, indicatorStore: v, mainIndicator: q, right: z, startTime: j, endTime: T } = r, { defaultShowCounts: I, addCounts: y, showWarningLine: de, getFactorData: ae } = H.value, $ = {
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: L,
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 && T ? ($.startTime = j, $.endTime = T) : j ? ($.startTime = j, $.limit = I + y) : T ? ($.endTime = T, $.limit = I + y) : ($.endTime = u().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), $.limit = I + y);
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
- V.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);
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 } = V.value;
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 L = await Je({
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
- V.value = {
806
- time: [...L.body.time, ...V.value.time.slice(1)],
807
- data: [...L.body.data, ...V.value.data.slice(1)],
808
- mainIndicator: V.value.mainIndicator.map((v, q) => {
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 = L.body.mainIndicator[q]) == null ? void 0 : z.data) ?? [], ...v.data.slice(1)]
812
+ data: [...((z = S.body.mainIndicator[q]) == null ? void 0 : z.data) ?? [], ...v.data.slice(1)]
813
813
  };
814
814
  }),
815
- subIndicator: V.value.subIndicator.map((v, q) => {
815
+ subIndicator: A.value.subIndicator.map((v, q) => {
816
816
  var z;
817
817
  return {
818
818
  ...v,
819
- data: [...((z = L.body.subIndicator[q]) == null ? void 0 : z.data) ?? [], ...v.data.slice(1)]
819
+ data: [...((z = S.body.subIndicator[q]) == null ? void 0 : z.data) ?? [], ...v.data.slice(1)]
820
820
  };
821
821
  })
822
- }, be(!0), L.body.data.length < l && (x = !0), s = !1;
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 } = V.value, { gridRight: m, gridLeft: c, defaultShowCounts: f, maxShowCounts: o, showSubChart: l } = H.value;
828
- let w = t.length - 1 - f, L = t.length - 1;
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 T = e.getOption(), I = (z = (q = T == null ? void 0 : T.xAxis) == null ? void 0 : q[0]) == null ? void 0 : z.data, y = (j = T == null ? void 0 : T.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), L = t.findIndex(($) => $ === ae);
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(V.value, H.value, w, L, r.cycle);
834
- if (e.setOption(v, !0), S.value = L, r.brushRange) {
835
- let T = null, I = null;
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
- T = 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"));
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
- T = 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"));
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
- T = 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"));
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
- T = 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());
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(T, I), e.dispatchAction({
852
+ console.log(L, I), e.dispatchAction({
853
853
  type: "brush",
854
854
  areas: [
855
855
  {
856
856
  brushType: "lineX",
857
- coordRange: [T, I],
857
+ coordRange: [L, I],
858
858
  xAxisIndex: 0
859
859
  }
860
860
  ]
861
861
  });
862
862
  }
863
- l && M.value.draw({ startValue: w, endValue: L, maxValueSpan: o }, { gridLeft: c, gridRight: m }), xe();
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 } = V.value;
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: (L) => ""
947
+ formatter: (S) => ""
948
948
  }
949
949
  }
950
950
  }
951
951
  });
952
- const w = async (L) => {
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 }, L.offsetY), q = Math.round(v * 1e3) / 1e3;
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 k({
1006
+ return E({
1007
1007
  draw: (i, t) => {
1008
1008
  i === "warningLine" && (d.value = t, ne());
1009
1009
  }
1010
1010
  }), (i, t) => {
1011
- var L;
1011
+ var S;
1012
1012
  const m = $e, c = Pe, f = Ie, o = Oe, l = Be, w = Ee;
1013
- return E(), O(le, null, [
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: V.value,
1022
- activeIndex: S.value
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
- (E(!0), O(le, null, me(se.value, (v) => (E(), ke(m, {
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: F,
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 ? (E(), O("div", vt, [
1063
+ H.value.showSubChart ? (V(), O("div", vt, [
1064
1064
  B(pt, {
1065
1065
  ref_key: "klineSubRef",
1066
- ref: M,
1066
+ ref: k,
1067
1067
  modelValue: P.value,
1068
1068
  "onUpdate:modelValue": t[0] || (t[0] = (v) => P.value = v),
1069
- data: V.value,
1069
+ data: A.value,
1070
1070
  cycle: n.cycle,
1071
- activeIndex: S.value,
1072
- subIndicatorList: (L = n.indicatorStore) == null ? void 0 : L.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 ? (E(), O("div", bt, [
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 ? (E(), O("div", xt, [
1081
+ p.value ? (V(), O("div", xt, [
1082
1082
  Yt,
1083
1083
  U("div", ht, [
1084
1084
  B(o, { onClick: ue }, {
@@ -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("./el-message-5e6a6be9.cjs"),f=require("./_plugin-vue_export-helper-f246444f.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 V.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:`文本格式要求示例:
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=f._export_sfc(w,[["__scopeId","data-v-445e2903"]]),T={install(r){r.component("st-varietyTextCopy",S)}};module.exports=T;
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;
@@ -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 { E as N } from "./el-message-e544a8f5.js";
8
- import { _ as k } from "./_plugin-vue_export-helper-dad06003.js";
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 N.error("品种内容不可为空"), s(!1);
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__ */ k(A, [["__scopeId", "data-v-445e2903"]]), ne = {
82
+ }, G = /* @__PURE__ */ N(A, [["__scopeId", "data-v-445e2903"]]), ne = {
83
83
  install(t) {
84
84
  t.component("st-varietyTextCopy", G);
85
85
  }