st-comp 0.0.91 → 0.0.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/components.d.ts +0 -12
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +2 -2
  4. package/es/Dialog.cjs +5 -1
  5. package/es/Dialog.js +711 -45
  6. package/es/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +1 -410
  8. package/es/Kline.cjs +1 -1
  9. package/es/Kline.js +91 -92
  10. package/es/KlineNew.cjs +1 -1
  11. package/es/KlineNew.js +9 -10
  12. package/es/Pagination.cjs +1 -1
  13. package/es/Pagination.js +104 -106
  14. package/es/Table.cjs +20 -1
  15. package/es/Table.js +4254 -362
  16. package/es/VarietySearch.cjs +1 -1
  17. package/es/VarietySearch.js +1 -2015
  18. package/es/VirtualTable.cjs +2 -2
  19. package/es/VirtualTable.js +254 -249
  20. package/es/base-8aa55db5.js +725 -0
  21. package/es/base-b187e78f.cjs +9 -0
  22. package/es/{el-button-93e0ac7c.js → el-button-9476b767.js} +69 -69
  23. package/es/{el-button-ec16f484.cjs → el-button-ed961332.cjs} +1 -1
  24. package/es/{el-empty-16ceef82.cjs → el-empty-7adcc7f0.cjs} +1 -1
  25. package/es/{el-empty-0c85d9b7.js → el-empty-f4c08c01.js} +3 -3
  26. package/es/{el-scrollbar-9473fd47.cjs → el-scrollbar-586be9bd.cjs} +1 -1
  27. package/es/{el-scrollbar-e17fad47.js → el-scrollbar-ffb7b9c1.js} +43 -43
  28. package/es/el-select-a6cf0236.js +1893 -0
  29. package/es/el-select-eaa79c54.cjs +9 -0
  30. package/es/el-tag-5a8b728a.cjs +1 -0
  31. package/es/{el-tag-9493bdff.js → el-tag-7549c103.js} +119 -126
  32. package/es/{focus-trap-1b2aef75.js → focus-trap-5fc152a0.js} +34 -35
  33. package/es/focus-trap-ea1e7a19.cjs +1 -0
  34. package/es/raf-3a2b250a.js +6 -0
  35. package/es/{raf-c437ab23.cjs → raf-c4bba516.cjs} +1 -1
  36. package/es/{scroll-a80e1458.cjs → scroll-38e17abc.cjs} +1 -1
  37. package/es/{scroll-a928a93e.js → scroll-c6e51ef8.js} +5 -5
  38. package/es/style.css +1 -1
  39. package/es/use-form-item-bd4b9eeb.js +531 -0
  40. package/es/use-form-item-c25c7251.cjs +3 -0
  41. package/es/use-global-config-2d21cd56.js +110 -0
  42. package/es/use-global-config-bce8cdd8.cjs +1 -0
  43. package/es/{vnode-85a610a2.cjs → vnode-40f9df3c.cjs} +1 -1
  44. package/es/{vnode-aa872900.js → vnode-f4b846cb.js} +1 -1
  45. package/es/zh-cn-a61d484e.cjs +1 -0
  46. package/es/{zh-cn-d29347f8.js → zh-cn-e36dfbf4.js} +45 -6
  47. package/lib/bundle.js +1 -1
  48. package/lib/bundle.umd.cjs +141 -141
  49. package/lib/{index-ee45a01a.js → index-4635557b.js} +10896 -10844
  50. package/lib/{python-1c6a2ac7.js → python-aa056c80.js} +1 -1
  51. package/lib/style.css +1 -1
  52. package/package.json +1 -1
  53. package/packages/FactorWarning/index.vue +268 -202
  54. package/src/pages/FactorWarning/index.vue +852 -0
  55. package/es/base-1bc9f12c.js +0 -762
  56. package/es/base-315cbfab.cjs +0 -9
  57. package/es/castArray-f42865a2.js +0 -10
  58. package/es/castArray-f54f6f75.cjs +0 -1
  59. package/es/config-provider-17c85684.cjs +0 -1
  60. package/es/config-provider-c8d3957d.js +0 -46
  61. package/es/el-icon-0ea8fbf8.cjs +0 -1
  62. package/es/el-icon-4ed993c7.js +0 -1
  63. package/es/el-input-29806e42.js +0 -543
  64. package/es/el-input-a8791103.cjs +0 -9
  65. package/es/el-overlay-53eb27a5.js +0 -678
  66. package/es/el-overlay-6d0c5cc3.cjs +0 -5
  67. package/es/el-popover-1d087574.cjs +0 -1
  68. package/es/el-popover-dd66e2c8.js +0 -133
  69. package/es/el-radio-group-46e8f574.cjs +0 -12
  70. package/es/el-radio-group-caebab9d.js +0 -1743
  71. package/es/el-select-64511731.cjs +0 -1
  72. package/es/el-select-ac302f3c.js +0 -1360
  73. package/es/el-table-column-773986c7.cjs +0 -20
  74. package/es/el-table-column-b8e2141b.js +0 -3795
  75. package/es/el-tag-a6a4d4ef.cjs +0 -1
  76. package/es/focus-trap-ea177336.cjs +0 -1
  77. package/es/raf-6d7e80f4.js +0 -6
  78. package/es/use-form-item-7924b6c1.cjs +0 -3
  79. package/es/use-form-item-aeec8499.js +0 -669
  80. package/es/use-global-config-b07c467a.js +0 -110
  81. package/es/use-global-config-d02be80b.cjs +0 -1
  82. package/es/zh-cn-0024c96d.cjs +0 -1
@@ -1,2015 +1 @@
1
- import { b as re, u as we, k as oe, _ as ie, w as Ce, d as ke, o as Te, c as Ge, i as be, s as ae, v as He, j as Ae, x as Je } from "./base-1bc9f12c.js";
2
- import { c as Ke, d as Se, b as ue, a as ce, e as Ze } from "./el-radio-group-caebab9d.js";
3
- import { b as We, c as Xe, E as et, a as tt } from "./el-table-column-b8e2141b.js";
4
- import { defineComponent as Z, computed as L, openBlock as s, createElementBlock as h, normalizeClass as Q, unref as V, renderSlot as de, createVNode as c, Transition as Me, withCtx as u, withDirectives as Ee, createElementVNode as b, toDisplayString as R, vShow as Ue, createBlock as C, resolveDynamicComponent as De, shallowReactive as nt, ref as G, onMounted as lt, watch as ne, normalizeStyle as ot, createCommentVNode as T, Fragment as U, withModifiers as at, isVNode as qe, render as xe, mergeModels as pe, useModel as me, createTextVNode as w, renderList as B, pushScopeId as ve, popScopeId as fe, createSlots as he } from "vue";
5
- import "./el-tooltip-4ed993c7.js";
6
- import { E as st } from "./el-tag-9493bdff.js";
7
- import { a as rt, u as it } from "./el-scrollbar-e17fad47.js";
8
- import { E as Fe } from "./el-overlay-53eb27a5.js";
9
- import { E as Le } from "./el-input-29806e42.js";
10
- import { b as Ne, E as ze, a as Pe } from "./el-select-ac302f3c.js";
11
- import "./el-icon-4ed993c7.js";
12
- import { E as Re } from "./el-button-93e0ac7c.js";
13
- import { c as ut, h as ct, i as dt, T as Oe, E as se, j as pt, p as Ie, k as mt, l as vt } from "./use-form-item-aeec8499.js";
14
- import { _ as ge } from "./_plugin-vue_export-helper-dad06003.js";
15
- import { m as ft } from "./typescript-7ae59c4c.js";
16
- import { u as gt } from "./use-global-config-b07c467a.js";
17
- import { E as yt } from "./focus-trap-1b2aef75.js";
18
- import { m as Ve } from "./config-provider-c8d3957d.js";
19
- import "./castArray-f42865a2.js";
20
- import "./_commonjsHelpers-10dfc225.js";
21
- import "./raf-6d7e80f4.js";
22
- import "./vnode-aa872900.js";
23
- import "./scroll-a928a93e.js";
24
- import "./index-657047bb.js";
25
- const _t = re({
26
- value: {
27
- type: [String, Number],
28
- default: ""
29
- },
30
- max: {
31
- type: Number,
32
- default: 99
33
- },
34
- isDot: Boolean,
35
- hidden: Boolean,
36
- type: {
37
- type: String,
38
- values: ["primary", "success", "warning", "info", "danger"],
39
- default: "danger"
40
- }
41
- }), kt = ["textContent"], bt = Z({
42
- name: "ElBadge"
43
- }), xt = /* @__PURE__ */ Z({
44
- ...bt,
45
- props: _t,
46
- setup(a, { expose: d }) {
47
- const o = a, l = we("badge"), p = L(() => o.isDot ? "" : oe(o.value) && oe(o.max) ? o.max < o.value ? `${o.max}+` : `${o.value}` : `${o.value}`);
48
- return d({
49
- content: p
50
- }), (_, e) => (s(), h("div", {
51
- class: Q(V(l).b())
52
- }, [
53
- de(_.$slots, "default"),
54
- c(Me, {
55
- name: `${V(l).namespace.value}-zoom-in-center`,
56
- persisted: ""
57
- }, {
58
- default: u(() => [
59
- Ee(b("sup", {
60
- class: Q([
61
- V(l).e("content"),
62
- V(l).em("content", _.type),
63
- V(l).is("fixed", !!_.$slots.default),
64
- V(l).is("dot", _.isDot)
65
- ]),
66
- textContent: R(V(p))
67
- }, null, 10, kt), [
68
- [Ue, !_.hidden && (V(p) || _.isDot)]
69
- ])
70
- ]),
71
- _: 1
72
- }, 8, ["name"])
73
- ], 2));
74
- }
75
- });
76
- var ht = /* @__PURE__ */ ie(xt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);
77
- const Ot = Ce(ht), It = re({
78
- type: {
79
- type: String,
80
- values: ["primary", "success", "info", "warning", "danger", ""],
81
- default: ""
82
- },
83
- size: {
84
- type: String,
85
- values: ut,
86
- default: ""
87
- },
88
- truncated: {
89
- type: Boolean
90
- },
91
- tag: {
92
- type: String,
93
- default: "span"
94
- }
95
- }), Vt = Z({
96
- name: "ElText"
97
- }), $t = /* @__PURE__ */ Z({
98
- ...Vt,
99
- props: It,
100
- setup(a) {
101
- const d = a, o = ct(), l = we("text"), p = L(() => [
102
- l.b(),
103
- l.m(d.type),
104
- l.m(o.value),
105
- l.is("truncated", d.truncated)
106
- ]);
107
- return (_, e) => (s(), C(De(_.tag), {
108
- class: Q(V(p))
109
- }, {
110
- default: u(() => [
111
- de(_.$slots, "default")
112
- ]),
113
- _: 3
114
- }, 8, ["class"]));
115
- }
116
- });
117
- var wt = /* @__PURE__ */ ie($t, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/text/src/text.vue"]]);
118
- const Ct = Ce(wt), Be = ["success", "info", "warning", "error"], P = ft({
119
- customClass: "",
120
- center: !1,
121
- dangerouslyUseHTMLString: !1,
122
- duration: 3e3,
123
- icon: void 0,
124
- id: "",
125
- message: "",
126
- onClose: void 0,
127
- showClose: !1,
128
- type: "info",
129
- offset: 16,
130
- zIndex: 0,
131
- grouping: !1,
132
- repeatNum: 1,
133
- appendTo: Te ? document.body : void 0
134
- }), Tt = re({
135
- customClass: {
136
- type: String,
137
- default: P.customClass
138
- },
139
- center: {
140
- type: Boolean,
141
- default: P.center
142
- },
143
- dangerouslyUseHTMLString: {
144
- type: Boolean,
145
- default: P.dangerouslyUseHTMLString
146
- },
147
- duration: {
148
- type: Number,
149
- default: P.duration
150
- },
151
- icon: {
152
- type: dt,
153
- default: P.icon
154
- },
155
- id: {
156
- type: String,
157
- default: P.id
158
- },
159
- message: {
160
- type: ke([
161
- String,
162
- Object,
163
- Function
164
- ]),
165
- default: P.message
166
- },
167
- onClose: {
168
- type: ke(Function),
169
- required: !1
170
- },
171
- showClose: {
172
- type: Boolean,
173
- default: P.showClose
174
- },
175
- type: {
176
- type: String,
177
- values: Be,
178
- default: P.type
179
- },
180
- offset: {
181
- type: Number,
182
- default: P.offset
183
- },
184
- zIndex: {
185
- type: Number,
186
- default: P.zIndex
187
- },
188
- grouping: {
189
- type: Boolean,
190
- default: P.grouping
191
- },
192
- repeatNum: {
193
- type: Number,
194
- default: P.repeatNum
195
- }
196
- }), St = {
197
- destroy: () => !0
198
- }, Y = nt([]), Mt = (a) => {
199
- const d = Y.findIndex((p) => p.id === a), o = Y[d];
200
- let l;
201
- return d > 0 && (l = Y[d - 1]), { current: o, prev: l };
202
- }, Et = (a) => {
203
- const { prev: d } = Mt(a);
204
- return d ? d.vm.exposed.bottom.value : 0;
205
- }, Ut = (a, d) => Y.findIndex((l) => l.id === a) > 0 ? 20 : d, Dt = ["id"], qt = ["innerHTML"], Ft = Z({
206
- name: "ElMessage"
207
- }), Lt = /* @__PURE__ */ Z({
208
- ...Ft,
209
- props: Tt,
210
- emits: St,
211
- setup(a, { expose: d }) {
212
- const o = a, { Close: l } = pt, { ns: p, zIndex: _ } = gt("message"), { currentZIndex: e, nextZIndex: D } = _, N = G(), E = G(!1), g = G(0);
213
- let r;
214
- const S = L(() => o.type ? o.type === "error" ? "danger" : o.type : "info"), m = L(() => {
215
- const t = o.type;
216
- return { [p.bm("icon", t)]: t && Oe[t] };
217
- }), n = L(() => o.icon || Oe[o.type] || ""), O = L(() => Et(o.id)), x = L(() => Ut(o.id, o.offset) + O.value), v = L(() => g.value + x.value), f = L(() => ({
218
- top: `${x.value}px`,
219
- zIndex: e.value
220
- }));
221
- function $() {
222
- o.duration !== 0 && ({ stop: r } = Ge(() => {
223
- y();
224
- }, o.duration));
225
- }
226
- function I() {
227
- r == null || r();
228
- }
229
- function y() {
230
- E.value = !1;
231
- }
232
- function k({ code: t }) {
233
- t === yt.esc && y();
234
- }
235
- return lt(() => {
236
- $(), D(), E.value = !0;
237
- }), ne(() => o.repeatNum, () => {
238
- I(), $();
239
- }), rt(document, "keydown", k), it(N, () => {
240
- g.value = N.value.getBoundingClientRect().height;
241
- }), d({
242
- visible: E,
243
- bottom: v,
244
- close: y
245
- }), (t, i) => (s(), C(Me, {
246
- name: V(p).b("fade"),
247
- onBeforeLeave: t.onClose,
248
- onAfterLeave: i[0] || (i[0] = (j) => t.$emit("destroy")),
249
- persisted: ""
250
- }, {
251
- default: u(() => [
252
- Ee(b("div", {
253
- id: t.id,
254
- ref_key: "messageRef",
255
- ref: N,
256
- class: Q([
257
- V(p).b(),
258
- { [V(p).m(t.type)]: t.type && !t.icon },
259
- V(p).is("center", t.center),
260
- V(p).is("closable", t.showClose),
261
- t.customClass
262
- ]),
263
- style: ot(V(f)),
264
- role: "alert",
265
- onMouseenter: I,
266
- onMouseleave: $
267
- }, [
268
- t.repeatNum > 1 ? (s(), C(V(Ot), {
269
- key: 0,
270
- value: t.repeatNum,
271
- type: V(S),
272
- class: Q(V(p).e("badge"))
273
- }, null, 8, ["value", "type", "class"])) : T("v-if", !0),
274
- V(n) ? (s(), C(V(se), {
275
- key: 1,
276
- class: Q([V(p).e("icon"), V(m)])
277
- }, {
278
- default: u(() => [
279
- (s(), C(De(V(n))))
280
- ]),
281
- _: 1
282
- }, 8, ["class"])) : T("v-if", !0),
283
- de(t.$slots, "default", {}, () => [
284
- t.dangerouslyUseHTMLString ? (s(), h(U, { key: 1 }, [
285
- T(" Caution here, message could've been compromised, never use user's input as message "),
286
- b("p", {
287
- class: Q(V(p).e("content")),
288
- innerHTML: t.message
289
- }, null, 10, qt)
290
- ], 2112)) : (s(), h("p", {
291
- key: 0,
292
- class: Q(V(p).e("content"))
293
- }, R(t.message), 3))
294
- ]),
295
- t.showClose ? (s(), C(V(se), {
296
- key: 2,
297
- class: Q(V(p).e("closeBtn")),
298
- onClick: at(y, ["stop"])
299
- }, {
300
- default: u(() => [
301
- c(V(l))
302
- ]),
303
- _: 1
304
- }, 8, ["class", "onClick"])) : T("v-if", !0)
305
- ], 46, Dt), [
306
- [Ue, E.value]
307
- ])
308
- ]),
309
- _: 3
310
- }, 8, ["name", "onBeforeLeave"]));
311
- }
312
- });
313
- var Nt = /* @__PURE__ */ ie(Lt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);
314
- let zt = 1;
315
- const je = (a) => {
316
- const d = !a || be(a) || qe(a) || ae(a) ? { message: a } : a, o = {
317
- ...P,
318
- ...d
319
- };
320
- if (!o.appendTo)
321
- o.appendTo = document.body;
322
- else if (be(o.appendTo)) {
323
- let l = document.querySelector(o.appendTo);
324
- He(l) || (Ae("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), l = document.body), o.appendTo = l;
325
- }
326
- return o;
327
- }, Pt = (a) => {
328
- const d = Y.indexOf(a);
329
- if (d === -1)
330
- return;
331
- Y.splice(d, 1);
332
- const { handler: o } = a;
333
- o.close();
334
- }, Rt = ({ appendTo: a, ...d }, o) => {
335
- const l = `message_${zt++}`, p = d.onClose, _ = document.createElement("div"), e = {
336
- ...d,
337
- id: l,
338
- onClose: () => {
339
- p == null || p(), Pt(g);
340
- },
341
- onDestroy: () => {
342
- xe(null, _);
343
- }
344
- }, D = c(Nt, e, ae(e.message) || qe(e.message) ? {
345
- default: ae(e.message) ? e.message : () => e.message
346
- } : null);
347
- D.appContext = o || K._context, xe(D, _), a.appendChild(_.firstElementChild);
348
- const N = D.component, g = {
349
- id: l,
350
- vnode: D,
351
- vm: N,
352
- handler: {
353
- close: () => {
354
- N.exposed.visible.value = !1;
355
- }
356
- },
357
- props: D.component.props
358
- };
359
- return g;
360
- }, K = (a = {}, d) => {
361
- if (!Te)
362
- return { close: () => {
363
- } };
364
- if (oe(Ve.max) && Y.length >= Ve.max)
365
- return { close: () => {
366
- } };
367
- const o = je(a);
368
- if (o.grouping && Y.length) {
369
- const p = Y.find(({ vnode: _ }) => {
370
- var e;
371
- return ((e = _.props) == null ? void 0 : e.message) === o.message;
372
- });
373
- if (p)
374
- return p.props.repeatNum += 1, p.props.type = o.type, p.handler;
375
- }
376
- const l = Rt(o, d);
377
- return Y.push(l), l.handler;
378
- };
379
- Be.forEach((a) => {
380
- K[a] = (d = {}, o) => {
381
- const l = je(d);
382
- return K({ ...l, type: a }, o);
383
- };
384
- });
385
- function Bt(a) {
386
- for (const d of Y)
387
- (!a || a === d.props.type) && d.handler.close();
388
- }
389
- K.closeAll = Bt;
390
- K._context = null;
391
- const J = Je(K, "$message"), $e = {
392
- // 品种市场 [选项: 前端默认]
393
- varietyMarket: {
394
- show: !0,
395
- options: [
396
- { label: "ETF", value: 2, memo: [] },
397
- { label: "A股", value: 3, memo: [4, 6, 12, 14, 15] },
398
- { label: "期货", value: 4, memo: [1, 2, 3, 5, 7, 8, 9, 10] },
399
- { label: "港股", value: 5, memo: [4, 6, 14] },
400
- { label: "外盘", value: 6, memo: [1, 2, 3, 5, 7, 8, 9, 10] },
401
- { label: "美股", value: 7, memo: [4, 6, 14] },
402
- { label: "期权", value: 8, memo: [11] }
403
- ]
404
- },
405
- // 常用选项 [选项: 前端默认]
406
- commonOption: {
407
- show: !0,
408
- options: [
409
- { label: "个股", value: 14 },
410
- { label: "期货主连", value: 1 },
411
- { label: "期货主力", value: 2 },
412
- { label: "期货加权", value: 3 },
413
- { label: "常用股票指数", value: 4 },
414
- { label: "期货收益率指数", value: 5 },
415
- { label: "行业板块指数", value: 6 },
416
- { label: "次主力合约", value: 7 },
417
- { label: "期货次主连", value: 8 },
418
- { label: "期货板块收益率指数", value: 9 },
419
- { label: "期货板块加权指数", value: 10 },
420
- { label: "期权", value: 11 },
421
- { label: "价差板块指数", value: 12 },
422
- { label: "概念板块指数", value: 15 }
423
- ]
424
- },
425
- // 上市板块 [选项: 接口获取**!]
426
- marketIds: {
427
- show: !0,
428
- options: [
429
- // { label: "沪深主板", value: 1, varietyMarketIds: "3" },
430
- // { label: "创业板", value: 2, varietyMarketIds: "3" },
431
- // { label: "科创板", value: 4, varietyMarketIds: "3" },
432
- // { label: "新三板", value: 8, varietyMarketIds: "3" },
433
- // { label: "沪股通", value: 1024, varietyMarketIds: "3" },
434
- // { label: "深股通", value: 2048, varietyMarketIds: "3" },
435
- // { label: "沪港通", value: 4096, varietyMarketIds: "5" },
436
- // { label: "深港通", value: 8192, varietyMarketIds: "5" },
437
- ]
438
- },
439
- // 自定标签 [选项: 接口获取**!]
440
- customTag: {
441
- show: !0,
442
- options: []
443
- },
444
- // 因子筛选 [选项: 接口获取**!]
445
- factorScreen: {
446
- show: !0,
447
- // SQL功能是否展示
448
- sqlShow: !1,
449
- // 周期功能是否展示
450
- cycleShow: !0,
451
- // 周期默认值
452
- cycleDefault: null,
453
- cycleOptions: [],
454
- // 周期下拉框数据源
455
- factorOptions: [],
456
- // 因子下拉框数据源
457
- factorDescriptions: []
458
- // 因子使用说明数据源
459
- },
460
- // 常用指标 [选项: 前端默认]
461
- commonIndicator: {
462
- show: !0,
463
- options: [
464
- // 总市值
465
- {
466
- key: "marketCapital",
467
- label: "总市值",
468
- parent: {
469
- varietyMarketIds: [3, 5, 7],
470
- commonOptionIds: [4, 6, 12, 14, 15]
471
- },
472
- // 便捷选项
473
- convenientOptions: [
474
- { range: [null, 10], unit: ["亿", "亿"], text: "≤10亿" },
475
- { range: [null, 25], unit: ["亿", "亿"], text: "≤25亿" },
476
- { range: [null, 50], unit: ["亿", "亿"], text: "≤50亿" },
477
- { range: [20, 50], unit: ["亿", "亿"], text: "20亿~50亿" },
478
- { range: [100, null], unit: ["亿", "亿"], text: "≥100亿" },
479
- { range: [200, null], unit: ["亿", "亿"], text: "≥200亿" },
480
- { range: [500, null], unit: ["亿", "亿"], text: "≥500亿" },
481
- { range: [1e3, null], unit: ["亿", "亿"], text: "≥1000亿" }
482
- ],
483
- // 默认选中单位
484
- defaultUnit: ["亿", "亿"],
485
- // 单位下拉框选项
486
- unitOptions: ["元", "千万", "亿"]
487
- },
488
- // 流通市值
489
- {
490
- key: "floatMarketCapital",
491
- label: "流通市值",
492
- parent: {
493
- varietyMarketIds: [3, 5, 7],
494
- commonOptionIds: [4, 6, 12, 14, 15]
495
- },
496
- // 便捷选项
497
- convenientOptions: [
498
- { range: [null, 5], unit: ["亿", "亿"], text: "≤5亿" },
499
- { range: [null, 20], unit: ["亿", "亿"], text: "≤20亿" },
500
- { range: [null, 50], unit: ["亿", "亿"], text: "≤50亿" },
501
- { range: [null, 100], unit: ["亿", "亿"], text: "≤100亿" },
502
- { range: [100, null], unit: ["亿", "亿"], text: "≥100亿" },
503
- { range: [200, null], unit: ["亿", "亿"], text: "≥200亿" },
504
- { range: [500, null], unit: ["亿", "亿"], text: "≥500亿" },
505
- { range: [1e3, null], unit: ["亿", "亿"], text: "≥1000亿" }
506
- ],
507
- // 默认选中单位
508
- defaultUnit: ["亿", "亿"],
509
- // 单位下拉框选项
510
- unitOptions: ["元", "千万", "亿"]
511
- },
512
- // 总股本
513
- {
514
- key: "totalShares",
515
- label: "总股本",
516
- parent: {
517
- varietyMarketIds: [3, 5, 7],
518
- commonOptionIds: [4, 6, 12, 14, 15]
519
- },
520
- // 便捷选项
521
- convenientOptions: [
522
- { range: [null, 5], unit: ["亿", "亿"], text: "≤5亿" },
523
- { range: [null, 10], unit: ["亿", "亿"], text: "≤10亿" },
524
- { range: [null, 75], unit: ["亿", "亿"], text: "≤75亿" },
525
- { range: [10, 75], unit: ["亿", "亿"], text: "10亿~75亿" },
526
- { range: [100, null], unit: ["亿", "亿"], text: "≥100亿" }
527
- ],
528
- // 默认选中单位
529
- defaultUnit: ["亿", "亿"],
530
- // 单位下拉框选项
531
- unitOptions: ["元", "千万", "亿"]
532
- },
533
- // 流通股本
534
- {
535
- key: "freeFloatShares",
536
- label: "流通股本",
537
- parent: {
538
- varietyMarketIds: [3, 5, 7],
539
- commonOptionIds: [4, 6, 12, 14, 15]
540
- },
541
- // 便捷选项
542
- convenientOptions: [
543
- { range: [null, 5], unit: ["千万", "千万"], text: "≤5千万" },
544
- { range: [5, 3], unit: ["千万", "亿"], text: "5千万~3亿" },
545
- { range: [null, 5], unit: ["亿", "亿"], text: "≤5亿" },
546
- { range: [null, 10], unit: ["亿", "亿"], text: "≤10亿" },
547
- { range: [8, 30], unit: ["亿", "亿"], text: "8亿~30亿" },
548
- { range: [30, null], unit: ["亿", "亿"], text: "≥30亿" }
549
- ],
550
- // 默认选中单位
551
- defaultUnit: ["亿", "亿"],
552
- // 单位下拉框选项
553
- unitOptions: ["元", "千万", "亿"]
554
- },
555
- // 换手率(实)
556
- {
557
- key: "turnoverRate",
558
- label: "换手率(实)",
559
- parent: {
560
- varietyMarketIds: [3, 5, 7],
561
- commonOptionIds: [4, 6, 12, 14, 15]
562
- },
563
- // 便捷选项
564
- convenientOptions: [
565
- { range: [null, 1], unit: ["%", "%"], text: "≤1%" },
566
- { range: [1, 5], unit: ["%", "%"], text: "1%~5%" },
567
- { range: [5, 10], unit: ["%", "%"], text: "5%~10%" },
568
- { range: [10, null], unit: ["%", "%"], text: "≥10%" }
569
- ],
570
- // 默认选中单位
571
- defaultUnit: ["%", "%"],
572
- // 单位下拉框选项
573
- unitOptions: ["%"]
574
- },
575
- // 市盈率
576
- {
577
- key: "peTtm",
578
- label: "市盈率",
579
- parent: {
580
- varietyMarketIds: [3, 5, 7],
581
- commonOptionIds: [4, 6, 12, 14, 15]
582
- },
583
- // 便捷选项
584
- convenientOptions: [
585
- { range: [null, 0], unit: [], text: "亏损" },
586
- { range: [0, null], unit: [], text: "≥0" },
587
- { range: [0, 20], unit: [], text: "0~20" },
588
- { range: [20, 40], unit: [], text: "20~40" },
589
- { range: [40, 100], unit: [], text: "40~100" },
590
- { range: [100, null], unit: [], text: "≥100" }
591
- ],
592
- // 默认选中单位
593
- defaultUnit: [],
594
- // 单位下拉框选项
595
- unitOptions: []
596
- },
597
- // 每股净收益
598
- {
599
- key: "eps",
600
- label: "每股净收益",
601
- parent: {
602
- varietyMarketIds: [3, 5, 7],
603
- commonOptionIds: [4, 6, 12, 14, 15]
604
- },
605
- // 便捷选项
606
- convenientOptions: [
607
- { range: [null, 0], unit: ["元", "元"], text: "≤0" },
608
- { range: [0, null], unit: ["元", "元"], text: "≥0" },
609
- { range: [0.2, null], unit: ["元", "元"], text: "≥0.2元" },
610
- { range: [0.5, null], unit: ["元", "元"], text: "≥0.5元" },
611
- { range: [1, null], unit: ["元", "元"], text: "≥1元" },
612
- { range: [2, null], unit: ["元", "元"], text: "≥2元" }
613
- ],
614
- // 默认选中单位
615
- defaultUnit: ["元", "元"],
616
- // 单位下拉框选项
617
- unitOptions: ["元"]
618
- },
619
- // 是否ST
620
- {
621
- key: "st",
622
- label: "是否ST",
623
- parent: {
624
- varietyMarketIds: [3, 5, 7],
625
- commonOptionIds: [4, 6, 12, 14, 15]
626
- },
627
- type: "custom"
628
- },
629
- // 市净率
630
- {
631
- key: "pb",
632
- label: "市净率",
633
- parent: {
634
- varietyMarketIds: [3, 5, 7],
635
- commonOptionIds: [4, 6, 12, 14, 15]
636
- },
637
- // 便捷选项
638
- convenientOptions: [
639
- { range: [0, null], unit: [], text: "≥0" },
640
- { range: [0, 1], unit: [], text: "0~1" },
641
- { range: [1, 2], unit: [], text: "1~2" },
642
- { range: [0, 3], unit: [], text: "0~3" },
643
- { range: [3, null], unit: [], text: "≥3" }
644
- ],
645
- // 默认选中单位
646
- defaultUnit: [],
647
- // 单位下拉框选项
648
- unitOptions: []
649
- },
650
- // 成交额
651
- {
652
- key: "mnShr",
653
- label: "成交额",
654
- parent: {
655
- varietyMarketIds: [3, 5, 7],
656
- commonOptionIds: [4, 6, 12, 14, 15]
657
- },
658
- // 便捷选项
659
- convenientOptions: [
660
- { range: [0, 1], unit: ["亿", "亿"], text: "0~1亿" },
661
- { range: [0, 5], unit: ["亿", "亿"], text: "0~5亿" },
662
- { range: [0, 10], unit: ["亿", "亿"], text: "0~10亿" },
663
- { range: [10, null], unit: ["亿", "亿"], text: "≥10亿" },
664
- { range: [50, null], unit: ["亿", "亿"], text: "≥50亿" },
665
- { range: [100, null], unit: ["亿", "亿"], text: "≥100亿" }
666
- ],
667
- // 默认选中单位
668
- defaultUnit: ["亿", "亿"],
669
- // 单位下拉框选项
670
- unitOptions: ["元", "千万", "亿"]
671
- },
672
- // 净资产收益率roe
673
- {
674
- key: "roe",
675
- label: "净资产收益率roe",
676
- parent: {
677
- varietyMarketIds: [3, 5, 7],
678
- commonOptionIds: [4, 6, 12, 14, 15]
679
- },
680
- // 便捷选项
681
- convenientOptions: [
682
- { range: [null, 0], unit: ["%", "%"], text: "<0" },
683
- { range: [0, null], unit: ["%", "%"], text: ">0" },
684
- { range: [10, null], unit: ["%", "%"], text: ">10%" },
685
- { range: [15, null], unit: ["%", "%"], text: ">15%" },
686
- { range: [20, null], unit: ["%", "%"], text: ">20%" },
687
- { range: [30, null], unit: ["%", "%"], text: ">30%" }
688
- ],
689
- // 默认选中单位
690
- defaultUnit: ["%", "%"],
691
- // 单位下拉框选项
692
- unitOptions: ["%"]
693
- },
694
- // 净利润
695
- {
696
- key: "tFeaturelncomes",
697
- label: "净利润",
698
- parent: {
699
- varietyMarketIds: [3, 5, 7],
700
- commonOptionIds: [4, 6, 12, 14, 15]
701
- },
702
- type: "custom"
703
- },
704
- // 股息率
705
- {
706
- key: "dividendYield",
707
- label: "股息率",
708
- parent: {
709
- varietyMarketIds: [3, 5, 7],
710
- commonOptionIds: [4, 6, 12, 14, 15]
711
- },
712
- // 便捷选项
713
- convenientOptions: [
714
- { range: [null, 1], unit: ["%", "%"], text: "≤1%" },
715
- { range: [1, 5], unit: ["%", "%"], text: "1%~5%" },
716
- { range: [5, 10], unit: ["%", "%"], text: "5%~10%" },
717
- { range: [10, null], unit: ["%", "%"], text: "≥10%" }
718
- ],
719
- // 默认选中单位
720
- defaultUnit: ["%", "%"],
721
- // 单位下拉框选项
722
- unitOptions: ["%"]
723
- },
724
- // 股价分位
725
- {
726
- key: "priceLevels",
727
- label: "股价分位",
728
- parent: {
729
- varietyMarketIds: [3, 5, 7],
730
- commonOptionIds: [4, 6, 12, 14, 15]
731
- },
732
- type: "custom"
733
- },
734
- // ----------期权-----------
735
- // 过期天数
736
- {
737
- key: "expireDays",
738
- label: "过期天数",
739
- parent: {
740
- varietyMarketIds: [8],
741
- commonOptionIds: [11]
742
- },
743
- // 便捷选项
744
- convenientOptions: [],
745
- // 默认选中单位
746
- defaultUnit: ["天", "天"],
747
- // 单位下拉框选项
748
- unitOptions: ["天"]
749
- },
750
- // 虚实度
751
- {
752
- key: "virtualRealDegree",
753
- label: "虚实度",
754
- parent: {
755
- varietyMarketIds: [8],
756
- commonOptionIds: [11]
757
- },
758
- // 便捷选项
759
- convenientOptions: [],
760
- // 默认选中单位
761
- defaultUnit: ["%", "%"],
762
- // 单位下拉框选项
763
- unitOptions: ["%"]
764
- },
765
- // 年化收益率
766
- {
767
- key: "yearProfitRate",
768
- label: "年化收益率",
769
- parent: {
770
- varietyMarketIds: [8],
771
- commonOptionIds: [11]
772
- },
773
- // 便捷选项
774
- convenientOptions: [],
775
- // 默认选中单位
776
- defaultUnit: ["%", "%"],
777
- // 单位下拉框选项
778
- unitOptions: ["%"]
779
- },
780
- // 隐含波动率
781
- {
782
- key: "impliedVolatility",
783
- label: "隐含波动率",
784
- parent: {
785
- varietyMarketIds: [8],
786
- commonOptionIds: [11]
787
- },
788
- // 便捷选项
789
- convenientOptions: [],
790
- // 默认选中单位
791
- defaultUnit: ["%", "%"],
792
- // 单位下拉框选项
793
- unitOptions: ["%"]
794
- },
795
- // 杠杆率
796
- {
797
- key: "levelMultiplier",
798
- label: "杠杆率",
799
- parent: {
800
- varietyMarketIds: [8],
801
- commonOptionIds: [11]
802
- },
803
- // 便捷选项
804
- convenientOptions: [],
805
- // 默认选中单位
806
- defaultUnit: [],
807
- // 单位下拉框选项
808
- unitOptions: []
809
- },
810
- // 成交额(期权)
811
- {
812
- key: "turnover",
813
- label: "成交额(期权)",
814
- parent: {
815
- varietyMarketIds: [8],
816
- commonOptionIds: [11]
817
- },
818
- // 便捷选项
819
- convenientOptions: [],
820
- // 默认选中单位
821
- defaultUnit: ["万", "万"],
822
- // 单位下拉框选项
823
- unitOptions: ["万"]
824
- },
825
- // 成交量
826
- {
827
- key: "volume",
828
- label: "成交量",
829
- parent: {
830
- varietyMarketIds: [8],
831
- commonOptionIds: [11]
832
- },
833
- // 便捷选项
834
- convenientOptions: [],
835
- // 默认选中单位
836
- defaultUnit: [],
837
- // 单位下拉框选项
838
- unitOptions: []
839
- },
840
- // 持仓量
841
- {
842
- key: "openInterest",
843
- label: "持仓量",
844
- parent: {
845
- varietyMarketIds: [8],
846
- commonOptionIds: [11]
847
- },
848
- // 便捷选项
849
- convenientOptions: [],
850
- // 默认选中单位
851
- defaultUnit: [],
852
- // 单位下拉框选项
853
- unitOptions: []
854
- },
855
- // 认沽认购
856
- {
857
- key: "optionsCpType",
858
- label: "认沽认购",
859
- parent: {
860
- varietyMarketIds: [8],
861
- commonOptionIds: [11]
862
- },
863
- type: "custom"
864
- },
865
- // 期权档位
866
- {
867
- key: "optionGear",
868
- label: "期权档位",
869
- parent: {
870
- varietyMarketIds: [8],
871
- commonOptionIds: [11]
872
- },
873
- // 便捷选项
874
- convenientOptions: [],
875
- // 默认选中单位
876
- defaultUnit: [],
877
- // 单位下拉框选项
878
- unitOptions: []
879
- }
880
- ]
881
- }
882
- };
883
- const Ye = (a) => (ve("data-v-d76a610e"), a = a(), fe(), a), jt = { class: "factor-screen" }, Yt = { class: "custom-header" }, Qt = ["id"], Gt = { class: "form-row" }, Ht = { style: { display: "flex", "align-items": "center", width: "100%", height: "24px" } }, At = /* @__PURE__ */ Ye(() => /* @__PURE__ */ b("span", null, "~", -1)), Jt = /* @__PURE__ */ Ye(() => /* @__PURE__ */ b("span", null, "&&代表and,||代表or", -1)), Kt = { class: "dialog-footer" }, Zt = {
884
- __name: "index",
885
- props: /* @__PURE__ */ pe({
886
- config: {
887
- type: Object,
888
- default: {
889
- // SQL功能是否展示
890
- sqlShow: !1,
891
- // 周期功能是否展示
892
- cycleShow: !0,
893
- // 周期默认值
894
- cycleDefault: null,
895
- cycleOptions: [],
896
- // 周期下拉框选项
897
- factorOptions: [],
898
- // 因子下拉框选项
899
- factorDescriptions: []
900
- // 因子使用说明数据源
901
- }
902
- }
903
- }, {
904
- data: {
905
- default: {
906
- list: [],
907
- sqlEnable: 0,
908
- sqlValue: null
909
- }
910
- },
911
- dataModifiers: {}
912
- }),
913
- emits: ["update:data"],
914
- setup(a) {
915
- const d = me(a, "data"), o = a, l = G(!1), p = G(!1), _ = G(null), e = G({
916
- // 筛选因子列表
917
- list: [
918
- {
919
- cycle: o.config.cycleDefault ?? null,
920
- // 周期
921
- factor: null,
922
- // 因子
923
- score: [null, null]
924
- // 得分
925
- }
926
- ],
927
- // 是否开启SQL功能 0关闭, 1开启
928
- sqlEnable: 0,
929
- // SQL语句
930
- sqlValue: null
931
- }), D = () => {
932
- const { list: x, sqlEnable: v, sqlValue: f } = d.value;
933
- e.value = {
934
- list: JSON.parse(JSON.stringify(x)),
935
- sqlEnable: v,
936
- sqlValue: f
937
- }, e.value.list.length || N(), l.value = !0;
938
- }, N = () => {
939
- e.value.list.push({
940
- cycle: o.config.cycleDefault ?? null,
941
- factor: null,
942
- score: [null, null]
943
- });
944
- }, E = () => {
945
- _.value.validate((x) => {
946
- x && (e.value.sqlValue = e.value.list.reduce((v, f, $) => {
947
- let I = `factor_id = ${f.factor} and `;
948
- return o.config.cycleShow && (I += `freq_id = ${f.cycle} and `), (f.score[0] || f.score[0] === 0) && (f.score[1] || f.score[1] === 0) ? I += `score >= ${f.score[0]} and score <= ${f.score[1]}` : f.score[0] || f.score[0] === 0 ? I += `score >= ${f.score[0]}` : (f.score[1] || f.score[1] === 0) && (I += `score <= ${f.score[1]}`), I = `(${I})`, $ !== 0 && (I = ` && ${I}`), v += I, v;
949
- }, ""));
950
- });
951
- }, g = () => {
952
- d.value = {
953
- list: [],
954
- sqlEnable: 0,
955
- sqlValue: null
956
- };
957
- }, r = (x) => {
958
- d.value.list.splice(x, 1);
959
- }, S = (x) => {
960
- e.value.list.splice(x, 1);
961
- }, m = () => {
962
- _.value.validate((x) => {
963
- const { list: v, sqlEnable: f, sqlValue: $ } = e.value;
964
- if (x) {
965
- if (f && !$)
966
- return J.error("SQL语句不能为空");
967
- d.value = {
968
- list: JSON.parse(JSON.stringify(v)),
969
- sqlEnable: f,
970
- sqlValue: $
971
- }, l.value = !1;
972
- }
973
- });
974
- }, n = (x) => {
975
- const { cycle: v, factor: f, score: $ } = x;
976
- let I = "";
977
- return I += ` ${o.config.cycleOptions.find(({ value: y }) => y === v).label}`, I += ` ${o.config.factorOptions.find(({ value: y }) => y === f).label}`, I += ` ${$[0] || $[0] === 0 ? `${$[0]}分` : "∞"}`, I += " ~", I += ` ${$[1] || $[1] === 0 ? `${$[1]}分` : "∞"}`, I;
978
- }, O = (x, v, f) => {
979
- !v[0] && v[0] !== 0 && !v[1] && v[1] !== 0 ? f(new Error("至少填写一个分数")) : f();
980
- };
981
- return (x, v) => {
982
- const f = Ct, $ = Ne, I = Re, y = se, k = st, t = ze, i = Pe, j = Ke, A = Se, W = ue, te = ce, q = Le, F = Ze, _e = Fe, le = We, Qe = Xe;
983
- return s(), h("div", jt, [
984
- d.value.sqlEnable && d.value.sqlValue ? (s(), C($, {
985
- key: 0,
986
- closable: "",
987
- type: "info",
988
- title: d.value.sqlValue,
989
- onClose: g
990
- }, {
991
- default: u(() => [
992
- c(f, {
993
- type: "info",
994
- truncated: "",
995
- style: { "max-width": "500px" }
996
- }, {
997
- default: u(() => [
998
- w(R(d.value.sqlValue), 1)
999
- ]),
1000
- _: 1
1001
- })
1002
- ]),
1003
- _: 1
1004
- }, 8, ["title"])) : T("", !0),
1005
- !d.value.sqlEnable && d.value.list.length ? (s(!0), h(U, { key: 1 }, B(d.value.list, (M, H) => (s(), C($, {
1006
- closable: "",
1007
- type: "info",
1008
- onClose: (z) => r(H)
1009
- }, {
1010
- default: u(() => [
1011
- w(R(n(M)), 1)
1012
- ]),
1013
- _: 2
1014
- }, 1032, ["onClose"]))), 256)) : T("", !0),
1015
- c(I, {
1016
- class: "screen-btn",
1017
- type: "primary",
1018
- plain: "",
1019
- size: "small",
1020
- icon: V(Ie),
1021
- onClick: D
1022
- }, {
1023
- default: u(() => [
1024
- w("添加因子")
1025
- ]),
1026
- _: 1
1027
- }, 8, ["icon"]),
1028
- c(_e, {
1029
- modelValue: l.value,
1030
- "onUpdate:modelValue": v[3] || (v[3] = (M) => l.value = M),
1031
- width: "500",
1032
- "align-center": "",
1033
- "destroy-on-close": ""
1034
- }, {
1035
- header: u(({ titleId: M, titleClass: H }) => [
1036
- b("div", Yt, [
1037
- b("span", {
1038
- id: M,
1039
- class: Q(H)
1040
- }, " 因子筛选 ", 10, Qt),
1041
- c(k, {
1042
- effect: "dark",
1043
- content: "点击查看: 因子使用说明",
1044
- placement: "right"
1045
- }, {
1046
- default: u(() => [
1047
- c(y, {
1048
- onClick: v[0] || (v[0] = (z) => p.value = !0)
1049
- }, {
1050
- default: u(() => [
1051
- c(V(mt))
1052
- ]),
1053
- _: 1
1054
- })
1055
- ]),
1056
- _: 1
1057
- })
1058
- ])
1059
- ]),
1060
- footer: u(() => [
1061
- b("div", Kt, [
1062
- c(I, {
1063
- type: "primary",
1064
- onClick: m
1065
- }, {
1066
- default: u(() => [
1067
- w("确定")
1068
- ]),
1069
- _: 1
1070
- })
1071
- ])
1072
- ]),
1073
- default: u(() => [
1074
- c(F, {
1075
- ref_key: "dialogFormRef",
1076
- ref: _,
1077
- model: e.value
1078
- }, {
1079
- default: u(() => [
1080
- (s(!0), h(U, null, B(e.value.list, (M, H) => (s(), h("div", Gt, [
1081
- a.config.cycleShow ? (s(), C(j, {
1082
- key: 0,
1083
- prop: "list." + H + ".cycle",
1084
- rules: { required: !0, message: "周期不能为空", trigger: "blur" },
1085
- style: { width: "100px", "margin-right": "10px" }
1086
- }, {
1087
- default: u(() => [
1088
- c(i, {
1089
- modelValue: M.cycle,
1090
- "onUpdate:modelValue": (z) => M.cycle = z,
1091
- placeholder: "选择周期",
1092
- size: "small"
1093
- }, {
1094
- default: u(() => [
1095
- (s(!0), h(U, null, B(a.config.cycleOptions, ({ label: z, value: X }) => (s(), C(t, {
1096
- label: z,
1097
- value: X,
1098
- key: X
1099
- }, null, 8, ["label", "value"]))), 128))
1100
- ]),
1101
- _: 2
1102
- }, 1032, ["modelValue", "onUpdate:modelValue"])
1103
- ]),
1104
- _: 2
1105
- }, 1032, ["prop"])) : T("", !0),
1106
- c(j, {
1107
- prop: "list." + H + ".factor",
1108
- rules: { required: !0, message: "因子不能为空", trigger: "blur" },
1109
- style: { width: "100px", "margin-right": "10px" }
1110
- }, {
1111
- default: u(() => [
1112
- c(i, {
1113
- modelValue: M.factor,
1114
- "onUpdate:modelValue": (z) => M.factor = z,
1115
- placeholder: "选择因子",
1116
- filterable: "",
1117
- size: "small",
1118
- "no-match-text": "无匹配数据"
1119
- }, {
1120
- default: u(() => [
1121
- (s(!0), h(U, null, B(a.config.factorOptions, ({ label: z, value: X }) => (s(), C(t, {
1122
- label: z,
1123
- value: X,
1124
- key: X
1125
- }, null, 8, ["label", "value"]))), 128))
1126
- ]),
1127
- _: 2
1128
- }, 1032, ["modelValue", "onUpdate:modelValue"])
1129
- ]),
1130
- _: 2
1131
- }, 1032, ["prop"]),
1132
- c(j, {
1133
- prop: "list." + H + ".score",
1134
- rules: { validator: O, trigger: "blur" },
1135
- style: { width: "200px", "margin-right": "10px" }
1136
- }, {
1137
- default: u(() => [
1138
- b("div", Ht, [
1139
- c(A, {
1140
- modelValue: M.score[0],
1141
- "onUpdate:modelValue": (z) => M.score[0] = z,
1142
- size: "small",
1143
- "controls-position": "right"
1144
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
1145
- At,
1146
- c(A, {
1147
- modelValue: M.score[1],
1148
- "onUpdate:modelValue": (z) => M.score[1] = z,
1149
- size: "small",
1150
- "controls-position": "right"
1151
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1152
- ])
1153
- ]),
1154
- _: 2
1155
- }, 1032, ["prop", "rules"]),
1156
- c(y, {
1157
- onClick: (z) => S(H)
1158
- }, {
1159
- default: u(() => [
1160
- c(V(vt))
1161
- ]),
1162
- _: 2
1163
- }, 1032, ["onClick"])
1164
- ]))), 256)),
1165
- c(I, {
1166
- type: "primary",
1167
- plain: "",
1168
- size: "small",
1169
- icon: V(Ie),
1170
- onClick: N,
1171
- style: { "margin-bottom": "10px" }
1172
- }, {
1173
- default: u(() => [
1174
- w("添加因子")
1175
- ]),
1176
- _: 1
1177
- }, 8, ["icon"]),
1178
- a.config.sqlShow ? (s(), h(U, { key: 0 }, [
1179
- c(j, { label: "SQL功能: " }, {
1180
- default: u(() => [
1181
- c(te, {
1182
- modelValue: e.value.sqlEnable,
1183
- "onUpdate:modelValue": v[1] || (v[1] = (M) => e.value.sqlEnable = M)
1184
- }, {
1185
- default: u(() => [
1186
- c(W, { label: 0 }, {
1187
- default: u(() => [
1188
- w("关闭")
1189
- ]),
1190
- _: 1
1191
- }),
1192
- c(W, { label: 1 }, {
1193
- default: u(() => [
1194
- w("启用")
1195
- ]),
1196
- _: 1
1197
- })
1198
- ]),
1199
- _: 1
1200
- }, 8, ["modelValue"]),
1201
- e.value.sqlEnable ? (s(), C(I, {
1202
- key: 0,
1203
- type: "primary",
1204
- size: "small",
1205
- onClick: E,
1206
- style: { "margin-left": "auto" }
1207
- }, {
1208
- default: u(() => [
1209
- w("生成SQL")
1210
- ]),
1211
- _: 1
1212
- })) : T("", !0)
1213
- ]),
1214
- _: 1
1215
- }),
1216
- e.value.sqlEnable ? (s(), h(U, { key: 0 }, [
1217
- c(q, {
1218
- modelValue: e.value.sqlValue,
1219
- "onUpdate:modelValue": v[2] || (v[2] = (M) => e.value.sqlValue = M),
1220
- autosize: { minRows: 4 },
1221
- type: "textarea",
1222
- style: { "margin-bottom": "10px" }
1223
- }, null, 8, ["modelValue"]),
1224
- Jt
1225
- ], 64)) : T("", !0)
1226
- ], 64)) : T("", !0)
1227
- ]),
1228
- _: 1
1229
- }, 8, ["model"])
1230
- ]),
1231
- _: 1
1232
- }, 8, ["modelValue"]),
1233
- c(_e, {
1234
- modelValue: p.value,
1235
- "onUpdate:modelValue": v[4] || (v[4] = (M) => p.value = M),
1236
- title: "因子使用说明",
1237
- width: "1000",
1238
- "align-center": "",
1239
- "destroy-on-close": ""
1240
- }, {
1241
- default: u(() => [
1242
- c(Qe, {
1243
- data: a.config.factorDescriptions,
1244
- border: "",
1245
- height: "500"
1246
- }, {
1247
- default: u(() => [
1248
- c(le, {
1249
- prop: "factorName",
1250
- label: "因子名称",
1251
- width: "200"
1252
- }),
1253
- c(le, {
1254
- prop: "factorDesc",
1255
- label: "因子说明"
1256
- }),
1257
- c(le, {
1258
- prop: "factorScoreDefine",
1259
- label: "分值定义"
1260
- })
1261
- ]),
1262
- _: 1
1263
- }, 8, ["data"])
1264
- ]),
1265
- _: 1
1266
- }, 8, ["modelValue"])
1267
- ]);
1268
- };
1269
- }
1270
- }, Wt = /* @__PURE__ */ ge(Zt, [["__scopeId", "data-v-d76a610e"]]);
1271
- const ye = (a) => (ve("data-v-5e6e795d"), a = a(), fe(), a), Xt = {
1272
- key: 0,
1273
- class: "common-indicator"
1274
- }, en = { class: "indicator" }, tn = /* @__PURE__ */ ye(() => /* @__PURE__ */ b("div", { class: "title" }, [
1275
- /* @__PURE__ */ b("span", null, "常用指标: "),
1276
- /* @__PURE__ */ b("span", null, "不限")
1277
- ], -1)), nn = { class: "options" }, ln = ["onClick"], on = { class: "tags" }, an = ["onClick"], sn = {
1278
- key: 0,
1279
- class: "convenient-option-box"
1280
- }, rn = { class: "out-box" }, un = /* @__PURE__ */ ye(() => /* @__PURE__ */ b("span", null, "自定义: ", -1)), cn = { key: 0 }, dn = { key: 0 }, pn = { key: 0 }, mn = { key: 1 }, vn = { class: "tFeaturelncomes-option-box" }, fn = { class: "tFeaturelncomes-out-box" }, gn = /* @__PURE__ */ ye(() => /* @__PURE__ */ b("span", null, "自定义: ", -1)), yn = { key: 2 }, _n = { key: 3 }, kn = { class: "dialog-footer" }, bn = {
1281
- __name: "index",
1282
- props: /* @__PURE__ */ pe({
1283
- config: { type: Object, default: () => {
1284
- } },
1285
- varietyMarket: { type: Number, default: () => null },
1286
- // 已选品种市场
1287
- commonOption: { type: Array, default: () => [] }
1288
- // 已选常用选项
1289
- }, {
1290
- data: { default: [] },
1291
- dataModifiers: {}
1292
- }),
1293
- emits: ["update:data"],
1294
- setup(a) {
1295
- const d = a, o = me(a, "data"), l = L(() => {
1296
- let m = [];
1297
- return d.varietyMarket === null && !d.commonOption.length ? m = d.config.options : (m = d.config.options, d.varietyMarket && (m = m.filter(({ parent: n }) => n.varietyMarketIds.includes(d.varietyMarket))), d.commonOption.length && (m = m.filter(({ parent: n }) => {
1298
- const { commonOptionIds: O } = n;
1299
- return [.../* @__PURE__ */ new Set([...O, ...d.commonOption])].length !== [...O, ...d.commonOption].length;
1300
- }))), m;
1301
- });
1302
- ne(
1303
- () => l.value,
1304
- () => {
1305
- o.value.length && (o.value = o.value.filter(({ key: m }) => l.value.find((n) => n.key === m)));
1306
- }
1307
- );
1308
- const p = G(!1), _ = G({}), e = G({}), D = (m) => {
1309
- _.value = m;
1310
- const n = {
1311
- label: m.label,
1312
- key: m.key,
1313
- type: m.type
1314
- };
1315
- m.type === void 0 ? e.value = {
1316
- ...n,
1317
- range: [null, null],
1318
- unit: m.defaultUnit.length ? [...m.defaultUnit] : [null, null]
1319
- } : m.key === "st" ? e.value = { ...n, st: null } : m.key === "tFeaturelncomes" ? e.value = {
1320
- ...n,
1321
- rule: 1,
1322
- // 1超 2跌
1323
- withFewYears: null,
1324
- yearsCount: null,
1325
- netProfit: null
1326
- } : m.key === "priceLevels" ? e.value = { ...n, priceLevels: null } : m.key === "optionsCpType" && (e.value = {
1327
- ...n,
1328
- optionsCpType: null
1329
- // 1看涨 2看跌
1330
- }), p.value = !0;
1331
- }, N = (m) => {
1332
- e.value.range = [...m.range], e.value.unit = [...m.unit];
1333
- }, E = (m) => {
1334
- switch (m) {
1335
- case "≤0":
1336
- Object.assign(e.value, {
1337
- rule: 2,
1338
- // 1超 2跌
1339
- withFewYears: 1,
1340
- yearsCount: 1,
1341
- netProfit: 0
1342
- });
1343
- break;
1344
- case "≥0":
1345
- Object.assign(e.value, {
1346
- rule: 1,
1347
- withFewYears: 1,
1348
- yearsCount: 1,
1349
- netProfit: 0
1350
- });
1351
- break;
1352
- case "五年内有四年以上盈利超过5千万":
1353
- Object.assign(e.value, {
1354
- rule: 1,
1355
- withFewYears: 5,
1356
- yearsCount: 4,
1357
- netProfit: 0.5
1358
- });
1359
- break;
1360
- case "≥10亿":
1361
- Object.assign(e.value, {
1362
- rule: 1,
1363
- withFewYears: 1,
1364
- yearsCount: 1,
1365
- netProfit: 10
1366
- });
1367
- break;
1368
- case "≥20亿":
1369
- Object.assign(e.value, {
1370
- rule: 1,
1371
- withFewYears: 1,
1372
- yearsCount: 1,
1373
- netProfit: 20
1374
- });
1375
- break;
1376
- }
1377
- }, g = () => {
1378
- switch (e.value.key) {
1379
- case "st": {
1380
- const { label: n, st: O } = e.value;
1381
- if (O === null)
1382
- return J.warning("格式错误: 请至少选择一个值");
1383
- e.value.tagText = `${n}: ${O ? "是" : "否"}`;
1384
- break;
1385
- }
1386
- case "tFeaturelncomes": {
1387
- const { label: n, rule: O, withFewYears: x, yearsCount: v, netProfit: f } = e.value;
1388
- if (["", null].includes(x) || ["", null].includes(v) || ["", null].includes(f))
1389
- return J.warning("格式错误: 请填写完整");
1390
- e.value.tagText = `${n}: ${x}年内${v}年以上盈利${O === 1 ? "超" : "跌"}过${f}亿`;
1391
- break;
1392
- }
1393
- case "priceLevels": {
1394
- const { label: n, priceLevels: O } = e.value;
1395
- if (!O || O.length === 0)
1396
- return J.warning("格式错误: 请至少选择一个值");
1397
- e.value.tagText = `${n}: 已选${O}分位`;
1398
- break;
1399
- }
1400
- case "optionsCpType": {
1401
- const { label: n, optionsCpType: O } = e.value;
1402
- if (O === null)
1403
- return J.warning("格式错误: 请至少选择一个值");
1404
- e.value.tagText = `${n}: ${O === 1 ? "看涨" : "看跌"}`;
1405
- break;
1406
- }
1407
- default: {
1408
- const { label: n, range: O, unit: x } = e.value;
1409
- if (["", null].includes(O[0]) && ["", null].includes(O[1]))
1410
- return J.warning("格式错误: 请至少填写一个值");
1411
- !["", null].includes(O[0]) && !["", null].includes(O[1]) ? e.value.tagText = `${n}: ${O[0]}${x[0] ?? ""} ~ ${O[1]}${x[1] ?? ""}` : ["", null].includes(O[0]) ? e.value.tagText = `${n}: ≤${O[1]}${x[1] ?? ""}` : e.value.tagText = `${n}: ≥${O[0]}${x[0] ?? ""}`;
1412
- }
1413
- }
1414
- const m = o.value.findIndex(({ key: n }) => n === e.value.key);
1415
- m === -1 ? o.value.push(e.value) : o.value.splice(m, 1, e.value), p.value = !1;
1416
- }, r = (m) => {
1417
- o.value.splice(m, 1);
1418
- }, S = (m) => {
1419
- _.value = l.value.find(({ key: n }) => n === m.key), e.value = JSON.parse(JSON.stringify(m)), p.value = !0;
1420
- };
1421
- return (m, n) => {
1422
- const O = Ne, x = Re, v = ze, f = Pe, $ = Le, I = ue, y = ce, k = Se, t = Fe;
1423
- return a.config.show && l.value.length ? (s(), h("div", Xt, [
1424
- b("div", en, [
1425
- tn,
1426
- b("div", nn, [
1427
- (s(!0), h(U, null, B(l.value, (i) => (s(), h("span", {
1428
- key: i.key,
1429
- onClick: (j) => D(i)
1430
- }, R(i.label), 9, ln))), 128))
1431
- ])
1432
- ]),
1433
- b("div", on, [
1434
- (s(!0), h(U, null, B(o.value, (i, j) => (s(), C(O, {
1435
- closable: "",
1436
- type: "info",
1437
- onClose: (A) => r(j)
1438
- }, {
1439
- default: u(() => [
1440
- b("span", null, R(i.tagText), 1),
1441
- b("span", {
1442
- class: "edit",
1443
- onClick: (A) => S(i)
1444
- }, "编辑", 8, an)
1445
- ]),
1446
- _: 2
1447
- }, 1032, ["onClose"]))), 256))
1448
- ]),
1449
- c(t, {
1450
- modelValue: p.value,
1451
- "onUpdate:modelValue": n[15] || (n[15] = (i) => p.value = i),
1452
- title: _.value.label,
1453
- width: "600",
1454
- "align-center": "",
1455
- "destroy-on-close": ""
1456
- }, {
1457
- footer: u(() => [
1458
- b("div", kn, [
1459
- c(x, {
1460
- type: "primary",
1461
- onClick: g
1462
- }, {
1463
- default: u(() => [
1464
- w("确定")
1465
- ]),
1466
- _: 1
1467
- })
1468
- ])
1469
- ]),
1470
- default: u(() => [
1471
- _.value.type === void 0 ? (s(), h(U, { key: 0 }, [
1472
- _.value.convenientOptions.length ? (s(), h("div", sn, [
1473
- (s(!0), h(U, null, B(_.value.convenientOptions, (i) => (s(), C(x, {
1474
- key: i.text,
1475
- onClick: (j) => N(i)
1476
- }, {
1477
- default: u(() => [
1478
- w(R(i.text), 1)
1479
- ]),
1480
- _: 2
1481
- }, 1032, ["onClick"]))), 128))
1482
- ])) : T("", !0),
1483
- b("div", rn, [
1484
- un,
1485
- c($, {
1486
- modelValue: e.value.range[0],
1487
- "onUpdate:modelValue": n[1] || (n[1] = (i) => e.value.range[0] = i),
1488
- style: { flex: "1" }
1489
- }, he({ _: 2 }, [
1490
- _.value.unitOptions.length ? {
1491
- name: "append",
1492
- fn: u(() => [
1493
- _.value.unitOptions.length === 1 ? (s(), h("span", cn, R(e.value.unit[0]), 1)) : (s(), C(f, {
1494
- key: 1,
1495
- modelValue: e.value.unit[0],
1496
- "onUpdate:modelValue": n[0] || (n[0] = (i) => e.value.unit[0] = i),
1497
- style: { width: "72px" }
1498
- }, {
1499
- default: u(() => [
1500
- (s(!0), h(U, null, B(_.value.unitOptions, (i) => (s(), C(v, {
1501
- label: i,
1502
- value: i
1503
- }, null, 8, ["label", "value"]))), 256))
1504
- ]),
1505
- _: 1
1506
- }, 8, ["modelValue"]))
1507
- ]),
1508
- key: "0"
1509
- } : void 0
1510
- ]), 1032, ["modelValue"]),
1511
- w(" ~ "),
1512
- c($, {
1513
- modelValue: e.value.range[1],
1514
- "onUpdate:modelValue": n[3] || (n[3] = (i) => e.value.range[1] = i),
1515
- style: { flex: "1" }
1516
- }, he({ _: 2 }, [
1517
- _.value.unitOptions.length ? {
1518
- name: "append",
1519
- fn: u(() => [
1520
- _.value.unitOptions.length === 1 ? (s(), h("span", dn, R(e.value.unit[1]), 1)) : (s(), C(f, {
1521
- key: 1,
1522
- modelValue: e.value.unit[1],
1523
- "onUpdate:modelValue": n[2] || (n[2] = (i) => e.value.unit[1] = i),
1524
- style: { width: "72px" }
1525
- }, {
1526
- default: u(() => [
1527
- (s(!0), h(U, null, B(_.value.unitOptions, (i) => (s(), C(v, {
1528
- label: i,
1529
- value: i
1530
- }, null, 8, ["label", "value"]))), 256))
1531
- ]),
1532
- _: 1
1533
- }, 8, ["modelValue"]))
1534
- ]),
1535
- key: "0"
1536
- } : void 0
1537
- ]), 1032, ["modelValue"])
1538
- ])
1539
- ], 64)) : (s(), h(U, { key: 1 }, [
1540
- _.value.key === "st" ? (s(), h("div", pn, [
1541
- c(y, {
1542
- modelValue: e.value.st,
1543
- "onUpdate:modelValue": n[4] || (n[4] = (i) => e.value.st = i)
1544
- }, {
1545
- default: u(() => [
1546
- c(I, { label: 1 }, {
1547
- default: u(() => [
1548
- w("是")
1549
- ]),
1550
- _: 1
1551
- }),
1552
- c(I, { label: 0 }, {
1553
- default: u(() => [
1554
- w("否")
1555
- ]),
1556
- _: 1
1557
- })
1558
- ]),
1559
- _: 1
1560
- }, 8, ["modelValue"])
1561
- ])) : T("", !0),
1562
- _.value.key === "tFeaturelncomes" ? (s(), h("div", mn, [
1563
- b("div", vn, [
1564
- c(x, {
1565
- onClick: n[5] || (n[5] = (i) => E("≤0"))
1566
- }, {
1567
- default: u(() => [
1568
- w("≤0")
1569
- ]),
1570
- _: 1
1571
- }),
1572
- c(x, {
1573
- onClick: n[6] || (n[6] = (i) => E("≥0"))
1574
- }, {
1575
- default: u(() => [
1576
- w("≥0")
1577
- ]),
1578
- _: 1
1579
- }),
1580
- c(x, {
1581
- onClick: n[7] || (n[7] = (i) => E("五年内有四年以上盈利超过5千万"))
1582
- }, {
1583
- default: u(() => [
1584
- w("五年内有四年以上盈利超过5千万")
1585
- ]),
1586
- _: 1
1587
- }),
1588
- c(x, {
1589
- onClick: n[8] || (n[8] = (i) => E("≥10亿"))
1590
- }, {
1591
- default: u(() => [
1592
- w("≥10亿")
1593
- ]),
1594
- _: 1
1595
- }),
1596
- c(x, {
1597
- onClick: n[9] || (n[9] = (i) => E("≥20亿"))
1598
- }, {
1599
- default: u(() => [
1600
- w("≥20亿")
1601
- ]),
1602
- _: 1
1603
- })
1604
- ]),
1605
- b("div", fn, [
1606
- gn,
1607
- b("div", null, [
1608
- c(k, {
1609
- modelValue: e.value.withFewYears,
1610
- "onUpdate:modelValue": n[10] || (n[10] = (i) => e.value.withFewYears = i),
1611
- "controls-position": "right"
1612
- }, null, 8, ["modelValue"]),
1613
- w(" 年内 "),
1614
- c(k, {
1615
- modelValue: e.value.yearsCount,
1616
- "onUpdate:modelValue": n[11] || (n[11] = (i) => e.value.yearsCount = i),
1617
- "controls-position": "right"
1618
- }, null, 8, ["modelValue"]),
1619
- w(" 年以上盈利" + R(e.value.rule === 1 ? "超" : "跌") + "过 ", 1),
1620
- c(k, {
1621
- modelValue: e.value.netProfit,
1622
- "onUpdate:modelValue": n[12] || (n[12] = (i) => e.value.netProfit = i),
1623
- "controls-position": "right"
1624
- }, null, 8, ["modelValue"]),
1625
- w(" 亿 ")
1626
- ])
1627
- ])
1628
- ])) : T("", !0),
1629
- _.value.key === "priceLevels" ? (s(), h("div", yn, [
1630
- c(f, {
1631
- modelValue: e.value.priceLevels,
1632
- "onUpdate:modelValue": n[13] || (n[13] = (i) => e.value.priceLevels = i),
1633
- multiple: "",
1634
- clearable: "",
1635
- placeholder: "请选择",
1636
- style: { width: "420px" }
1637
- }, {
1638
- default: u(() => [
1639
- (s(), h(U, null, B([1, 2, 3, 4, 5], (i) => c(v, {
1640
- key: i,
1641
- label: `${i}分位`,
1642
- value: i
1643
- }, null, 8, ["label", "value"])), 64))
1644
- ]),
1645
- _: 1
1646
- }, 8, ["modelValue"])
1647
- ])) : T("", !0),
1648
- _.value.key === "optionsCpType" ? (s(), h("div", _n, [
1649
- c(y, {
1650
- modelValue: e.value.optionsCpType,
1651
- "onUpdate:modelValue": n[14] || (n[14] = (i) => e.value.optionsCpType = i)
1652
- }, {
1653
- default: u(() => [
1654
- c(I, { label: 1 }, {
1655
- default: u(() => [
1656
- w("看涨")
1657
- ]),
1658
- _: 1
1659
- }),
1660
- c(I, { label: 2 }, {
1661
- default: u(() => [
1662
- w("看跌")
1663
- ]),
1664
- _: 1
1665
- })
1666
- ]),
1667
- _: 1
1668
- }, 8, ["modelValue"])
1669
- ])) : T("", !0)
1670
- ], 64))
1671
- ]),
1672
- _: 1
1673
- }, 8, ["modelValue", "title"])
1674
- ])) : T("", !0);
1675
- };
1676
- }
1677
- }, xn = /* @__PURE__ */ ge(bn, [["__scopeId", "data-v-5e6e795d"]]);
1678
- const ee = (a) => (ve("data-v-e077f597"), a = a(), fe(), a), hn = { class: "variety-search" }, On = {
1679
- key: 0,
1680
- class: "variety-search-row"
1681
- }, In = { class: "title" }, Vn = /* @__PURE__ */ ee(() => /* @__PURE__ */ b("span", null, "品种市场: ", -1)), $n = {
1682
- key: 1,
1683
- class: "variety-search-row"
1684
- }, wn = { class: "title" }, Cn = /* @__PURE__ */ ee(() => /* @__PURE__ */ b("span", null, "常用选项: ", -1)), Tn = {
1685
- key: 2,
1686
- class: "variety-search-row"
1687
- }, Sn = { class: "title" }, Mn = /* @__PURE__ */ ee(() => /* @__PURE__ */ b("span", null, "上市板块: ", -1)), En = {
1688
- key: 3,
1689
- class: "variety-search-row"
1690
- }, Un = { class: "title" }, Dn = /* @__PURE__ */ ee(() => /* @__PURE__ */ b("span", null, "自定标签: ", -1)), qn = {
1691
- key: 4,
1692
- class: "variety-search-row"
1693
- }, Fn = { class: "title" }, Ln = /* @__PURE__ */ ee(() => /* @__PURE__ */ b("span", null, "因子筛选: ", -1)), Nn = {
1694
- __name: "index",
1695
- props: /* @__PURE__ */ pe({ config: { type: Object, default: {} } }, {
1696
- searchData: {},
1697
- searchDataModifiers: {}
1698
- }),
1699
- emits: ["update:searchData"],
1700
- setup(a, { expose: d }) {
1701
- const o = a, l = me(a, "searchData");
1702
- l.value = Object.assign(l.value, {
1703
- // 品种市场
1704
- varietyMarket: null,
1705
- // 常用选项
1706
- commonOption: [],
1707
- // 上市板块
1708
- marketIds: [],
1709
- // 自定标签
1710
- customTag: [],
1711
- // 因子筛选
1712
- factorScreen: {
1713
- list: [],
1714
- sqlEnable: 0,
1715
- sqlValue: null
1716
- },
1717
- // 常用指标
1718
- commonIndicator: []
1719
- });
1720
- const p = L(() => {
1721
- const g = {};
1722
- return Object.keys($e).forEach((r) => {
1723
- const S = $e[r], m = o.config[r] ?? {}, n = { ...S, ...m };
1724
- g[r] = n;
1725
- }), g;
1726
- }), _ = L(() => p.value.varietyMarket.options), e = L(() => {
1727
- const { varietyMarket: g } = l.value;
1728
- if (g) {
1729
- const r = _.value.find(({ value: S }) => S === g).memo;
1730
- return p.value.commonOption.options.filter(({ value: S }) => r.includes(S));
1731
- } else
1732
- return p.value.commonOption.options;
1733
- }), D = L(() => {
1734
- const { varietyMarket: g } = l.value;
1735
- return g ? p.value.marketIds.options.filter((r) => r.varietyMarketIds.includes(g)) : p.value.marketIds.options;
1736
- }), N = L(() => p.value.customTag.options), E = (g) => {
1737
- ["commonOption", "marketIds", "customTag", "factorScreen", "commonIndicator"].includes(g) ? l.value[g] = [] : l.value[g] = null;
1738
- };
1739
- return ne(
1740
- () => e.value,
1741
- (g) => {
1742
- var r;
1743
- (r = l.value.commonOption) != null && r.length && (l.value.commonOption = l.value.commonOption.filter((S) => g.find(({ value: m }) => m === S)));
1744
- }
1745
- ), ne(
1746
- () => D.value,
1747
- (g) => {
1748
- var r;
1749
- (r = l.value.marketIds) != null && r.length && (l.value.marketIds = l.value.marketIds.filter((S) => g.find(({ value: m }) => m === S)));
1750
- }
1751
- ), d({
1752
- // 生成接口传参结构的数据
1753
- formatData: (g) => {
1754
- var S, m, n, O, x;
1755
- console.log("%c[st-varietySearch]: 正在生成接口传参结构的数据...", "color: tomato");
1756
- const r = {};
1757
- if (g.varietyMarket && (r.exchangeId = String(g.varietyMarket)), (S = g.commonOption) != null && S.length && (r.optionId = g.commonOption.join(",")), (m = g.marketIds) != null && m.length && (r.marketIds = g.marketIds), (n = g.customTag) != null && n.length && (r.tagIds = g.customTag), (O = p.value.factorScreen) != null && O.show) {
1758
- const { factorScreen: v } = g;
1759
- (x = v == null ? void 0 : v.list) != null && x.length && (r.tbFeatureFactorScores = v.list.map((f) => ({
1760
- freqId: f.cycle,
1761
- factorId: f.factor,
1762
- startScore: f.score[0],
1763
- endScore: f.score[1]
1764
- }))), r.enableSql = v.sqlEnable === 1 ? 2 : 1, v.sqlEnable && (r.sql = v.sqlValue);
1765
- }
1766
- {
1767
- const v = ["expireDays", "virtualRealDegree", "yearProfitRate", "impliedVolatility", "levelMultiplier", "turnover", "volume", "openInterest", "optionsCpType", "optionGear"], f = g.commonIndicator.reduce((t, i) => {
1768
- const { key: j, type: A, range: W, unit: te } = i;
1769
- if (j === "dividendYield") {
1770
- let [q, F] = W;
1771
- ["", null].includes(q) || (q = q / 100), ["", null].includes(F) || (F = F / 100), t.push({
1772
- column: i.key,
1773
- start: q,
1774
- end: F
1775
- });
1776
- } else if (A === void 0 && !v.includes(j)) {
1777
- let [q, F] = W;
1778
- if (!["", null].includes(q))
1779
- switch (te[0]) {
1780
- case "亿":
1781
- q = q * 1e8;
1782
- break;
1783
- case "千万":
1784
- q = q * 1e7;
1785
- break;
1786
- default:
1787
- q = q;
1788
- break;
1789
- }
1790
- if (!["", null].includes(F))
1791
- switch (te[1]) {
1792
- case "亿":
1793
- F = F * 1e8;
1794
- break;
1795
- case "千万":
1796
- F = F * 1e7;
1797
- break;
1798
- default:
1799
- F = F;
1800
- break;
1801
- }
1802
- t.push({
1803
- column: i.key,
1804
- start: q,
1805
- end: F
1806
- });
1807
- }
1808
- return t;
1809
- }, []);
1810
- f.length && (r.query = f);
1811
- const $ = g.commonIndicator.find(({ key: t }) => t === "st");
1812
- $ && (r.st = $.st);
1813
- const I = g.commonIndicator.find(({ key: t }) => t === "tFeaturelncomes");
1814
- I && (r.netProfitQueryDto = { ...I, netProfit: I.netProfit * 1e8 });
1815
- const y = g.commonIndicator.find(({ key: t }) => t === "priceLevels");
1816
- y && (r.priceLevels = y.priceLevels);
1817
- const k = {};
1818
- g.commonIndicator.forEach((t) => {
1819
- const { key: i } = t;
1820
- switch (i) {
1821
- case "expireDays":
1822
- ["", null].includes(t.range[0]) || (k.minExpireDays = t.range[0]), ["", null].includes(t.range[1]) || (k.maxExpireDays = t.range[1]);
1823
- break;
1824
- case "virtualRealDegree":
1825
- ["", null].includes(t.range[0]) || (k.minVirtualRealDegree = t.range[0] / 100), ["", null].includes(t.range[1]) || (k.maxVirtualRealDegree = t.range[1] / 100);
1826
- break;
1827
- case "yearProfitRate":
1828
- ["", null].includes(t.range[0]) || (k.minYearProfitRate = t.range[0] / 100), ["", null].includes(t.range[1]) || (k.maxYearProfitRate = t.range[1] / 100);
1829
- break;
1830
- case "impliedVolatility":
1831
- ["", null].includes(t.range[0]) || (k.minImpliedVolatility = t.range[0] / 100), ["", null].includes(t.range[1]) || (k.maxImpliedVolatility = t.range[1] / 100);
1832
- break;
1833
- case "levelMultiplier":
1834
- ["", null].includes(t.range[0]) || (k.minLevelMultiplier = t.range[0]), ["", null].includes(t.range[1]) || (k.maxLevelMultiplier = t.range[1]);
1835
- break;
1836
- case "turnover":
1837
- ["", null].includes(t.range[0]) || (k.minTurnover = t.range[0] * 1e4), ["", null].includes(t.range[1]) || (k.maxTurnover = t.range[1] * 1e4);
1838
- break;
1839
- case "volume":
1840
- ["", null].includes(t.range[0]) || (k.minVolume = t.range[0]), ["", null].includes(t.range[1]) || (k.maxVolume = t.range[1]);
1841
- break;
1842
- case "openInterest":
1843
- ["", null].includes(t.range[0]) || (k.minOpenInterest = t.range[0]), ["", null].includes(t.range[1]) || (k.maxOpenInterest = t.range[1]);
1844
- break;
1845
- case "optionsCpType":
1846
- k.optionsCpType = t.optionsCpType;
1847
- break;
1848
- case "optionGear":
1849
- ["", null].includes(t.range[0]) || (k.minOptionGear = t.range[0]), ["", null].includes(t.range[1]) || (k.maxOptionGear = t.range[1]);
1850
- break;
1851
- }
1852
- }), Object.keys(k).length && (r.searchOptionDto = k);
1853
- }
1854
- return console.log("%c[st-varietySearch]: 接口传参数据生成完毕", "color: green", r), r;
1855
- },
1856
- // 重置函数
1857
- reset: () => {
1858
- l.value = {
1859
- // 品种市场
1860
- varietyMarket: null,
1861
- // 常用选项
1862
- commonOption: [],
1863
- // 上市板块
1864
- marketIds: [],
1865
- // 自定标签
1866
- customTag: [],
1867
- // 因子筛选
1868
- factorScreen: {
1869
- list: [],
1870
- sqlEnable: 0,
1871
- sqlValue: null
1872
- },
1873
- // 常用指标
1874
- commonIndicator: []
1875
- };
1876
- }
1877
- }), (g, r) => {
1878
- var x, v, f, $, I;
1879
- const S = ue, m = ce, n = et, O = tt;
1880
- return s(), h("div", hn, [
1881
- (x = p.value.varietyMarket) != null && x.show ? (s(), h("div", On, [
1882
- b("div", In, [
1883
- Vn,
1884
- b("span", {
1885
- onClick: r[0] || (r[0] = (y) => E("varietyMarket"))
1886
- }, "不限")
1887
- ]),
1888
- c(m, {
1889
- modelValue: l.value.varietyMarket,
1890
- "onUpdate:modelValue": r[1] || (r[1] = (y) => l.value.varietyMarket = y),
1891
- size: "small"
1892
- }, {
1893
- default: u(() => [
1894
- (s(!0), h(U, null, B(_.value, ({ label: y, value: k }) => (s(), C(S, {
1895
- label: k,
1896
- key: k
1897
- }, {
1898
- default: u(() => [
1899
- w(R(y), 1)
1900
- ]),
1901
- _: 2
1902
- }, 1032, ["label"]))), 128))
1903
- ]),
1904
- _: 1
1905
- }, 8, ["modelValue"])
1906
- ])) : T("", !0),
1907
- (v = p.value.commonOption) != null && v.show && e.value.length ? (s(), h("div", $n, [
1908
- b("div", wn, [
1909
- Cn,
1910
- b("span", {
1911
- onClick: r[2] || (r[2] = (y) => E("commonOption"))
1912
- }, "不限")
1913
- ]),
1914
- c(O, {
1915
- modelValue: l.value.commonOption,
1916
- "onUpdate:modelValue": r[3] || (r[3] = (y) => l.value.commonOption = y),
1917
- size: "small"
1918
- }, {
1919
- default: u(() => [
1920
- (s(!0), h(U, null, B(e.value, ({ label: y, value: k }) => (s(), C(n, {
1921
- label: k,
1922
- key: k
1923
- }, {
1924
- default: u(() => [
1925
- w(R(y), 1)
1926
- ]),
1927
- _: 2
1928
- }, 1032, ["label"]))), 128))
1929
- ]),
1930
- _: 1
1931
- }, 8, ["modelValue"])
1932
- ])) : T("", !0),
1933
- (f = p.value.marketIds) != null && f.show && D.value.length ? (s(), h("div", Tn, [
1934
- b("div", Sn, [
1935
- Mn,
1936
- b("span", {
1937
- onClick: r[4] || (r[4] = (y) => E("marketIds"))
1938
- }, "不限")
1939
- ]),
1940
- c(O, {
1941
- modelValue: l.value.marketIds,
1942
- "onUpdate:modelValue": r[5] || (r[5] = (y) => l.value.marketIds = y),
1943
- size: "small"
1944
- }, {
1945
- default: u(() => [
1946
- (s(!0), h(U, null, B(D.value, ({ label: y, value: k }) => (s(), C(n, {
1947
- label: k,
1948
- key: k
1949
- }, {
1950
- default: u(() => [
1951
- w(R(y), 1)
1952
- ]),
1953
- _: 2
1954
- }, 1032, ["label"]))), 128))
1955
- ]),
1956
- _: 1
1957
- }, 8, ["modelValue"])
1958
- ])) : T("", !0),
1959
- ($ = p.value.customTag) != null && $.show && N.value.length ? (s(), h("div", En, [
1960
- b("div", Un, [
1961
- Dn,
1962
- b("span", {
1963
- onClick: r[6] || (r[6] = (y) => E("customTag"))
1964
- }, "不限")
1965
- ]),
1966
- c(O, {
1967
- modelValue: l.value.customTag,
1968
- "onUpdate:modelValue": r[7] || (r[7] = (y) => l.value.customTag = y),
1969
- size: "small"
1970
- }, {
1971
- default: u(() => [
1972
- (s(!0), h(U, null, B(N.value, ({ label: y, value: k }) => (s(), C(n, {
1973
- label: k,
1974
- key: k
1975
- }, {
1976
- default: u(() => [
1977
- w(R(y), 1)
1978
- ]),
1979
- _: 2
1980
- }, 1032, ["label"]))), 128))
1981
- ]),
1982
- _: 1
1983
- }, 8, ["modelValue"])
1984
- ])) : T("", !0),
1985
- (I = p.value.factorScreen) != null && I.show ? (s(), h("div", qn, [
1986
- b("div", Fn, [
1987
- Ln,
1988
- b("span", {
1989
- onClick: r[8] || (r[8] = (y) => E("factorScreen"))
1990
- }, "不限")
1991
- ]),
1992
- c(Wt, {
1993
- data: l.value.factorScreen,
1994
- "onUpdate:data": r[9] || (r[9] = (y) => l.value.factorScreen = y),
1995
- config: p.value.factorScreen
1996
- }, null, 8, ["data", "config"])
1997
- ])) : T("", !0),
1998
- c(xn, {
1999
- data: l.value.commonIndicator,
2000
- "onUpdate:data": r[10] || (r[10] = (y) => l.value.commonIndicator = y),
2001
- varietyMarket: l.value.varietyMarket,
2002
- commonOption: l.value.commonOption,
2003
- config: p.value.commonIndicator
2004
- }, null, 8, ["data", "varietyMarket", "commonOption", "config"])
2005
- ]);
2006
- };
2007
- }
2008
- }, zn = /* @__PURE__ */ ge(Nn, [["__scopeId", "data-v-e077f597"]]), cl = {
2009
- install(a) {
2010
- a.component("st-varietySearch", zn);
2011
- }
2012
- };
2013
- export {
2014
- cl as default
2015
- };
1
+