Browse Source

修改文字

chenbaoxin 4 months ago
parent
commit
93dc8525f6
1 changed files with 7 additions and 4 deletions
  1. 7 4
      src/views/OperationalReliabilityPrediction/index.vue

+ 7 - 4
src/views/OperationalReliabilityPrediction/index.vue

@@ -54,12 +54,12 @@
           </div>
           <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 class="info-item">
             近期故障概率:
             <span class="info-value">
-              {{ formattedText(currentBtn.value.short_term_failure_probability) }}</span
+              {{ formattedText(currentBtn.short_term_failure_probability) }}</span
             >
           </div>
           <div class="info-item">
@@ -72,7 +72,7 @@
           </div>
           <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>
@@ -220,7 +220,10 @@ const formattedShortTermFailureProbability = computed(() => {
   const value = currentBtn.value.short_term_failure_probability;
   return typeof value === 'string' ? formatPercentage(value) : '暂无';
 });
-const formattedText = (value)=>{
+const formattedText = (value,deValue)=>{
+  if (!!deValue) {
+     return !!value?value:deValue
+  }
   return !!value?value:'暂无'
 }
 onMounted(() => {