Commit 3eedc2d3 by caoyanzhi

解决上传进度NaN的问题

parent 2fbbf2f5
......@@ -15,10 +15,10 @@
<div v-if="scope.row.status === 4 || scope.row.status === 6" class="uploading">
<span>正在上传</span>
<span class="uploading-progress">
<el-progress
:percentage="scope.row.percent">
</el-progress>
</span>
<el-progress
:percentage="scope.row.percent">
</el-progress>
</span>
</div>
<!-- 初始状态和导入完成状态 -->
<template v-else>
......@@ -562,7 +562,7 @@ export default {
// 导入进行中
if (this.tagValTableData[tagItemIndex].tagItemId === tagItemId) {
this.tagValTableData[tagItemIndex].status = result.status;
const num = parseInt((result.totalNum - result.needExec) / result.totalNum * 100);
const num =result.totalNum == 0 ? 0 : parseInt((result.totalNum - result.needExec) / result.totalNum * 100);
this.tagValTableData[tagItemIndex].percent = num === 100 ? 99 : num;
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment