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
64d50bfb
Commit
64d50bfb
authored
Mar 23, 2023
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '运维中流程中心组名,流程名称等名称修改,快捷修改'
parent
77b4c432
Pipeline
#69732
passed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
4 deletions
+48
-4
WorkflowHomePage.jsx
...ges/bsmanager/workOrder/workflowEdit/WorkflowHomePage.jsx
+46
-3
WorkflowHomePage.less
...es/bsmanager/workOrder/workflowEdit/WorkflowHomePage.less
+2
-1
No files found.
src/pages/bsmanager/workOrder/workflowEdit/WorkflowHomePage.jsx
View file @
64d50bfb
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
classnames
from
'classnames'
;
import
{
Tabs
,
Input
,
message
,
Modal
,
Button
,
Anchor
,
Tooltip
}
from
'antd'
;
import
{
Tabs
,
Input
,
message
,
Modal
,
Button
,
Anchor
,
Tooltip
,
notification
}
from
'antd'
;
import
{
PlusOutlined
,
EditOutlined
,
...
...
@@ -18,6 +18,7 @@ import FlowGroupModal from './workFlowComponents/FlowGroupModal';
import
Order
from
'./workFlowComponents/Order'
;
import
styles
from
'./WorkflowHomePage.less'
;
import
{
WFGetAllFlow
,
GetFlowNode
,
DeleteFlow
}
from
'@/services/workflow/workflow'
;
import
{
UpdateFlowGroup
}
from
'@/services/workflow/workflow'
;
const
plugins
=
[
ScrollToPlugin
];
const
{
Search
}
=
Input
;
const
{
Link
}
=
Anchor
;
...
...
@@ -289,6 +290,30 @@ const WorkflowHomePage = () => {
console
.
log
(
`.
${
styles
.
flowTable
}
`
);
TweenMax
.
to
(
`.
${
styles
.
flowTable
}
`
,
1
,
{
scrollTo
:
val
.
href
});
};
const
updateFlowGroup
=
(
oldName
,
newName
)
=>
{
if
(
oldName
===
newName
)
{
return
;
}
UpdateFlowGroup
({
oldName
,
newName
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'编辑成功'
,
});
getFlowList
();
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
,
});
}
});
};
return
(
<
div
className=
{
classnames
(
styles
.
pageContent
,
{
...
...
@@ -380,8 +405,26 @@ const WorkflowHomePage = () => {
style=
{
{
display
:
item
.
children
.
length
>
0
?
'flex'
:
'none'
}
}
>
<
div
className=
{
styles
.
line
}
/>
<
div
className=
{
styles
.
name
}
onClick=
{
()
=>
eiditFlowGroup
(
item
,
index
)
}
>
{
item
.
name
}
<
div
className=
{
styles
.
name
}
contenteditable=
"true"
>
<
Input
style=
{
{
width
:
item
.
name
.
length
*
14
+
'px'
,
fontSize
:
'14px'
,
padding
:
'0'
}
}
placeholder=
"请输入分组名称"
onBlur=
{
e
=>
{
updateFlowGroup
(
item
.
name
,
e
.
currentTarget
.
value
);
}
}
bordered=
{
false
}
defaultValue=
{
item
.
name
}
onInput=
{
e
=>
{
e
.
currentTarget
.
style
.
width
=
(
e
.
currentTarget
.
value
.
length
)
*
14
+
"px"
;
}
}
// onPressEnter=
{
e
=
>
{
// console.log(e, '触发咯');
//
}
}
/
>
</
div
>
<
EditOutlined
style=
{
{
marginLeft
:
'5px'
}
}
...
...
src/pages/bsmanager/workOrder/workflowEdit/WorkflowHomePage.less
View file @
64d50bfb
...
...
@@ -203,7 +203,8 @@
.name {
font-size: 14px;
color: #2A4260;
cursor: pointer;
margin: 0 10px;
// cursor: pointer;
}
}
...
...
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