| | |
| | | <template> |
| | | <div> |
| | | <el-table ref="table" :data="tjDataList" height="230px"> |
| | | <el-table-column align="center" prop="tjlx" width="100" label="条件类型"> |
| | | <div class="fa-card-b"> |
| | | <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==='条件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> |
| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | </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> |
| | | |
| | | <el-table ref="tableObj" height="570px" :data="dataList"> |
| | | <el-table ref="tableObj" height="570px" :data="dataList" border v-adaptive="{bottomOffset:30}"> |
| | | <el-table-column align="center" prop="acceptNumber" label="故障接受值"> |
| | | </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> |
| | |
| | | dataList: [], |
| | | isShow: false, |
| | | tjDataList: [{ |
| | | tjlx: '条件1', |
| | | tjlx: '按风险名义值查询', |
| | | btnName: '查询一', |
| | | specifiedValue: null, |
| | | minAccepValue: null, |
| | | productionRisk: null, |
| | |
| | | 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: [ |
| | |
| | | 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 |
| | | } |
| | | } |
| | | } |