jinlin
2024-08-12 658f06778c80893e8618d62357cebf49aea9346e
web/src/views/modules/taskReliability/PlanMake.vue
@@ -1,11 +1,11 @@
<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="已知规定值">
        <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="最低可接受值">
@@ -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,7 +32,7 @@
      </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="操作">
@@ -69,7 +68,7 @@
        dataList: [],
        isShow: false,
        tjDataList: [{
          tjlx: '条件1',
          tjlx: '按风险名义值查询',
          specifiedValue: null,
          minAccepValue: null,
          productionRisk: null,
@@ -77,7 +76,7 @@
          showFailureTime: null
        },
          {
            tjlx: '条件2',
            tjlx: '不限定生产方风险查询',
            specifiedValue: null,
            minAccepValue: null,
            productionRisk: null,
@@ -85,7 +84,7 @@
            showFailureTime: null
          },
          {
            tjlx: '条件3',
            tjlx: '不限定规定值查询',
            specifiedValue: null,
            minAccepValue: null,
            productionRisk: null,
@@ -137,20 +136,20 @@
          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
          }
        }
        if (row.tjlx === "条件2"){
        if (row.tjlx === "不限定生产方风险查询"){
          if (!row.specifiedValue ||!row.minAccepValue || !row.showFailureTime||!row.userRisk) {
            this.$tip.alert("有未填写的值")
            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
          }
@@ -160,7 +159,7 @@
        }
        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
        }
      }