diff --git a/src/pages/Middle/Mold/Touch/Reporting.vue b/src/pages/Middle/Mold/Touch/Reporting.vue index e1bc3f8..b352b92 100644 --- a/src/pages/Middle/Mold/Touch/Reporting.vue +++ b/src/pages/Middle/Mold/Touch/Reporting.vue @@ -51,7 +51,7 @@ style="width:50px;height:50px;margin-right: 10px;" :src="item.component_detail.image" /> - + @@ -103,7 +103,7 @@ style="width:50px;height:50px;margin-right: 10px;" :src="ditem.component_img" /> - + @@ -925,7 +925,17 @@ export default { }, - + // 将进度百分比取小数点后两位 + formatProgress(progress) { + // 判断如果大于5个字符串,就截取前6个字符串 + if (progress.length > 5) { + progress = progress.substring(0, 6); + // 将百分比转换为小数点后两位 + progress = parseFloat(progress).toFixed(2); + } + return progress; + + }, }, // 监听属性