Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
8e3007d0
Commit
8e3007d0
authored
Apr 03, 2025
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '子流程配置新增子流程自动提交配置'
parent
bf722798
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
12 deletions
+43
-12
ConfigSubprocess.jsx
...wChartComponents/nodeModalComponents/ConfigSubprocess.jsx
+43
-12
No files found.
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/ConfigSubprocess.jsx
View file @
8e3007d0
import
React
,
{
useState
,
useEffect
,
forwardRef
,
useImperativeHandle
,
useRef
}
from
'react'
;
import
{
Drawer
,
Form
,
Space
,
Button
,
Input
,
Select
,
Divider
,
Tooltip
,
message
}
from
'antd'
;
import
{
MinusCircleOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
Drawer
,
Form
,
Space
,
Button
,
Input
,
Select
,
Divider
,
Tooltip
,
message
,
Radio
}
from
'antd'
;
import
{
MinusCircleOutlined
,
PlusOutlined
,
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
GetSubEventFlows
,
GetFlowMapFields
}
from
'@/services/workflow/workflow'
;
import
lodash
from
'lodash'
;
...
...
@@ -39,7 +39,7 @@ const ConfigSubprocess = (props, ref) => {
},
[]);
useEffect
(()
=>
{
console
.
log
(
editMsg
,
'editMsg'
);
form
.
setFieldsValue
({
flowKey
:
''
,
MapFields
:
[]
});
form
.
setFieldsValue
({
flowKey
:
''
,
MapFields
:
[]
,
IsHandoverFirstNode
:
1
});
if
(
editMsg
.
SubFlowInfo
)
{
GetFlowMapFields
({
flowID
,
...
...
@@ -55,9 +55,8 @@ const ConfigSubprocess = (props, ref) => {
});
res
.
data
.
SubFlowMapInfo
.
TableFieldNames
=
res
.
data
.
SubFlowMapInfo
.
TableFieldNames
.
map
(
item
=>
({
value
:
`
${
res
.
data
.
SubFlowMapInfo
.
TableName
}
-
${
item
}
-
${
res
.
data
.
SubFlowMapInfo
.
TableType
}
`
,
value
:
`
${
res
.
data
.
SubFlowMapInfo
.
TableName
}
-
${
item
}
-
${
res
.
data
.
SubFlowMapInfo
.
TableType
}
`
,
label
:
item
,
}),
);
...
...
@@ -81,15 +80,16 @@ const ConfigSubprocess = (props, ref) => {
? `
$
{
item
.
SubFlowMapTableName
}
-
$
{
item
.
SubFlowMapFieldName
}
-
$
{
item
.
SubFlowMapTableType
}
`
: '',
})),
IsHandoverFirstNode: editMsg.SubFlowInfo?.IsHandoverFirstNode,
});
}
}, [editMsg]);
const getParmar = () => ({ SubFlowInfo: SubFlowInfo.current });
const changeValue = (changedFields, allFields) => {
console.log(changedFields, 'changedFields');
console.log(changedFields,
allFields,
'changedFields');
let MapFields = [];
if (changedFields[0].name[0] === 'MapFields') {
MapFields = allFields[
1
]?.value?.map(item => ({
MapFields = allFields[
2
]?.value?.map(item => ({
ParentFlowMapTableName: item?.nodeField?.split('-')[0],
ParentFlowMapFieldName: item?.nodeField?.split('-')[1],
SubFlowMapTableType: item?.subNodeField?.split('-')[2],
...
...
@@ -101,6 +101,7 @@ const ConfigSubprocess = (props, ref) => {
SubFlowEventConfigID: Number(allFields[0]?.value?.split('-')[0]),
SubFlowID: Number(allFields[0]?.value?.split('-')[1]),
MapFields: MapFields,
IsHandoverFirstNode: allFields[1]?.value
};
SubFlowInfo.current = msg;
nodeChage('SubFlowInfo', SubFlowInfo.current);
...
...
@@ -122,9 +123,8 @@ const ConfigSubprocess = (props, ref) => {
});
res.data.SubFlowMapInfo.TableFieldNames = res.data.SubFlowMapInfo.TableFieldNames.map(
item => ({
value: `
$
{
res
.
data
.
SubFlowMapInfo
.
TableName
}
-
$
{
item
}
-
$
{
res
.
data
.
SubFlowMapInfo
.
TableType
}
`,
value: `
$
{
res
.
data
.
SubFlowMapInfo
.
TableName
}
-
$
{
item
}
-
$
{
res
.
data
.
SubFlowMapInfo
.
TableType
}
`,
label: item,
}),
);
...
...
@@ -179,11 +179,42 @@ const ConfigSubprocess = (props, ref) => {
))}
</Select>
</Form.Item>
<Form.Item label={(<div>子流程自动提交<Tooltip title='选择"否",系统仅创建子流程表单;选择"是",系统创建子流程表单并自动提交,进入子流程下一节点' >
<QuestionCircleOutlined />
</Tooltip></div>)} name="IsHandoverFirstNode"
labelCol={{
span: 12,
}}
wrapperCol={{
span: 12,
}}>
<Radio.Group
style={{ 'display': 'flex' }}
options={[
{
value: 1,
label: (
<div>是<Tooltip title='子流程发起后,当前流程立即进入下一节点' >
<QuestionCircleOutlined />
</Tooltip></div>
),
},
{
value: 0,
label: (
<div>否<Tooltip title='子流程结束后,当前流程才进入下一节点' >
<QuestionCircleOutlined />
</Tooltip></div>
),
}
]}
/>
</Form.Item>
<Form.Item wrapperCol={{ span: 24 }}>
<Form.List name="MapFields">
{(fields, { add, remove }) => (
<>
<div style={{
marginBottom: '20px'
}}>
<div style={{
marginBottom: '20px'
}}>
<span style={{ fontSize: '12px', color: '#bfbcbc' }}>
当选择子流程后,可配置字段映射规则
</span>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment