质量管理数值默认值

This commit is contained in:
熊丽君
2021-12-28 18:17:24 +08:00
parent ec3ec3525a
commit fc8088c903

View File

@ -5,10 +5,10 @@
<div class="data-item"> <div class="data-item">
<div><span style="font-weight: bold">质量体系整改率</span></div> <div><span style="font-weight: bold">质量体系整改率</span></div>
<div class="box"> <div class="box">
<span v-if="percentage">{{ percentage }}%</span> <span>{{ percentage }}%</span>
</div> </div>
<div style="width: 100%"> <div style="width: 100%">
<progressBar :percentage="percentage" v-if="percentage" /> <progressBar :percentage="percentage" />
</div> </div>
</div> </div>
<div class="data-item"> <div class="data-item">
@ -90,12 +90,25 @@ export default {
}, },
data() { data() {
return { return {
dataInfo: {}, dataInfo: {
rectificationRate: 0,
productCate: 0,
commonlyProblemTotal: 0,
lowProblemTotal: 0,
smallProductCate: 0,
errorCheckRate: 0,
leakCheckRate: 0,
planCompleteRate: 0,
qualityPlanCompleteTotal: 0,
planCompleteRate: 0,
checkCompleteRate: 0,
qualityNotificationCompleteTotal: 0,
},
} }
}, },
computed: { computed: {
percentage() { percentage() {
return Math.floor(this.dataInfo.rectificationRate * 100) / 100 return Math.floor(this.dataInfo.rectificationRate * 100) / 100 || 0
}, },
}, },
mounted() { mounted() {