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
ae17a709
Commit
ae17a709
authored
Sep 10, 2021
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复流程节点测试问题
parent
d83c62d1
Pipeline
#34268
passed with stages
in 27 minutes 34 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
131 additions
and
109 deletions
+131
-109
ProcessConfig.jsx
...enter/bsmanager/workFlow/flowComponents/ProcessConfig.jsx
+7
-2
flowNode.jsx
...s/platformCenter/bsmanager/workFlow/flowNode/flowNode.jsx
+49
-41
NodeEdit.jsx
...manager/workFlow/flowNode/flowNodeComponents/NodeEdit.jsx
+75
-66
No files found.
src/pages/platformCenter/bsmanager/workFlow/flowComponents/ProcessConfig.jsx
View file @
ae17a709
...
...
@@ -78,8 +78,13 @@ const ProcessConfig = props => {
<
Radio
value=
{
3
}
>
重新处理事件
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
"前端页面"
name=
"webPage"
>
<
Select
placeholder=
"请选择前端页面"
>
<
Form
.
Item
label=
"前端样式"
name=
"webPage"
initialValue=
"多表显示"
rules=
{
[{
required
:
true
,
message
:
'请选择前端样式'
}]
}
>
<
Select
placeholder=
"请选择前端样式"
>
<
Option
value=
"多表显示"
>
多表显示
</
Option
>
<
Option
value=
"多表在办显示"
>
多表在办显示
</
Option
>
<
Option
value=
"表堆叠显示"
>
表堆叠显示
</
Option
>
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNode.jsx
View file @
ae17a709
...
...
@@ -20,6 +20,7 @@ import {
ControlOutlined
,
DeleteOutlined
,
}
from
'@ant-design/icons'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
NodeEdit
from
'./flowNodeComponents/NodeEdit'
;
import
AuxiliaryView
from
'./flowNodeComponents/AuxiliaryView'
;
import
styles
from
'./flowNode.less'
;
...
...
@@ -143,9 +144,14 @@ const FlowNode = () => {
dataIndex
:
'extendTableName'
,
width
:
150
,
align
:
'center'
,
ellipsis
:
{
showTitle
:
true
,
},
render
:
text
=>
(
// eslint-disable-next-line react/no-danger
<
span
dangerouslySetInnerHTML=
{
{
__html
:
text
}
}
/>
<
Tooltip
placement=
"topLeft"
title=
{
text
}
>
{
/* eslint-disable-next-line react/no-danger */
}
<
span
dangerouslySetInnerHTML=
{
{
__html
:
text
}
}
/>
</
Tooltip
>
),
},
{
...
...
@@ -367,48 +373,50 @@ const FlowNode = () => {
];
return
(
<
div
className=
{
styles
.
NodeContent
}
>
<
div
className=
{
styles
.
header
}
>
<
div
className=
{
styles
.
nodeTitle
}
>
{
flowName
}
-流程节点配置
</
div
>
<
div
className=
{
styles
.
buttonBox
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
backFlow
()
}
>
<
RollbackOutlined
/>
返回
</
Button
>
<
PageContainer
>
<
div
className=
{
styles
.
NodeContent
}
>
<
div
className=
{
styles
.
header
}
>
<
div
className=
{
styles
.
nodeTitle
}
>
{
flowName
}
-流程节点配置
</
div
>
<
div
className=
{
styles
.
buttonBox
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
backFlow
()
}
>
<
RollbackOutlined
/>
返回
</
Button
>
</
div
>
</
div
>
</
div
>
<
Spin
spinning=
{
loading
}
tip=
"loading..."
>
<
Table
dataSource=
{
tableData
}
columns=
{
columns
}
rowKey=
{
record
=>
record
.
GroupName
}
size=
"small"
showHeader
scroll=
{
{
y
:
'100vh-150px'
}
}
expandable=
{
{
expandedRowRender
:
record
=>
createUnfoldTable
(
record
.
Items
),
<
Spin
spinning=
{
loading
}
tip=
"loading..."
>
<
Table
dataSource=
{
tableData
}
columns=
{
columns
}
rowKey=
{
record
=>
record
.
GroupName
}
size=
"small"
showHeader
scroll=
{
{
y
:
'100vh-150px'
}
}
expandable=
{
{
expandedRowRender
:
record
=>
createUnfoldTable
(
record
.
Items
),
}
}
expandedRowKeys=
{
expandedRowKeys
}
onExpand=
{
onUnfold
}
pagination=
{
false
}
/>
</
Spin
>
<
NodeEdit
visible=
{
visible
.
nodeEdit
}
msg=
{
nodeMsg
}
handleCancel=
{
()
=>
showModal
(
'nodeEdit'
,
false
)
}
onSubumit=
{
()
=>
{
showModal
(
'nodeEdit'
,
false
);
getData
();
}
}
expandedRowKeys=
{
expandedRowKeys
}
onExpand=
{
onUnfold
}
pagination=
{
false
}
/>
</
Spin
>
<
NodeEdit
visible=
{
visible
.
nodeEdit
}
msg=
{
nodeMsg
}
handleCancel=
{
()
=>
showModal
(
'nodeEdit'
,
false
)
}
onSubumit=
{
()
=>
{
showModal
(
'nodeEdit'
,
false
);
getData
();
}
}
/>
<
AuxiliaryView
visible=
{
visible
.
auxiliaryView
}
msg=
{
nodeMsg
}
handleCancel=
{
()
=>
showModal
(
'auxiliaryView'
,
false
)
}
/>
</
div
>
<
AuxiliaryView
visible=
{
visible
.
auxiliaryView
}
msg=
{
nodeMsg
}
handleCancel=
{
()
=>
showModal
(
'auxiliaryView'
,
false
)
}
/>
</
div
>
</
PageContainer
>
);
};
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNodeComponents/NodeEdit.jsx
View file @
ae17a709
...
...
@@ -17,6 +17,7 @@ import {
notification
,
Checkbox
,
Button
,
message
,
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
Fieldselection
from
'./nodeEditComponents/Fieldselection'
;
...
...
@@ -89,69 +90,72 @@ const NodeEdit = props => {
};
// 字段配置
const
deployField
=
val
=>
{
let
value
=
form
.
getFieldsValue
(
true
);
if
(
!
value
.
TableName
)
{
message
.
error
(
'请先选择表'
);
return
;
}
setFieldName
(
val
);
form
.
validateFields
().
then
(
value
=>
{
loadEventFields
({
eventTableName
:
value
.
TableName
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
let
defaultCheckedList
=
value
[
val
].
split
(
','
);
// 处理数据为树形结构
let
keylist
=
new
Set
();
let
list
=
new
Map
();
res
.
data
.
forEach
(
item
=>
{
keylist
.
add
(
item
.
group
);
if
(
keylist
.
has
(
item
.
group
))
{
let
listItem
=
list
.
get
(
item
.
group
);
// 存入check得选项,是否全选,选中的选项'
if
(
listItem
)
{
list
.
set
(
item
.
group
,
{
plainOptions
:
[...
listItem
.
plainOptions
,
item
.
fieldName
],
defaultCheckedList
:
[],
});
}
else
{
list
.
set
(
item
.
group
,
{
plainOptions
:
[
item
.
fieldName
],
defaultCheckedList
:
[],
});
}
loadEventFields
({
eventTableName
:
value
.
TableName
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
let
defaultCheckedList
=
value
[
val
]
?
value
[
val
].
split
(
','
)
:
[];
// 处理数据为树形结构
let
keylist
=
new
Set
();
let
list
=
new
Map
();
res
.
data
.
forEach
(
item
=>
{
keylist
.
add
(
item
.
group
);
if
(
keylist
.
has
(
item
.
group
))
{
let
listItem
=
list
.
get
(
item
.
group
);
// 存入check得选项,是否全选,选中的选项'
if
(
listItem
)
{
list
.
set
(
item
.
group
,
{
plainOptions
:
[...
listItem
.
plainOptions
,
item
.
fieldName
],
defaultCheckedList
:
[],
});
}
else
{
list
.
set
(
item
.
group
,
{
plainOptions
:
[
item
.
fieldName
],
defaultCheckedList
:
[],
});
}
});
let
checkList
=
[...
list
];
defaultCheckedList
.
forEach
(
item
=>
{
checkList
.
forEach
(
element
=>
{
// 当前得模块是否有当前字段
let
indeterminate
=
element
[
1
].
plainOptions
.
some
(
checkName
=>
checkName
===
item
,
);
// 处理已选中的字段
if
(
indeterminate
)
{
element
[
1
].
defaultCheckedList
.
push
(
item
);
}
if
(
element
[
1
].
defaultCheckedList
.
length
>
0
&&
element
[
1
].
defaultCheckedList
.
length
<
element
[
1
].
plainOptions
.
length
)
{
element
[
1
].
indeterminate
=
true
;
}
else
{
element
[
1
].
indeterminate
=
false
;
}
// 处理是否全选字段
if
(
element
[
1
].
defaultCheckedList
.
length
===
}
});
let
checkList
=
[...
list
];
defaultCheckedList
.
forEach
(
item
=>
{
checkList
.
forEach
(
element
=>
{
// 当前得模块是否有当前字段
let
indeterminate
=
element
[
1
].
plainOptions
.
some
(
checkName
=>
checkName
===
item
,
);
// 处理已选中的字段
if
(
indeterminate
)
{
element
[
1
].
defaultCheckedList
.
push
(
item
);
}
if
(
element
[
1
].
defaultCheckedList
.
length
>
0
&&
element
[
1
].
defaultCheckedList
.
length
<
element
[
1
].
plainOptions
.
length
)
{
element
[
1
].
checkAll
=
true
;
}
else
{
element
[
1
].
checkAll
=
false
;
}
});
)
{
element
[
1
].
indeterminate
=
true
;
}
else
{
element
[
1
].
indeterminate
=
false
;
}
// 处理是否全选字段
if
(
element
[
1
].
defaultCheckedList
.
length
===
element
[
1
].
plainOptions
.
length
)
{
element
[
1
].
checkAll
=
true
;
}
else
{
element
[
1
].
checkAll
=
false
;
}
});
setFieldList
(
checkList
);
setTimeout
(()
=>
{
setShowField
(
true
);
},
0
);
}
}
);
}
);
setFieldList
(
checkList
);
setTimeout
(()
=>
{
setShowField
(
true
);
}
,
0
);
}
});
};
// 字段修改后回调函数
...
...
@@ -161,7 +165,7 @@ const NodeEdit = props => {
if
(
index
===
val
.
length
-
1
)
{
Fields
=
`
${
Fields
+
item
}
`
;
}
else
{
Fields
=
`
${
Fields
+
item
}
,
`
;
Fields
=
`
${
Fields
+
item
}
,
`
;
}
});
let
obj
=
{};
...
...
@@ -262,6 +266,7 @@ const NodeEdit = props => {
<
Form
.
Item
name=
"RollbackNode"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
initialValue=
"(上一节点)"
>
<
Select
disabled=
{
isDisable
}
placeholder=
"请选择回退节点"
>
{
backNodes
.
map
(
item
=>
(
...
...
@@ -285,20 +290,24 @@ const NodeEdit = props => {
<
Option
value=
"移交上报人"
>
移交上报人
</
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
"平级移交"
name=
"Transferable"
>
<
Form
.
Item
label=
"平级移交"
name=
"Transferable"
initialValue=
"0"
>
<
Radio
.
Group
>
<
Radio
value=
"0"
>
否
</
Radio
>
<
Radio
value=
"1"
>
是
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
"显示事件信息"
name=
"EventsInformation"
>
<
Form
.
Item
label=
"显示事件信息"
name=
"EventsInformation"
initialValue=
"0"
>
<
Radio
.
Group
>
<
Radio
value=
"0"
>
否
</
Radio
>
<
Radio
value=
"1"
>
是
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
"工单主表"
name=
"TableName"
>
<
Select
>
<
Select
placeholder=
"请选择工单主表"
>
{
eventTable
.
map
(
item
=>
(
<
Option
value=
{
item
.
Name
}
key=
{
item
.
ID
}
>
{
item
.
Name
}
...
...
@@ -309,7 +318,7 @@ const NodeEdit = props => {
<
Form
.
Item
label=
"字段编辑"
>
<
div
className=
{
styles
.
filedListItem
}
>
<
Form
.
Item
name=
"Fields"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Input
placeholder=
"请选编辑字段"
/>
<
Input
placeholder=
"请选编辑字段"
allowClear
/>
</
Form
.
Item
>
<
Button
type=
"dashed"
...
...
@@ -326,7 +335,7 @@ const NodeEdit = props => {
name=
"SeeFields"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Input
placeholder=
"请选择查看字段"
/>
<
Input
placeholder=
"请选择查看字段"
allowClear
/>
</
Form
.
Item
>
<
Button
type=
"dashed"
...
...
@@ -347,7 +356,7 @@ const NodeEdit = props => {
<
Input
placeholder=
"请配置视图参数"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"反馈类型"
name=
"FeedbackName"
>
<
Select
placeholder=
"请选择反馈类型"
>
<
Select
placeholder=
"请选择反馈类型"
allowClear
>
{
backType
.
map
(
item
=>
(
<
Option
value=
{
item
.
value
}
key=
{
item
.
value
}
>
{
item
.
value
}
...
...
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