st-comp 0.0.224 → 0.0.225
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/CustomFunction.cjs +2 -8
- package/es/CustomFunction.js +268 -348
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +189 -189
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +4 -4
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +161 -167
- package/lib/{index-f21f4ed2.js → index-e729ead8.js} +11901 -11981
- package/lib/{python-dfab6a0b.js → python-185d0316.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/CustomFunction/components/ManageDialog.vue +4 -78
- package/packages/KlineBasic/components/Tips/index.vue +3 -1
package/es/KlineBasic.js
CHANGED
|
@@ -3,14 +3,14 @@ import { E as Ie } from "./el-dialog-41ab8417.js";
|
|
|
3
3
|
import "./el-overlay-09ad71cd.js";
|
|
4
4
|
import "./el-input-2f75c4ba.js";
|
|
5
5
|
import { E as Be } from "./el-input-number-5193fe6d.js";
|
|
6
|
-
import { E as
|
|
7
|
-
import { E as
|
|
6
|
+
import { E as $e } from "./el-button-c95adb85.js";
|
|
7
|
+
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
11
|
import { defineComponent as ve, ref as S, watch as ye, nextTick as ge, openBlock as A, createElementBlock as E, Fragment as Q, renderList as ue, normalizeStyle as ce, toDisplayString as ee, computed as te, createVNode as B, onMounted as De, onUnmounted as ke, createElementVNode as U, withCtx as K, createBlock as Me, createCommentVNode as G, renderSlot as Ye, createTextVNode as ie, pushScopeId as Ne, popScopeId as qe } from "vue";
|
|
12
12
|
import * as me from "echarts";
|
|
13
|
-
import { d as
|
|
13
|
+
import { d as c } from "./dayjs.min-8313b006.js";
|
|
14
14
|
import { y as Ce, v as ze, U as Ke, K as Ue, V as ne, x as be, D as He } from "./index-7ed0999e.js";
|
|
15
15
|
import { E as se } from "./el-message-e544a8f5.js";
|
|
16
16
|
import { _ as X } from "./_plugin-vue_export-helper-dad06003.js";
|
|
@@ -41,28 +41,28 @@ const Xe = (n) => {
|
|
|
41
41
|
ze() && (L.headers.token = Ke());
|
|
42
42
|
},
|
|
43
43
|
handleRes: (L) => {
|
|
44
|
-
const { data:
|
|
45
|
-
if (
|
|
44
|
+
const { data: u } = L;
|
|
45
|
+
if (u.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: ne("id") }), Je = (n) => Z("/middleLayer/kline/getKline", n), Qe = async (n) => Z("/alarm/deliversign/addAlarmPrice", { ...n, userId: ne("id") }), et = async (n) => Z("/alarm/deliversign/findAlarmPriceByUserId", { ...n, userId: ne("id") }), Se = async (n) => Z("/alarm/deliversign/updateAlarmPrice", { ...n, userId: ne("id") }), tt = async (n) => Z("/alarm/deliversign/deleteAlarmPrice", { ...n, userId: ne("id") }), { round: J } = be, nt = (n, w, L,
|
|
51
|
-
const { data: e, time: D } = n, { gridTop: s, gridRight: g, gridLeft: d, maxShowCounts:
|
|
50
|
+
}, Ge = (n) => Z("/middleLayer/kline/getKlineBasic", { ...n, userId: ne("id") }), Je = (n) => Z("/middleLayer/kline/getKline", n), Qe = async (n) => Z("/alarm/deliversign/addAlarmPrice", { ...n, userId: ne("id") }), et = async (n) => Z("/alarm/deliversign/findAlarmPriceByUserId", { ...n, userId: ne("id") }), Se = async (n) => Z("/alarm/deliversign/updateAlarmPrice", { ...n, userId: ne("id") }), tt = async (n) => Z("/alarm/deliversign/deleteAlarmPrice", { ...n, userId: ne("id") }), { round: J } = be, nt = (n, w, L, u, m) => {
|
|
51
|
+
const { data: e, time: D } = n, { gridTop: s, gridRight: g, gridLeft: d, maxShowCounts: v, showSubChart: a } = w;
|
|
52
52
|
return {
|
|
53
53
|
animation: !1,
|
|
54
54
|
grid: {
|
|
55
55
|
top: `${s}px`,
|
|
56
56
|
right: `${g}px`,
|
|
57
|
-
bottom:
|
|
57
|
+
bottom: a ? "6px" : "24px",
|
|
58
58
|
left: `${d}px`
|
|
59
59
|
},
|
|
60
60
|
dataZoom: [
|
|
61
61
|
{
|
|
62
62
|
type: "inside",
|
|
63
63
|
startValue: L,
|
|
64
|
-
endValue:
|
|
65
|
-
maxValueSpan:
|
|
64
|
+
endValue: u,
|
|
65
|
+
maxValueSpan: v
|
|
66
66
|
}
|
|
67
67
|
],
|
|
68
68
|
tooltip: {
|
|
@@ -73,23 +73,23 @@ const Xe = (n) => {
|
|
|
73
73
|
type: "cross",
|
|
74
74
|
label: {
|
|
75
75
|
rich: {},
|
|
76
|
-
formatter: (
|
|
77
|
-
const { axisDimension:
|
|
78
|
-
return
|
|
76
|
+
formatter: (o) => {
|
|
77
|
+
const { axisDimension: b, value: x } = o;
|
|
78
|
+
return b === "x" ? a ? "" : ["6", "7", "8"].includes(m) ? c(x).format("YYYY-MM-DD") : x : String(J(x));
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
formatter: () => ""
|
|
83
83
|
},
|
|
84
84
|
xAxis: {
|
|
85
|
-
show: !
|
|
85
|
+
show: !a,
|
|
86
86
|
type: "category",
|
|
87
87
|
data: D,
|
|
88
88
|
splitLine: {
|
|
89
89
|
show: !1
|
|
90
90
|
},
|
|
91
91
|
axisLabel: {
|
|
92
|
-
formatter: (
|
|
92
|
+
formatter: (o) => ["6", "7", "8"].includes(m) ? c(o).format("YYYY-MM-DD") : o
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
yAxis: {
|
|
@@ -104,8 +104,8 @@ const Xe = (n) => {
|
|
|
104
104
|
color: "#333"
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
min: (
|
|
108
|
-
max: (
|
|
107
|
+
min: (o) => J(o.min),
|
|
108
|
+
max: (o) => J(o.max)
|
|
109
109
|
},
|
|
110
110
|
series: [
|
|
111
111
|
{
|
|
@@ -119,17 +119,17 @@ const Xe = (n) => {
|
|
|
119
119
|
borderWidth: 1
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
|
-
...n.mainIndicator.map((
|
|
123
|
-
name:
|
|
122
|
+
...n.mainIndicator.map((o) => ({
|
|
123
|
+
name: o.key,
|
|
124
124
|
type: "line",
|
|
125
125
|
silent: !0,
|
|
126
126
|
symbol: "none",
|
|
127
|
-
data:
|
|
127
|
+
data: o.data,
|
|
128
128
|
lineStyle: {
|
|
129
|
-
width:
|
|
129
|
+
width: o.width || 1
|
|
130
130
|
},
|
|
131
131
|
itemStyle: {
|
|
132
|
-
color:
|
|
132
|
+
color: o.color
|
|
133
133
|
}
|
|
134
134
|
}))
|
|
135
135
|
],
|
|
@@ -149,32 +149,32 @@ const Xe = (n) => {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
|
-
}, ot = (n, w, L,
|
|
153
|
-
const { variety: e, featureId: D, featureType: s } = L, { gridTop: g, gridLeft: d, gridRight:
|
|
154
|
-
return w.reduce((
|
|
155
|
-
const { warnPrice:
|
|
156
|
-
if (
|
|
157
|
-
return
|
|
152
|
+
}, ot = (n, w, L, u, m) => {
|
|
153
|
+
const { variety: e, featureId: D, featureType: s } = L, { gridTop: g, gridLeft: d, gridRight: v } = u;
|
|
154
|
+
return w.reduce((a, o) => {
|
|
155
|
+
const { warnPrice: b } = o, x = n == null ? void 0 : n.convertToPixel({ yAxisIndex: 0 }, b);
|
|
156
|
+
if (x <= g || x >= (n == null ? void 0 : n.getHeight()))
|
|
157
|
+
return a;
|
|
158
158
|
let V = 0;
|
|
159
159
|
return [
|
|
160
|
-
...
|
|
160
|
+
...a,
|
|
161
161
|
{
|
|
162
162
|
type: "group",
|
|
163
163
|
name: "warningLine",
|
|
164
|
-
info:
|
|
164
|
+
info: o,
|
|
165
165
|
draggable: "vertical",
|
|
166
166
|
children: [
|
|
167
167
|
{
|
|
168
168
|
type: "line",
|
|
169
|
-
info:
|
|
169
|
+
info: o,
|
|
170
170
|
shape: {
|
|
171
171
|
x1: d,
|
|
172
172
|
// 开始X坐标
|
|
173
|
-
y1:
|
|
173
|
+
y1: x,
|
|
174
174
|
// 开始Y坐标
|
|
175
|
-
x2: (n == null ? void 0 : n.getWidth()) -
|
|
175
|
+
x2: (n == null ? void 0 : n.getWidth()) - v,
|
|
176
176
|
// 结束X坐标
|
|
177
|
-
y2:
|
|
177
|
+
y2: x
|
|
178
178
|
// 结束Y坐标
|
|
179
179
|
},
|
|
180
180
|
style: {
|
|
@@ -186,12 +186,12 @@ const Xe = (n) => {
|
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
type: "text",
|
|
189
|
-
info:
|
|
190
|
-
x: (n == null ? void 0 : n.getWidth()) -
|
|
191
|
-
y:
|
|
189
|
+
info: o,
|
|
190
|
+
x: (n == null ? void 0 : n.getWidth()) - v,
|
|
191
|
+
y: x - 5,
|
|
192
192
|
style: {
|
|
193
193
|
fill: "#FFF",
|
|
194
|
-
text:
|
|
194
|
+
text: b,
|
|
195
195
|
stroke: "#000",
|
|
196
196
|
lineWidth: 1,
|
|
197
197
|
opacity: 1
|
|
@@ -206,7 +206,7 @@ const Xe = (n) => {
|
|
|
206
206
|
ondrag: (M) => {
|
|
207
207
|
var P;
|
|
208
208
|
if (M.target && M.target.childAt(1)) {
|
|
209
|
-
const T = n.convertFromPixel({ yAxisIndex: 0 },
|
|
209
|
+
const T = n.convertFromPixel({ yAxisIndex: 0 }, x + (M.offsetY - V));
|
|
210
210
|
(P = M.target.childAt(1)) == null || P.animate("style", !1).when(1, { text: J(T, 3) }).start();
|
|
211
211
|
}
|
|
212
212
|
},
|
|
@@ -214,8 +214,8 @@ const Xe = (n) => {
|
|
|
214
214
|
ondragend: async (M) => {
|
|
215
215
|
const T = M.offsetY - V;
|
|
216
216
|
if (T !== 0) {
|
|
217
|
-
const I = n == null ? void 0 : n.convertFromPixel({ yAxisIndex: 0 }, T +
|
|
218
|
-
id:
|
|
217
|
+
const I = n == null ? void 0 : n.convertFromPixel({ yAxisIndex: 0 }, T + x), f = {
|
|
218
|
+
id: o.id,
|
|
219
219
|
warnPrice: J(I, 3),
|
|
220
220
|
featureId: D,
|
|
221
221
|
//品种id
|
|
@@ -224,7 +224,7 @@ const Xe = (n) => {
|
|
|
224
224
|
featureType: s
|
|
225
225
|
//品种类型
|
|
226
226
|
};
|
|
227
|
-
await Se(f), se.success("画线预警修改成功"),
|
|
227
|
+
await Se(f), se.success("画线预警修改成功"), m && m();
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
}
|
|
@@ -240,15 +240,15 @@ const Xe = (n) => {
|
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
setup(n) {
|
|
243
|
-
const w = n, L = S(null),
|
|
243
|
+
const w = n, L = S(null), u = S([]);
|
|
244
244
|
return ye(() => w.data, () => {
|
|
245
|
-
|
|
246
|
-
Array.from(L.value.children).forEach((
|
|
247
|
-
var D, s, g, d,
|
|
248
|
-
((s = (D = w.data) == null ? void 0 : D[e]) == null ? void 0 : s.label) === "涨跌" ?
|
|
245
|
+
u.value.length === 0 && ge(() => {
|
|
246
|
+
Array.from(L.value.children).forEach((m, e) => {
|
|
247
|
+
var D, s, g, d, v, a, o, b;
|
|
248
|
+
((s = (D = w.data) == null ? void 0 : D[e]) == null ? void 0 : s.label) === "涨跌" ? u.value[e] = "85px" : ((d = (g = w.data) == null ? void 0 : g[e]) == null ? void 0 : d.label) === "至今涨跌" ? u.value[e] = "105px" : ((a = (v = w.data) == null ? void 0 : v[e]) == null ? void 0 : a.label) === "额" ? u.value[e] = "75px" : ["开", "高", "低", "收"].includes((b = (o = w.data) == null ? void 0 : o[e]) == null ? void 0 : b.label) ? u.value[e] = `${m.offsetWidth + 20}px` : u.value[e] = `${m.offsetWidth + 30}px`;
|
|
249
249
|
});
|
|
250
250
|
});
|
|
251
|
-
}), (
|
|
251
|
+
}), (m, e) => (A(), E("div", {
|
|
252
252
|
class: "kline-tips",
|
|
253
253
|
ref_key: "tipsRef",
|
|
254
254
|
ref: L
|
|
@@ -256,12 +256,12 @@ const Xe = (n) => {
|
|
|
256
256
|
(A(!0), E(Q, null, ue(n.data, (D, s) => (A(), E("div", {
|
|
257
257
|
key: s,
|
|
258
258
|
class: "kline-tips-item",
|
|
259
|
-
style: ce({ color: D.color, width:
|
|
259
|
+
style: ce({ color: D.color, width: u.value[s] ? u.value[s] : null })
|
|
260
260
|
}, ee(D.label) + " " + ee(D.value), 5))), 128))
|
|
261
261
|
], 512));
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
|
-
const we = /* @__PURE__ */ X(at, [["__scopeId", "data-v-
|
|
264
|
+
const we = /* @__PURE__ */ X(at, [["__scopeId", "data-v-cf8cdf15"]]);
|
|
265
265
|
const lt = { class: "kline-tips" }, rt = {
|
|
266
266
|
__name: "index",
|
|
267
267
|
props: {
|
|
@@ -276,31 +276,31 @@ const lt = { class: "kline-tips" }, rt = {
|
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
setup(n) {
|
|
279
|
-
const { round: w, formatValue: L } = be,
|
|
280
|
-
ye(() =>
|
|
281
|
-
|
|
279
|
+
const { round: w, formatValue: L } = be, u = n, m = S(null);
|
|
280
|
+
ye(() => u.activeIndex, () => {
|
|
281
|
+
m.value === null && (m.value = u.data.data[u.activeIndex][1]);
|
|
282
282
|
});
|
|
283
283
|
const e = te(() => {
|
|
284
|
-
const { data: s, activeIndex: g } =
|
|
284
|
+
const { data: s, activeIndex: g } = u;
|
|
285
285
|
if (s.data && s.data[g]) {
|
|
286
|
-
const d = s.data[g],
|
|
286
|
+
const d = s.data[g], v = [
|
|
287
287
|
{ label: "开", value: d[0] },
|
|
288
288
|
{ label: "高", value: d[3] },
|
|
289
289
|
{ label: "低", value: d[2] },
|
|
290
290
|
{ label: "收", value: d[1] }
|
|
291
291
|
];
|
|
292
|
-
d[4] !== null &&
|
|
293
|
-
let
|
|
294
|
-
d[6] > 0 ?
|
|
295
|
-
const
|
|
296
|
-
let
|
|
297
|
-
return
|
|
292
|
+
d[4] !== null && v.push({ label: "额", value: L(d[4]) });
|
|
293
|
+
let a;
|
|
294
|
+
d[6] > 0 ? a = "red" : d[6] < 0 && (a = "green"), v.push({ label: "涨跌", value: `${w(d[6])}%`, color: a });
|
|
295
|
+
const o = (m.value / d[1] - 1) * 100;
|
|
296
|
+
let b;
|
|
297
|
+
return o > 0 ? b = "red" : o < 0 && (b = "green"), v.push({ label: "至今涨幅", value: `${w(o)}%`, color: b }), v;
|
|
298
298
|
}
|
|
299
299
|
return [];
|
|
300
300
|
}), D = te(() => {
|
|
301
301
|
var d;
|
|
302
|
-
const { data: s, activeIndex: g } =
|
|
303
|
-
return ((d = s == null ? void 0 : s.mainIndicator) == null ? void 0 : d.map((
|
|
302
|
+
const { data: s, activeIndex: g } = u;
|
|
303
|
+
return ((d = s == null ? void 0 : s.mainIndicator) == null ? void 0 : d.map((v) => ({ label: v.key, value: w(v.data[g]), color: v.color }))) || [];
|
|
304
304
|
});
|
|
305
305
|
return (s, g) => (A(), E("div", lt, [
|
|
306
306
|
B(we, { data: e.value }, null, 8, ["data"]),
|
|
@@ -318,11 +318,11 @@ const lt = { class: "kline-tips" }, rt = {
|
|
|
318
318
|
},
|
|
319
319
|
setup(n) {
|
|
320
320
|
return (w, L) => (A(), E("div", st, [
|
|
321
|
-
(A(!0), E(Q, null, ue(n.data, (
|
|
322
|
-
key:
|
|
321
|
+
(A(!0), E(Q, null, ue(n.data, (u, m) => (A(), E("div", {
|
|
322
|
+
key: m,
|
|
323
323
|
class: "kline-averageTips-item",
|
|
324
|
-
style: ce({ color:
|
|
325
|
-
}, ee(
|
|
324
|
+
style: ce({ color: u.color, width: `calc(100% / ${n.data.length} - 10px)` })
|
|
325
|
+
}, ee(u.label) + " " + ee(u.value), 5))), 128))
|
|
326
326
|
]));
|
|
327
327
|
}
|
|
328
328
|
});
|
|
@@ -347,41 +347,41 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
347
347
|
},
|
|
348
348
|
emits: ["update:modelValue"],
|
|
349
349
|
setup(n, { expose: w, emit: L }) {
|
|
350
|
-
const { round:
|
|
351
|
-
let
|
|
350
|
+
const { round: u } = be;
|
|
351
|
+
let m, e;
|
|
352
352
|
const D = L, s = n, g = S(), d = te({
|
|
353
353
|
get() {
|
|
354
354
|
return s.modelValue;
|
|
355
355
|
},
|
|
356
|
-
set(
|
|
357
|
-
D("update:modelValue",
|
|
356
|
+
set(o) {
|
|
357
|
+
D("update:modelValue", o);
|
|
358
358
|
}
|
|
359
|
-
}),
|
|
360
|
-
var
|
|
361
|
-
const { data:
|
|
362
|
-
return ((
|
|
359
|
+
}), v = te(() => {
|
|
360
|
+
var x;
|
|
361
|
+
const { data: o, activeIndex: b } = s;
|
|
362
|
+
return ((x = o == null ? void 0 : o.subIndicator) == null ? void 0 : x.map((V) => ({ label: V.key, color: V.color, value: V.data[b] || "-" }))) || [];
|
|
363
363
|
});
|
|
364
364
|
De(() => {
|
|
365
|
-
|
|
366
|
-
let
|
|
365
|
+
m = me.init(g.value);
|
|
366
|
+
let o = !0;
|
|
367
367
|
e = new ResizeObserver(() => {
|
|
368
|
-
if (
|
|
369
|
-
|
|
368
|
+
if (o) {
|
|
369
|
+
o = null;
|
|
370
370
|
return;
|
|
371
371
|
}
|
|
372
|
-
|
|
372
|
+
m.resize();
|
|
373
373
|
}), e.observe(g.value);
|
|
374
374
|
}), ke(() => {
|
|
375
|
-
|
|
375
|
+
m.dispose(), e.disconnect(), e = null;
|
|
376
376
|
});
|
|
377
|
-
const
|
|
378
|
-
const
|
|
379
|
-
return
|
|
377
|
+
const a = (o, b) => {
|
|
378
|
+
const x = o[b], V = b === 0 ? o[b] : o[b - 1];
|
|
379
|
+
return x[0] === x[1] ? x[0] >= V[1] ? {
|
|
380
380
|
color: "transparent",
|
|
381
381
|
borderColor: "#FF0000"
|
|
382
382
|
} : {
|
|
383
383
|
color: "#00FFFF"
|
|
384
|
-
} :
|
|
384
|
+
} : x[1] > x[0] ? {
|
|
385
385
|
color: "transparent",
|
|
386
386
|
borderColor: "#FF0000"
|
|
387
387
|
} : {
|
|
@@ -389,13 +389,13 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
389
389
|
};
|
|
390
390
|
};
|
|
391
391
|
return w({
|
|
392
|
-
connect: (
|
|
393
|
-
me.connect([
|
|
392
|
+
connect: (o) => {
|
|
393
|
+
me.connect([o, m]);
|
|
394
394
|
},
|
|
395
395
|
// 联动
|
|
396
|
-
draw: (
|
|
396
|
+
draw: (o, b) => {
|
|
397
397
|
ge(() => {
|
|
398
|
-
const { startValue:
|
|
398
|
+
const { startValue: x, endValue: V, maxValueSpan: M } = o, { leftYAxisRange: P, rightYAxisRange: T } = s.data.subIndicator[0], I = s.data.subIndicator.map((f) => {
|
|
399
399
|
if (f.series === "bar")
|
|
400
400
|
return {
|
|
401
401
|
name: "subMain",
|
|
@@ -406,7 +406,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
406
406
|
symbol: "none",
|
|
407
407
|
data: f.data.map((N, C) => f.seriesColor === "kline" ? {
|
|
408
408
|
value: N,
|
|
409
|
-
itemStyle:
|
|
409
|
+
itemStyle: a(s.data.data, C)
|
|
410
410
|
} : f.seriesColor === "value" ? {
|
|
411
411
|
value: N,
|
|
412
412
|
itemStyle: {
|
|
@@ -436,19 +436,19 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
});
|
|
439
|
-
|
|
439
|
+
m.setOption(
|
|
440
440
|
{
|
|
441
441
|
animation: !1,
|
|
442
442
|
grid: {
|
|
443
|
-
left: `${
|
|
443
|
+
left: `${b.gridLeft}px`,
|
|
444
444
|
top: "10px",
|
|
445
|
-
right: `${
|
|
445
|
+
right: `${b.gridRight}px`,
|
|
446
446
|
bottom: "20px"
|
|
447
447
|
},
|
|
448
448
|
dataZoom: [
|
|
449
449
|
{
|
|
450
450
|
type: "inside",
|
|
451
|
-
startValue:
|
|
451
|
+
startValue: x,
|
|
452
452
|
endValue: V,
|
|
453
453
|
maxValueSpan: M
|
|
454
454
|
}
|
|
@@ -464,9 +464,9 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
464
464
|
formatter: (f) => {
|
|
465
465
|
const { axisDimension: N, value: C } = f;
|
|
466
466
|
if (N === "x")
|
|
467
|
-
return ["6", "7", "8"].includes(s.cycle) ?
|
|
467
|
+
return ["6", "7", "8"].includes(s.cycle) ? c(C).format("YYYY-MM-DD") : C;
|
|
468
468
|
if (f.axisIndex === 1)
|
|
469
|
-
return String(
|
|
469
|
+
return String(u(C));
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
},
|
|
@@ -482,7 +482,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
482
482
|
show: !1
|
|
483
483
|
},
|
|
484
484
|
axisLabel: {
|
|
485
|
-
formatter: (f) => ["6", "7", "8"].includes(s.cycle) ?
|
|
485
|
+
formatter: (f) => ["6", "7", "8"].includes(s.cycle) ? c(f).format("YYYY-MM-DD") : f
|
|
486
486
|
}
|
|
487
487
|
},
|
|
488
488
|
yAxis: [
|
|
@@ -528,20 +528,20 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
530
|
// 重置
|
|
531
|
-
}), (
|
|
532
|
-
const
|
|
531
|
+
}), (o, b) => {
|
|
532
|
+
const x = je, V = Ze;
|
|
533
533
|
return A(), E("div", dt, [
|
|
534
534
|
U("div", ft, [
|
|
535
|
-
|
|
535
|
+
v.value.length ? (A(), E("div", pt, [
|
|
536
536
|
B(V, {
|
|
537
537
|
modelValue: d.value,
|
|
538
|
-
"onUpdate:modelValue":
|
|
538
|
+
"onUpdate:modelValue": b[0] || (b[0] = (M) => d.value = M),
|
|
539
539
|
size: "small",
|
|
540
540
|
"popper-class": "element-dark",
|
|
541
541
|
class: "element-dark subIndicator"
|
|
542
542
|
}, {
|
|
543
543
|
default: K(() => [
|
|
544
|
-
(A(!0), E(Q, null, ue(n.subIndicatorList, (M) => (A(), Me(
|
|
544
|
+
(A(!0), E(Q, null, ue(n.subIndicatorList, (M) => (A(), Me(x, {
|
|
545
545
|
key: M.value,
|
|
546
546
|
label: M.label,
|
|
547
547
|
value: M.value
|
|
@@ -550,7 +550,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
550
550
|
_: 1
|
|
551
551
|
}, 8, ["modelValue"])
|
|
552
552
|
])) : G("", !0),
|
|
553
|
-
B(ct, { data:
|
|
553
|
+
B(ct, { data: v.value }, null, 8, ["data"])
|
|
554
554
|
]),
|
|
555
555
|
U("div", {
|
|
556
556
|
class: "klineSub-chart",
|
|
@@ -564,7 +564,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
564
564
|
__name: "index",
|
|
565
565
|
emits: ["closeContextMenuCallBack"],
|
|
566
566
|
setup(n, { emit: w }) {
|
|
567
|
-
const L = w,
|
|
567
|
+
const L = w, u = S(), m = S(), e = S({
|
|
568
568
|
display: "none",
|
|
569
569
|
top: "0px",
|
|
570
570
|
left: "0px"
|
|
@@ -572,22 +572,22 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
572
572
|
e.value.display = "none", L("closeContextMenuCallBack"), document.removeEventListener("click", D);
|
|
573
573
|
}, s = (g) => {
|
|
574
574
|
if (g.preventDefault(), e.value.display === "block") {
|
|
575
|
-
const { offsetX: d, offsetY:
|
|
576
|
-
if (d <=
|
|
575
|
+
const { offsetX: d, offsetY: v } = g, { offsetWidth: a, offsetHeight: o } = m.value;
|
|
576
|
+
if (d <= a && v <= o)
|
|
577
577
|
return;
|
|
578
578
|
}
|
|
579
|
-
|
|
579
|
+
u.value.click(), e.value = {
|
|
580
580
|
display: "block",
|
|
581
581
|
top: `${g.offsetY}px`,
|
|
582
582
|
left: `${g.offsetX}px`
|
|
583
583
|
}, ge(() => {
|
|
584
|
-
const d =
|
|
585
|
-
|
|
584
|
+
const d = u.value.getBoundingClientRect(), v = m.value.getBoundingClientRect();
|
|
585
|
+
v.left + v.width >= d.right && (e.value.left = `${g.offsetX - v.width}px`), v.top + v.height >= d.bottom && (console.log("高度超出"), e.value.top = `${g.offsetY - v.height}px`);
|
|
586
586
|
}), document.addEventListener("click", D);
|
|
587
587
|
};
|
|
588
588
|
return (g, d) => (A(), E("div", {
|
|
589
589
|
ref_key: "contextmenuRef",
|
|
590
|
-
ref:
|
|
590
|
+
ref: u,
|
|
591
591
|
class: "contextmenu",
|
|
592
592
|
onContextmenu: s,
|
|
593
593
|
onMouseleave: D
|
|
@@ -596,7 +596,7 @@ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
|
|
|
596
596
|
e.value.display !== "none" ? (A(), E("div", {
|
|
597
597
|
key: 0,
|
|
598
598
|
ref_key: "contextmenuContentRef",
|
|
599
|
-
ref:
|
|
599
|
+
ref: m,
|
|
600
600
|
class: "contextmenu-popover",
|
|
601
601
|
style: ce(e.value)
|
|
602
602
|
}, [
|
|
@@ -684,9 +684,9 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
684
684
|
},
|
|
685
685
|
emits: ["change", "getFactorData"],
|
|
686
686
|
setup(n, { expose: w, emit: L }) {
|
|
687
|
-
const
|
|
688
|
-
let
|
|
689
|
-
const
|
|
687
|
+
const u = [{ label: "画线预警", key: "drawWarningLine" }];
|
|
688
|
+
let m = null, e = null, D, s, g = !1, d = !1;
|
|
689
|
+
const v = L, a = n, o = S(!1), b = S(!1), x = S(!1), V = S(null), M = S(null), P = S("VOL"), T = S(0), I = S({}), f = S([]), N = S({}), C = S(!1), oe = S(""), de = S([...u]), H = te(() => ({
|
|
690
690
|
defaultShowCounts: 500,
|
|
691
691
|
// 默认展示条数
|
|
692
692
|
addCounts: 2e3,
|
|
@@ -707,34 +707,34 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
707
707
|
// 是否展示预警线
|
|
708
708
|
getFactorData: !0,
|
|
709
709
|
// 是否获取因子数据
|
|
710
|
-
...
|
|
710
|
+
...a.config
|
|
711
711
|
}));
|
|
712
712
|
ye(
|
|
713
713
|
() => {
|
|
714
714
|
var r, t;
|
|
715
|
-
return [
|
|
715
|
+
return [a.variety, a.cycle, a.mainIndicator, P.value, (r = a.indicatorStore) == null ? void 0 : r.filterIndicator, (t = a.indicatorStore) == null ? void 0 : t.customIndicator];
|
|
716
716
|
},
|
|
717
717
|
() => {
|
|
718
718
|
fe();
|
|
719
719
|
},
|
|
720
720
|
{ deep: !0 }
|
|
721
721
|
), De(() => {
|
|
722
|
-
Xe(
|
|
722
|
+
Xe(a.env), fe(), window.addEventListener("keydown", xe);
|
|
723
723
|
}), ke(() => {
|
|
724
|
-
e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(),
|
|
724
|
+
e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(), m == null || m.dispose(), window.removeEventListener("keydown", xe);
|
|
725
725
|
});
|
|
726
726
|
const Te = () => {
|
|
727
|
-
e || (e = me.init(V.value), Ae(), H.value.showSubChart && M.value.connect(e),
|
|
727
|
+
e || (e = me.init(V.value), Ae(), H.value.showSubChart && M.value.connect(e), m = He(V.value), m.listen(() => {
|
|
728
728
|
requestAnimationFrame(() => {
|
|
729
729
|
e.resize();
|
|
730
730
|
});
|
|
731
731
|
}));
|
|
732
732
|
}, xe = ({ code: r, ctrlKey: t }) => {
|
|
733
|
-
if (!(t ||
|
|
733
|
+
if (!(t || o.value))
|
|
734
734
|
return;
|
|
735
|
-
const { xAxis:
|
|
735
|
+
const { xAxis: h, dataZoom: p } = e.getOption(), { data: y } = (h == null ? void 0 : h[0]) ?? { data: [] };
|
|
736
736
|
let { startValue: l, endValue: i } = (p == null ? void 0 : p[0]) ?? {};
|
|
737
|
-
if (
|
|
737
|
+
if (y != null && y.length) {
|
|
738
738
|
switch (r) {
|
|
739
739
|
case "ArrowUp": {
|
|
740
740
|
if (i - l < 5)
|
|
@@ -753,7 +753,7 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
753
753
|
break;
|
|
754
754
|
}
|
|
755
755
|
case "ArrowRight": {
|
|
756
|
-
i <
|
|
756
|
+
i < y.length - 1 && (l += 1, i += 1), o.value && T.value < y.length - 1 && (T.value += 1);
|
|
757
757
|
break;
|
|
758
758
|
}
|
|
759
759
|
}
|
|
@@ -764,32 +764,32 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
764
764
|
}), e.dispatchAction({
|
|
765
765
|
type: "updateAxisPointer",
|
|
766
766
|
seriesIndex: 0,
|
|
767
|
-
dataIndex:
|
|
767
|
+
dataIndex: o.value ? T.value : null
|
|
768
768
|
}), e.dispatchAction({
|
|
769
769
|
type: "highlight",
|
|
770
|
-
dataIndex:
|
|
770
|
+
dataIndex: o.value ? T.value : i
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
773
|
}, Ae = () => {
|
|
774
774
|
e == null || e.on("datazoom", (t) => {
|
|
775
775
|
clearTimeout(s), s = setTimeout(() => {
|
|
776
|
-
var p,
|
|
777
|
-
const { loadCheckCounts:
|
|
778
|
-
if ((
|
|
776
|
+
var p, y, l, i;
|
|
777
|
+
const { loadCheckCounts: h } = H.value;
|
|
778
|
+
if ((y = (p = e == null ? void 0 : e.getOption()) == null ? void 0 : p.dataZoom) != null && y[0]) {
|
|
779
779
|
const { startValue: k } = (i = (l = e == null ? void 0 : e.getOption()) == null ? void 0 : l.dataZoom) == null ? void 0 : i[0];
|
|
780
|
-
k <
|
|
780
|
+
k < h && g === !1 && d === !1 && (g = !0, Fe("history")), ae();
|
|
781
781
|
}
|
|
782
782
|
clearTimeout(s);
|
|
783
783
|
}, 100);
|
|
784
784
|
}), e == null || e.on("highlight", (t) => {
|
|
785
|
-
var p,
|
|
786
|
-
let
|
|
787
|
-
t.batch && (
|
|
788
|
-
T.value =
|
|
785
|
+
var p, y;
|
|
786
|
+
let h = t.dataIndex || -1;
|
|
787
|
+
t.batch && (h = typeof ((p = t == null ? void 0 : t.batch[0]) == null ? void 0 : p.dataIndex) == "number" ? (y = t == null ? void 0 : t.batch[0]) == null ? void 0 : y.dataIndex : -1), clearTimeout(D), D = setTimeout(() => {
|
|
788
|
+
T.value = h, clearTimeout(D);
|
|
789
789
|
}, 20);
|
|
790
790
|
}), e == null || e.on("globalout", () => {
|
|
791
|
-
var
|
|
792
|
-
const t = (
|
|
791
|
+
var h, p, y;
|
|
792
|
+
const t = (y = (p = (h = e == null ? void 0 : e.getOption()) == null ? void 0 : h.dataZoom) == null ? void 0 : p[0]) == null ? void 0 : y.endValue;
|
|
793
793
|
T.value = t;
|
|
794
794
|
});
|
|
795
795
|
let r = null;
|
|
@@ -802,11 +802,11 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
802
802
|
});
|
|
803
803
|
});
|
|
804
804
|
}, fe = async () => {
|
|
805
|
-
var r, t,
|
|
805
|
+
var r, t, h, p, y, l;
|
|
806
806
|
try {
|
|
807
|
-
if (!
|
|
807
|
+
if (!a.variety || !a.cycle)
|
|
808
808
|
return;
|
|
809
|
-
const { variety: i, featureId: k, cycle: F, indicatorStore: Y, mainIndicator: q, right: z, startTime: j, endTime: R } =
|
|
809
|
+
const { variety: i, featureId: k, cycle: F, indicatorStore: Y, mainIndicator: q, right: z, startTime: j, endTime: R } = a, { defaultShowCounts: $, addCounts: _, showWarningLine: pe, getFactorData: re } = H.value, O = {
|
|
810
810
|
variety: i,
|
|
811
811
|
featureId: k,
|
|
812
812
|
cycle: F,
|
|
@@ -816,27 +816,27 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
816
816
|
showWarningLine: pe,
|
|
817
817
|
getFactorData: re
|
|
818
818
|
};
|
|
819
|
-
j && R ? (
|
|
820
|
-
const W = await Ge(
|
|
821
|
-
if ((
|
|
822
|
-
|
|
819
|
+
j && R ? (O.startTime = j, O.endTime = R) : j ? (O.startTime = j, O.limit = $ + _) : R ? (O.endTime = R, O.limit = $ + _) : (O.endTime = c().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), O.limit = $ + _);
|
|
820
|
+
const W = await Ge(O);
|
|
821
|
+
if ((h = (t = (r = W == null ? void 0 : W.body) == null ? void 0 : r.kline) == null ? void 0 : t.time) != null && h.length)
|
|
822
|
+
b.value = !1, x.value = !1;
|
|
823
823
|
else {
|
|
824
|
-
|
|
824
|
+
b.value = !0, x.value = !1;
|
|
825
825
|
return;
|
|
826
826
|
}
|
|
827
|
-
I.value = (p = W == null ? void 0 : W.body) == null ? void 0 : p.kline, f.value = ((
|
|
827
|
+
I.value = (p = W == null ? void 0 : W.body) == null ? void 0 : p.kline, f.value = ((y = W == null ? void 0 : W.body) == null ? void 0 : y.warningLine) || [], he(), ae(), re && v("getFactorData", (l = W == null ? void 0 : W.body) == null ? void 0 : l.factor);
|
|
828
828
|
} catch (i) {
|
|
829
|
-
throw
|
|
829
|
+
throw x.value = !0, b.value = !1, new Error(i);
|
|
830
830
|
}
|
|
831
831
|
}, Fe = async (r) => {
|
|
832
|
-
const { variety: t, cycle:
|
|
832
|
+
const { variety: t, cycle: h, indicatorStore: p, mainIndicator: y, right: l } = a, { addCounts: i } = H.value, { time: k } = I.value;
|
|
833
833
|
if (r === "history") {
|
|
834
834
|
const F = await Je({
|
|
835
835
|
variety: t,
|
|
836
|
-
cycle:
|
|
836
|
+
cycle: h,
|
|
837
837
|
endTime: k[0],
|
|
838
838
|
limit: i,
|
|
839
|
-
mainIndicatorList: p.getIndicatorParams(
|
|
839
|
+
mainIndicatorList: p.getIndicatorParams(y),
|
|
840
840
|
subIndicator: P.value,
|
|
841
841
|
right: l
|
|
842
842
|
});
|
|
@@ -862,43 +862,43 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
862
862
|
}, he = (r = !1) => {
|
|
863
863
|
var q, z, j;
|
|
864
864
|
Te();
|
|
865
|
-
const { time: t } = I.value, { gridRight:
|
|
866
|
-
let k = t.length - 1 -
|
|
865
|
+
const { time: t } = I.value, { gridRight: h, gridLeft: p, defaultShowCounts: y, maxShowCounts: l, showSubChart: i } = H.value;
|
|
866
|
+
let k = t.length - 1 - y, F = t.length - 1;
|
|
867
867
|
if (r) {
|
|
868
|
-
const R = e.getOption(),
|
|
869
|
-
k = t.findIndex((
|
|
868
|
+
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], pe = $[_ == null ? void 0 : _.startValue], re = $[_ == null ? void 0 : _.endValue];
|
|
869
|
+
k = t.findIndex((O) => O === pe), F = t.findIndex((O) => O === re);
|
|
870
870
|
}
|
|
871
|
-
const Y = nt(I.value, H.value, k, F,
|
|
872
|
-
if (e.setOption(Y, !0), T.value = F,
|
|
873
|
-
let R = null,
|
|
874
|
-
switch (
|
|
871
|
+
const Y = nt(I.value, H.value, k, F, a.cycle);
|
|
872
|
+
if (e.setOption(Y, !0), T.value = F, a.brushRange) {
|
|
873
|
+
let R = null, $ = null;
|
|
874
|
+
switch (a.cycle) {
|
|
875
875
|
case "6": {
|
|
876
|
-
R = t.find((
|
|
876
|
+
R = t.find((_) => new Date(_).getTime() >= new Date(a.brushRange[0]).getTime() || c(_).format("YYYY-MM-DD") === c(a.brushRange[0]).format("YYYY-MM-DD")), $ = t.findLast((_) => new Date(_).getTime() <= new Date(a.brushRange[1]).getTime() || c(_).format("YYYY-MM-DD") === c(a.brushRange[1]).format("YYYY-MM-DD"));
|
|
877
877
|
break;
|
|
878
878
|
}
|
|
879
879
|
case "7": {
|
|
880
|
-
R = t.find((
|
|
880
|
+
R = t.find((_) => c(_).day(5).format("YYYY-MM-DD") === c(a.brushRange[0]).day(5).format("YYYY-MM-DD")), $ = t.findLast((_) => c(_).day(5).format("YYYY-MM-DD") === c(a.brushRange[1]).day(5).format("YYYY-MM-DD"));
|
|
881
881
|
break;
|
|
882
882
|
}
|
|
883
883
|
case "8": {
|
|
884
|
-
R = t.find((
|
|
884
|
+
R = t.find((_) => c(_).endOf("month").format("YYYY-MM-DD") === c(a.brushRange[0]).endOf("month").format("YYYY-MM-DD")), $ = t.findLast((_) => c(_).endOf("month").format("YYYY-MM-DD") === c(a.brushRange[1]).endOf("month").format("YYYY-MM-DD"));
|
|
885
885
|
break;
|
|
886
886
|
}
|
|
887
887
|
default:
|
|
888
|
-
R = t.find((
|
|
888
|
+
R = t.find((_) => new Date(_).getTime() >= new Date(a.brushRange[0]).getTime()), $ = t.findLast((_) => new Date(_).getTime() <= new Date(a.brushRange[1]).getTime());
|
|
889
889
|
}
|
|
890
|
-
console.log(R,
|
|
890
|
+
console.log(R, $), e.dispatchAction({
|
|
891
891
|
type: "brush",
|
|
892
892
|
areas: [
|
|
893
893
|
{
|
|
894
894
|
brushType: "lineX",
|
|
895
|
-
coordRange: [R,
|
|
895
|
+
coordRange: [R, $],
|
|
896
896
|
xAxisIndex: 0
|
|
897
897
|
}
|
|
898
898
|
]
|
|
899
899
|
});
|
|
900
900
|
}
|
|
901
|
-
i && M.value.draw({ startValue: k, endValue: F, maxValueSpan: l }, { gridLeft: p, gridRight:
|
|
901
|
+
i && M.value.draw({ startValue: k, endValue: F, maxValueSpan: l }, { gridLeft: p, gridRight: h }), _e();
|
|
902
902
|
}, ae = () => {
|
|
903
903
|
if (!e)
|
|
904
904
|
return;
|
|
@@ -907,7 +907,7 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
907
907
|
{
|
|
908
908
|
...r,
|
|
909
909
|
graphic: [
|
|
910
|
-
...ot(e, f.value,
|
|
910
|
+
...ot(e, f.value, a, H.value, () => {
|
|
911
911
|
le();
|
|
912
912
|
})
|
|
913
913
|
]
|
|
@@ -916,27 +916,27 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
916
916
|
), _e());
|
|
917
917
|
}, _e = () => {
|
|
918
918
|
const { time: r } = I.value;
|
|
919
|
-
if (
|
|
920
|
-
let t =
|
|
921
|
-
switch (
|
|
919
|
+
if (a.brushRange && (r != null && r.length)) {
|
|
920
|
+
let t = c(a.brushRange[0]).format("YYYY-MM-DD 00:00:00"), h = c(a.brushRange[1]).format("YYYY-MM-DD 23:59:59"), p = null, y = null;
|
|
921
|
+
switch (a.cycle) {
|
|
922
922
|
case "6": {
|
|
923
|
-
p = r.find((l) =>
|
|
923
|
+
p = r.find((l) => c(l).format("YYYY-MM-DD") === c(t).format("YYYY-MM-DD")), y = p;
|
|
924
924
|
break;
|
|
925
925
|
}
|
|
926
926
|
case "7": {
|
|
927
|
-
p = r.find((l) =>
|
|
927
|
+
p = r.find((l) => c(l).day(5).format("YYYY-MM-DD") === c(t).day(5).format("YYYY-MM-DD")), y = r.findLast((l) => c(l).day(5).format("YYYY-MM-DD") === c(h).day(5).format("YYYY-MM-DD"));
|
|
928
928
|
break;
|
|
929
929
|
}
|
|
930
930
|
case "8": {
|
|
931
|
-
p = r.find((l) =>
|
|
931
|
+
p = r.find((l) => c(l).endOf("month").format("YYYY-MM-DD") === c(t).endOf("month").format("YYYY-MM-DD")), y = r.findLast((l) => c(l).endOf("month").format("YYYY-MM-DD") === c(h).endOf("month").format("YYYY-MM-DD"));
|
|
932
932
|
break;
|
|
933
933
|
}
|
|
934
934
|
default:
|
|
935
935
|
p = r.find((l) => {
|
|
936
|
-
const i =
|
|
936
|
+
const i = c(l).format("YYYY-MM-DD") === c(t).format("YYYY-MM-DD"), k = new Date(l).getTime() >= new Date(t).getTime();
|
|
937
937
|
return i && k;
|
|
938
|
-
}),
|
|
939
|
-
const i =
|
|
938
|
+
}), y = r.findLast((l) => {
|
|
939
|
+
const i = c(l).format("YYYY-MM-DD") === c(h).format("YYYY-MM-DD"), k = new Date(l).getTime() <= new Date(h).getTime();
|
|
940
940
|
return i && k;
|
|
941
941
|
});
|
|
942
942
|
}
|
|
@@ -945,17 +945,17 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
945
945
|
areas: [
|
|
946
946
|
{
|
|
947
947
|
brushType: "lineX",
|
|
948
|
-
coordRange: [p,
|
|
948
|
+
coordRange: [p, y],
|
|
949
949
|
xAxisIndex: 0
|
|
950
950
|
}
|
|
951
951
|
]
|
|
952
952
|
});
|
|
953
953
|
}
|
|
954
954
|
}, le = async () => {
|
|
955
|
-
const r = await et({ featureId:
|
|
956
|
-
f.value = (r == null ? void 0 : r.body) || [], ae(),
|
|
955
|
+
const r = await et({ featureId: a.featureId });
|
|
956
|
+
f.value = (r == null ? void 0 : r.body) || [], ae(), v("change", "warningLine", f.value);
|
|
957
957
|
}, Re = async (r) => {
|
|
958
|
-
const { variety: t, varietyName:
|
|
958
|
+
const { variety: t, varietyName: h, featureId: p, featureType: y } = a;
|
|
959
959
|
if (r.key === "drawWarningLine") {
|
|
960
960
|
const l = e == null ? void 0 : e.getOption(), i = l.tooltip[0];
|
|
961
961
|
e == null || e.setOption({
|
|
@@ -1012,11 +1012,11 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1012
1012
|
}), await Qe({
|
|
1013
1013
|
featureCode: t,
|
|
1014
1014
|
//品种代码
|
|
1015
|
-
featureName:
|
|
1015
|
+
featureName: h,
|
|
1016
1016
|
//品种名称
|
|
1017
1017
|
featureId: p,
|
|
1018
1018
|
//品种id
|
|
1019
|
-
featureType:
|
|
1019
|
+
featureType: y,
|
|
1020
1020
|
//品种类型
|
|
1021
1021
|
warnPrice: q
|
|
1022
1022
|
}), se.success("画线预警成功!"), le();
|
|
@@ -1025,21 +1025,21 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1025
1025
|
} else
|
|
1026
1026
|
r.key === "deleteWarningLine" ? (await tt({ id: N.value.id }), se.success("画线预警删除成功"), le()) : r.key === "changeWarningLine" && (C.value = !0, oe.value = N.value.warnPrice);
|
|
1027
1027
|
}, Ve = async () => {
|
|
1028
|
-
const { variety: r, varietyName: t, featureId:
|
|
1028
|
+
const { variety: r, varietyName: t, featureId: h, featureType: p } = a;
|
|
1029
1029
|
await Se({
|
|
1030
1030
|
id: N.value.id,
|
|
1031
1031
|
featureCode: r,
|
|
1032
1032
|
//品种代码
|
|
1033
1033
|
featureName: t,
|
|
1034
1034
|
//品种名称
|
|
1035
|
-
featureId:
|
|
1035
|
+
featureId: h,
|
|
1036
1036
|
//品种id
|
|
1037
1037
|
featureType: p,
|
|
1038
1038
|
//品种类型
|
|
1039
1039
|
warnPrice: oe.value
|
|
1040
1040
|
}), se.success("画线预警修改成功"), le();
|
|
1041
1041
|
}, Ee = () => {
|
|
1042
|
-
de.value = [...
|
|
1042
|
+
de.value = [...u];
|
|
1043
1043
|
};
|
|
1044
1044
|
return w({
|
|
1045
1045
|
draw: (r, t) => {
|
|
@@ -1047,12 +1047,12 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1047
1047
|
}
|
|
1048
1048
|
}), (r, t) => {
|
|
1049
1049
|
var F;
|
|
1050
|
-
const
|
|
1050
|
+
const h = Pe, p = We, y = Oe, l = $e, i = Be, k = Ie;
|
|
1051
1051
|
return A(), E(Q, null, [
|
|
1052
1052
|
U("div", {
|
|
1053
1053
|
class: "klineBasic",
|
|
1054
|
-
onMousemove: t[1] || (t[1] = (Y) =>
|
|
1055
|
-
onMouseout: t[2] || (t[2] = (Y) =>
|
|
1054
|
+
onMousemove: t[1] || (t[1] = (Y) => o.value = !0),
|
|
1055
|
+
onMouseout: t[2] || (t[2] = (Y) => o.value = !1)
|
|
1056
1056
|
}, [
|
|
1057
1057
|
U("div", bt, [
|
|
1058
1058
|
B(it, {
|
|
@@ -1073,7 +1073,7 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1073
1073
|
borderRight: 0
|
|
1074
1074
|
} }, {
|
|
1075
1075
|
default: K(() => [
|
|
1076
|
-
(A(!0), E(Q, null, ue(de.value, (Y) => (A(), Me(
|
|
1076
|
+
(A(!0), E(Q, null, ue(de.value, (Y) => (A(), Me(h, {
|
|
1077
1077
|
style: { height: "36px" },
|
|
1078
1078
|
key: Y.key,
|
|
1079
1079
|
index: Y.key,
|
|
@@ -1110,13 +1110,13 @@ const Le = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), bt = { class: "klin
|
|
|
1110
1110
|
subIndicatorList: (F = n.indicatorStore) == null ? void 0 : F.subIndicatorList
|
|
1111
1111
|
}, null, 8, ["modelValue", "data", "cycle", "activeIndex", "subIndicatorList"])
|
|
1112
1112
|
])) : G("", !0),
|
|
1113
|
-
|
|
1114
|
-
B(
|
|
1113
|
+
b.value ? (A(), E("div", ht, [
|
|
1114
|
+
B(y, {
|
|
1115
1115
|
class: "klineBasic-empty-content",
|
|
1116
1116
|
description: "暂无数据"
|
|
1117
1117
|
})
|
|
1118
1118
|
])) : G("", !0),
|
|
1119
|
-
|
|
1119
|
+
x.value ? (A(), E("div", _t, [
|
|
1120
1120
|
Yt,
|
|
1121
1121
|
U("div", wt, [
|
|
1122
1122
|
B(l, { onClick: fe }, {
|