jinlin
2024-12-10 1069d8bf6622690e6be091753def954ccf4495ae
web/src/views/modules/taskReliability/ReliabilityWeakness.vue
@@ -48,6 +48,8 @@
</template>
<script>
  import Cookies from "js-cookie";
  export default {
    data() {
      return {
@@ -76,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 = {