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/ConfigNode/configNode.vue |   84 +++++++++++++++++++++++++++++++++++++-----
 1 files changed, 74 insertions(+), 10 deletions(-)

diff --git a/web/src/views/modules/taskReliability/ConfigNode/configNode.vue b/web/src/views/modules/taskReliability/ConfigNode/configNode.vue
index 55c584b..c1da7d3 100644
--- a/web/src/views/modules/taskReliability/ConfigNode/configNode.vue
+++ b/web/src/views/modules/taskReliability/ConfigNode/configNode.vue
@@ -8,15 +8,28 @@
             <el-form-item v-show="shape!=='custom-circle1'" label="鑺傜偣鍚嶇О" prop="nodeText" label-width="80px">
               <el-input v-model="globalGridAttr.nodeText" style="width:100%" @change="onTextChange"></el-input>
             </el-form-item>
-            <el-form-item v-show="nodeType=='vote' || (nodeType=='node' && showNumberInput)" label="琛ㄥ喅鏁伴噺" prop="voteNum"
+            <el-form-item v-show="showNumberInput" :label='nodeType=="vote"?"琛ㄥ喅鏁伴噺":"澶囦唤鏁伴噺"' prop="voteNum"
                           label-width="80px">
               <el-input type="number" v-model="globalGridAttr.voteNum" @change="onNumberInputValue"
                         placeholder="璇疯緭鍏ユ暟瀛�"></el-input>
             </el-form-item>
+
             <div v-show="globalGridAttr.productType!=='product_xdy'">
               <el-form-item v-show="nodeType=='node'" label="鍙潬鎬у垎甯冪被鍨�" prop="reliabDistribType" label-width="125px">
                 <zt-dict style="width: 100%" v-model="globalGridAttr.reliabDistribType" @input="onReliabDistribType"
                          dict="ReliabDistribType" placeholder="鍙潬鎬у垎甯冪被鍨�" clearable/>
+              </el-form-item>
+              <el-form-item v-show="globalGridAttr.reliabDistribType==='3' && showBinoParam" label="浜岄」鍒嗗竷鎴愬姛鐜�"
+                            prop="successRate" label-width="125px">
+                <el-input v-model="globalGridAttr.successRate" @change="onSuccessRateChange"></el-input>
+              </el-form-item>
+              <el-form-item v-show="globalGridAttr.reliabDistribType==='3' && showBinoParam" label="鎬绘鏁�"
+                            prop="simulatTimes" label-width="80px">
+                <el-input v-model="globalGridAttr.simulatTimes" @change="onSimulatTimesChange"></el-input>
+              </el-form-item>
+              <el-form-item v-show="globalGridAttr.reliabDistribType==='3' && showBinoParam" label="鎴愬姛娆℃暟"
+                            prop="successTimes" label-width="80px">
+                <el-input v-model="globalGridAttr.successTimes" @change="onSuccessTimesChange"></el-input>
               </el-form-item>
               <el-form-item v-show="nodeType=='node'" label="MTBCF" prop="taskMtbcf" label-width="80px">
                 <el-input v-model="globalGridAttr.taskMtbcf" @change="onTaskMtbcfChange"></el-input>
@@ -46,10 +59,12 @@
                   <el-input v-model="globalGridAttr.repairMttcr" @change="onRepairMttcrChange"></el-input>
                 </el-form-item>
                 <el-form-item label="鍙傛暟2" prop="repairMttcrOtherParams2" label-width="80px">
-                  <el-input v-model="globalGridAttr.repairMttcrOtherParams2" @change="onRepairMttcrOther2Change"></el-input>
+                  <el-input v-model="globalGridAttr.repairMttcrOtherParams2"
+                            @change="onRepairMttcrOther2Change"></el-input>
                 </el-form-item>
                 <el-form-item label="鍙傛暟2" prop="repairMttcrOtherParams3" label-width="80px">
-                  <el-input v-model="globalGridAttr.repairMttcrOtherParams3" @change="onRepairMttcrOther3Change"></el-input>
+                  <el-input v-model="globalGridAttr.repairMttcrOtherParams3"
+                            @change="onRepairMttcrOther3Change"></el-input>
                 </el-form-item>
               </div>
             </div>
@@ -104,7 +119,10 @@
           taskMtbcf: '',
           isRepair: '',
           voteNum: 0,
-          productType: ''
+          productType: '',
+          successRate: '',
+          simulatTimes: '',
+          successTimes: '',
         },
         data: {
           dataId: '',
@@ -113,6 +131,7 @@
         },
         showNumberInput: false,
         showRepairInput: false,
+        showBinoParam: false,
         isRepair: [
           {
             value: 0,
@@ -130,10 +149,8 @@
       }
     },
     components: {},
-    props: {
-    },
-    watch: {
-    },
+    props: {},
+    watch: {},
     mounted() {
     },
     methods: {
@@ -159,7 +176,8 @@
         this.curCel.attr('text/text', this.text)
       },
       onNodeTypeExtChange(e) {
-        if (this.globalGridAttr.nodeTypeExt === 'vote') {
+        alert(this.globalGridAttr.nodeTypeExt)
+        if (this.globalGridAttr.nodeTypeExt === 'vote' || this.globalGridAttr.nodeTypeExt === 'switch') {
           this.showNumberInput = true;
         } else {
           this.showNumberInput = false;
@@ -182,6 +200,9 @@
       // 鍙潬鎬у垎甯冪被鍨�
       onReliabDistribType(e) {
         this.globalGridAttr.reliabDistribType = e
+        if (e === '3') {
+          this.showBinoParam = true
+        }
         let reliabDistribType = {
           reliabDistribType: this.globalGridAttr.reliabDistribType
         }
@@ -284,6 +305,42 @@
           this.$message.error('杈撳叆鏍煎紡鏈夎锛岃杈撳叆瀹炴暟')
         }
       },
+      onSuccessRateChange(e) {
+        const numberRegex = /^-?\d+(\.\d+)?$/
+        if (numberRegex.test(e)) {
+          this.globalGridAttr.successRate = e
+          let successRate = {
+            successRate: this.globalGridAttr.successRate
+          }
+          this.curCel.setData(successRate)
+        } else {
+          this.$message.error('杈撳叆鏍煎紡鏈夎锛岃杈撳叆瀹炴暟')
+        }
+      },
+      onSimulatTimesChange(e) {
+        const numberRegex = /^-?\d+(\.\d+)?$/
+        if (numberRegex.test(e)) {
+          this.globalGridAttr.simulatTimes = e
+          let simulatTimes = {
+            simulatTimes: this.globalGridAttr.simulatTimes
+          }
+          this.curCel.setData(simulatTimes)
+        } else {
+          this.$message.error('杈撳叆鏍煎紡鏈夎锛岃杈撳叆瀹炴暟')
+        }
+      },
+      onSuccessTimesChange(e) {
+        const numberRegex = /^-?\d+(\.\d+)?$/
+        if (numberRegex.test(e)) {
+          this.globalGridAttr.successTimes = e
+          let successTimes = {
+            successTimes: this.globalGridAttr.successTimes
+          }
+          this.curCel.setData(successTimes)
+        } else {
+          this.$message.error('杈撳叆鏍煎紡鏈夎锛岃杈撳叆瀹炴暟')
+        }
+      },
       onStatusImgChange(e) {
         this.globalGridAttr.statusImg = e
         let statusImg = {
@@ -348,10 +405,17 @@
           this.globalGridAttr.isRepair = cell.getData().isRepair
           this.globalGridAttr.voteNum = cell.getData().voteNum
           this.globalGridAttr.productType = cell.getData().productType
-          if (this.nodeType === 'vote' || this.globalGridAttr.nodeTypeExt === 'vote' || (cell.getData().voteNum !== undefined && cell.getData().voteNum !== '')) {
+          this.globalGridAttr.successRate = cell.getData().successRate
+          this.globalGridAttr.simulatTimes = cell.getData().simulatTimes
+          this.globalGridAttr.successTimes = cell.getData().successTimes
+          if (this.nodeType === 'vote' || this.nodeType === 'switch') {
             console.log(cell.getData().voteNum, 'cell.getData().voteNum')
             this.showNumberInput = true
           }
+          if (cell.getData().reliabDistribType === 3) {
+            this.globalGridAttr.reliabDistribType = '3'
+            this.showBinoParam = true
+          }
           this.showRepairInput = cell.getData().isRepair
           cell.removeTools()
           cell.addTools([

--
Gitblit v1.9.1