st-comp 0.0.110 → 0.0.112

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.110",
4
+ "version": "0.0.112",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -154,13 +154,15 @@ const submitDialog = () => {
154
154
  if (["", null].includes(range[0]) && ["", null].includes(range[1])) {
155
155
  return ElMessage.warning("格式错误: 请至少填写一个值");
156
156
  }
157
+ const unitLeft = radioType === '1' ? "" : (unit[0] ?? "")
158
+ const unitRight = radioType === '1' ? "" : (unit[1] ?? "")
157
159
  // 格式化文案
158
160
  if (!["", null].includes(range[0]) && !["", null].includes(range[1])) {
159
- indicatorValue.value.tagText = `${label}${radioType === '1' ? '排名' : ''}: ${range[0]}${unit[0] ?? ""} ~ ${range[1]}${unit[1] ?? ""}`;
161
+ indicatorValue.value.tagText = `${label}${radioType === '1' ? '排名' : ''}: ${range[0]}${unitLeft} ~ ${range[1]}${unitRight}`;
160
162
  } else if (!["", null].includes(range[0])) {
161
- indicatorValue.value.tagText = `${label}${radioType === '1' ? '排名' : ''}: ≥${range[0]}${unit[0] ?? ""}`;
163
+ indicatorValue.value.tagText = `${label}${radioType === '1' ? '排名' : ''}: ≥${range[0]}${unitLeft}`;
162
164
  } else {
163
- indicatorValue.value.tagText = `${label}${radioType === '1' ? '排名' : ''}: ≤${range[1]}${unit[1] ?? ""}`;
165
+ indicatorValue.value.tagText = `${label}${radioType === '1' ? '排名' : ''}: ≤${range[1]}${unitRight}`;
164
166
  }
165
167
  }
166
168
  }
@@ -109,7 +109,6 @@ defineExpose({
109
109
  formatData: (data) => {
110
110
  console.log("%c[st-varietySearch]: 正在生成接口传参结构的数据...", "color: tomato");
111
111
  const params = {};
112
- const searchOptionDto = { rangeDtoList: [] }; // 期权相关筛选
113
112
  // 1.品种市场
114
113
  if (data.varietyMarket) {
115
114
  params.exchangeId = String(data.varietyMarket);
@@ -201,12 +200,13 @@ defineExpose({
201
200
  {
202
201
  const QIQUANKYES = ["expireDays", "virtualRealDegree", "yearProfitRate", "impliedVolatility", "levelMultiplier", "turnover", "volume", "openInterest", "optionsCpType", "optionGear"];
203
202
  // 1.常用指标-基本面(type:undefined的指标, 且[期权]的常用指标不计入基本面)
203
+ const rangeDtoList = []; // 期权排序相关筛选
204
204
  const query = data.commonIndicator.reduce((result, item) => {
205
205
  const { key, type, range, unit, radioType, rankRange } = item;
206
206
  // 排名模式
207
207
  if (radioType === '1') {
208
208
  if (QIQUANKYES.includes(key)) {
209
- searchOptionDto.rangeDtoList.push({
209
+ rangeDtoList.push({
210
210
  column: item.key,
211
211
  start: rankRange[0] || null,
212
212
  end: rankRange[1] || null,
@@ -268,6 +268,9 @@ defineExpose({
268
268
  }
269
269
  return result;
270
270
  }, []);
271
+ if (rangeDtoList.length) {
272
+ params.searchOptionDto = { rangeDtoList }
273
+ }
271
274
  if (query.length) {
272
275
  params.query = query;
273
276
  }
@@ -292,6 +295,7 @@ defineExpose({
292
295
  params.peTtmLevels = peTtmLevelIndicator.peTtmLevels;
293
296
  }
294
297
  // 6.常用指标-期权相关参数
298
+ const searchOptionDto = {};
295
299
  data.commonIndicator.forEach((item) => {
296
300
  const { key } = item;
297
301
  switch (key) {
@@ -347,7 +351,10 @@ defineExpose({
347
351
  }
348
352
  });
349
353
  if (Object.keys(searchOptionDto).length) {
350
- params.searchOptionDto = searchOptionDto;
354
+ params.searchOptionDto = {
355
+ ...params.searchOptionDto,
356
+ ...searchOptionDto,
357
+ };
351
358
  }
352
359
  }
353
360
  console.log("%c[st-varietySearch]: 接口传参数据生成完毕", "color: green", params);