st-comp 0.0.92 → 0.0.94

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 (74) 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/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +131 -129
  8. package/es/Kline.cjs +1 -1
  9. package/es/Kline.js +9 -9
  10. package/es/KlineNew.cjs +1 -1
  11. package/es/KlineNew.js +8 -8
  12. package/es/Pagination.cjs +1 -1
  13. package/es/Pagination.js +11 -11
  14. package/es/Table.cjs +1 -1
  15. package/es/Table.js +12 -12
  16. package/es/VarietySearch.cjs +1 -1
  17. package/es/VarietySearch.js +1300 -793
  18. package/es/VirtualTable.cjs +3 -3
  19. package/es/VirtualTable.js +9 -9
  20. package/es/{base-1bc9f12c.js → base-6e64c2e6.js} +7 -7
  21. package/es/{base-315cbfab.cjs → base-8776b83e.cjs} +1 -1
  22. package/es/castArray-59d5ae43.cjs +1 -0
  23. package/es/{castArray-f42865a2.js → castArray-8ec29ca6.js} +1 -1
  24. package/es/{config-provider-17c85684.cjs → config-provider-76ef1b35.cjs} +1 -1
  25. package/es/{config-provider-c8d3957d.js → config-provider-f4278c8e.js} +7 -7
  26. package/es/{el-button-93e0ac7c.js → el-button-4c7ae9df.js} +36 -36
  27. package/es/{el-button-ec16f484.cjs → el-button-65e4598f.cjs} +1 -1
  28. package/es/{el-empty-0c85d9b7.js → el-empty-05e13b3c.js} +1 -1
  29. package/es/{el-empty-16ceef82.cjs → el-empty-dfe11c21.cjs} +1 -1
  30. package/es/{el-input-a8791103.cjs → el-input-11327619.cjs} +3 -3
  31. package/es/{el-input-29806e42.js → el-input-f4898cfa.js} +38 -37
  32. package/es/{el-overlay-6d0c5cc3.cjs → el-overlay-9d9c6ba9.cjs} +1 -1
  33. package/es/{el-overlay-53eb27a5.js → el-overlay-d7af7dda.js} +6 -6
  34. package/es/{el-popover-1d087574.cjs → el-popover-4a4a4b02.cjs} +1 -1
  35. package/es/{el-popover-dd66e2c8.js → el-popover-dc9c7ff7.js} +4 -4
  36. package/es/{el-radio-group-caebab9d.js → el-radio-group-a31fb7c0.js} +13 -13
  37. package/es/{el-radio-group-46e8f574.cjs → el-radio-group-cc2d6c87.cjs} +1 -1
  38. package/es/{el-scrollbar-e17fad47.js → el-scrollbar-a00aca2f.js} +12 -12
  39. package/es/{el-scrollbar-9473fd47.cjs → el-scrollbar-f197b544.cjs} +1 -1
  40. package/es/{el-select-64511731.cjs → el-select-5dbb0da3.cjs} +1 -1
  41. package/es/{el-select-ac302f3c.js → el-select-b9cf452e.js} +51 -51
  42. package/es/el-table-column-1e15361e.cjs +20 -0
  43. package/es/{el-table-column-b8e2141b.js → el-table-column-675f51e6.js} +69 -69
  44. package/es/el-tag-c9d5baa7.cjs +1 -0
  45. package/es/{el-tag-9493bdff.js → el-tag-f878b1f1.js} +12 -12
  46. package/es/{focus-trap-1b2aef75.js → focus-trap-2677bd39.js} +1 -1
  47. package/es/{focus-trap-ea177336.cjs → focus-trap-5f42842b.cjs} +1 -1
  48. package/es/{raf-6d7e80f4.js → raf-32ed81f4.js} +1 -1
  49. package/es/{raf-c437ab23.cjs → raf-7c366b55.cjs} +1 -1
  50. package/es/{scroll-a80e1458.cjs → scroll-22a00b05.cjs} +1 -1
  51. package/es/{scroll-a928a93e.js → scroll-9b9249e9.js} +1 -1
  52. package/es/style.css +1 -1
  53. package/es/{use-form-item-7924b6c1.cjs → use-form-item-67e7ef93.cjs} +1 -1
  54. package/es/{use-form-item-aeec8499.js → use-form-item-bfc7dddf.js} +21 -21
  55. package/es/{use-global-config-b07c467a.js → use-global-config-89daeba3.js} +23 -23
  56. package/es/{use-global-config-d02be80b.cjs → use-global-config-f9103903.cjs} +1 -1
  57. package/es/{vnode-85a610a2.cjs → vnode-69f3ca85.cjs} +1 -1
  58. package/es/{vnode-aa872900.js → vnode-aa3448ec.js} +1 -1
  59. package/es/{zh-cn-0024c96d.cjs → zh-cn-720e514b.cjs} +1 -1
  60. package/es/{zh-cn-d29347f8.js → zh-cn-e662dc89.js} +2 -2
  61. package/lib/bundle.js +1 -1
  62. package/lib/bundle.umd.cjs +193 -193
  63. package/lib/{index-74cdff5f.js → index-5d6aca6c.js} +28012 -27503
  64. package/lib/{python-ed84da20.js → python-dae8be67.js} +1 -1
  65. package/lib/style.css +1 -1
  66. package/package.json +1 -1
  67. package/packages/FactorWarning/index.vue +28 -13
  68. package/packages/VarietySearch/components/CommonIndicator/index.vue +270 -112
  69. package/packages/VarietySearch/config.js +12 -1
  70. package/packages/VarietySearch/index.vue +8 -0
  71. package/src/pages/FactorWarning/index.vue +850 -8
  72. package/es/castArray-f54f6f75.cjs +0 -1
  73. package/es/el-table-column-773986c7.cjs +0 -20
  74. package/es/el-tag-a6a4d4ef.cjs +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.92",
4
+ "version": "0.0.94",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -117,7 +117,7 @@ watch(
117
117
  <el-config-provider :locale="zhCn">
118
118
  <el-dialog
119
119
  v-model="visible"
120
- width="840"
120
+ width="860"
121
121
  align-center
122
122
  destroy-on-close
123
123
  @closed="emit('closed')"
@@ -152,10 +152,20 @@ watch(
152
152
  label="交易类型:"
153
153
  prop="factorType"
154
154
  >
155
- <el-radio-group v-model="ruleForm.factorType">
156
- <el-radio :label="1">多</el-radio>
157
- <el-radio :label="-1">空</el-radio>
158
- </el-radio-group>
155
+ <el-button
156
+ type="danger"
157
+ :plain="ruleForm.factorType !== 1"
158
+ @click="ruleForm.factorType = 1"
159
+ >
160
+
161
+ </el-button>
162
+ <el-button
163
+ type="success"
164
+ :plain="ruleForm.factorType !== -1"
165
+ @click="ruleForm.factorType = -1"
166
+ >
167
+
168
+ </el-button>
159
169
  </el-form-item>
160
170
  <!-- 预警因子 -->
161
171
  <el-form-item
@@ -243,7 +253,7 @@ watch(
243
253
  >
244
254
  <el-table-column
245
255
  label="预警周期"
246
- width="80"
256
+ width="70"
247
257
  >
248
258
  <template #default="scope">
249
259
  {{ scope.row.freqName || "-" }}
@@ -251,17 +261,17 @@ watch(
251
261
  </el-table-column>
252
262
  <el-table-column
253
263
  label="交易类型"
254
- width="80"
264
+ width="70"
255
265
  >
256
266
  <template #default="scope">
257
267
  <span
258
268
  v-if="scope.row.factorExtendValue == 1"
259
- style="color: #67c23a"
269
+ style="color: #f56c6c"
260
270
  >多</span
261
271
  >
262
272
  <span
263
273
  v-else
264
- style="color: #f56c6c"
274
+ style="color: #67c23a"
265
275
  >空</span
266
276
  >
267
277
  </template>
@@ -273,7 +283,7 @@ watch(
273
283
  </el-table-column>
274
284
  <el-table-column
275
285
  label="预警次数"
276
- width="80"
286
+ width="70"
277
287
  >
278
288
  <template #default="scope">
279
289
  {{ `${scope.row.currentCount} / ${scope.row.totalCount}` }}
@@ -282,7 +292,7 @@ watch(
282
292
  <el-table-column
283
293
  v-if="showConfig.tableStatus"
284
294
  label="状态"
285
- width="80"
295
+ width="70"
286
296
  >
287
297
  <template #default="scope">
288
298
  <div>
@@ -295,6 +305,7 @@ watch(
295
305
  <el-table-column
296
306
  v-if="showConfig.tableCreateTime"
297
307
  label="设置时间"
308
+ width="136"
298
309
  >
299
310
  <template #default="scope">
300
311
  {{ scope.row.createdTime || "-" }}
@@ -303,6 +314,7 @@ watch(
303
314
  <el-table-column
304
315
  v-if="showConfig.tableMark"
305
316
  label="备注"
317
+ width="70"
306
318
  >
307
319
  <template #default="scope">
308
320
  {{ scope.row.mark || "-" }}
@@ -362,9 +374,12 @@ watch(
362
374
  :deep(.el-dialog__body) {
363
375
  padding-top: 0;
364
376
  padding-bottom: 0;
377
+ .text-btn {
378
+ display: inline-block;
379
+ padding: 6px 8px;
380
+ }
365
381
  .el-table {
366
- min-height: 470px;
367
- max-height: 590px;
382
+ height: 590px;
368
383
  }
369
384
  }
370
385
 
@@ -2,14 +2,15 @@
2
2
  <script setup name="CommonIndicator">
3
3
  import { ref, watch, computed } from "vue";
4
4
 
5
+ const data = defineModel("data", { default: [] });
5
6
  const props = defineProps({
6
7
  config: { type: Object, default: () => {} },
7
8
  varietyMarket: { type: null || Number, default: () => null }, // 已选品种市场
8
9
  commonOption: { type: Array, default: () => [] }, // 已选常用选项
9
10
  });
10
- const data = defineModel("data", { default: [] });
11
+ const visible = ref(false);
11
12
 
12
- // 常用指标项(是否展示受到: 品种市场, 常用选项影响)
13
+ // 常用指标项数据源 [受到: 品种市场, 常用选项影响]
13
14
  const commonIndicatorOptions = computed(() => {
14
15
  let result = [];
15
16
  // 如果品种市场和常用选项一个都没有选, 那么就展示全部的常用指标
@@ -32,124 +33,71 @@ const commonIndicatorOptions = computed(() => {
32
33
  }
33
34
  return result;
34
35
  });
35
-
36
- // 监视: 常用指标数据源
37
- watch(
38
- () => commonIndicatorOptions.value,
39
- () => {
40
- // 如果常用指标已经进行了勾选, 则只保留常用指标中存在的值
41
- if (data.value.length) {
42
- data.value = data.value.filter(({ key }) => {
43
- return commonIndicatorOptions.value.find((item) => item.key === key);
44
- });
45
- }
46
- }
47
- );
48
-
49
- const visible = ref(false);
50
- // 当前点击的指标项type[用于弹窗判断是哪个指标]
36
+ // 当前操作的指标项类型 [用于弹窗判断是哪个指标]
51
37
  const nowIndicator = ref({});
52
- // 当前指标项内容中的值[具体填写的数据]
38
+ // 当前指标项内容中的值 [具体填写的数据]
53
39
  const indicatorValue = ref({});
54
40
 
55
- // 函数: 点击指标项 (新增custom配置项时, 需要改动)
41
+ // 点击指标选项 (**新增custom配置项时, 需要改动**)
56
42
  const clickIndicator = (item) => {
57
- // 存储目前点击的指标项相关配置
58
43
  nowIndicator.value = item;
59
- // 初始化值---------------------------------
44
+ // 初始化指标值
60
45
  const baseParams = {
61
- label: item.label,
62
46
  key: item.key,
63
47
  type: item.type,
48
+ label: item.label,
64
49
  };
65
- if (item.type === undefined) {
66
- indicatorValue.value = {
67
- ...baseParams,
68
- range: [null, null],
69
- unit: item.defaultUnit.length ? [...item.defaultUnit] : [null, null],
70
- };
71
- }
72
- // 是否ST
73
- else if (item.key === "st") {
74
- indicatorValue.value = { ...baseParams, st: null };
75
- }
76
- // 净利润
77
- else if (item.key === "tFeaturelncomes") {
78
- indicatorValue.value = {
79
- ...baseParams,
80
- rule: 1, // 1超 2跌
81
- withFewYears: null,
82
- yearsCount: null,
83
- netProfit: null,
84
- };
85
- }
86
- // 股价分位
87
- else if (item.key === "priceLevels") {
88
- indicatorValue.value = { ...baseParams, priceLevels: null };
89
- }
90
- // 认沽认购
91
- else if (item.key === "optionsCpType") {
92
- indicatorValue.value = {
93
- ...baseParams,
94
- optionsCpType: null, // 1看涨 2看跌
95
- };
96
- }
97
- // -----------------------------------------
98
- // 打开弹窗
99
- visible.value = true;
100
- };
101
- // 函数: 点击快捷选项[type-undefined 通用性]
102
- const clickConvenientOption = (item) => {
103
- indicatorValue.value.range = [...item.range];
104
- indicatorValue.value.unit = [...item.unit];
105
- };
106
- // 函数: 点击快捷选项[特殊-净利润]
107
- const clicktFeaturelncomesOption = (value) => {
108
- switch (value) {
109
- case "≤0":
110
- Object.assign(indicatorValue.value, {
111
- rule: 2, // 1超 2跌
112
- withFewYears: 1,
113
- yearsCount: 1,
114
- netProfit: 0,
115
- });
50
+ switch (item.key) {
51
+ // 是否ST
52
+ case "st": {
53
+ indicatorValue.value = { ...baseParams, st: null };
116
54
  break;
117
- case "≥0":
118
- Object.assign(indicatorValue.value, {
119
- rule: 1,
120
- withFewYears: 1,
121
- yearsCount: 1,
122
- netProfit: 0,
123
- });
55
+ }
56
+ // 净利润
57
+ case "tFeaturelncomes": {
58
+ indicatorValue.value = {
59
+ ...baseParams,
60
+ rule: 1, // 1超 2跌
61
+ withFewYears: null,
62
+ yearsCount: null,
63
+ netProfit: null,
64
+ };
124
65
  break;
125
- case "五年内有四年以上盈利超过5千万":
126
- Object.assign(indicatorValue.value, {
127
- rule: 1,
128
- withFewYears: 5,
129
- yearsCount: 4,
130
- netProfit: 0.5,
131
- });
66
+ }
67
+ // 股价分位
68
+ case "priceLevels": {
69
+ indicatorValue.value = { ...baseParams, priceLevels: null };
132
70
  break;
133
- case "≥10亿":
134
- Object.assign(indicatorValue.value, {
135
- rule: 1,
136
- withFewYears: 1,
137
- yearsCount: 1,
138
- netProfit: 10,
139
- });
71
+ }
72
+ // 认沽认购
73
+ case "optionsCpType": {
74
+ indicatorValue.value = {
75
+ ...baseParams,
76
+ optionsCpType: null, // 1看涨 2看跌
77
+ };
140
78
  break;
141
- case "≥20亿":
142
- Object.assign(indicatorValue.value, {
143
- rule: 1,
144
- withFewYears: 1,
145
- yearsCount: 1,
146
- netProfit: 20,
147
- });
79
+ }
80
+ // 动量
81
+ case "momentum": {
82
+ indicatorValue.value = {
83
+ ...baseParams,
84
+ momentumType: 1,
85
+ momentumValue: [20],
86
+ };
148
87
  break;
88
+ }
89
+ // 其它的通用处理
90
+ default: {
91
+ indicatorValue.value = {
92
+ ...baseParams,
93
+ range: [null, null],
94
+ unit: item.defaultUnit.length ? [...item.defaultUnit] : [null, null],
95
+ };
96
+ }
149
97
  }
98
+ visible.value = true;
150
99
  };
151
-
152
- // 函数: 确定 (新增custom配置项时, 需要改动)
100
+ // 确定指标选项 (**新增custom配置项时, 需要改动**)
153
101
  const submitDialog = () => {
154
102
  // 校验 + 格式化文案
155
103
  switch (indicatorValue.value.key) {
@@ -191,6 +139,43 @@ const submitDialog = () => {
191
139
  indicatorValue.value.tagText = `${label}: ${optionsCpType === 1 ? "看涨" : "看跌"}`;
192
140
  break;
193
141
  }
142
+ // 动量
143
+ case "momentum": {
144
+ const { label, momentumType, momentumValue } = indicatorValue.value;
145
+ const errorText = `格式错误, 请输入正整数或选择正确的时间项`;
146
+ let contentText = null;
147
+ // 校验
148
+ switch (momentumType) {
149
+ case 1: {
150
+ if (!handleValidInput(momentumValue[0])) return ElMessage.warning(errorText);
151
+ contentText = `现价相对于${momentumValue[0]}日前收盘价的涨幅`;
152
+ break;
153
+ }
154
+ case 2: {
155
+ if (!handleValidInput(momentumValue[0])) return ElMessage.warning(errorText);
156
+ contentText = `现价相对于${momentumValue[0]}日均线的涨幅`;
157
+ break;
158
+ }
159
+ case 3: {
160
+ if (!handleValidInput(momentumValue[0]) || !handleValidInput(momentumValue[1])) return ElMessage.warning(errorText);
161
+ contentText = `现价相对于${momentumValue[0]}日前${momentumValue[1]}日均线的涨幅`;
162
+ break;
163
+ }
164
+ case 4: {
165
+ if (!handleValidInput(momentumValue[0]) || !handleValidInput(momentumValue[1])) return ElMessage.warning(errorText);
166
+ contentText = `近${momentumValue[0]}日均线相对于近${momentumValue[1]}日均线的涨幅`;
167
+ break;
168
+ }
169
+ case 5: {
170
+ if (!handleValidInput(momentumValue[0]) || !handleValidInput(momentumValue[1]) || !handleValidInput(momentumValue[2])) return ElMessage.warning(errorText);
171
+ contentText = `近${momentumValue[0]}日均线相对于${momentumValue[1]}日前${momentumValue[2]}日均线的涨幅`;
172
+ break;
173
+ }
174
+ }
175
+ // 格式化文案
176
+ indicatorValue.value.tagText = `${label}: ${contentText}`;
177
+ break;
178
+ }
194
179
  // 其它的通用处理
195
180
  default: {
196
181
  const { label, range, unit } = indicatorValue.value;
@@ -217,17 +202,101 @@ const submitDialog = () => {
217
202
  }
218
203
  visible.value = false;
219
204
  };
220
-
221
- // 函数: 删除指标项Tag
222
- const deleteTag = (index) => {
223
- data.value.splice(index, 1);
224
- };
225
- // 函数: 编辑指标项Tag
205
+ // 编辑指标Tag
226
206
  const editTag = (item) => {
227
207
  nowIndicator.value = commonIndicatorOptions.value.find(({ key }) => key === item.key);
228
208
  indicatorValue.value = JSON.parse(JSON.stringify(item));
229
209
  visible.value = true;
230
210
  };
211
+ // 删除指标Tag
212
+ const deleteTag = (index) => {
213
+ data.value.splice(index, 1);
214
+ };
215
+ // 快捷项[通用: type-undefined]
216
+ const clickConvenientOption = (item) => {
217
+ indicatorValue.value.range = [...item.range];
218
+ indicatorValue.value.unit = [...item.unit];
219
+ };
220
+ // 快捷项[自定义: type-custom-净利润]
221
+ const clicktFeaturelncomesOption = (value) => {
222
+ switch (value) {
223
+ case "≤0":
224
+ Object.assign(indicatorValue.value, {
225
+ rule: 2, // 1超 2跌
226
+ withFewYears: 1,
227
+ yearsCount: 1,
228
+ netProfit: 0,
229
+ });
230
+ break;
231
+ case "≥0":
232
+ Object.assign(indicatorValue.value, {
233
+ rule: 1,
234
+ withFewYears: 1,
235
+ yearsCount: 1,
236
+ netProfit: 0,
237
+ });
238
+ break;
239
+ case "五年内有四年以上盈利超过5千万":
240
+ Object.assign(indicatorValue.value, {
241
+ rule: 1,
242
+ withFewYears: 5,
243
+ yearsCount: 4,
244
+ netProfit: 0.5,
245
+ });
246
+ break;
247
+ case "≥10亿":
248
+ Object.assign(indicatorValue.value, {
249
+ rule: 1,
250
+ withFewYears: 1,
251
+ yearsCount: 1,
252
+ netProfit: 10,
253
+ });
254
+ break;
255
+ case "≥20亿":
256
+ Object.assign(indicatorValue.value, {
257
+ rule: 1,
258
+ withFewYears: 1,
259
+ yearsCount: 1,
260
+ netProfit: 20,
261
+ });
262
+ break;
263
+ }
264
+ };
265
+ // 快捷项[自定义: type-custom-动量]
266
+ const handleMomentumTypeChange = (type) => {
267
+ const defaultValueMap = new Map([
268
+ [1, [20]],
269
+ [2, [20]],
270
+ [3, [20, 3]],
271
+ [4, [3, 20]],
272
+ [5, [3, 20, 3]],
273
+ ]);
274
+ indicatorValue.value.momentumValue = defaultValueMap.get(type);
275
+ };
276
+ const handleMomentumInputOptions = (queryString, cb) => {
277
+ cb([
278
+ { label: "本周", value: "本周" },
279
+ { label: "本月", value: "本月" },
280
+ { label: "近一月", value: "近一月" },
281
+ { label: "本年", value: "本年" },
282
+ ]);
283
+ };
284
+ const handleValidInput = (value) => {
285
+ const isInt = /^[1-9]\d*$/.test(value);
286
+ const isOption = /^(本周|本月|近一月|本年)$/i.test(value);
287
+ return isInt || isOption;
288
+ };
289
+ // 监视: 常用指标数据源 => 已勾选且新的数据源中也有它,则要进行勾选保留
290
+ watch(
291
+ () => commonIndicatorOptions.value,
292
+ () => {
293
+ if (data.value.length) {
294
+ data.value = data.value.filter(({ key }) => {
295
+ return commonIndicatorOptions.value.find((item) => item.key === key);
296
+ });
297
+ }
298
+ }
299
+ );
231
300
  </script>
232
301
 
233
302
  <template>
@@ -235,7 +304,7 @@ const editTag = (item) => {
235
304
  class="common-indicator"
236
305
  v-if="config.show && commonIndicatorOptions.length"
237
306
  >
238
- <!-- 指标项展示区域 -->
307
+ <!-- 指标选项 -->
239
308
  <div class="indicator">
240
309
  <div class="title">
241
310
  <span>常用指标: </span>
@@ -251,6 +320,7 @@ const editTag = (item) => {
251
320
  </span>
252
321
  </div>
253
322
  </div>
323
+ <!-- 指标Tag -->
254
324
  <div class="tags">
255
325
  <el-tag
256
326
  v-for="(item, index) in data"
@@ -266,7 +336,8 @@ const editTag = (item) => {
266
336
  >
267
337
  </el-tag>
268
338
  </div>
269
- <!-- 指标具体弹窗 -->
339
+
340
+ <!-- 指标弹窗 -->
270
341
  <el-dialog
271
342
  v-model="visible"
272
343
  :title="nowIndicator.label"
@@ -405,7 +476,85 @@ const editTag = (item) => {
405
476
  <el-radio :label="2">看跌</el-radio>
406
477
  </el-radio-group>
407
478
  </div>
479
+ <!-- 动量 -->
480
+ <div v-if="nowIndicator.key === 'momentum'">
481
+ <!-- 便捷配置项区域 -->
482
+ <el-radio-group
483
+ v-model="indicatorValue.momentumType"
484
+ @change="handleMomentumTypeChange"
485
+ >
486
+ <el-radio :label="1">动量1</el-radio>
487
+ <el-radio :label="2">动量2</el-radio>
488
+ <el-radio :label="3">动量3</el-radio>
489
+ <el-radio :label="4">动量4</el-radio>
490
+ <el-radio :label="5">动量5</el-radio>
491
+ </el-radio-group>
492
+ <!-- 输入框区域 -->
493
+ <div class="momentum-out-box">
494
+ <div v-if="indicatorValue.momentumType === 1">
495
+ <span>现价相对于</span>
496
+ <el-autocomplete
497
+ v-model="indicatorValue.momentumValue[0]"
498
+ :fetch-suggestions="handleMomentumInputOptions"
499
+ />
500
+ <span>日前收盘价的涨幅</span>
501
+ </div>
502
+ <div v-if="indicatorValue.momentumType === 2">
503
+ <span>现价相对于</span>
504
+ <el-autocomplete
505
+ v-model="indicatorValue.momentumValue[0]"
506
+ :fetch-suggestions="handleMomentumInputOptions"
507
+ />
508
+ <span>日均线的涨幅</span>
509
+ </div>
510
+ <div v-if="indicatorValue.momentumType === 3">
511
+ <span>现价相对于</span>
512
+ <el-autocomplete
513
+ v-model="indicatorValue.momentumValue[0]"
514
+ :fetch-suggestions="handleMomentumInputOptions"
515
+ />
516
+ <span>日前</span>
517
+ <el-autocomplete
518
+ v-model="indicatorValue.momentumValue[1]"
519
+ :fetch-suggestions="handleMomentumInputOptions"
520
+ />
521
+ <span>日均线的涨幅</span>
522
+ </div>
523
+ <div v-if="indicatorValue.momentumType === 4">
524
+ <span>近</span>
525
+ <el-autocomplete
526
+ v-model="indicatorValue.momentumValue[0]"
527
+ :fetch-suggestions="handleMomentumInputOptions"
528
+ />
529
+ <span>日均线相对于近</span>
530
+ <el-autocomplete
531
+ v-model="indicatorValue.momentumValue[1]"
532
+ :fetch-suggestions="handleMomentumInputOptions"
533
+ />
534
+ <span>日均线的涨幅</span>
535
+ </div>
536
+ <div v-if="indicatorValue.momentumType === 5">
537
+ <span>近</span>
538
+ <el-autocomplete
539
+ v-model="indicatorValue.momentumValue[0]"
540
+ :fetch-suggestions="handleMomentumInputOptions"
541
+ />
542
+ <span>日均线相对于</span>
543
+ <el-autocomplete
544
+ v-model="indicatorValue.momentumValue[1]"
545
+ :fetch-suggestions="handleMomentumInputOptions"
546
+ />
547
+ <span>日前</span>
548
+ <el-autocomplete
549
+ v-model="indicatorValue.momentumValue[2]"
550
+ :fetch-suggestions="handleMomentumInputOptions"
551
+ />
552
+ <span>日均线的涨幅</span>
553
+ </div>
554
+ </div>
555
+ </div>
408
556
  </template>
557
+ <!-- 确定 -->
409
558
  <template #footer>
410
559
  <div class="dialog-footer">
411
560
  <el-button
@@ -488,6 +637,7 @@ const editTag = (item) => {
488
637
  margin-right: 10px;
489
638
  }
490
639
  }
640
+ // 净利润弹窗样式
491
641
  .tFeaturelncomes-option-box {
492
642
  display: grid;
493
643
  grid-template-columns: 20% 20% 60%;
@@ -510,5 +660,13 @@ const editTag = (item) => {
510
660
  width: 100px;
511
661
  }
512
662
  }
663
+ // 动量弹窗样式
664
+ .momentum-out-box {
665
+ margin-top: 10px;
666
+ :deep(.el-autocomplete) {
667
+ width: 100px;
668
+ margin: 0 4px;
669
+ }
670
+ }
513
671
  }
514
672
  </style>
@@ -1,5 +1,4 @@
1
1
  // 品种池搜索组件的默认配置项
2
-
3
2
  export default {
4
3
  // 品种市场 [选项: 前端默认]
5
4
  varietyMarket: {
@@ -340,7 +339,19 @@ export default {
340
339
  },
341
340
  type: "custom",
342
341
  },
342
+ // 动量
343
+ {
344
+ key: "momentum",
345
+ label: "动量",
346
+ parent: {
347
+ varietyMarketIds: [2, 3, 5, 7],
348
+ commonOptionIds: [4, 6, 12, 14, 15],
349
+ },
350
+ type: "custom",
351
+ },
352
+
343
353
  // ----------期权-----------
354
+
344
355
  // 过期天数
345
356
  {
346
357
  key: "expireDays",
@@ -274,6 +274,14 @@ defineExpose({
274
274
  if (Object.keys(searchOptionDto).length) {
275
275
  params.searchOptionDto = searchOptionDto;
276
276
  }
277
+ // 6.常用指标-动量
278
+ const momentumIndicator = data.commonIndicator.find(({ key }) => key === "momentum");
279
+ if (momentumIndicator) {
280
+ params.momentumIndicator = {
281
+ momentumType: momentumIndicator.momentumType,
282
+ momentumValue: momentumIndicator.momentumValue.join(","),
283
+ };
284
+ }
277
285
  }
278
286
  console.log("%c[st-varietySearch]: 接口传参数据生成完毕", "color: green", params);
279
287
  return params;