From aac1d5cb50be5071b9c241a9cc0ebbfaae90a21e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 29 六月 2023 01:05:49 +0800 Subject: [PATCH] 2023-06-29 --- src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx | 54 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 47 insertions(+), 7 deletions(-) diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx index 16e067f..e423161 100644 --- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx +++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx @@ -9,7 +9,8 @@ class NodeUpdate extends Component { static propTpyes = { - node: PropTypes.object + node: PropTypes.object, + rolelist: PropTypes.array } state = { @@ -196,14 +197,30 @@ } ] } else if (node.shape === 'mk-text') { - let fontFill = '#262626' - if (node.attrs && node.attrs.text) { - fontFill = node.attrs.text.fill || '#262626' + if (node.attrs && node.attrs.label) { + title = node.attrs.label.text || '' } - let fontSize = 12 - if (node.attrs && node.attrs.text) { - fontSize = node.attrs.text.fontSize || 12 + let fill = '' + + if (node.attrs && node.attrs.body) { + fill = node.attrs.body.fill || '' + } + + let stroke = '' + + if (node.attrs && node.attrs.body) { + stroke = node.attrs.body.stroke || '' + } + + let fontFill = '#262626' + if (node.attrs && node.attrs.label) { + fontFill = node.attrs.label.style.color || '#262626' + } + + let fontSize = 14 + if (node.attrs && node.attrs.label) { + fontSize = node.attrs.label.style.fontSize || 14 } return [ { @@ -215,6 +232,22 @@ field: 'title', label: '鏍囩', initval: title + }, + { + type: 'title', + label: '鏍峰紡' + }, + { + type: 'color', + field: 'fill', + label: '鑳屾櫙', + initval: fill + }, + { + type: 'color', + field: 'stroke', + label: '杈规', + initval: stroke }, { type: 'title', @@ -306,6 +339,13 @@ label: '鏍囪', initval: node.mksign || '' }, + { + type: 'select', + field: 'mkroleid', + label: '瑙掕壊', + initval: node.mkroleid || '', + options: this.props.rolelist.map(item => ({value: item.RoleID, text: item.RoleName})) + }, ] } } -- Gitblit v1.8.0