From 12d84be70c42c5669ffc5db470ff54b71d093728 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期四, 26 九月 2024 10:28:15 +0800
Subject: [PATCH] 1)新增可靠性评定XML生成功能; 2)可靠性仿真评估与可靠性评定的算法包分开成2个包,启动脚本也相应地分开。
---
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..b1ac542 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