From a86c2eb2db34d2d350e5c2eb72bf6416ec89c0d2 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期二, 19 十一月 2024 11:43:03 +0800
Subject: [PATCH] 1)可靠性评定时新增模型检查处理; 2)获取任务二项分布参数时,去掉模型的匹配。

---
 web/src/views/modules/taskReliability/PlanMake.vue |   50 ++++++++++++++++++++++++++++----------------------
 1 files changed, 28 insertions(+), 22 deletions(-)

diff --git a/web/src/views/modules/taskReliability/PlanMake.vue b/web/src/views/modules/taskReliability/PlanMake.vue
index d2bab9f..b588cf6 100644
--- a/web/src/views/modules/taskReliability/PlanMake.vue
+++ b/web/src/views/modules/taskReliability/PlanMake.vue
@@ -3,12 +3,12 @@
     <el-table ref="table" :data="tjDataList" height="230px" border>
       <el-table-column align="center" prop="tjlx" label="鏌ヨ绫诲瀷">
       </el-table-column>
-      <el-table-column align="center" prop="specifiedValue" label="宸茬煡瑙勫畾鍊�">
+      <el-table-column align="center" prop="specifiedValue" label="妫�楠屼笂闄�">
         <template v-slot="{ row }">
-          <el-input v-model="row.specifiedValue" style="width:100%" :disabled="row.tjlx==='涓嶉檺瀹氳瀹氬�兼煡璇�'"></el-input>
+          <el-input v-model="row.specifiedValue" style="width:100%" :disabled="row.tjlx==='涓嶉檺瀹氭楠屼笂闄愭煡璇�'"></el-input>
         </template>
       </el-table-column>
-      <el-table-column align="center" prop="minAccepValue" label="鏈�浣庡彲鎺ュ彈鍊�">
+      <el-table-column align="center" prop="minAccepValue" label="妫�楠屼笅闄�">
         <template v-slot="{ row }">
           <el-input v-model="row.minAccepValue" style="width:100%"></el-input>
         </template>
@@ -37,7 +37,7 @@
       </el-table-column>
       <el-table-column align="center" width="100" label="鎿嶄綔">
         <template v-slot="{ row }">
-          <el-button type="primary" @click="check(row)">鏌ヨ</el-button>
+          <el-button type="primary" @click="check(row)">{{row.btnName}}</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -47,7 +47,7 @@
       </el-table-column>
       <el-table-column align="center" prop="totalTestTime" label="鎬昏瘯楠屾椂闂�(h)">
       </el-table-column>
-      <el-table-column v-if="isShow" align="center" prop="number" label="瑙勫畾鍊�">
+      <el-table-column v-if="isShow" align="center" prop="specifiedValue" label="妫�楠屼笂闄�">
       </el-table-column>
       <el-table-column align="center" prop="productionRiskReal" label="鐢熶骇鏂归闄╁疄闄呭��(%)">
       </el-table-column>
@@ -69,6 +69,7 @@
         isShow: false,
         tjDataList: [{
           tjlx: '鎸夐闄╁悕涔夊�兼煡璇�',
+          btnName: '鏌ヨ涓�',
           specifiedValue: null,
           minAccepValue: null,
           productionRisk: null,
@@ -77,19 +78,21 @@
         },
           {
             tjlx: '涓嶉檺瀹氱敓浜ф柟椋庨櫓鏌ヨ',
+            btnName: '鏌ヨ浜�',
             specifiedValue: null,
             minAccepValue: null,
             productionRisk: null,
             userRisk: null,
-            showFailureTime: null
+            showFailureTime: 10
           },
           {
-            tjlx: '涓嶉檺瀹氳瀹氬�兼煡璇�',
+            tjlx: '涓嶉檺瀹氭楠屼笂闄愭煡璇�',
+            btnName: '鏌ヨ涓�',
             specifiedValue: null,
             minAccepValue: null,
             productionRisk: null,
             userRisk: null,
-            showFailureTime: null
+            showFailureTime: 10
           }
         ],
         riskList: [
@@ -132,35 +135,38 @@
     methods: {
       async check(row) {
         let flag = true;
-        if (row.specifiedValue < row.minAccepValue && row.specifiedValue) {
-          this.$tip.alert("鏈�浣庡彲鎺ュ彈鍊间笉鑳藉ぇ浜庤瀹氬��")
-          flag =false
+        console.log(row)
+        if (parseInt(row.specifiedValue) && parseInt(row.specifiedValue) < row.minAccepValue) {
+          this.$tip.alert("妫�楠屼笅闄愪笉鑳藉ぇ浜庢楠屼笂闄�")
+          flag = false
         }
-        if (row.tjlx === "鎸夐闄╁悕涔夊�兼煡璇�"){
-          if (!row.specifiedValue ||!row.minAccepValue || !row.productionRisk||!row.userRisk) {
+        if (row.tjlx === "鎸夐闄╁悕涔夊�兼煡璇�") {
+          if (!row.specifiedValue || !row.minAccepValue || !row.productionRisk || !row.userRisk) {
             this.$tip.alert("鏈夋湭濉啓鐨勫��")
-            flag =false
+            flag = false
           }
         }
-        if (row.tjlx === "涓嶉檺瀹氱敓浜ф柟椋庨櫓鏌ヨ"){
-          if (!row.specifiedValue ||!row.minAccepValue || !row.showFailureTime||!row.userRisk) {
+        if (row.tjlx === "涓嶉檺瀹氱敓浜ф柟椋庨櫓鏌ヨ") {
+          if (!row.specifiedValue || !row.minAccepValue || !row.showFailureTime || !row.userRisk) {
             this.$tip.alert("鏈夋湭濉啓鐨勫��")
-            flag =false
+            flag = false
           }
         }
-        if (row.tjlx === "涓嶉檺瀹氳瀹氬�兼煡璇�"){
-          if (!row.showFailureTime ||!row.minAccepValue || !row.productionRisk||!row.userRisk) {
+        if (row.tjlx === "涓嶉檺瀹氭楠屼笂闄愭煡璇�") {
+          if (!row.showFailureTime || !row.minAccepValue || !row.productionRisk || !row.userRisk) {
             this.$tip.alert("鏈夋湭濉啓鐨勫��")
-            flag =false
+            flag = false
           }
         }
-        if (!flag){
+        if (!flag) {
           return
         }
         let res = await this.$http.get(`/TestScheme/TestScheme/condition`, {params: row})
         this.dataList = res.data
-        if (row.tjlx === "涓嶉檺瀹氳瀹氬�兼煡璇�") {
+        if (row.tjlx === "涓嶉檺瀹氭楠屼笂闄愭煡璇�") {
           this.isShow = true
+        } else {
+          this.isShow = false
         }
       }
     }

--
Gitblit v1.9.1