xyc
2025-02-21 664db98c9e8595ce4dd636a27f480e3a08b81ff5
web/src/views/modules/baseReliability/ParamDataBasic.vue
@@ -29,22 +29,33 @@
                      border @selection-change="table.selectionChangeHandle">
              <!--<el-table-column type="selection" width="40"/>-->
              <el-table-column prop="name" label="名称"/>
              <el-table-column prop="basicMtbfRegulate" label="MTBF" align="right">
              <el-table-column prop="basicUnitNum" label="单元数量" align="center" width="100"/>
              <el-table-column prop="basicMtbfRegulate" label="MTBF" align="right" width="120">
                <template slot-scope="scope">
                  <span>{{  keepNumber(scope.row.basicMtbfRegulate) }}</span>
                </template>
              </el-table-column>
              <el-table-column prop="repairMttcr" label="MTTR" align="right">
              <el-table-column prop="repairMttcr" label="MTTR" align="right" width="120">
                <template slot-scope="scope">
                  <span>{{  keepNumber(scope.row.repairMttcr) }}</span>
                </template>
              </el-table-column>
              <el-table-column prop="basicMtbfOperatingRatio" label="运行比" align="right">
              <el-table-column prop="basicMtbfRegulSuccRate" label="成功率" align="right" width="100">
                <template slot-scope="scope">
                  <span>{{keepNumber(scope.row.basicMtbfRegulSuccRate) }}</span>
                </template>
              </el-table-column>
              <el-table-column prop="basicRunsNum" label="运行次数" align="right" width="100">
                <template slot-scope="scope">
                  <span>{{scope.row.basicRunsNum}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="basicMtbfOperatingRatio" label="运行比" align="right" width="100">
                <template slot-scope="scope">
                  <span>{{keepNumber(scope.row.basicMtbfOperatingRatio) }}</span>
                </template>
              </el-table-column>
              <el-table-column prop="ai" label="可用度" align="right">
              <el-table-column prop="ai" label="可用度" align="right" width="100">
                <template slot-scope="scope">
                  <span>{{keepNumber(scope.row.ai)}}</span>
                </template>
@@ -68,7 +79,9 @@
          basicMtbfRegulate: '',
          repairMttcr: '',
          basicMtbfOperatingRatio: '',
          ai: ''
          ai: '',
          basicMtbfRegulSuccRate:'',
          basicRunsNum:''
        },
        defultKey: []
      }
@@ -79,11 +92,18 @@
    computed: {
      keepNumber() { //过滤器保留4为小数
        return function (val) {      // 对计算属性进行传参
          const numM = Number(val).toFixed(5);
          return numM.substring(0, numM.length - 1);
          let numM = 0.0
          if (val){
            numM = Number(val).toFixed(4);
            numM.substring(0, numM.length - 1)
          }
          return numM;
        }
      },
    },
    mounted() {
      this.$refs.modelTree.getProductList()
    },
    methods: {
      onProductSelected(data) {
        this.defultKey = []