wente
2024-03-14 de1b6284b3cb6349575938782ee34d2ad0349735
web/src/views/modules/taskReliability/RBD-edit-img.vue
@@ -184,7 +184,7 @@
        id: '',
        graph: null,
        globalGridAttr: {
          voteSum: '',
          voteNum: '',
          repairMttcr: '',
          repairMttcrOther: '',
          repairDistribType: '',
@@ -372,15 +372,13 @@
          grid: {
            visible: true,
          },
          onToolItemCreated({tool}) {
            const handle = tool
            const options = handle.options
            if (options && options.index % 2 === 1) {
              tool.setAttrs({fill: 'red'})
            }
          },
          autoResize: true,
          history: true,
            history: {
                enabled: true,
                ignoreAdd: true,
                ignoreRemove: true,
                ignoreChange: true,
            },
          // panning: {
          //   enabled: true,
          // },
@@ -450,6 +448,12 @@
                    }
                  }
                }],
                tools: {
                  name: 'vertices',
                  args: {
                    attrs: { fill: '#666' },
                  },
                },
                zIndex: 0,
              })
            },
@@ -532,7 +536,8 @@
            data: {
              dataId: '',
              nodeType: item.nodeType,
              nodeTypeExt: ''
              nodeTypeExt: '',
              voteNum:''
            },
            attrs: {
              text: {
@@ -564,7 +569,7 @@
            width: 60,
            height: 60,
            data: {
              isRepair: false,
              isRepair: item.isRepair,
              dataId: item.dataId,
              nodeType: item.nodeType,
              nodeTypeExt: item.nodeTypeExt,
@@ -576,9 +581,9 @@
              repairMttcrOther: item.repairMttcrOther,
              taskMtbcf: item.taskMtbcf,
              taskMtbcfOther: item.taskMtbcfOther,
              voteSum: '',
              imgHeight: item.imgHeight,
              imgWidth: item.imgWidth
              imgWidth: item.imgWidth,
              voteNum:'',
            },
            attrs: {
              text: {
@@ -799,28 +804,10 @@
          this.showPorts(ports, false)
        })
        this.graph.on('edge:mouseenter', ({cell, view}) => {
        this.graph.on('edge:mouseenter', ({cell}) => {
          // alert(123)
          cell.addTools([
            {
              name: 'source-arrowhead',
            },
            {
              name: 'target-arrowhead',
              args: {
                attrs: {
                  fill: 'red',
                },
              },
            },
          ])
          cell.addTools(
            [
              {
                name: 'segments',
                args: {snapRadius: 20, attrs: {fill: '#444'}}
              }
            ]
              ['vertices', 'segments']
          )
        })