st-comp 0.0.260 → 0.0.262

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