xyc
2025-02-21 664db98c9e8595ce4dd636a27f480e3a08b81ff5
web/src/views/modules/taskReliability/ReliabilityWeakness.vue
@@ -21,12 +21,12 @@
                  :row-style="rowStyle"
                  border @selection-change="table.selectionChangeHandle">
          <el-table-column prop="name" label="名称"/>
          <el-table-column prop="mtbf" label="MTBF" align="right">
          <el-table-column prop="mtbf" label="MTTF(任务可靠性)" align="right">
            <template slot-scope="scope">
              <span>{{  keepNumber(scope.row.mtbf) }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="mttr" label="MTTR" align="right">
          <el-table-column prop="mttr" label="MTTR(任务可靠性)" align="right">
            <template slot-scope="scope">
              <span>{{  keepNumber(scope.row.mttr) }}</span>
            </template>
@@ -44,10 +44,11 @@
        </el-table>
      </zt-table-wraper>
    </div>
  </div>
</template>
<script>
  import Cookies from "js-cookie";
  export default {
    data() {
@@ -77,13 +78,31 @@
      },
    },
    mounted() {
      this.getProductList()
      this.getProductList(Cookies.get('productId'))
    },
    methods: {
      async getProductList() {
      getPath(){
        if (Cookies.get('productId') != null){
          this.dataForm.fzId = Cookies.get('fzId')
          this.dataForm.productId = Cookies.get('productId')
          this.dataForm.taskModelId = Cookies.get('taskModelId')
          console.log(this.dataForm.productId)
          this.getTaskList()
          this.$nextTick(() => {
            this.onProductSelected({id:this.dataForm.productId})
            this.onTaskSelected({id:Cookies.get('taskModelId')})
            this.onSimulatSelected({id:Cookies.get('fzId')})
          })
        }
      },
      async getProductList(productId) {
        let res = await this.$http.get('/basicInfo/XhProductModel/getTaskProductList')
        this.productList = res.data
        this.onProductSelected(this.productList[0])
        if(productId!=null){
          this.getPath()
        }else{
          this.onProductSelected(this.productList[0])
        }
      },
      async getTaskList() {
        let params = {