fix: 修复前端涨跌幅显示异常;修复导入数据10日等涨跌幅异常

dev_refactor_0120_qoder
Lxy 4 months ago
parent d6ad9c4838
commit df537dbac9

@ -68,15 +68,15 @@ public class TStockDailyTrade extends BaseEntity
private Integer isLimitDown;
/** 10日动量涨跌幅 */
@Excel(name = "10日动量")
@Excel(name = "10日区间涨跌幅")
private BigDecimal momentum10d;
/** 20日动量涨跌幅 */
@Excel(name = "20日动量")
@Excel(name = "20日区间涨跌幅")
private BigDecimal momentum20d;
/** 60日动量涨跌幅 */
@Excel(name = "60日动量")
@Excel(name = "60日区间涨跌幅")
private BigDecimal momentum60d;
/** 证券名称(查询时关联获取) */
@ -97,7 +97,7 @@ public class TStockDailyTrade extends BaseEntity
private Date listingDate;
/** 上市天数(冗余存储,提升查询效率) */
@Excel(name = "上市天数")
@Excel(name = "可交易日数")
private Integer listingDays;
/** 是否为ST股票1=是0=否) */

@ -323,7 +323,14 @@ export default {
/** 格式化百分比 */
formatPercent(value) {
if (value === null || value === undefined) return '-'
return (value * 100).toFixed(2) + '%'
// 1-11.231.23%
// 0.01231.23%
if (Math.abs(value) > 1) {
return parseFloat(value.toFixed(2)) + '%'
} else {
// return parseFloat((value * 100).toFixed(2)) + '%'
return parseFloat(value.toFixed(4)) + '%'
}
},
/** 获取涨跌样式类 */

Loading…
Cancel
Save