From 664db98c9e8595ce4dd636a27f480e3a08b81ff5 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期五, 21 二月 2025 11:13:51 +0800
Subject: [PATCH] 新增可忽略的维修时间

---
 web/src/views/modules/taskReliability/SimulatCurve.vue |   57 ++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/web/src/views/modules/taskReliability/SimulatCurve.vue b/web/src/views/modules/taskReliability/SimulatCurve.vue
index ae749f3..b678dd6 100644
--- a/web/src/views/modules/taskReliability/SimulatCurve.vue
+++ b/web/src/views/modules/taskReliability/SimulatCurve.vue
@@ -1,6 +1,6 @@
 <template>
   <div class="mod-taskReliability-taskPhase">
-    <div class="echart" id="myChart" :style="myChartStyle"></div>
+    <div id="myChart" :style="myChartStyle"></div>
   </div>
 </template>
 
@@ -16,8 +16,10 @@
         mttr: '',
         mtbf: '',
         msr: '',
+        mttfMle: '',
+        mttrMle: '',
         myChart: {},
-        myChartStyle: {float: "left", width: "100%", height: "600px"}, //鍥捐〃鏍峰紡
+        myChartStyle: {width: "100%", height: "750px"}, //鍥捐〃鏍峰紡
         option: {}
       }
     },
@@ -33,34 +35,45 @@
           this.mttr = res.data.mttr.toFixed(4)
           this.mtbf = res.data.mtbf.toFixed(4)
           this.msr = res.data.msr.toFixed(4)
+          this.mttfMle = res.data.mttfMle.toFixed(4)
+          this.mttrMle = res.data.mttrMle.toFixed(4)
         }
         this.option = {
           title: {
-            text: "mttr:" + this.mttr + "    mtbf:" + this.mtbf+ "    msr:" + this.msr,
+            text: "mttf:" + this.mtbf + "  mttr:" + this.mttr + "  msr:" + this.msr + "  鑺傜偣瀵垮懡:" + this.mttfMle + "  骞冲潎缁翠慨鏃堕棿:" + this.mttrMle,
             textStyle: { // 涓绘爣棰樻枃鏈牱寮弡"fontSize": 18,"fontWeight": "bolder","color": "#333"}
               fontFamily: 'Arial',
-              fontSize: 30,
+              fontSize: 27,
               fontStyle: 'normal',
               fontWeight: 'normal',
             },
-            textAlign:'auto',//鏁翠綋锛堝寘鎷� text 鍜� subtext锛夌殑姘村钩瀵归綈
-            textVerticalAlign:'auto',//鏁翠綋锛堝寘鎷� text 鍜� subtext锛夌殑鍨傜洿瀵归綈
-            padding:0,//[5,10] | [ 5,6, 7, 8] ,鏍囬鍐呰竟璺�
-            left:'center',//'5' | '5%'锛宼itle 缁勪欢绂诲鍣ㄥ乏渚х殑璺濈
-            right:'auto',//'title 缁勪欢绂诲鍣ㄥ彸渚х殑璺濈
-            top:'auto',//title 缁勪欢绂诲鍣ㄤ笂渚х殑璺濈
-            bottom:'auto',//title 缁勪欢绂诲鍣ㄤ笅渚х殑璺濈
+            textAlign: 'auto',//鏁翠綋锛堝寘鎷� text 鍜� subtext锛夌殑姘村钩瀵归綈
+            textVerticalAlign: 'auto',//鏁翠綋锛堝寘鎷� text 鍜� subtext锛夌殑鍨傜洿瀵归綈
+            left: 'center',//'5' | '5%'锛宼itle 缁勪欢绂诲鍣ㄥ乏渚х殑璺濈
+            right: 'auto',//'title 缁勪欢绂诲鍣ㄥ彸渚х殑璺濈
+            top: '20px'
+          },
+          grid:{
+            top:'15%'
           },
           xAxis: {
             data: this.xDataList,
-            name: '浠跨湡鎬绘椂闀�'
+            name: '浠跨湡鎬绘椂闀�',
+            type: 'category',
+            axisLabel: {
+              formatter: function (value) {
+                // 灏� X 杞村埢搴﹀�兼牸寮忓寲涓轰繚鐣欎袱浣嶅皬鏁扮殑瀛楃涓�
+                return parseFloat(value).toFixed(2);
+              }
+            }
           },
           yAxis: {
-
-            name: '',
+            type: "value",
+            name: '鍙潬搴�',
           },
           series: [
             {
+              symbol: "none",
               data: this.yDataList,
               type: 'line',
               smooth: true
@@ -84,23 +97,26 @@
           this.mttr = res.data.mttr.toFixed(4)
           this.mtbf = res.data.mtbf.toFixed(4)
           this.msr = res.data.msr.toFixed(4)
+          this.mttfMle = res.data.mttfMle.toFixed(4)
+          this.mttrMle = res.data.mttrMle.toFixed(4)
         }
         this.option = {
           title: {
-            text: "mttr:" + this.mttr + "    mtbf:" + this.mtbf+ "    msr:" + this.msr,
+            text: "mttf:" + this.mtbf + "  mttr:" + this.mttr + "  msr:" + this.msr + "  鑺傜偣瀵垮懡:" + this.mttfMle + "  骞冲潎缁翠慨鏃堕棿:" + this.mttrMle,
             textStyle: { // 涓绘爣棰樻枃鏈牱寮弡"fontSize": 18,"fontWeight": "bolder","color": "#333"}
               fontFamily: 'Arial',
-              fontSize: 30,
+              fontSize: 27,
               fontStyle: 'normal',
               fontWeight: 'normal',
             },
             textAlign: 'auto',//鏁翠綋锛堝寘鎷� text 鍜� subtext锛夌殑姘村钩瀵归綈
             textVerticalAlign: 'auto',//鏁翠綋锛堝寘鎷� text 鍜� subtext锛夌殑鍨傜洿瀵归綈
-            padding: 0,//[5,10] | [ 5,6, 7, 8] ,鏍囬鍐呰竟璺�
             left: 'center',//'5' | '5%'锛宼itle 缁勪欢绂诲鍣ㄥ乏渚х殑璺濈
             right: 'auto',//'title 缁勪欢绂诲鍣ㄥ彸渚х殑璺濈
-            top: 'auto',//title 缁勪欢绂诲鍣ㄤ笂渚х殑璺濈
-            bottom: 'auto',//title 缁勪欢绂诲鍣ㄤ笅渚х殑璺濈
+            top: '20px'
+          },
+          grid:{
+            top:'15%'
           },
           xAxis: {
             data: this.xDataList,
@@ -108,8 +124,7 @@
             splitNumber: 10
           },
           yAxis: {
-
-            name: '',
+            name: '鍙潬搴�',
           },
           series: [
             {

--
Gitblit v1.9.1