wente
2024-10-12 7bfdb4f9eba9bd46dc0d3c194078910f7b411e15
缩略时序图
2个文件已修改
16 ■■■■ 已修改文件
web/src/views/modules/taskReliability/TimeDiagram.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/timeDiagramThumbnail.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/TimeDiagram.vue
@@ -638,11 +638,6 @@
        }
        console.log(res.data)
      },
      graphRightTranslate(){
        this.left+=200
        this.graph.scrollToPoint(this.left, null,  { animation: { duration: 400 }})
        // this.graph.setScrollbarPosition(100, null, { animation: { duration: 200, easing: 'linear' }})
      },
      getPoint(x,smallWidth){
        let pointX = Number((x * (this.bigWidth / smallWidth )).toFixed(0))
        // console.log(pointX)
web/src/views/modules/taskReliability/timeDiagramThumbnail.vue
@@ -265,7 +265,7 @@
          true,
        )
        this.graph.on('node:moved', ({ e, x, y, node, view }) => {
        this.graph.on('node:moving', ({ e, x, y, node, view }) => {
         this.$emit('getPoint',x,this.smallWidth)
        })
      },
@@ -275,8 +275,9 @@
        this.smallWidth = this.graph.getContentBBox().width
        const nodes = this.graph.getNodes()
        for (const otherNode of nodes) {
          if (otherNode.parent){
          if (otherNode.hasParent()){
            this.targetNode = otherNode
            console.log(this.targetNode,'targetNode')
          }
        }
        // console.log(this.graph.getContentBBox().width,'DiagramJson11')
@@ -284,7 +285,11 @@
      },
      getNodePointX(x,bigWidth){
        let pointX = Number((x / ( bigWidth /this.smallWidth)).toFixed(0))
        this.targetNode.position(pointX, this.targetNode.position().y)
        if(this.targetNode){
          this.targetNode.position(pointX, this.targetNode.position().y)
          return false
        }
      },
      // setScroll(top){
      //   this.graph.setScrollbarPosition(null, top)