|
@@ -54,12 +54,12 @@
|
|
</div>
|
|
</div>
|
|
<div class="info-item" v-if="!!!fileName">
|
|
<div class="info-item" v-if="!!!fileName">
|
|
预计发生故障:
|
|
预计发生故障:
|
|
- <span class="info-value"> {{ formattedText(currentBtn.expected_failure) }}</span>
|
|
|
|
|
|
+ <span class="info-value"> {{ formattedText(currentBtn.expected_failure,'5%') }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
近期故障概率:
|
|
近期故障概率:
|
|
<span class="info-value">
|
|
<span class="info-value">
|
|
- {{ formattedText(currentBtn.value.short_term_failure_probability) }}</span
|
|
|
|
|
|
+ {{ formattedText(currentBtn.short_term_failure_probability) }}</span
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
@@ -72,7 +72,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
剩余可靠时间:
|
|
剩余可靠时间:
|
|
- <span class="info-value"> {{ formattedText(currentBtn.remaining_lifetime) }}</span>
|
|
|
|
|
|
+ <span class="info-value"> {{ formattedText(currentBtn.remaining_lifetime,'半年以上') }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -220,7 +220,10 @@ const formattedShortTermFailureProbability = computed(() => {
|
|
const value = currentBtn.value.short_term_failure_probability;
|
|
const value = currentBtn.value.short_term_failure_probability;
|
|
return typeof value === 'string' ? formatPercentage(value) : '暂无';
|
|
return typeof value === 'string' ? formatPercentage(value) : '暂无';
|
|
});
|
|
});
|
|
-const formattedText = (value)=>{
|
|
|
|
|
|
+const formattedText = (value,deValue)=>{
|
|
|
|
+ if (!!deValue) {
|
|
|
|
+ return !!value?value:deValue
|
|
|
|
+ }
|
|
return !!value?value:'暂无'
|
|
return !!value?value:'暂无'
|
|
}
|
|
}
|
|
onMounted(() => {
|
|
onMounted(() => {
|