st-comp 0.0.228 → 0.0.230
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +204 -202
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-e340af53.js → index-99f1e4fc.js} +7 -5
- package/lib/{python-7e10b7a2.js → python-599db541.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/components/KlineTips/index.vue +10 -2
- package/packages/KlineBasic/components/Tips/index.vue +1 -1
package/es/KlineBasic.js
CHANGED
|
@@ -8,11 +8,11 @@ import { E as Oe } from "./el-empty-33cb66f1.js";
|
|
|
8
8
|
import { E as Pe, a as We } from "./el-menu-item-7e881203.js";
|
|
9
9
|
import "./el-tooltip-4ed993c7.js";
|
|
10
10
|
import "./el-popper-b4f97157.js";
|
|
11
|
-
import { defineComponent as ye, ref as S, watch as
|
|
11
|
+
import { defineComponent as ye, ref as S, watch as G, nextTick as ge, openBlock as A, createElementBlock as E, Fragment as ee, renderList as ce, normalizeStyle as de, toDisplayString as te, computed as ne, createVNode as B, onMounted as De, onUnmounted as ke, createElementVNode as U, withCtx as K, createBlock as Me, createCommentVNode as J, renderSlot as Ye, createTextVNode as se, pushScopeId as Ne, popScopeId as qe } from "vue";
|
|
12
12
|
import * as ve from "echarts";
|
|
13
|
-
import { d
|
|
14
|
-
import { y as Ce, v as ze, U as Ke, K as Ue, V as
|
|
15
|
-
import { E as
|
|
13
|
+
import { d } from "./dayjs.min-8313b006.js";
|
|
14
|
+
import { y as Ce, v as ze, U as Ke, K as Ue, V as ae, x as be, D as He } from "./index-7ed0999e.js";
|
|
15
|
+
import { E as ue } from "./el-message-e544a8f5.js";
|
|
16
16
|
import { _ as X } from "./_plugin-vue_export-helper-dad06003.js";
|
|
17
17
|
import "./el-tag-66cab138.js";
|
|
18
18
|
import { E as je, a as Ze } from "./el-select-95627997.js";
|
|
@@ -41,27 +41,27 @@ const Xe = (n) => {
|
|
|
41
41
|
ze() && (T.headers.token = Ke());
|
|
42
42
|
},
|
|
43
43
|
handleRes: (T) => {
|
|
44
|
-
const { data:
|
|
45
|
-
if (
|
|
44
|
+
const { data: i } = T;
|
|
45
|
+
if (i.code === 401)
|
|
46
46
|
return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` : Ue(), !0;
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
w.get, Z = w.post;
|
|
50
|
-
}, Ge = (n) => Z("/middleLayer/kline/getKlineBasic", { ...n, userId:
|
|
51
|
-
const { data: e, time: D } = n, { gridTop:
|
|
50
|
+
}, Ge = (n) => Z("/middleLayer/kline/getKlineBasic", { ...n, userId: ae("id") }), Je = (n) => Z("/middleLayer/kline/getKline", n), Qe = async (n) => Z("/alarm/deliversign/addAlarmPrice", { ...n, userId: ae("id") }), et = async (n) => Z("/alarm/deliversign/findAlarmPriceByUserId", { ...n, userId: ae("id") }), Se = async (n) => Z("/alarm/deliversign/updateAlarmPrice", { ...n, userId: ae("id") }), tt = async (n) => Z("/alarm/deliversign/deleteAlarmPrice", { ...n, userId: ae("id") }), { round: Q } = be, nt = (n, w, T, i, u) => {
|
|
51
|
+
const { data: e, time: D } = n, { gridTop: c, gridRight: g, gridLeft: f, maxShowCounts: v, showSubChart: o } = w;
|
|
52
52
|
return {
|
|
53
53
|
animation: !1,
|
|
54
54
|
grid: {
|
|
55
|
-
top: `${
|
|
55
|
+
top: `${c}px`,
|
|
56
56
|
right: `${g}px`,
|
|
57
|
-
bottom:
|
|
57
|
+
bottom: o ? "6px" : "24px",
|
|
58
58
|
left: `${f}px`
|
|
59
59
|
},
|
|
60
60
|
dataZoom: [
|
|
61
61
|
{
|
|
62
62
|
type: "inside",
|
|
63
63
|
startValue: T,
|
|
64
|
-
endValue:
|
|
64
|
+
endValue: i,
|
|
65
65
|
maxValueSpan: v
|
|
66
66
|
}
|
|
67
67
|
],
|
|
@@ -73,23 +73,23 @@ const Xe = (n) => {
|
|
|
73
73
|
type: "cross",
|
|
74
74
|
label: {
|
|
75
75
|
rich: {},
|
|
76
|
-
formatter: (
|
|
77
|
-
const { axisDimension: b, value: x } =
|
|
78
|
-
return b === "x" ?
|
|
76
|
+
formatter: (a) => {
|
|
77
|
+
const { axisDimension: b, value: x } = a;
|
|
78
|
+
return b === "x" ? o ? "" : ["6", "7", "8"].includes(u) ? d(x).format("YYYY-MM-DD") : x : String(Q(x));
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
formatter: () => ""
|
|
83
83
|
},
|
|
84
84
|
xAxis: {
|
|
85
|
-
show: !
|
|
85
|
+
show: !o,
|
|
86
86
|
type: "category",
|
|
87
87
|
data: D,
|
|
88
88
|
splitLine: {
|
|
89
89
|
show: !1
|
|
90
90
|
},
|
|
91
91
|
axisLabel: {
|
|
92
|
-
formatter: (
|
|
92
|
+
formatter: (a) => ["6", "7", "8"].includes(u) ? d(a).format("YYYY-MM-DD") : a
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
yAxis: {
|
|
@@ -104,8 +104,8 @@ const Xe = (n) => {
|
|
|
104
104
|
color: "#333"
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
min: (
|
|
108
|
-
max: (
|
|
107
|
+
min: (a) => Q(a.min),
|
|
108
|
+
max: (a) => Q(a.max)
|
|
109
109
|
},
|
|
110
110
|
series: [
|
|
111
111
|
{
|
|
@@ -119,17 +119,17 @@ const Xe = (n) => {
|
|
|
119
119
|
borderWidth: 1
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
|
-
...n.mainIndicator.map((
|
|
123
|
-
name:
|
|
122
|
+
...n.mainIndicator.map((a) => ({
|
|
123
|
+
name: a.key,
|
|
124
124
|
type: "line",
|
|
125
125
|
silent: !0,
|
|
126
126
|
symbol: "none",
|
|
127
|
-
data:
|
|
127
|
+
data: a.data,
|
|
128
128
|
lineStyle: {
|
|
129
|
-
width:
|
|
129
|
+
width: a.width || 1
|
|
130
130
|
},
|
|
131
131
|
itemStyle: {
|
|
132
|
-
color:
|
|
132
|
+
color: a.color
|
|
133
133
|
}
|
|
134
134
|
}))
|
|
135
135
|
],
|
|
@@ -149,24 +149,24 @@ const Xe = (n) => {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
|
-
},
|
|
153
|
-
const { variety: e, featureId: D, featureType:
|
|
154
|
-
return w.reduce((
|
|
155
|
-
const { warnPrice: b } =
|
|
152
|
+
}, at = (n, w, T, i, u) => {
|
|
153
|
+
const { variety: e, featureId: D, featureType: c } = T, { gridTop: g, gridLeft: f, gridRight: v } = i;
|
|
154
|
+
return w.reduce((o, a) => {
|
|
155
|
+
const { warnPrice: b } = a, x = n == null ? void 0 : n.convertToPixel({ yAxisIndex: 0 }, b);
|
|
156
156
|
if (x <= g || x >= (n == null ? void 0 : n.getHeight()))
|
|
157
|
-
return
|
|
157
|
+
return o;
|
|
158
158
|
let V = 0;
|
|
159
159
|
return [
|
|
160
|
-
...
|
|
160
|
+
...o,
|
|
161
161
|
{
|
|
162
162
|
type: "group",
|
|
163
163
|
name: "warningLine",
|
|
164
|
-
info:
|
|
164
|
+
info: a,
|
|
165
165
|
draggable: "vertical",
|
|
166
166
|
children: [
|
|
167
167
|
{
|
|
168
168
|
type: "line",
|
|
169
|
-
info:
|
|
169
|
+
info: a,
|
|
170
170
|
shape: {
|
|
171
171
|
x1: f,
|
|
172
172
|
// 开始X坐标
|
|
@@ -186,7 +186,7 @@ const Xe = (n) => {
|
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
type: "text",
|
|
189
|
-
info:
|
|
189
|
+
info: a,
|
|
190
190
|
x: (n == null ? void 0 : n.getWidth()) - v,
|
|
191
191
|
y: x - 5,
|
|
192
192
|
style: {
|
|
@@ -207,7 +207,7 @@ const Xe = (n) => {
|
|
|
207
207
|
var P;
|
|
208
208
|
if (M.target && M.target.childAt(1)) {
|
|
209
209
|
const L = n.convertFromPixel({ yAxisIndex: 0 }, x + (M.offsetY - V));
|
|
210
|
-
(P = M.target.childAt(1)) == null || P.animate("style", !1).when(1, { text:
|
|
210
|
+
(P = M.target.childAt(1)) == null || P.animate("style", !1).when(1, { text: Q(L, 3) }).start();
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
213
|
// 事件:结束拖拽
|
|
@@ -215,22 +215,22 @@ const Xe = (n) => {
|
|
|
215
215
|
const L = M.offsetY - V;
|
|
216
216
|
if (L !== 0) {
|
|
217
217
|
const I = n == null ? void 0 : n.convertFromPixel({ yAxisIndex: 0 }, L + x), p = {
|
|
218
|
-
id:
|
|
219
|
-
warnPrice:
|
|
218
|
+
id: a.id,
|
|
219
|
+
warnPrice: Q(I, 3),
|
|
220
220
|
featureId: D,
|
|
221
221
|
//品种id
|
|
222
222
|
featureCode: e,
|
|
223
223
|
//品种代码
|
|
224
|
-
featureType:
|
|
224
|
+
featureType: c
|
|
225
225
|
//品种类型
|
|
226
226
|
};
|
|
227
|
-
await Se(p),
|
|
227
|
+
await Se(p), ue.success("画线预警修改成功"), u && u();
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
];
|
|
232
232
|
}, []);
|
|
233
|
-
},
|
|
233
|
+
}, ot = /* @__PURE__ */ ye({
|
|
234
234
|
__name: "index",
|
|
235
235
|
props: {
|
|
236
236
|
// 提示数据
|
|
@@ -240,28 +240,28 @@ const Xe = (n) => {
|
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
setup(n) {
|
|
243
|
-
const w = n, T = S(null),
|
|
244
|
-
return
|
|
245
|
-
|
|
246
|
-
Array.from(T.value.children).forEach((
|
|
247
|
-
var D,
|
|
248
|
-
((
|
|
243
|
+
const w = n, T = S(null), i = S([]);
|
|
244
|
+
return G(() => w.data, () => {
|
|
245
|
+
i.value.length === 0 && ge(() => {
|
|
246
|
+
Array.from(T.value.children).forEach((u, e) => {
|
|
247
|
+
var D, c, g, f, v, o, a, b;
|
|
248
|
+
((c = (D = w.data) == null ? void 0 : D[e]) == null ? void 0 : c.label) === "涨跌" ? i.value[e] = "85px" : ((f = (g = w.data) == null ? void 0 : g[e]) == null ? void 0 : f.label) === "至今涨幅" ? i.value[e] = "115px" : ((o = (v = w.data) == null ? void 0 : v[e]) == null ? void 0 : o.label) === "额" ? i.value[e] = "85px" : ["开", "高", "低", "收"].includes((b = (a = w.data) == null ? void 0 : a[e]) == null ? void 0 : b.label) ? i.value[e] = `${u.offsetWidth + 20}px` : i.value[e] = `${u.offsetWidth + 36}px`;
|
|
249
249
|
});
|
|
250
250
|
});
|
|
251
|
-
}), (
|
|
251
|
+
}), (u, e) => (A(), E("div", {
|
|
252
252
|
class: "kline-tips",
|
|
253
253
|
ref_key: "tipsRef",
|
|
254
254
|
ref: T
|
|
255
255
|
}, [
|
|
256
|
-
(A(!0), E(
|
|
257
|
-
key:
|
|
256
|
+
(A(!0), E(ee, null, ce(n.data, (D, c) => (A(), E("div", {
|
|
257
|
+
key: c,
|
|
258
258
|
class: "kline-tips-item",
|
|
259
|
-
style: de({ color: D.color, width:
|
|
260
|
-
},
|
|
259
|
+
style: de({ color: D.color, width: i.value[c] ? i.value[c] : null })
|
|
260
|
+
}, te(D.label) + " " + te(D.value), 5))), 128))
|
|
261
261
|
], 512));
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
|
-
const we = /* @__PURE__ */ X(
|
|
264
|
+
const we = /* @__PURE__ */ X(ot, [["__scopeId", "data-v-1ccf76bf"]]);
|
|
265
265
|
const lt = { class: "kline-tips" }, rt = {
|
|
266
266
|
__name: "index",
|
|
267
267
|
props: {
|
|
@@ -280,40 +280,42 @@ const lt = { class: "kline-tips" }, rt = {
|
|
|
280
280
|
}
|
|
281
281
|
},
|
|
282
282
|
setup(n) {
|
|
283
|
-
const { round: w, formatValue: T } = be,
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}),
|
|
287
|
-
|
|
283
|
+
const { round: w, formatValue: T } = be, i = n, u = S(null);
|
|
284
|
+
G(() => i.activeIndex, () => {
|
|
285
|
+
u.value === null && (u.value = i.data.data[i.activeIndex][1]);
|
|
286
|
+
}), G(() => i.data, () => {
|
|
287
|
+
u.value === null && (u.value = i.data.data[i.activeIndex][1]);
|
|
288
|
+
}), G(() => i.variety, () => {
|
|
289
|
+
u.value = null;
|
|
288
290
|
});
|
|
289
|
-
const e =
|
|
290
|
-
const { data:
|
|
291
|
-
if (
|
|
292
|
-
const f =
|
|
291
|
+
const e = ne(() => {
|
|
292
|
+
const { data: c, activeIndex: g } = i;
|
|
293
|
+
if (c.data && c.data[g]) {
|
|
294
|
+
const f = c.data[g], v = [
|
|
293
295
|
{ label: "开", value: f[0] },
|
|
294
296
|
{ label: "高", value: f[3] },
|
|
295
297
|
{ label: "低", value: f[2] },
|
|
296
298
|
{ label: "收", value: f[1] }
|
|
297
299
|
];
|
|
298
300
|
f[4] !== null && v.push({ label: "额", value: T(f[4]) });
|
|
299
|
-
let
|
|
300
|
-
f[6] > 0 ?
|
|
301
|
-
const
|
|
301
|
+
let o;
|
|
302
|
+
f[6] > 0 ? o = "red" : f[6] < 0 && (o = "green"), v.push({ label: "涨跌", value: `${w(f[6])}%`, color: o });
|
|
303
|
+
const a = (u.value / f[1] - 1) * 100;
|
|
302
304
|
let b;
|
|
303
|
-
return
|
|
305
|
+
return a > 0 ? b = "red" : a < 0 && (b = "green"), v.push({ label: "至今涨幅", value: `${w(a)}%`, color: b }), v;
|
|
304
306
|
}
|
|
305
307
|
return [];
|
|
306
|
-
}), D =
|
|
308
|
+
}), D = ne(() => {
|
|
307
309
|
var f;
|
|
308
|
-
const { data:
|
|
309
|
-
return ((f =
|
|
310
|
+
const { data: c, activeIndex: g } = i;
|
|
311
|
+
return ((f = c == null ? void 0 : c.mainIndicator) == null ? void 0 : f.map((v) => ({ label: v.key, value: w(v.data[g]), color: v.color }))) || [];
|
|
310
312
|
});
|
|
311
|
-
return (
|
|
313
|
+
return (c, g) => (A(), E("div", lt, [
|
|
312
314
|
B(we, { data: e.value }, null, 8, ["data"]),
|
|
313
315
|
B(we, { data: D.value }, null, 8, ["data"])
|
|
314
316
|
]));
|
|
315
317
|
}
|
|
316
|
-
}, it = /* @__PURE__ */ X(rt, [["__scopeId", "data-v-
|
|
318
|
+
}, it = /* @__PURE__ */ X(rt, [["__scopeId", "data-v-d24c4fcf"]]), st = { class: "kline-averageTips" }, ut = /* @__PURE__ */ ye({
|
|
317
319
|
__name: "index",
|
|
318
320
|
props: {
|
|
319
321
|
// 提示数据
|
|
@@ -324,11 +326,11 @@ const lt = { class: "kline-tips" }, rt = {
|
|
|
324
326
|
},
|
|
325
327
|
setup(n) {
|
|
326
328
|
return (w, T) => (A(), E("div", st, [
|
|
327
|
-
(A(!0), E(
|
|
328
|
-
key:
|
|
329
|
+
(A(!0), E(ee, null, ce(n.data, (i, u) => (A(), E("div", {
|
|
330
|
+
key: u,
|
|
329
331
|
class: "kline-averageTips-item",
|
|
330
|
-
style: de({ color:
|
|
331
|
-
},
|
|
332
|
+
style: de({ color: i.color, width: `calc(100% / ${n.data.length} - 10px)` })
|
|
333
|
+
}, te(i.label) + " " + te(i.value), 5))), 128))
|
|
332
334
|
]));
|
|
333
335
|
}
|
|
334
336
|
});
|
|
@@ -353,35 +355,35 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
353
355
|
},
|
|
354
356
|
emits: ["update:modelValue"],
|
|
355
357
|
setup(n, { expose: w, emit: T }) {
|
|
356
|
-
const { round:
|
|
357
|
-
let
|
|
358
|
-
const D = T,
|
|
358
|
+
const { round: i } = be;
|
|
359
|
+
let u, e;
|
|
360
|
+
const D = T, c = n, g = S(), f = ne({
|
|
359
361
|
get() {
|
|
360
|
-
return
|
|
362
|
+
return c.modelValue;
|
|
361
363
|
},
|
|
362
|
-
set(
|
|
363
|
-
D("update:modelValue",
|
|
364
|
+
set(a) {
|
|
365
|
+
D("update:modelValue", a);
|
|
364
366
|
}
|
|
365
|
-
}), v =
|
|
367
|
+
}), v = ne(() => {
|
|
366
368
|
var x;
|
|
367
|
-
const { data:
|
|
368
|
-
return ((x =
|
|
369
|
+
const { data: a, activeIndex: b } = c;
|
|
370
|
+
return ((x = a == null ? void 0 : a.subIndicator) == null ? void 0 : x.map((V) => ({ label: V.key, color: V.color, value: V.data[b] || "-" }))) || [];
|
|
369
371
|
});
|
|
370
372
|
De(() => {
|
|
371
|
-
|
|
372
|
-
let
|
|
373
|
+
u = ve.init(g.value);
|
|
374
|
+
let a = !0;
|
|
373
375
|
e = new ResizeObserver(() => {
|
|
374
|
-
if (
|
|
375
|
-
|
|
376
|
+
if (a) {
|
|
377
|
+
a = null;
|
|
376
378
|
return;
|
|
377
379
|
}
|
|
378
|
-
|
|
380
|
+
u.resize();
|
|
379
381
|
}), e.observe(g.value);
|
|
380
382
|
}), ke(() => {
|
|
381
|
-
|
|
383
|
+
u.dispose(), e.disconnect(), e = null;
|
|
382
384
|
});
|
|
383
|
-
const
|
|
384
|
-
const x =
|
|
385
|
+
const o = (a, b) => {
|
|
386
|
+
const x = a[b], V = b === 0 ? a[b] : a[b - 1];
|
|
385
387
|
return x[0] === x[1] ? x[0] >= V[1] ? {
|
|
386
388
|
color: "transparent",
|
|
387
389
|
borderColor: "#FF0000"
|
|
@@ -395,13 +397,13 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
395
397
|
};
|
|
396
398
|
};
|
|
397
399
|
return w({
|
|
398
|
-
connect: (
|
|
399
|
-
ve.connect([
|
|
400
|
+
connect: (a) => {
|
|
401
|
+
ve.connect([a, u]);
|
|
400
402
|
},
|
|
401
403
|
// 联动
|
|
402
|
-
draw: (
|
|
404
|
+
draw: (a, b) => {
|
|
403
405
|
ge(() => {
|
|
404
|
-
const { startValue: x, endValue: V, maxValueSpan: M } =
|
|
406
|
+
const { startValue: x, endValue: V, maxValueSpan: M } = a, { leftYAxisRange: P, rightYAxisRange: L } = c.data.subIndicator[0], I = c.data.subIndicator.map((p) => {
|
|
405
407
|
if (p.series === "bar")
|
|
406
408
|
return {
|
|
407
409
|
name: "subMain",
|
|
@@ -412,7 +414,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
412
414
|
symbol: "none",
|
|
413
415
|
data: p.data.map((N, C) => p.seriesColor === "kline" ? {
|
|
414
416
|
value: N,
|
|
415
|
-
itemStyle:
|
|
417
|
+
itemStyle: o(c.data.data, C)
|
|
416
418
|
} : p.seriesColor === "value" ? {
|
|
417
419
|
value: N,
|
|
418
420
|
itemStyle: {
|
|
@@ -442,7 +444,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
442
444
|
}
|
|
443
445
|
};
|
|
444
446
|
});
|
|
445
|
-
|
|
447
|
+
u.setOption(
|
|
446
448
|
{
|
|
447
449
|
animation: !1,
|
|
448
450
|
grid: {
|
|
@@ -470,9 +472,9 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
470
472
|
formatter: (p) => {
|
|
471
473
|
const { axisDimension: N, value: C } = p;
|
|
472
474
|
if (N === "x")
|
|
473
|
-
return ["6", "7", "8"].includes(
|
|
475
|
+
return ["6", "7", "8"].includes(c.cycle) ? d(C).format("YYYY-MM-DD") : C;
|
|
474
476
|
if (p.axisIndex === 1)
|
|
475
|
-
return String(
|
|
477
|
+
return String(i(C));
|
|
476
478
|
}
|
|
477
479
|
}
|
|
478
480
|
},
|
|
@@ -480,7 +482,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
480
482
|
},
|
|
481
483
|
xAxis: {
|
|
482
484
|
type: "category",
|
|
483
|
-
data:
|
|
485
|
+
data: c.data.time,
|
|
484
486
|
axisLine: {
|
|
485
487
|
show: !0
|
|
486
488
|
},
|
|
@@ -488,7 +490,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
488
490
|
show: !1
|
|
489
491
|
},
|
|
490
492
|
axisLabel: {
|
|
491
|
-
formatter: (p) => ["6", "7", "8"].includes(
|
|
493
|
+
formatter: (p) => ["6", "7", "8"].includes(c.cycle) ? d(p).format("YYYY-MM-DD") : p
|
|
492
494
|
}
|
|
493
495
|
},
|
|
494
496
|
yAxis: [
|
|
@@ -534,7 +536,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
534
536
|
});
|
|
535
537
|
}
|
|
536
538
|
// 重置
|
|
537
|
-
}), (
|
|
539
|
+
}), (a, b) => {
|
|
538
540
|
const x = je, V = Ze;
|
|
539
541
|
return A(), E("div", dt, [
|
|
540
542
|
U("div", ft, [
|
|
@@ -547,7 +549,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
547
549
|
class: "element-dark subIndicator"
|
|
548
550
|
}, {
|
|
549
551
|
default: K(() => [
|
|
550
|
-
(A(!0), E(
|
|
552
|
+
(A(!0), E(ee, null, ce(n.subIndicatorList, (M) => (A(), Me(x, {
|
|
551
553
|
key: M.value,
|
|
552
554
|
label: M.label,
|
|
553
555
|
value: M.value
|
|
@@ -555,7 +557,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
555
557
|
]),
|
|
556
558
|
_: 1
|
|
557
559
|
}, 8, ["modelValue"])
|
|
558
|
-
])) :
|
|
560
|
+
])) : J("", !0),
|
|
559
561
|
B(ct, { data: v.value }, null, 8, ["data"])
|
|
560
562
|
]),
|
|
561
563
|
U("div", {
|
|
@@ -570,44 +572,44 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
570
572
|
__name: "index",
|
|
571
573
|
emits: ["closeContextMenuCallBack"],
|
|
572
574
|
setup(n, { emit: w }) {
|
|
573
|
-
const T = w,
|
|
575
|
+
const T = w, i = S(), u = S(), e = S({
|
|
574
576
|
display: "none",
|
|
575
577
|
top: "0px",
|
|
576
578
|
left: "0px"
|
|
577
579
|
}), D = () => {
|
|
578
580
|
e.value.display = "none", T("closeContextMenuCallBack"), document.removeEventListener("click", D);
|
|
579
|
-
},
|
|
581
|
+
}, c = (g) => {
|
|
580
582
|
if (g.preventDefault(), e.value.display === "block") {
|
|
581
|
-
const { offsetX: f, offsetY: v } = g, { offsetWidth:
|
|
582
|
-
if (f <=
|
|
583
|
+
const { offsetX: f, offsetY: v } = g, { offsetWidth: o, offsetHeight: a } = u.value;
|
|
584
|
+
if (f <= o && v <= a)
|
|
583
585
|
return;
|
|
584
586
|
}
|
|
585
|
-
|
|
587
|
+
i.value.click(), e.value = {
|
|
586
588
|
display: "block",
|
|
587
589
|
top: `${g.offsetY}px`,
|
|
588
590
|
left: `${g.offsetX}px`
|
|
589
591
|
}, ge(() => {
|
|
590
|
-
const f =
|
|
592
|
+
const f = i.value.getBoundingClientRect(), v = u.value.getBoundingClientRect();
|
|
591
593
|
v.left + v.width >= f.right && (e.value.left = `${g.offsetX - v.width}px`), v.top + v.height >= f.bottom && (console.log("高度超出"), e.value.top = `${g.offsetY - v.height}px`);
|
|
592
594
|
}), document.addEventListener("click", D);
|
|
593
595
|
};
|
|
594
596
|
return (g, f) => (A(), E("div", {
|
|
595
597
|
ref_key: "contextmenuRef",
|
|
596
|
-
ref:
|
|
598
|
+
ref: i,
|
|
597
599
|
class: "contextmenu",
|
|
598
|
-
onContextmenu:
|
|
600
|
+
onContextmenu: c,
|
|
599
601
|
onMouseleave: D
|
|
600
602
|
}, [
|
|
601
603
|
Ye(g.$slots, "default", {}, void 0, !0),
|
|
602
604
|
e.value.display !== "none" ? (A(), E("div", {
|
|
603
605
|
key: 0,
|
|
604
606
|
ref_key: "contextmenuContentRef",
|
|
605
|
-
ref:
|
|
607
|
+
ref: u,
|
|
606
608
|
class: "contextmenu-popover",
|
|
607
609
|
style: de(e.value)
|
|
608
610
|
}, [
|
|
609
611
|
Ye(g.$slots, "popover", {}, void 0, !0)
|
|
610
|
-
], 4)) :
|
|
612
|
+
], 4)) : J("", !0)
|
|
611
613
|
], 544));
|
|
612
614
|
}
|
|
613
615
|
});
|
|
@@ -690,9 +692,9 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
690
692
|
},
|
|
691
693
|
emits: ["change", "getFactorData"],
|
|
692
694
|
setup(n, { expose: w, emit: T }) {
|
|
693
|
-
const
|
|
694
|
-
let
|
|
695
|
-
const v = T,
|
|
695
|
+
const i = [{ label: "画线预警", key: "drawWarningLine" }];
|
|
696
|
+
let u = null, e = null, D, c, g = !1, f = !1;
|
|
697
|
+
const v = T, o = n, a = S(!1), b = S(!1), x = S(!1), V = S(null), M = S(null), P = S("VOL"), L = S(0), I = S({}), p = S([]), N = S({}), C = S(!1), oe = S(""), fe = S([...i]), H = ne(() => ({
|
|
696
698
|
defaultShowCounts: 500,
|
|
697
699
|
// 默认展示条数
|
|
698
700
|
addCounts: 2e3,
|
|
@@ -713,79 +715,79 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
713
715
|
// 是否展示预警线
|
|
714
716
|
getFactorData: !0,
|
|
715
717
|
// 是否获取因子数据
|
|
716
|
-
...
|
|
718
|
+
...o.config
|
|
717
719
|
}));
|
|
718
|
-
|
|
720
|
+
G(
|
|
719
721
|
() => {
|
|
720
722
|
var r, t;
|
|
721
|
-
return [
|
|
723
|
+
return [o.variety, o.cycle, o.mainIndicator, P.value, (r = o.indicatorStore) == null ? void 0 : r.filterIndicator, (t = o.indicatorStore) == null ? void 0 : t.customIndicator];
|
|
722
724
|
},
|
|
723
725
|
() => {
|
|
724
726
|
pe();
|
|
725
727
|
},
|
|
726
728
|
{ deep: !0 }
|
|
727
729
|
), De(() => {
|
|
728
|
-
Xe(
|
|
730
|
+
Xe(o.env), pe(), window.addEventListener("keydown", xe);
|
|
729
731
|
}), ke(() => {
|
|
730
|
-
e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(),
|
|
732
|
+
e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(), u == null || u.dispose(), window.removeEventListener("keydown", xe);
|
|
731
733
|
});
|
|
732
734
|
const Le = () => {
|
|
733
|
-
e || (e = ve.init(V.value), Ae(), H.value.showSubChart && M.value.connect(e),
|
|
735
|
+
e || (e = ve.init(V.value), Ae(), H.value.showSubChart && M.value.connect(e), u = He(V.value), u.listen(() => {
|
|
734
736
|
requestAnimationFrame(() => {
|
|
735
737
|
e.resize();
|
|
736
738
|
});
|
|
737
739
|
}));
|
|
738
740
|
}, xe = ({ code: r, ctrlKey: t }) => {
|
|
739
|
-
if (!(t ||
|
|
741
|
+
if (!(t || a.value))
|
|
740
742
|
return;
|
|
741
743
|
const { xAxis: h, dataZoom: m } = e.getOption(), { data: y } = (h == null ? void 0 : h[0]) ?? { data: [] };
|
|
742
|
-
let { startValue: l, endValue:
|
|
744
|
+
let { startValue: l, endValue: s } = (m == null ? void 0 : m[0]) ?? {};
|
|
743
745
|
if (y != null && y.length) {
|
|
744
746
|
switch (r) {
|
|
745
747
|
case "ArrowUp": {
|
|
746
|
-
if (
|
|
748
|
+
if (s - l < 5)
|
|
747
749
|
return;
|
|
748
|
-
const k = Math.floor((
|
|
749
|
-
l = l + k,
|
|
750
|
+
const k = Math.floor((s - l) / 2) + 1;
|
|
751
|
+
l = l + k, s - l < 5 && (l = s - 4);
|
|
750
752
|
break;
|
|
751
753
|
}
|
|
752
754
|
case "ArrowDown": {
|
|
753
|
-
const k = Math.min(500,
|
|
755
|
+
const k = Math.min(500, s - l);
|
|
754
756
|
l = l - k - 1;
|
|
755
757
|
break;
|
|
756
758
|
}
|
|
757
759
|
case "ArrowLeft": {
|
|
758
|
-
l > 0 && (l -= 1,
|
|
760
|
+
l > 0 && (l -= 1, s -= 1), L.value > 0 && (L.value -= 1);
|
|
759
761
|
break;
|
|
760
762
|
}
|
|
761
763
|
case "ArrowRight": {
|
|
762
|
-
|
|
764
|
+
s < y.length - 1 && (l += 1, s += 1), a.value && L.value < y.length - 1 && (L.value += 1);
|
|
763
765
|
break;
|
|
764
766
|
}
|
|
765
767
|
}
|
|
766
768
|
e.dispatchAction({
|
|
767
769
|
type: "dataZoom",
|
|
768
770
|
startValue: l,
|
|
769
|
-
endValue:
|
|
771
|
+
endValue: s
|
|
770
772
|
}), e.dispatchAction({
|
|
771
773
|
type: "updateAxisPointer",
|
|
772
774
|
seriesIndex: 0,
|
|
773
|
-
dataIndex:
|
|
775
|
+
dataIndex: a.value ? L.value : null
|
|
774
776
|
}), e.dispatchAction({
|
|
775
777
|
type: "highlight",
|
|
776
|
-
dataIndex:
|
|
778
|
+
dataIndex: a.value ? L.value : s
|
|
777
779
|
});
|
|
778
780
|
}
|
|
779
781
|
}, Ae = () => {
|
|
780
782
|
e == null || e.on("datazoom", (t) => {
|
|
781
|
-
clearTimeout(
|
|
782
|
-
var m, y, l,
|
|
783
|
+
clearTimeout(c), c = setTimeout(() => {
|
|
784
|
+
var m, y, l, s;
|
|
783
785
|
const { loadCheckCounts: h } = H.value;
|
|
784
786
|
if ((y = (m = e == null ? void 0 : e.getOption()) == null ? void 0 : m.dataZoom) != null && y[0]) {
|
|
785
|
-
const { startValue: k } = (
|
|
786
|
-
k < h && g === !1 && f === !1 && (g = !0, Fe("history")),
|
|
787
|
+
const { startValue: k } = (s = (l = e == null ? void 0 : e.getOption()) == null ? void 0 : l.dataZoom) == null ? void 0 : s[0];
|
|
788
|
+
k < h && g === !1 && f === !1 && (g = !0, Fe("history")), le();
|
|
787
789
|
}
|
|
788
|
-
clearTimeout(
|
|
790
|
+
clearTimeout(c);
|
|
789
791
|
}, 100);
|
|
790
792
|
}), e == null || e.on("highlight", (t) => {
|
|
791
793
|
var m, y;
|
|
@@ -813,19 +815,19 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
813
815
|
}, pe = async () => {
|
|
814
816
|
var r, t, h, m, y, l;
|
|
815
817
|
try {
|
|
816
|
-
if (!
|
|
818
|
+
if (!o.variety || !o.cycle)
|
|
817
819
|
return;
|
|
818
|
-
const { variety:
|
|
819
|
-
variety:
|
|
820
|
+
const { variety: s, featureId: k, cycle: F, indicatorStore: Y, mainIndicator: q, right: z, startTime: j, endTime: R } = o, { defaultShowCounts: $, addCounts: _, showWarningLine: me, getFactorData: ie } = H.value, O = {
|
|
821
|
+
variety: s,
|
|
820
822
|
featureId: k,
|
|
821
823
|
cycle: F,
|
|
822
824
|
mainIndicatorList: Y.getIndicatorParams(q),
|
|
823
825
|
subIndicator: P.value,
|
|
824
826
|
right: z,
|
|
825
827
|
showWarningLine: me,
|
|
826
|
-
getFactorData:
|
|
828
|
+
getFactorData: ie
|
|
827
829
|
};
|
|
828
|
-
j && R ? (O.startTime = j, O.endTime = R) : j ? (O.startTime = j, O.limit = $ + _) : R ? (O.endTime = R, O.limit = $ + _) : (O.endTime =
|
|
830
|
+
j && R ? (O.startTime = j, O.endTime = R) : j ? (O.startTime = j, O.limit = $ + _) : R ? (O.endTime = R, O.limit = $ + _) : (O.endTime = d().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), O.limit = $ + _);
|
|
829
831
|
const W = await Ge(O);
|
|
830
832
|
if ((h = (t = (r = W == null ? void 0 : W.body) == null ? void 0 : r.kline) == null ? void 0 : t.time) != null && h.length)
|
|
831
833
|
b.value = !1, x.value = !1;
|
|
@@ -833,18 +835,18 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
833
835
|
b.value = !0, x.value = !1;
|
|
834
836
|
return;
|
|
835
837
|
}
|
|
836
|
-
I.value = (m = W == null ? void 0 : W.body) == null ? void 0 : m.kline, p.value = ((y = W == null ? void 0 : W.body) == null ? void 0 : y.warningLine) || [], he(),
|
|
837
|
-
} catch (
|
|
838
|
-
throw x.value = !0, b.value = !1, new Error(
|
|
838
|
+
I.value = (m = W == null ? void 0 : W.body) == null ? void 0 : m.kline, p.value = ((y = W == null ? void 0 : W.body) == null ? void 0 : y.warningLine) || [], he(), le(), ie && v("getFactorData", (l = W == null ? void 0 : W.body) == null ? void 0 : l.factor);
|
|
839
|
+
} catch (s) {
|
|
840
|
+
throw x.value = !0, b.value = !1, new Error(s);
|
|
839
841
|
}
|
|
840
842
|
}, Fe = async (r) => {
|
|
841
|
-
const { variety: t, cycle: h, indicatorStore: m, mainIndicator: y, right: l } =
|
|
843
|
+
const { variety: t, cycle: h, indicatorStore: m, mainIndicator: y, right: l } = o, { addCounts: s } = H.value, { time: k } = I.value;
|
|
842
844
|
if (r === "history") {
|
|
843
845
|
const F = await Je({
|
|
844
846
|
variety: t,
|
|
845
847
|
cycle: h,
|
|
846
848
|
endTime: k[0],
|
|
847
|
-
limit:
|
|
849
|
+
limit: s,
|
|
848
850
|
mainIndicatorList: m.getIndicatorParams(y),
|
|
849
851
|
subIndicator: P.value,
|
|
850
852
|
right: l
|
|
@@ -866,35 +868,35 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
866
868
|
data: [...((z = F.body.subIndicator[q]) == null ? void 0 : z.data) ?? [], ...Y.data.slice(1)]
|
|
867
869
|
};
|
|
868
870
|
})
|
|
869
|
-
}, he(!0), F.body.data.length <
|
|
871
|
+
}, he(!0), F.body.data.length < s && (f = !0), g = !1;
|
|
870
872
|
}
|
|
871
873
|
}, he = (r = !1) => {
|
|
872
874
|
var q, z, j;
|
|
873
875
|
Le();
|
|
874
|
-
const { time: t } = I.value, { gridRight: h, gridLeft: m, defaultShowCounts: y, maxShowCounts: l, showSubChart:
|
|
876
|
+
const { time: t } = I.value, { gridRight: h, gridLeft: m, defaultShowCounts: y, maxShowCounts: l, showSubChart: s } = H.value;
|
|
875
877
|
let k = t.length - 1 - y, F = t.length - 1;
|
|
876
878
|
if (r) {
|
|
877
|
-
const R = e.getOption(), $ = (z = (q = R == null ? void 0 : R.xAxis) == null ? void 0 : q[0]) == null ? void 0 : z.data, _ = (j = R == null ? void 0 : R.dataZoom) == null ? void 0 : j[0], me = $[_ == null ? void 0 : _.startValue],
|
|
878
|
-
k = t.findIndex((O) => O === me), F = t.findIndex((O) => O ===
|
|
879
|
+
const R = e.getOption(), $ = (z = (q = R == null ? void 0 : R.xAxis) == null ? void 0 : q[0]) == null ? void 0 : z.data, _ = (j = R == null ? void 0 : R.dataZoom) == null ? void 0 : j[0], me = $[_ == null ? void 0 : _.startValue], ie = $[_ == null ? void 0 : _.endValue];
|
|
880
|
+
k = t.findIndex((O) => O === me), F = t.findIndex((O) => O === ie);
|
|
879
881
|
}
|
|
880
|
-
const Y = nt(I.value, H.value, k, F,
|
|
881
|
-
if (e.setOption(Y, !0), L.value = F,
|
|
882
|
+
const Y = nt(I.value, H.value, k, F, o.cycle);
|
|
883
|
+
if (e.setOption(Y, !0), L.value = F, o.brushRange) {
|
|
882
884
|
let R = null, $ = null;
|
|
883
|
-
switch (
|
|
885
|
+
switch (o.cycle) {
|
|
884
886
|
case "6": {
|
|
885
|
-
R = t.find((_) => new Date(_).getTime() >= new Date(
|
|
887
|
+
R = t.find((_) => new Date(_).getTime() >= new Date(o.brushRange[0]).getTime() || d(_).format("YYYY-MM-DD") === d(o.brushRange[0]).format("YYYY-MM-DD")), $ = t.findLast((_) => new Date(_).getTime() <= new Date(o.brushRange[1]).getTime() || d(_).format("YYYY-MM-DD") === d(o.brushRange[1]).format("YYYY-MM-DD"));
|
|
886
888
|
break;
|
|
887
889
|
}
|
|
888
890
|
case "7": {
|
|
889
|
-
R = t.find((_) =>
|
|
891
|
+
R = t.find((_) => d(_).day(5).format("YYYY-MM-DD") === d(o.brushRange[0]).day(5).format("YYYY-MM-DD")), $ = t.findLast((_) => d(_).day(5).format("YYYY-MM-DD") === d(o.brushRange[1]).day(5).format("YYYY-MM-DD"));
|
|
890
892
|
break;
|
|
891
893
|
}
|
|
892
894
|
case "8": {
|
|
893
|
-
R = t.find((_) =>
|
|
895
|
+
R = t.find((_) => d(_).endOf("month").format("YYYY-MM-DD") === d(o.brushRange[0]).endOf("month").format("YYYY-MM-DD")), $ = t.findLast((_) => d(_).endOf("month").format("YYYY-MM-DD") === d(o.brushRange[1]).endOf("month").format("YYYY-MM-DD"));
|
|
894
896
|
break;
|
|
895
897
|
}
|
|
896
898
|
default:
|
|
897
|
-
R = t.find((_) => new Date(_).getTime() >= new Date(
|
|
899
|
+
R = t.find((_) => new Date(_).getTime() >= new Date(o.brushRange[0]).getTime()), $ = t.findLast((_) => new Date(_).getTime() <= new Date(o.brushRange[1]).getTime());
|
|
898
900
|
}
|
|
899
901
|
console.log(R, $), e.dispatchAction({
|
|
900
902
|
type: "brush",
|
|
@@ -907,8 +909,8 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
907
909
|
]
|
|
908
910
|
});
|
|
909
911
|
}
|
|
910
|
-
|
|
911
|
-
},
|
|
912
|
+
s && M.value.draw({ startValue: k, endValue: F, maxValueSpan: l }, { gridLeft: m, gridRight: h }), _e();
|
|
913
|
+
}, le = () => {
|
|
912
914
|
if (!e)
|
|
913
915
|
return;
|
|
914
916
|
const r = e == null ? void 0 : e.getOption();
|
|
@@ -916,8 +918,8 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
916
918
|
{
|
|
917
919
|
...r,
|
|
918
920
|
graphic: [
|
|
919
|
-
...
|
|
920
|
-
|
|
921
|
+
...at(e, p.value, o, H.value, () => {
|
|
922
|
+
re();
|
|
921
923
|
})
|
|
922
924
|
]
|
|
923
925
|
},
|
|
@@ -925,28 +927,28 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
925
927
|
), _e());
|
|
926
928
|
}, _e = () => {
|
|
927
929
|
const { time: r } = I.value;
|
|
928
|
-
if (
|
|
929
|
-
let t =
|
|
930
|
-
switch (
|
|
930
|
+
if (o.brushRange && (r != null && r.length)) {
|
|
931
|
+
let t = d(o.brushRange[0]).format("YYYY-MM-DD 00:00:00"), h = d(o.brushRange[1]).format("YYYY-MM-DD 23:59:59"), m = null, y = null;
|
|
932
|
+
switch (o.cycle) {
|
|
931
933
|
case "6": {
|
|
932
|
-
m = r.find((l) =>
|
|
934
|
+
m = r.find((l) => d(l).format("YYYY-MM-DD") === d(t).format("YYYY-MM-DD")), y = m;
|
|
933
935
|
break;
|
|
934
936
|
}
|
|
935
937
|
case "7": {
|
|
936
|
-
m = r.find((l) =>
|
|
938
|
+
m = r.find((l) => d(l).day(5).format("YYYY-MM-DD") === d(t).day(5).format("YYYY-MM-DD")), y = r.findLast((l) => d(l).day(5).format("YYYY-MM-DD") === d(h).day(5).format("YYYY-MM-DD"));
|
|
937
939
|
break;
|
|
938
940
|
}
|
|
939
941
|
case "8": {
|
|
940
|
-
m = r.find((l) =>
|
|
942
|
+
m = r.find((l) => d(l).endOf("month").format("YYYY-MM-DD") === d(t).endOf("month").format("YYYY-MM-DD")), y = r.findLast((l) => d(l).endOf("month").format("YYYY-MM-DD") === d(h).endOf("month").format("YYYY-MM-DD"));
|
|
941
943
|
break;
|
|
942
944
|
}
|
|
943
945
|
default:
|
|
944
946
|
m = r.find((l) => {
|
|
945
|
-
const
|
|
946
|
-
return
|
|
947
|
+
const s = d(l).format("YYYY-MM-DD") === d(t).format("YYYY-MM-DD"), k = new Date(l).getTime() >= new Date(t).getTime();
|
|
948
|
+
return s && k;
|
|
947
949
|
}), y = r.findLast((l) => {
|
|
948
|
-
const
|
|
949
|
-
return
|
|
950
|
+
const s = d(l).format("YYYY-MM-DD") === d(h).format("YYYY-MM-DD"), k = new Date(l).getTime() <= new Date(h).getTime();
|
|
951
|
+
return s && k;
|
|
950
952
|
});
|
|
951
953
|
}
|
|
952
954
|
e.dispatchAction({
|
|
@@ -960,22 +962,22 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
960
962
|
]
|
|
961
963
|
});
|
|
962
964
|
}
|
|
963
|
-
},
|
|
964
|
-
const r = await et({ featureId:
|
|
965
|
-
p.value = (r == null ? void 0 : r.body) || [],
|
|
965
|
+
}, re = async () => {
|
|
966
|
+
const r = await et({ featureId: o.featureId });
|
|
967
|
+
p.value = (r == null ? void 0 : r.body) || [], le(), v("change", "warningLine", p.value);
|
|
966
968
|
}, Re = async (r) => {
|
|
967
|
-
const { variety: t, varietyName: h, featureId: m, featureType: y } =
|
|
969
|
+
const { variety: t, varietyName: h, featureId: m, featureType: y } = o;
|
|
968
970
|
if (r.key === "drawWarningLine") {
|
|
969
|
-
const l = e == null ? void 0 : e.getOption(),
|
|
971
|
+
const l = e == null ? void 0 : e.getOption(), s = l.tooltip[0];
|
|
970
972
|
e == null || e.setOption({
|
|
971
973
|
...l,
|
|
972
974
|
// 指示器样式
|
|
973
975
|
tooltip: {
|
|
974
|
-
...
|
|
976
|
+
...s,
|
|
975
977
|
// 坐标轴指示器
|
|
976
978
|
axisPointer: {
|
|
977
979
|
// 保留原有部分配置
|
|
978
|
-
...
|
|
980
|
+
...s.axisPointer,
|
|
979
981
|
// X轴指示线的宽度
|
|
980
982
|
lineStyle: {
|
|
981
983
|
width: 0
|
|
@@ -987,7 +989,7 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
987
989
|
// 文本标签
|
|
988
990
|
label: {
|
|
989
991
|
// 保留原有部分配置
|
|
990
|
-
...
|
|
992
|
+
...s.axisPointer.label,
|
|
991
993
|
// 颜色改为透明
|
|
992
994
|
backgroundColor: "transparent",
|
|
993
995
|
// 仅显示Y轴值
|
|
@@ -1003,9 +1005,9 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1003
1005
|
...l,
|
|
1004
1006
|
// 指示器样式
|
|
1005
1007
|
tooltip: {
|
|
1006
|
-
...
|
|
1008
|
+
...s,
|
|
1007
1009
|
axisPointer: {
|
|
1008
|
-
...
|
|
1010
|
+
...s.axisPointer,
|
|
1009
1011
|
lineStyle: {
|
|
1010
1012
|
width: 1
|
|
1011
1013
|
},
|
|
@@ -1013,7 +1015,7 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1013
1015
|
width: 1
|
|
1014
1016
|
},
|
|
1015
1017
|
label: {
|
|
1016
|
-
...
|
|
1018
|
+
...s.axisPointer.label,
|
|
1017
1019
|
backgroundColor: null
|
|
1018
1020
|
}
|
|
1019
1021
|
}
|
|
@@ -1028,13 +1030,13 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1028
1030
|
featureType: y,
|
|
1029
1031
|
//品种类型
|
|
1030
1032
|
warnPrice: q
|
|
1031
|
-
}),
|
|
1033
|
+
}), ue.success("画线预警成功!"), re();
|
|
1032
1034
|
};
|
|
1033
1035
|
e == null || e.getZr().on("mousedown", k);
|
|
1034
1036
|
} else
|
|
1035
|
-
r.key === "deleteWarningLine" ? (await tt({ id: N.value.id }),
|
|
1037
|
+
r.key === "deleteWarningLine" ? (await tt({ id: N.value.id }), ue.success("画线预警删除成功"), re()) : r.key === "changeWarningLine" && (C.value = !0, oe.value = N.value.warnPrice);
|
|
1036
1038
|
}, Ve = async () => {
|
|
1037
|
-
const { variety: r, varietyName: t, featureId: h, featureType: m } =
|
|
1039
|
+
const { variety: r, varietyName: t, featureId: h, featureType: m } = o;
|
|
1038
1040
|
await Se({
|
|
1039
1041
|
id: N.value.id,
|
|
1040
1042
|
featureCode: r,
|
|
@@ -1046,22 +1048,22 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1046
1048
|
featureType: m,
|
|
1047
1049
|
//品种类型
|
|
1048
1050
|
warnPrice: oe.value
|
|
1049
|
-
}),
|
|
1051
|
+
}), ue.success("画线预警修改成功"), re();
|
|
1050
1052
|
}, Ee = () => {
|
|
1051
|
-
fe.value = [...
|
|
1053
|
+
fe.value = [...i];
|
|
1052
1054
|
};
|
|
1053
1055
|
return w({
|
|
1054
1056
|
draw: (r, t) => {
|
|
1055
|
-
r === "warningLine" && (p.value = t,
|
|
1057
|
+
r === "warningLine" && (p.value = t, le());
|
|
1056
1058
|
}
|
|
1057
1059
|
}), (r, t) => {
|
|
1058
1060
|
var F;
|
|
1059
|
-
const h = Pe, m = We, y = Oe, l = $e,
|
|
1060
|
-
return A(), E(
|
|
1061
|
+
const h = Pe, m = We, y = Oe, l = $e, s = Be, k = Ie;
|
|
1062
|
+
return A(), E(ee, null, [
|
|
1061
1063
|
U("div", {
|
|
1062
1064
|
class: "klineBasic",
|
|
1063
|
-
onMousemove: t[1] || (t[1] = (Y) =>
|
|
1064
|
-
onMouseout: t[2] || (t[2] = (Y) =>
|
|
1065
|
+
onMousemove: t[1] || (t[1] = (Y) => a.value = !0),
|
|
1066
|
+
onMouseout: t[2] || (t[2] = (Y) => a.value = !1)
|
|
1065
1067
|
}, [
|
|
1066
1068
|
U("div", bt, [
|
|
1067
1069
|
B(it, {
|
|
@@ -1083,14 +1085,14 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1083
1085
|
borderRight: 0
|
|
1084
1086
|
} }, {
|
|
1085
1087
|
default: K(() => [
|
|
1086
|
-
(A(!0), E(
|
|
1088
|
+
(A(!0), E(ee, null, ce(fe.value, (Y) => (A(), Me(h, {
|
|
1087
1089
|
style: { height: "36px" },
|
|
1088
1090
|
key: Y.key,
|
|
1089
1091
|
index: Y.key,
|
|
1090
1092
|
onClick: (q) => Re(Y)
|
|
1091
1093
|
}, {
|
|
1092
1094
|
default: K(() => [
|
|
1093
|
-
|
|
1095
|
+
se(te(Y.label), 1)
|
|
1094
1096
|
]),
|
|
1095
1097
|
_: 2
|
|
1096
1098
|
}, 1032, ["index", "onClick"]))), 128))
|
|
@@ -1119,24 +1121,24 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1119
1121
|
activeIndex: L.value,
|
|
1120
1122
|
subIndicatorList: (F = n.indicatorStore) == null ? void 0 : F.subIndicatorList
|
|
1121
1123
|
}, null, 8, ["modelValue", "data", "cycle", "activeIndex", "subIndicatorList"])
|
|
1122
|
-
])) :
|
|
1124
|
+
])) : J("", !0),
|
|
1123
1125
|
b.value ? (A(), E("div", ht, [
|
|
1124
1126
|
B(y, {
|
|
1125
1127
|
class: "klineBasic-empty-content",
|
|
1126
1128
|
description: "暂无数据"
|
|
1127
1129
|
})
|
|
1128
|
-
])) :
|
|
1130
|
+
])) : J("", !0),
|
|
1129
1131
|
x.value ? (A(), E("div", _t, [
|
|
1130
1132
|
Yt,
|
|
1131
1133
|
U("div", wt, [
|
|
1132
1134
|
B(l, { onClick: pe }, {
|
|
1133
1135
|
default: K(() => [
|
|
1134
|
-
|
|
1136
|
+
se("刷新")
|
|
1135
1137
|
]),
|
|
1136
1138
|
_: 1
|
|
1137
1139
|
})
|
|
1138
1140
|
])
|
|
1139
|
-
])) :
|
|
1141
|
+
])) : J("", !0)
|
|
1140
1142
|
], 32),
|
|
1141
1143
|
B(k, {
|
|
1142
1144
|
modelValue: C.value,
|
|
@@ -1151,7 +1153,7 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1151
1153
|
onClick: t[4] || (t[4] = (Y) => C.value = !1)
|
|
1152
1154
|
}, {
|
|
1153
1155
|
default: K(() => [
|
|
1154
|
-
|
|
1156
|
+
se("取消")
|
|
1155
1157
|
]),
|
|
1156
1158
|
_: 1
|
|
1157
1159
|
}),
|
|
@@ -1160,7 +1162,7 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1160
1162
|
onClick: Ve
|
|
1161
1163
|
}, {
|
|
1162
1164
|
default: K(() => [
|
|
1163
|
-
|
|
1165
|
+
se("确定")
|
|
1164
1166
|
]),
|
|
1165
1167
|
_: 1
|
|
1166
1168
|
})
|
|
@@ -1168,7 +1170,7 @@ const Te = (n) => (Ne("data-v-e675b051"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1168
1170
|
]),
|
|
1169
1171
|
default: K(() => [
|
|
1170
1172
|
Dt,
|
|
1171
|
-
B(
|
|
1173
|
+
B(s, {
|
|
1172
1174
|
modelValue: oe.value,
|
|
1173
1175
|
"onUpdate:modelValue": t[3] || (t[3] = (Y) => oe.value = Y),
|
|
1174
1176
|
placeholder: "输入预警价格"
|