From 26ebef24f023a80f5be5ff27c93585f70688f6ee Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期二, 22 十月 2024 14:45:39 +0800
Subject: [PATCH] 关于修改可靠性产品重复

---
 web/src/views/modules/taskReliability/PlanMake.vue |   63 +++++++++++++++++--------------
 1 files changed, 34 insertions(+), 29 deletions(-)

diff --git a/web/src/views/modules/taskReliability/PlanMake.vue b/web/src/views/modules/taskReliability/PlanMake.vue
index 6f8912f..b588cf6 100644
--- a/web/src/views/modules/taskReliability/PlanMake.vue
+++ b/web/src/views/modules/taskReliability/PlanMake.vue
@@ -1,14 +1,14 @@
 <template>
   <div class="fa-card-b">
     <el-table ref="table" :data="tjDataList" height="230px" border>
-      <el-table-column align="center" prop="tjlx" width="100" label="鏉′欢绫诲瀷">
+      <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==='鏉′欢3'"></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>
@@ -16,7 +16,7 @@
       <el-table-column align="center" prop="productionRisk" label="鐢熶骇鏂归闄�">
         <template v-slot="{ row }">
           <el-select style="width: 100%" :value-key="key" v-model="row.productionRisk"
-                     @change="onChange()" :disabled="row.tjlx==='鏉′欢2'">
+                     :disabled="row.tjlx==='涓嶉檺瀹氱敓浜ф柟椋庨櫓鏌ヨ'">
             <el-option v-for="item in riskList" :key="item.value" :label="item.label"
                        :value="item.value"></el-option>
           </el-select>
@@ -24,8 +24,7 @@
       </el-table-column>
       <el-table-column align="center" prop="userRisk" label="浣跨敤鏂归闄�">
         <template v-slot="{ row }">
-          <el-select style="width: 100%" :value-key="key" v-model="row.userRisk"
-                     @change="onChange()">
+          <el-select style="width: 100%" :value-key="key" v-model="row.userRisk">
             <el-option v-for="item in riskList" :key="item.value" :label="item.label"
                        :value="item.value"></el-option>
           </el-select>
@@ -33,12 +32,12 @@
       </el-table-column>
       <el-table-column align="center" prop="showFailureTime" label="鏁呴殰鎺ュ彈鍊兼渶澶ф樉绀�">
         <template v-slot="{ row }">
-          <el-input v-model="row.showFailureTime" style="width:100%" :disabled="row.tjlx==='鏉′欢1'"></el-input>
+          <el-input v-model="row.showFailureTime" style="width:100%" :disabled="row.tjlx==='鎸夐闄╁悕涔夊�兼煡璇�'"></el-input>
         </template>
       </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>
@@ -48,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,7 +68,8 @@
         dataList: [],
         isShow: false,
         tjDataList: [{
-          tjlx: '鏉′欢1',
+          tjlx: '鎸夐闄╁悕涔夊�兼煡璇�',
+          btnName: '鏌ヨ涓�',
           specifiedValue: null,
           minAccepValue: null,
           productionRisk: null,
@@ -77,20 +77,22 @@
           showFailureTime: null
         },
           {
-            tjlx: '鏉′欢2',
+            tjlx: '涓嶉檺瀹氱敓浜ф柟椋庨櫓鏌ヨ',
+            btnName: '鏌ヨ浜�',
             specifiedValue: null,
             minAccepValue: null,
             productionRisk: null,
             userRisk: null,
-            showFailureTime: null
+            showFailureTime: 10
           },
           {
-            tjlx: '鏉′欢3',
+            tjlx: '涓嶉檺瀹氭楠屼笂闄愭煡璇�',
+            btnName: '鏌ヨ涓�',
             specifiedValue: null,
             minAccepValue: null,
             productionRisk: null,
             userRisk: null,
-            showFailureTime: null
+            showFailureTime: 10
           }
         ],
         riskList: [
@@ -133,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 === "鏉′欢1"){
-          if (!row.specifiedValue ||!row.minAccepValue || !row.productionRisk||!userRisk) {
+        if (row.tjlx === "鎸夐闄╁悕涔夊�兼煡璇�") {
+          if (!row.specifiedValue || !row.minAccepValue || !row.productionRisk || !row.userRisk) {
             this.$tip.alert("鏈夋湭濉啓鐨勫��")
-            flag =false
+            flag = false
           }
         }
-        if (row.tjlx === "鏉′欢2"){
-          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 === "鏉′欢3"){
-          if (!row.showFailureTime ||!row.minAccepValue || !row.productionRisk||!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 === "鏉′欢3") {
+        if (row.tjlx === "涓嶉檺瀹氭楠屼笂闄愭煡璇�") {
           this.isShow = true
+        } else {
+          this.isShow = false
         }
       }
     }

--
Gitblit v1.9.1