CN-599 fix: 新报告功能问题修复
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<div class="expand-cell" v-for="(item, index) in downDataList" :key="index">
|
||||
<div class="expand-right">
|
||||
<div class="demo-progress">
|
||||
<el-progress type="circle" :percentage="item.percent === 1 ? 100 : parseFloat(item.percent * 100).toFixed(2)" :color="item.percent === 1 ? '#21bf9a' : '#50b3ef'">
|
||||
<el-progress type="circle" :percentage="computePercent(item)" :color="computePercent(item) === 100 ? '#21bf9a' : '#50b3ef'">
|
||||
<template #default="{ percentage }">
|
||||
<span style="font-size: 0.875rem;">{{ percentage }}%</span>
|
||||
</template>
|
||||
@@ -47,13 +47,13 @@
|
||||
<div>{{dateFormatByAppearance(item.ctime)}}</div>
|
||||
</div>
|
||||
<div class="expand-icon">
|
||||
<div class="table-operation-item--no-border" :class="{'table-operation-item--disabled': item.percent < 1}" @click="reportOperation(['download', item])">
|
||||
<div class="table-operation-item--no-border" :class="{'table-operation-item--disabled': computePercent(item) < 100}" @click="reportOperation(['download', item])">
|
||||
<loading :loading="loadingTableId === item.id"></loading>
|
||||
<svg class="icon" aria-hidden="true" :class="{'table-operation-all-loading': loadingTableId}">
|
||||
<use xlink:href="#cn-icon-download2"></use>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="table-operation-item--no-border" :class="{'table-operation-item--disabled': item.percent < 1}" @click="reportOperation(['preview', item])">
|
||||
<div class="table-operation-item--no-border" :class="{'table-operation-item--disabled': computePercent(item) < 100}" @click="reportOperation(['preview', item])">
|
||||
<loading :loading="loadingPreviewId === item.id"></loading>
|
||||
<svg class="icon" aria-hidden="true" :class="{'table-operation-all-loading': loadingPreviewId}">
|
||||
<use xlink:href="#cn-icon-preview"></use>
|
||||
@@ -236,6 +236,19 @@ export default {
|
||||
}
|
||||
return str
|
||||
}
|
||||
},
|
||||
computePercent () {
|
||||
return function (item) {
|
||||
if (item.percent === 1) {
|
||||
if (item.state === 1) {
|
||||
return 100
|
||||
} else {
|
||||
return 99.99
|
||||
}
|
||||
} else {
|
||||
return parseFloat(item.percent * 100).toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -32,10 +32,6 @@ const routes = [
|
||||
},
|
||||
{
|
||||
path: '/report/builtIn',
|
||||
component: () => import('@/views/report/builtinReport')
|
||||
},
|
||||
{
|
||||
path: '/report/test',
|
||||
component: () => import('@/views/report/reportTest')
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user