From f078c137d61270d243cd8e03077fa9cf000e276b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 14 八月 2023 14:02:40 +0800 Subject: [PATCH] 2023-08-14 --- src/tabviews/custom/components/chart/antv-X6/index.jsx | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/tabviews/custom/components/chart/antv-X6/index.jsx b/src/tabviews/custom/components/chart/antv-X6/index.jsx index f27ca16..781b43c 100644 --- a/src/tabviews/custom/components/chart/antv-X6/index.jsx +++ b/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} /> -- Gitblit v1.8.0