|
@@ -29,7 +29,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section-title">
|
|
<div class="section-title">
|
|
- <s-title :type="3" titleText="模拟可靠性预测"></s-title>
|
|
|
|
|
|
+ <s-title :type="3" :titleText="!!fileName ? '模拟可靠性预测':'可靠性预测'"></s-title>
|
|
</div>
|
|
</div>
|
|
<div class="info-type">
|
|
<div class="info-type">
|
|
<div
|
|
<div
|
|
@@ -42,7 +42,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="info">
|
|
<div class="info">
|
|
- <div class="info-item">
|
|
|
|
|
|
+ <div class="info-item" v-if="!!!fileName">
|
|
设备健康状态:
|
|
设备健康状态:
|
|
<div class="info-value">
|
|
<div class="info-value">
|
|
<div
|
|
<div
|
|
@@ -52,27 +52,27 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="info-item">
|
|
|
|
|
|
+ <div class="info-item" v-if="!!!fileName">
|
|
预计发生故障:
|
|
预计发生故障:
|
|
- <span class="info-value"> {{ currentBtn.expected_failure }}</span>
|
|
|
|
|
|
+ <span class="info-value"> {{ formattedText(currentBtn.expected_failure) }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
近期故障概率:
|
|
近期故障概率:
|
|
<span class="info-value">
|
|
<span class="info-value">
|
|
- {{ formattedShortTermFailureProbability }}</span
|
|
|
|
|
|
+ {{ formattedText(formattedShortTermFailureProbability) }}</span
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
故障发生时间:
|
|
故障发生时间:
|
|
- <span class="info-value"> {{ currentBtn.failure_time }}</span>
|
|
|
|
|
|
+ <span class="info-value"> {{ formattedText(currentBtn.failure_time) }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
影响因素分析:
|
|
影响因素分析:
|
|
- <span class="info-value"> {{ currentBtn.impact_factors }}</span>
|
|
|
|
|
|
+ <span class="info-value"> {{ formattedText(currentBtn.impact_factors) }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
- 剩余可用时间:
|
|
|
|
- <span class="info-value"> {{ currentBtn.remaining_lifetime }}</span>
|
|
|
|
|
|
+ 剩余可靠时间:
|
|
|
|
+ <span class="info-value"> {{ formattedText(currentBtn.remaining_lifetime) }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -99,19 +99,19 @@
|
|
<div class="suggestion-item suggestion-item-fir">
|
|
<div class="suggestion-item suggestion-item-fir">
|
|
<div class="suggestion-title">建议维修时间</div>
|
|
<div class="suggestion-title">建议维修时间</div>
|
|
<span class="suggestion-value">{{
|
|
<span class="suggestion-value">{{
|
|
- currentBtn.suggested_maintenance_time
|
|
|
|
|
|
+ formattedText(currentBtn.suggested_maintenance_time)
|
|
}}</span>
|
|
}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="suggestion-item">
|
|
<div class="suggestion-item">
|
|
<div class="suggestion-title">维修方法</div>
|
|
<div class="suggestion-title">维修方法</div>
|
|
<span class="suggestion-value">{{
|
|
<span class="suggestion-value">{{
|
|
- currentBtn.maintenance_method
|
|
|
|
|
|
+ formattedText( currentBtn.maintenance_method)
|
|
}}</span>
|
|
}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="suggestion-item">
|
|
<div class="suggestion-item">
|
|
<div class="suggestion-title">所需维修资源</div>
|
|
<div class="suggestion-title">所需维修资源</div>
|
|
<span class="suggestion-value">{{
|
|
<span class="suggestion-value">{{
|
|
- currentBtn.required_resources
|
|
|
|
|
|
+ formattedText( currentBtn.required_resources)
|
|
}}</span>
|
|
}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -218,8 +218,11 @@ const formatPercentage = (value: string) => {
|
|
// 计算属性来格式化 short_term_failure_probability
|
|
// 计算属性来格式化 short_term_failure_probability
|
|
const formattedShortTermFailureProbability = computed(() => {
|
|
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)=>{
|
|
|
|
+ return !!value?value:'暂无'
|
|
|
|
+}
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
let source = 1;
|
|
let source = 1;
|
|
const pageId = route.query.id;
|
|
const pageId = route.query.id;
|
|
@@ -254,12 +257,21 @@ onMounted(() => {
|
|
xAxisData.value = result.chart.x;
|
|
xAxisData.value = result.chart.x;
|
|
forecast_result.value = result.forecast_result;
|
|
forecast_result.value = result.forecast_result;
|
|
devicesArr.value = result.devices;
|
|
devicesArr.value = result.devices;
|
|
- currentBtn.value = {
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (result.devices.length==0) {
|
|
|
|
+ currentBtn.value={
|
|
|
|
+ health_status:'健康'
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ currentBtn.value = {
|
|
...result.devices[0],
|
|
...result.devices[0],
|
|
...result.devices[0].maintenance_suggestion,
|
|
...result.devices[0].maintenance_suggestion,
|
|
...result.devices[0].reliability_forecast,
|
|
...result.devices[0].reliability_forecast,
|
|
|
|
|
|
};
|
|
};
|
|
|
|
+ }
|
|
seriesData.value = [
|
|
seriesData.value = [
|
|
{
|
|
{
|
|
name: "趋势",
|
|
name: "趋势",
|