st-comp 0.0.148 → 0.0.150

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 (150) hide show
  1. package/components.d.ts +3 -0
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +5 -4
  4. package/es/Dialog.cjs +1 -1
  5. package/es/Dialog.js +28 -24
  6. package/es/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +577 -631
  8. package/es/Kline.cjs +1 -0
  9. package/es/Kline.js +1903 -0
  10. package/es/KlineBasic.cjs +1 -1
  11. package/es/KlineBasic.js +677 -1428
  12. package/es/KlineNew.cjs +1 -3
  13. package/es/KlineNew.js +316 -2740
  14. package/es/Pagination.cjs +1 -1
  15. package/es/Pagination.js +60 -58
  16. package/es/PasswordPrompt.cjs +1 -0
  17. package/es/PasswordPrompt.js +13 -0
  18. package/es/Table.cjs +1 -1
  19. package/es/Table.js +102 -98
  20. package/es/User.cjs +1 -1
  21. package/es/User.js +397 -373
  22. package/es/VarietySearch.cjs +1 -1
  23. package/es/VarietySearch.js +2395 -1
  24. package/es/VirtualTable.cjs +5 -5
  25. package/es/VirtualTable.js +154 -151
  26. package/es/_initCloneObject-47814efa.cjs +1 -0
  27. package/es/{_initCloneObject-ec5c9523.js → _initCloneObject-e3d8a9ab.js} +13 -13
  28. package/es/base-0ca7c43a.cjs +5 -0
  29. package/es/base-19787dfb.js +303 -0
  30. package/es/{castArray-c770910d.js → castArray-8405000b.js} +1 -1
  31. package/es/castArray-a78ae889.cjs +1 -0
  32. package/es/{config-provider-feed0e8a.js → config-provider-0f6672af.js} +3 -3
  33. package/es/{config-provider-c87e277f.cjs → config-provider-cfbb9cd8.cjs} +1 -1
  34. package/es/{debounce-c64fb3b5.js → debounce-6cb0781f.js} +29 -29
  35. package/es/debounce-cf26af24.cjs +1 -0
  36. package/es/{dropdown-c9272ca3.js → dropdown-17b3ef6a.js} +4 -4
  37. package/es/{dropdown-6bdb3cf4.cjs → dropdown-790d31ea.cjs} +1 -1
  38. package/es/el-button-0bf1d532.js +236 -0
  39. package/es/el-button-62966947.cjs +1 -0
  40. package/es/el-checkbox-group-45247bbf.cjs +1 -0
  41. package/es/el-checkbox-group-d53bc316.js +67 -0
  42. package/es/el-empty-2ece1134.cjs +1 -0
  43. package/es/{el-empty-89a523ed.js → el-empty-bd5343a7.js} +10 -9
  44. package/es/{el-form-item-55d36086.js → el-form-item-05c0e335.js} +82 -81
  45. package/es/el-form-item-47e255d4.cjs +12 -0
  46. package/es/{el-input-cb528574.js → el-input-1e309239.js} +46 -45
  47. package/es/el-input-6a3805c5.cjs +1 -0
  48. package/es/{el-input-number-ce30bfa8.js → el-input-number-60ebc58f.js} +50 -48
  49. package/es/el-input-number-96ff2e47.cjs +1 -0
  50. package/es/el-menu-item-4c9eb7ad.cjs +1 -0
  51. package/es/el-menu-item-6c6236a1.js +772 -0
  52. package/es/{el-message-d51d032b.js → el-message-7d927756.js} +56 -55
  53. package/es/el-message-d5ed7a4f.cjs +1 -0
  54. package/es/el-overlay-26bf0945.js +521 -0
  55. package/es/el-overlay-41994f67.cjs +1 -0
  56. package/es/el-popover-17e2e66c.js +140 -0
  57. package/es/el-popover-7bd8a7c3.cjs +1 -0
  58. package/es/el-popper-7adbf1c6.cjs +1 -0
  59. package/es/{el-popper-f4b01f85.js → el-popper-b6527ae2.js} +217 -216
  60. package/es/{el-scrollbar-e8e93751.js → el-scrollbar-29bcab5f.js} +22 -22
  61. package/es/el-scrollbar-ac525239.cjs +1 -0
  62. package/es/el-select-31f8ac8a.cjs +1 -0
  63. package/es/{el-select-e71af2e6.js → el-select-7395562b.js} +42 -40
  64. package/es/el-table-column-47d80736.js +3804 -0
  65. package/es/el-table-column-bdc46568.cjs +14 -0
  66. package/es/{el-tag-d65768f4.js → el-tag-7414e0c7.js} +59 -58
  67. package/es/el-tag-9732314f.cjs +1 -0
  68. package/es/{index-da646183.cjs → index-1d85ba4b.cjs} +1 -1
  69. package/es/{index-92ba4292.js → index-273822d1.js} +26 -25
  70. package/es/index-2f958e56.cjs +3 -0
  71. package/es/index-375e8de4.cjs +5 -0
  72. package/es/{index-121e2861.js → index-621b092b.js} +3 -3
  73. package/es/index-657047bb.js +513 -0
  74. package/es/{index-18416440.cjs → index-65b4113e.cjs} +1 -1
  75. package/es/index-70372cdb.js +519 -0
  76. package/es/{use-form-common-props-4d37077d.js → index-72151b24.js} +151 -312
  77. package/es/index-9e6e8d03.cjs +1 -0
  78. package/es/index-ab96bbf4.js +156 -0
  79. package/es/index-afc88a4b.cjs +1 -0
  80. package/es/index-c066fe0d.js +82 -0
  81. package/es/index-ce3223db.cjs +1 -0
  82. package/es/{index-709675d5.js → index-dc22ffe4.js} +18 -18
  83. package/es/index-eea0bcb3.cjs +1 -0
  84. package/es/index.esm-8d9a2abe.js +2432 -0
  85. package/es/index.esm-94a95a2a.cjs +3 -0
  86. package/es/{raf-f55e0daa.js → raf-a532c514.js} +1 -1
  87. package/es/{raf-2d77cbbe.cjs → raf-f46caea0.cjs} +1 -1
  88. package/es/{scroll-c8ac196e.cjs → scroll-339681d4.cjs} +1 -1
  89. package/es/{scroll-ca84f80a.js → scroll-d787d648.js} +1 -1
  90. package/es/style.css +1 -1
  91. package/es/use-form-common-props-5ff2f51b.js +171 -0
  92. package/es/use-form-common-props-74a96df2.cjs +2 -0
  93. package/es/vnode-6a0c7411.js +14 -0
  94. package/es/vnode-b15eb11b.cjs +1 -0
  95. package/es/{zh-cn-414d7f0c.cjs → zh-cn-36f34912.cjs} +1 -1
  96. package/es/{zh-cn-23c8e0d1.js → zh-cn-f37255ae.js} +2 -2
  97. package/lib/bundle.js +1 -1
  98. package/lib/bundle.umd.cjs +206 -206
  99. package/lib/{index-ffeb163e.js → index-d0cb2fa2.js} +33754 -31705
  100. package/lib/{python-0ec8f68c.js → python-050ba5a4.js} +1 -1
  101. package/lib/style.css +1 -1
  102. package/package.json +1 -1
  103. package/packages/Kline/components/Contextmenu/index.vue +110 -0
  104. package/packages/Kline/components/Tips/index.vue +40 -0
  105. package/packages/Kline/componentsNew/KlineSlide/index.vue +155 -0
  106. package/packages/Kline/componentsNew/KlineSub/index.vue +297 -0
  107. package/packages/Kline/componentsNew/KlineTips/index.vue +66 -0
  108. package/packages/Kline/componentsNew/KlineUtils/index.vue +84 -0
  109. package/packages/Kline/componentsNew/Tips/index.vue +33 -0
  110. package/packages/Kline/formatKlineData.ts +109 -0
  111. package/packages/Kline/images/buy.svg +1 -0
  112. package/packages/Kline/images/pen.png +0 -0
  113. package/packages/Kline/images/sell.svg +1 -0
  114. package/packages/Kline/images/t.svg +1 -0
  115. package/packages/Kline/index.ts +16 -0
  116. package/packages/Kline/index.vue +891 -0
  117. package/packages/Kline/option.ts +539 -0
  118. package/packages/Kline/type.d.ts +219 -0
  119. package/packages/Kline/utils.ts +682 -0
  120. package/packages/PasswordPrompt/index.ts +8 -0
  121. package/packages/PasswordPrompt/index.vue +266 -0
  122. package/packages/User/index.vue +97 -58
  123. package/packages/index.ts +4 -0
  124. package/src/pages/Kline/index.vue +12 -0
  125. package/src/pages/PasswordPrompt/index.vue +12 -0
  126. package/src/router/routes.ts +10 -0
  127. package/es/_initCloneObject-476b02ce.cjs +0 -1
  128. package/es/base-6ccc8fc2.cjs +0 -9
  129. package/es/base-950bac7e.js +0 -816
  130. package/es/castArray-374558a5.cjs +0 -1
  131. package/es/debounce-a6b4f91b.cjs +0 -1
  132. package/es/el-button-b8f71c7d.cjs +0 -1
  133. package/es/el-button-d7b6eebd.js +0 -745
  134. package/es/el-empty-12eece57.cjs +0 -1
  135. package/es/el-form-item-ebbf096d.cjs +0 -12
  136. package/es/el-input-2c7e70a3.cjs +0 -1
  137. package/es/el-input-number-8e168e83.cjs +0 -1
  138. package/es/el-message-612c2346.cjs +0 -1
  139. package/es/el-overlay-07414277.js +0 -526
  140. package/es/el-overlay-fb255b83.cjs +0 -1
  141. package/es/el-popper-8360bd91.cjs +0 -1
  142. package/es/el-scrollbar-271142ad.cjs +0 -1
  143. package/es/el-select-2e71d4af.cjs +0 -1
  144. package/es/el-table-column-9fe79f05.cjs +0 -14
  145. package/es/el-table-column-dc562f14.js +0 -3933
  146. package/es/el-tag-930e7b32.cjs +0 -1
  147. package/es/index-0ed86daf.cjs +0 -3
  148. package/es/index-674d2fd7.cjs +0 -1
  149. package/es/index-aece600c.js +0 -81
  150. package/es/use-form-common-props-c1960844.cjs +0 -2
@@ -1 +1,2395 @@
1
-
1
+ import { b as le, i as he, a as Ve, c as xe, A as Oe, u as ue, _ as ie, e as Be, w as Ge, s as we } from "./base-19787dfb.js";
2
+ import "./el-tag-7414e0c7.js";
3
+ import { E as ce, a as de } from "./el-select-7395562b.js";
4
+ import "./el-scrollbar-29bcab5f.js";
5
+ import { u as Ye, E as Je } from "./el-popper-b6527ae2.js";
6
+ import { E as Ae } from "./el-checkbox-group-d53bc316.js";
7
+ import { b as Ke, c as Qe, E as Ze, a as He } from "./el-table-column-47d80736.js";
8
+ import { ref as Q, inject as We, computed as N, defineComponent as Z, openBlock as s, createElementBlock as m, normalizeClass as K, unref as v, createElementVNode as f, withDirectives as pe, isRef as Te, withModifiers as X, vModelRadio as Ce, renderSlot as ve, createTextVNode as D, toDisplayString as J, nextTick as Se, normalizeStyle as Xe, onMounted as el, provide as ll, reactive as tl, toRefs as nl, watch as ee, mergeModels as te, useModel as ne, createBlock as q, withCtx as d, createVNode as r, Fragment as U, createCommentVNode as z, renderList as j, pushScopeId as me, popScopeId as fe, createSlots as re, vShow as al } from "vue";
9
+ import { E as ye } from "./el-overlay-26bf0945.js";
10
+ import { E as ol, a as rl } from "./el-form-item-05c0e335.js";
11
+ import { E as Ue } from "./el-input-1e309239.js";
12
+ import { E as Ee } from "./el-input-number-60ebc58f.js";
13
+ import "./el-tooltip-4ed993c7.js";
14
+ import { E as Re } from "./el-button-0bf1d532.js";
15
+ import { p as se, i as sl, h as ul, E as il } from "./index-72151b24.js";
16
+ import { E as A } from "./el-message-7d927756.js";
17
+ import { _ as ge } from "./_plugin-vue_export-helper-dad06003.js";
18
+ import { E as qe } from "./index-273822d1.js";
19
+ import { u as Me, a as cl, b as dl, d as pl, e as vl } from "./use-form-common-props-5ff2f51b.js";
20
+ import { U as be, C as ml } from "./index-621b092b.js";
21
+ import { a as fl } from "./index-c066fe0d.js";
22
+ import { u as yl } from "./index-70372cdb.js";
23
+ import "./castArray-8405000b.js";
24
+ import "./index-dc22ffe4.js";
25
+ import "./scroll-d787d648.js";
26
+ import "./debounce-6cb0781f.js";
27
+ import "./_initCloneObject-e3d8a9ab.js";
28
+ import "./raf-a532c514.js";
29
+ import "./vnode-6a0c7411.js";
30
+ import "./typescript-7ae59c4c.js";
31
+ import "./index-657047bb.js";
32
+ import "./config-provider-0f6672af.js";
33
+ const De = le({
34
+ modelValue: {
35
+ type: [String, Number, Boolean],
36
+ default: void 0
37
+ },
38
+ size: Me,
39
+ disabled: Boolean,
40
+ label: {
41
+ type: [String, Number, Boolean],
42
+ default: void 0
43
+ },
44
+ value: {
45
+ type: [String, Number, Boolean],
46
+ default: void 0
47
+ },
48
+ name: {
49
+ type: String,
50
+ default: void 0
51
+ }
52
+ }), gl = le({
53
+ ...De,
54
+ border: Boolean
55
+ }), Fe = {
56
+ [be]: (p) => he(p) || Ve(p) || xe(p),
57
+ [ml]: (p) => he(p) || Ve(p) || xe(p)
58
+ }, Le = Symbol("radioGroupKey"), je = (p, V) => {
59
+ const y = Q(), n = We(Le, void 0), k = N(() => !!n), R = N(() => Oe(p.value) ? p.label : p.value), u = N({
60
+ get() {
61
+ return k.value ? n.modelValue : p.modelValue;
62
+ },
63
+ set(i) {
64
+ k.value ? n.changeEvent(i) : V && V(be, i), y.value.checked = p.modelValue === R.value;
65
+ }
66
+ }), t = cl(N(() => n == null ? void 0 : n.size)), E = dl(N(() => n == null ? void 0 : n.disabled)), L = Q(!1), M = N(() => E.value || k.value && u.value !== R.value ? -1 : 0);
67
+ return fl({
68
+ from: "label act as value",
69
+ replacement: "value",
70
+ version: "3.0.0",
71
+ scope: "el-radio",
72
+ ref: "https://element-plus.org/en-US/component/radio.html"
73
+ }, N(() => k.value && Oe(p.value))), {
74
+ radioRef: y,
75
+ isGroup: k,
76
+ radioGroup: n,
77
+ focus: L,
78
+ size: t,
79
+ disabled: E,
80
+ tabIndex: M,
81
+ modelValue: u,
82
+ actualValue: R
83
+ };
84
+ }, bl = Z({
85
+ name: "ElRadio"
86
+ }), kl = /* @__PURE__ */ Z({
87
+ ...bl,
88
+ props: gl,
89
+ emits: Fe,
90
+ setup(p, { emit: V }) {
91
+ const y = p, n = ue("radio"), { radioRef: k, radioGroup: R, focus: u, size: t, disabled: E, modelValue: L, actualValue: M } = je(y, V);
92
+ function i() {
93
+ Se(() => V("change", L.value));
94
+ }
95
+ return (a, C) => {
96
+ var o;
97
+ return s(), m("label", {
98
+ class: K([
99
+ v(n).b(),
100
+ v(n).is("disabled", v(E)),
101
+ v(n).is("focus", v(u)),
102
+ v(n).is("bordered", a.border),
103
+ v(n).is("checked", v(L) === v(M)),
104
+ v(n).m(v(t))
105
+ ])
106
+ }, [
107
+ f("span", {
108
+ class: K([
109
+ v(n).e("input"),
110
+ v(n).is("disabled", v(E)),
111
+ v(n).is("checked", v(L) === v(M))
112
+ ])
113
+ }, [
114
+ pe(f("input", {
115
+ ref_key: "radioRef",
116
+ ref: k,
117
+ "onUpdate:modelValue": (l) => Te(L) ? L.value = l : null,
118
+ class: K(v(n).e("original")),
119
+ value: v(M),
120
+ name: a.name || ((o = v(R)) == null ? void 0 : o.name),
121
+ disabled: v(E),
122
+ checked: v(L) === v(M),
123
+ type: "radio",
124
+ onFocus: (l) => u.value = !0,
125
+ onBlur: (l) => u.value = !1,
126
+ onChange: i,
127
+ onClick: X(() => {
128
+ }, ["stop"])
129
+ }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
130
+ [Ce, v(L)]
131
+ ]),
132
+ f("span", {
133
+ class: K(v(n).e("inner"))
134
+ }, null, 2)
135
+ ], 2),
136
+ f("span", {
137
+ class: K(v(n).e("label")),
138
+ onKeydown: X(() => {
139
+ }, ["stop"])
140
+ }, [
141
+ ve(a.$slots, "default", {}, () => [
142
+ D(J(a.label), 1)
143
+ ])
144
+ ], 42, ["onKeydown"])
145
+ ], 2);
146
+ };
147
+ }
148
+ });
149
+ var _l = /* @__PURE__ */ ie(kl, [["__file", "radio.vue"]]);
150
+ const hl = le({
151
+ ...De
152
+ }), Vl = Z({
153
+ name: "ElRadioButton"
154
+ }), xl = /* @__PURE__ */ Z({
155
+ ...Vl,
156
+ props: hl,
157
+ setup(p) {
158
+ const V = p, y = ue("radio"), { radioRef: n, focus: k, size: R, disabled: u, modelValue: t, radioGroup: E, actualValue: L } = je(V), M = N(() => ({
159
+ backgroundColor: (E == null ? void 0 : E.fill) || "",
160
+ borderColor: (E == null ? void 0 : E.fill) || "",
161
+ boxShadow: E != null && E.fill ? `-1px 0 0 0 ${E.fill}` : "",
162
+ color: (E == null ? void 0 : E.textColor) || ""
163
+ }));
164
+ return (i, a) => {
165
+ var C;
166
+ return s(), m("label", {
167
+ class: K([
168
+ v(y).b("button"),
169
+ v(y).is("active", v(t) === v(L)),
170
+ v(y).is("disabled", v(u)),
171
+ v(y).is("focus", v(k)),
172
+ v(y).bm("button", v(R))
173
+ ])
174
+ }, [
175
+ pe(f("input", {
176
+ ref_key: "radioRef",
177
+ ref: n,
178
+ "onUpdate:modelValue": (o) => Te(t) ? t.value = o : null,
179
+ class: K(v(y).be("button", "original-radio")),
180
+ value: v(L),
181
+ type: "radio",
182
+ name: i.name || ((C = v(E)) == null ? void 0 : C.name),
183
+ disabled: v(u),
184
+ onFocus: (o) => k.value = !0,
185
+ onBlur: (o) => k.value = !1,
186
+ onClick: X(() => {
187
+ }, ["stop"])
188
+ }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
189
+ [Ce, v(t)]
190
+ ]),
191
+ f("span", {
192
+ class: K(v(y).be("button", "inner")),
193
+ style: Xe(v(t) === v(L) ? v(M) : {}),
194
+ onKeydown: X(() => {
195
+ }, ["stop"])
196
+ }, [
197
+ ve(i.$slots, "default", {}, () => [
198
+ D(J(i.label), 1)
199
+ ])
200
+ ], 46, ["onKeydown"])
201
+ ], 2);
202
+ };
203
+ }
204
+ });
205
+ var ze = /* @__PURE__ */ ie(xl, [["__file", "radio-button.vue"]]);
206
+ const Ol = le({
207
+ id: {
208
+ type: String,
209
+ default: void 0
210
+ },
211
+ size: Me,
212
+ disabled: Boolean,
213
+ modelValue: {
214
+ type: [String, Number, Boolean],
215
+ default: void 0
216
+ },
217
+ fill: {
218
+ type: String,
219
+ default: ""
220
+ },
221
+ textColor: {
222
+ type: String,
223
+ default: ""
224
+ },
225
+ name: {
226
+ type: String,
227
+ default: void 0
228
+ },
229
+ validateEvent: {
230
+ type: Boolean,
231
+ default: !0
232
+ },
233
+ ...Ye(["ariaLabel"])
234
+ }), Il = Fe, $l = Z({
235
+ name: "ElRadioGroup"
236
+ }), wl = /* @__PURE__ */ Z({
237
+ ...$l,
238
+ props: Ol,
239
+ emits: Il,
240
+ setup(p, { emit: V }) {
241
+ const y = p, n = ue("radio"), k = yl(), R = Q(), { formItem: u } = pl(), { inputId: t, isLabeledByFormItem: E } = vl(y, {
242
+ formItemContext: u
243
+ }), L = (i) => {
244
+ V(be, i), Se(() => V("change", i));
245
+ };
246
+ el(() => {
247
+ const i = R.value.querySelectorAll("[type=radio]"), a = i[0];
248
+ !Array.from(i).some((C) => C.checked) && a && (a.tabIndex = 0);
249
+ });
250
+ const M = N(() => y.name || k.value);
251
+ return ll(Le, tl({
252
+ ...nl(y),
253
+ changeEvent: L,
254
+ name: M
255
+ })), ee(() => y.modelValue, () => {
256
+ y.validateEvent && (u == null || u.validate("change").catch((i) => Be(i)));
257
+ }), (i, a) => (s(), m("div", {
258
+ id: v(t),
259
+ ref_key: "radioGroupRef",
260
+ ref: R,
261
+ class: K(v(n).b("group")),
262
+ role: "radiogroup",
263
+ "aria-label": v(E) ? void 0 : i.ariaLabel || "radio-group",
264
+ "aria-labelledby": v(E) ? v(u).labelId : void 0
265
+ }, [
266
+ ve(i.$slots, "default")
267
+ ], 10, ["id", "aria-label", "aria-labelledby"]));
268
+ }
269
+ });
270
+ var Ne = /* @__PURE__ */ ie(wl, [["__file", "radio-group.vue"]]);
271
+ const ke = Ge(_l, {
272
+ RadioButton: ze,
273
+ RadioGroup: Ne
274
+ }), _e = we(Ne), Tl = we(ze);
275
+ const Ie = {
276
+ // 品种市场 [选项: 预警字典1000]
277
+ varietyMarket: {
278
+ show: !0,
279
+ options: [
280
+ // { label: "ETF", value: 2, memo: [] },
281
+ // { label: "A股", value: 3, memo: [4, 6, 12, 14, 15, 16] },
282
+ // { label: "期货", value: 4, memo: [1, 2, 3, 5, 7, 8, 9, 10] },
283
+ // { label: "港股", value: 5, memo: [4, 6, 14] },
284
+ // { label: "外盘", value: 6, memo: [1, 2, 3, 5, 7, 8, 9, 10] },
285
+ // { label: "美股", value: 7, memo: [4, 6, 14] },
286
+ // { label: "期权", value: 8, memo: [11] },
287
+ ]
288
+ },
289
+ // 常用选项 [选项: 预警字典1003]
290
+ commonOption: {
291
+ show: !0,
292
+ options: [
293
+ // { label: "个股", value: 14 },
294
+ // { label: "期货主连", value: 1 },
295
+ // { label: "期货主力", value: 2 },
296
+ // { label: "期货加权", value: 3 },
297
+ // { label: "常用股票指数", value: 4 },
298
+ // { label: "期货收益率指数", value: 5 },
299
+ // { label: "行业板块指数", value: 6 },
300
+ // { label: "期货次主连", value: 7 },
301
+ // { label: "期货次主力", value: 8 },
302
+ // { label: "期货板块收益率指数", value: 9 },
303
+ // { label: "期货板块加权指数", value: 10 },
304
+ // { label: "期权", value: 11 },
305
+ // { label: "价差板块指数", value: 12 },
306
+ // { label: "概念板块指数", value: 15 },
307
+ ]
308
+ },
309
+ // 上市板块 [选项: 预警字典1030]
310
+ marketIds: {
311
+ show: !0,
312
+ options: [
313
+ // { label: "沪深主板", value: 1, varietyMarketIds: "3" },
314
+ // { label: "创业板", value: 2, varietyMarketIds: "3" },
315
+ // { label: "科创板", value: 4, varietyMarketIds: "3" },
316
+ // { label: "新三板", value: 8, varietyMarketIds: "3" },
317
+ // { label: "沪股通", value: 1024, varietyMarketIds: "3" },
318
+ // { label: "深股通", value: 2048, varietyMarketIds: "3" },
319
+ // { label: "沪港通", value: 4096, varietyMarketIds: "5" },
320
+ // { label: "深港通", value: 8192, varietyMarketIds: "5" },
321
+ ]
322
+ },
323
+ // 自定标签 [选项: 接口获取]
324
+ customTag: {
325
+ show: !0,
326
+ options: []
327
+ },
328
+ // 价差转换 [选项: 前端默认]
329
+ jcTranslate: {
330
+ show: !0,
331
+ jcOptions: [
332
+ { label: "恒指", value: "HZCFJC" },
333
+ { label: "恒生科技", value: "HSKJJC" },
334
+ { label: "上证50", value: "SZ50CFJC" },
335
+ { label: "沪深300", value: "HS300CFJC" },
336
+ { label: "中证500", value: "ZZ500CFJC" },
337
+ { label: "中证1000", value: "ZZ1000JC" }
338
+ ]
339
+ },
340
+ // 因子筛选 [选项: 接口获取]
341
+ factorScreen: {
342
+ show: !0,
343
+ // SQL功能是否展示
344
+ sqlShow: !1,
345
+ // 周期功能是否展示
346
+ cycleShow: !0,
347
+ // 周期默认值
348
+ cycleDefault: null,
349
+ cycleOptions: [],
350
+ // 周期下拉框数据源
351
+ factorOptions: [],
352
+ // 因子下拉框数据源
353
+ factorDescriptions: []
354
+ // 因子使用说明数据源
355
+ },
356
+ // 常用指标 [选项: 组件默认]
357
+ commonIndicator: {
358
+ show: !0,
359
+ options: [
360
+ // 总市值
361
+ {
362
+ key: "marketCapital",
363
+ label: "总市值",
364
+ parent: {
365
+ varietyMarketIds: [3, 5, 7],
366
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
367
+ },
368
+ // 便捷选项
369
+ convenientOptions: [
370
+ { range: [null, 10], unit: ["亿", "亿"], text: "≤10亿" },
371
+ { range: [null, 25], unit: ["亿", "亿"], text: "≤25亿" },
372
+ { range: [null, 50], unit: ["亿", "亿"], text: "≤50亿" },
373
+ { range: [20, 50], unit: ["亿", "亿"], text: "20亿~50亿" },
374
+ { range: [100, null], unit: ["亿", "亿"], text: "≥100亿" },
375
+ { range: [200, null], unit: ["亿", "亿"], text: "≥200亿" },
376
+ { range: [500, null], unit: ["亿", "亿"], text: "≥500亿" },
377
+ { range: [1e3, null], unit: ["亿", "亿"], text: "≥1000亿" }
378
+ ],
379
+ // 默认选中单位
380
+ defaultUnit: ["亿", "亿"],
381
+ // 单位下拉框选项
382
+ unitOptions: ["元", "千万", "亿"]
383
+ },
384
+ // 流通市值
385
+ {
386
+ key: "floatMarketCapital",
387
+ label: "流通市值",
388
+ parent: {
389
+ varietyMarketIds: [3, 5, 7],
390
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
391
+ },
392
+ // 便捷选项
393
+ convenientOptions: [
394
+ { range: [null, 5], unit: ["亿", "亿"], text: "≤5亿" },
395
+ { range: [null, 20], unit: ["亿", "亿"], text: "≤20亿" },
396
+ { range: [null, 50], unit: ["亿", "亿"], text: "≤50亿" },
397
+ { range: [null, 100], unit: ["亿", "亿"], text: "≤100亿" },
398
+ { range: [100, null], unit: ["亿", "亿"], text: "≥100亿" },
399
+ { range: [200, null], unit: ["亿", "亿"], text: "≥200亿" },
400
+ { range: [500, null], unit: ["亿", "亿"], text: "≥500亿" },
401
+ { range: [1e3, null], unit: ["亿", "亿"], text: "≥1000亿" }
402
+ ],
403
+ // 默认选中单位
404
+ defaultUnit: ["亿", "亿"],
405
+ // 单位下拉框选项
406
+ unitOptions: ["元", "千万", "亿"]
407
+ },
408
+ // 总股本
409
+ {
410
+ key: "totalShares",
411
+ label: "总股本",
412
+ parent: {
413
+ varietyMarketIds: [3, 5, 7],
414
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
415
+ },
416
+ // 便捷选项
417
+ convenientOptions: [
418
+ { range: [null, 5], unit: ["亿", "亿"], text: "≤5亿" },
419
+ { range: [null, 10], unit: ["亿", "亿"], text: "≤10亿" },
420
+ { range: [null, 75], unit: ["亿", "亿"], text: "≤75亿" },
421
+ { range: [10, 75], unit: ["亿", "亿"], text: "10亿~75亿" },
422
+ { range: [100, null], unit: ["亿", "亿"], text: "≥100亿" }
423
+ ],
424
+ // 默认选中单位
425
+ defaultUnit: ["亿", "亿"],
426
+ // 单位下拉框选项
427
+ unitOptions: ["元", "千万", "亿"]
428
+ },
429
+ // 流通股本
430
+ {
431
+ key: "freeFloatShares",
432
+ label: "流通股本",
433
+ parent: {
434
+ varietyMarketIds: [3, 5, 7],
435
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
436
+ },
437
+ // 便捷选项
438
+ convenientOptions: [
439
+ { range: [null, 5], unit: ["千万", "千万"], text: "≤5千万" },
440
+ { range: [5, 3], unit: ["千万", "亿"], text: "5千万~3亿" },
441
+ { range: [null, 5], unit: ["亿", "亿"], text: "≤5亿" },
442
+ { range: [null, 10], unit: ["亿", "亿"], text: "≤10亿" },
443
+ { range: [8, 30], unit: ["亿", "亿"], text: "8亿~30亿" },
444
+ { range: [30, null], unit: ["亿", "亿"], text: "≥30亿" }
445
+ ],
446
+ // 默认选中单位
447
+ defaultUnit: ["亿", "亿"],
448
+ // 单位下拉框选项
449
+ unitOptions: ["元", "千万", "亿"]
450
+ },
451
+ // 换手率(实)
452
+ {
453
+ key: "turnoverRate",
454
+ label: "换手率(实)",
455
+ parent: {
456
+ varietyMarketIds: [3, 5, 7],
457
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
458
+ },
459
+ // 便捷选项
460
+ convenientOptions: [
461
+ { range: [null, 1], unit: ["%", "%"], text: "≤1%" },
462
+ { range: [1, 5], unit: ["%", "%"], text: "1%~5%" },
463
+ { range: [5, 10], unit: ["%", "%"], text: "5%~10%" },
464
+ { range: [10, null], unit: ["%", "%"], text: "≥10%" }
465
+ ],
466
+ // 默认选中单位
467
+ defaultUnit: ["%", "%"],
468
+ // 单位下拉框选项
469
+ unitOptions: ["%"]
470
+ },
471
+ // 市盈率
472
+ {
473
+ key: "peTtm",
474
+ label: "市盈率",
475
+ parent: {
476
+ varietyMarketIds: [3, 5, 7],
477
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
478
+ },
479
+ // 便捷选项
480
+ convenientOptions: [
481
+ { range: [null, 0], unit: [], text: "亏损" },
482
+ { range: [0, null], unit: [], text: "≥0" },
483
+ { range: [0, 20], unit: [], text: "0~20" },
484
+ { range: [20, 40], unit: [], text: "20~40" },
485
+ { range: [40, 100], unit: [], text: "40~100" },
486
+ { range: [100, null], unit: [], text: "≥100" }
487
+ ],
488
+ // 默认选中单位
489
+ defaultUnit: [],
490
+ // 单位下拉框选项
491
+ unitOptions: []
492
+ },
493
+ // 每股净收益
494
+ {
495
+ key: "eps",
496
+ label: "每股净收益",
497
+ parent: {
498
+ varietyMarketIds: [3, 5, 7],
499
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
500
+ },
501
+ // 便捷选项
502
+ convenientOptions: [
503
+ { range: [null, 0], unit: ["元", "元"], text: "≤0" },
504
+ { range: [0, null], unit: ["元", "元"], text: "≥0" },
505
+ { range: [0.2, null], unit: ["元", "元"], text: "≥0.2元" },
506
+ { range: [0.5, null], unit: ["元", "元"], text: "≥0.5元" },
507
+ { range: [1, null], unit: ["元", "元"], text: "≥1元" },
508
+ { range: [2, null], unit: ["元", "元"], text: "≥2元" }
509
+ ],
510
+ // 默认选中单位
511
+ defaultUnit: ["元", "元"],
512
+ // 单位下拉框选项
513
+ unitOptions: ["元"]
514
+ },
515
+ // 是否ST
516
+ {
517
+ key: "st",
518
+ label: "是否ST",
519
+ parent: {
520
+ varietyMarketIds: [3, 5, 7],
521
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
522
+ },
523
+ type: "custom"
524
+ },
525
+ // 市净率
526
+ {
527
+ key: "pb",
528
+ label: "市净率",
529
+ parent: {
530
+ varietyMarketIds: [3, 5, 7],
531
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
532
+ },
533
+ // 便捷选项
534
+ convenientOptions: [
535
+ { range: [0, null], unit: [], text: "≥0" },
536
+ { range: [0, 1], unit: [], text: "0~1" },
537
+ { range: [1, 2], unit: [], text: "1~2" },
538
+ { range: [0, 3], unit: [], text: "0~3" },
539
+ { range: [3, null], unit: [], text: "≥3" }
540
+ ],
541
+ // 默认选中单位
542
+ defaultUnit: [],
543
+ // 单位下拉框选项
544
+ unitOptions: []
545
+ },
546
+ // 成交额
547
+ {
548
+ key: "mnShr",
549
+ label: "成交额",
550
+ parent: {
551
+ varietyMarketIds: [3, 5, 7],
552
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
553
+ },
554
+ // 便捷选项
555
+ convenientOptions: [
556
+ { range: [0, 1], unit: ["亿", "亿"], text: "0~1亿" },
557
+ { range: [0, 5], unit: ["亿", "亿"], text: "0~5亿" },
558
+ { range: [0, 10], unit: ["亿", "亿"], text: "0~10亿" },
559
+ { range: [10, null], unit: ["亿", "亿"], text: "≥10亿" },
560
+ { range: [50, null], unit: ["亿", "亿"], text: "≥50亿" },
561
+ { range: [100, null], unit: ["亿", "亿"], text: "≥100亿" }
562
+ ],
563
+ // 默认选中单位
564
+ defaultUnit: ["亿", "亿"],
565
+ // 单位下拉框选项
566
+ unitOptions: ["元", "千万", "亿"],
567
+ // 是否展示排名类型
568
+ showRankType: !0,
569
+ // 默认单选类型 0: 数值类型 1: 排名
570
+ defaultRadioType: "1",
571
+ // 默认数值
572
+ defaultRankRange: [0, 25]
573
+ },
574
+ // 净资产收益率roe
575
+ {
576
+ key: "roe",
577
+ label: "净资产收益率roe",
578
+ parent: {
579
+ varietyMarketIds: [3, 5, 7],
580
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
581
+ },
582
+ // 便捷选项
583
+ convenientOptions: [
584
+ { range: [null, 0], unit: ["%", "%"], text: "<0" },
585
+ { range: [0, null], unit: ["%", "%"], text: ">0" },
586
+ { range: [10, null], unit: ["%", "%"], text: ">10%" },
587
+ { range: [15, null], unit: ["%", "%"], text: ">15%" },
588
+ { range: [20, null], unit: ["%", "%"], text: ">20%" },
589
+ { range: [30, null], unit: ["%", "%"], text: ">30%" }
590
+ ],
591
+ // 默认选中单位
592
+ defaultUnit: ["%", "%"],
593
+ // 单位下拉框选项
594
+ unitOptions: ["%"]
595
+ },
596
+ // 净利润
597
+ {
598
+ key: "tFeaturelncomes",
599
+ label: "净利润",
600
+ parent: {
601
+ varietyMarketIds: [3, 5, 7],
602
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
603
+ },
604
+ type: "custom"
605
+ },
606
+ // 股息率
607
+ {
608
+ key: "dividendYield",
609
+ label: "股息率",
610
+ parent: {
611
+ varietyMarketIds: [3, 5, 7],
612
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
613
+ },
614
+ // 便捷选项
615
+ convenientOptions: [
616
+ { range: [null, 1], unit: ["%", "%"], text: "≤1%" },
617
+ { range: [1, 5], unit: ["%", "%"], text: "1%~5%" },
618
+ { range: [5, 10], unit: ["%", "%"], text: "5%~10%" },
619
+ { range: [10, null], unit: ["%", "%"], text: "≥10%" }
620
+ ],
621
+ // 默认选中单位
622
+ defaultUnit: ["%", "%"],
623
+ // 单位下拉框选项
624
+ unitOptions: ["%"]
625
+ },
626
+ // 股价分位
627
+ {
628
+ key: "priceLevels",
629
+ label: "股价分位",
630
+ parent: {
631
+ varietyMarketIds: [3, 5, 7],
632
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
633
+ },
634
+ type: "custom"
635
+ },
636
+ // 市盈率分位
637
+ {
638
+ key: "peTtmLevels",
639
+ label: "市盈率分位",
640
+ parent: {
641
+ varietyMarketIds: [3, 5, 7],
642
+ commonOptionIds: [4, 6, 12, 14, 15, 16]
643
+ },
644
+ type: "custom"
645
+ },
646
+ // ----------期权-----------
647
+ // 过期天数
648
+ {
649
+ key: "expireDays",
650
+ label: "过期天数",
651
+ parent: {
652
+ varietyMarketIds: [8],
653
+ commonOptionIds: [11]
654
+ },
655
+ // 便捷选项
656
+ convenientOptions: [],
657
+ // 默认选中单位
658
+ defaultUnit: ["天", "天"],
659
+ // 单位下拉框选项
660
+ unitOptions: ["天"]
661
+ },
662
+ // 虚实度
663
+ {
664
+ key: "virtualRealDegree",
665
+ label: "虚实度",
666
+ parent: {
667
+ varietyMarketIds: [8],
668
+ commonOptionIds: [11]
669
+ },
670
+ // 便捷选项
671
+ convenientOptions: [],
672
+ // 默认选中单位
673
+ defaultUnit: ["%", "%"],
674
+ // 单位下拉框选项
675
+ unitOptions: ["%"]
676
+ },
677
+ // 年化收益率
678
+ {
679
+ key: "yearProfitRate",
680
+ label: "年化收益率",
681
+ parent: {
682
+ varietyMarketIds: [8],
683
+ commonOptionIds: [11]
684
+ },
685
+ // 便捷选项
686
+ convenientOptions: [],
687
+ // 默认选中单位
688
+ defaultUnit: ["%", "%"],
689
+ // 单位下拉框选项
690
+ unitOptions: ["%"]
691
+ },
692
+ // 隐含波动率
693
+ {
694
+ key: "impliedVolatility",
695
+ label: "隐含波动率",
696
+ parent: {
697
+ varietyMarketIds: [8],
698
+ commonOptionIds: [11]
699
+ },
700
+ // 便捷选项
701
+ convenientOptions: [],
702
+ // 默认选中单位
703
+ defaultUnit: ["%", "%"],
704
+ // 单位下拉框选项
705
+ unitOptions: ["%"]
706
+ },
707
+ // 杠杆率
708
+ {
709
+ key: "levelMultiplier",
710
+ label: "杠杆率",
711
+ parent: {
712
+ varietyMarketIds: [8],
713
+ commonOptionIds: [11]
714
+ },
715
+ // 便捷选项
716
+ convenientOptions: [],
717
+ // 默认选中单位
718
+ defaultUnit: [],
719
+ // 单位下拉框选项
720
+ unitOptions: []
721
+ },
722
+ // 成交额(期权)
723
+ {
724
+ key: "turnover",
725
+ label: "成交额(期权)",
726
+ parent: {
727
+ varietyMarketIds: [8],
728
+ commonOptionIds: [11]
729
+ },
730
+ // 便捷选项
731
+ convenientOptions: [],
732
+ // 默认选中单位
733
+ defaultUnit: ["万", "万"],
734
+ // 单位下拉框选项
735
+ unitOptions: ["万"],
736
+ // 是否展示排名类型
737
+ showRankType: !0,
738
+ // 默认单选类型 0: 数值类型 1: 排名
739
+ defaultRadioType: "1",
740
+ // 默认数值
741
+ defaultRankRange: [0, 25]
742
+ },
743
+ // 成交量
744
+ {
745
+ key: "volume",
746
+ label: "成交量",
747
+ parent: {
748
+ varietyMarketIds: [8],
749
+ commonOptionIds: [11]
750
+ },
751
+ // 便捷选项
752
+ convenientOptions: [],
753
+ // 默认选中单位
754
+ defaultUnit: [],
755
+ // 单位下拉框选项
756
+ unitOptions: [],
757
+ // 是否展示排名类型
758
+ showRankType: !0,
759
+ // 默认单选类型 0: 数值类型 1: 排名
760
+ defaultRadioType: "1",
761
+ // 默认数值
762
+ defaultRankRange: [0, 25]
763
+ },
764
+ // 持仓量
765
+ {
766
+ key: "openInterest",
767
+ label: "持仓量",
768
+ parent: {
769
+ varietyMarketIds: [8],
770
+ commonOptionIds: [11]
771
+ },
772
+ // 便捷选项
773
+ convenientOptions: [],
774
+ // 默认选中单位
775
+ defaultUnit: [],
776
+ // 单位下拉框选项
777
+ unitOptions: [],
778
+ // 是否展示排名类型
779
+ showRankType: !0,
780
+ // 默认单选类型 0: 数值类型 1: 排名
781
+ defaultRadioType: "1",
782
+ // 默认数值
783
+ defaultRankRange: [0, 25]
784
+ },
785
+ // 认沽认购
786
+ {
787
+ key: "optionsCpType",
788
+ label: "认沽认购",
789
+ parent: {
790
+ varietyMarketIds: [8],
791
+ commonOptionIds: [11]
792
+ },
793
+ type: "custom"
794
+ },
795
+ // 期权档位
796
+ {
797
+ key: "optionGear",
798
+ label: "期权档位",
799
+ parent: {
800
+ varietyMarketIds: [8],
801
+ commonOptionIds: [11]
802
+ },
803
+ // 便捷选项
804
+ convenientOptions: [],
805
+ // 默认选中单位
806
+ defaultUnit: [],
807
+ // 单位下拉框选项
808
+ unitOptions: []
809
+ }
810
+ ]
811
+ }
812
+ }, Cl = (p, V, y) => {
813
+ !V[0] && V[0] !== 0 && !V[1] && V[1] !== 0 ? y(new Error("至少填写一个分数")) : y();
814
+ }, $e = (p) => {
815
+ const V = /(条件(\d+))/g;
816
+ return p.match(V) || [];
817
+ }, Sl = {
818
+ __name: "FactorDescription",
819
+ props: /* @__PURE__ */ te({
820
+ data: { type: Array, default: [] }
821
+ }, {
822
+ visible: { default: !1 },
823
+ visibleModifiers: {}
824
+ }),
825
+ emits: ["update:visible"],
826
+ setup(p) {
827
+ const V = ne(p, "visible");
828
+ return (y, n) => {
829
+ const k = Ke, R = Qe, u = ye;
830
+ return s(), q(u, {
831
+ modelValue: V.value,
832
+ "onUpdate:modelValue": n[0] || (n[0] = (t) => V.value = t),
833
+ title: "因子使用说明",
834
+ width: "1000",
835
+ "align-center": "",
836
+ "destroy-on-close": ""
837
+ }, {
838
+ default: d(() => [
839
+ r(R, {
840
+ data: p.data,
841
+ border: "",
842
+ height: "500"
843
+ }, {
844
+ default: d(() => [
845
+ r(k, {
846
+ prop: "factorName",
847
+ label: "因子名称",
848
+ width: "200"
849
+ }),
850
+ r(k, {
851
+ prop: "factorDesc",
852
+ label: "因子说明"
853
+ }),
854
+ r(k, {
855
+ prop: "factorScoreDefine",
856
+ label: "分值定义"
857
+ })
858
+ ]),
859
+ _: 1
860
+ }, 8, ["data"])
861
+ ]),
862
+ _: 1
863
+ }, 8, ["modelValue"]);
864
+ };
865
+ }
866
+ };
867
+ const Pe = (p) => (me("data-v-3592dee9"), p = p(), fe(), p), Ul = { class: "factor-screen" }, El = { class: "custom-header" }, Rl = ["id"], ql = { class: "form-row" }, Ml = { class: "index" }, Dl = { style: { display: "flex", "align-items": "center", width: "100%", height: "24px" } }, Fl = /* @__PURE__ */ Pe(() => /* @__PURE__ */ f("span", null, "~", -1)), Ll = /* @__PURE__ */ Pe(() => /* @__PURE__ */ f("span", null, "&&代表and,||代表or", -1)), jl = { class: "dialog-footer" }, zl = {
868
+ __name: "index",
869
+ props: /* @__PURE__ */ te({
870
+ config: {
871
+ type: Object,
872
+ default: {
873
+ sqlShow: !1,
874
+ // 是否启用SQL功能
875
+ cycleShow: !0,
876
+ // 是否展示周期
877
+ cycleDefault: null,
878
+ // 周期默认值
879
+ cycleOptions: [],
880
+ // 周期下拉框选项
881
+ factorOptions: [],
882
+ // 因子下拉框选项
883
+ factorDescriptions: []
884
+ // 因子使用说明数据源
885
+ }
886
+ }
887
+ }, {
888
+ data: {
889
+ default: {
890
+ list: [],
891
+ sqlEnable: 0,
892
+ sqlValue: null
893
+ }
894
+ },
895
+ dataModifiers: {}
896
+ }),
897
+ emits: ["update:data"],
898
+ setup(p) {
899
+ const V = p, y = ne(p, "data"), n = Q(!1), k = Q(!1), R = Q(null), u = Q({
900
+ // 筛选因子列表
901
+ list: [
902
+ {
903
+ cycle: V.config.cycleDefault ?? null,
904
+ // 周期
905
+ factor: null,
906
+ // 因子
907
+ score: [null, null]
908
+ // 得分
909
+ }
910
+ ],
911
+ // 是否开启SQL功能 0关闭, 1开启
912
+ sqlEnable: 0,
913
+ // SQL语句
914
+ sqlValue: null
915
+ }), t = () => {
916
+ const { list: o, sqlEnable: l, sqlValue: g } = y.value;
917
+ u.value = {
918
+ list: JSON.parse(JSON.stringify(o)),
919
+ sqlEnable: l,
920
+ sqlValue: g
921
+ }, u.value.list.length || M(), n.value = !0;
922
+ }, E = () => {
923
+ R.value.validate((o) => {
924
+ const { list: l, sqlEnable: g, sqlValue: O } = u.value;
925
+ if (o) {
926
+ if (g) {
927
+ if (!O)
928
+ return A.error("SQL语句不能为空");
929
+ const _ = $e(O), $ = l.map((I, S) => `条件${S + 1}`), h = _.filter((I) => !$.includes(I));
930
+ if (h.length)
931
+ return A.error(`请检查SQL语句, 不存在[${h}]`);
932
+ }
933
+ y.value = {
934
+ list: JSON.parse(JSON.stringify(l)),
935
+ sqlEnable: g,
936
+ sqlValue: O
937
+ }, n.value = !1;
938
+ }
939
+ });
940
+ }, L = (o) => {
941
+ u.value.list.splice(o, 1);
942
+ }, M = (o) => {
943
+ switch (o) {
944
+ case "compare": {
945
+ u.value.list.push({
946
+ key: "compare",
947
+ cycle: V.config.cycleDefault ?? null,
948
+ factor: null,
949
+ compareType: ">",
950
+ cycle2: V.config.cycleDefault ?? null,
951
+ factor2: null
952
+ });
953
+ break;
954
+ }
955
+ default: {
956
+ u.value.list.push({
957
+ cycle: V.config.cycleDefault ?? null,
958
+ factor: null,
959
+ score: [null, null]
960
+ });
961
+ break;
962
+ }
963
+ }
964
+ }, i = () => {
965
+ R.value.validate((o) => {
966
+ if (o)
967
+ if (u.value.sqlValue) {
968
+ const l = $e(u.value.sqlValue);
969
+ u.value.sqlValue = u.value.list.reduce((g, O, _) => (l.includes(`条件${_ + 1}`) || (g += `&& 条件${_ + 1} `), g), u.value.sqlValue);
970
+ } else
971
+ u.value.sqlValue = u.value.list.reduce((l, g, O) => (O === 0 ? l += `条件${O + 1} ` : l += `&& 条件${O + 1} `, l), "");
972
+ });
973
+ }, a = (o) => {
974
+ switch (o.key) {
975
+ case "compare": {
976
+ const { cycle: l, factor: g, compareType: O, cycle2: _, factor2: $ } = o;
977
+ let h = "";
978
+ return h += ` ${V.config.cycleOptions.find(({ value: I }) => I === l).label}`, h += ` ${V.config.factorOptions.find(({ value: I }) => I === g).label}`, h += ` ${O}`, h += ` ${V.config.cycleOptions.find(({ value: I }) => I === _).label}`, h += ` ${V.config.factorOptions.find(({ value: I }) => I === $).label}`, h;
979
+ }
980
+ default: {
981
+ const { cycle: l, factor: g, score: O } = o;
982
+ let _ = "";
983
+ return _ += ` ${V.config.cycleOptions.find(({ value: $ }) => $ === l).label}`, _ += ` ${V.config.factorOptions.find(({ value: $ }) => $ === g).label}`, _ += ` ${O[0] || O[0] === 0 ? `${O[0]}分` : "∞"}`, _ += " ~", _ += ` ${O[1] || O[1] === 0 ? `${O[1]}分` : "∞"}`, _;
984
+ }
985
+ }
986
+ }, C = (o, l) => {
987
+ switch (o) {
988
+ case "sqlTag": {
989
+ y.value = {
990
+ list: [],
991
+ sqlEnable: 0,
992
+ sqlValue: null
993
+ };
994
+ break;
995
+ }
996
+ case "factorTag": {
997
+ y.value.list.splice(l, 1);
998
+ break;
999
+ }
1000
+ }
1001
+ };
1002
+ return (o, l) => {
1003
+ var W;
1004
+ const g = Ae, O = qe, _ = Re, $ = il, h = Je, I = ce, S = de, b = ol, P = Ee, c = ke, e = _e, G = Ue, B = rl, oe = ye;
1005
+ return s(), m(U, null, [
1006
+ f("div", Ul, [
1007
+ f("div", null, [
1008
+ y.value.sqlEnable && y.value.sqlValue ? (s(), q(O, {
1009
+ key: 0,
1010
+ closable: "",
1011
+ type: "info",
1012
+ title: y.value.sqlValue,
1013
+ onClose: l[0] || (l[0] = (w) => C("sqlTag"))
1014
+ }, {
1015
+ default: d(() => [
1016
+ r(g, {
1017
+ type: "info",
1018
+ truncated: "",
1019
+ style: { "max-width": "500px" }
1020
+ }, {
1021
+ default: d(() => [
1022
+ D(J(y.value.sqlValue), 1)
1023
+ ]),
1024
+ _: 1
1025
+ })
1026
+ ]),
1027
+ _: 1
1028
+ }, 8, ["title"])) : z("", !0),
1029
+ !y.value.sqlEnable && y.value.list.length ? (s(!0), m(U, { key: 1 }, j(y.value.list, (w, Y) => (s(), q(O, {
1030
+ closable: "",
1031
+ type: "info",
1032
+ onClose: (x) => C("factorTag", Y)
1033
+ }, {
1034
+ default: d(() => [
1035
+ D(J(a(w)), 1)
1036
+ ]),
1037
+ _: 2
1038
+ }, 1032, ["onClose"]))), 256)) : z("", !0),
1039
+ r(_, {
1040
+ class: "screen-btn",
1041
+ type: "primary",
1042
+ plain: "",
1043
+ size: "small",
1044
+ icon: v(se),
1045
+ onClick: t
1046
+ }, {
1047
+ default: d(() => [
1048
+ D(" 添加因子 ")
1049
+ ]),
1050
+ _: 1
1051
+ }, 8, ["icon"])
1052
+ ]),
1053
+ r(oe, {
1054
+ modelValue: n.value,
1055
+ "onUpdate:modelValue": l[5] || (l[5] = (w) => n.value = w),
1056
+ width: "680",
1057
+ "align-center": "",
1058
+ "destroy-on-close": ""
1059
+ }, {
1060
+ header: d(({ titleId: w, titleClass: Y }) => [
1061
+ f("div", El, [
1062
+ f("span", {
1063
+ id: w,
1064
+ class: K(Y)
1065
+ }, " 因子筛选 ", 10, Rl),
1066
+ r(h, {
1067
+ effect: "dark",
1068
+ content: "点击查看: 因子使用说明",
1069
+ placement: "right"
1070
+ }, {
1071
+ default: d(() => [
1072
+ r($, {
1073
+ onClick: l[1] || (l[1] = (x) => k.value = !0)
1074
+ }, {
1075
+ default: d(() => [
1076
+ r(v(sl))
1077
+ ]),
1078
+ _: 1
1079
+ })
1080
+ ]),
1081
+ _: 1
1082
+ })
1083
+ ])
1084
+ ]),
1085
+ footer: d(() => [
1086
+ f("div", jl, [
1087
+ r(_, {
1088
+ type: "primary",
1089
+ onClick: E
1090
+ }, {
1091
+ default: d(() => [
1092
+ D("确定")
1093
+ ]),
1094
+ _: 1
1095
+ })
1096
+ ])
1097
+ ]),
1098
+ default: d(() => [
1099
+ r(B, {
1100
+ ref_key: "dialogFormRef",
1101
+ ref: R,
1102
+ model: u.value
1103
+ }, {
1104
+ default: d(() => [
1105
+ (s(!0), m(U, null, j(u.value.list, (w, Y) => (s(), m("div", ql, [
1106
+ f("span", Ml, J(`条件${Y + 1}`), 1),
1107
+ w.key === "compare" ? (s(), m(U, { key: 0 }, [
1108
+ p.config.cycleShow ? (s(), q(b, {
1109
+ key: 0,
1110
+ prop: "list." + Y + ".cycle",
1111
+ rules: { required: !0, message: "周期不能为空", trigger: "blur" },
1112
+ style: { width: "100px", "margin-right": "10px" }
1113
+ }, {
1114
+ default: d(() => [
1115
+ r(S, {
1116
+ modelValue: w.cycle,
1117
+ "onUpdate:modelValue": (x) => w.cycle = x,
1118
+ placeholder: "选择周期",
1119
+ size: "small"
1120
+ }, {
1121
+ default: d(() => [
1122
+ (s(!0), m(U, null, j(p.config.cycleOptions, ({ label: x, value: T }) => (s(), q(I, {
1123
+ label: x,
1124
+ value: T,
1125
+ key: T
1126
+ }, null, 8, ["label", "value"]))), 128))
1127
+ ]),
1128
+ _: 2
1129
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
1130
+ ]),
1131
+ _: 2
1132
+ }, 1032, ["prop"])) : z("", !0),
1133
+ r(b, {
1134
+ prop: "list." + Y + ".factor",
1135
+ rules: { required: !0, message: "因子不能为空", trigger: "blur" },
1136
+ style: { width: "132px", "margin-right": "10px" }
1137
+ }, {
1138
+ default: d(() => [
1139
+ r(S, {
1140
+ modelValue: w.factor,
1141
+ "onUpdate:modelValue": (x) => w.factor = x,
1142
+ placeholder: "选择因子",
1143
+ filterable: "",
1144
+ size: "small",
1145
+ "no-match-text": "无匹配数据"
1146
+ }, {
1147
+ default: d(() => {
1148
+ var x;
1149
+ return [
1150
+ (s(!0), m(U, null, j((x = p.config.factorOptions) == null ? void 0 : x.filter((T) => [4].includes(T.type)), ({ label: T, value: F }) => (s(), q(I, {
1151
+ label: T,
1152
+ value: F,
1153
+ key: F
1154
+ }, null, 8, ["label", "value"]))), 128))
1155
+ ];
1156
+ }),
1157
+ _: 2
1158
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
1159
+ ]),
1160
+ _: 2
1161
+ }, 1032, ["prop"]),
1162
+ r(b, { style: { width: "52px", "margin-right": "10px" } }, {
1163
+ default: d(() => [
1164
+ r(S, {
1165
+ modelValue: w.compareType,
1166
+ "onUpdate:modelValue": (x) => w.compareType = x,
1167
+ size: "small"
1168
+ }, {
1169
+ default: d(() => [
1170
+ (s(), m(U, null, j([">", ">=", "<", "<="], (x) => r(I, {
1171
+ label: x,
1172
+ value: x,
1173
+ key: x
1174
+ }, null, 8, ["label", "value"])), 64))
1175
+ ]),
1176
+ _: 2
1177
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
1178
+ ]),
1179
+ _: 2
1180
+ }, 1024),
1181
+ p.config.cycleShow ? (s(), q(b, {
1182
+ key: 1,
1183
+ prop: "list." + Y + ".cycle2",
1184
+ rules: { required: !0, message: "周期不能为空", trigger: "blur" },
1185
+ style: { width: "100px", "margin-right": "10px" }
1186
+ }, {
1187
+ default: d(() => [
1188
+ r(S, {
1189
+ modelValue: w.cycle2,
1190
+ "onUpdate:modelValue": (x) => w.cycle2 = x,
1191
+ placeholder: "选择周期",
1192
+ size: "small"
1193
+ }, {
1194
+ default: d(() => [
1195
+ (s(!0), m(U, null, j(p.config.cycleOptions, ({ label: x, value: T }) => (s(), q(I, {
1196
+ label: x,
1197
+ value: T,
1198
+ key: T
1199
+ }, null, 8, ["label", "value"]))), 128))
1200
+ ]),
1201
+ _: 2
1202
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
1203
+ ]),
1204
+ _: 2
1205
+ }, 1032, ["prop"])) : z("", !0),
1206
+ r(b, {
1207
+ prop: "list." + Y + ".factor2",
1208
+ rules: { required: !0, message: "因子不能为空", trigger: "blur" },
1209
+ style: { width: "132px", "margin-right": "10px" }
1210
+ }, {
1211
+ default: d(() => [
1212
+ r(S, {
1213
+ modelValue: w.factor2,
1214
+ "onUpdate:modelValue": (x) => w.factor2 = x,
1215
+ placeholder: "选择因子",
1216
+ filterable: "",
1217
+ size: "small",
1218
+ "no-match-text": "无匹配数据"
1219
+ }, {
1220
+ default: d(() => {
1221
+ var x;
1222
+ return [
1223
+ (s(!0), m(U, null, j((x = p.config.factorOptions) == null ? void 0 : x.filter((T) => [4].includes(T.type)), ({ label: T, value: F }) => (s(), q(I, {
1224
+ label: T,
1225
+ value: F,
1226
+ key: F
1227
+ }, null, 8, ["label", "value"]))), 128))
1228
+ ];
1229
+ }),
1230
+ _: 2
1231
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
1232
+ ]),
1233
+ _: 2
1234
+ }, 1032, ["prop"])
1235
+ ], 64)) : (s(), m(U, { key: 1 }, [
1236
+ p.config.cycleShow ? (s(), q(b, {
1237
+ key: 0,
1238
+ prop: "list." + Y + ".cycle",
1239
+ rules: { required: !0, message: "周期不能为空", trigger: "blur" },
1240
+ style: { width: "100px", "margin-right": "10px" }
1241
+ }, {
1242
+ default: d(() => [
1243
+ r(S, {
1244
+ modelValue: w.cycle,
1245
+ "onUpdate:modelValue": (x) => w.cycle = x,
1246
+ placeholder: "选择周期",
1247
+ size: "small"
1248
+ }, {
1249
+ default: d(() => [
1250
+ (s(!0), m(U, null, j(p.config.cycleOptions, ({ label: x, value: T }) => (s(), q(I, {
1251
+ label: x,
1252
+ value: T,
1253
+ key: T
1254
+ }, null, 8, ["label", "value"]))), 128))
1255
+ ]),
1256
+ _: 2
1257
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
1258
+ ]),
1259
+ _: 2
1260
+ }, 1032, ["prop"])) : z("", !0),
1261
+ r(b, {
1262
+ prop: "list." + Y + ".factor",
1263
+ rules: { required: !0, message: "因子不能为空", trigger: "blur" },
1264
+ style: { width: "194px", "margin-right": "10px" }
1265
+ }, {
1266
+ default: d(() => [
1267
+ r(S, {
1268
+ modelValue: w.factor,
1269
+ "onUpdate:modelValue": (x) => w.factor = x,
1270
+ placeholder: "选择因子",
1271
+ filterable: "",
1272
+ size: "small",
1273
+ "no-match-text": "无匹配数据"
1274
+ }, {
1275
+ default: d(() => {
1276
+ var x;
1277
+ return [
1278
+ (s(!0), m(U, null, j((x = p.config.factorOptions) == null ? void 0 : x.filter((T) => [1, 3].includes(T.type)), ({ label: T, value: F }) => (s(), q(I, {
1279
+ label: T,
1280
+ value: F,
1281
+ key: F
1282
+ }, null, 8, ["label", "value"]))), 128))
1283
+ ];
1284
+ }),
1285
+ _: 2
1286
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
1287
+ ]),
1288
+ _: 2
1289
+ }, 1032, ["prop"]),
1290
+ r(b, {
1291
+ prop: "list." + Y + ".score",
1292
+ rules: { validator: v(Cl), trigger: "blur" },
1293
+ style: { width: "200px", "margin-right": "10px" }
1294
+ }, {
1295
+ default: d(() => [
1296
+ f("div", Dl, [
1297
+ r(P, {
1298
+ modelValue: w.score[0],
1299
+ "onUpdate:modelValue": (x) => w.score[0] = x,
1300
+ size: "small",
1301
+ "controls-position": "right"
1302
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
1303
+ Fl,
1304
+ r(P, {
1305
+ modelValue: w.score[1],
1306
+ "onUpdate:modelValue": (x) => w.score[1] = x,
1307
+ size: "small",
1308
+ "controls-position": "right"
1309
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
1310
+ ])
1311
+ ]),
1312
+ _: 2
1313
+ }, 1032, ["prop", "rules"])
1314
+ ], 64)),
1315
+ r($, {
1316
+ onClick: (x) => L(Y)
1317
+ }, {
1318
+ default: d(() => [
1319
+ r(v(ul))
1320
+ ]),
1321
+ _: 2
1322
+ }, 1032, ["onClick"])
1323
+ ]))), 256)),
1324
+ r(_, {
1325
+ type: "primary",
1326
+ plain: "",
1327
+ size: "small",
1328
+ icon: v(se),
1329
+ onClick: M,
1330
+ style: { "margin-bottom": "10px" }
1331
+ }, {
1332
+ default: d(() => [
1333
+ D("添加因子")
1334
+ ]),
1335
+ _: 1
1336
+ }, 8, ["icon"]),
1337
+ r(_, {
1338
+ type: "primary",
1339
+ plain: "",
1340
+ size: "small",
1341
+ icon: v(se),
1342
+ onClick: l[2] || (l[2] = (w) => M("compare")),
1343
+ style: { "margin-bottom": "10px" }
1344
+ }, {
1345
+ default: d(() => [
1346
+ D("添加因子对比")
1347
+ ]),
1348
+ _: 1
1349
+ }, 8, ["icon"]),
1350
+ p.config.sqlShow ? (s(), m(U, { key: 0 }, [
1351
+ r(b, { label: "SQL功能: " }, {
1352
+ default: d(() => [
1353
+ r(e, {
1354
+ modelValue: u.value.sqlEnable,
1355
+ "onUpdate:modelValue": l[3] || (l[3] = (w) => u.value.sqlEnable = w)
1356
+ }, {
1357
+ default: d(() => [
1358
+ r(c, {
1359
+ label: "关闭",
1360
+ value: 0
1361
+ }),
1362
+ r(c, {
1363
+ label: "启用",
1364
+ value: 1
1365
+ })
1366
+ ]),
1367
+ _: 1
1368
+ }, 8, ["modelValue"]),
1369
+ u.value.sqlEnable ? (s(), q(_, {
1370
+ key: 0,
1371
+ type: "primary",
1372
+ size: "small",
1373
+ onClick: i,
1374
+ style: { "margin-left": "auto" }
1375
+ }, {
1376
+ default: d(() => [
1377
+ D("生成SQL")
1378
+ ]),
1379
+ _: 1
1380
+ })) : z("", !0)
1381
+ ]),
1382
+ _: 1
1383
+ }),
1384
+ u.value.sqlEnable ? (s(), m(U, { key: 0 }, [
1385
+ r(G, {
1386
+ modelValue: u.value.sqlValue,
1387
+ "onUpdate:modelValue": l[4] || (l[4] = (w) => u.value.sqlValue = w),
1388
+ autosize: { minRows: 4 },
1389
+ type: "textarea",
1390
+ style: { "margin-bottom": "10px" }
1391
+ }, null, 8, ["modelValue"]),
1392
+ Ll
1393
+ ], 64)) : z("", !0)
1394
+ ], 64)) : z("", !0)
1395
+ ]),
1396
+ _: 1
1397
+ }, 8, ["model"])
1398
+ ]),
1399
+ _: 1
1400
+ }, 8, ["modelValue"])
1401
+ ]),
1402
+ r(Sl, {
1403
+ visible: k.value,
1404
+ "onUpdate:visible": l[6] || (l[6] = (w) => k.value = w),
1405
+ data: (W = p.config.factorDescriptions) == null ? void 0 : W.filter((w) => [1, 3].includes(w.type))
1406
+ }, null, 8, ["visible", "data"])
1407
+ ], 64);
1408
+ };
1409
+ }
1410
+ }, Nl = /* @__PURE__ */ ge(zl, [["__scopeId", "data-v-3592dee9"]]);
1411
+ const ae = (p) => (me("data-v-bdb03941"), p = p(), fe(), p), Pl = {
1412
+ key: 0,
1413
+ class: "common-indicator"
1414
+ }, Bl = { class: "indicator" }, Gl = /* @__PURE__ */ ae(() => /* @__PURE__ */ f("div", { class: "title" }, [
1415
+ /* @__PURE__ */ f("span", null, "常用指标: "),
1416
+ /* @__PURE__ */ f("span", null, "不限")
1417
+ ], -1)), Yl = { class: "options" }, Jl = ["onClick"], Al = { class: "tags" }, Kl = ["onClick"], Ql = { style: { "font-size": "18px" } }, Zl = {
1418
+ key: 0,
1419
+ class: "out-box"
1420
+ }, Hl = /* @__PURE__ */ ae(() => /* @__PURE__ */ f("span", null, "自定义: ", -1)), Wl = {
1421
+ key: 0,
1422
+ class: "convenient-option-box"
1423
+ }, Xl = { class: "out-box" }, et = /* @__PURE__ */ ae(() => /* @__PURE__ */ f("span", null, "自定义: ", -1)), lt = { key: 0 }, tt = { key: 0 }, nt = { key: 0 }, at = { key: 1 }, ot = { class: "tFeaturelncomes-option-box" }, rt = { class: "tFeaturelncomes-out-box" }, st = /* @__PURE__ */ ae(() => /* @__PURE__ */ f("span", null, "自定义: ", -1)), ut = { key: 2 }, it = { key: 3 }, ct = { key: 4 }, dt = { class: "dialog-footer" }, pt = {
1424
+ __name: "index",
1425
+ props: /* @__PURE__ */ te({
1426
+ config: { type: Object, default: () => {
1427
+ } },
1428
+ varietyMarket: { type: Number, default: () => null },
1429
+ // 已选品种市场
1430
+ commonOption: { type: Array, default: () => [] }
1431
+ // 已选常用选项
1432
+ }, {
1433
+ data: { default: [] },
1434
+ dataModifiers: {}
1435
+ }),
1436
+ emits: ["update:data"],
1437
+ setup(p) {
1438
+ const V = ne(p, "data"), y = p, n = Q(!1), k = N(() => {
1439
+ var o;
1440
+ return (o = y.data.find((l) => l.radioType === "1")) == null ? void 0 : o.key;
1441
+ }), R = N(() => {
1442
+ let o = [];
1443
+ return y.varietyMarket === null && !y.commonOption.length ? o = y.config.options : (o = y.config.options, y.varietyMarket && (o = o.filter(({ parent: l }) => l.varietyMarketIds.includes(y.varietyMarket))), y.commonOption.length && (o = o.filter(({ parent: l }) => {
1444
+ const { commonOptionIds: g } = l;
1445
+ return [.../* @__PURE__ */ new Set([...g, ...y.commonOption])].length !== [...g, ...y.commonOption].length;
1446
+ }))), o;
1447
+ }), u = Q({}), t = Q({}), E = (o) => {
1448
+ u.value = o;
1449
+ const l = {
1450
+ key: o.key,
1451
+ type: o.type,
1452
+ label: o.label
1453
+ };
1454
+ switch (o.key) {
1455
+ case "st": {
1456
+ t.value = { ...l, st: null };
1457
+ break;
1458
+ }
1459
+ case "tFeaturelncomes": {
1460
+ t.value = {
1461
+ ...l,
1462
+ rule: 1,
1463
+ // 1超 2跌
1464
+ withFewYears: null,
1465
+ yearsCount: null,
1466
+ netProfit: null
1467
+ };
1468
+ break;
1469
+ }
1470
+ case "priceLevels": {
1471
+ t.value = { ...l, priceLevels: null };
1472
+ break;
1473
+ }
1474
+ case "peTtmLevels": {
1475
+ t.value = { ...l, peTtmLevels: null };
1476
+ break;
1477
+ }
1478
+ case "optionsCpType": {
1479
+ t.value = {
1480
+ ...l,
1481
+ optionsCpType: null
1482
+ // 1看涨 2看跌
1483
+ };
1484
+ break;
1485
+ }
1486
+ default:
1487
+ t.value = {
1488
+ ...l,
1489
+ range: [null, null],
1490
+ unit: o.defaultUnit.length ? [...o.defaultUnit] : [null, null],
1491
+ radioType: k.value && k.value !== o.key ? "0" : o.defaultRadioType,
1492
+ // 0数值 1排名
1493
+ rankRange: o.defaultRankRange || [null, null]
1494
+ // 默认排名
1495
+ };
1496
+ }
1497
+ n.value = !0;
1498
+ }, L = () => {
1499
+ switch (t.value.key) {
1500
+ case "st": {
1501
+ const { label: l, st: g } = t.value;
1502
+ if (g === null)
1503
+ return A.warning("格式错误: 请至少选择一个值");
1504
+ t.value.tagText = `${l}: ${g ? "是" : "否"}`;
1505
+ break;
1506
+ }
1507
+ case "tFeaturelncomes": {
1508
+ const { label: l, rule: g, withFewYears: O, yearsCount: _, netProfit: $ } = t.value;
1509
+ if (["", null].includes(O) || ["", null].includes(_) || ["", null].includes($))
1510
+ return A.warning("格式错误: 请填写完整");
1511
+ t.value.tagText = `${l}: ${O}年内${_}年以上盈利${g === 1 ? "超" : "跌"}过${$}亿`;
1512
+ break;
1513
+ }
1514
+ case "priceLevels": {
1515
+ const { label: l, priceLevels: g } = t.value;
1516
+ if (!g || g.length === 0)
1517
+ return A.warning("格式错误: 请至少选择一个值");
1518
+ t.value.tagText = `${l}: 已选${g}分位`;
1519
+ break;
1520
+ }
1521
+ case "peTtmLevels": {
1522
+ const { label: l, peTtmLevels: g } = t.value;
1523
+ if (!g || g.length === 0)
1524
+ return A.warning("格式错误: 请至少选择一个值");
1525
+ t.value.tagText = `${l}: 已选${g}分位`;
1526
+ break;
1527
+ }
1528
+ case "optionsCpType": {
1529
+ const { label: l, optionsCpType: g } = t.value;
1530
+ if (g === null)
1531
+ return A.warning("格式错误: 请至少选择一个值");
1532
+ t.value.tagText = `${l}: ${g === 1 ? "看涨" : "看跌"}`;
1533
+ break;
1534
+ }
1535
+ default: {
1536
+ const { label: l, unit: g, radioType: O } = t.value, _ = O === "1" ? t.value.rankRange : t.value.range;
1537
+ if (["", null].includes(_[0]) && ["", null].includes(_[1]))
1538
+ return A.warning("格式错误: 请至少填写一个值");
1539
+ if (O === "1") {
1540
+ const I = Number(_[0]), S = Number(_[1]);
1541
+ if (isNaN(I) || isNaN(S))
1542
+ return A.warning("格式错误: 请填写数字");
1543
+ if (I < 0 || S < 0)
1544
+ return A.warning("格式错误: 请填写大于0的数字");
1545
+ if (I > S)
1546
+ return A.warning("格式错误: 请填写正确的排名范围");
1547
+ }
1548
+ const $ = O === "1" ? "" : g[0] ?? "", h = O === "1" ? "" : g[1] ?? "";
1549
+ !["", null].includes(_[0]) && !["", null].includes(_[1]) ? t.value.tagText = `${l}${O === "1" ? "排名" : ""}: ${_[0]}${$} ~ ${_[1]}${h}` : ["", null].includes(_[0]) ? t.value.tagText = `${l}${O === "1" ? "排名" : ""}: ≤${_[1]}${h}` : t.value.tagText = `${l}${O === "1" ? "排名" : ""}: ≥${_[0]}${$}`;
1550
+ }
1551
+ }
1552
+ const o = V.value.findIndex(({ key: l }) => l === t.value.key);
1553
+ o === -1 ? V.value.push(t.value) : V.value.splice(o, 1, t.value), n.value = !1;
1554
+ }, M = (o) => {
1555
+ u.value = R.value.find(({ key: l }) => l === o.key), t.value = JSON.parse(JSON.stringify(o)), n.value = !0;
1556
+ }, i = (o) => {
1557
+ V.value.splice(o, 1);
1558
+ }, a = (o) => {
1559
+ t.value.range = [...o.range], t.value.unit = [...o.unit];
1560
+ }, C = (o) => {
1561
+ switch (o) {
1562
+ case "≤0":
1563
+ Object.assign(t.value, {
1564
+ rule: 2,
1565
+ // 1超 2跌
1566
+ withFewYears: 1,
1567
+ yearsCount: 1,
1568
+ netProfit: 0
1569
+ });
1570
+ break;
1571
+ case "≥0":
1572
+ Object.assign(t.value, {
1573
+ rule: 1,
1574
+ withFewYears: 1,
1575
+ yearsCount: 1,
1576
+ netProfit: 0
1577
+ });
1578
+ break;
1579
+ case "五年内有四年以上盈利超过5千万":
1580
+ Object.assign(t.value, {
1581
+ rule: 1,
1582
+ withFewYears: 5,
1583
+ yearsCount: 4,
1584
+ netProfit: 0.5
1585
+ });
1586
+ break;
1587
+ case "≥10亿":
1588
+ Object.assign(t.value, {
1589
+ rule: 1,
1590
+ withFewYears: 1,
1591
+ yearsCount: 1,
1592
+ netProfit: 10
1593
+ });
1594
+ break;
1595
+ case "≥20亿":
1596
+ Object.assign(t.value, {
1597
+ rule: 1,
1598
+ withFewYears: 1,
1599
+ yearsCount: 1,
1600
+ netProfit: 20
1601
+ });
1602
+ break;
1603
+ }
1604
+ };
1605
+ return ee(
1606
+ () => R.value,
1607
+ () => {
1608
+ V.value.length && (V.value = V.value.filter(({ key: o }) => R.value.find((l) => l.key === o)));
1609
+ }
1610
+ ), (o, l) => {
1611
+ const g = qe, O = Tl, _ = _e, $ = Ue, h = Re, I = ce, S = de, b = ke, P = Ee, c = ye;
1612
+ return p.config.show && R.value.length ? (s(), m("div", Pl, [
1613
+ f("div", Bl, [
1614
+ Gl,
1615
+ f("div", Yl, [
1616
+ (s(!0), m(U, null, j(R.value, (e) => (s(), m("span", {
1617
+ key: e.key,
1618
+ onClick: (G) => E(e)
1619
+ }, J(e.label), 9, Jl))), 128))
1620
+ ])
1621
+ ]),
1622
+ f("div", Al, [
1623
+ (s(!0), m(U, null, j(V.value, (e, G) => (s(), q(g, {
1624
+ closable: "",
1625
+ type: "info",
1626
+ onClose: (B) => i(G)
1627
+ }, {
1628
+ default: d(() => [
1629
+ f("span", null, J(e.tagText), 1),
1630
+ f("span", {
1631
+ class: "edit",
1632
+ onClick: (B) => M(e)
1633
+ }, "编辑", 8, Kl)
1634
+ ]),
1635
+ _: 2
1636
+ }, 1032, ["onClose"]))), 256))
1637
+ ]),
1638
+ r(c, {
1639
+ modelValue: n.value,
1640
+ "onUpdate:modelValue": l[19] || (l[19] = (e) => n.value = e),
1641
+ title: u.value.label,
1642
+ width: "600",
1643
+ "align-center": "",
1644
+ "destroy-on-close": ""
1645
+ }, re({
1646
+ footer: d(() => [
1647
+ f("div", dt, [
1648
+ r(h, {
1649
+ type: "primary",
1650
+ onClick: L
1651
+ }, {
1652
+ default: d(() => [
1653
+ D("确定")
1654
+ ]),
1655
+ _: 1
1656
+ })
1657
+ ])
1658
+ ]),
1659
+ default: d(() => [
1660
+ u.value.type === void 0 && t.value.radioType === "1" ? (s(), m("div", Zl, [
1661
+ Hl,
1662
+ r($, {
1663
+ modelValue: t.value.rankRange[0],
1664
+ "onUpdate:modelValue": l[1] || (l[1] = (e) => t.value.rankRange[0] = e),
1665
+ style: { flex: "1" }
1666
+ }, null, 8, ["modelValue"]),
1667
+ D(" ~ "),
1668
+ r($, {
1669
+ modelValue: t.value.rankRange[1],
1670
+ "onUpdate:modelValue": l[2] || (l[2] = (e) => t.value.rankRange[1] = e),
1671
+ style: { flex: "1" }
1672
+ }, null, 8, ["modelValue"])
1673
+ ])) : u.value.type === void 0 ? (s(), m(U, { key: 1 }, [
1674
+ u.value.convenientOptions.length ? (s(), m("div", Wl, [
1675
+ (s(!0), m(U, null, j(u.value.convenientOptions, (e) => (s(), q(h, {
1676
+ key: e.text,
1677
+ onClick: (G) => a(e)
1678
+ }, {
1679
+ default: d(() => [
1680
+ D(J(e.text), 1)
1681
+ ]),
1682
+ _: 2
1683
+ }, 1032, ["onClick"]))), 128))
1684
+ ])) : z("", !0),
1685
+ f("div", Xl, [
1686
+ et,
1687
+ r($, {
1688
+ modelValue: t.value.range[0],
1689
+ "onUpdate:modelValue": l[4] || (l[4] = (e) => t.value.range[0] = e),
1690
+ style: { flex: "1" }
1691
+ }, re({ _: 2 }, [
1692
+ u.value.unitOptions.length ? {
1693
+ name: "append",
1694
+ fn: d(() => [
1695
+ u.value.unitOptions.length === 1 ? (s(), m("span", lt, J(t.value.unit[0]), 1)) : (s(), q(S, {
1696
+ key: 1,
1697
+ modelValue: t.value.unit[0],
1698
+ "onUpdate:modelValue": l[3] || (l[3] = (e) => t.value.unit[0] = e),
1699
+ style: { width: "72px" }
1700
+ }, {
1701
+ default: d(() => [
1702
+ (s(!0), m(U, null, j(u.value.unitOptions, (e) => (s(), q(I, {
1703
+ label: e,
1704
+ value: e
1705
+ }, null, 8, ["label", "value"]))), 256))
1706
+ ]),
1707
+ _: 1
1708
+ }, 8, ["modelValue"]))
1709
+ ]),
1710
+ key: "0"
1711
+ } : void 0
1712
+ ]), 1032, ["modelValue"]),
1713
+ D(" ~ "),
1714
+ r($, {
1715
+ modelValue: t.value.range[1],
1716
+ "onUpdate:modelValue": l[6] || (l[6] = (e) => t.value.range[1] = e),
1717
+ style: { flex: "1" }
1718
+ }, re({ _: 2 }, [
1719
+ u.value.unitOptions.length ? {
1720
+ name: "append",
1721
+ fn: d(() => [
1722
+ u.value.unitOptions.length === 1 ? (s(), m("span", tt, J(t.value.unit[1]), 1)) : (s(), q(S, {
1723
+ key: 1,
1724
+ modelValue: t.value.unit[1],
1725
+ "onUpdate:modelValue": l[5] || (l[5] = (e) => t.value.unit[1] = e),
1726
+ style: { width: "72px" }
1727
+ }, {
1728
+ default: d(() => [
1729
+ (s(!0), m(U, null, j(u.value.unitOptions, (e) => (s(), q(I, {
1730
+ label: e,
1731
+ value: e
1732
+ }, null, 8, ["label", "value"]))), 256))
1733
+ ]),
1734
+ _: 1
1735
+ }, 8, ["modelValue"]))
1736
+ ]),
1737
+ key: "0"
1738
+ } : void 0
1739
+ ]), 1032, ["modelValue"])
1740
+ ])
1741
+ ], 64)) : (s(), m(U, { key: 2 }, [
1742
+ u.value.key === "st" ? (s(), m("div", nt, [
1743
+ r(_, {
1744
+ modelValue: t.value.st,
1745
+ "onUpdate:modelValue": l[7] || (l[7] = (e) => t.value.st = e)
1746
+ }, {
1747
+ default: d(() => [
1748
+ r(b, {
1749
+ label: "是",
1750
+ value: 1
1751
+ }),
1752
+ r(b, {
1753
+ label: "否",
1754
+ value: 0
1755
+ })
1756
+ ]),
1757
+ _: 1
1758
+ }, 8, ["modelValue"])
1759
+ ])) : z("", !0),
1760
+ u.value.key === "tFeaturelncomes" ? (s(), m("div", at, [
1761
+ f("div", ot, [
1762
+ r(h, {
1763
+ onClick: l[8] || (l[8] = (e) => C("≤0"))
1764
+ }, {
1765
+ default: d(() => [
1766
+ D("≤0")
1767
+ ]),
1768
+ _: 1
1769
+ }),
1770
+ r(h, {
1771
+ onClick: l[9] || (l[9] = (e) => C("≥0"))
1772
+ }, {
1773
+ default: d(() => [
1774
+ D("≥0")
1775
+ ]),
1776
+ _: 1
1777
+ }),
1778
+ r(h, {
1779
+ onClick: l[10] || (l[10] = (e) => C("五年内有四年以上盈利超过5千万"))
1780
+ }, {
1781
+ default: d(() => [
1782
+ D("五年内有四年以上盈利超过5千万")
1783
+ ]),
1784
+ _: 1
1785
+ }),
1786
+ r(h, {
1787
+ onClick: l[11] || (l[11] = (e) => C("≥10亿"))
1788
+ }, {
1789
+ default: d(() => [
1790
+ D("≥10亿")
1791
+ ]),
1792
+ _: 1
1793
+ }),
1794
+ r(h, {
1795
+ onClick: l[12] || (l[12] = (e) => C("≥20亿"))
1796
+ }, {
1797
+ default: d(() => [
1798
+ D("≥20亿")
1799
+ ]),
1800
+ _: 1
1801
+ })
1802
+ ]),
1803
+ f("div", rt, [
1804
+ st,
1805
+ f("div", null, [
1806
+ r(P, {
1807
+ modelValue: t.value.withFewYears,
1808
+ "onUpdate:modelValue": l[13] || (l[13] = (e) => t.value.withFewYears = e),
1809
+ "controls-position": "right"
1810
+ }, null, 8, ["modelValue"]),
1811
+ D(" 年内 "),
1812
+ r(P, {
1813
+ modelValue: t.value.yearsCount,
1814
+ "onUpdate:modelValue": l[14] || (l[14] = (e) => t.value.yearsCount = e),
1815
+ "controls-position": "right"
1816
+ }, null, 8, ["modelValue"]),
1817
+ D(" 年以上盈利" + J(t.value.rule === 1 ? "超" : "跌") + "过 ", 1),
1818
+ r(P, {
1819
+ modelValue: t.value.netProfit,
1820
+ "onUpdate:modelValue": l[15] || (l[15] = (e) => t.value.netProfit = e),
1821
+ "controls-position": "right"
1822
+ }, null, 8, ["modelValue"]),
1823
+ D(" 亿 ")
1824
+ ])
1825
+ ])
1826
+ ])) : z("", !0),
1827
+ u.value.key === "priceLevels" ? (s(), m("div", ut, [
1828
+ r(S, {
1829
+ modelValue: t.value.priceLevels,
1830
+ "onUpdate:modelValue": l[16] || (l[16] = (e) => t.value.priceLevels = e),
1831
+ multiple: "",
1832
+ clearable: "",
1833
+ placeholder: "请选择",
1834
+ style: { width: "420px" }
1835
+ }, {
1836
+ default: d(() => [
1837
+ (s(), m(U, null, j([1, 2, 3, 4, 5], (e) => r(I, {
1838
+ key: e,
1839
+ label: `${e}分位`,
1840
+ value: e
1841
+ }, null, 8, ["label", "value"])), 64))
1842
+ ]),
1843
+ _: 1
1844
+ }, 8, ["modelValue"])
1845
+ ])) : z("", !0),
1846
+ u.value.key === "peTtmLevels" ? (s(), m("div", it, [
1847
+ r(S, {
1848
+ modelValue: t.value.peTtmLevels,
1849
+ "onUpdate:modelValue": l[17] || (l[17] = (e) => t.value.peTtmLevels = e),
1850
+ multiple: "",
1851
+ clearable: "",
1852
+ placeholder: "请选择",
1853
+ style: { width: "420px" }
1854
+ }, {
1855
+ default: d(() => [
1856
+ (s(), m(U, null, j([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], (e) => r(I, {
1857
+ key: e,
1858
+ label: `${e}分位`,
1859
+ value: e
1860
+ }, null, 8, ["label", "value"])), 64))
1861
+ ]),
1862
+ _: 1
1863
+ }, 8, ["modelValue"])
1864
+ ])) : z("", !0),
1865
+ u.value.key === "optionsCpType" ? (s(), m("div", ct, [
1866
+ r(_, {
1867
+ modelValue: t.value.optionsCpType,
1868
+ "onUpdate:modelValue": l[18] || (l[18] = (e) => t.value.optionsCpType = e)
1869
+ }, {
1870
+ default: d(() => [
1871
+ r(b, {
1872
+ label: "看涨",
1873
+ value: 1
1874
+ }),
1875
+ r(b, {
1876
+ label: "看跌",
1877
+ value: 2
1878
+ })
1879
+ ]),
1880
+ _: 1
1881
+ }, 8, ["modelValue"])
1882
+ ])) : z("", !0)
1883
+ ], 64))
1884
+ ]),
1885
+ _: 2
1886
+ }, [
1887
+ u.value.showRankType ? {
1888
+ name: "header",
1889
+ fn: d(() => [
1890
+ f("span", Ql, J(u.value.label), 1),
1891
+ r(_, {
1892
+ modelValue: t.value.radioType,
1893
+ "onUpdate:modelValue": l[0] || (l[0] = (e) => t.value.radioType = e),
1894
+ style: { "vertical-align": "4px", "margin-left": "12px" }
1895
+ }, {
1896
+ default: d(() => [
1897
+ r(O, {
1898
+ label: "数值",
1899
+ value: "0"
1900
+ }),
1901
+ r(O, {
1902
+ disabled: k.value && k.value !== u.value.key,
1903
+ label: "排名",
1904
+ value: "1"
1905
+ }, null, 8, ["disabled"])
1906
+ ]),
1907
+ _: 1
1908
+ }, 8, ["modelValue"])
1909
+ ]),
1910
+ key: "0"
1911
+ } : void 0
1912
+ ]), 1032, ["modelValue", "title"])
1913
+ ])) : z("", !0);
1914
+ };
1915
+ }
1916
+ }, vt = /* @__PURE__ */ ge(pt, [["__scopeId", "data-v-bdb03941"]]);
1917
+ const H = (p) => (me("data-v-fe77e4e0"), p = p(), fe(), p), mt = { class: "variety-search" }, ft = {
1918
+ key: 0,
1919
+ class: "variety-search-row"
1920
+ }, yt = { class: "title" }, gt = /* @__PURE__ */ H(() => /* @__PURE__ */ f("span", null, "品种市场: ", -1)), bt = {
1921
+ key: 1,
1922
+ class: "variety-search-row"
1923
+ }, kt = { class: "title" }, _t = /* @__PURE__ */ H(() => /* @__PURE__ */ f("span", null, "常用选项: ", -1)), ht = {
1924
+ key: 2,
1925
+ class: "variety-search-row"
1926
+ }, Vt = { class: "title" }, xt = /* @__PURE__ */ H(() => /* @__PURE__ */ f("span", null, "上市板块: ", -1)), Ot = {
1927
+ key: 3,
1928
+ class: "variety-search-row"
1929
+ }, It = { class: "title" }, $t = /* @__PURE__ */ H(() => /* @__PURE__ */ f("span", null, "自定标签: ", -1)), wt = {
1930
+ key: 4,
1931
+ class: "variety-search-row"
1932
+ }, Tt = { class: "title" }, Ct = /* @__PURE__ */ H(() => /* @__PURE__ */ f("span", null, "价差转换: ", -1)), St = {
1933
+ key: 5,
1934
+ class: "variety-search-row"
1935
+ }, Ut = { class: "title" }, Et = /* @__PURE__ */ H(() => /* @__PURE__ */ f("span", null, "因子筛选: ", -1)), Rt = {
1936
+ __name: "index",
1937
+ props: /* @__PURE__ */ te({ config: { type: Object, default: {} } }, {
1938
+ searchData: {},
1939
+ searchDataModifiers: {}
1940
+ }),
1941
+ emits: ["update:searchData"],
1942
+ setup(p, { expose: V }) {
1943
+ const y = p, n = ne(p, "searchData");
1944
+ n.value = Object.assign(n.value, {
1945
+ // 品种市场
1946
+ varietyMarket: null,
1947
+ // 常用选项
1948
+ commonOption: [],
1949
+ // 上市板块
1950
+ marketIds: [],
1951
+ // 自定标签
1952
+ customTag: [],
1953
+ // 价差转换
1954
+ jcTranslate: {
1955
+ type: null,
1956
+ jcList: []
1957
+ },
1958
+ // 因子筛选
1959
+ factorScreen: {
1960
+ list: [],
1961
+ sqlEnable: 0,
1962
+ sqlValue: null
1963
+ },
1964
+ // 常用指标
1965
+ commonIndicator: []
1966
+ });
1967
+ const k = N(() => {
1968
+ const i = {};
1969
+ return Object.keys(Ie).forEach((a) => {
1970
+ const C = Ie[a], o = y.config[a] ?? {}, l = { ...C, ...o };
1971
+ i[a] = l;
1972
+ }), i;
1973
+ }), R = N(() => k.value.varietyMarket.options), u = N(() => {
1974
+ const { varietyMarket: i } = n.value;
1975
+ return i ? R.value.find(({ value: C }) => C === i).memo.reduce((C, o) => {
1976
+ const l = k.value.commonOption.options.find((g) => g.value === o);
1977
+ return l && C.push(l), C;
1978
+ }, []) : k.value.commonOption.options;
1979
+ }), t = N(() => {
1980
+ const { varietyMarket: i } = n.value;
1981
+ return i ? k.value.marketIds.options.filter((a) => a.varietyMarketIds.includes(i)) : k.value.marketIds.options;
1982
+ }), E = N(() => k.value.customTag.options), L = N(() => k.value.jcTranslate.jcOptions), M = (i) => {
1983
+ switch (i) {
1984
+ case "commonOption": {
1985
+ n.value[i] = [];
1986
+ break;
1987
+ }
1988
+ case "marketIds": {
1989
+ n.value[i] = [];
1990
+ break;
1991
+ }
1992
+ case "customTag": {
1993
+ n.value[i] = [];
1994
+ break;
1995
+ }
1996
+ case "jcTranslate": {
1997
+ n.value[i] = {
1998
+ type: null,
1999
+ jcList: []
2000
+ };
2001
+ break;
2002
+ }
2003
+ case "factorScreen": {
2004
+ n.value[i] = {
2005
+ list: [],
2006
+ sqlEnable: 0,
2007
+ sqlValue: null
2008
+ };
2009
+ break;
2010
+ }
2011
+ case "commonIndicator": {
2012
+ n.value[i] = [];
2013
+ break;
2014
+ }
2015
+ default: {
2016
+ n.value[i] = null;
2017
+ break;
2018
+ }
2019
+ }
2020
+ };
2021
+ return ee(
2022
+ () => u.value,
2023
+ (i) => {
2024
+ var a;
2025
+ (a = n.value.commonOption) != null && a.length && (n.value.commonOption = n.value.commonOption.filter((C) => i.find(({ value: o }) => o === C)));
2026
+ }
2027
+ ), ee(
2028
+ () => t.value,
2029
+ (i) => {
2030
+ var a;
2031
+ (a = n.value.marketIds) != null && a.length && (n.value.marketIds = n.value.marketIds.filter((C) => i.find(({ value: o }) => o === C)));
2032
+ }
2033
+ ), V({
2034
+ // 生成接口传参结构的数据
2035
+ formatData: (i) => {
2036
+ var C, o, l, g, O, _;
2037
+ console.log("%c[品种池搜索聚合组件]: 正在生成接口传参...", "color: tomato");
2038
+ const a = {};
2039
+ if (i.varietyMarket && (a.exchangeId = String(i.varietyMarket)), (C = i.commonOption) != null && C.length && (a.optionId = i.commonOption.join(",")), (o = i.marketIds) != null && o.length && (a.marketIds = i.marketIds), (l = i.customTag) != null && l.length && (a.tagIds = i.customTag), (g = k.value.jcTranslate) != null && g.show) {
2040
+ const { jcTranslate: $ } = i, { type: h, jcList: I } = $;
2041
+ switch (h) {
2042
+ case 1: {
2043
+ a.translateType = 1, a.jcType = I.join(",");
2044
+ break;
2045
+ }
2046
+ case 2:
2047
+ a.translateType = 2;
2048
+ }
2049
+ }
2050
+ if ((O = k.value.factorScreen) != null && O.show) {
2051
+ const { factorScreen: $ } = i;
2052
+ if ((_ = $ == null ? void 0 : $.list) != null && _.length && (a.tbFeatureFactorScores = $.list.map((h) => {
2053
+ switch (h.key) {
2054
+ case "compare":
2055
+ return {
2056
+ freqId: h.cycle,
2057
+ factorId: h.factor,
2058
+ compareType: h.compareType,
2059
+ freqId2: h.cycle2,
2060
+ factorId2: h.factor2
2061
+ };
2062
+ default:
2063
+ return {
2064
+ freqId: h.cycle,
2065
+ factorId: h.factor,
2066
+ startScore: h.score[0],
2067
+ endScore: h.score[1]
2068
+ };
2069
+ }
2070
+ })), $.sqlEnable) {
2071
+ const h = $.list.reduce((S, b, P) => {
2072
+ var e, G;
2073
+ const c = `条件${P + 1}`;
2074
+ switch (b.key) {
2075
+ case "compare": {
2076
+ let B = "";
2077
+ (e = k.value.factorScreen) != null && e.cycleShow ? B = `freq_id = ${b.cycle} and factor_id = ${b.factor} ${b.compareType} freq_id = ${b.cycle2} and factor_id = ${b.factor2}` : B = `factor_id = ${b.factor} ${b.compareType} factor_id = ${b.factor2}`, S.set(c, `(${B})`);
2078
+ break;
2079
+ }
2080
+ default: {
2081
+ let B = `factor_id = ${b.factor} and `;
2082
+ (G = k.value.factorScreen) != null && G.cycleShow && (B = `freq_id = ${b.cycle} and factor_id = ${b.factor} and `), (b.score[0] || b.score[0] === 0) && (b.score[1] || b.score[1] === 0) ? B += `score >= ${b.score[0]} and score <= ${b.score[1]}` : b.score[0] || b.score[0] === 0 ? B += `score >= ${b.score[0]}` : (b.score[1] || b.score[1] === 0) && (B += `score <= ${b.score[1]}`), S.set(c, `(${B})`);
2083
+ }
2084
+ }
2085
+ return S;
2086
+ }, /* @__PURE__ */ new Map([]));
2087
+ let I = $.sqlValue;
2088
+ for (const [S, b] of h) {
2089
+ const P = new RegExp(S, "g");
2090
+ I = I.replace(P, b);
2091
+ }
2092
+ a.sql = I, a.sqlExpression = $.sqlValue;
2093
+ }
2094
+ a.enableSql = $.sqlEnable === 1 ? 2 : 1;
2095
+ }
2096
+ {
2097
+ const $ = ["expireDays", "virtualRealDegree", "yearProfitRate", "impliedVolatility", "levelMultiplier", "turnover", "volume", "openInterest", "optionsCpType", "optionGear"], h = i.commonIndicator.reduce((e, G) => {
2098
+ const { key: B, type: oe, range: W, unit: w, radioType: Y, rankRange: x } = G;
2099
+ if (Y === "1")
2100
+ a.sortBy = {
2101
+ column: G.key,
2102
+ start: x[0] || null,
2103
+ end: x[1] || null
2104
+ };
2105
+ else if (B === "dividendYield") {
2106
+ let [T, F] = W;
2107
+ ["", null].includes(T) || (T = T / 100), ["", null].includes(F) || (F = F / 100), e.push({
2108
+ column: G.key,
2109
+ start: T,
2110
+ end: F
2111
+ });
2112
+ } else if (oe === void 0 && !$.includes(B)) {
2113
+ let [T, F] = W;
2114
+ if (!["", null].includes(T))
2115
+ switch (w[0]) {
2116
+ case "亿":
2117
+ T = T * 1e8;
2118
+ break;
2119
+ case "千万":
2120
+ T = T * 1e7;
2121
+ break;
2122
+ default:
2123
+ T = T;
2124
+ break;
2125
+ }
2126
+ if (!["", null].includes(F))
2127
+ switch (w[1]) {
2128
+ case "亿":
2129
+ F = F * 1e8;
2130
+ break;
2131
+ case "千万":
2132
+ F = F * 1e7;
2133
+ break;
2134
+ default:
2135
+ F = F;
2136
+ break;
2137
+ }
2138
+ e.push({
2139
+ column: G.key,
2140
+ start: T,
2141
+ end: F
2142
+ });
2143
+ }
2144
+ return e;
2145
+ }, []);
2146
+ h.length && (a.query = h);
2147
+ const I = i.commonIndicator.find(({ key: e }) => e === "st");
2148
+ I && (a.st = I.st);
2149
+ const S = i.commonIndicator.find(({ key: e }) => e === "tFeaturelncomes");
2150
+ S && (a.netProfitQueryDto = { ...S, netProfit: S.netProfit * 1e8 });
2151
+ const b = i.commonIndicator.find(({ key: e }) => e === "priceLevels");
2152
+ b && (a.priceLevels = b.priceLevels);
2153
+ const P = i.commonIndicator.find(({ key: e }) => e === "peTtmLevels");
2154
+ P && (a.peTtmLevels = P.peTtmLevels);
2155
+ const c = {};
2156
+ i.commonIndicator.forEach((e) => {
2157
+ const { key: G } = e;
2158
+ switch (G) {
2159
+ case "expireDays":
2160
+ ["", null].includes(e.range[0]) || (c.minExpireDays = e.range[0]), ["", null].includes(e.range[1]) || (c.maxExpireDays = e.range[1]);
2161
+ break;
2162
+ case "virtualRealDegree":
2163
+ ["", null].includes(e.range[0]) || (c.minVirtualRealDegree = e.range[0] / 100), ["", null].includes(e.range[1]) || (c.maxVirtualRealDegree = e.range[1] / 100);
2164
+ break;
2165
+ case "yearProfitRate":
2166
+ ["", null].includes(e.range[0]) || (c.minYearProfitRate = e.range[0] / 100), ["", null].includes(e.range[1]) || (c.maxYearProfitRate = e.range[1] / 100);
2167
+ break;
2168
+ case "impliedVolatility":
2169
+ ["", null].includes(e.range[0]) || (c.minImpliedVolatility = e.range[0] / 100), ["", null].includes(e.range[1]) || (c.maxImpliedVolatility = e.range[1] / 100);
2170
+ break;
2171
+ case "levelMultiplier":
2172
+ ["", null].includes(e.range[0]) || (c.minLevelMultiplier = e.range[0]), ["", null].includes(e.range[1]) || (c.maxLevelMultiplier = e.range[1]);
2173
+ break;
2174
+ case "turnover":
2175
+ ["", null].includes(e.range[0]) || (c.minTurnover = e.range[0] * 1e4), ["", null].includes(e.range[1]) || (c.maxTurnover = e.range[1] * 1e4);
2176
+ break;
2177
+ case "volume":
2178
+ ["", null].includes(e.range[0]) || (c.minVolume = e.range[0]), ["", null].includes(e.range[1]) || (c.maxVolume = e.range[1]);
2179
+ break;
2180
+ case "openInterest":
2181
+ ["", null].includes(e.range[0]) || (c.minOpenInterest = e.range[0]), ["", null].includes(e.range[1]) || (c.maxOpenInterest = e.range[1]);
2182
+ break;
2183
+ case "optionsCpType":
2184
+ c.optionsCpType = e.optionsCpType;
2185
+ break;
2186
+ case "optionGear":
2187
+ ["", null].includes(e.range[0]) || (c.minOptionGear = e.range[0]), ["", null].includes(e.range[1]) || (c.maxOptionGear = e.range[1]);
2188
+ break;
2189
+ }
2190
+ }), Object.keys(c).length && (a.searchOptionDto = {
2191
+ ...a.searchOptionDto,
2192
+ ...c
2193
+ });
2194
+ }
2195
+ return console.log("%c[品种池搜索聚合组件]: 接口传参数据生成完毕", "color: green", a), a;
2196
+ },
2197
+ // 重置函数
2198
+ reset: () => {
2199
+ n.value = {
2200
+ // 品种市场
2201
+ varietyMarket: null,
2202
+ // 常用选项
2203
+ commonOption: [],
2204
+ // 上市板块
2205
+ marketIds: [],
2206
+ // 自定标签
2207
+ customTag: [],
2208
+ // 价差转换
2209
+ jcTranslate: {
2210
+ type: null,
2211
+ jcList: []
2212
+ },
2213
+ // 因子筛选
2214
+ factorScreen: {
2215
+ list: [],
2216
+ sqlEnable: 0,
2217
+ sqlValue: null
2218
+ },
2219
+ // 常用指标
2220
+ commonIndicator: []
2221
+ };
2222
+ }
2223
+ }), (i, a) => {
2224
+ var $, h, I, S, b, P;
2225
+ const C = ke, o = _e, l = Ze, g = He, O = ce, _ = de;
2226
+ return s(), m("div", mt, [
2227
+ ($ = k.value.varietyMarket) != null && $.show ? (s(), m("div", ft, [
2228
+ f("div", yt, [
2229
+ gt,
2230
+ f("span", {
2231
+ onClick: a[0] || (a[0] = (c) => M("varietyMarket"))
2232
+ }, "不限")
2233
+ ]),
2234
+ r(o, {
2235
+ modelValue: n.value.varietyMarket,
2236
+ "onUpdate:modelValue": a[1] || (a[1] = (c) => n.value.varietyMarket = c),
2237
+ size: "small"
2238
+ }, {
2239
+ default: d(() => [
2240
+ (s(!0), m(U, null, j(R.value, ({ label: c, value: e }) => (s(), q(C, {
2241
+ label: c,
2242
+ value: e,
2243
+ key: e
2244
+ }, null, 8, ["label", "value"]))), 128))
2245
+ ]),
2246
+ _: 1
2247
+ }, 8, ["modelValue"])
2248
+ ])) : z("", !0),
2249
+ (h = k.value.commonOption) != null && h.show && u.value.length ? (s(), m("div", bt, [
2250
+ f("div", kt, [
2251
+ _t,
2252
+ f("span", {
2253
+ onClick: a[2] || (a[2] = (c) => M("commonOption"))
2254
+ }, "不限")
2255
+ ]),
2256
+ r(g, {
2257
+ modelValue: n.value.commonOption,
2258
+ "onUpdate:modelValue": a[3] || (a[3] = (c) => n.value.commonOption = c),
2259
+ size: "small"
2260
+ }, {
2261
+ default: d(() => [
2262
+ (s(!0), m(U, null, j(u.value, ({ label: c, value: e }) => (s(), q(l, {
2263
+ label: c,
2264
+ value: e,
2265
+ key: e
2266
+ }, null, 8, ["label", "value"]))), 128))
2267
+ ]),
2268
+ _: 1
2269
+ }, 8, ["modelValue"])
2270
+ ])) : z("", !0),
2271
+ (I = k.value.marketIds) != null && I.show && t.value.length ? (s(), m("div", ht, [
2272
+ f("div", Vt, [
2273
+ xt,
2274
+ f("span", {
2275
+ onClick: a[4] || (a[4] = (c) => M("marketIds"))
2276
+ }, "不限")
2277
+ ]),
2278
+ r(g, {
2279
+ modelValue: n.value.marketIds,
2280
+ "onUpdate:modelValue": a[5] || (a[5] = (c) => n.value.marketIds = c),
2281
+ size: "small"
2282
+ }, {
2283
+ default: d(() => [
2284
+ (s(!0), m(U, null, j(t.value, ({ label: c, value: e }) => (s(), q(l, {
2285
+ label: c,
2286
+ value: e,
2287
+ key: e
2288
+ }, null, 8, ["label", "value"]))), 128))
2289
+ ]),
2290
+ _: 1
2291
+ }, 8, ["modelValue"])
2292
+ ])) : z("", !0),
2293
+ (S = k.value.customTag) != null && S.show && E.value.length ? (s(), m("div", Ot, [
2294
+ f("div", It, [
2295
+ $t,
2296
+ f("span", {
2297
+ onClick: a[6] || (a[6] = (c) => M("customTag"))
2298
+ }, "不限")
2299
+ ]),
2300
+ r(g, {
2301
+ modelValue: n.value.customTag,
2302
+ "onUpdate:modelValue": a[7] || (a[7] = (c) => n.value.customTag = c),
2303
+ size: "small"
2304
+ }, {
2305
+ default: d(() => [
2306
+ (s(!0), m(U, null, j(E.value, ({ label: c, value: e }) => (s(), q(l, {
2307
+ label: c,
2308
+ value: e,
2309
+ key: e
2310
+ }, null, 8, ["label", "value"]))), 128))
2311
+ ]),
2312
+ _: 1
2313
+ }, 8, ["modelValue"])
2314
+ ])) : z("", !0),
2315
+ (b = k.value.jcTranslate) != null && b.show ? (s(), m("div", wt, [
2316
+ f("div", Tt, [
2317
+ Ct,
2318
+ f("span", {
2319
+ onClick: a[8] || (a[8] = (c) => M("jcTranslate"))
2320
+ }, "不限")
2321
+ ]),
2322
+ r(o, {
2323
+ modelValue: n.value.jcTranslate.type,
2324
+ "onUpdate:modelValue": a[9] || (a[9] = (c) => n.value.jcTranslate.type = c),
2325
+ size: "small"
2326
+ }, {
2327
+ default: d(() => [
2328
+ r(C, { value: 2 }, {
2329
+ default: d(() => [
2330
+ D("价差转品种")
2331
+ ]),
2332
+ _: 1
2333
+ }),
2334
+ r(C, { value: 1 }, {
2335
+ default: d(() => [
2336
+ D("品种转价差")
2337
+ ]),
2338
+ _: 1
2339
+ })
2340
+ ]),
2341
+ _: 1
2342
+ }, 8, ["modelValue"]),
2343
+ pe(r(_, {
2344
+ modelValue: n.value.jcTranslate.jcList,
2345
+ "onUpdate:modelValue": a[10] || (a[10] = (c) => n.value.jcTranslate.jcList = c),
2346
+ size: "small",
2347
+ multiple: "",
2348
+ "collapse-tags": "",
2349
+ "collapse-tags-tooltip": "",
2350
+ placeholder: "请选择价差品种",
2351
+ style: { width: "140px" }
2352
+ }, {
2353
+ default: d(() => [
2354
+ (s(!0), m(U, null, j(L.value, (c) => (s(), q(O, {
2355
+ key: c.value,
2356
+ label: c.label,
2357
+ value: c.value
2358
+ }, null, 8, ["label", "value"]))), 128))
2359
+ ]),
2360
+ _: 1
2361
+ }, 8, ["modelValue"]), [
2362
+ [al, n.value.jcTranslate.type === 1]
2363
+ ])
2364
+ ])) : z("", !0),
2365
+ (P = k.value.factorScreen) != null && P.show ? (s(), m("div", St, [
2366
+ f("div", Ut, [
2367
+ Et,
2368
+ f("span", {
2369
+ onClick: a[11] || (a[11] = (c) => M("factorScreen"))
2370
+ }, "不限")
2371
+ ]),
2372
+ r(Nl, {
2373
+ data: n.value.factorScreen,
2374
+ "onUpdate:data": a[12] || (a[12] = (c) => n.value.factorScreen = c),
2375
+ config: k.value.factorScreen
2376
+ }, null, 8, ["data", "config"])
2377
+ ])) : z("", !0),
2378
+ r(vt, {
2379
+ data: n.value.commonIndicator,
2380
+ "onUpdate:data": a[13] || (a[13] = (c) => n.value.commonIndicator = c),
2381
+ varietyMarket: n.value.varietyMarket,
2382
+ commonOption: n.value.commonOption,
2383
+ config: k.value.commonIndicator
2384
+ }, null, 8, ["data", "varietyMarket", "commonOption", "config"])
2385
+ ]);
2386
+ };
2387
+ }
2388
+ }, qt = /* @__PURE__ */ ge(Rt, [["__scopeId", "data-v-fe77e4e0"]]), mn = {
2389
+ install(p) {
2390
+ p.component("st-varietySearch", qt);
2391
+ }
2392
+ };
2393
+ export {
2394
+ mn as default
2395
+ };