From 664db98c9e8595ce4dd636a27f480e3a08b81ff5 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期五, 21 二月 2025 11:13:51 +0800
Subject: [PATCH] 新增可忽略的维修时间

---
 web/src/views/modules/taskReliability/TimeDiagram.vue |   28 +++++++++++++++++++++++-----
 1 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/web/src/views/modules/taskReliability/TimeDiagram.vue b/web/src/views/modules/taskReliability/TimeDiagram.vue
index 15c0973..bf021da 100644
--- a/web/src/views/modules/taskReliability/TimeDiagram.vue
+++ b/web/src/views/modules/taskReliability/TimeDiagram.vue
@@ -143,14 +143,14 @@
     },
     created() {
       let scrollView = this.$refs['scrollView']
-      window.addEventListener('scroll', this.handleScroll,true);
+      window.addEventListener('scroll', this.handleScroll,{passive:false});
     },
     destroyed() {
       let scrollView = this.$refs['scrollView']
-      window.removeEventListener('scroll', this.handleScroll,true);
+      window.removeEventListener('scroll', this.handleScroll);
     },
     mounted() {
-      this.getProductList()
+      this.getProductList(Cookies.get('productId'))
       this.init()
       this.$refs.textDiagram.init()
       this.$refs.timeDiagramThumbnail.init()
@@ -169,6 +169,20 @@
         let top = this.graph.getScrollbarPosition().top
         this.$refs.textDiagram.setScroll(top)
         this.$refs.timeDiagramThumbnail.getNodePointX(left,this.bigWidth)
+      },
+      getPath(){
+        if (Cookies.get('productId') != null){
+          this.dataForm.id = Cookies.get('fzId')
+          this.dataForm.productId = Cookies.get('productId')
+          this.dataForm.taskModelId = Cookies.get('taskModelId')
+          console.log(this.dataForm.id)
+          this.getTaskList()
+          this.$nextTick(() => {
+            this.onProductSelected({id:this.dataForm.productId})
+            this.onTaskSelected({id:Cookies.get('taskModelId')})
+            this.onSimulatSelected({id:Cookies.get('fzId')})
+          })
+        }
       },
       init() {
         this.graph = new Graph({
@@ -363,10 +377,14 @@
           style.display = 'none'
         })
       },
-      async getProductList() {
+      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 = {

--
Gitblit v1.9.1