king
2023-08-14 f078c137d61270d243cd8e03077fa9cf000e276b
src/tabviews/custom/components/chart/antv-X6/index.jsx
@@ -386,6 +386,7 @@
    node: null,
    loading: false,
    status: 0,
    flowname: '',
    orgs: []
  }
@@ -620,6 +621,7 @@
      this.setState({
        status: item.status || 0,
        flowname: item.works_flow_name,
        loading: false
      })
@@ -995,11 +997,21 @@
      
      this.setState({node: null})
    })
    graph.on('edge:connected', ({ isNew, edge }) => {
      if (!isNew) return
      let target = edge.getTargetCell()
      let mkdata = target ? target.prop('mkdata') : null
      if (mkdata) {
        edge.prop('mkdata', {status: mkdata.status, statusName: mkdata.statusName})
      }
    })
    
    const r1 = graph.createNode({
      shape: 'mk-rect',
      mknode: 'start',
      mkdata: {status: 0, statusName: '开始'},
      mkdata: {status: 0, statusName: '未提交'},
      attrs: {
        body: {
          rx: 20,
@@ -1097,7 +1109,7 @@
    const r8 = graph.createNode({
      shape: 'mk-rect',
      mknode: 'end',
      mkdata: {status: '', statusName: '结束'},
      mkdata: {status: 888, statusName: '已完成'},
      attrs: {
        body: {
          rx: 20,
@@ -1967,7 +1979,7 @@
  }
  render() {
    const { loading, config, node, orgs, status } = this.state
    const { loading, config, node, orgs, status, flowname } = this.state
    let style = {...config.style}
@@ -2033,6 +2045,7 @@
              <QuestionCircleOutlined />
            </Tooltip>
          </div>
          <div className="flow-name">{flowname}</div>
          <div className="right-tool">
            <Tooltip title="启用/停用">
              <Switch size="small" style={{marginRight: '10px'}} checked={status === 10} onChange={this.changeStatus} />