st-comp 0.0.230 → 0.0.231

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
@@ -3,15 +3,15 @@ import { E as Ie } from "./el-dialog-41ab8417.js";
3
3
  import "./el-overlay-09ad71cd.js";
4
4
  import "./el-input-2f75c4ba.js";
5
5
  import { E as Be } from "./el-input-number-5193fe6d.js";
6
- import { E as $e } from "./el-button-c95adb85.js";
7
- import { E as Oe } from "./el-empty-33cb66f1.js";
6
+ import { E as Oe } from "./el-button-c95adb85.js";
7
+ import { E as $e } from "./el-empty-33cb66f1.js";
8
8
  import { E as Pe, a as We } from "./el-menu-item-7e881203.js";
9
9
  import "./el-tooltip-4ed993c7.js";
10
10
  import "./el-popper-b4f97157.js";
11
11
  import { defineComponent as ye, ref as S, watch as G, nextTick as ge, openBlock as A, createElementBlock as E, Fragment as ee, renderList as ce, normalizeStyle as de, toDisplayString as te, computed as ne, createVNode as B, onMounted as De, onUnmounted as ke, createElementVNode as U, withCtx as K, createBlock as Me, createCommentVNode as J, renderSlot as Ye, createTextVNode as se, pushScopeId as Ne, popScopeId as qe } from "vue";
12
12
  import * as ve from "echarts";
13
13
  import { d } from "./dayjs.min-8313b006.js";
14
- import { y as Ce, v as ze, U as Ke, K as Ue, V as ae, x as be, D as He } from "./index-7ed0999e.js";
14
+ import { y as Ce, v as ze, U as Ke, K as Ue, V as oe, x as be, D as He } from "./index-7ed0999e.js";
15
15
  import { E as ue } from "./el-message-e544a8f5.js";
16
16
  import { _ as X } from "./_plugin-vue_export-helper-dad06003.js";
17
17
  import "./el-tag-66cab138.js";
@@ -47,14 +47,14 @@ const Xe = (n) => {
47
47
  }
48
48
  });
49
49
  w.get, Z = w.post;
50
- }, Ge = (n) => Z("/middleLayer/kline/getKlineBasic", { ...n, userId: ae("id") }), Je = (n) => Z("/middleLayer/kline/getKline", n), Qe = async (n) => Z("/alarm/deliversign/addAlarmPrice", { ...n, userId: ae("id") }), et = async (n) => Z("/alarm/deliversign/findAlarmPriceByUserId", { ...n, userId: ae("id") }), Se = async (n) => Z("/alarm/deliversign/updateAlarmPrice", { ...n, userId: ae("id") }), tt = async (n) => Z("/alarm/deliversign/deleteAlarmPrice", { ...n, userId: ae("id") }), { round: Q } = be, nt = (n, w, T, i, u) => {
51
- const { data: e, time: D } = n, { gridTop: c, gridRight: g, gridLeft: f, maxShowCounts: v, showSubChart: o } = w;
50
+ }, Ge = (n) => Z("/middleLayer/kline/getKlineBasic", { ...n, userId: oe("id") }), Je = (n) => Z("/middleLayer/kline/getKline", n), Qe = async (n) => Z("/alarm/deliversign/addAlarmPrice", { ...n, userId: oe("id") }), et = async (n) => Z("/alarm/deliversign/findAlarmPriceByUserId", { ...n, userId: oe("id") }), Se = async (n) => Z("/alarm/deliversign/updateAlarmPrice", { ...n, userId: oe("id") }), tt = async (n) => Z("/alarm/deliversign/deleteAlarmPrice", { ...n, userId: oe("id") }), { round: Q } = be, nt = (n, w, T, i, u) => {
51
+ const { data: e, time: D } = n, { gridTop: c, gridRight: g, gridLeft: f, maxShowCounts: v, showSubChart: a } = w;
52
52
  return {
53
53
  animation: !1,
54
54
  grid: {
55
55
  top: `${c}px`,
56
56
  right: `${g}px`,
57
- bottom: o ? "6px" : "24px",
57
+ bottom: a ? "6px" : "24px",
58
58
  left: `${f}px`
59
59
  },
60
60
  dataZoom: [
@@ -73,23 +73,23 @@ const Xe = (n) => {
73
73
  type: "cross",
74
74
  label: {
75
75
  rich: {},
76
- formatter: (a) => {
77
- const { axisDimension: b, value: x } = a;
78
- return b === "x" ? o ? "" : ["6", "7", "8"].includes(u) ? d(x).format("YYYY-MM-DD") : x : String(Q(x));
76
+ formatter: (o) => {
77
+ const { axisDimension: b, value: x } = o;
78
+ return b === "x" ? a ? "" : ["6", "7", "8"].includes(u) ? d(x).format("YYYY-MM-DD") : x : String(Q(x));
79
79
  }
80
80
  }
81
81
  },
82
82
  formatter: () => ""
83
83
  },
84
84
  xAxis: {
85
- show: !o,
85
+ show: !a,
86
86
  type: "category",
87
87
  data: D,
88
88
  splitLine: {
89
89
  show: !1
90
90
  },
91
91
  axisLabel: {
92
- formatter: (a) => ["6", "7", "8"].includes(u) ? d(a).format("YYYY-MM-DD") : a
92
+ formatter: (o) => ["6", "7", "8"].includes(u) ? d(o).format("YYYY-MM-DD") : o
93
93
  }
94
94
  },
95
95
  yAxis: {
@@ -104,8 +104,8 @@ const Xe = (n) => {
104
104
  color: "#333"
105
105
  }
106
106
  },
107
- min: (a) => Q(a.min),
108
- max: (a) => Q(a.max)
107
+ min: (o) => Q(o.min),
108
+ max: (o) => Q(o.max)
109
109
  },
110
110
  series: [
111
111
  {
@@ -119,17 +119,17 @@ const Xe = (n) => {
119
119
  borderWidth: 1
120
120
  }
121
121
  },
122
- ...n.mainIndicator.map((a) => ({
123
- name: a.key,
122
+ ...n.mainIndicator.map((o) => ({
123
+ name: o.key,
124
124
  type: "line",
125
125
  silent: !0,
126
126
  symbol: "none",
127
- data: a.data,
127
+ data: o.data,
128
128
  lineStyle: {
129
- width: a.width || 1
129
+ width: o.width || 1
130
130
  },
131
131
  itemStyle: {
132
- color: a.color
132
+ color: o.color
133
133
  }
134
134
  }))
135
135
  ],
@@ -149,24 +149,24 @@ const Xe = (n) => {
149
149
  }
150
150
  }
151
151
  };
152
- }, at = (n, w, T, i, u) => {
152
+ }, ot = (n, w, T, i, u) => {
153
153
  const { variety: e, featureId: D, featureType: c } = T, { gridTop: g, gridLeft: f, gridRight: v } = i;
154
- return w.reduce((o, a) => {
155
- const { warnPrice: b } = a, x = n == null ? void 0 : n.convertToPixel({ yAxisIndex: 0 }, b);
154
+ return w.reduce((a, o) => {
155
+ const { warnPrice: b } = o, x = n == null ? void 0 : n.convertToPixel({ yAxisIndex: 0 }, b);
156
156
  if (x <= g || x >= (n == null ? void 0 : n.getHeight()))
157
- return o;
157
+ return a;
158
158
  let V = 0;
159
159
  return [
160
- ...o,
160
+ ...a,
161
161
  {
162
162
  type: "group",
163
163
  name: "warningLine",
164
- info: a,
164
+ info: o,
165
165
  draggable: "vertical",
166
166
  children: [
167
167
  {
168
168
  type: "line",
169
- info: a,
169
+ info: o,
170
170
  shape: {
171
171
  x1: f,
172
172
  // 开始X坐标
@@ -186,7 +186,7 @@ const Xe = (n) => {
186
186
  },
187
187
  {
188
188
  type: "text",
189
- info: a,
189
+ info: o,
190
190
  x: (n == null ? void 0 : n.getWidth()) - v,
191
191
  y: x - 5,
192
192
  style: {
@@ -215,7 +215,7 @@ const Xe = (n) => {
215
215
  const L = M.offsetY - V;
216
216
  if (L !== 0) {
217
217
  const I = n == null ? void 0 : n.convertFromPixel({ yAxisIndex: 0 }, L + x), p = {
218
- id: a.id,
218
+ id: o.id,
219
219
  warnPrice: Q(I, 3),
220
220
  featureId: D,
221
221
  //品种id
@@ -230,7 +230,7 @@ const Xe = (n) => {
230
230
  }
231
231
  ];
232
232
  }, []);
233
- }, ot = /* @__PURE__ */ ye({
233
+ }, at = /* @__PURE__ */ ye({
234
234
  __name: "index",
235
235
  props: {
236
236
  // 提示数据
@@ -244,8 +244,8 @@ const Xe = (n) => {
244
244
  return G(() => w.data, () => {
245
245
  i.value.length === 0 && ge(() => {
246
246
  Array.from(T.value.children).forEach((u, e) => {
247
- var D, c, g, f, v, o, a, b;
248
- ((c = (D = w.data) == null ? void 0 : D[e]) == null ? void 0 : c.label) === "涨跌" ? i.value[e] = "85px" : ((f = (g = w.data) == null ? void 0 : g[e]) == null ? void 0 : f.label) === "至今涨幅" ? i.value[e] = "115px" : ((o = (v = w.data) == null ? void 0 : v[e]) == null ? void 0 : o.label) === "额" ? i.value[e] = "85px" : ["开", "高", "低", "收"].includes((b = (a = w.data) == null ? void 0 : a[e]) == null ? void 0 : b.label) ? i.value[e] = `${u.offsetWidth + 20}px` : i.value[e] = `${u.offsetWidth + 36}px`;
247
+ var D, c, g, f, v, a, o, b;
248
+ ((c = (D = w.data) == null ? void 0 : D[e]) == null ? void 0 : c.label) === "涨跌" ? i.value[e] = "85px" : ((f = (g = w.data) == null ? void 0 : g[e]) == null ? void 0 : f.label) === "至今涨幅" ? i.value[e] = "115px" : ((a = (v = w.data) == null ? void 0 : v[e]) == null ? void 0 : a.label) === "额" ? i.value[e] = "85px" : ["开", "高", "低", "收"].includes((b = (o = w.data) == null ? void 0 : o[e]) == null ? void 0 : b.label) ? i.value[e] = `${u.offsetWidth + 20}px` : i.value[e] = `${u.offsetWidth + 36}px`;
249
249
  });
250
250
  });
251
251
  }), (u, e) => (A(), E("div", {
@@ -261,7 +261,7 @@ const Xe = (n) => {
261
261
  ], 512));
262
262
  }
263
263
  });
264
- const we = /* @__PURE__ */ X(ot, [["__scopeId", "data-v-1ccf76bf"]]);
264
+ const we = /* @__PURE__ */ X(at, [["__scopeId", "data-v-1ccf76bf"]]);
265
265
  const lt = { class: "kline-tips" }, rt = {
266
266
  __name: "index",
267
267
  props: {
@@ -298,11 +298,11 @@ const lt = { class: "kline-tips" }, rt = {
298
298
  { label: "收", value: f[1] }
299
299
  ];
300
300
  f[4] !== null && v.push({ label: "额", value: T(f[4]) });
301
- let o;
302
- f[6] > 0 ? o = "red" : f[6] < 0 && (o = "green"), v.push({ label: "涨跌", value: `${w(f[6])}%`, color: o });
303
- const a = (u.value / f[1] - 1) * 100;
301
+ let a;
302
+ f[6] > 0 ? a = "red" : f[6] < 0 && (a = "green"), v.push({ label: "涨跌", value: `${w(f[6])}%`, color: a });
303
+ const o = (u.value / f[1] - 1) * 100;
304
304
  let b;
305
- return a > 0 ? b = "red" : a < 0 && (b = "green"), v.push({ label: "至今涨幅", value: `${w(a)}%`, color: b }), v;
305
+ return o > 0 ? b = "red" : o < 0 && (b = "green"), v.push({ label: "至今涨幅", value: `${w(o)}%`, color: b }), v;
306
306
  }
307
307
  return [];
308
308
  }), D = ne(() => {
@@ -329,12 +329,12 @@ const lt = { class: "kline-tips" }, rt = {
329
329
  (A(!0), E(ee, null, ce(n.data, (i, u) => (A(), E("div", {
330
330
  key: u,
331
331
  class: "kline-averageTips-item",
332
- style: de({ color: i.color, width: `calc(100% / ${n.data.length} - 10px)` })
332
+ style: de({ color: i.color })
333
333
  }, te(i.label) + " " + te(i.value), 5))), 128))
334
334
  ]));
335
335
  }
336
336
  });
337
- const ct = /* @__PURE__ */ X(ut, [["__scopeId", "data-v-c47865cb"]]);
337
+ const ct = /* @__PURE__ */ X(ut, [["__scopeId", "data-v-2ce54548"]]);
338
338
  const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
339
339
  key: 0,
340
340
  class: "klineSub-tips-select"
@@ -361,20 +361,20 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
361
361
  get() {
362
362
  return c.modelValue;
363
363
  },
364
- set(a) {
365
- D("update:modelValue", a);
364
+ set(o) {
365
+ D("update:modelValue", o);
366
366
  }
367
367
  }), v = ne(() => {
368
368
  var x;
369
- const { data: a, activeIndex: b } = c;
370
- return ((x = a == null ? void 0 : a.subIndicator) == null ? void 0 : x.map((V) => ({ label: V.key, color: V.color, value: V.data[b] || "-" }))) || [];
369
+ const { data: o, activeIndex: b } = c;
370
+ return ((x = o == null ? void 0 : o.subIndicator) == null ? void 0 : x.map((V) => ({ label: V.key, color: V.color, value: V.data[b] || "-" }))) || [];
371
371
  });
372
372
  De(() => {
373
373
  u = ve.init(g.value);
374
- let a = !0;
374
+ let o = !0;
375
375
  e = new ResizeObserver(() => {
376
- if (a) {
377
- a = null;
376
+ if (o) {
377
+ o = null;
378
378
  return;
379
379
  }
380
380
  u.resize();
@@ -382,8 +382,8 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
382
382
  }), ke(() => {
383
383
  u.dispose(), e.disconnect(), e = null;
384
384
  });
385
- const o = (a, b) => {
386
- const x = a[b], V = b === 0 ? a[b] : a[b - 1];
385
+ const a = (o, b) => {
386
+ const x = o[b], V = b === 0 ? o[b] : o[b - 1];
387
387
  return x[0] === x[1] ? x[0] >= V[1] ? {
388
388
  color: "transparent",
389
389
  borderColor: "#FF0000"
@@ -397,13 +397,13 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
397
397
  };
398
398
  };
399
399
  return w({
400
- connect: (a) => {
401
- ve.connect([a, u]);
400
+ connect: (o) => {
401
+ ve.connect([o, u]);
402
402
  },
403
403
  // 联动
404
- draw: (a, b) => {
404
+ draw: (o, b) => {
405
405
  ge(() => {
406
- const { startValue: x, endValue: V, maxValueSpan: M } = a, { leftYAxisRange: P, rightYAxisRange: L } = c.data.subIndicator[0], I = c.data.subIndicator.map((p) => {
406
+ const { startValue: x, endValue: V, maxValueSpan: M } = o, { leftYAxisRange: P, rightYAxisRange: L } = c.data.subIndicator[0], I = c.data.subIndicator.map((p) => {
407
407
  if (p.series === "bar")
408
408
  return {
409
409
  name: "subMain",
@@ -414,7 +414,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
414
414
  symbol: "none",
415
415
  data: p.data.map((N, C) => p.seriesColor === "kline" ? {
416
416
  value: N,
417
- itemStyle: o(c.data.data, C)
417
+ itemStyle: a(c.data.data, C)
418
418
  } : p.seriesColor === "value" ? {
419
419
  value: N,
420
420
  itemStyle: {
@@ -536,7 +536,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
536
536
  });
537
537
  }
538
538
  // 重置
539
- }), (a, b) => {
539
+ }), (o, b) => {
540
540
  const x = je, V = Ze;
541
541
  return A(), E("div", dt, [
542
542
  U("div", ft, [
@@ -580,8 +580,8 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
580
580
  e.value.display = "none", T("closeContextMenuCallBack"), document.removeEventListener("click", D);
581
581
  }, c = (g) => {
582
582
  if (g.preventDefault(), e.value.display === "block") {
583
- const { offsetX: f, offsetY: v } = g, { offsetWidth: o, offsetHeight: a } = u.value;
584
- if (f <= o && v <= a)
583
+ const { offsetX: f, offsetY: v } = g, { offsetWidth: a, offsetHeight: o } = u.value;
584
+ if (f <= a && v <= o)
585
585
  return;
586
586
  }
587
587
  i.value.click(), e.value = {
@@ -694,7 +694,7 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
694
694
  setup(n, { expose: w, emit: T }) {
695
695
  const i = [{ label: "画线预警", key: "drawWarningLine" }];
696
696
  let u = null, e = null, D, c, g = !1, f = !1;
697
- const v = T, o = n, a = S(!1), b = S(!1), x = S(!1), V = S(null), M = S(null), P = S("VOL"), L = S(0), I = S({}), p = S([]), N = S({}), C = S(!1), oe = S(""), fe = S([...i]), H = ne(() => ({
697
+ const v = T, a = n, o = S(!1), b = S(!1), x = S(!1), V = S(null), M = S(null), P = S("VOL"), L = S(0), I = S({}), p = S([]), N = S({}), C = S(!1), ae = S(""), fe = S([...i]), H = ne(() => ({
698
698
  defaultShowCounts: 500,
699
699
  // 默认展示条数
700
700
  addCounts: 2e3,
@@ -715,19 +715,19 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
715
715
  // 是否展示预警线
716
716
  getFactorData: !0,
717
717
  // 是否获取因子数据
718
- ...o.config
718
+ ...a.config
719
719
  }));
720
720
  G(
721
721
  () => {
722
722
  var r, t;
723
- return [o.variety, o.cycle, o.mainIndicator, P.value, (r = o.indicatorStore) == null ? void 0 : r.filterIndicator, (t = o.indicatorStore) == null ? void 0 : t.customIndicator];
723
+ return [a.variety, a.cycle, a.mainIndicator, P.value, (r = a.indicatorStore) == null ? void 0 : r.filterIndicator, (t = a.indicatorStore) == null ? void 0 : t.customIndicator];
724
724
  },
725
725
  () => {
726
726
  pe();
727
727
  },
728
728
  { deep: !0 }
729
729
  ), De(() => {
730
- Xe(o.env), pe(), window.addEventListener("keydown", xe);
730
+ Xe(a.env), pe(), window.addEventListener("keydown", xe);
731
731
  }), ke(() => {
732
732
  e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(), u == null || u.dispose(), window.removeEventListener("keydown", xe);
733
733
  });
@@ -738,7 +738,7 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
738
738
  });
739
739
  }));
740
740
  }, xe = ({ code: r, ctrlKey: t }) => {
741
- if (!(t || a.value))
741
+ if (!(t || o.value))
742
742
  return;
743
743
  const { xAxis: h, dataZoom: m } = e.getOption(), { data: y } = (h == null ? void 0 : h[0]) ?? { data: [] };
744
744
  let { startValue: l, endValue: s } = (m == null ? void 0 : m[0]) ?? {};
@@ -761,7 +761,7 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
761
761
  break;
762
762
  }
763
763
  case "ArrowRight": {
764
- s < y.length - 1 && (l += 1, s += 1), a.value && L.value < y.length - 1 && (L.value += 1);
764
+ s < y.length - 1 && (l += 1, s += 1), o.value && L.value < y.length - 1 && (L.value += 1);
765
765
  break;
766
766
  }
767
767
  }
@@ -772,10 +772,10 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
772
772
  }), e.dispatchAction({
773
773
  type: "updateAxisPointer",
774
774
  seriesIndex: 0,
775
- dataIndex: a.value ? L.value : null
775
+ dataIndex: o.value ? L.value : null
776
776
  }), e.dispatchAction({
777
777
  type: "highlight",
778
- dataIndex: a.value ? L.value : s
778
+ dataIndex: o.value ? L.value : s
779
779
  });
780
780
  }
781
781
  }, Ae = () => {
@@ -815,9 +815,9 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
815
815
  }, pe = async () => {
816
816
  var r, t, h, m, y, l;
817
817
  try {
818
- if (!o.variety || !o.cycle)
818
+ if (!a.variety || !a.cycle)
819
819
  return;
820
- const { variety: s, featureId: k, cycle: F, indicatorStore: Y, mainIndicator: q, right: z, startTime: j, endTime: R } = o, { defaultShowCounts: $, addCounts: _, showWarningLine: me, getFactorData: ie } = H.value, O = {
820
+ const { variety: s, featureId: k, cycle: F, indicatorStore: Y, mainIndicator: q, right: z, startTime: j, endTime: R } = a, { defaultShowCounts: O, addCounts: _, showWarningLine: me, getFactorData: ie } = H.value, $ = {
821
821
  variety: s,
822
822
  featureId: k,
823
823
  cycle: F,
@@ -827,8 +827,8 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
827
827
  showWarningLine: me,
828
828
  getFactorData: ie
829
829
  };
830
- j && R ? (O.startTime = j, O.endTime = R) : j ? (O.startTime = j, O.limit = $ + _) : R ? (O.endTime = R, O.limit = $ + _) : (O.endTime = d().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), O.limit = $ + _);
831
- const W = await Ge(O);
830
+ j && R ? ($.startTime = j, $.endTime = R) : j ? ($.startTime = j, $.limit = O + _) : R ? ($.endTime = R, $.limit = O + _) : ($.endTime = d().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), $.limit = O + _);
831
+ const W = await Ge($);
832
832
  if ((h = (t = (r = W == null ? void 0 : W.body) == null ? void 0 : r.kline) == null ? void 0 : t.time) != null && h.length)
833
833
  b.value = !1, x.value = !1;
834
834
  else {
@@ -840,7 +840,7 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
840
840
  throw x.value = !0, b.value = !1, new Error(s);
841
841
  }
842
842
  }, Fe = async (r) => {
843
- const { variety: t, cycle: h, indicatorStore: m, mainIndicator: y, right: l } = o, { addCounts: s } = H.value, { time: k } = I.value;
843
+ const { variety: t, cycle: h, indicatorStore: m, mainIndicator: y, right: l } = a, { addCounts: s } = H.value, { time: k } = I.value;
844
844
  if (r === "history") {
845
845
  const F = await Je({
846
846
  variety: t,
@@ -876,34 +876,34 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
876
876
  const { time: t } = I.value, { gridRight: h, gridLeft: m, defaultShowCounts: y, maxShowCounts: l, showSubChart: s } = H.value;
877
877
  let k = t.length - 1 - y, F = t.length - 1;
878
878
  if (r) {
879
- const R = e.getOption(), $ = (z = (q = R == null ? void 0 : R.xAxis) == null ? void 0 : q[0]) == null ? void 0 : z.data, _ = (j = R == null ? void 0 : R.dataZoom) == null ? void 0 : j[0], me = $[_ == null ? void 0 : _.startValue], ie = $[_ == null ? void 0 : _.endValue];
880
- k = t.findIndex((O) => O === me), F = t.findIndex((O) => O === ie);
879
+ const R = e.getOption(), O = (z = (q = R == null ? void 0 : R.xAxis) == null ? void 0 : q[0]) == null ? void 0 : z.data, _ = (j = R == null ? void 0 : R.dataZoom) == null ? void 0 : j[0], me = O[_ == null ? void 0 : _.startValue], ie = O[_ == null ? void 0 : _.endValue];
880
+ k = t.findIndex(($) => $ === me), F = t.findIndex(($) => $ === ie);
881
881
  }
882
- const Y = nt(I.value, H.value, k, F, o.cycle);
883
- if (e.setOption(Y, !0), L.value = F, o.brushRange) {
884
- let R = null, $ = null;
885
- switch (o.cycle) {
882
+ const Y = nt(I.value, H.value, k, F, a.cycle);
883
+ if (e.setOption(Y, !0), L.value = F, a.brushRange) {
884
+ let R = null, O = null;
885
+ switch (a.cycle) {
886
886
  case "6": {
887
- R = t.find((_) => new Date(_).getTime() >= new Date(o.brushRange[0]).getTime() || d(_).format("YYYY-MM-DD") === d(o.brushRange[0]).format("YYYY-MM-DD")), $ = t.findLast((_) => new Date(_).getTime() <= new Date(o.brushRange[1]).getTime() || d(_).format("YYYY-MM-DD") === d(o.brushRange[1]).format("YYYY-MM-DD"));
887
+ R = t.find((_) => new Date(_).getTime() >= new Date(a.brushRange[0]).getTime() || d(_).format("YYYY-MM-DD") === d(a.brushRange[0]).format("YYYY-MM-DD")), O = t.findLast((_) => new Date(_).getTime() <= new Date(a.brushRange[1]).getTime() || d(_).format("YYYY-MM-DD") === d(a.brushRange[1]).format("YYYY-MM-DD"));
888
888
  break;
889
889
  }
890
890
  case "7": {
891
- R = t.find((_) => d(_).day(5).format("YYYY-MM-DD") === d(o.brushRange[0]).day(5).format("YYYY-MM-DD")), $ = t.findLast((_) => d(_).day(5).format("YYYY-MM-DD") === d(o.brushRange[1]).day(5).format("YYYY-MM-DD"));
891
+ R = t.find((_) => d(_).day(5).format("YYYY-MM-DD") === d(a.brushRange[0]).day(5).format("YYYY-MM-DD")), O = t.findLast((_) => d(_).day(5).format("YYYY-MM-DD") === d(a.brushRange[1]).day(5).format("YYYY-MM-DD"));
892
892
  break;
893
893
  }
894
894
  case "8": {
895
- R = t.find((_) => d(_).endOf("month").format("YYYY-MM-DD") === d(o.brushRange[0]).endOf("month").format("YYYY-MM-DD")), $ = t.findLast((_) => d(_).endOf("month").format("YYYY-MM-DD") === d(o.brushRange[1]).endOf("month").format("YYYY-MM-DD"));
895
+ R = t.find((_) => d(_).endOf("month").format("YYYY-MM-DD") === d(a.brushRange[0]).endOf("month").format("YYYY-MM-DD")), O = t.findLast((_) => d(_).endOf("month").format("YYYY-MM-DD") === d(a.brushRange[1]).endOf("month").format("YYYY-MM-DD"));
896
896
  break;
897
897
  }
898
898
  default:
899
- R = t.find((_) => new Date(_).getTime() >= new Date(o.brushRange[0]).getTime()), $ = t.findLast((_) => new Date(_).getTime() <= new Date(o.brushRange[1]).getTime());
899
+ R = t.find((_) => new Date(_).getTime() >= new Date(a.brushRange[0]).getTime()), O = t.findLast((_) => new Date(_).getTime() <= new Date(a.brushRange[1]).getTime());
900
900
  }
901
- console.log(R, $), e.dispatchAction({
901
+ console.log(R, O), e.dispatchAction({
902
902
  type: "brush",
903
903
  areas: [
904
904
  {
905
905
  brushType: "lineX",
906
- coordRange: [R, $],
906
+ coordRange: [R, O],
907
907
  xAxisIndex: 0
908
908
  }
909
909
  ]
@@ -918,7 +918,7 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
918
918
  {
919
919
  ...r,
920
920
  graphic: [
921
- ...at(e, p.value, o, H.value, () => {
921
+ ...ot(e, p.value, a, H.value, () => {
922
922
  re();
923
923
  })
924
924
  ]
@@ -927,9 +927,9 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
927
927
  ), _e());
928
928
  }, _e = () => {
929
929
  const { time: r } = I.value;
930
- if (o.brushRange && (r != null && r.length)) {
931
- let t = d(o.brushRange[0]).format("YYYY-MM-DD 00:00:00"), h = d(o.brushRange[1]).format("YYYY-MM-DD 23:59:59"), m = null, y = null;
932
- switch (o.cycle) {
930
+ if (a.brushRange && (r != null && r.length)) {
931
+ let t = d(a.brushRange[0]).format("YYYY-MM-DD 00:00:00"), h = d(a.brushRange[1]).format("YYYY-MM-DD 23:59:59"), m = null, y = null;
932
+ switch (a.cycle) {
933
933
  case "6": {
934
934
  m = r.find((l) => d(l).format("YYYY-MM-DD") === d(t).format("YYYY-MM-DD")), y = m;
935
935
  break;
@@ -963,10 +963,10 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
963
963
  });
964
964
  }
965
965
  }, re = async () => {
966
- const r = await et({ featureId: o.featureId });
966
+ const r = await et({ featureId: a.featureId });
967
967
  p.value = (r == null ? void 0 : r.body) || [], le(), v("change", "warningLine", p.value);
968
968
  }, Re = async (r) => {
969
- const { variety: t, varietyName: h, featureId: m, featureType: y } = o;
969
+ const { variety: t, varietyName: h, featureId: m, featureType: y } = a;
970
970
  if (r.key === "drawWarningLine") {
971
971
  const l = e == null ? void 0 : e.getOption(), s = l.tooltip[0];
972
972
  e == null || e.setOption({
@@ -1034,9 +1034,9 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
1034
1034
  };
1035
1035
  e == null || e.getZr().on("mousedown", k);
1036
1036
  } else
1037
- r.key === "deleteWarningLine" ? (await tt({ id: N.value.id }), ue.success("画线预警删除成功"), re()) : r.key === "changeWarningLine" && (C.value = !0, oe.value = N.value.warnPrice);
1037
+ r.key === "deleteWarningLine" ? (await tt({ id: N.value.id }), ue.success("画线预警删除成功"), re()) : r.key === "changeWarningLine" && (C.value = !0, ae.value = N.value.warnPrice);
1038
1038
  }, Ve = async () => {
1039
- const { variety: r, varietyName: t, featureId: h, featureType: m } = o;
1039
+ const { variety: r, varietyName: t, featureId: h, featureType: m } = a;
1040
1040
  await Se({
1041
1041
  id: N.value.id,
1042
1042
  featureCode: r,
@@ -1047,7 +1047,7 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
1047
1047
  //品种id
1048
1048
  featureType: m,
1049
1049
  //品种类型
1050
- warnPrice: oe.value
1050
+ warnPrice: ae.value
1051
1051
  }), ue.success("画线预警修改成功"), re();
1052
1052
  }, Ee = () => {
1053
1053
  fe.value = [...i];
@@ -1058,12 +1058,12 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
1058
1058
  }
1059
1059
  }), (r, t) => {
1060
1060
  var F;
1061
- const h = Pe, m = We, y = Oe, l = $e, s = Be, k = Ie;
1061
+ const h = Pe, m = We, y = $e, l = Oe, s = Be, k = Ie;
1062
1062
  return A(), E(ee, null, [
1063
1063
  U("div", {
1064
1064
  class: "klineBasic",
1065
- onMousemove: t[1] || (t[1] = (Y) => a.value = !0),
1066
- onMouseout: t[2] || (t[2] = (Y) => a.value = !1)
1065
+ onMousemove: t[1] || (t[1] = (Y) => o.value = !0),
1066
+ onMouseout: t[2] || (t[2] = (Y) => o.value = !1)
1067
1067
  }, [
1068
1068
  U("div", bt, [
1069
1069
  B(it, {
@@ -1171,8 +1171,8 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
1171
1171
  default: K(() => [
1172
1172
  Dt,
1173
1173
  B(s, {
1174
- modelValue: oe.value,
1175
- "onUpdate:modelValue": t[3] || (t[3] = (Y) => oe.value = Y),
1174
+ modelValue: ae.value,
1175
+ "onUpdate:modelValue": t[3] || (t[3] = (Y) => ae.value = Y),
1176
1176
  placeholder: "输入预警价格"
1177
1177
  }, null, 8, ["modelValue"])
1178
1178
  ]),
@@ -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("./_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:`文本格式要求示例:
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:`文本格式要求示例:
3
3
  hc8888  热轧卷板期货指数
4
4
  sp8888  纸浆期货指数
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;
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;
@@ -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 { _ as N } from "./_plugin-vue_export-helper-dad06003.js";
8
- import { E as k } from "./el-message-e544a8f5.js";
7
+ import { E as N } from "./el-message-e544a8f5.js";
8
+ import { _ as k } from "./_plugin-vue_export-helper-dad06003.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 k.error("品种内容不可为空"), s(!1);
31
+ return N.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__ */ N(A, [["__scopeId", "data-v-445e2903"]]), ne = {
82
+ }, G = /* @__PURE__ */ k(A, [["__scopeId", "data-v-445e2903"]]), ne = {
83
83
  install(t) {
84
84
  t.component("st-varietyTextCopy", G);
85
85
  }