From 9ccfd089b6cac9f8ba0cb7cadfee01857a715f0d Mon Sep 17 00:00:00 2001 From: xyc <jc_xiong@hotmail.com> Date: 星期六, 12 十月 2024 10:34:43 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- 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