st-comp 0.0.246 → 0.0.248

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.
Files changed (92) hide show
  1. package/es/ChartLayout.js +4 -4
  2. package/es/CustomFunction.js +42 -42
  3. package/es/FactorWarning.js +33 -33
  4. package/es/Kline.js +17 -17
  5. package/es/KlineBasic.cjs +1 -1
  6. package/es/KlineBasic.js +520 -512
  7. package/es/KlineConfig.js +61 -61
  8. package/es/KlineNew.js +16 -16
  9. package/es/KlinePlus.cjs +4 -4
  10. package/es/KlinePlus.js +589 -575
  11. package/es/LinearLegend.cjs +1 -1
  12. package/es/LinearLegend.js +1 -63
  13. package/es/MonacoEditor.js +24 -24
  14. package/es/Pagination.js +73 -73
  15. package/es/PasswordPrompt.js +3 -3
  16. package/es/Table.js +38 -38
  17. package/es/User.js +44 -44
  18. package/es/VarSelectDialog.js +25 -25
  19. package/es/VarietyAutoComplete.js +10 -10
  20. package/es/VarietySearch.js +38 -38
  21. package/es/{VarietySelect-5a9dd50b.js → VarietySelect-b9fe3000.js} +4 -4
  22. package/es/VarietyTextCopy.cjs +3 -3
  23. package/es/VarietyTextCopy.js +15 -15
  24. package/es/VirtualTable.js +14 -14
  25. package/es/{_initCloneObject-c34c65bc.js → _initCloneObject-382335b2.js} +7 -7
  26. package/es/{base-a5af3db3.js → base-ff0e366f.js} +40 -40
  27. package/es/{castArray-7741a212.js → castArray-15070be9.js} +1 -1
  28. package/es/{config-provider-06a63185.js → config-provider-2e85eee8.js} +6 -6
  29. package/es/{debounce-8d53f4dd.js → debounce-e9e47f9a.js} +1 -1
  30. package/es/{dropdown-302f71e7.js → dropdown-2b35a683.js} +13 -13
  31. package/es/{el-autocomplete-ed75a659.js → el-autocomplete-18be2c5a.js} +16 -16
  32. package/es/{el-button-d09ff85f.js → el-button-f08c0639.js} +39 -39
  33. package/es/{el-checkbox-64648e02.js → el-checkbox-058dba2d.js} +31 -31
  34. package/es/{el-dialog-6a80e3d8.js → el-dialog-d328e0d8.js} +15 -15
  35. package/es/{el-divider-4e059794.js → el-divider-4fe55ebe.js} +1 -1
  36. package/es/{el-empty-33cb66f1.js → el-empty-ceecb81c.js} +5 -5
  37. package/es/{el-form-item-4eca95be.js → el-form-item-cb328886.js} +36 -36
  38. package/es/{el-input-cae60510.js → el-input-0f6ead19.js} +50 -50
  39. package/es/{el-input-number-c2499410.js → el-input-number-66e68609.js} +36 -36
  40. package/es/{el-loading-c738468d.js → el-loading-412370c7.js} +5 -5
  41. package/es/{el-menu-item-f904f685.js → el-menu-item-0ee8ad18.js} +22 -22
  42. package/es/{el-message-box-05d8cf39.js → el-message-box-6db52b29.js} +11 -11
  43. package/es/{el-message-0df23ae7.js → el-message-e6c755df.js} +23 -23
  44. package/es/{el-overlay-cc9bc792.js → el-overlay-981f8d49.js} +56 -56
  45. package/es/{el-popconfirm-a6f66a0e.js → el-popconfirm-005013fa.js} +20 -20
  46. package/es/{el-popper-a38874f4.js → el-popper-fdc7c793.js} +109 -109
  47. package/es/{el-segmented-51b1c797.js → el-segmented-050d0090.js} +8 -8
  48. package/es/{el-select-1b149fab.js → el-select-23a1f302.js} +64 -64
  49. package/es/{el-table-column-3e30ebae.js → el-table-column-d0c374cf.js} +15 -15
  50. package/es/{el-tag-0a25efdf.js → el-tag-f13f463b.js} +15 -15
  51. package/es/{el-text-73d899ff.js → el-text-27cef2be.js} +2 -2
  52. package/es/{index-42e59bf5.js → index-09bd2621.js} +43 -43
  53. package/es/{index-94e43e0d.js → index-15b9603e.js} +3 -3
  54. package/es/{index-960806da.js → index-269b8a8c.js} +36 -36
  55. package/es/{index-54d289d1.js → index-4a3f30c5.js} +12 -12
  56. package/es/{index-6e967429.js → index-80a7ad32.js} +17 -17
  57. package/es/{index-d77a7336.js → index-93a8960e.js} +1 -1
  58. package/es/{index-4194c942.js → index-b937ea22.js} +2 -2
  59. package/es/{index-ac98a4d8.js → index-c266c23a.js} +10 -10
  60. package/es/{index-6806997d.js → index-e0901394.js} +34 -34
  61. package/es/{index-87b4bf61.js → index-ec7ad93f.js} +31 -31
  62. package/es/{python-a914569a.js → python-823b276b.js} +24 -24
  63. package/es/raf-8e05a7f4.js +6 -0
  64. package/es/{scroll-679bd6bf.js → scroll-41b4f625.js} +5 -5
  65. package/es/style.css +1 -1
  66. package/es/{use-form-common-props-47e50c10.js → use-form-common-props-631cacae.js} +65 -65
  67. package/es/{use-global-config-f52caea0.js → use-global-config-5d001623.js} +14 -14
  68. package/es/{validator-94c04152.js → validator-4160d9e7.js} +1 -1
  69. package/es/{vnode-5ddb7ed1.js → vnode-06571d5b.js} +1 -1
  70. package/es/{zh-cn-4921961d.js → zh-cn-5df98ac2.js} +2 -2
  71. package/lib/bundle.js +1 -1
  72. package/lib/bundle.umd.cjs +162 -162
  73. package/lib/{index-2a325d42.js → index-f00d1e1f.js} +13173 -13151
  74. package/lib/{python-eb65d93b.js → python-0f34e2e6.js} +1 -1
  75. package/lib/style.css +1 -1
  76. package/package.json +1 -1
  77. package/packages/KlineBasic/components/KlineSub/index.vue +35 -15
  78. package/packages/KlineBasic/components/KlineTips/index.vue +2 -2
  79. package/packages/KlineBasic/index.vue +39 -41
  80. package/packages/KlinePlus/index.vue +88 -62
  81. package/src/App.vue +15 -4
  82. package/src/pages/KlineBasic/index.vue +7 -7
  83. package/src/pages/KlineNew/components/KlineAction/mockApi/index.js +1 -1
  84. package/src/pages/KlineNew/components/KlineBasic/utils.js +1 -1
  85. package/src/pages/KlineNew/components/KlineSlide/utils.js +1 -1
  86. package/src/pages/KlinePlus/KlineDialog/MultiCycle.vue +312 -0
  87. package/src/pages/KlinePlus/KlineDialog/api.js +108 -0
  88. package/src/pages/KlinePlus/KlineDialog/index.vue +582 -0
  89. package/src/pages/KlinePlus/KlineDialog/indicator.js +109 -0
  90. package/src/pages/KlinePlus/KlineDialog/tools.js +86 -0
  91. package/src/pages/KlinePlus/index.vue +23 -209
  92. package/es/raf-80ef0c0a.js +0 -6
package/es/KlineBasic.js CHANGED
@@ -1,68 +1,68 @@
1
- import "./base-a5af3db3.js";
2
- import { E as qe } from "./el-dialog-6a80e3d8.js";
3
- import "./el-overlay-cc9bc792.js";
4
- import "./el-input-cae60510.js";
5
- import { E as Ze } from "./el-input-number-c2499410.js";
6
- import { E as ze } from "./el-button-d09ff85f.js";
7
- import { E as Ke } from "./el-empty-33cb66f1.js";
8
- import { E as Ue, a as He } from "./el-menu-item-f904f685.js";
1
+ import "./base-ff0e366f.js";
2
+ import { E as We } from "./el-dialog-d328e0d8.js";
3
+ import "./el-overlay-981f8d49.js";
4
+ import "./el-input-0f6ead19.js";
5
+ import { E as qe } from "./el-input-number-66e68609.js";
6
+ import { E as ze } from "./el-button-f08c0639.js";
7
+ import { E as Ze } from "./el-empty-ceecb81c.js";
8
+ import { E as Ke, a as Ue } from "./el-menu-item-0ee8ad18.js";
9
9
  import "./el-tooltip-4ed993c7.js";
10
- import "./el-popper-a38874f4.js";
11
- import { defineComponent as _e, ref as F, watch as te, nextTick as oe, openBlock as A, createElementBlock as R, Fragment as ae, renderList as me, normalizeStyle as ve, toDisplayString as le, computed as ie, createVNode as B, onMounted as Me, onUnmounted as Le, createElementVNode as q, withCtx as W, createBlock as Fe, createCommentVNode as ne, renderSlot as De, createTextVNode as fe, pushScopeId as Ce, popScopeId as je } from "vue";
12
- import { d as S } from "./dayjs.min-8313b006.js";
13
- import * as be from "echarts";
14
- import { y as Xe, v as Ge, U as Je, K as Qe, V as re, x as he, D as et } from "./index-7ed0999e.js";
15
- import { E as pe } from "./el-message-0df23ae7.js";
16
- import { _ as G } from "./_plugin-vue_export-helper-dad06003.js";
17
- import "./el-tag-0a25efdf.js";
18
- import { E as tt, a as nt } from "./el-select-1b149fab.js";
10
+ import "./el-popper-fdc7c793.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";
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
+ import { E as de } from "./el-message-e6c755df.js";
16
+ import { _ as J } from "./_plugin-vue_export-helper-dad06003.js";
17
+ import "./el-tag-f13f463b.js";
18
+ import { E as et, a as tt } from "./el-select-23a1f302.js";
19
19
  import "./el-scrollbar-323542e7.js";
20
- import "./index-87b4bf61.js";
21
- import "./use-form-common-props-47e50c10.js";
22
- import "./index-960806da.js";
23
- import "./index-d77a7336.js";
20
+ import "./index-ec7ad93f.js";
21
+ import "./use-form-common-props-631cacae.js";
22
+ import "./index-269b8a8c.js";
23
+ import "./index-93a8960e.js";
24
24
  import "./index-2e331d74.js";
25
- import "./vnode-5ddb7ed1.js";
26
- import "./scroll-679bd6bf.js";
27
- import "./use-global-config-f52caea0.js";
28
- import "./index-42e59bf5.js";
25
+ import "./vnode-06571d5b.js";
26
+ import "./scroll-41b4f625.js";
27
+ import "./use-global-config-5d001623.js";
28
+ import "./index-09bd2621.js";
29
29
  import "./typescript-7ae59c4c.js";
30
- import "./index-54d289d1.js";
30
+ import "./index-4a3f30c5.js";
31
31
  import "./index-657047bb.js";
32
- import "./config-provider-06a63185.js";
33
- import "./index-6806997d.js";
34
- import "./index-94e43e0d.js";
35
- import "./castArray-7741a212.js";
36
- import "./debounce-8d53f4dd.js";
32
+ import "./config-provider-2e85eee8.js";
33
+ import "./index-e0901394.js";
34
+ import "./index-15b9603e.js";
35
+ import "./castArray-15070be9.js";
36
+ import "./debounce-e9e47f9a.js";
37
37
  let C = null;
38
- const ot = (n) => {
39
- const w = Xe(n, {
38
+ const nt = (t) => {
39
+ const w = Ce(t, {
40
40
  handleReq: (h) => {
41
- Ge() && (h.headers.token = Je());
41
+ Xe() && (h.headers.token = Ge());
42
42
  },
43
43
  handleRes: (h) => {
44
- const { data: l } = h;
45
- if (l.code === 401)
46
- return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` : Qe(), !0;
44
+ const { data: r } = h;
45
+ if (r.code === 401)
46
+ return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` : Je(), !0;
47
47
  }
48
48
  });
49
49
  w.get, C = w.post;
50
- }, at = (n) => C("/middleLayer/kline/getKlineBasic", { ...n, userId: re("id") }), lt = (n) => C("/middleLayer/kline/getKline", n), it = async (n) => C("/alarm/deliversign/addAlarmPrice", { ...n, userId: re("id") }), rt = async (n) => C("/alarm/deliversign/findAlarmPriceByUserId", { ...n, userId: re("id") }), Te = async (n) => C("/alarm/deliversign/updateAlarmPrice", { ...n, userId: re("id") }), st = async (n) => C("/alarm/deliversign/deleteAlarmPrice", { ...n, userId: re("id") }), { round: H } = he, ut = (n, w, h, l, f) => {
51
- const { data: e, time: b } = n, { gridTop: s, gridRight: x, gridLeft: p, maxShowCounts: v, showSubChart: Y } = w;
50
+ }, 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) => {
51
+ const { data: e, time: m } = t, { gridTop: s, gridRight: d, gridLeft: f, maxShowCounts: y, showSubChart: k } = w;
52
52
  return {
53
53
  animation: !1,
54
54
  grid: {
55
55
  top: `${s}px`,
56
- right: `${x}px`,
57
- bottom: Y ? "6px" : "24px",
58
- left: `${p}px`
56
+ right: `${d}px`,
57
+ bottom: k ? "6px" : "24px",
58
+ left: `${f}px`
59
59
  },
60
60
  dataZoom: [
61
61
  {
62
62
  type: "inside",
63
63
  startValue: h,
64
- endValue: l,
65
- maxValueSpan: v
64
+ endValue: r,
65
+ maxValueSpan: y
66
66
  }
67
67
  ],
68
68
  tooltip: {
@@ -74,22 +74,22 @@ const ot = (n) => {
74
74
  label: {
75
75
  rich: {},
76
76
  formatter: (a) => {
77
- const { axisDimension: _, value: i } = a;
78
- return _ === "x" ? Y ? "" : ["6", "7", "8"].includes(f) ? S(i).format("YYYY-MM-DD") : i : String(H(i));
77
+ const { axisDimension: p, value: _ } = a;
78
+ return p === "x" ? k ? "" : ["6", "7", "8"].includes(i) ? L(_).format("YYYY-MM-DD") : _ : String(j(_));
79
79
  }
80
80
  }
81
81
  },
82
82
  formatter: () => ""
83
83
  },
84
84
  xAxis: {
85
- show: !Y,
85
+ show: !k,
86
86
  type: "category",
87
- data: b,
87
+ data: m,
88
88
  splitLine: {
89
89
  show: !1
90
90
  },
91
91
  axisLabel: {
92
- formatter: (a) => ["6", "7", "8"].includes(f) ? S(a).format("YYYY-MM-DD") : a
92
+ formatter: (a) => ["6", "7", "8"].includes(i) ? L(a).format("YYYY-MM-DD") : a
93
93
  }
94
94
  },
95
95
  yAxis: {
@@ -104,8 +104,8 @@ const ot = (n) => {
104
104
  color: "#333"
105
105
  }
106
106
  },
107
- min: (a) => H(a.min),
108
- max: (a) => H(a.max)
107
+ min: (a) => j(a.min),
108
+ max: (a) => j(a.max)
109
109
  },
110
110
  series: [
111
111
  {
@@ -119,7 +119,7 @@ const ot = (n) => {
119
119
  borderWidth: 1
120
120
  }
121
121
  },
122
- ...n.mainIndicator.map((a) => ({
122
+ ...t.mainIndicator.map((a) => ({
123
123
  name: a.key,
124
124
  type: "line",
125
125
  silent: !0,
@@ -149,15 +149,15 @@ const ot = (n) => {
149
149
  }
150
150
  }
151
151
  };
152
- }, ct = (n, w, h, l, f) => {
153
- const { variety: e, featureId: b, featureType: s } = h, { gridTop: x, gridLeft: p, gridRight: v } = l;
154
- return w.reduce((Y, a) => {
155
- const { warnPrice: _ } = a, i = n == null ? void 0 : n.convertToPixel({ yAxisIndex: 0 }, _);
156
- if (i <= x || i >= (n == null ? void 0 : n.getHeight()))
157
- return Y;
152
+ }, ut = (t, w, h, r, i) => {
153
+ const { variety: e, featureId: m, featureType: s } = h, { gridTop: d, gridLeft: f, gridRight: y } = r;
154
+ return w.reduce((k, a) => {
155
+ const { warnPrice: p } = a, _ = t == null ? void 0 : t.convertToPixel({ yAxisIndex: 0 }, p);
156
+ if (_ <= d || _ >= (t == null ? void 0 : t.getHeight()))
157
+ return k;
158
158
  let M = 0;
159
159
  return [
160
- ...Y,
160
+ ...k,
161
161
  {
162
162
  type: "group",
163
163
  name: "warningLine",
@@ -168,13 +168,13 @@ const ot = (n) => {
168
168
  type: "line",
169
169
  info: a,
170
170
  shape: {
171
- x1: p,
171
+ x1: f,
172
172
  // 开始X坐标
173
- y1: i,
173
+ y1: _,
174
174
  // 开始Y坐标
175
- x2: (n == null ? void 0 : n.getWidth()) - v,
175
+ x2: (t == null ? void 0 : t.getWidth()) - y,
176
176
  // 结束X坐标
177
- y2: i
177
+ y2: _
178
178
  // 结束Y坐标
179
179
  },
180
180
  style: {
@@ -187,11 +187,11 @@ const ot = (n) => {
187
187
  {
188
188
  type: "text",
189
189
  info: a,
190
- x: (n == null ? void 0 : n.getWidth()) - v,
191
- y: i - 5,
190
+ x: (t == null ? void 0 : t.getWidth()) - y,
191
+ y: _ - 5,
192
192
  style: {
193
193
  fill: "#FFF",
194
- text: _,
194
+ text: p,
195
195
  stroke: "#000",
196
196
  lineWidth: 1,
197
197
  opacity: 1
@@ -200,65 +200,65 @@ const ot = (n) => {
200
200
  }
201
201
  ],
202
202
  // 事件:开始拖拽
203
- ondragstart: (D) => {
204
- M = D.offsetY;
203
+ ondragstart: (Y) => {
204
+ M = Y.offsetY;
205
205
  },
206
- ondrag: (D) => {
207
- var $;
208
- if (D.target && D.target.childAt(1)) {
209
- const N = n.convertFromPixel({ yAxisIndex: 0 }, i + (D.offsetY - M));
210
- ($ = D.target.childAt(1)) == null || $.animate("style", !1).when(1, { text: H(N, 3) }).start();
206
+ ondrag: (Y) => {
207
+ var R;
208
+ if (Y.target && Y.target.childAt(1)) {
209
+ const $ = t.convertFromPixel({ yAxisIndex: 0 }, _ + (Y.offsetY - M));
210
+ (R = Y.target.childAt(1)) == null || R.animate("style", !1).when(1, { text: j($, 3) }).start();
211
211
  }
212
212
  },
213
213
  // 事件:结束拖拽
214
- ondragend: async (D) => {
215
- const N = D.offsetY - M;
216
- if (N !== 0) {
217
- const z = n == null ? void 0 : n.convertFromPixel({ yAxisIndex: 0 }, N + i), g = {
214
+ ondragend: async (Y) => {
215
+ const $ = Y.offsetY - M;
216
+ if ($ !== 0) {
217
+ const B = t == null ? void 0 : t.convertFromPixel({ yAxisIndex: 0 }, $ + _), V = {
218
218
  id: a.id,
219
- warnPrice: H(z, 3),
220
- featureId: b,
219
+ warnPrice: j(B, 3),
220
+ featureId: m,
221
221
  //品种id
222
222
  featureCode: e,
223
223
  //品种代码
224
224
  featureType: s
225
225
  //品种类型
226
226
  };
227
- await Te(g), pe.success("画线预警修改成功"), f && f();
227
+ await Fe(V), de.success("画线预警修改成功"), i && i();
228
228
  }
229
229
  }
230
230
  }
231
231
  ];
232
232
  }, []);
233
233
  };
234
- function Ae(n) {
235
- function w(l) {
236
- if (typeof l == "number")
237
- return Number.isFinite(l) ? l : null;
238
- if (typeof l == "string") {
239
- const f = l.trim();
240
- if (f === "")
234
+ function Ae(t) {
235
+ function w(r) {
236
+ if (typeof r == "number")
237
+ return Number.isFinite(r) ? r : null;
238
+ if (typeof r == "string") {
239
+ const i = r.trim();
240
+ if (i === "")
241
241
  return null;
242
- const e = Number(f);
242
+ const e = Number(i);
243
243
  return Number.isFinite(e) ? e : null;
244
244
  }
245
245
  return null;
246
246
  }
247
- const h = w(n);
247
+ const h = w(t);
248
248
  if (h === null)
249
249
  return "-";
250
250
  try {
251
251
  if (h >= 1 || h <= -1)
252
- return H(h);
252
+ return j(h);
253
253
  {
254
- const l = h.toPrecision(3);
255
- return H(l, l.split(".")[1].length - 1);
254
+ const r = h.toPrecision(3);
255
+ return j(r, r.split(".")[1].length - 1);
256
256
  }
257
257
  } catch {
258
258
  return "-";
259
259
  }
260
260
  }
261
- const dt = /* @__PURE__ */ _e({
261
+ const ct = /* @__PURE__ */ be({
262
262
  __name: "index",
263
263
  props: {
264
264
  // 提示数据
@@ -267,30 +267,30 @@ const dt = /* @__PURE__ */ _e({
267
267
  require: !0
268
268
  }
269
269
  },
270
- setup(n) {
271
- const w = n, h = F(null), l = F([]);
270
+ setup(t) {
271
+ const w = t, h = F(null), r = F([]);
272
272
  return te(() => w.data, () => {
273
- l.value.length === 0 && oe(() => {
274
- Array.from(h.value.children).forEach((f, e) => {
275
- var b, s, x, p, v, Y, a, _;
276
- ((s = (b = w.data) == null ? void 0 : b[e]) == null ? void 0 : s.label) === "涨跌" ? l.value[e] = "85px" : ((p = (x = w.data) == null ? void 0 : x[e]) == null ? void 0 : p.label) === "至今涨幅" ? l.value[e] = "115px" : ((Y = (v = w.data) == null ? void 0 : v[e]) == null ? void 0 : Y.label) === "额" ? l.value[e] = "85px" : ["开", "高", "低", "收"].includes((_ = (a = w.data) == null ? void 0 : a[e]) == null ? void 0 : _.label) ? l.value[e] = `${f.offsetWidth + 24}px` : l.value[e] = `${f.offsetWidth + 36}px`;
273
+ r.value.length === 0 && ne(() => {
274
+ Array.from(h.value.children).forEach((i, e) => {
275
+ var m, s, d, f, y, k, a, p;
276
+ ((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
277
  });
278
278
  });
279
- }), (f, e) => (A(), R("div", {
279
+ }), (i, e) => (T(), E("div", {
280
280
  class: "kline-tips",
281
281
  ref_key: "tipsRef",
282
282
  ref: h
283
283
  }, [
284
- (A(!0), R(ae, null, me(n.data, (b, s) => (A(), R("div", {
284
+ (T(!0), E(oe, null, fe(t.data, (m, s) => (T(), E("div", {
285
285
  key: s,
286
286
  class: "kline-tips-item",
287
- style: ve({ color: b.color, width: l.value[s] ? l.value[s] : null })
288
- }, le(b.label) + " " + le(b.value), 5))), 128))
287
+ style: pe({ color: m.color, width: r.value[s] ? r.value[s] : null })
288
+ }, ae(m.label) + " " + ae(m.value), 5))), 128))
289
289
  ], 512));
290
290
  }
291
291
  });
292
- const Se = /* @__PURE__ */ G(dt, [["__scopeId", "data-v-096c0d10"]]);
293
- const ft = { class: "kline-tips" }, pt = {
292
+ const De = /* @__PURE__ */ J(ct, [["__scopeId", "data-v-096c0d10"]]);
293
+ const dt = { class: "kline-tips" }, ft = {
294
294
  __name: "index",
295
295
  props: {
296
296
  // 提示数据
@@ -307,43 +307,45 @@ const ft = { class: "kline-tips" }, pt = {
307
307
  default: () => null
308
308
  }
309
309
  },
310
- setup(n) {
311
- const { round: w, formatValue: h } = he, l = n, f = F(null);
312
- te(() => l.activeIndex, () => {
313
- f.value === null && (f.value = l.data.data[l.activeIndex][1]);
314
- }), te(() => l.data, () => {
315
- f.value === null && (f.value = l.data.data[l.activeIndex][1]);
316
- }), te(() => l.variety, () => {
317
- f.value = null;
310
+ setup(t) {
311
+ const { round: w, formatValue: h } = _e, r = t, i = F(null);
312
+ te(() => r.activeIndex, () => {
313
+ var s;
314
+ i.value === null && (i.value = ((s = r.data.data[r.activeIndex]) == null ? void 0 : s[1]) ?? 0);
315
+ }), te(() => r.data, () => {
316
+ var s;
317
+ i.value === null && (i.value = ((s = r.data.data[r.activeIndex]) == null ? void 0 : s[1]) ?? 0);
318
+ }), te(() => r.variety, () => {
319
+ i.value = null;
318
320
  });
319
- const e = ie(() => {
320
- const { data: s, activeIndex: x } = l;
321
- if (s.data && s.data[x]) {
322
- const p = s.data[x], v = [
323
- { label: "开", value: p[0] },
324
- { label: "高", value: p[3] },
325
- { label: "低", value: p[2] },
326
- { label: "收", value: p[1] }
321
+ const e = le(() => {
322
+ const { data: s, activeIndex: d } = r;
323
+ if (s.data && s.data[d]) {
324
+ const f = s.data[d], y = [
325
+ { label: "开", value: f[0] },
326
+ { label: "高", value: f[3] },
327
+ { label: "低", value: f[2] },
328
+ { label: "收", value: f[1] }
327
329
  ];
328
- p[4] !== null && v.push({ label: "额", value: h(p[4]) });
329
- let Y;
330
- p[6] > 0 ? Y = "red" : p[6] < 0 && (Y = "green"), v.push({ label: "涨跌", value: `${w(p[6])}%`, color: Y });
331
- const a = (f.value / p[1] - 1) * 100;
332
- let _;
333
- return a > 0 ? _ = "red" : a < 0 && (_ = "green"), v.push({ label: "至今涨幅", value: `${w(a)}%`, color: _ }), v;
330
+ f[4] !== null && y.push({ label: "额", value: h(f[4]) });
331
+ let k;
332
+ f[6] > 0 ? k = "red" : f[6] < 0 && (k = "green"), y.push({ label: "涨跌", value: `${w(f[6])}%`, color: k });
333
+ const a = (i.value / f[1] - 1) * 100;
334
+ let p;
335
+ return a > 0 ? p = "red" : a < 0 && (p = "green"), y.push({ label: "至今涨幅", value: `${w(a)}%`, color: p }), y;
334
336
  }
335
337
  return [];
336
- }), b = ie(() => {
337
- var p;
338
- const { data: s, activeIndex: x } = l;
339
- return ((p = s == null ? void 0 : s.mainIndicator) == null ? void 0 : p.map((v) => ({ label: v.key, value: Ae(v.data[x]), color: v.color }))) || [];
338
+ }), m = le(() => {
339
+ var f;
340
+ const { data: s, activeIndex: d } = r;
341
+ return ((f = s == null ? void 0 : s.mainIndicator) == null ? void 0 : f.map((y) => ({ label: y.key, value: Ae(y.data[d]), color: y.color }))) || [];
340
342
  });
341
- return (s, x) => (A(), R("div", ft, [
342
- B(Se, { data: e.value }, null, 8, ["data"]),
343
- B(Se, { data: b.value }, null, 8, ["data"])
343
+ return (s, d) => (T(), E("div", dt, [
344
+ I(De, { data: e.value }, null, 8, ["data"]),
345
+ I(De, { data: m.value }, null, 8, ["data"])
344
346
  ]));
345
347
  }
346
- }, mt = /* @__PURE__ */ G(pt, [["__scopeId", "data-v-5be4d504"]]), vt = { class: "kline-averageTips" }, gt = /* @__PURE__ */ _e({
348
+ }, pt = /* @__PURE__ */ J(ft, [["__scopeId", "data-v-832d18ff"]]), mt = { class: "kline-averageTips" }, vt = /* @__PURE__ */ be({
347
349
  __name: "index",
348
350
  props: {
349
351
  // 提示数据
@@ -352,72 +354,73 @@ const ft = { class: "kline-tips" }, pt = {
352
354
  require: !0
353
355
  }
354
356
  },
355
- setup(n) {
356
- return (w, h) => (A(), R("div", vt, [
357
- (A(!0), R(ae, null, me(n.data, (l, f) => (A(), R("div", {
358
- key: f,
357
+ setup(t) {
358
+ return (w, h) => (T(), E("div", mt, [
359
+ (T(!0), E(oe, null, fe(t.data, (r, i) => (T(), E("div", {
360
+ key: i,
359
361
  class: "kline-averageTips-item",
360
- style: ve({ color: l.color })
361
- }, le(l.label) + " " + le(l.value), 5))), 128))
362
+ style: pe({ color: r.color })
363
+ }, ae(r.label) + " " + ae(r.value), 5))), 128))
362
364
  ]));
363
365
  }
364
366
  });
365
- const yt = /* @__PURE__ */ G(gt, [["__scopeId", "data-v-2ce54548"]]);
366
- const xt = { class: "klineSub" }, bt = { class: "klineSub-tips" }, _t = {
367
+ const yt = /* @__PURE__ */ J(vt, [["__scopeId", "data-v-2ce54548"]]);
368
+ const gt = { class: "klineSub" }, xt = { class: "klineSub-tips" }, bt = {
367
369
  key: 0,
368
370
  class: "klineSub-tips-select"
369
- }, ht = {
371
+ }, _t = {
370
372
  __name: "index",
371
373
  props: {
372
374
  cycle: {
373
375
  type: [String, Number],
374
376
  default: () => null
375
377
  },
376
- // 周期id
377
378
  data: { type: Object, require: !0 },
378
379
  activeIndex: { type: [Number, String], require: !0 },
379
380
  modelValue: { type: String, required: !0 },
380
- // 副图指标
381
381
  subIndicatorList: { type: Array, required: !0 }
382
- // 副图指标列表
383
382
  },
384
383
  emits: ["update:modelValue"],
385
- setup(n, { expose: w, emit: h }) {
386
- const { round: l } = he;
387
- let f, e;
388
- const b = h, s = n, x = F(), p = ie({
384
+ setup(t, { expose: w, emit: h }) {
385
+ const { round: r } = _e;
386
+ let i = null, e = null;
387
+ const m = F(!0), s = h, d = t, f = F(), y = le({
389
388
  get() {
390
- return s.modelValue;
389
+ return d.modelValue;
391
390
  },
392
- set(a) {
393
- b("update:modelValue", a);
391
+ set(p) {
392
+ s("update:modelValue", p);
394
393
  }
395
- }), v = ie(() => {
396
- var i;
397
- const { data: a, activeIndex: _ } = s;
398
- return ((i = a == null ? void 0 : a.subIndicator) == null ? void 0 : i.map((M) => ({ label: M.key, color: M.color, value: Ae(M.data[_]) }))) || [];
394
+ }), k = le(() => {
395
+ var M;
396
+ if (!m.value)
397
+ return [];
398
+ const { data: p, activeIndex: _ } = d;
399
+ return ((M = p == null ? void 0 : p.subIndicator) == null ? void 0 : M.map((Y) => ({ label: Y.key, color: Y.color, value: Ae(Y.data[_]) }))) || [];
399
400
  });
400
- Me(() => {
401
- f = be.init(x.value);
402
- let a = !0;
401
+ Se(() => {
402
+ if (m.value = !0, !f.value)
403
+ return;
404
+ i = xe.init(f.value);
405
+ let p = !0;
403
406
  e = new ResizeObserver(() => {
404
- if (a) {
405
- a = null;
407
+ if (p) {
408
+ p = !1;
406
409
  return;
407
410
  }
408
- f.resize();
409
- }), e.observe(x.value);
410
- }), Le(() => {
411
- f.dispose(), e.disconnect(), e = null;
411
+ m.value && i && !i.isDisposed() && i.resize();
412
+ }), e.observe(f.value);
413
+ }), Me(() => {
414
+ m.value = !1, i && !i.isDisposed() && (i.dispose(), i = null), e && (e.disconnect(), e = null);
412
415
  });
413
- const Y = (a, _) => {
414
- const i = a[_], M = _ === 0 ? a[_] : a[_ - 1];
415
- return i[0] === i[1] ? i[0] >= M[1] ? {
416
+ const a = (p, _) => {
417
+ const M = p[_], Y = _ === 0 ? p[_] : p[_ - 1];
418
+ return M[0] === M[1] ? M[0] >= Y[1] ? {
416
419
  color: "transparent",
417
420
  borderColor: "#FF0000"
418
421
  } : {
419
422
  color: "#00FFFF"
420
- } : i[1] > i[0] ? {
423
+ } : M[1] > M[0] ? {
421
424
  color: "transparent",
422
425
  borderColor: "#FF0000"
423
426
  } : {
@@ -425,14 +428,15 @@ const xt = { class: "klineSub" }, bt = { class: "klineSub-tips" }, _t = {
425
428
  };
426
429
  };
427
430
  return w({
428
- connect: (a) => {
429
- be.connect([a, f]);
431
+ connect: (p) => {
432
+ !m.value || !i || i.isDisposed() || xe.connect([p, i]);
430
433
  },
431
- // 联动
432
- draw: (a, _) => {
433
- oe(() => {
434
- const { startValue: i, endValue: M, maxValueSpan: D } = a, { leftYAxisRange: $, rightYAxisRange: N } = s.data.subIndicator[0], z = s.data.subIndicator.map((g) => {
435
- if (g.series === "bar")
434
+ draw: (p, _) => {
435
+ !m.value || !i || i.isDisposed() || ne(() => {
436
+ if (!m.value || !i || i.isDisposed())
437
+ return;
438
+ const { startValue: M, endValue: Y, maxValueSpan: R } = p, { leftYAxisRange: $, rightYAxisRange: B } = d.data.subIndicator[0], V = d.data.subIndicator.map((x) => {
439
+ if (x.series === "bar")
436
440
  return {
437
441
  name: "subMain",
438
442
  xAxisIndex: 0,
@@ -440,39 +444,39 @@ const xt = { class: "klineSub" }, bt = { class: "klineSub-tips" }, _t = {
440
444
  type: "bar",
441
445
  silent: !0,
442
446
  symbol: "none",
443
- data: g.data.map((V, T) => g.seriesColor === "kline" ? {
444
- value: V,
445
- itemStyle: Y(s.data.data, T)
446
- } : g.seriesColor === "value" ? {
447
- value: V,
447
+ data: x.data.map((P, q) => x.seriesColor === "kline" ? {
448
+ value: P,
449
+ itemStyle: a(d.data.data, q)
450
+ } : x.seriesColor === "value" ? {
451
+ value: P,
448
452
  itemStyle: {
449
- color: V >= 0 ? "#FF0000" : "#00FFFF"
453
+ color: P >= 0 ? "#FF0000" : "#00FFFF"
450
454
  }
451
455
  } : {
452
- value: V,
456
+ value: P,
453
457
  itemStyle: {
454
- color: g.seriesColor
458
+ color: x.seriesColor
455
459
  }
456
460
  })
457
461
  };
458
- if (g.series === "line")
462
+ if (x.series === "line")
459
463
  return {
460
464
  xAxisIndex: 0,
461
- yAxisIndex: g.yAxis === "right" ? 2 : 1,
462
- name: g.key,
465
+ yAxisIndex: x.yAxis === "right" ? 2 : 1,
466
+ name: x.key,
463
467
  type: "line",
464
468
  silent: !0,
465
469
  symbol: "none",
466
- data: g.data,
470
+ data: x.data,
467
471
  lineStyle: {
468
472
  width: 1
469
473
  },
470
474
  itemStyle: {
471
- color: g.color
475
+ color: x.color
472
476
  }
473
477
  };
474
478
  });
475
- f.setOption(
479
+ i.setOption(
476
480
  {
477
481
  animation: !1,
478
482
  grid: {
@@ -484,9 +488,9 @@ const xt = { class: "klineSub" }, bt = { class: "klineSub-tips" }, _t = {
484
488
  dataZoom: [
485
489
  {
486
490
  type: "inside",
487
- startValue: i,
488
- endValue: M,
489
- maxValueSpan: D
491
+ startValue: M,
492
+ endValue: Y,
493
+ maxValueSpan: R
490
494
  }
491
495
  ],
492
496
  tooltip: {
@@ -497,12 +501,12 @@ const xt = { class: "klineSub" }, bt = { class: "klineSub-tips" }, _t = {
497
501
  type: "cross",
498
502
  label: {
499
503
  rich: {},
500
- formatter: (g) => {
501
- const { axisDimension: V, value: T } = g;
502
- if (V === "x")
503
- return ["6", "7", "8"].includes(s.cycle) ? S(T).format("YYYY-MM-DD") : T;
504
- if (g.axisIndex === 1)
505
- return String(l(T));
504
+ formatter: (x) => {
505
+ const { axisDimension: P, value: q } = x;
506
+ if (P === "x")
507
+ return ["6", "7", "8"].includes(d.cycle) ? L(q).format("YYYY-MM-DD") : q;
508
+ if (x.axisIndex === 1)
509
+ return String(r(q));
506
510
  }
507
511
  }
508
512
  },
@@ -510,7 +514,7 @@ const xt = { class: "klineSub" }, bt = { class: "klineSub-tips" }, _t = {
510
514
  },
511
515
  xAxis: {
512
516
  type: "category",
513
- data: s.data.time,
517
+ data: d.data.time,
514
518
  axisLine: {
515
519
  show: !0
516
520
  },
@@ -518,7 +522,7 @@ const xt = { class: "klineSub" }, bt = { class: "klineSub-tips" }, _t = {
518
522
  show: !1
519
523
  },
520
524
  axisLabel: {
521
- formatter: (g) => ["6", "7", "8"].includes(s.cycle) ? S(g).format("YYYY-MM-DD") : g
525
+ formatter: (x) => ["6", "7", "8"].includes(d.cycle) ? L(x).format("YYYY-MM-DD") : x
522
526
  }
523
527
  },
524
528
  yAxis: [
@@ -527,8 +531,8 @@ const xt = { class: "klineSub" }, bt = { class: "klineSub-tips" }, _t = {
527
531
  },
528
532
  {
529
533
  position: "left",
530
- min: $ === "cover" ? (g) => g.min : null,
531
- max: $ === "cover" ? (g) => g.max : null,
534
+ min: $ === "cover" ? (x) => x.min : null,
535
+ max: $ === "cover" ? (x) => x.max : null,
532
536
  splitNumber: 1,
533
537
  axisLine: {
534
538
  show: !0
@@ -543,8 +547,8 @@ const xt = { class: "klineSub" }, bt = { class: "klineSub-tips" }, _t = {
543
547
  },
544
548
  {
545
549
  position: "right",
546
- min: N === "cover" ? (g) => g.min : null,
547
- max: N === "cover" ? (g) => g.max : null,
550
+ min: B === "cover" ? (x) => x.min : null,
551
+ max: B === "cover" ? (x) => x.max : null,
548
552
  splitNumber: 1,
549
553
  axisLine: {
550
554
  show: !1
@@ -557,101 +561,103 @@ const xt = { class: "klineSub" }, bt = { class: "klineSub-tips" }, _t = {
557
561
  }
558
562
  }
559
563
  ],
560
- series: z
564
+ series: V
561
565
  },
562
566
  !0
563
567
  );
564
568
  });
565
569
  }
566
- // 重置
567
- }), (a, _) => {
568
- const i = tt, M = nt;
569
- return A(), R("div", xt, [
570
- q("div", bt, [
571
- v.value.length ? (A(), R("div", _t, [
572
- B(M, {
573
- modelValue: p.value,
574
- "onUpdate:modelValue": _[0] || (_[0] = (D) => p.value = D),
570
+ }), (p, _) => {
571
+ const M = et, Y = tt;
572
+ return T(), E("div", gt, [
573
+ K("div", xt, [
574
+ k.value.length ? (T(), E("div", bt, [
575
+ I(Y, {
576
+ modelValue: y.value,
577
+ "onUpdate:modelValue": _[0] || (_[0] = (R) => y.value = R),
575
578
  size: "small",
576
579
  "popper-class": "element-dark",
577
580
  class: "element-dark subIndicator"
578
581
  }, {
579
- default: W(() => [
580
- (A(!0), R(ae, null, me(n.subIndicatorList, (D) => (A(), Fe(i, {
581
- key: D.value,
582
- label: D.label,
583
- value: D.value
582
+ default: z(() => [
583
+ (T(!0), E(oe, null, fe(t.subIndicatorList, (R) => (T(), Le(M, {
584
+ key: R.value,
585
+ label: R.label,
586
+ value: R.value
584
587
  }, null, 8, ["label", "value"]))), 128))
585
588
  ]),
586
589
  _: 1
587
590
  }, 8, ["modelValue"])
588
- ])) : ne("", !0),
589
- B(yt, { data: v.value }, null, 8, ["data"])
591
+ ])) : G("", !0),
592
+ I(yt, { data: k.value }, null, 8, ["data"])
590
593
  ]),
591
- q("div", {
594
+ K("div", {
592
595
  class: "klineSub-chart",
593
596
  ref_key: "subChartRef",
594
- ref: x
597
+ ref: f
595
598
  }, null, 512)
596
599
  ]);
597
600
  };
598
601
  }
599
- }, wt = /* @__PURE__ */ G(ht, [["__scopeId", "data-v-a6bfe8fe"]]), kt = /* @__PURE__ */ _e({
602
+ }, ht = /* @__PURE__ */ J(_t, [["__scopeId", "data-v-d720c2c7"]]), wt = /* @__PURE__ */ be({
600
603
  __name: "index",
601
604
  emits: ["closeContextMenuCallBack"],
602
- setup(n, { emit: w }) {
603
- const h = w, l = F(), f = F(), e = F({
605
+ setup(t, { emit: w }) {
606
+ const h = w, r = F(), i = F(), e = F({
604
607
  display: "none",
605
608
  top: "0px",
606
609
  left: "0px"
607
- }), b = () => {
608
- e.value.display = "none", h("closeContextMenuCallBack"), document.removeEventListener("click", b);
609
- }, s = (x) => {
610
- if (x.preventDefault(), e.value.display === "block") {
611
- const { offsetX: p, offsetY: v } = x, { offsetWidth: Y, offsetHeight: a } = f.value;
612
- if (p <= Y && v <= a)
610
+ }), m = () => {
611
+ e.value.display = "none", h("closeContextMenuCallBack"), document.removeEventListener("click", m);
612
+ }, s = (d) => {
613
+ if (d.preventDefault(), e.value.display === "block") {
614
+ const { offsetX: f, offsetY: y } = d, { offsetWidth: k, offsetHeight: a } = i.value;
615
+ if (f <= k && y <= a)
613
616
  return;
614
617
  }
615
- l.value.click(), e.value = {
618
+ r.value.click(), e.value = {
616
619
  display: "block",
617
- top: `${x.offsetY}px`,
618
- left: `${x.offsetX}px`
619
- }, oe(() => {
620
- const p = l.value.getBoundingClientRect(), v = f.value.getBoundingClientRect();
621
- v.left + v.width >= p.right && (e.value.left = `${x.offsetX - v.width}px`), v.top + v.height >= p.bottom && (console.log("高度超出"), e.value.top = `${x.offsetY - v.height}px`);
622
- }), document.addEventListener("click", b);
620
+ top: `${d.offsetY}px`,
621
+ left: `${d.offsetX}px`
622
+ }, ne(() => {
623
+ const f = r.value.getBoundingClientRect(), y = i.value.getBoundingClientRect();
624
+ y.left + y.width >= f.right && (e.value.left = `${d.offsetX - y.width}px`), y.top + y.height >= f.bottom && (console.log("高度超出"), e.value.top = `${d.offsetY - y.height}px`);
625
+ }), document.addEventListener("click", m);
623
626
  };
624
- return (x, p) => (A(), R("div", {
627
+ return (d, f) => (T(), E("div", {
625
628
  ref_key: "contextmenuRef",
626
- ref: l,
629
+ ref: r,
627
630
  class: "contextmenu",
628
631
  onContextmenu: s,
629
- onMouseleave: b
632
+ onMouseleave: m
630
633
  }, [
631
- De(x.$slots, "default", {}, void 0, !0),
632
- e.value.display !== "none" ? (A(), R("div", {
634
+ Ye(d.$slots, "default", {}, void 0, !0),
635
+ e.value.display !== "none" ? (T(), E("div", {
633
636
  key: 0,
634
637
  ref_key: "contextmenuContentRef",
635
- ref: f,
638
+ ref: i,
636
639
  class: "contextmenu-popover",
637
- style: ve(e.value)
640
+ style: pe(e.value)
638
641
  }, [
639
- De(x.$slots, "popover", {}, void 0, !0)
640
- ], 4)) : ne("", !0)
642
+ Ye(d.$slots, "popover", {}, void 0, !0)
643
+ ], 4)) : G("", !0)
641
644
  ], 544));
642
645
  }
643
646
  });
644
- const Yt = /* @__PURE__ */ G(kt, [["__scopeId", "data-v-811db6b4"]]);
645
- const Ve = (n) => (Ce("data-v-8efc10f3"), n = n(), je(), n), Dt = { class: "klineBasic-tips" }, St = {
647
+ const kt = /* @__PURE__ */ J(wt, [["__scopeId", "data-v-811db6b4"]]);
648
+ const Te = (t) => (He("data-v-ae370bef"), t = t(), je(), t), Yt = {
646
649
  key: 0,
647
- class: "klineBasic-sub"
648
- }, Mt = {
650
+ class: "klineBasic-tips"
651
+ }, Dt = {
649
652
  key: 1,
650
- class: "klineBasic-empty"
651
- }, Lt = {
653
+ class: "klineBasic-sub"
654
+ }, St = {
652
655
  key: 2,
656
+ class: "klineBasic-empty"
657
+ }, Mt = {
658
+ key: 3,
653
659
  class: "klineBasic-error"
654
- }, Ft = /* @__PURE__ */ Ve(() => /* @__PURE__ */ q("div", { class: "klineBasic-error-content" }, "加载失败,请刷新重试", -1)), Tt = { style: { "text-align": "center" } }, At = /* @__PURE__ */ Ve(() => /* @__PURE__ */ q("span", { style: { "margin-right": "10px" } }, "预警价格:", -1)), Vt = { class: "dialog-footer" }, Et = {
660
+ }, Lt = /* @__PURE__ */ Te(() => /* @__PURE__ */ K("div", { class: "klineBasic-error-content" }, "加载失败,请刷新重试", -1)), Ft = { style: { "text-align": "center" } }, At = /* @__PURE__ */ Te(() => /* @__PURE__ */ K("span", { style: { "margin-right": "10px" } }, "预警价格:", -1)), Tt = { class: "dialog-footer" }, Vt = {
655
661
  __name: "index",
656
662
  props: {
657
663
  variety: {
@@ -708,84 +714,84 @@ const Ve = (n) => (Ce("data-v-8efc10f3"), n = n(), je(), n), Dt = { class: "klin
708
714
  }
709
715
  },
710
716
  emits: ["change", "getFactorData"],
711
- setup(n, { expose: w, emit: h }) {
712
- const l = [{ label: "画线预警", key: "drawWarningLine" }];
713
- let f = null, e = null, b = null, s = null, x = null, p, v, Y = !1, a = !1;
714
- const _ = h, i = n, M = F(!1), D = F(!1), $ = F(!1), N = F(null), z = F(null), g = F("VOL"), V = F(0), T = F({}), J = F([]), se = F({}), ue = F(!1), ce = F(""), ge = F([...l]), O = ie(() => ({
717
+ setup(t, { expose: w, emit: h }) {
718
+ const r = [{ label: "画线预警", key: "drawWarningLine" }];
719
+ let i = null, e = null, m = null, s = null, d = null, f = !1, y = !1;
720
+ 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(() => ({
715
721
  defaultShowCounts: 500,
716
722
  addCounts: 2e3,
717
723
  maxShowCounts: 5e3,
718
724
  loadCheckCounts: 500,
719
- showSubChart: !0,
720
725
  gridTop: 48,
721
726
  gridLeft: 80,
722
727
  gridRight: 50,
728
+ showSubChart: !0,
723
729
  showWarningLine: !0,
724
730
  getFactorData: !0,
725
- ...i.config
726
- })), Ee = () => {
727
- e || (e = be.init(N.value), Ne(), O.value.showSubChart && z.value.connect(e), f = et(N.value), f.listen(() => {
731
+ ...a.config
732
+ })), Ve = () => {
733
+ e || (e = xe.init(Y.value), $e(), W.value.showSubChart && R.value.connect(e), i = Qe(Y.value), i.listen(() => {
728
734
  requestAnimationFrame(() => {
729
735
  e == null || e.resize(), Q();
730
736
  });
731
737
  }));
732
- }, ye = () => {
738
+ }, ve = () => {
733
739
  e && !e.isDisposed() && e.hideLoading();
734
- }, we = (r = !1) => {
735
- b && (cancelAnimationFrame(b), b = null), b = requestAnimationFrame(() => {
736
- Re(r), b = requestAnimationFrame(() => {
737
- Be(), b = requestAnimationFrame(() => {
738
- Q(), b = null;
740
+ }, he = (n = !1) => {
741
+ m && (cancelAnimationFrame(m), m = null), m = requestAnimationFrame(() => {
742
+ Ee(n), m = requestAnimationFrame(() => {
743
+ Re(), m = requestAnimationFrame(() => {
744
+ Q(), m = null;
739
745
  });
740
746
  });
741
747
  });
742
- }, Re = (r = !1) => {
743
- var u, k, L;
748
+ }, Ee = (n = !1) => {
749
+ var u, D, A;
744
750
  if (!e || e.isDisposed())
745
751
  return;
746
- const { time: t } = T.value, { defaultShowCounts: y } = O.value;
747
- let c = t.length - 1 - y, d = t.length - 1;
748
- if (r && e) {
749
- const m = e.getOption(), E = (k = (u = m == null ? void 0 : m.xAxis) == null ? void 0 : u[0]) == null ? void 0 : k.data, P = (L = m == null ? void 0 : m.dataZoom) == null ? void 0 : L[0];
750
- if (E != null && E.length && P) {
751
- const K = E[P.startValue], U = E[P.endValue];
752
- if (K && U) {
753
- const j = t.findIndex((ee) => new Date(ee).getTime() >= new Date(K).getTime()), X = t.findLastIndex((ee) => new Date(ee).getTime() <= new Date(U).getTime());
754
- c = j !== -1 ? j : 0, d = X !== -1 ? X : t.length - 1, c > d && (c = Math.max(0, d - Math.min(100, t.length - 1)));
752
+ const { time: o } = V.value, { defaultShowCounts: v } = W.value;
753
+ let c = o.length - 1 - v, g = o.length - 1;
754
+ if (n && e) {
755
+ 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];
756
+ if (b != null && b.length && N) {
757
+ const U = b[N.startValue], H = b[N.endValue];
758
+ if (U && H) {
759
+ 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());
760
+ 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)));
755
761
  }
756
762
  }
757
763
  }
758
- const o = ut(T.value, O.value, c, d, i.cycle);
764
+ const l = st(V.value, W.value, c, g, a.cycle);
759
765
  requestAnimationFrame(() => {
760
- e == null || e.setOption(o, !0), V.value = d, requestAnimationFrame(() => {
761
- Ie();
766
+ e == null || e.setOption(l, !0), B.value = g, requestAnimationFrame(() => {
767
+ Be();
762
768
  });
763
769
  });
764
- }, Be = () => {
765
- var k;
766
- if (!O.value.showSubChart || !z.value)
770
+ }, Re = () => {
771
+ var D;
772
+ if (!W.value.showSubChart || !R.value)
767
773
  return;
768
- const { time: r } = T.value, { gridLeft: t, gridRight: y, maxShowCounts: c, defaultShowCounts: d } = O.value;
769
- let o = r.length - 1 - d, u = r.length - 1;
774
+ const { time: n } = V.value, { gridLeft: o, gridRight: v, maxShowCounts: c, defaultShowCounts: g } = W.value;
775
+ let l = n.length - 1 - g, u = n.length - 1;
770
776
  if (e && !e.isDisposed()) {
771
- const L = e.getOption();
772
- if ((k = L == null ? void 0 : L.dataZoom) != null && k[0]) {
773
- const { startValue: m, endValue: E } = L.dataZoom[0];
774
- m !== void 0 && E !== void 0 && (o = m, u = E);
777
+ const A = e.getOption();
778
+ if ((D = A == null ? void 0 : A.dataZoom) != null && D[0]) {
779
+ const { startValue: S, endValue: b } = A.dataZoom[0];
780
+ S !== void 0 && b !== void 0 && (l = S, u = b);
775
781
  }
776
782
  }
777
783
  requestAnimationFrame(() => {
778
- z.value.draw({ startValue: o, endValue: u, maxValueSpan: c }, { gridLeft: t, gridRight: y });
784
+ R.value.draw({ startValue: l, endValue: u, maxValueSpan: c }, { gridLeft: o, gridRight: v });
779
785
  });
780
786
  }, Q = () => {
781
787
  e && (s && (cancelAnimationFrame(s), s = null), s = requestAnimationFrame(() => {
782
788
  if (!(e == null ? void 0 : e.getOption()))
783
789
  return;
784
- const t = e == null ? void 0 : e.getWidth(), y = e == null ? void 0 : e.getHeight();
785
- !t || !y || (e == null || e.setOption(
790
+ const o = e == null ? void 0 : e.getWidth(), v = e == null ? void 0 : e.getHeight();
791
+ !o || !v || (e == null || e.setOption(
786
792
  {
787
- graphic: ct(e, J.value, i, O.value, () => {
788
- de();
793
+ graphic: ut(e, x.value, a, W.value, () => {
794
+ se();
789
795
  })
790
796
  },
791
797
  {
@@ -795,52 +801,52 @@ const Ve = (n) => (Ce("data-v-8efc10f3"), n = n(), je(), n), Dt = { class: "klin
795
801
  }
796
802
  ), s = null);
797
803
  }));
798
- }, Ie = () => {
799
- x && cancelAnimationFrame(x), x = requestAnimationFrame(() => {
800
- const { time: r } = T.value;
801
- if (!i.brushRange || !(r != null && r.length) || !e)
804
+ }, Be = () => {
805
+ d && cancelAnimationFrame(d), d = requestAnimationFrame(() => {
806
+ const { time: n } = V.value;
807
+ if (!a.brushRange || !(n != null && n.length) || !e)
802
808
  return;
803
- let t = S(i.brushRange[0]).format("YYYY-MM-DD 00:00:00"), y = S(i.brushRange[1]).format("YYYY-MM-DD 23:59:59"), c = null, d = null;
804
- switch (String(i.cycle)) {
809
+ 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;
810
+ switch (String(a.cycle)) {
805
811
  case "6": {
806
- c = r.find((o) => S(o).format("YYYY-MM-DD") === S(t).format("YYYY-MM-DD")), d = c;
812
+ c = n.find((l) => L(l).format("YYYY-MM-DD") === L(o).format("YYYY-MM-DD")), g = c;
807
813
  break;
808
814
  }
809
815
  case "7": {
810
- c = r.find((o) => S(o).day(5).format("YYYY-MM-DD") === S(t).day(5).format("YYYY-MM-DD")), d = r.findLast((o) => S(o).day(5).format("YYYY-MM-DD") === S(y).day(5).format("YYYY-MM-DD"));
816
+ 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"));
811
817
  break;
812
818
  }
813
819
  case "8": {
814
- c = r.find((o) => S(o).endOf("month").format("YYYY-MM-DD") === S(t).endOf("month").format("YYYY-MM-DD")), d = r.findLast((o) => S(o).endOf("month").format("YYYY-MM-DD") === S(y).endOf("month").format("YYYY-MM-DD"));
820
+ 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"));
815
821
  break;
816
822
  }
817
823
  default:
818
- c = r.find((o) => {
819
- const u = S(o).format("YYYY-MM-DD") === S(t).format("YYYY-MM-DD"), k = new Date(o).getTime() >= new Date(t).getTime();
820
- return u && k;
821
- }), d = r.findLast((o) => {
822
- const u = S(o).format("YYYY-MM-DD") === S(y).format("YYYY-MM-DD"), k = new Date(o).getTime() <= new Date(y).getTime();
823
- return u && k;
824
+ c = n.find((l) => {
825
+ const u = L(l).format("YYYY-MM-DD") === L(o).format("YYYY-MM-DD"), D = new Date(l).getTime() >= new Date(o).getTime();
826
+ return u && D;
827
+ }), g = n.findLast((l) => {
828
+ const u = L(l).format("YYYY-MM-DD") === L(v).format("YYYY-MM-DD"), D = new Date(l).getTime() <= new Date(v).getTime();
829
+ return u && D;
824
830
  });
825
831
  }
826
- c && d && e.dispatchAction({
832
+ c && g && e.dispatchAction({
827
833
  type: "brush",
828
834
  areas: [
829
835
  {
830
836
  brushType: "lineX",
831
- coordRange: [c, d],
837
+ coordRange: [c, g],
832
838
  xAxisIndex: 0
833
839
  }
834
840
  ]
835
- }), x = null;
841
+ }), d = null;
836
842
  });
837
- }, xe = async () => {
838
- var r, t, y, c, d, o;
843
+ }, ye = async () => {
844
+ var n, o, v, c, g, l;
839
845
  try {
840
- if (!i.variety || !i.cycle)
846
+ if (!a.variety || !a.cycle)
841
847
  return;
842
- const { variety: u, featureId: k, cycle: L, indicatorStore: m, mainIndicator: E, right: P, startTime: K, endTime: U } = i, { defaultShowCounts: j, addCounts: X, showWarningLine: ee, getFactorData: Ye } = O.value;
843
- Ee(), e && !e.isDisposed() && e.showLoading({
848
+ 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;
849
+ Ve(), e && !e.isDisposed() && e.showLoading({
844
850
  text: "加载中...",
845
851
  color: "#409eff",
846
852
  textColor: "#fff",
@@ -849,137 +855,139 @@ const Ve = (n) => (Ce("data-v-8efc10f3"), n = n(), je(), n), Dt = { class: "klin
849
855
  });
850
856
  const Z = {
851
857
  variety: u,
852
- featureId: k,
853
- cycle: L,
854
- mainIndicatorList: m.getIndicatorParams(E),
855
- subIndicator: g.value,
856
- right: P,
858
+ featureId: D,
859
+ cycle: A,
860
+ mainIndicatorList: S.getIndicatorParams(b),
861
+ subIndicator: $.value,
862
+ right: N,
857
863
  showWarningLine: ee,
858
- getFactorData: Ye
864
+ getFactorData: ke
859
865
  };
860
- K && U ? (Z.startTime = K, Z.endTime = U) : K ? (Z.startTime = K, Z.limit = j + X) : U ? (Z.endTime = U, Z.limit = j + X) : (Z.endTime = S().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), Z.limit = j + X);
861
- const I = await at(Z);
862
- if (!((y = (t = (r = I == null ? void 0 : I.body) == null ? void 0 : r.kline) == null ? void 0 : t.time) != null && y.length)) {
863
- D.value = !0, $.value = !1, ye();
866
+ 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);
867
+ const O = await ot(Z);
868
+ if (!((v = (o = (n = O == null ? void 0 : O.body) == null ? void 0 : n.kline) == null ? void 0 : o.time) != null && v.length)) {
869
+ _.value = !0, M.value = !1, ve();
864
870
  return;
865
871
  }
866
- D.value = !1, $.value = !1, T.value = (c = I == null ? void 0 : I.body) == null ? void 0 : c.kline, J.value = ((d = I == null ? void 0 : I.body) == null ? void 0 : d.warningLine) || [], await oe(), we(!1), Ye && _("getFactorData", (o = I == null ? void 0 : I.body) == null ? void 0 : o.factor), ye();
872
+ _.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();
867
873
  } catch (u) {
868
- throw ye(), $.value = !0, D.value = !1, new Error(u);
874
+ throw ve(), M.value = !0, _.value = !1, new Error(u);
869
875
  }
870
- }, $e = async (r) => {
871
- const { variety: t, cycle: y, indicatorStore: c, mainIndicator: d, right: o } = i, { addCounts: u } = O.value, { time: k } = T.value;
872
- if (r === "history") {
873
- const L = await lt({
874
- variety: t,
875
- cycle: y,
876
- endTime: k[0],
876
+ }, Ie = async (n) => {
877
+ const { variety: o, cycle: v, indicatorStore: c, mainIndicator: g, right: l } = a, { addCounts: u } = W.value, { time: D } = V.value;
878
+ if (n === "history") {
879
+ const A = await at({
880
+ variety: o,
881
+ cycle: v,
882
+ endTime: D[0],
877
883
  limit: u,
878
- mainIndicatorList: c.getIndicatorParams(d),
879
- subIndicator: g.value,
880
- right: o
884
+ mainIndicatorList: c.getIndicatorParams(g),
885
+ subIndicator: $.value,
886
+ right: l
881
887
  });
882
- T.value = {
883
- time: [...L.body.time, ...T.value.time.slice(1)],
884
- data: [...L.body.data, ...T.value.data.slice(1)],
885
- mainIndicator: T.value.mainIndicator.map((m, E) => {
886
- var P;
888
+ V.value = {
889
+ time: [...A.body.time, ...V.value.time.slice(1)],
890
+ data: [...A.body.data, ...V.value.data.slice(1)],
891
+ mainIndicator: V.value.mainIndicator.map((S, b) => {
892
+ var N;
887
893
  return {
888
- ...m,
889
- data: [...((P = L.body.mainIndicator[E]) == null ? void 0 : P.data) ?? [], ...m.data.slice(1)]
894
+ ...S,
895
+ data: [...((N = A.body.mainIndicator[b]) == null ? void 0 : N.data) ?? [], ...S.data.slice(1)]
890
896
  };
891
897
  }),
892
- subIndicator: T.value.subIndicator.map((m, E) => {
893
- var P;
898
+ subIndicator: V.value.subIndicator.map((S, b) => {
899
+ var N;
894
900
  return {
895
- ...m,
896
- data: [...((P = L.body.subIndicator[E]) == null ? void 0 : P.data) ?? [], ...m.data.slice(1)]
901
+ ...S,
902
+ data: [...((N = A.body.subIndicator[b]) == null ? void 0 : N.data) ?? [], ...S.data.slice(1)]
897
903
  };
898
904
  })
899
- }, console.log("触发了加载更多数据"), await oe(), we(!0), L.body.data.length < u && (a = !0, console.log("历史数据已经全部加载完毕")), Y = !1;
905
+ }, console.log("触发了加载更多数据"), await ne(), he(!0), A.body.data.length < u && (y = !0, console.log("历史数据已经全部加载完毕")), f = !1;
900
906
  }
901
- }, ke = ({ code: r, ctrlKey: t }) => {
902
- if (!(t || M.value))
907
+ }, we = ({ code: n, ctrlKey: o }) => {
908
+ if (!(o || p.value))
903
909
  return;
904
- const { xAxis: y, dataZoom: c } = e.getOption(), { data: d } = (y == null ? void 0 : y[0]) ?? { data: [] };
905
- let { startValue: o, endValue: u } = (c == null ? void 0 : c[0]) ?? {};
906
- if (d != null && d.length) {
907
- switch (r) {
910
+ const { xAxis: v, dataZoom: c } = e.getOption(), { data: g } = (v == null ? void 0 : v[0]) ?? { data: [] };
911
+ let { startValue: l, endValue: u } = (c == null ? void 0 : c[0]) ?? {};
912
+ if (g != null && g.length) {
913
+ switch (n) {
908
914
  case "ArrowUp": {
909
- if (u - o < 5)
915
+ if (u - l < 5)
910
916
  return;
911
- const k = Math.floor((u - o) / 2) + 1;
912
- o = o + k, u - o < 5 && (o = u - 4);
917
+ const D = Math.floor((u - l) / 2) + 1;
918
+ l = l + D, u - l < 5 && (l = u - 4);
913
919
  break;
914
920
  }
915
921
  case "ArrowDown": {
916
- const k = Math.min(500, u - o);
917
- o = o - k - 1;
922
+ const D = Math.min(500, u - l);
923
+ l = l - D - 1;
918
924
  break;
919
925
  }
920
926
  case "ArrowLeft": {
921
- o > 0 && (o -= 1, u -= 1), V.value > 0 && (V.value -= 1);
927
+ l > 0 && (l -= 1, u -= 1), B.value > 0 && (B.value -= 1);
922
928
  break;
923
929
  }
924
930
  case "ArrowRight": {
925
- u < d.length - 1 && (o += 1, u += 1), M.value && V.value < d.length - 1 && (V.value += 1);
931
+ u < g.length - 1 && (l += 1, u += 1), p.value && B.value < g.length - 1 && (B.value += 1);
926
932
  break;
927
933
  }
928
934
  }
929
935
  requestAnimationFrame(() => {
930
- e.dispatchAction({ type: "dataZoom", startValue: o, endValue: u }), e.dispatchAction({
936
+ e.dispatchAction({ type: "dataZoom", startValue: l, endValue: u }), e.dispatchAction({
931
937
  type: "updateAxisPointer",
932
938
  seriesIndex: 0,
933
- dataIndex: M.value ? V.value : null
939
+ dataIndex: p.value ? B.value : null
934
940
  }), e.dispatchAction({
935
941
  type: "highlight",
936
- dataIndex: M.value ? V.value : u
942
+ dataIndex: p.value ? B.value : u
937
943
  });
938
944
  });
939
945
  }
940
- }, Ne = () => {
941
- e == null || e.on("datazoom", (t) => {
942
- clearTimeout(v), v = setTimeout(() => {
943
- var c, d, o, u;
944
- const { loadCheckCounts: y } = O.value;
945
- if ((d = (c = e == null ? void 0 : e.getOption()) == null ? void 0 : c.dataZoom) != null && d[0]) {
946
- const { startValue: k } = (u = (o = e == null ? void 0 : e.getOption()) == null ? void 0 : o.dataZoom) == null ? void 0 : u[0];
947
- k < y && !Y && !a && (Y = !0, $e("history")), Q();
946
+ }, $e = () => {
947
+ e == null || e.on(
948
+ "datazoom",
949
+ ce((n) => {
950
+ var v, c, g, l;
951
+ const { loadCheckCounts: o } = W.value;
952
+ if ((c = (v = e == null ? void 0 : e.getOption()) == null ? void 0 : v.dataZoom) != null && c[0]) {
953
+ const { startValue: u } = (l = (g = e == null ? void 0 : e.getOption()) == null ? void 0 : g.dataZoom) == null ? void 0 : l[0];
954
+ u < o && !f && !y && (f = !0, Ie("history")), Q();
948
955
  }
949
- clearTimeout(v);
950
- }, 100);
951
- }), e == null || e.on("highlight", (t) => {
952
- var c, d;
953
- let y = t.dataIndex || -1;
954
- t.batch && (y = typeof ((c = t == null ? void 0 : t.batch[0]) == null ? void 0 : c.dataIndex) == "number" ? (d = t == null ? void 0 : t.batch[0]) == null ? void 0 : d.dataIndex : -1), clearTimeout(p), p = setTimeout(() => {
955
- V.value = y, clearTimeout(p);
956
- }, 20);
957
- }), e == null || e.on("globalout", () => {
958
- const t = setTimeout(() => {
959
- var c, d, o;
960
- clearTimeout(t);
961
- const y = (o = (d = (c = e == null ? void 0 : e.getOption()) == null ? void 0 : c.dataZoom) == null ? void 0 : d[0]) == null ? void 0 : o.endValue;
962
- V.value = y;
963
- }, 30);
964
- });
965
- let r = null;
966
- e == null || e.on("contextmenu", (t) => {
967
- r = setTimeout(() => {
968
- t.componentType === "graphic" && (se.value = t.info, ge.value = [
956
+ }, 100)
957
+ ), e == null || e.on(
958
+ "highlight",
959
+ ce((n) => {
960
+ var v, c;
961
+ let o = n.dataIndex || -1;
962
+ n.batch && (o = typeof ((v = n == null ? void 0 : n.batch[0]) == null ? void 0 : v.dataIndex) == "number" ? (c = n == null ? void 0 : n.batch[0]) == null ? void 0 : c.dataIndex : -1), B.value = o;
963
+ }, 20)
964
+ ), e == null || e.on(
965
+ "globalout",
966
+ ce(() => {
967
+ var n, o, v;
968
+ if (e) {
969
+ const c = (v = (o = (n = e == null ? void 0 : e.getOption()) == null ? void 0 : n.dataZoom) == null ? void 0 : o[0]) == null ? void 0 : v.endValue;
970
+ B.value = c;
971
+ }
972
+ }, 30)
973
+ ), e == null || e.on(
974
+ "contextmenu",
975
+ ce((n) => {
976
+ n.componentType === "graphic" && (P.value = n.info, me.value = [
969
977
  { label: "删除画线", key: "deleteWarningLine" },
970
978
  { label: "修改画线", key: "changeWarningLine" }
971
- ]), clearTimeout(r), r = null;
972
- });
973
- });
974
- }, de = async () => {
975
- const r = await rt({ featureId: i.featureId });
976
- J.value = (r == null ? void 0 : r.body) || [], Q(), _("change", "warningLine", J.value);
977
- }, Oe = async (r) => {
978
- const { variety: t, varietyName: y, featureId: c, featureType: d } = i;
979
- if (r.key === "drawWarningLine") {
980
- const o = e == null ? void 0 : e.getOption(), u = o.tooltip[0];
979
+ ]);
980
+ }, 0)
981
+ );
982
+ }, se = async () => {
983
+ const n = await it({ featureId: a.featureId });
984
+ x.value = (n == null ? void 0 : n.body) || [], Q(), k("change", "warningLine", x.value);
985
+ }, Ne = async (n) => {
986
+ const { variety: o, varietyName: v, featureId: c, featureType: g } = a;
987
+ if (n.key === "drawWarningLine") {
988
+ const l = e == null ? void 0 : e.getOption(), u = l.tooltip[0];
981
989
  e == null || e.setOption({
982
- ...o,
990
+ ...l,
983
991
  tooltip: {
984
992
  ...u,
985
993
  axisPointer: {
@@ -994,11 +1002,11 @@ const Ve = (n) => (Ce("data-v-8efc10f3"), n = n(), je(), n), Dt = { class: "klin
994
1002
  }
995
1003
  }
996
1004
  });
997
- const k = async (L) => {
998
- e == null || e.getZr().off("mousedown", k);
999
- const m = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 }, L.offsetY), E = Math.round(m * 1e3) / 1e3;
1005
+ const D = async (A) => {
1006
+ e == null || e.getZr().off("mousedown", D);
1007
+ const S = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 }, A.offsetY), b = Math.round(S * 1e3) / 1e3;
1000
1008
  e == null || e.setOption({
1001
- ...o,
1009
+ ...l,
1002
1010
  tooltip: {
1003
1011
  ...u,
1004
1012
  axisPointer: {
@@ -1011,84 +1019,84 @@ const Ve = (n) => (Ce("data-v-8efc10f3"), n = n(), je(), n), Dt = { class: "klin
1011
1019
  }
1012
1020
  }
1013
1021
  }
1014
- }), await it({
1015
- featureCode: t,
1016
- featureName: y,
1022
+ }), await lt({
1023
+ featureCode: o,
1024
+ featureName: v,
1017
1025
  featureId: c,
1018
- featureType: d,
1019
- warnPrice: E
1020
- }), pe.success("画线预警成功!"), de();
1026
+ featureType: g,
1027
+ warnPrice: b
1028
+ }), de.success("画线预警成功!"), se();
1021
1029
  };
1022
- e == null || e.getZr().on("mousedown", k);
1030
+ e == null || e.getZr().on("mousedown", D);
1023
1031
  } else
1024
- r.key === "deleteWarningLine" ? (await st({ id: se.value.id }), pe.success("画线预警删除成功"), de()) : r.key === "changeWarningLine" && (ue.value = !0, ce.value = se.value.warnPrice);
1025
- }, Pe = async () => {
1026
- const { variety: r, varietyName: t, featureId: y, featureType: c } = i;
1027
- await Te({
1028
- id: se.value.id,
1029
- featureCode: r,
1030
- featureName: t,
1031
- featureId: y,
1032
+ n.key === "deleteWarningLine" ? (await rt({ id: P.value.id }), de.success("画线预警删除成功"), se()) : n.key === "changeWarningLine" && (q.value = !0, re.value = P.value.warnPrice);
1033
+ }, Oe = async () => {
1034
+ const { variety: n, varietyName: o, featureId: v, featureType: c } = a;
1035
+ await Fe({
1036
+ id: P.value.id,
1037
+ featureCode: n,
1038
+ featureName: o,
1039
+ featureId: v,
1032
1040
  featureType: c,
1033
- warnPrice: ce.value
1034
- }), pe.success("画线预警修改成功"), de();
1035
- }, We = () => {
1036
- ge.value = [...l];
1041
+ warnPrice: re.value
1042
+ }), de.success("画线预警修改成功"), se();
1043
+ }, Pe = () => {
1044
+ me.value = [...r];
1037
1045
  };
1038
- return Me(() => {
1039
- ot(i.env), xe(), window.addEventListener("keydown", ke);
1046
+ return Se(() => {
1047
+ nt(a.env), ye(), window.addEventListener("keydown", we);
1040
1048
  }), te(
1041
1049
  () => {
1042
- var r, t;
1043
- return [i.variety, i.cycle, i.mainIndicator, g.value, (r = i.indicatorStore) == null ? void 0 : r.filterIndicator, (t = i.indicatorStore) == null ? void 0 : t.customIndicator];
1050
+ var n, o;
1051
+ return [a.variety, a.cycle, a.mainIndicator, $.value, (n = a.indicatorStore) == null ? void 0 : n.filterIndicator, (o = a.indicatorStore) == null ? void 0 : o.customIndicator];
1044
1052
  },
1045
1053
  () => {
1046
- Y = !1, a = !1, xe();
1054
+ f = !1, y = !1, ye();
1047
1055
  },
1048
1056
  { deep: !0 }
1049
- ), Le(() => {
1050
- b && (cancelAnimationFrame(b), b = 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(), f == null || f.dispose(), window.removeEventListener("keydown", ke);
1057
+ ), Me(() => {
1058
+ 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);
1051
1059
  }), w({
1052
- draw: (r, t) => {
1053
- r === "warningLine" && (J.value = t, Q());
1060
+ draw: (n, o) => {
1061
+ n === "warningLine" && (x.value = o, Q());
1054
1062
  }
1055
- }), (r, t) => {
1056
- var L;
1057
- const y = Ue, c = He, d = Ke, o = ze, u = Ze, k = qe;
1058
- return A(), R(ae, null, [
1059
- q("div", {
1063
+ }), (n, o) => {
1064
+ var A, S;
1065
+ const v = Ke, c = Ue, g = Ze, l = ze, u = qe, D = We;
1066
+ return T(), E(oe, null, [
1067
+ K("div", {
1060
1068
  class: "klineBasic",
1061
- onMousemove: t[1] || (t[1] = (m) => M.value = !0),
1062
- onMouseout: t[2] || (t[2] = (m) => M.value = !1)
1069
+ onMousemove: o[1] || (o[1] = (b) => p.value = !0),
1070
+ onMouseout: o[2] || (o[2] = (b) => p.value = !1)
1063
1071
  }, [
1064
- q("div", Dt, [
1065
- B(mt, {
1066
- variety: n.variety,
1067
- data: T.value,
1068
- activeIndex: V.value
1072
+ (A = V.value.time) != null && A.length ? (T(), E("div", Yt, [
1073
+ I(pt, {
1074
+ variety: t.variety,
1075
+ data: V.value,
1076
+ activeIndex: B.value
1069
1077
  }, null, 8, ["variety", "data", "activeIndex"])
1070
- ]),
1071
- q("div", {
1078
+ ])) : G("", !0),
1079
+ K("div", {
1072
1080
  class: "klineBasic-main",
1073
- style: ve({ height: O.value.showSubChart ? "70%" : "100%" })
1081
+ style: pe({ height: W.value.showSubChart ? "70%" : "100%" })
1074
1082
  }, [
1075
- B(Yt, { onCloseContextMenuCallBack: We }, {
1076
- popover: W(() => [
1077
- B(c, { style: {
1083
+ I(kt, { onCloseContextMenuCallBack: Pe }, {
1084
+ popover: z(() => [
1085
+ I(c, { style: {
1078
1086
  borderRadius: "4px",
1079
1087
  overflow: "hidden",
1080
1088
  background: "#fff",
1081
1089
  borderRight: 0
1082
1090
  } }, {
1083
- default: W(() => [
1084
- (A(!0), R(ae, null, me(ge.value, (m) => (A(), Fe(y, {
1091
+ default: z(() => [
1092
+ (T(!0), E(oe, null, fe(me.value, (b) => (T(), Le(v, {
1085
1093
  style: { height: "36px" },
1086
- key: m.key,
1087
- index: m.key,
1088
- onClick: (E) => Oe(m)
1094
+ key: b.key,
1095
+ index: b.key,
1096
+ onClick: (N) => Ne(b)
1089
1097
  }, {
1090
- default: W(() => [
1091
- fe(le(m.label), 1)
1098
+ default: z(() => [
1099
+ ue(ae(b.label), 1)
1092
1100
  ]),
1093
1101
  _: 2
1094
1102
  }, 1032, ["index", "onClick"]))), 128))
@@ -1096,79 +1104,79 @@ const Ve = (n) => (Ce("data-v-8efc10f3"), n = n(), je(), n), Dt = { class: "klin
1096
1104
  _: 1
1097
1105
  })
1098
1106
  ]),
1099
- default: W(() => [
1100
- q("div", {
1107
+ default: z(() => [
1108
+ K("div", {
1101
1109
  ref_key: "klineBasicMainRef",
1102
- ref: N,
1110
+ ref: Y,
1103
1111
  style: { height: "100%" }
1104
1112
  }, null, 512)
1105
1113
  ]),
1106
1114
  _: 1
1107
1115
  })
1108
1116
  ], 4),
1109
- O.value.showSubChart ? (A(), R("div", St, [
1110
- B(wt, {
1117
+ W.value.showSubChart ? (T(), E("div", Dt, [
1118
+ I(ht, {
1111
1119
  ref_key: "klineSubRef",
1112
- ref: z,
1113
- modelValue: g.value,
1114
- "onUpdate:modelValue": t[0] || (t[0] = (m) => g.value = m),
1115
- data: T.value,
1116
- cycle: n.cycle,
1117
- activeIndex: V.value,
1118
- subIndicatorList: (L = n.indicatorStore) == null ? void 0 : L.subIndicatorList
1120
+ ref: R,
1121
+ modelValue: $.value,
1122
+ "onUpdate:modelValue": o[0] || (o[0] = (b) => $.value = b),
1123
+ data: V.value,
1124
+ cycle: t.cycle,
1125
+ activeIndex: B.value,
1126
+ subIndicatorList: (S = t.indicatorStore) == null ? void 0 : S.subIndicatorList
1119
1127
  }, null, 8, ["modelValue", "data", "cycle", "activeIndex", "subIndicatorList"])
1120
- ])) : ne("", !0),
1121
- D.value ? (A(), R("div", Mt, [
1122
- B(d, {
1128
+ ])) : G("", !0),
1129
+ _.value ? (T(), E("div", St, [
1130
+ I(g, {
1123
1131
  class: "klineBasic-empty-content",
1124
1132
  description: "暂无数据"
1125
1133
  })
1126
- ])) : ne("", !0),
1127
- $.value ? (A(), R("div", Lt, [
1128
- Ft,
1129
- q("div", Tt, [
1130
- B(o, { onClick: xe }, {
1131
- default: W(() => [
1132
- fe("刷新")
1134
+ ])) : G("", !0),
1135
+ M.value ? (T(), E("div", Mt, [
1136
+ Lt,
1137
+ K("div", Ft, [
1138
+ I(l, { onClick: ye }, {
1139
+ default: z(() => [
1140
+ ue("刷新")
1133
1141
  ]),
1134
1142
  _: 1
1135
1143
  })
1136
1144
  ])
1137
- ])) : ne("", !0)
1145
+ ])) : G("", !0)
1138
1146
  ], 32),
1139
- B(k, {
1140
- modelValue: ue.value,
1141
- "onUpdate:modelValue": t[5] || (t[5] = (m) => ue.value = m),
1147
+ I(D, {
1148
+ modelValue: q.value,
1149
+ "onUpdate:modelValue": o[5] || (o[5] = (b) => q.value = b),
1142
1150
  title: "画线预警-修改价格",
1143
1151
  width: "30%",
1144
1152
  "align-center": ""
1145
1153
  }, {
1146
- footer: W(() => [
1147
- q("span", Vt, [
1148
- B(o, {
1149
- onClick: t[4] || (t[4] = (m) => ue.value = !1)
1154
+ footer: z(() => [
1155
+ K("span", Tt, [
1156
+ I(l, {
1157
+ onClick: o[4] || (o[4] = (b) => q.value = !1)
1150
1158
  }, {
1151
- default: W(() => [
1152
- fe("取消")
1159
+ default: z(() => [
1160
+ ue("取消")
1153
1161
  ]),
1154
1162
  _: 1
1155
1163
  }),
1156
- B(o, {
1164
+ I(l, {
1157
1165
  type: "primary",
1158
- onClick: Pe
1166
+ onClick: Oe
1159
1167
  }, {
1160
- default: W(() => [
1161
- fe("确定")
1168
+ default: z(() => [
1169
+ ue("确定")
1162
1170
  ]),
1163
1171
  _: 1
1164
1172
  })
1165
1173
  ])
1166
1174
  ]),
1167
- default: W(() => [
1175
+ default: z(() => [
1168
1176
  At,
1169
- B(u, {
1170
- modelValue: ce.value,
1171
- "onUpdate:modelValue": t[3] || (t[3] = (m) => ce.value = m),
1177
+ I(u, {
1178
+ modelValue: re.value,
1179
+ "onUpdate:modelValue": o[3] || (o[3] = (b) => re.value = b),
1172
1180
  placeholder: "输入预警价格"
1173
1181
  }, null, 8, ["modelValue"])
1174
1182
  ]),
@@ -1177,9 +1185,9 @@ const Ve = (n) => (Ce("data-v-8efc10f3"), n = n(), je(), n), Dt = { class: "klin
1177
1185
  ], 64);
1178
1186
  };
1179
1187
  }
1180
- }, Rt = /* @__PURE__ */ G(Et, [["__scopeId", "data-v-8efc10f3"]]), yn = {
1181
- install(n) {
1182
- n.component("st-klineBasic", Rt);
1188
+ }, Et = /* @__PURE__ */ J(Vt, [["__scopeId", "data-v-ae370bef"]]), yn = {
1189
+ install(t) {
1190
+ t.component("st-klineBasic", Et);
1183
1191
  }
1184
1192
  };
1185
1193
  export {