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
53c15328
Commit
53c15328
authored
Dec 23, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改流程图超出样式
parent
dc0d645a
Pipeline
#65843
passed with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
9 deletions
+52
-9
WorkflowHomePage.jsx
...ges/bsmanager/workOrder/workflowEdit/WorkflowHomePage.jsx
+1
-0
WorkflowHomePage.less
...es/bsmanager/workOrder/workflowEdit/WorkflowHomePage.less
+3
-4
FlowBoard.jsx
...r/workOrder/workflowEdit/workFlowComponents/FlowBoard.jsx
+2
-1
FlowBoard.less
.../workOrder/workflowEdit/workFlowComponents/FlowBoard.less
+2
-2
FlowChartRt.jsx
...workOrder/workflowEdit/workFlowComponents/FlowChartRt.jsx
+44
-2
No files found.
src/pages/bsmanager/workOrder/workflowEdit/WorkflowHomePage.jsx
View file @
53c15328
...
@@ -152,6 +152,7 @@ const WorkflowHomePage = () => {
...
@@ -152,6 +152,7 @@ const WorkflowHomePage = () => {
flowID
:
val
.
FlowID
,
flowID
:
val
.
FlowID
,
chartLoading
:
false
,
chartLoading
:
false
,
activeKey
:
activeKey
.
current
,
activeKey
:
activeKey
.
current
,
flowTree
:
flowList
,
},
},
});
});
}
else
{
}
else
{
...
...
src/pages/bsmanager/workOrder/workflowEdit/WorkflowHomePage.less
View file @
53c15328
...
@@ -209,11 +209,10 @@
...
@@ -209,11 +209,10 @@
align-items: center;
align-items: center;
width: 100%;
width: 100%;
margin-top: 1px;
margin-top: 1px;
height: 130px;
overflow: hidden;
img {
img {
width: 230px;
width: 320px;
// height: 125px;
// height: 350px;
}
}
}
}
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowBoard.jsx
View file @
53c15328
...
@@ -8,7 +8,7 @@ const FlowBoard = () => {
...
@@ -8,7 +8,7 @@ const FlowBoard = () => {
const
history
=
useHistory
();
const
history
=
useHistory
();
useEffect
(()
=>
{},
[]);
useEffect
(()
=>
{},
[]);
const
{
flowData
,
flowID
,
chartLoading
,
activeKey
}
=
history
.
location
.
state
;
const
{
flowData
,
flowID
,
chartLoading
,
activeKey
,
flowTree
}
=
history
.
location
.
state
;
return
(
return
(
<
div
className=
{
styles
.
flowChartContainer
}
>
<
div
className=
{
styles
.
flowChartContainer
}
>
<
FlowChart
<
FlowChart
...
@@ -16,6 +16,7 @@ const FlowBoard = () => {
...
@@ -16,6 +16,7 @@ const FlowBoard = () => {
flowID=
{
flowID
}
flowID=
{
flowID
}
chartLoading=
{
chartLoading
}
chartLoading=
{
chartLoading
}
activeKey=
{
activeKey
}
activeKey=
{
activeKey
}
flowTree=
{
flowTree
}
/>
/>
</
div
>
</
div
>
);
);
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowBoard.less
View file @
53c15328
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
.myOverviewDiv {
.myOverviewDiv {
position: absolute;
position: absolute;
height: 1
50
px;
height: 1
42
px;
width:
300
px;
width:
234
px;
left: 0;
left: 0;
bottom: 0;
bottom: 0;
background-color: #ccc;
background-color: #ccc;
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowChartRt.jsx
View file @
53c15328
/* eslint-disable global-require */
/* eslint-disable global-require */
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
useHistory
,
Prompt
}
from
'react-router-dom'
;
import
{
useHistory
,
Prompt
}
from
'react-router-dom'
;
import
{
Button
,
Modal
,
notification
,
Spin
,
Tooltip
,
message
}
from
'antd'
;
import
{
Button
,
Modal
,
notification
,
Spin
,
Empty
,
Tooltip
,
message
,
TreeSelect
}
from
'antd'
;
import
lodash
from
'lodash'
;
import
lodash
from
'lodash'
;
import
{
import
{
SaveNodeChange
,
SaveNodeChange
,
...
@@ -28,6 +28,7 @@ import gatewayParallel from '@/assets/images/workFlow/gatewayParallel.svg';
...
@@ -28,6 +28,7 @@ import gatewayParallel from '@/assets/images/workFlow/gatewayParallel.svg';
import
gatewayJoin
from
'@/assets/images/workFlow/gatewayJoin.svg'
;
import
gatewayJoin
from
'@/assets/images/workFlow/gatewayJoin.svg'
;
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
const
{
TreeNode
}
=
TreeSelect
;
let
diagram
=
null
;
let
diagram
=
null
;
let
myPaletteNode
=
null
;
let
myPaletteNode
=
null
;
let
myPaletteGateway
=
null
;
let
myPaletteGateway
=
null
;
...
@@ -36,7 +37,7 @@ let myOverview = null;
...
@@ -36,7 +37,7 @@ let myOverview = null;
const
FlowChart
=
props
=>
{
const
FlowChart
=
props
=>
{
const
history
=
useHistory
();
const
history
=
useHistory
();
const
{
flowData
,
flowID
,
chartLoading
,
msg
,
treeVisible
,
activeKey
}
=
props
;
const
{
flowData
,
flowID
,
chartLoading
,
msg
,
treeVisible
,
activeKey
,
flowTree
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
lineVisible
,
setLineVisible
]
=
useState
(
false
);
const
[
lineVisible
,
setLineVisible
]
=
useState
(
false
);
const
[
editMsg
,
setEditMsg
]
=
useState
({});
// 编辑节点的信息
const
[
editMsg
,
setEditMsg
]
=
useState
({});
// 编辑节点的信息
...
@@ -56,6 +57,7 @@ const FlowChart = props => {
...
@@ -56,6 +57,7 @@ const FlowChart = props => {
});
// 组件内得流程图数据
});
// 组件内得流程图数据
const
[
showLeaveTip
,
setShowLeaveTip
]
=
useState
(
false
);
// 离开路由是否又提醒
const
[
showLeaveTip
,
setShowLeaveTip
]
=
useState
(
false
);
// 离开路由是否又提醒
const
[
buttonLoading
,
setButtonLoading
]
=
useState
();
// 发布按钮保存loading
const
[
buttonLoading
,
setButtonLoading
]
=
useState
();
// 发布按钮保存loading
const
[
selectValue
,
setSelectValue
]
=
useState
();
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
currentNode
=
useRef
();
const
currentNode
=
useRef
();
const
afterNodes
=
useRef
(
new
Map
([]));
// 当前节点后所有节点
const
afterNodes
=
useRef
(
new
Map
([]));
// 当前节点后所有节点
...
@@ -1228,7 +1230,28 @@ const FlowChart = props => {
...
@@ -1228,7 +1230,28 @@ const FlowChart = props => {
}
}
});
});
};
};
const
treeChange
=
newValue
=>
{
setSelectValue
(
newValue
);
};
const
mapAppTree
=
org
=>
{
const
haveChildren
=
Array
.
isArray
(
org
.
children
)
&&
org
.
children
.
length
>
0
;
let
value
;
let
text
;
if
(
org
.
name
)
{
value
=
org
.
name
;
text
=
org
.
name
;
}
if
(
org
.
Code
)
{
value
=
org
.
Code
;
text
=
org
.
FlowName
;
}
return
(
<
TreeNode
value=
{
value
}
title=
{
text
}
key=
{
value
}
disabled=
{
org
.
name
}
>
{
haveChildren
?
org
.
children
.
map
(
item
=>
mapAppTree
(
item
))
:
null
}
</
TreeNode
>
);
};
return
(
return
(
<>
<>
<
Prompt
message=
"编辑的内容还未保存,确定要离开该页面吗?"
when=
{
showLeaveTip
}
/>
<
Prompt
message=
"编辑的内容还未保存,确定要离开该页面吗?"
when=
{
showLeaveTip
}
/>
...
@@ -1253,6 +1276,25 @@ const FlowChart = props => {
...
@@ -1253,6 +1276,25 @@ const FlowChart = props => {
{
/* <Button type="link" onClick={() => copyNode()}>
{
/* <Button type="link" onClick={() => copyNode()}>
复制
复制
</Button> */
}
</Button> */
}
{
/* <Button type="link" onClick={() => copyNode()}>
<TreeSelect
value={selectValue}
showSearch
style={{ width: '200px' }}
treeNodeFilterProp="title"
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
placeholder="请选择流程"
treeDefaultExpandAll
onChange={treeChange}
treeIcon
>
{flowTree ? (
flowTree.map(item => mapAppTree(item))
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
)}
</TreeSelect>
</Button> */
}
<
Button
<
Button
onClick=
{
()
=>
onClick=
{
()
=>
history
.
push
({
history
.
push
({
...
...
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