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.
- package/es/ChartLayout.js +4 -4
- package/es/CustomFunction.js +42 -42
- package/es/FactorWarning.js +33 -33
- package/es/Kline.js +17 -17
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +520 -512
- package/es/KlineConfig.js +61 -61
- package/es/KlineNew.js +16 -16
- package/es/KlinePlus.cjs +4 -4
- package/es/KlinePlus.js +589 -575
- package/es/LinearLegend.cjs +1 -1
- package/es/LinearLegend.js +1 -63
- package/es/MonacoEditor.js +24 -24
- package/es/Pagination.js +73 -73
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.js +38 -38
- package/es/User.js +44 -44
- package/es/VarSelectDialog.js +25 -25
- package/es/VarietyAutoComplete.js +10 -10
- package/es/VarietySearch.js +38 -38
- package/es/{VarietySelect-5a9dd50b.js → VarietySelect-b9fe3000.js} +4 -4
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +15 -15
- package/es/VirtualTable.js +14 -14
- package/es/{_initCloneObject-c34c65bc.js → _initCloneObject-382335b2.js} +7 -7
- package/es/{base-a5af3db3.js → base-ff0e366f.js} +40 -40
- package/es/{castArray-7741a212.js → castArray-15070be9.js} +1 -1
- package/es/{config-provider-06a63185.js → config-provider-2e85eee8.js} +6 -6
- package/es/{debounce-8d53f4dd.js → debounce-e9e47f9a.js} +1 -1
- package/es/{dropdown-302f71e7.js → dropdown-2b35a683.js} +13 -13
- package/es/{el-autocomplete-ed75a659.js → el-autocomplete-18be2c5a.js} +16 -16
- package/es/{el-button-d09ff85f.js → el-button-f08c0639.js} +39 -39
- package/es/{el-checkbox-64648e02.js → el-checkbox-058dba2d.js} +31 -31
- package/es/{el-dialog-6a80e3d8.js → el-dialog-d328e0d8.js} +15 -15
- package/es/{el-divider-4e059794.js → el-divider-4fe55ebe.js} +1 -1
- package/es/{el-empty-33cb66f1.js → el-empty-ceecb81c.js} +5 -5
- package/es/{el-form-item-4eca95be.js → el-form-item-cb328886.js} +36 -36
- package/es/{el-input-cae60510.js → el-input-0f6ead19.js} +50 -50
- package/es/{el-input-number-c2499410.js → el-input-number-66e68609.js} +36 -36
- package/es/{el-loading-c738468d.js → el-loading-412370c7.js} +5 -5
- package/es/{el-menu-item-f904f685.js → el-menu-item-0ee8ad18.js} +22 -22
- package/es/{el-message-box-05d8cf39.js → el-message-box-6db52b29.js} +11 -11
- package/es/{el-message-0df23ae7.js → el-message-e6c755df.js} +23 -23
- package/es/{el-overlay-cc9bc792.js → el-overlay-981f8d49.js} +56 -56
- package/es/{el-popconfirm-a6f66a0e.js → el-popconfirm-005013fa.js} +20 -20
- package/es/{el-popper-a38874f4.js → el-popper-fdc7c793.js} +109 -109
- package/es/{el-segmented-51b1c797.js → el-segmented-050d0090.js} +8 -8
- package/es/{el-select-1b149fab.js → el-select-23a1f302.js} +64 -64
- package/es/{el-table-column-3e30ebae.js → el-table-column-d0c374cf.js} +15 -15
- package/es/{el-tag-0a25efdf.js → el-tag-f13f463b.js} +15 -15
- package/es/{el-text-73d899ff.js → el-text-27cef2be.js} +2 -2
- package/es/{index-42e59bf5.js → index-09bd2621.js} +43 -43
- package/es/{index-94e43e0d.js → index-15b9603e.js} +3 -3
- package/es/{index-960806da.js → index-269b8a8c.js} +36 -36
- package/es/{index-54d289d1.js → index-4a3f30c5.js} +12 -12
- package/es/{index-6e967429.js → index-80a7ad32.js} +17 -17
- package/es/{index-d77a7336.js → index-93a8960e.js} +1 -1
- package/es/{index-4194c942.js → index-b937ea22.js} +2 -2
- package/es/{index-ac98a4d8.js → index-c266c23a.js} +10 -10
- package/es/{index-6806997d.js → index-e0901394.js} +34 -34
- package/es/{index-87b4bf61.js → index-ec7ad93f.js} +31 -31
- package/es/{python-a914569a.js → python-823b276b.js} +24 -24
- package/es/raf-8e05a7f4.js +6 -0
- package/es/{scroll-679bd6bf.js → scroll-41b4f625.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-form-common-props-47e50c10.js → use-form-common-props-631cacae.js} +65 -65
- package/es/{use-global-config-f52caea0.js → use-global-config-5d001623.js} +14 -14
- package/es/{validator-94c04152.js → validator-4160d9e7.js} +1 -1
- package/es/{vnode-5ddb7ed1.js → vnode-06571d5b.js} +1 -1
- package/es/{zh-cn-4921961d.js → zh-cn-5df98ac2.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +162 -162
- package/lib/{index-2a325d42.js → index-f00d1e1f.js} +13173 -13151
- package/lib/{python-eb65d93b.js → python-0f34e2e6.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/components/KlineSub/index.vue +35 -15
- package/packages/KlineBasic/components/KlineTips/index.vue +2 -2
- package/packages/KlineBasic/index.vue +39 -41
- package/packages/KlinePlus/index.vue +88 -62
- package/src/App.vue +15 -4
- package/src/pages/KlineBasic/index.vue +7 -7
- package/src/pages/KlineNew/components/KlineAction/mockApi/index.js +1 -1
- package/src/pages/KlineNew/components/KlineBasic/utils.js +1 -1
- package/src/pages/KlineNew/components/KlineSlide/utils.js +1 -1
- package/src/pages/KlinePlus/KlineDialog/MultiCycle.vue +312 -0
- package/src/pages/KlinePlus/KlineDialog/api.js +108 -0
- package/src/pages/KlinePlus/KlineDialog/index.vue +582 -0
- package/src/pages/KlinePlus/KlineDialog/indicator.js +109 -0
- package/src/pages/KlinePlus/KlineDialog/tools.js +86 -0
- package/src/pages/KlinePlus/index.vue +23 -209
- package/es/raf-80ef0c0a.js +0 -6
package/es/KlineBasic.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import "./base-
|
|
2
|
-
import { E as
|
|
3
|
-
import "./el-overlay-
|
|
4
|
-
import "./el-input-
|
|
5
|
-
import { E as
|
|
6
|
-
import { E as ze } from "./el-button-
|
|
7
|
-
import { E as
|
|
8
|
-
import { E as
|
|
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-
|
|
11
|
-
import { defineComponent as
|
|
12
|
-
import { d as
|
|
13
|
-
import * as
|
|
14
|
-
import { y as
|
|
15
|
-
import { E as
|
|
16
|
-
import { _ as
|
|
17
|
-
import "./el-tag-
|
|
18
|
-
import { E as
|
|
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-
|
|
21
|
-
import "./use-form-common-props-
|
|
22
|
-
import "./index-
|
|
23
|
-
import "./index-
|
|
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-
|
|
26
|
-
import "./scroll-
|
|
27
|
-
import "./use-global-config-
|
|
28
|
-
import "./index-
|
|
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-
|
|
30
|
+
import "./index-4a3f30c5.js";
|
|
31
31
|
import "./index-657047bb.js";
|
|
32
|
-
import "./config-provider-
|
|
33
|
-
import "./index-
|
|
34
|
-
import "./index-
|
|
35
|
-
import "./castArray-
|
|
36
|
-
import "./debounce-
|
|
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
|
|
39
|
-
const w =
|
|
38
|
+
const nt = (t) => {
|
|
39
|
+
const w = Ce(t, {
|
|
40
40
|
handleReq: (h) => {
|
|
41
|
-
|
|
41
|
+
Xe() && (h.headers.token = Ge());
|
|
42
42
|
},
|
|
43
43
|
handleRes: (h) => {
|
|
44
|
-
const { data:
|
|
45
|
-
if (
|
|
46
|
-
return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` :
|
|
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
|
-
},
|
|
51
|
-
const { data: e, time:
|
|
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: `${
|
|
57
|
-
bottom:
|
|
58
|
-
left: `${
|
|
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:
|
|
65
|
-
maxValueSpan:
|
|
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:
|
|
78
|
-
return
|
|
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: !
|
|
85
|
+
show: !k,
|
|
86
86
|
type: "category",
|
|
87
|
-
data:
|
|
87
|
+
data: m,
|
|
88
88
|
splitLine: {
|
|
89
89
|
show: !1
|
|
90
90
|
},
|
|
91
91
|
axisLabel: {
|
|
92
|
-
formatter: (a) => ["6", "7", "8"].includes(
|
|
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) =>
|
|
108
|
-
max: (a) =>
|
|
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
|
-
...
|
|
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
|
-
},
|
|
153
|
-
const { variety: e, featureId:
|
|
154
|
-
return w.reduce((
|
|
155
|
-
const { warnPrice:
|
|
156
|
-
if (
|
|
157
|
-
return
|
|
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
|
-
...
|
|
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:
|
|
171
|
+
x1: f,
|
|
172
172
|
// 开始X坐标
|
|
173
|
-
y1:
|
|
173
|
+
y1: _,
|
|
174
174
|
// 开始Y坐标
|
|
175
|
-
x2: (
|
|
175
|
+
x2: (t == null ? void 0 : t.getWidth()) - y,
|
|
176
176
|
// 结束X坐标
|
|
177
|
-
y2:
|
|
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: (
|
|
191
|
-
y:
|
|
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: (
|
|
204
|
-
M =
|
|
203
|
+
ondragstart: (Y) => {
|
|
204
|
+
M = Y.offsetY;
|
|
205
205
|
},
|
|
206
|
-
ondrag: (
|
|
207
|
-
var
|
|
208
|
-
if (
|
|
209
|
-
const
|
|
210
|
-
(
|
|
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 (
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
const
|
|
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:
|
|
220
|
-
featureId:
|
|
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
|
|
227
|
+
await Fe(V), de.success("画线预警修改成功"), i && i();
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
];
|
|
232
232
|
}, []);
|
|
233
233
|
};
|
|
234
|
-
function Ae(
|
|
235
|
-
function w(
|
|
236
|
-
if (typeof
|
|
237
|
-
return Number.isFinite(
|
|
238
|
-
if (typeof
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
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(
|
|
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(
|
|
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
|
|
252
|
+
return j(h);
|
|
253
253
|
{
|
|
254
|
-
const
|
|
255
|
-
return
|
|
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
|
|
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(
|
|
271
|
-
const w =
|
|
270
|
+
setup(t) {
|
|
271
|
+
const w = t, h = F(null), r = F([]);
|
|
272
272
|
return te(() => w.data, () => {
|
|
273
|
-
|
|
274
|
-
Array.from(h.value.children).forEach((
|
|
275
|
-
var
|
|
276
|
-
((s = (
|
|
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
|
-
}), (
|
|
279
|
+
}), (i, e) => (T(), E("div", {
|
|
280
280
|
class: "kline-tips",
|
|
281
281
|
ref_key: "tipsRef",
|
|
282
282
|
ref: h
|
|
283
283
|
}, [
|
|
284
|
-
(
|
|
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:
|
|
288
|
-
},
|
|
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
|
|
293
|
-
const
|
|
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(
|
|
311
|
-
const { round: w, formatValue: h } =
|
|
312
|
-
te(() =>
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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 =
|
|
320
|
-
const { data: s, activeIndex:
|
|
321
|
-
if (s.data && s.data[
|
|
322
|
-
const
|
|
323
|
-
{ label: "开", value:
|
|
324
|
-
{ label: "高", value:
|
|
325
|
-
{ label: "低", value:
|
|
326
|
-
{ label: "收", value:
|
|
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
|
-
|
|
329
|
-
let
|
|
330
|
-
|
|
331
|
-
const a = (
|
|
332
|
-
let
|
|
333
|
-
return a > 0 ?
|
|
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
|
-
}),
|
|
337
|
-
var
|
|
338
|
-
const { data: s, activeIndex:
|
|
339
|
-
return ((
|
|
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,
|
|
342
|
-
|
|
343
|
-
|
|
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
|
-
},
|
|
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(
|
|
356
|
-
return (w, h) => (
|
|
357
|
-
(
|
|
358
|
-
key:
|
|
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:
|
|
361
|
-
},
|
|
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__ */
|
|
366
|
-
const
|
|
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
|
-
},
|
|
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(
|
|
386
|
-
const { round:
|
|
387
|
-
let
|
|
388
|
-
const
|
|
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
|
|
389
|
+
return d.modelValue;
|
|
391
390
|
},
|
|
392
|
-
set(
|
|
393
|
-
|
|
391
|
+
set(p) {
|
|
392
|
+
s("update:modelValue", p);
|
|
394
393
|
}
|
|
395
|
-
}),
|
|
396
|
-
var
|
|
397
|
-
|
|
398
|
-
|
|
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
|
-
|
|
401
|
-
|
|
402
|
-
|
|
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 (
|
|
405
|
-
|
|
407
|
+
if (p) {
|
|
408
|
+
p = !1;
|
|
406
409
|
return;
|
|
407
410
|
}
|
|
408
|
-
|
|
409
|
-
}), e.observe(
|
|
410
|
-
}),
|
|
411
|
-
|
|
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
|
|
414
|
-
const
|
|
415
|
-
return
|
|
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
|
-
} :
|
|
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: (
|
|
429
|
-
|
|
431
|
+
connect: (p) => {
|
|
432
|
+
!m.value || !i || i.isDisposed() || xe.connect([p, i]);
|
|
430
433
|
},
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
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:
|
|
444
|
-
value:
|
|
445
|
-
itemStyle:
|
|
446
|
-
} :
|
|
447
|
-
value:
|
|
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:
|
|
453
|
+
color: P >= 0 ? "#FF0000" : "#00FFFF"
|
|
450
454
|
}
|
|
451
455
|
} : {
|
|
452
|
-
value:
|
|
456
|
+
value: P,
|
|
453
457
|
itemStyle: {
|
|
454
|
-
color:
|
|
458
|
+
color: x.seriesColor
|
|
455
459
|
}
|
|
456
460
|
})
|
|
457
461
|
};
|
|
458
|
-
if (
|
|
462
|
+
if (x.series === "line")
|
|
459
463
|
return {
|
|
460
464
|
xAxisIndex: 0,
|
|
461
|
-
yAxisIndex:
|
|
462
|
-
name:
|
|
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:
|
|
470
|
+
data: x.data,
|
|
467
471
|
lineStyle: {
|
|
468
472
|
width: 1
|
|
469
473
|
},
|
|
470
474
|
itemStyle: {
|
|
471
|
-
color:
|
|
475
|
+
color: x.color
|
|
472
476
|
}
|
|
473
477
|
};
|
|
474
478
|
});
|
|
475
|
-
|
|
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:
|
|
488
|
-
endValue:
|
|
489
|
-
maxValueSpan:
|
|
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: (
|
|
501
|
-
const { axisDimension:
|
|
502
|
-
if (
|
|
503
|
-
return ["6", "7", "8"].includes(
|
|
504
|
-
if (
|
|
505
|
-
return String(
|
|
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:
|
|
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: (
|
|
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" ? (
|
|
531
|
-
max: $ === "cover" ? (
|
|
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:
|
|
547
|
-
max:
|
|
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:
|
|
564
|
+
series: V
|
|
561
565
|
},
|
|
562
566
|
!0
|
|
563
567
|
);
|
|
564
568
|
});
|
|
565
569
|
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
modelValue:
|
|
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:
|
|
580
|
-
(
|
|
581
|
-
key:
|
|
582
|
-
label:
|
|
583
|
-
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
|
-
])) :
|
|
589
|
-
|
|
591
|
+
])) : G("", !0),
|
|
592
|
+
I(yt, { data: k.value }, null, 8, ["data"])
|
|
590
593
|
]),
|
|
591
|
-
|
|
594
|
+
K("div", {
|
|
592
595
|
class: "klineSub-chart",
|
|
593
596
|
ref_key: "subChartRef",
|
|
594
|
-
ref:
|
|
597
|
+
ref: f
|
|
595
598
|
}, null, 512)
|
|
596
599
|
]);
|
|
597
600
|
};
|
|
598
601
|
}
|
|
599
|
-
},
|
|
602
|
+
}, ht = /* @__PURE__ */ J(_t, [["__scopeId", "data-v-d720c2c7"]]), wt = /* @__PURE__ */ be({
|
|
600
603
|
__name: "index",
|
|
601
604
|
emits: ["closeContextMenuCallBack"],
|
|
602
|
-
setup(
|
|
603
|
-
const h = w,
|
|
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
|
-
}),
|
|
608
|
-
e.value.display = "none", h("closeContextMenuCallBack"), document.removeEventListener("click",
|
|
609
|
-
}, s = (
|
|
610
|
-
if (
|
|
611
|
-
const { offsetX:
|
|
612
|
-
if (
|
|
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
|
-
|
|
618
|
+
r.value.click(), e.value = {
|
|
616
619
|
display: "block",
|
|
617
|
-
top: `${
|
|
618
|
-
left: `${
|
|
619
|
-
},
|
|
620
|
-
const
|
|
621
|
-
|
|
622
|
-
}), document.addEventListener("click",
|
|
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 (
|
|
627
|
+
return (d, f) => (T(), E("div", {
|
|
625
628
|
ref_key: "contextmenuRef",
|
|
626
|
-
ref:
|
|
629
|
+
ref: r,
|
|
627
630
|
class: "contextmenu",
|
|
628
631
|
onContextmenu: s,
|
|
629
|
-
onMouseleave:
|
|
632
|
+
onMouseleave: m
|
|
630
633
|
}, [
|
|
631
|
-
|
|
632
|
-
e.value.display !== "none" ? (
|
|
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:
|
|
638
|
+
ref: i,
|
|
636
639
|
class: "contextmenu-popover",
|
|
637
|
-
style:
|
|
640
|
+
style: pe(e.value)
|
|
638
641
|
}, [
|
|
639
|
-
|
|
640
|
-
], 4)) :
|
|
642
|
+
Ye(d.$slots, "popover", {}, void 0, !0)
|
|
643
|
+
], 4)) : G("", !0)
|
|
641
644
|
], 544));
|
|
642
645
|
}
|
|
643
646
|
});
|
|
644
|
-
const
|
|
645
|
-
const
|
|
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-
|
|
648
|
-
},
|
|
650
|
+
class: "klineBasic-tips"
|
|
651
|
+
}, Dt = {
|
|
649
652
|
key: 1,
|
|
650
|
-
class: "klineBasic-
|
|
651
|
-
},
|
|
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
|
-
},
|
|
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(
|
|
712
|
-
const
|
|
713
|
-
let
|
|
714
|
-
const
|
|
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
|
-
...
|
|
726
|
-
})),
|
|
727
|
-
e || (e =
|
|
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
|
-
},
|
|
738
|
+
}, ve = () => {
|
|
733
739
|
e && !e.isDisposed() && e.hideLoading();
|
|
734
|
-
},
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
Q(),
|
|
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
|
-
},
|
|
743
|
-
var u,
|
|
748
|
+
}, Ee = (n = !1) => {
|
|
749
|
+
var u, D, A;
|
|
744
750
|
if (!e || e.isDisposed())
|
|
745
751
|
return;
|
|
746
|
-
const { time:
|
|
747
|
-
let c =
|
|
748
|
-
if (
|
|
749
|
-
const
|
|
750
|
-
if (
|
|
751
|
-
const
|
|
752
|
-
if (
|
|
753
|
-
const
|
|
754
|
-
c =
|
|
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
|
|
764
|
+
const l = st(V.value, W.value, c, g, a.cycle);
|
|
759
765
|
requestAnimationFrame(() => {
|
|
760
|
-
e == null || e.setOption(
|
|
761
|
-
|
|
766
|
+
e == null || e.setOption(l, !0), B.value = g, requestAnimationFrame(() => {
|
|
767
|
+
Be();
|
|
762
768
|
});
|
|
763
769
|
});
|
|
764
|
-
},
|
|
765
|
-
var
|
|
766
|
-
if (!
|
|
770
|
+
}, Re = () => {
|
|
771
|
+
var D;
|
|
772
|
+
if (!W.value.showSubChart || !R.value)
|
|
767
773
|
return;
|
|
768
|
-
const { time:
|
|
769
|
-
let
|
|
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
|
|
772
|
-
if ((
|
|
773
|
-
const { startValue:
|
|
774
|
-
|
|
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
|
-
|
|
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
|
|
785
|
-
!
|
|
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:
|
|
788
|
-
|
|
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
|
-
},
|
|
799
|
-
|
|
800
|
-
const { time:
|
|
801
|
-
if (!
|
|
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
|
|
804
|
-
switch (String(
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
819
|
-
const u =
|
|
820
|
-
return u &&
|
|
821
|
-
}),
|
|
822
|
-
const u =
|
|
823
|
-
return u &&
|
|
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 &&
|
|
832
|
+
c && g && e.dispatchAction({
|
|
827
833
|
type: "brush",
|
|
828
834
|
areas: [
|
|
829
835
|
{
|
|
830
836
|
brushType: "lineX",
|
|
831
|
-
coordRange: [c,
|
|
837
|
+
coordRange: [c, g],
|
|
832
838
|
xAxisIndex: 0
|
|
833
839
|
}
|
|
834
840
|
]
|
|
835
|
-
}),
|
|
841
|
+
}), d = null;
|
|
836
842
|
});
|
|
837
|
-
},
|
|
838
|
-
var
|
|
843
|
+
}, ye = async () => {
|
|
844
|
+
var n, o, v, c, g, l;
|
|
839
845
|
try {
|
|
840
|
-
if (!
|
|
846
|
+
if (!a.variety || !a.cycle)
|
|
841
847
|
return;
|
|
842
|
-
const { variety: u, featureId:
|
|
843
|
-
|
|
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:
|
|
853
|
-
cycle:
|
|
854
|
-
mainIndicatorList:
|
|
855
|
-
subIndicator:
|
|
856
|
-
right:
|
|
858
|
+
featureId: D,
|
|
859
|
+
cycle: A,
|
|
860
|
+
mainIndicatorList: S.getIndicatorParams(b),
|
|
861
|
+
subIndicator: $.value,
|
|
862
|
+
right: N,
|
|
857
863
|
showWarningLine: ee,
|
|
858
|
-
getFactorData:
|
|
864
|
+
getFactorData: ke
|
|
859
865
|
};
|
|
860
|
-
|
|
861
|
-
const
|
|
862
|
-
if (!((
|
|
863
|
-
|
|
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
|
-
|
|
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
|
|
874
|
+
throw ve(), M.value = !0, _.value = !1, new Error(u);
|
|
869
875
|
}
|
|
870
|
-
},
|
|
871
|
-
const { variety:
|
|
872
|
-
if (
|
|
873
|
-
const
|
|
874
|
-
variety:
|
|
875
|
-
cycle:
|
|
876
|
-
endTime:
|
|
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(
|
|
879
|
-
subIndicator:
|
|
880
|
-
right:
|
|
884
|
+
mainIndicatorList: c.getIndicatorParams(g),
|
|
885
|
+
subIndicator: $.value,
|
|
886
|
+
right: l
|
|
881
887
|
});
|
|
882
|
-
|
|
883
|
-
time: [...
|
|
884
|
-
data: [...
|
|
885
|
-
mainIndicator:
|
|
886
|
-
var
|
|
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
|
-
...
|
|
889
|
-
data: [...((
|
|
894
|
+
...S,
|
|
895
|
+
data: [...((N = A.body.mainIndicator[b]) == null ? void 0 : N.data) ?? [], ...S.data.slice(1)]
|
|
890
896
|
};
|
|
891
897
|
}),
|
|
892
|
-
subIndicator:
|
|
893
|
-
var
|
|
898
|
+
subIndicator: V.value.subIndicator.map((S, b) => {
|
|
899
|
+
var N;
|
|
894
900
|
return {
|
|
895
|
-
...
|
|
896
|
-
data: [...((
|
|
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
|
|
905
|
+
}, console.log("触发了加载更多数据"), await ne(), he(!0), A.body.data.length < u && (y = !0, console.log("历史数据已经全部加载完毕")), f = !1;
|
|
900
906
|
}
|
|
901
|
-
},
|
|
902
|
-
if (!(
|
|
907
|
+
}, we = ({ code: n, ctrlKey: o }) => {
|
|
908
|
+
if (!(o || p.value))
|
|
903
909
|
return;
|
|
904
|
-
const { xAxis:
|
|
905
|
-
let { startValue:
|
|
906
|
-
if (
|
|
907
|
-
switch (
|
|
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 -
|
|
915
|
+
if (u - l < 5)
|
|
910
916
|
return;
|
|
911
|
-
const
|
|
912
|
-
|
|
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
|
|
917
|
-
|
|
922
|
+
const D = Math.min(500, u - l);
|
|
923
|
+
l = l - D - 1;
|
|
918
924
|
break;
|
|
919
925
|
}
|
|
920
926
|
case "ArrowLeft": {
|
|
921
|
-
|
|
927
|
+
l > 0 && (l -= 1, u -= 1), B.value > 0 && (B.value -= 1);
|
|
922
928
|
break;
|
|
923
929
|
}
|
|
924
930
|
case "ArrowRight": {
|
|
925
|
-
u <
|
|
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:
|
|
936
|
+
e.dispatchAction({ type: "dataZoom", startValue: l, endValue: u }), e.dispatchAction({
|
|
931
937
|
type: "updateAxisPointer",
|
|
932
938
|
seriesIndex: 0,
|
|
933
|
-
dataIndex:
|
|
939
|
+
dataIndex: p.value ? B.value : null
|
|
934
940
|
}), e.dispatchAction({
|
|
935
941
|
type: "highlight",
|
|
936
|
-
dataIndex:
|
|
942
|
+
dataIndex: p.value ? B.value : u
|
|
937
943
|
});
|
|
938
944
|
});
|
|
939
945
|
}
|
|
940
|
-
},
|
|
941
|
-
e == null || e.on(
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
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
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
}, 20)
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
e == null || e.on(
|
|
967
|
-
|
|
968
|
-
|
|
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
|
-
])
|
|
972
|
-
})
|
|
973
|
-
|
|
974
|
-
},
|
|
975
|
-
const
|
|
976
|
-
|
|
977
|
-
},
|
|
978
|
-
const { variety:
|
|
979
|
-
if (
|
|
980
|
-
const
|
|
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
|
-
...
|
|
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
|
|
998
|
-
e == null || e.getZr().off("mousedown",
|
|
999
|
-
const
|
|
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
|
-
...
|
|
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
|
|
1015
|
-
featureCode:
|
|
1016
|
-
featureName:
|
|
1022
|
+
}), await lt({
|
|
1023
|
+
featureCode: o,
|
|
1024
|
+
featureName: v,
|
|
1017
1025
|
featureId: c,
|
|
1018
|
-
featureType:
|
|
1019
|
-
warnPrice:
|
|
1020
|
-
}),
|
|
1026
|
+
featureType: g,
|
|
1027
|
+
warnPrice: b
|
|
1028
|
+
}), de.success("画线预警成功!"), se();
|
|
1021
1029
|
};
|
|
1022
|
-
e == null || e.getZr().on("mousedown",
|
|
1030
|
+
e == null || e.getZr().on("mousedown", D);
|
|
1023
1031
|
} else
|
|
1024
|
-
|
|
1025
|
-
},
|
|
1026
|
-
const { variety:
|
|
1027
|
-
await
|
|
1028
|
-
id:
|
|
1029
|
-
featureCode:
|
|
1030
|
-
featureName:
|
|
1031
|
-
featureId:
|
|
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:
|
|
1034
|
-
}),
|
|
1035
|
-
},
|
|
1036
|
-
|
|
1041
|
+
warnPrice: re.value
|
|
1042
|
+
}), de.success("画线预警修改成功"), se();
|
|
1043
|
+
}, Pe = () => {
|
|
1044
|
+
me.value = [...r];
|
|
1037
1045
|
};
|
|
1038
|
-
return
|
|
1039
|
-
|
|
1046
|
+
return Se(() => {
|
|
1047
|
+
nt(a.env), ye(), window.addEventListener("keydown", we);
|
|
1040
1048
|
}), te(
|
|
1041
1049
|
() => {
|
|
1042
|
-
var
|
|
1043
|
-
return [
|
|
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
|
-
|
|
1054
|
+
f = !1, y = !1, ye();
|
|
1047
1055
|
},
|
|
1048
1056
|
{ deep: !0 }
|
|
1049
|
-
),
|
|
1050
|
-
|
|
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: (
|
|
1053
|
-
|
|
1060
|
+
draw: (n, o) => {
|
|
1061
|
+
n === "warningLine" && (x.value = o, Q());
|
|
1054
1062
|
}
|
|
1055
|
-
}), (
|
|
1056
|
-
var
|
|
1057
|
-
const
|
|
1058
|
-
return
|
|
1059
|
-
|
|
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:
|
|
1062
|
-
onMouseout:
|
|
1069
|
+
onMousemove: o[1] || (o[1] = (b) => p.value = !0),
|
|
1070
|
+
onMouseout: o[2] || (o[2] = (b) => p.value = !1)
|
|
1063
1071
|
}, [
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
variety:
|
|
1067
|
-
data:
|
|
1068
|
-
activeIndex:
|
|
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
|
-
|
|
1078
|
+
])) : G("", !0),
|
|
1079
|
+
K("div", {
|
|
1072
1080
|
class: "klineBasic-main",
|
|
1073
|
-
style:
|
|
1081
|
+
style: pe({ height: W.value.showSubChart ? "70%" : "100%" })
|
|
1074
1082
|
}, [
|
|
1075
|
-
|
|
1076
|
-
popover:
|
|
1077
|
-
|
|
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:
|
|
1084
|
-
(
|
|
1091
|
+
default: z(() => [
|
|
1092
|
+
(T(!0), E(oe, null, fe(me.value, (b) => (T(), Le(v, {
|
|
1085
1093
|
style: { height: "36px" },
|
|
1086
|
-
key:
|
|
1087
|
-
index:
|
|
1088
|
-
onClick: (
|
|
1094
|
+
key: b.key,
|
|
1095
|
+
index: b.key,
|
|
1096
|
+
onClick: (N) => Ne(b)
|
|
1089
1097
|
}, {
|
|
1090
|
-
default:
|
|
1091
|
-
|
|
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:
|
|
1100
|
-
|
|
1107
|
+
default: z(() => [
|
|
1108
|
+
K("div", {
|
|
1101
1109
|
ref_key: "klineBasicMainRef",
|
|
1102
|
-
ref:
|
|
1110
|
+
ref: Y,
|
|
1103
1111
|
style: { height: "100%" }
|
|
1104
1112
|
}, null, 512)
|
|
1105
1113
|
]),
|
|
1106
1114
|
_: 1
|
|
1107
1115
|
})
|
|
1108
1116
|
], 4),
|
|
1109
|
-
|
|
1110
|
-
|
|
1117
|
+
W.value.showSubChart ? (T(), E("div", Dt, [
|
|
1118
|
+
I(ht, {
|
|
1111
1119
|
ref_key: "klineSubRef",
|
|
1112
|
-
ref:
|
|
1113
|
-
modelValue:
|
|
1114
|
-
"onUpdate:modelValue":
|
|
1115
|
-
data:
|
|
1116
|
-
cycle:
|
|
1117
|
-
activeIndex:
|
|
1118
|
-
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
|
-
])) :
|
|
1121
|
-
|
|
1122
|
-
|
|
1128
|
+
])) : G("", !0),
|
|
1129
|
+
_.value ? (T(), E("div", St, [
|
|
1130
|
+
I(g, {
|
|
1123
1131
|
class: "klineBasic-empty-content",
|
|
1124
1132
|
description: "暂无数据"
|
|
1125
1133
|
})
|
|
1126
|
-
])) :
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
default:
|
|
1132
|
-
|
|
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
|
-
])) :
|
|
1145
|
+
])) : G("", !0)
|
|
1138
1146
|
], 32),
|
|
1139
|
-
|
|
1140
|
-
modelValue:
|
|
1141
|
-
"onUpdate:modelValue":
|
|
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:
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
onClick:
|
|
1154
|
+
footer: z(() => [
|
|
1155
|
+
K("span", Tt, [
|
|
1156
|
+
I(l, {
|
|
1157
|
+
onClick: o[4] || (o[4] = (b) => q.value = !1)
|
|
1150
1158
|
}, {
|
|
1151
|
-
default:
|
|
1152
|
-
|
|
1159
|
+
default: z(() => [
|
|
1160
|
+
ue("取消")
|
|
1153
1161
|
]),
|
|
1154
1162
|
_: 1
|
|
1155
1163
|
}),
|
|
1156
|
-
|
|
1164
|
+
I(l, {
|
|
1157
1165
|
type: "primary",
|
|
1158
|
-
onClick:
|
|
1166
|
+
onClick: Oe
|
|
1159
1167
|
}, {
|
|
1160
|
-
default:
|
|
1161
|
-
|
|
1168
|
+
default: z(() => [
|
|
1169
|
+
ue("确定")
|
|
1162
1170
|
]),
|
|
1163
1171
|
_: 1
|
|
1164
1172
|
})
|
|
1165
1173
|
])
|
|
1166
1174
|
]),
|
|
1167
|
-
default:
|
|
1175
|
+
default: z(() => [
|
|
1168
1176
|
At,
|
|
1169
|
-
|
|
1170
|
-
modelValue:
|
|
1171
|
-
"onUpdate:modelValue":
|
|
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
|
-
},
|
|
1181
|
-
install(
|
|
1182
|
-
|
|
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 {
|