xyc
2024-08-02 ea744c63bf10f14fe5a51addf37083c384093e21
web/src/views/modules/taskReliability/TimeDiagramTemp.vue
@@ -372,20 +372,11 @@
        if (res.data !== null && res.data.content != null) {
          this.dataForm = res.data
          this.diagramJson = JSON.parse(this.dataForm.content)
          // console.log(this.dataForm.content,'this.Diagram content')
          console.log(this.diagramJson, 'this.Diagram json')
          this.graph.fromJSON(this.diagramJson)
          // this.graph.centerContent()
          // this.graph.zoomToFit()
        } else {
          this.dataForm.id = null
          // await this.$alert('该项目还未编制网络图', '提示', {
          //   confirmButtonText: '确定'
          // })
          this.graph.fromJSON(this.emptyJson)
          // this.graph.centerContent()
          // this.graph.zoomToFit()
          // this.graph.freeze()
        }
      },
      init() {
@@ -414,19 +405,6 @@
              })
            }
          },
          // translating: {
          //   restrict(view) {
          //     const cell = view.cell
          //     if (cell.isNode()) {
          //       const parent = cell.getParent()
          //       if (parent) {
          //         return parent.getBBox()
          //       }
          //     }
          //
          //     return null
          //   },
          // },
          onToolItemCreated({tool}) {
            const handle = tool
            const options = handle.options
@@ -492,14 +470,6 @@
                      text: ''
                    }
                  },
                  // position: {
                  //   distance: 0.5,
                  //   angle: 180,
                  //   options: {
                  //     keepGradient: true,
                  //     ensureLegibility: true
                  //   }
                  // }
                }],
                zIndex: 0,
              })