jinlin
2024-07-26 bcd950216084a6208de0c636f9430e47601acc01
web/src/views/modules/taskReliability/SimulatAssess.vue
@@ -27,15 +27,13 @@
        <div>
          <el-col :span="4">
            <div style="margin-right: 5px;height: calc(88vh - 100px)" v-if="isSelect">
              <product-model-tree :isShow="false"></product-model-tree>
              <product-model-tree @on-selected="onTreeSelected" showXdy="false"
                                  ref="ProductModelTree" :isShow="false"/>
            </div>
          </el-col>
          <el-col :span="20">
            <div style="margin-top: 20px">
              <div style="margin-left: 400px" v-if="isShow">
                <el-tag type="info" effect="dark" style="font-size: 20px">MTBF:{{MTBF}}</el-tag>
                <el-tag type="info" effect="dark" style="margin-left: 50px;font-size: 20px">MTTR:{{MTTR}}</el-tag>
              </div>
              <div>
                <SimulatCurve ref="SimulatCurve"></SimulatCurve>
              </div>
@@ -68,9 +66,9 @@
          id: '',
          pid: '',
          productId: '',
          showProductId: '',
          taskModelId: '',
          dataType: '',
          isRepair: '',
          dataType: 'fz',
          samplPeriod: '',
          simulatFrequency: '',
          simulatTime: ''
@@ -83,7 +81,7 @@
    watch: {
      percentage() {
        if (this.percentage === 100) {
          this.$refs.SimulatCurve.initEcharts(this.dataForm.id,this.dataForm.taskModelId, this.dataForm.samplPeriod);
          this.$refs.SimulatCurve.initEcharts(this.dataForm);
        }
      }
    },
@@ -94,6 +92,11 @@
    },
    methods: {
      onTreeSelected(data) {
        console.log(data, 'onProductSelected')
        this.dataForm.showProductId = data.id
        this.$refs.SimulatCurve.getProductEcharts(this.dataForm);
      },
      // 获取信息
      onProductSelected(data) {
        this.isSelect = true
@@ -131,6 +134,7 @@
          )
        } else {
          clearInterval(this.timers)
          this.percentage = 0
        }
      },
      async analyze() {