| | |
| | | }, |
| | | 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() |
| | |
| | | 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({ |
| | |
| | | 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 = { |