st-comp 0.0.261 → 0.0.263

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,9 +8,9 @@ import { E as Ze } from "./el-empty-f5a1607a.js";
8
8
  import { E as Ke, a as Ue } from "./el-menu-item-dac65bb3.js";
9
9
  import "./el-tooltip-4ed993c7.js";
10
10
  import "./el-popper-c9b3d3cf.js";
11
- import { defineComponent as be, ref as F, watch as te, nextTick as ne, openBlock as T, createElementBlock as E, Fragment as oe, renderList as fe, normalizeStyle as pe, toDisplayString as ae, computed as le, createVNode as I, onMounted as Se, onUnmounted as Me, createElementVNode as K, withCtx as z, createBlock as Le, createCommentVNode as G, renderSlot as Ye, createTextVNode as ue, pushScopeId as He, popScopeId as je } from "vue";
12
- import { d as L } from "./dayjs.min-8313b006.js";
13
- import * as xe from "echarts";
11
+ import { defineComponent as xe, ref as A, watch as te, nextTick as ne, openBlock as T, createElementBlock as E, Fragment as oe, renderList as fe, normalizeStyle as pe, toDisplayString as ae, computed as le, createVNode as I, onMounted as Se, onUnmounted as Me, createElementVNode as K, withCtx as z, createBlock as Le, createCommentVNode as G, renderSlot as Ye, createTextVNode as ue, pushScopeId as He, popScopeId as je } from "vue";
12
+ import { d as F } from "./dayjs.min-8313b006.js";
13
+ import * as be from "echarts";
14
14
  import { y as Ce, v as Xe, U as Ge, K as Je, V as ie, x as _e, D as Qe, G as ce } from "./index-7ed0999e.js";
15
15
  import "./el-message-4ed993c7.js";
16
16
  import { E as de } from "./index-f30561d3.js";
@@ -50,13 +50,13 @@ const nt = (t) => {
50
50
  });
51
51
  w.get, C = w.post;
52
52
  }, ot = (t) => C("/middleLayer/kline/getKlineBasic", { ...t, userId: ie("id") }), at = (t) => C("/middleLayer/kline/getKline", t), lt = async (t) => C("/alarm/deliversign/addAlarmPrice", { ...t, userId: ie("id") }), it = async (t) => C("/alarm/deliversign/findAlarmPriceByUserId", { ...t, userId: ie("id") }), Fe = async (t) => C("/alarm/deliversign/updateAlarmPrice", { ...t, userId: ie("id") }), rt = async (t) => C("/alarm/deliversign/deleteAlarmPrice", { ...t, userId: ie("id") }), { round: j } = _e, st = (t, w, h, r, i) => {
53
- const { data: e, time: m } = t, { gridTop: s, gridRight: d, gridLeft: f, maxShowCounts: y, showSubChart: k } = w;
53
+ const { data: e, time: m } = t, { gridTop: s, gridRight: d, gridLeft: f, maxShowCounts: y, showSubChart: Y } = w;
54
54
  return {
55
55
  animation: !1,
56
56
  grid: {
57
57
  top: `${s}px`,
58
58
  right: `${d}px`,
59
- bottom: k ? "6px" : "24px",
59
+ bottom: Y ? "6px" : "24px",
60
60
  left: `${f}px`
61
61
  },
62
62
  dataZoom: [
@@ -77,21 +77,21 @@ const nt = (t) => {
77
77
  rich: {},
78
78
  formatter: (a) => {
79
79
  const { axisDimension: p, value: _ } = a;
80
- return p === "x" ? k ? "" : ["6", "7", "8"].includes(i) ? L(_).format("YYYY-MM-DD") : _ : String(j(_));
80
+ return p === "x" ? Y ? "" : ["6", "7", "8"].includes(i) ? F(_).format("YYYY-MM-DD") : _ : String(j(_));
81
81
  }
82
82
  }
83
83
  },
84
84
  formatter: () => ""
85
85
  },
86
86
  xAxis: {
87
- show: !k,
87
+ show: !Y,
88
88
  type: "category",
89
89
  data: m,
90
90
  splitLine: {
91
91
  show: !1
92
92
  },
93
93
  axisLabel: {
94
- formatter: (a) => ["6", "7", "8"].includes(i) ? L(a).format("YYYY-MM-DD") : a
94
+ formatter: (a) => ["6", "7", "8"].includes(i) ? F(a).format("YYYY-MM-DD") : a
95
95
  }
96
96
  },
97
97
  yAxis: {
@@ -153,13 +153,13 @@ const nt = (t) => {
153
153
  };
154
154
  }, ut = (t, w, h, r, i) => {
155
155
  const { variety: e, featureId: m, featureType: s } = h, { gridTop: d, gridLeft: f, gridRight: y } = r;
156
- return w.reduce((k, a) => {
156
+ return w.reduce((Y, a) => {
157
157
  const { warnPrice: p } = a, _ = t == null ? void 0 : t.convertToPixel({ yAxisIndex: 0 }, p);
158
158
  if (_ <= d || _ >= (t == null ? void 0 : t.getHeight()))
159
- return k;
160
- let M = 0;
159
+ return Y;
160
+ let L = 0;
161
161
  return [
162
- ...k,
162
+ ...Y,
163
163
  {
164
164
  type: "group",
165
165
  name: "warningLine",
@@ -202,19 +202,19 @@ const nt = (t) => {
202
202
  }
203
203
  ],
204
204
  // 事件:开始拖拽
205
- ondragstart: (Y) => {
206
- M = Y.offsetY;
205
+ ondragstart: (D) => {
206
+ L = D.offsetY;
207
207
  },
208
- ondrag: (Y) => {
208
+ ondrag: (D) => {
209
209
  var R;
210
- if (Y.target && Y.target.childAt(1)) {
211
- const $ = t.convertFromPixel({ yAxisIndex: 0 }, _ + (Y.offsetY - M));
212
- (R = Y.target.childAt(1)) == null || R.animate("style", !1).when(1, { text: j($, 3) }).start();
210
+ if (D.target && D.target.childAt(1)) {
211
+ const $ = t.convertFromPixel({ yAxisIndex: 0 }, _ + (D.offsetY - L));
212
+ (R = D.target.childAt(1)) == null || R.animate("style", !1).when(1, { text: j($, 3) }).start();
213
213
  }
214
214
  },
215
215
  // 事件:结束拖拽
216
- ondragend: async (Y) => {
217
- const $ = Y.offsetY - M;
216
+ ondragend: async (D) => {
217
+ const $ = D.offsetY - L;
218
218
  if ($ !== 0) {
219
219
  const B = t == null ? void 0 : t.convertFromPixel({ yAxisIndex: 0 }, $ + _), V = {
220
220
  id: a.id,
@@ -260,7 +260,7 @@ function Ae(t) {
260
260
  return "-";
261
261
  }
262
262
  }
263
- const ct = /* @__PURE__ */ be({
263
+ const ct = /* @__PURE__ */ xe({
264
264
  __name: "index",
265
265
  props: {
266
266
  // 提示数据
@@ -270,12 +270,12 @@ const ct = /* @__PURE__ */ be({
270
270
  }
271
271
  },
272
272
  setup(t) {
273
- const w = t, h = F(null), r = F([]);
273
+ const w = t, h = A(null), r = A([]);
274
274
  return te(() => w.data, () => {
275
275
  r.value.length === 0 && ne(() => {
276
276
  Array.from(h.value.children).forEach((i, e) => {
277
- var m, s, d, f, y, k, a, p;
278
- ((s = (m = w.data) == null ? void 0 : m[e]) == null ? void 0 : s.label) === "涨跌" ? r.value[e] = "85px" : ((f = (d = w.data) == null ? void 0 : d[e]) == null ? void 0 : f.label) === "至今涨幅" ? r.value[e] = "115px" : ((k = (y = w.data) == null ? void 0 : y[e]) == null ? void 0 : k.label) === "额" ? r.value[e] = "85px" : ["开", "高", "低", "收"].includes((p = (a = w.data) == null ? void 0 : a[e]) == null ? void 0 : p.label) ? r.value[e] = `${i.offsetWidth + 24}px` : r.value[e] = `${i.offsetWidth + 36}px`;
277
+ var m, s, d, f, y, Y, a, p;
278
+ ((s = (m = w.data) == null ? void 0 : m[e]) == null ? void 0 : s.label) === "涨跌" ? r.value[e] = "85px" : ((f = (d = w.data) == null ? void 0 : d[e]) == null ? void 0 : f.label) === "至今涨幅" ? r.value[e] = "115px" : ((Y = (y = w.data) == null ? void 0 : y[e]) == null ? void 0 : Y.label) === "额" ? r.value[e] = "85px" : ["开", "高", "低", "收"].includes((p = (a = w.data) == null ? void 0 : a[e]) == null ? void 0 : p.label) ? r.value[e] = `${i.offsetWidth + 24}px` : r.value[e] = `${i.offsetWidth + 36}px`;
279
279
  });
280
280
  });
281
281
  }), (i, e) => (T(), E("div", {
@@ -310,7 +310,7 @@ const dt = { class: "kline-tips" }, ft = {
310
310
  }
311
311
  },
312
312
  setup(t) {
313
- const { round: w, formatValue: h } = _e, r = t, i = F(null);
313
+ const { round: w, formatValue: h } = _e, r = t, i = A(null);
314
314
  te(() => r.activeIndex, () => {
315
315
  var s;
316
316
  i.value === null && (i.value = ((s = r.data.data[r.activeIndex]) == null ? void 0 : s[1]) ?? 0);
@@ -330,8 +330,8 @@ const dt = { class: "kline-tips" }, ft = {
330
330
  { label: "收", value: f[1] }
331
331
  ];
332
332
  f[4] !== null && y.push({ label: "额", value: h(f[4]) });
333
- let k;
334
- f[6] > 0 ? k = "red" : f[6] < 0 && (k = "green"), y.push({ label: "涨跌", value: `${w(f[6])}%`, color: k });
333
+ let Y;
334
+ f[6] > 0 ? Y = "red" : f[6] < 0 && (Y = "green"), y.push({ label: "涨跌", value: `${w(f[6])}%`, color: Y });
335
335
  const a = (i.value / f[1] - 1) * 100;
336
336
  let p;
337
337
  return a > 0 ? p = "red" : a < 0 && (p = "green"), y.push({ label: "至今涨幅", value: `${w(a)}%`, color: p }), y;
@@ -347,7 +347,7 @@ const dt = { class: "kline-tips" }, ft = {
347
347
  I(De, { data: m.value }, null, 8, ["data"])
348
348
  ]));
349
349
  }
350
- }, pt = /* @__PURE__ */ J(ft, [["__scopeId", "data-v-832d18ff"]]), mt = { class: "kline-averageTips" }, vt = /* @__PURE__ */ be({
350
+ }, pt = /* @__PURE__ */ J(ft, [["__scopeId", "data-v-832d18ff"]]), mt = { class: "kline-averageTips" }, vt = /* @__PURE__ */ xe({
351
351
  __name: "index",
352
352
  props: {
353
353
  // 提示数据
@@ -367,7 +367,7 @@ const dt = { class: "kline-tips" }, ft = {
367
367
  }
368
368
  });
369
369
  const yt = /* @__PURE__ */ J(vt, [["__scopeId", "data-v-2ce54548"]]);
370
- const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
370
+ const gt = { class: "klineSub" }, bt = { class: "klineSub-tips" }, xt = {
371
371
  key: 0,
372
372
  class: "klineSub-tips-select"
373
373
  }, _t = {
@@ -386,24 +386,24 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
386
386
  setup(t, { expose: w, emit: h }) {
387
387
  const { round: r } = _e;
388
388
  let i = null, e = null;
389
- const m = F(!0), s = h, d = t, f = F(), y = le({
389
+ const m = A(!0), s = h, d = t, f = A(), y = le({
390
390
  get() {
391
391
  return d.modelValue;
392
392
  },
393
393
  set(p) {
394
394
  s("update:modelValue", p);
395
395
  }
396
- }), k = le(() => {
397
- var M;
396
+ }), Y = le(() => {
397
+ var L;
398
398
  if (!m.value)
399
399
  return [];
400
400
  const { data: p, activeIndex: _ } = d;
401
- return ((M = p == null ? void 0 : p.subIndicator) == null ? void 0 : M.map((Y) => ({ label: Y.key, color: Y.color, value: Ae(Y.data[_]) }))) || [];
401
+ return ((L = p == null ? void 0 : p.subIndicator) == null ? void 0 : L.map((D) => ({ label: D.key, color: D.color, value: Ae(D.data[_]) }))) || [];
402
402
  });
403
403
  Se(() => {
404
404
  if (m.value = !0, !f.value)
405
405
  return;
406
- i = xe.init(f.value);
406
+ i = be.init(f.value);
407
407
  let p = !0;
408
408
  e = new ResizeObserver(() => {
409
409
  if (p) {
@@ -416,13 +416,13 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
416
416
  m.value = !1, i && !i.isDisposed() && (i.dispose(), i = null), e && (e.disconnect(), e = null);
417
417
  });
418
418
  const a = (p, _) => {
419
- const M = p[_], Y = _ === 0 ? p[_] : p[_ - 1];
420
- return M[0] === M[1] ? M[0] >= Y[1] ? {
419
+ const L = p[_], D = _ === 0 ? p[_] : p[_ - 1];
420
+ return L[0] === L[1] ? L[0] >= D[1] ? {
421
421
  color: "transparent",
422
422
  borderColor: "#FF0000"
423
423
  } : {
424
424
  color: "#00FFFF"
425
- } : M[1] > M[0] ? {
425
+ } : L[1] > L[0] ? {
426
426
  color: "transparent",
427
427
  borderColor: "#FF0000"
428
428
  } : {
@@ -431,14 +431,14 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
431
431
  };
432
432
  return w({
433
433
  connect: (p) => {
434
- !m.value || !i || i.isDisposed() || xe.connect([p, i]);
434
+ !m.value || !i || i.isDisposed() || be.connect([p, i]);
435
435
  },
436
436
  draw: (p, _) => {
437
437
  !m.value || !i || i.isDisposed() || ne(() => {
438
438
  if (!m.value || !i || i.isDisposed())
439
439
  return;
440
- const { startValue: M, endValue: Y, maxValueSpan: R } = p, { leftYAxisRange: $, rightYAxisRange: B } = d.data.subIndicator[0], V = d.data.subIndicator.map((x) => {
441
- if (x.series === "bar")
440
+ const { startValue: L, endValue: D, maxValueSpan: R } = p, { leftYAxisRange: $, rightYAxisRange: B } = d.data.subIndicator[0], V = d.data.subIndicator.map((b) => {
441
+ if (b.series === "bar")
442
442
  return {
443
443
  name: "subMain",
444
444
  xAxisIndex: 0,
@@ -446,10 +446,10 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
446
446
  type: "bar",
447
447
  silent: !0,
448
448
  symbol: "none",
449
- data: x.data.map((P, q) => x.seriesColor === "kline" ? {
449
+ data: b.data.map((P, q) => b.seriesColor === "kline" ? {
450
450
  value: P,
451
451
  itemStyle: a(d.data.data, q)
452
- } : x.seriesColor === "value" ? {
452
+ } : b.seriesColor === "value" ? {
453
453
  value: P,
454
454
  itemStyle: {
455
455
  color: P >= 0 ? "#FF0000" : "#00FFFF"
@@ -457,24 +457,24 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
457
457
  } : {
458
458
  value: P,
459
459
  itemStyle: {
460
- color: x.seriesColor
460
+ color: b.seriesColor
461
461
  }
462
462
  })
463
463
  };
464
- if (x.series === "line")
464
+ if (b.series === "line")
465
465
  return {
466
466
  xAxisIndex: 0,
467
- yAxisIndex: x.yAxis === "right" ? 2 : 1,
468
- name: x.key,
467
+ yAxisIndex: b.yAxis === "right" ? 2 : 1,
468
+ name: b.key,
469
469
  type: "line",
470
470
  silent: !0,
471
471
  symbol: "none",
472
- data: x.data,
472
+ data: b.data,
473
473
  lineStyle: {
474
474
  width: 1
475
475
  },
476
476
  itemStyle: {
477
- color: x.color
477
+ color: b.color
478
478
  }
479
479
  };
480
480
  });
@@ -490,8 +490,8 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
490
490
  dataZoom: [
491
491
  {
492
492
  type: "inside",
493
- startValue: M,
494
- endValue: Y,
493
+ startValue: L,
494
+ endValue: D,
495
495
  maxValueSpan: R
496
496
  }
497
497
  ],
@@ -503,11 +503,11 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
503
503
  type: "cross",
504
504
  label: {
505
505
  rich: {},
506
- formatter: (x) => {
507
- const { axisDimension: P, value: q } = x;
506
+ formatter: (b) => {
507
+ const { axisDimension: P, value: q } = b;
508
508
  if (P === "x")
509
- return ["6", "7", "8"].includes(d.cycle) ? L(q).format("YYYY-MM-DD") : q;
510
- if (x.axisIndex === 1)
509
+ return ["6", "7", "8"].includes(d.cycle) ? F(q).format("YYYY-MM-DD") : q;
510
+ if (b.axisIndex === 1)
511
511
  return String(r(q));
512
512
  }
513
513
  }
@@ -524,7 +524,7 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
524
524
  show: !1
525
525
  },
526
526
  axisLabel: {
527
- formatter: (x) => ["6", "7", "8"].includes(d.cycle) ? L(x).format("YYYY-MM-DD") : x
527
+ formatter: (b) => ["6", "7", "8"].includes(d.cycle) ? F(b).format("YYYY-MM-DD") : b
528
528
  }
529
529
  },
530
530
  yAxis: [
@@ -533,8 +533,8 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
533
533
  },
534
534
  {
535
535
  position: "left",
536
- min: $ === "cover" ? (x) => x.min : null,
537
- max: $ === "cover" ? (x) => x.max : null,
536
+ min: $ === "cover" ? (b) => b.min : null,
537
+ max: $ === "cover" ? (b) => b.max : null,
538
538
  splitNumber: 1,
539
539
  axisLine: {
540
540
  show: !0
@@ -549,8 +549,8 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
549
549
  },
550
550
  {
551
551
  position: "right",
552
- min: B === "cover" ? (x) => x.min : null,
553
- max: B === "cover" ? (x) => x.max : null,
552
+ min: B === "cover" ? (b) => b.min : null,
553
+ max: B === "cover" ? (b) => b.max : null,
554
554
  splitNumber: 1,
555
555
  axisLine: {
556
556
  show: !1
@@ -570,11 +570,11 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
570
570
  });
571
571
  }
572
572
  }), (p, _) => {
573
- const M = et, Y = tt;
573
+ const L = et, D = tt;
574
574
  return T(), E("div", gt, [
575
- K("div", xt, [
576
- k.value.length ? (T(), E("div", bt, [
577
- I(Y, {
575
+ K("div", bt, [
576
+ Y.value.length ? (T(), E("div", xt, [
577
+ I(D, {
578
578
  modelValue: y.value,
579
579
  "onUpdate:modelValue": _[0] || (_[0] = (R) => y.value = R),
580
580
  size: "small",
@@ -582,7 +582,7 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
582
582
  class: "element-dark subIndicator"
583
583
  }, {
584
584
  default: z(() => [
585
- (T(!0), E(oe, null, fe(t.subIndicatorList, (R) => (T(), Le(M, {
585
+ (T(!0), E(oe, null, fe(t.subIndicatorList, (R) => (T(), Le(L, {
586
586
  key: R.value,
587
587
  label: R.label,
588
588
  value: R.value
@@ -591,7 +591,7 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
591
591
  _: 1
592
592
  }, 8, ["modelValue"])
593
593
  ])) : G("", !0),
594
- I(yt, { data: k.value }, null, 8, ["data"])
594
+ I(yt, { data: Y.value }, null, 8, ["data"])
595
595
  ]),
596
596
  K("div", {
597
597
  class: "klineSub-chart",
@@ -601,11 +601,11 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
601
601
  ]);
602
602
  };
603
603
  }
604
- }, ht = /* @__PURE__ */ J(_t, [["__scopeId", "data-v-d720c2c7"]]), wt = /* @__PURE__ */ be({
604
+ }, ht = /* @__PURE__ */ J(_t, [["__scopeId", "data-v-d720c2c7"]]), wt = /* @__PURE__ */ xe({
605
605
  __name: "index",
606
606
  emits: ["closeContextMenuCallBack"],
607
607
  setup(t, { emit: w }) {
608
- const h = w, r = F(), i = F(), e = F({
608
+ const h = w, r = A(), i = A(), e = A({
609
609
  display: "none",
610
610
  top: "0px",
611
611
  left: "0px"
@@ -613,8 +613,8 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
613
613
  e.value.display = "none", h("closeContextMenuCallBack"), document.removeEventListener("click", m);
614
614
  }, s = (d) => {
615
615
  if (d.preventDefault(), e.value.display === "block") {
616
- const { offsetX: f, offsetY: y } = d, { offsetWidth: k, offsetHeight: a } = i.value;
617
- if (f <= k && y <= a)
616
+ const { offsetX: f, offsetY: y } = d, { offsetWidth: Y, offsetHeight: a } = i.value;
617
+ if (f <= Y && y <= a)
618
618
  return;
619
619
  }
620
620
  r.value.click(), e.value = {
@@ -647,7 +647,7 @@ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
647
647
  }
648
648
  });
649
649
  const kt = /* @__PURE__ */ J(wt, [["__scopeId", "data-v-811db6b4"]]);
650
- const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
650
+ const Te = (t) => (He("data-v-dbb75956"), t = t(), je(), t), Yt = {
651
651
  key: 0,
652
652
  class: "klineBasic-tips"
653
653
  }, Dt = {
@@ -719,7 +719,7 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
719
719
  setup(t, { expose: w, emit: h }) {
720
720
  const r = [{ label: "画线预警", key: "drawWarningLine" }];
721
721
  let i = null, e = null, m = null, s = null, d = null, f = !1, y = !1;
722
- const k = h, a = t, p = F(!1), _ = F(!1), M = F(!1), Y = F(null), R = F(null), $ = F("VOL"), B = F(0), V = F({}), x = F([]), P = F({}), q = F(!1), re = F(""), me = F([...r]), W = le(() => ({
722
+ const Y = h, a = t, p = A(!1), _ = A(!1), L = A(!1), D = A(null), R = A(null), $ = A("VOL"), B = A(0), V = A({}), b = A([]), P = A({}), q = A(!1), re = A(""), me = A([...r]), W = le(() => ({
723
723
  defaultShowCounts: 500,
724
724
  addCounts: 2e3,
725
725
  maxShowCounts: 5e3,
@@ -732,7 +732,7 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
732
732
  getFactorData: !0,
733
733
  ...a.config
734
734
  })), Ve = () => {
735
- e || (e = xe.init(Y.value), $e(), W.value.showSubChart && R.value.connect(e), i = Qe(Y.value), i.listen(() => {
735
+ e || (e = be.init(D.value), $e(), W.value.showSubChart && R.value.connect(e), i = Qe(D.value), i.listen(() => {
736
736
  requestAnimationFrame(() => {
737
737
  e == null || e.resize(), Q();
738
738
  });
@@ -748,15 +748,15 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
748
748
  });
749
749
  });
750
750
  }, Ee = (n = !1) => {
751
- var u, D, A;
751
+ var u, S, k;
752
752
  if (!e || e.isDisposed())
753
753
  return;
754
754
  const { time: o } = V.value, { defaultShowCounts: v } = W.value;
755
755
  let c = o.length - 1 - v, g = o.length - 1;
756
756
  if (n && e) {
757
- const S = e.getOption(), b = (D = (u = S == null ? void 0 : S.xAxis) == null ? void 0 : u[0]) == null ? void 0 : D.data, N = (A = S == null ? void 0 : S.dataZoom) == null ? void 0 : A[0];
758
- if (b != null && b.length && N) {
759
- const U = b[N.startValue], H = b[N.endValue];
757
+ const M = e.getOption(), x = (S = (u = M == null ? void 0 : M.xAxis) == null ? void 0 : u[0]) == null ? void 0 : S.data, N = (k = M == null ? void 0 : M.dataZoom) == null ? void 0 : k[0];
758
+ if (x != null && x.length && N) {
759
+ const U = x[N.startValue], H = x[N.endValue];
760
760
  if (U && H) {
761
761
  const ge = o.findIndex((ee) => new Date(ee).getTime() >= new Date(U).getTime()), X = o.findLastIndex((ee) => new Date(ee).getTime() <= new Date(H).getTime());
762
762
  c = ge !== -1 ? ge : 0, g = X !== -1 ? X : o.length - 1, c > g && (c = Math.max(0, g - Math.min(100, o.length - 1)));
@@ -770,20 +770,21 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
770
770
  });
771
771
  });
772
772
  }, Re = () => {
773
- var D;
773
+ var S;
774
774
  if (!W.value.showSubChart || !R.value)
775
775
  return;
776
776
  const { time: n } = V.value, { gridLeft: o, gridRight: v, maxShowCounts: c, defaultShowCounts: g } = W.value;
777
777
  let l = n.length - 1 - g, u = n.length - 1;
778
778
  if (e && !e.isDisposed()) {
779
- const A = e.getOption();
780
- if ((D = A == null ? void 0 : A.dataZoom) != null && D[0]) {
781
- const { startValue: S, endValue: b } = A.dataZoom[0];
782
- S !== void 0 && b !== void 0 && (l = S, u = b);
779
+ const k = e.getOption();
780
+ if ((S = k == null ? void 0 : k.dataZoom) != null && S[0]) {
781
+ const { startValue: M, endValue: x } = k.dataZoom[0];
782
+ M !== void 0 && x !== void 0 && (l = M, u = x);
783
783
  }
784
784
  }
785
785
  requestAnimationFrame(() => {
786
- R.value.draw({ startValue: l, endValue: u, maxValueSpan: c }, { gridLeft: o, gridRight: v });
786
+ var k;
787
+ (k = R.value) == null || k.draw({ startValue: l, endValue: u, maxValueSpan: c }, { gridLeft: o, gridRight: v });
787
788
  });
788
789
  }, Q = () => {
789
790
  e && (s && (cancelAnimationFrame(s), s = null), s = requestAnimationFrame(() => {
@@ -792,7 +793,7 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
792
793
  const o = e == null ? void 0 : e.getWidth(), v = e == null ? void 0 : e.getHeight();
793
794
  !o || !v || (e == null || e.setOption(
794
795
  {
795
- graphic: ut(e, x.value, a, W.value, () => {
796
+ graphic: ut(e, b.value, a, W.value, () => {
796
797
  se();
797
798
  })
798
799
  },
@@ -808,27 +809,27 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
808
809
  const { time: n } = V.value;
809
810
  if (!a.brushRange || !(n != null && n.length) || !e)
810
811
  return;
811
- let o = L(a.brushRange[0]).format("YYYY-MM-DD 00:00:00"), v = L(a.brushRange[1]).format("YYYY-MM-DD 23:59:59"), c = null, g = null;
812
+ let o = F(a.brushRange[0]).format("YYYY-MM-DD 00:00:00"), v = F(a.brushRange[1]).format("YYYY-MM-DD 23:59:59"), c = null, g = null;
812
813
  switch (String(a.cycle)) {
813
814
  case "6": {
814
- c = n.find((l) => L(l).format("YYYY-MM-DD") === L(o).format("YYYY-MM-DD")), g = c;
815
+ c = n.find((l) => F(l).format("YYYY-MM-DD") === F(o).format("YYYY-MM-DD")), g = c;
815
816
  break;
816
817
  }
817
818
  case "7": {
818
- c = n.find((l) => L(l).day(5).format("YYYY-MM-DD") === L(o).day(5).format("YYYY-MM-DD")), g = n.findLast((l) => L(l).day(5).format("YYYY-MM-DD") === L(v).day(5).format("YYYY-MM-DD"));
819
+ c = n.find((l) => F(l).day(5).format("YYYY-MM-DD") === F(o).day(5).format("YYYY-MM-DD")), g = n.findLast((l) => F(l).day(5).format("YYYY-MM-DD") === F(v).day(5).format("YYYY-MM-DD"));
819
820
  break;
820
821
  }
821
822
  case "8": {
822
- c = n.find((l) => L(l).endOf("month").format("YYYY-MM-DD") === L(o).endOf("month").format("YYYY-MM-DD")), g = n.findLast((l) => L(l).endOf("month").format("YYYY-MM-DD") === L(v).endOf("month").format("YYYY-MM-DD"));
823
+ c = n.find((l) => F(l).endOf("month").format("YYYY-MM-DD") === F(o).endOf("month").format("YYYY-MM-DD")), g = n.findLast((l) => F(l).endOf("month").format("YYYY-MM-DD") === F(v).endOf("month").format("YYYY-MM-DD"));
823
824
  break;
824
825
  }
825
826
  default:
826
827
  c = n.find((l) => {
827
- const u = L(l).format("YYYY-MM-DD") === L(o).format("YYYY-MM-DD"), D = new Date(l).getTime() >= new Date(o).getTime();
828
- return u && D;
828
+ const u = F(l).format("YYYY-MM-DD") === F(o).format("YYYY-MM-DD"), S = new Date(l).getTime() >= new Date(o).getTime();
829
+ return u && S;
829
830
  }), g = n.findLast((l) => {
830
- const u = L(l).format("YYYY-MM-DD") === L(v).format("YYYY-MM-DD"), D = new Date(l).getTime() <= new Date(v).getTime();
831
- return u && D;
831
+ const u = F(l).format("YYYY-MM-DD") === F(v).format("YYYY-MM-DD"), S = new Date(l).getTime() <= new Date(v).getTime();
832
+ return u && S;
832
833
  });
833
834
  }
834
835
  c && g && e.dispatchAction({
@@ -847,7 +848,7 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
847
848
  try {
848
849
  if (!a.variety || !a.cycle)
849
850
  return;
850
- const { variety: u, featureId: D, cycle: A, indicatorStore: S, mainIndicator: b, right: N, startTime: U, endTime: H } = a, { defaultShowCounts: ge, addCounts: X, showWarningLine: ee, getFactorData: ke } = W.value;
851
+ const { variety: u, featureId: S, cycle: k, indicatorStore: M, mainIndicator: x, right: N, startTime: U, endTime: H } = a, { defaultShowCounts: ge, addCounts: X, showWarningLine: ee, getFactorData: ke } = W.value;
851
852
  Ve(), e && !e.isDisposed() && e.showLoading({
852
853
  text: "加载中...",
853
854
  color: "#409eff",
@@ -857,54 +858,54 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
857
858
  });
858
859
  const Z = {
859
860
  variety: u,
860
- featureId: D,
861
- cycle: A,
862
- mainIndicatorList: S.getIndicatorParams(b),
861
+ featureId: S,
862
+ cycle: k,
863
+ mainIndicatorList: M.getIndicatorParams(x),
863
864
  subIndicator: $.value,
864
865
  right: N,
865
866
  showWarningLine: ee,
866
867
  getFactorData: ke
867
868
  };
868
- U && H ? (Z.startTime = U, Z.endTime = H) : U ? (Z.startTime = U, Z.limit = X) : H ? (Z.endTime = H, Z.limit = X) : (Z.endTime = L().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), Z.limit = X);
869
+ U && H ? (Z.startTime = U, Z.endTime = H) : U ? (Z.startTime = U, Z.limit = X) : H ? (Z.endTime = H, Z.limit = X) : (Z.endTime = F().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), Z.limit = X);
869
870
  const O = await ot(Z);
870
871
  if (!((v = (o = (n = O == null ? void 0 : O.body) == null ? void 0 : n.kline) == null ? void 0 : o.time) != null && v.length)) {
871
- _.value = !0, M.value = !1, ve();
872
+ _.value = !0, L.value = !1, ve();
872
873
  return;
873
874
  }
874
- _.value = !1, M.value = !1, V.value = (c = O == null ? void 0 : O.body) == null ? void 0 : c.kline, x.value = ((g = O == null ? void 0 : O.body) == null ? void 0 : g.warningLine) || [], await ne(), he(!1), ke && k("getFactorData", (l = O == null ? void 0 : O.body) == null ? void 0 : l.factor), ve();
875
+ _.value = !1, L.value = !1, V.value = (c = O == null ? void 0 : O.body) == null ? void 0 : c.kline, b.value = ((g = O == null ? void 0 : O.body) == null ? void 0 : g.warningLine) || [], await ne(), he(!1), ke && Y("getFactorData", (l = O == null ? void 0 : O.body) == null ? void 0 : l.factor), ve();
875
876
  } catch (u) {
876
- throw ve(), M.value = !0, _.value = !1, new Error(u);
877
+ throw ve(), L.value = !0, _.value = !1, new Error(u);
877
878
  }
878
879
  }, Ie = async (n) => {
879
- const { variety: o, cycle: v, indicatorStore: c, mainIndicator: g, right: l } = a, { addCounts: u } = W.value, { time: D } = V.value;
880
+ const { variety: o, cycle: v, indicatorStore: c, mainIndicator: g, right: l } = a, { addCounts: u } = W.value, { time: S } = V.value;
880
881
  if (n === "history") {
881
- const A = await at({
882
+ const k = await at({
882
883
  variety: o,
883
884
  cycle: v,
884
- endTime: D[0],
885
+ endTime: S[0],
885
886
  limit: u,
886
887
  mainIndicatorList: c.getIndicatorParams(g),
887
888
  subIndicator: $.value,
888
889
  right: l
889
890
  });
890
891
  V.value = {
891
- time: [...A.body.time, ...V.value.time.slice(1)],
892
- data: [...A.body.data, ...V.value.data.slice(1)],
893
- mainIndicator: V.value.mainIndicator.map((S, b) => {
892
+ time: [...k.body.time, ...V.value.time.slice(1)],
893
+ data: [...k.body.data, ...V.value.data.slice(1)],
894
+ mainIndicator: V.value.mainIndicator.map((M, x) => {
894
895
  var N;
895
896
  return {
896
- ...S,
897
- data: [...((N = A.body.mainIndicator[b]) == null ? void 0 : N.data) ?? [], ...S.data.slice(1)]
897
+ ...M,
898
+ data: [...((N = k.body.mainIndicator[x]) == null ? void 0 : N.data) ?? [], ...M.data.slice(1)]
898
899
  };
899
900
  }),
900
- subIndicator: V.value.subIndicator.map((S, b) => {
901
+ subIndicator: V.value.subIndicator.map((M, x) => {
901
902
  var N;
902
903
  return {
903
- ...S,
904
- data: [...((N = A.body.subIndicator[b]) == null ? void 0 : N.data) ?? [], ...S.data.slice(1)]
904
+ ...M,
905
+ data: [...((N = k.body.subIndicator[x]) == null ? void 0 : N.data) ?? [], ...M.data.slice(1)]
905
906
  };
906
907
  })
907
- }, console.log("触发了加载更多数据"), await ne(), he(!0), A.body.data.length < u && (y = !0, console.log("历史数据已经全部加载完毕")), f = !1;
908
+ }, console.log("触发了加载更多数据"), await ne(), he(!0), k.body.data.length < u && (y = !0, console.log("历史数据已经全部加载完毕")), f = !1;
908
909
  }
909
910
  }, we = ({ code: n, ctrlKey: o }) => {
910
911
  if (!(o || p.value))
@@ -916,13 +917,13 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
916
917
  case "ArrowUp": {
917
918
  if (u - l < 5)
918
919
  return;
919
- const D = Math.floor((u - l) / 2) + 1;
920
- l = l + D, u - l < 5 && (l = u - 4);
920
+ const S = Math.floor((u - l) / 2) + 1;
921
+ l = l + S, u - l < 5 && (l = u - 4);
921
922
  break;
922
923
  }
923
924
  case "ArrowDown": {
924
- const D = Math.min(500, u - l);
925
- l = l - D - 1;
925
+ const S = Math.min(500, u - l);
926
+ l = l - S - 1;
926
927
  break;
927
928
  }
928
929
  case "ArrowLeft": {
@@ -983,7 +984,7 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
983
984
  );
984
985
  }, se = async () => {
985
986
  const n = await it({ featureId: a.featureId });
986
- x.value = (n == null ? void 0 : n.body) || [], Q(), k("change", "warningLine", x.value);
987
+ b.value = (n == null ? void 0 : n.body) || [], Q(), Y("change", "warningLine", b.value);
987
988
  }, Ne = async (n) => {
988
989
  const { variety: o, varietyName: v, featureId: c, featureType: g } = a;
989
990
  if (n.key === "drawWarningLine") {
@@ -1004,9 +1005,9 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
1004
1005
  }
1005
1006
  }
1006
1007
  });
1007
- const D = async (A) => {
1008
- e == null || e.getZr().off("mousedown", D);
1009
- const S = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 }, A.offsetY), b = Math.round(S * 1e3) / 1e3;
1008
+ const S = async (k) => {
1009
+ e == null || e.getZr().off("mousedown", S);
1010
+ const M = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 }, k.offsetY), x = Math.round(M * 1e3) / 1e3;
1010
1011
  e == null || e.setOption({
1011
1012
  ...l,
1012
1013
  tooltip: {
@@ -1026,10 +1027,10 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
1026
1027
  featureName: v,
1027
1028
  featureId: c,
1028
1029
  featureType: g,
1029
- warnPrice: b
1030
+ warnPrice: x
1030
1031
  }), de.success("画线预警成功!"), se();
1031
1032
  };
1032
- e == null || e.getZr().on("mousedown", D);
1033
+ e == null || e.getZr().on("mousedown", S);
1033
1034
  } else
1034
1035
  n.key === "deleteWarningLine" ? (await rt({ id: P.value.id }), de.success("画线预警删除成功"), se()) : n.key === "changeWarningLine" && (q.value = !0, re.value = P.value.warnPrice);
1035
1036
  }, Oe = async () => {
@@ -1060,18 +1061,18 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
1060
1061
  m && (cancelAnimationFrame(m), m = null), s && (cancelAnimationFrame(s), s = null), e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(), i == null || i.dispose(), window.removeEventListener("keydown", we);
1061
1062
  }), w({
1062
1063
  draw: (n, o) => {
1063
- n === "warningLine" && (x.value = o, Q());
1064
+ n === "warningLine" && (b.value = o, Q());
1064
1065
  }
1065
1066
  }), (n, o) => {
1066
- var A, S;
1067
- const v = Ke, c = Ue, g = Ze, l = ze, u = qe, D = We;
1067
+ var k, M;
1068
+ const v = Ke, c = Ue, g = Ze, l = ze, u = qe, S = We;
1068
1069
  return T(), E(oe, null, [
1069
1070
  K("div", {
1070
1071
  class: "klineBasic",
1071
- onMousemove: o[1] || (o[1] = (b) => p.value = !0),
1072
- onMouseout: o[2] || (o[2] = (b) => p.value = !1)
1072
+ onMousemove: o[1] || (o[1] = (x) => p.value = !0),
1073
+ onMouseout: o[2] || (o[2] = (x) => p.value = !1)
1073
1074
  }, [
1074
- (A = V.value.time) != null && A.length ? (T(), E("div", Yt, [
1075
+ (k = V.value.time) != null && k.length ? (T(), E("div", Yt, [
1075
1076
  I(pt, {
1076
1077
  variety: t.variety,
1077
1078
  data: V.value,
@@ -1091,14 +1092,14 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
1091
1092
  borderRight: 0
1092
1093
  } }, {
1093
1094
  default: z(() => [
1094
- (T(!0), E(oe, null, fe(me.value, (b) => (T(), Le(v, {
1095
+ (T(!0), E(oe, null, fe(me.value, (x) => (T(), Le(v, {
1095
1096
  style: { height: "36px" },
1096
- key: b.key,
1097
- index: b.key,
1098
- onClick: (N) => Ne(b)
1097
+ key: x.key,
1098
+ index: x.key,
1099
+ onClick: (N) => Ne(x)
1099
1100
  }, {
1100
1101
  default: z(() => [
1101
- ue(ae(b.label), 1)
1102
+ ue(ae(x.label), 1)
1102
1103
  ]),
1103
1104
  _: 2
1104
1105
  }, 1032, ["index", "onClick"]))), 128))
@@ -1109,7 +1110,7 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
1109
1110
  default: z(() => [
1110
1111
  K("div", {
1111
1112
  ref_key: "klineBasicMainRef",
1112
- ref: Y,
1113
+ ref: D,
1113
1114
  style: { height: "100%" }
1114
1115
  }, null, 512)
1115
1116
  ]),
@@ -1121,11 +1122,11 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
1121
1122
  ref_key: "klineSubRef",
1122
1123
  ref: R,
1123
1124
  modelValue: $.value,
1124
- "onUpdate:modelValue": o[0] || (o[0] = (b) => $.value = b),
1125
+ "onUpdate:modelValue": o[0] || (o[0] = (x) => $.value = x),
1125
1126
  data: V.value,
1126
1127
  cycle: t.cycle,
1127
1128
  activeIndex: B.value,
1128
- subIndicatorList: (S = t.indicatorStore) == null ? void 0 : S.subIndicatorList
1129
+ subIndicatorList: (M = t.indicatorStore) == null ? void 0 : M.subIndicatorList
1129
1130
  }, null, 8, ["modelValue", "data", "cycle", "activeIndex", "subIndicatorList"])
1130
1131
  ])) : G("", !0),
1131
1132
  _.value ? (T(), E("div", St, [
@@ -1134,7 +1135,7 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
1134
1135
  description: "暂无数据"
1135
1136
  })
1136
1137
  ])) : G("", !0),
1137
- M.value ? (T(), E("div", Mt, [
1138
+ L.value ? (T(), E("div", Mt, [
1138
1139
  Lt,
1139
1140
  K("div", Ft, [
1140
1141
  I(l, { onClick: ye }, {
@@ -1146,9 +1147,9 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
1146
1147
  ])
1147
1148
  ])) : G("", !0)
1148
1149
  ], 32),
1149
- I(D, {
1150
+ I(S, {
1150
1151
  modelValue: q.value,
1151
- "onUpdate:modelValue": o[5] || (o[5] = (b) => q.value = b),
1152
+ "onUpdate:modelValue": o[5] || (o[5] = (x) => q.value = x),
1152
1153
  title: "画线预警-修改价格",
1153
1154
  width: "30%",
1154
1155
  "align-center": ""
@@ -1156,7 +1157,7 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
1156
1157
  footer: z(() => [
1157
1158
  K("span", Tt, [
1158
1159
  I(l, {
1159
- onClick: o[4] || (o[4] = (b) => q.value = !1)
1160
+ onClick: o[4] || (o[4] = (x) => q.value = !1)
1160
1161
  }, {
1161
1162
  default: z(() => [
1162
1163
  ue("取消")
@@ -1178,7 +1179,7 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
1178
1179
  At,
1179
1180
  I(u, {
1180
1181
  modelValue: re.value,
1181
- "onUpdate:modelValue": o[3] || (o[3] = (b) => re.value = b),
1182
+ "onUpdate:modelValue": o[3] || (o[3] = (x) => re.value = x),
1182
1183
  placeholder: "输入预警价格"
1183
1184
  }, null, 8, ["modelValue"])
1184
1185
  ]),
@@ -1187,11 +1188,11 @@ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
1187
1188
  ], 64);
1188
1189
  };
1189
1190
  }
1190
- }, Et = /* @__PURE__ */ J(Vt, [["__scopeId", "data-v-ae370bef"]]), xn = {
1191
+ }, Et = /* @__PURE__ */ J(Vt, [["__scopeId", "data-v-dbb75956"]]), bn = {
1191
1192
  install(t) {
1192
1193
  t.component("st-klineBasic", Et);
1193
1194
  }
1194
1195
  };
1195
1196
  export {
1196
- xn as default
1197
+ bn as default
1197
1198
  };