st-comp 0.0.155 → 0.0.157

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.155",
4
+ "version": "0.0.157",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -106,7 +106,7 @@ const clickIndicator = (item) => {
106
106
  case "mainFlow": {
107
107
  indicatorValue.value = {
108
108
  ...baseParams,
109
- mainFlowRadioType: '0',
109
+ radioType: '0',
110
110
  rankRange: [null, null],
111
111
  };
112
112
  break;
@@ -191,7 +191,7 @@ const submitDialog = () => {
191
191
  }
192
192
  // 主力净流入资金
193
193
  case "mainFlow": {
194
- const { label, mainFlowRadioType, radio, rankRange } = indicatorValue.value;
194
+ const { label, radioType, radio, rankRange } = indicatorValue.value;
195
195
  const checkNumber = (val) => {
196
196
  if (val === '' || val === null || val === undefined) return false;
197
197
  const num = Number(val)
@@ -201,21 +201,21 @@ const submitDialog = () => {
201
201
  // 校验
202
202
  if (!radio) return ElMessage.warning("格式错误: 请选择时间");
203
203
  if (!checkNumber(rankRange[0]) && !checkNumber(rankRange[1])) {
204
- return ElMessage.warning(`格式错误: 请填写${mainFlowRadioType === '0' ? '涨幅范围' : '排名范围'}`);
204
+ return ElMessage.warning(`格式错误: 请填写${radioType === '0' ? '涨幅范围' : '排名范围'}`);
205
205
  }
206
206
  // 格式化文案
207
207
  if (!["", null].includes(rankRange[0]) && !["", null].includes(rankRange[1])) {
208
208
  indicatorValue.value.tagText = `${label}: ${radio}日${
209
- mainFlowRadioType === '0' ? '涨幅范围' : '排名范围'
210
- }: ${rankRange[0]}${mainFlowRadioType === '0' ? '%' : ''} ~ ${rankRange[1]}${mainFlowRadioType === '0' ? '%' : ''}`;
209
+ radioType === '0' ? '涨幅范围' : '排名范围'
210
+ }: ${rankRange[0]}${radioType === '0' ? '%' : ''} ~ ${rankRange[1]}${radioType === '0' ? '%' : ''}`;
211
211
  } else if (!["", null].includes(rankRange[0])) {
212
212
  indicatorValue.value.tagText = `${label}: ${radio}日${
213
- mainFlowRadioType === '0' ? '涨幅范围' : '排名范围'
214
- }: ≥${rankRange[0]}${mainFlowRadioType === '0' ? '%' : ''}`;
213
+ radioType === '0' ? '涨幅范围' : '排名范围'
214
+ }: ≥${rankRange[0]}${radioType === '0' ? '%' : ''}`;
215
215
  } else {
216
216
  indicatorValue.value.tagText = `${label}: ${radio}日${
217
- mainFlowRadioType === '0' ? '涨幅范围' : '排名范围'
218
- }: ≤${rankRange[1]}${mainFlowRadioType === '0' ? '%' : ''}`;
217
+ radioType === '0' ? '涨幅范围' : '排名范围'
218
+ }: ≤${rankRange[1]}${radioType === '0' ? '%' : ''}`;
219
219
  }
220
220
  break;
221
221
  }
@@ -393,12 +393,12 @@ const changeMainFlowRadioType = () => {
393
393
  <template #header v-else-if="nowIndicator.key === 'mainFlow'">
394
394
  <span style="font-size: 18px;">{{ nowIndicator.label }}</span>
395
395
  <el-radio-group
396
- v-model="indicatorValue.mainFlowRadioType"
396
+ v-model="indicatorValue.radioType"
397
397
  style="vertical-align: 4px; margin-left: 12px;"
398
398
  @change="changeMainFlowRadioType"
399
399
  >
400
400
  <el-radio-button label="涨幅范围" value="0" />
401
- <el-radio-button label="排名范围" value="1" />
401
+ <el-radio-button :disabled="rankKey && rankKey !== nowIndicator.key" label="排名范围" value="1" />
402
402
  </el-radio-group>
403
403
  </template>
404
404
 
@@ -610,7 +610,7 @@ const changeMainFlowRadioType = () => {
610
610
  <el-radio value="20">20日</el-radio>
611
611
  </el-radio-group>
612
612
  <div style="display: flex; align-items: center;">
613
- <span>{{ indicatorValue.mainFlowRadioType === '0' ? '涨幅范围' : '排名范围' }}:&nbsp;</span>
613
+ <span>{{ indicatorValue.radioType === '0' ? '涨幅范围' : '排名范围' }}:&nbsp;</span>
614
614
  <el-input
615
615
  v-model="indicatorValue.rankRange[0]"
616
616
  style="flex: 1"
@@ -266,9 +266,15 @@ defineExpose({
266
266
  const QIQUANKYES = ["expireDays", "virtualRealDegree", "yearProfitRate", "impliedVolatility", "levelMultiplier", "turnover", "volume", "openInterest", "optionsCpType", "optionGear"];
267
267
  // 1.常用指标-基本面(type:undefined的指标, 且[期权]的常用指标不计入基本面)
268
268
  const query = data.commonIndicator.reduce((result, item) => {
269
- const { key, type, range, unit, radioType, mainFlowRadioType, radio, rankRange } = item;
269
+ const { key, type, range, unit, radioType, radio, rankRange } = item;
270
+ // 主力净流入资金
271
+ if (key === 'mainFlow') {
272
+ let [start, end] = rankRange;
273
+ let column = radioType === '0' ? `netInfow${radio}d` : `last${radio}DayMainFlowRank`
274
+ result.push({ column, start, end });
275
+ }
270
276
  // 排名模式
271
- if (radioType === "1") {
277
+ else if (radioType === "1") {
272
278
  params.sortBy = {
273
279
  column: item.key,
274
280
  start: rankRange[0] || null,
@@ -286,12 +292,6 @@ defineExpose({
286
292
  end,
287
293
  });
288
294
  }
289
- // 主力净流入资金
290
- else if (key === 'mainFlow') {
291
- let [start, end] = rankRange;
292
- let column = mainFlowRadioType === '0' ? `netInfow${radio}d` : `last${radio}DayMianFlowRank`
293
- result.push({ column, start, end });
294
- }
295
295
  // 其它基本面指标
296
296
  else if (type === undefined && !QIQUANKYES.includes(key)) {
297
297
  let [start, end] = range;