st-comp 0.0.86 → 0.0.88

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 (72) hide show
  1. package/components.d.ts +1 -0
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +2 -2
  4. package/es/Dialog.cjs +1 -1
  5. package/es/Dialog.js +10 -10
  6. package/es/Kline.cjs +1 -1
  7. package/es/Kline.js +89 -89
  8. package/es/KlineNew.cjs +1 -1
  9. package/es/KlineNew.js +7 -7
  10. package/es/Pagination.cjs +1 -1
  11. package/es/Pagination.js +138 -138
  12. package/es/Table.cjs +1 -20
  13. package/es/Table.js +390 -3589
  14. package/es/TreeMap.cjs +1 -2
  15. package/es/TreeMap.js +1 -163
  16. package/es/VarietySearch.cjs +2 -2
  17. package/es/VarietySearch.js +1551 -1391
  18. package/es/VirtualTable.cjs +4 -4
  19. package/es/VirtualTable.js +100 -100
  20. package/es/{base-4865d432.cjs → base-2b869b95.cjs} +1 -1
  21. package/es/{base-6faccb01.js → base-5e2578a9.js} +65 -65
  22. package/es/{castArray-bdee0d50.js → castArray-9b96e1ad.js} +1 -1
  23. package/es/castArray-adec592d.cjs +1 -0
  24. package/es/{config-provider-465c8253.cjs → config-provider-25d2db4b.cjs} +1 -1
  25. package/es/{config-provider-be0e9c36.js → config-provider-ddbd0b1c.js} +11 -11
  26. package/es/{el-button-aad5268b.cjs → el-button-8fca9a5d.cjs} +1 -1
  27. package/es/{el-button-1b9c4fd6.js → el-button-daeb181f.js} +56 -56
  28. package/es/{el-empty-348c46f7.js → el-empty-b1d5d1e4.js} +4 -4
  29. package/es/{el-empty-608948d9.cjs → el-empty-d83469ab.cjs} +1 -1
  30. package/es/el-icon-0bfbe0c8.js +3795 -0
  31. package/es/el-icon-19bc1691.cjs +20 -0
  32. package/es/{el-overlay-4713107e.cjs → el-overlay-88994e77.cjs} +2 -2
  33. package/es/{el-overlay-400ac6ce.js → el-overlay-fcd84f34.js} +46 -46
  34. package/es/{el-scrollbar-83abe3de.js → el-scrollbar-0f49204a.js} +46 -46
  35. package/es/{el-scrollbar-bc381e35.cjs → el-scrollbar-43353984.cjs} +1 -1
  36. package/es/{el-select-895360ba.js → el-select-1a2f2c95.js} +285 -285
  37. package/es/el-select-c3d21536.cjs +9 -0
  38. package/es/{el-tag-30cecca3.js → el-tag-1e32cb79.js} +122 -122
  39. package/es/el-tag-7737bede.cjs +1 -0
  40. package/es/{focus-trap-a169f160.cjs → focus-trap-19c04a47.cjs} +1 -1
  41. package/es/{focus-trap-5ac78614.js → focus-trap-82e6ab3c.js} +18 -18
  42. package/es/{raf-92c5ed6d.js → raf-7414f3eb.js} +1 -1
  43. package/es/{raf-5e5c53db.cjs → raf-a8539dc6.cjs} +1 -1
  44. package/es/{scroll-bb8039ba.cjs → scroll-5ec08336.cjs} +1 -1
  45. package/es/{scroll-264c50f3.js → scroll-8d15ce5a.js} +1 -1
  46. package/es/style.css +1 -1
  47. package/es/{use-form-item-6cef6b15.cjs → use-form-item-3d2a7ac7.cjs} +2 -2
  48. package/es/{use-form-item-0e9cae13.js → use-form-item-ea29755c.js} +138 -137
  49. package/es/use-global-config-3496cd4f.cjs +1 -0
  50. package/es/use-global-config-9eba4e5e.js +110 -0
  51. package/es/{vnode-b78096e3.js → vnode-2ad5aae4.js} +4 -4
  52. package/es/{vnode-abafec9e.cjs → vnode-b447c505.cjs} +1 -1
  53. package/es/{zh-cn-e4d38144.cjs → zh-cn-35bd18a8.cjs} +1 -1
  54. package/es/{zh-cn-8aaa7dd2.js → zh-cn-6a7c1846.js} +2 -2
  55. package/lib/bundle.js +1 -1
  56. package/lib/bundle.umd.cjs +153 -153
  57. package/lib/{index-137cb843.js → index-cf938a55.js} +18765 -18608
  58. package/lib/{python-02b0f7eb.js → python-40015c17.js} +1 -1
  59. package/lib/style.css +1 -1
  60. package/package.json +1 -1
  61. package/packages/VarietySearch/components/CommonIndicator/index.vue +190 -59
  62. package/packages/VarietySearch/components/FactorScreen/index.vue +84 -27
  63. package/packages/VarietySearch/config.js +41 -12
  64. package/packages/VarietySearch/index.vue +67 -12
  65. package/src/pages/VarietySearch/index.vue +70 -11
  66. package/es/castArray-3341cbb4.cjs +0 -1
  67. package/es/el-icon-158ddc19.cjs +0 -1
  68. package/es/el-icon-d385d377.js +0 -593
  69. package/es/el-select-7116533b.cjs +0 -9
  70. package/es/el-tag-2c7e5d4a.cjs +0 -1
  71. package/es/use-global-config-17f3d7c7.cjs +0 -1
  72. package/es/use-global-config-8c9c775f.js +0 -110
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.86",
4
+ "version": "0.0.88",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -26,15 +26,14 @@ const commonIndicatorOptions = computed(() => {
26
26
  result = result.filter(({ parent }) => {
27
27
  const { commonOptionIds } = parent;
28
28
  // 只要选择了的常用选项里面, 有commonOptionIds中的值, 那么就展示, 即判断两个数组是否有重复元素
29
- return (
30
- [...new Set([...commonOptionIds, ...props.commonOption])].length !==
31
- [...commonOptionIds, ...props.commonOption].length
32
- );
29
+ return [...new Set([...commonOptionIds, ...props.commonOption])].length !== [...commonOptionIds, ...props.commonOption].length;
33
30
  });
34
31
  }
35
32
  }
36
33
  return result;
37
34
  });
35
+
36
+ // 监视: 常用指标数据源
38
37
  watch(
39
38
  () => commonIndicatorOptions.value,
40
39
  () => {
@@ -84,6 +83,10 @@ const clickIndicator = (item) => {
84
83
  netProfit: null,
85
84
  };
86
85
  }
86
+ // 股价分位
87
+ else if (item.key === "priceLevels") {
88
+ indicatorValue.value = { ...baseParams, priceLevels: null };
89
+ }
87
90
  // 认沽认购
88
91
  else if (item.key === "optionsCpType") {
89
92
  indicatorValue.value = {
@@ -95,7 +98,6 @@ const clickIndicator = (item) => {
95
98
  // 打开弹窗
96
99
  visible.value = true;
97
100
  };
98
-
99
101
  // 函数: 点击快捷选项[type-undefined 通用性]
100
102
  const clickConvenientOption = (item) => {
101
103
  indicatorValue.value.range = [...item.range];
@@ -150,43 +152,98 @@ const clicktFeaturelncomesOption = (value) => {
150
152
  // 函数: 确定 (新增custom配置项时, 需要改动)
151
153
  const submitDialog = () => {
152
154
  // 校验 + 格式化文案
153
- if (indicatorValue.value.type === undefined) {
154
- const { label, range, unit } = indicatorValue.value;
155
- // 校验
156
- if (["", null].includes(range[0]) && ["", null].includes(range[1])) {
157
- return ElMessage.warning("格式错误: 请至少填写一个值");
155
+ switch (indicatorValue.value.key) {
156
+ // 是否ST
157
+ case "st": {
158
+ const { label, st } = indicatorValue.value;
159
+ // 校验
160
+ if (st === null) return ElMessage.warning("格式错误: 请至少选择一个值");
161
+ // 格式化文案
162
+ indicatorValue.value.tagText = `${label}: ${st ? "是" : "否"}`;
163
+ break;
158
164
  }
159
- // 格式化文案
160
- if (!["", null].includes(range[0]) && !["", null].includes(range[1])) {
161
- indicatorValue.value.tagText = `${label}: ${range[0]}${unit[0] ?? ""} ~ ${range[1]}${unit[1] ?? ""}`;
162
- } else if (!["", null].includes(range[0])) {
163
- indicatorValue.value.tagText = `${label}: ≥${range[0]}${unit[0] ?? ""}`;
164
- } else {
165
- indicatorValue.value.tagText = `${label}: ≤${range[1]}${unit[1] ?? ""}`;
165
+ // 净利润
166
+ case "tFeaturelncomes": {
167
+ const { label, rule, withFewYears, yearsCount, netProfit } = indicatorValue.value;
168
+ // 校验
169
+ if (["", null].includes(withFewYears) || ["", null].includes(yearsCount) || ["", null].includes(netProfit)) {
170
+ return ElMessage.warning("格式错误: 请填写完整");
171
+ }
172
+ // 格式化文案
173
+ indicatorValue.value.tagText = `${label}: ${withFewYears}年内${yearsCount}年以上盈利${rule === 1 ? "超" : "跌"}过${netProfit}亿`;
174
+ break;
166
175
  }
167
- } else if (indicatorValue.value.key === "st") {
168
- const { label, st } = indicatorValue.value;
169
- // 校验
170
- if (st === null) return ElMessage.warning("格式错误: 请至少选择一个值");
171
- // 格式化文案
172
- indicatorValue.value.tagText = `${label}: ${st ? "是" : "否"}`;
173
- } else if (indicatorValue.value.key === "tFeaturelncomes") {
174
- const { label, rule, withFewYears, yearsCount, netProfit } = indicatorValue.value;
175
- // 校验
176
- if (["", null].includes(withFewYears) || ["", null].includes(yearsCount) || ["", null].includes(netProfit)) {
177
- return ElMessage.warning("格式错误: 请填写完整");
176
+ // 股价分位
177
+ case "priceLevels": {
178
+ const { label, priceLevels } = indicatorValue.value;
179
+ // 校验
180
+ if (!priceLevels || priceLevels.length === 0) return ElMessage.warning("格式错误: 请至少选择一个值");
181
+ // 格式化文案
182
+ indicatorValue.value.tagText = `${label}: 已选${priceLevels}分位`;
183
+ break;
184
+ }
185
+ // 认沽认购
186
+ case "optionsCpType": {
187
+ const { label, optionsCpType } = indicatorValue.value;
188
+ // 校验
189
+ if (optionsCpType === null) return ElMessage.warning("格式错误: 请至少选择一个值");
190
+ // 格式化文案
191
+ indicatorValue.value.tagText = `${label}: ${optionsCpType === 1 ? "看涨" : "看跌"}`;
192
+ break;
193
+ }
194
+ // 其它的通用处理
195
+ default: {
196
+ const { label, range, unit } = indicatorValue.value;
197
+ // 校验
198
+ if (["", null].includes(range[0]) && ["", null].includes(range[1])) {
199
+ return ElMessage.warning("格式错误: 请至少填写一个值");
200
+ }
201
+ // 格式化文案
202
+ if (!["", null].includes(range[0]) && !["", null].includes(range[1])) {
203
+ indicatorValue.value.tagText = `${label}: ${range[0]}${unit[0] ?? ""} ~ ${range[1]}${unit[1] ?? ""}`;
204
+ } else if (!["", null].includes(range[0])) {
205
+ indicatorValue.value.tagText = `${label}: ≥${range[0]}${unit[0] ?? ""}`;
206
+ } else {
207
+ indicatorValue.value.tagText = `${label}: ≤${range[1]}${unit[1] ?? ""}`;
208
+ }
178
209
  }
179
- // 格式化文案
180
- indicatorValue.value.tagText = `${label}: ${withFewYears}年内${yearsCount}年以上盈利${
181
- rule === 1 ? "超" : "跌"
182
- }过${netProfit}亿`;
183
- } else if (indicatorValue.value.key === "optionsCpType") {
184
- const { label, optionsCpType } = indicatorValue.value;
185
- // 校验
186
- if (optionsCpType === null) return ElMessage.warning("格式错误: 请至少选择一个值");
187
- // 格式化文案
188
- indicatorValue.value.tagText = `${label}: ${optionsCpType === 1 ? "看涨" : "看跌"}`;
189
210
  }
211
+ // 校验 + 格式化文案 废弃于: 2024-12-04 0.0.88版本
212
+ // if (indicatorValue.value.type === undefined) {
213
+ // const { label, range, unit } = indicatorValue.value;
214
+ // // 校验
215
+ // if (["", null].includes(range[0]) && ["", null].includes(range[1])) {
216
+ // return ElMessage.warning("格式错误: 请至少填写一个值");
217
+ // }
218
+ // // 格式化文案
219
+ // if (!["", null].includes(range[0]) && !["", null].includes(range[1])) {
220
+ // indicatorValue.value.tagText = `${label}: ${range[0]}${unit[0] ?? ""} ~ ${range[1]}${unit[1] ?? ""}`;
221
+ // } else if (!["", null].includes(range[0])) {
222
+ // indicatorValue.value.tagText = `${label}: ≥${range[0]}${unit[0] ?? ""}`;
223
+ // } else {
224
+ // indicatorValue.value.tagText = `${label}: ≤${range[1]}${unit[1] ?? ""}`;
225
+ // }
226
+ // } else if (indicatorValue.value.key === "st") {
227
+ // const { label, st } = indicatorValue.value;
228
+ // // 校验
229
+ // if (st === null) return ElMessage.warning("格式错误: 请至少选择一个值");
230
+ // // 格式化文案
231
+ // indicatorValue.value.tagText = `${label}: ${st ? "是" : "否"}`;
232
+ // } else if (indicatorValue.value.key === "tFeaturelncomes") {
233
+ // const { label, rule, withFewYears, yearsCount, netProfit } = indicatorValue.value;
234
+ // // 校验
235
+ // if (["", null].includes(withFewYears) || ["", null].includes(yearsCount) || ["", null].includes(netProfit)) {
236
+ // return ElMessage.warning("格式错误: 请填写完整");
237
+ // }
238
+ // // 格式化文案
239
+ // indicatorValue.value.tagText = `${label}: ${withFewYears}年内${yearsCount}年以上盈利${rule === 1 ? "超" : "跌"}过${netProfit}亿`;
240
+ // } else if (indicatorValue.value.key === "optionsCpType") {
241
+ // const { label, optionsCpType } = indicatorValue.value;
242
+ // // 校验
243
+ // if (optionsCpType === null) return ElMessage.warning("格式错误: 请至少选择一个值");
244
+ // // 格式化文案
245
+ // indicatorValue.value.tagText = `${label}: ${optionsCpType === 1 ? "看涨" : "看跌"}`;
246
+ // }
190
247
  // 判断data中是否已存在同样key的数据, 如果存在则替换, 如果不存在就push
191
248
  const keyIndex = data.value.findIndex(({ key }) => key === indicatorValue.value.key);
192
249
  if (keyIndex === -1) {
@@ -210,7 +267,10 @@ const editTag = (item) => {
210
267
  </script>
211
268
 
212
269
  <template>
213
- <div class="common-indicator" v-if="config.show && commonIndicatorOptions.length">
270
+ <div
271
+ class="common-indicator"
272
+ v-if="config.show && commonIndicatorOptions.length"
273
+ >
214
274
  <!-- 指标项展示区域 -->
215
275
  <div class="indicator">
216
276
  <div class="title">
@@ -218,21 +278,45 @@ const editTag = (item) => {
218
278
  <span>不限</span>
219
279
  </div>
220
280
  <div class="options">
221
- <span v-for="item in commonIndicatorOptions" :key="item.key" @click="clickIndicator(item)"> {{ item.label }} </span>
281
+ <span
282
+ v-for="item in commonIndicatorOptions"
283
+ :key="item.key"
284
+ @click="clickIndicator(item)"
285
+ >
286
+ {{ item.label }}
287
+ </span>
222
288
  </div>
223
289
  </div>
224
290
  <div class="tags">
225
- <el-tag v-for="(item, index) in data" closable type="info" @close="deleteTag(index)">
291
+ <el-tag
292
+ v-for="(item, index) in data"
293
+ closable
294
+ type="info"
295
+ @close="deleteTag(index)"
296
+ >
226
297
  <span>{{ item.tagText }}</span>
227
- <span class="edit" @click="editTag(item)">编辑</span>
298
+ <span
299
+ class="edit"
300
+ @click="editTag(item)"
301
+ >编辑</span
302
+ >
228
303
  </el-tag>
229
304
  </div>
230
305
  <!-- 指标具体弹窗 -->
231
- <el-dialog v-model="visible" :title="nowIndicator.label" width="600" align-center destroy-on-close>
306
+ <el-dialog
307
+ v-model="visible"
308
+ :title="nowIndicator.label"
309
+ width="600"
310
+ align-center
311
+ destroy-on-close
312
+ >
232
313
  <!-- type: undefined 为默认便捷配置项 + 输入框形式 -->
233
314
  <template v-if="nowIndicator.type === undefined">
234
315
  <!-- 便捷配置项区域 -->
235
- <div class="convenient-option-box" v-if="nowIndicator.convenientOptions.length">
316
+ <div
317
+ class="convenient-option-box"
318
+ v-if="nowIndicator.convenientOptions.length"
319
+ >
236
320
  <el-button
237
321
  v-for="item in nowIndicator.convenientOptions"
238
322
  :key="item.text"
@@ -243,30 +327,50 @@ const editTag = (item) => {
243
327
  <!-- 输入框区域 -->
244
328
  <div class="out-box">
245
329
  <span>自定义: </span>
246
- <el-input v-model="indicatorValue.range[0]" style="flex: 1">
330
+ <el-input
331
+ v-model="indicatorValue.range[0]"
332
+ style="flex: 1"
333
+ >
247
334
  <!-- 单位 -->
248
- <template #append v-if="nowIndicator.unitOptions.length">
335
+ <template
336
+ #append
337
+ v-if="nowIndicator.unitOptions.length"
338
+ >
249
339
  <span v-if="nowIndicator.unitOptions.length === 1">{{ indicatorValue.unit[0] }}</span>
250
340
  <el-select
251
341
  v-else
252
342
  v-model="indicatorValue.unit[0]"
253
343
  style="width: 72px"
254
344
  >
255
- <el-option v-for="unit in nowIndicator.unitOptions" :label="unit" :value="unit" />
345
+ <el-option
346
+ v-for="unit in nowIndicator.unitOptions"
347
+ :label="unit"
348
+ :value="unit"
349
+ />
256
350
  </el-select>
257
351
  </template>
258
352
  </el-input>
259
353
  ~
260
- <el-input v-model="indicatorValue.range[1]" style="flex: 1">
354
+ <el-input
355
+ v-model="indicatorValue.range[1]"
356
+ style="flex: 1"
357
+ >
261
358
  <!-- 单位 -->
262
- <template #append v-if="nowIndicator.unitOptions.length">
359
+ <template
360
+ #append
361
+ v-if="nowIndicator.unitOptions.length"
362
+ >
263
363
  <span v-if="nowIndicator.unitOptions.length === 1">{{ indicatorValue.unit[1] }}</span>
264
364
  <el-select
265
365
  v-else
266
366
  v-model="indicatorValue.unit[1]"
267
367
  style="width: 72px"
268
368
  >
269
- <el-option v-for="unit in nowIndicator.unitOptions" :label="unit" :value="unit" />
369
+ <el-option
370
+ v-for="unit in nowIndicator.unitOptions"
371
+ :label="unit"
372
+ :value="unit"
373
+ />
270
374
  </el-select>
271
375
  </template>
272
376
  </el-input>
@@ -287,9 +391,7 @@ const editTag = (item) => {
287
391
  <div class="tFeaturelncomes-option-box">
288
392
  <el-button @click="clicktFeaturelncomesOption('≤0')">≤0</el-button>
289
393
  <el-button @click="clicktFeaturelncomesOption('≥0')">≥0</el-button>
290
- <el-button @click="clicktFeaturelncomesOption('五年内有四年以上盈利超过5千万')"
291
- >五年内有四年以上盈利超过5千万</el-button
292
- >
394
+ <el-button @click="clicktFeaturelncomesOption('五年内有四年以上盈利超过5千万')">五年内有四年以上盈利超过5千万</el-button>
293
395
  <el-button @click="clicktFeaturelncomesOption('≥10亿')">≥10亿</el-button>
294
396
  <el-button @click="clicktFeaturelncomesOption('≥20亿')">≥20亿</el-button>
295
397
  </div>
@@ -297,15 +399,40 @@ const editTag = (item) => {
297
399
  <div class="tFeaturelncomes-out-box">
298
400
  <span>自定义: </span>
299
401
  <div>
300
- <el-input-number v-model="indicatorValue.withFewYears" controls-position="right" />
402
+ <el-input-number
403
+ v-model="indicatorValue.withFewYears"
404
+ controls-position="right"
405
+ />
301
406
  年内
302
- <el-input-number v-model="indicatorValue.yearsCount" controls-position="right" />
407
+ <el-input-number
408
+ v-model="indicatorValue.yearsCount"
409
+ controls-position="right"
410
+ />
303
411
  年以上盈利{{ indicatorValue.rule === 1 ? "超" : "跌" }}过
304
- <el-input-number v-model="indicatorValue.netProfit" controls-position="right" />
412
+ <el-input-number
413
+ v-model="indicatorValue.netProfit"
414
+ controls-position="right"
415
+ />
305
416
  亿
306
417
  </div>
307
418
  </div>
308
419
  </div>
420
+ <!-- 股价分位 -->
421
+ <div v-if="nowIndicator.key === 'priceLevels'">
422
+ <el-select
423
+ v-model="indicatorValue.priceLevels"
424
+ multiple
425
+ placeholder="请选择"
426
+ style="width: 100%"
427
+ >
428
+ <el-option
429
+ v-for="item in [1, 2, 3, 4, 5]"
430
+ :key="item"
431
+ :label="`${item}分位`"
432
+ :value="item"
433
+ />
434
+ </el-select>
435
+ </div>
309
436
  <!-- 认沽认购 -->
310
437
  <div v-if="nowIndicator.key === 'optionsCpType'">
311
438
  <el-radio-group v-model="indicatorValue.optionsCpType">
@@ -316,7 +443,11 @@ const editTag = (item) => {
316
443
  </template>
317
444
  <template #footer>
318
445
  <div class="dialog-footer">
319
- <el-button type="primary" @click="submitDialog">确定</el-button>
446
+ <el-button
447
+ type="primary"
448
+ @click="submitDialog"
449
+ >确定</el-button
450
+ >
320
451
  </div>
321
452
  </template>
322
453
  </el-dialog>
@@ -351,8 +482,8 @@ const editTag = (item) => {
351
482
  padding: 4px 0;
352
483
  margin-right: 20px;
353
484
  cursor: pointer;
354
- &:hover{
355
- color: var(--el-color-primary)
485
+ &:hover {
486
+ color: var(--el-color-primary);
356
487
  }
357
488
  }
358
489
  }
@@ -1,7 +1,7 @@
1
1
  <!-- 因子筛选组件 -->
2
2
  <script setup name="FactorScreen">
3
3
  import { ref } from "vue";
4
- import { Plus, CircleCloseFilled } from "@element-plus/icons-vue";
4
+ import { Plus, CircleCloseFilled, InfoFilled } from "@element-plus/icons-vue";
5
5
 
6
6
  // 组件点击确认后的数据
7
7
  const data = defineModel("data", {
@@ -15,17 +15,22 @@ const props = defineProps({
15
15
  config: {
16
16
  type: Object,
17
17
  default: {
18
- cycleShow: true, // 周期功能是否展示
19
- cycleDefault: null, // 周期默认值
18
+ // SQL功能是否展示
19
+ sqlShow: false,
20
+ // 周期功能是否展示
21
+ cycleShow: true,
22
+ // 周期默认值
23
+ cycleDefault: null,
20
24
  cycleOptions: [], // 周期下拉框选项
21
25
  factorOptions: [], // 因子下拉框选项
22
- sqlShow: false, // SQL功能是否展示
26
+ factorDescriptions: [], // 因子使用说明数据源
23
27
  },
24
28
  },
25
29
  });
26
30
 
27
31
  // 弹窗开关
28
32
  const visible = ref(false);
33
+ const visibleDescriptions = ref(false);
29
34
  const dialogFormRef = ref(null);
30
35
  const dialogForm = ref({
31
36
  // 筛选因子列表
@@ -42,7 +47,7 @@ const dialogForm = ref({
42
47
  sqlValue: null,
43
48
  });
44
49
 
45
- // 打开弹窗
50
+ // 打开弹窗[主: 筛选内容]
46
51
  const openDialog = () => {
47
52
  const { list, sqlEnable, sqlValue } = data.value;
48
53
  dialogForm.value = {
@@ -54,18 +59,6 @@ const openDialog = () => {
54
59
  if (!dialogForm.value.list.length) addFactor();
55
60
  visible.value = true;
56
61
  };
57
- // 删除因子[弹窗外]
58
- const deleteTag = (index) => {
59
- data.value.list.splice(index, 1);
60
- };
61
- // 删除SQL[弹窗外]
62
- const deleteSQL = () => {
63
- data.value = {
64
- list: [],
65
- sqlEnable: 0,
66
- sqlValue: null,
67
- };
68
- };
69
62
  // 添加因子
70
63
  const addFactor = () => {
71
64
  dialogForm.value.list.push({
@@ -74,10 +67,6 @@ const addFactor = () => {
74
67
  score: [null, null],
75
68
  });
76
69
  };
77
- // 删除因子[弹窗内]
78
- const deleteFactor = (index) => {
79
- dialogForm.value.list.splice(index, 1);
80
- };
81
70
  // 生成SQL
82
71
  const createSQL = () => {
83
72
  dialogFormRef.value.validate((valid) => {
@@ -103,6 +92,22 @@ const createSQL = () => {
103
92
  }, "");
104
93
  });
105
94
  };
95
+ // 删除SQL[弹窗外]
96
+ const deleteSQL = () => {
97
+ data.value = {
98
+ list: [],
99
+ sqlEnable: 0,
100
+ sqlValue: null,
101
+ };
102
+ };
103
+ // 删除因子[弹窗外]
104
+ const deleteTag = (index) => {
105
+ data.value.list.splice(index, 1);
106
+ };
107
+ // 删除因子[弹窗内]
108
+ const deleteFactor = (index) => {
109
+ dialogForm.value.list.splice(index, 1);
110
+ };
106
111
  // 确定
107
112
  const submit = () => {
108
113
  dialogFormRef.value.validate((valid) => {
@@ -142,7 +147,7 @@ const scoreValidator = (rule, value, callback) => {
142
147
 
143
148
  <template>
144
149
  <div class="factor-screen">
145
- <!-- 文案[开启sqlEnable] -->
150
+ <!-- [开启sqlEnable后的]文案 -->
146
151
  <el-tag
147
152
  v-if="data.sqlEnable && data.sqlValue"
148
153
  closable
@@ -158,7 +163,7 @@ const scoreValidator = (rule, value, callback) => {
158
163
  {{ data.sqlValue }}
159
164
  </el-text>
160
165
  </el-tag>
161
- <!-- 文案[关闭sqlEnable] -->
166
+ <!-- [关闭sqlEnable后的]文案 -->
162
167
  <template v-if="!data.sqlEnable && data.list.length">
163
168
  <el-tag
164
169
  v-for="(tag, index) in data.list"
@@ -169,7 +174,7 @@ const scoreValidator = (rule, value, callback) => {
169
174
  {{ handleTagName(tag) }}
170
175
  </el-tag>
171
176
  </template>
172
- <!-- 打开弹窗 -->
177
+ <!-- 因子筛选按钮 -->
173
178
  <el-button
174
179
  class="screen-btn"
175
180
  type="primary"
@@ -179,14 +184,30 @@ const scoreValidator = (rule, value, callback) => {
179
184
  @click="openDialog"
180
185
  >添加因子</el-button
181
186
  >
182
- <!-- 弹窗 -->
187
+ <!-- 因子筛选弹窗[主: 筛选内容] -->
183
188
  <el-dialog
184
189
  v-model="visible"
185
- title="因子筛选"
186
190
  width="500"
187
191
  align-center
188
192
  destroy-on-close
189
193
  >
194
+ <template #header="{ titleId, titleClass }">
195
+ <div class="custom-header">
196
+ <span
197
+ :id="titleId"
198
+ :class="titleClass"
199
+ >
200
+ 因子筛选
201
+ </span>
202
+ <el-tooltip
203
+ effect="dark"
204
+ content="点击查看: 因子使用说明"
205
+ placement="right"
206
+ >
207
+ <el-icon @click="visibleDescriptions = true"><InfoFilled /></el-icon>
208
+ </el-tooltip>
209
+ </div>
210
+ </template>
190
211
  <el-form
191
212
  ref="dialogFormRef"
192
213
  :model="dialogForm"
@@ -290,7 +311,7 @@ const scoreValidator = (rule, value, callback) => {
290
311
  v-model="dialogForm.sqlValue"
291
312
  :autosize="{ minRows: 4 }"
292
313
  type="textarea"
293
- style="margin-bottom: 10px;"
314
+ style="margin-bottom: 10px"
294
315
  />
295
316
  <span>&&代表and,||代表or</span>
296
317
  </template>
@@ -306,6 +327,34 @@ const scoreValidator = (rule, value, callback) => {
306
327
  </div>
307
328
  </template>
308
329
  </el-dialog>
330
+ <!-- 因子筛选弹窗[副: 因子说明] -->
331
+ <el-dialog
332
+ v-model="visibleDescriptions"
333
+ title="因子使用说明"
334
+ width="1000"
335
+ align-center
336
+ destroy-on-close
337
+ >
338
+ <el-table
339
+ :data="config.factorDescriptions"
340
+ border
341
+ height="500"
342
+ >
343
+ <el-table-column
344
+ prop="factorName"
345
+ label="因子名称"
346
+ width="200"
347
+ />
348
+ <el-table-column
349
+ prop="factorDesc"
350
+ label="因子说明"
351
+ />
352
+ <el-table-column
353
+ prop="factorScoreDefine"
354
+ label="分值定义"
355
+ />
356
+ </el-table>
357
+ </el-dialog>
309
358
  </div>
310
359
  </template>
311
360
 
@@ -314,6 +363,14 @@ const scoreValidator = (rule, value, callback) => {
314
363
  .el-tag {
315
364
  margin-right: 10px;
316
365
  }
366
+ .custom-header {
367
+ display: flex;
368
+ align-items: center;
369
+ .el-icon {
370
+ margin-left: 4px;
371
+ cursor: pointer;
372
+ }
373
+ }
317
374
  .form-row {
318
375
  display: flex;
319
376
  align-items: center;
@@ -1,6 +1,7 @@
1
- // 默认配置项
1
+ // 品种池搜索组件的默认配置项
2
+
2
3
  export default {
3
- // 品种市场
4
+ // 品种市场 [选项: 前端默认]
4
5
  varietyMarket: {
5
6
  show: true,
6
7
  options: [
@@ -13,7 +14,7 @@ export default {
13
14
  { label: "期权", value: 8, memo: [11] },
14
15
  ],
15
16
  },
16
- // 常用选项
17
+ // 常用选项 [选项: 前端默认]
17
18
  commonOption: {
18
19
  show: true,
19
20
  options: [
@@ -33,21 +34,39 @@ export default {
33
34
  { label: "概念板块指数", value: 15 },
34
35
  ],
35
36
  },
36
- // 自定义标签
37
+ // 上市板块 [选项: 接口获取**!]
38
+ marketIds: {
39
+ show: true,
40
+ options: [
41
+ // { label: "沪深主板", value: 1, varietyMarketIds: [3] },
42
+ // { label: "创业板", value: 2, varietyMarketIds: [3] },
43
+ // { label: "科创板", value: 4, varietyMarketIds: [3] },
44
+ // { label: "新三板", value: 8, varietyMarketIds: [3] },
45
+ // { label: "沪股通", value: 1024, varietyMarketIds: [3] },
46
+ // { label: "深股通", value: 2048, varietyMarketIds: [3] },
47
+ // { label: "沪港通", value: 4096, varietyMarketIds: [5] },
48
+ // { label: "深港通", value: 8192, varietyMarketIds: [5] },
49
+ ],
50
+ },
51
+ // 自定标签 [选项: 接口获取**!]
37
52
  customTag: {
38
53
  show: true,
39
54
  options: [],
40
55
  },
41
- // 因子筛选
56
+ // 因子筛选 [选项: 接口获取**!]
42
57
  factorScreen: {
43
58
  show: true,
44
- cycleShow: true, // 周期功能是否展示
45
- cycleDefault: null, // 周期默认值
46
- cycleOptions: [], // 周期下拉框选项
47
- factorOptions: [], // 因子下拉框选项
48
- sqlShow: false, // SQL功能是否展示
59
+ // SQL功能是否展示
60
+ sqlShow: false,
61
+ // 周期功能是否展示
62
+ cycleShow: true,
63
+ // 周期默认值
64
+ cycleDefault: null,
65
+ cycleOptions: [], // 周期下拉框数据源
66
+ factorOptions: [], // 因子下拉框数据源
67
+ factorDescriptions: [], // 因子使用说明数据源
49
68
  },
50
- // 常用指标
69
+ // 常用指标 [选项: 前端默认]
51
70
  commonIndicator: {
52
71
  show: true,
53
72
  options: [
@@ -311,6 +330,16 @@ export default {
311
330
  // 单位下拉框选项
312
331
  unitOptions: ["%"],
313
332
  },
333
+ // 股价分位
334
+ {
335
+ key: "priceLevels",
336
+ label: "股价分位",
337
+ parent: {
338
+ varietyMarketIds: [3, 5, 7],
339
+ commonOptionIds: [4, 6, 12, 14, 15],
340
+ },
341
+ type: "custom",
342
+ },
314
343
  // ----------期权-----------
315
344
  // 过期天数
316
345
  {
@@ -442,7 +471,7 @@ export default {
442
471
  },
443
472
  type: "custom",
444
473
  },
445
- // 持仓量
474
+ // 期权档位
446
475
  {
447
476
  key: "optionGear",
448
477
  label: "期权档位",