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
66c1197b
Commit
66c1197b
authored
Oct 25, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '事件添加编辑业务类型名称功能'
parent
ee75a64b
Pipeline
#62445
failed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
0 deletions
+79
-0
incident.jsx
src/pages/bsmanager/workOrder/incident/incident.jsx
+59
-0
incident.less
src/pages/bsmanager/workOrder/incident/incident.less
+16
-0
api.js
src/services/standingBook/api.js
+4
-0
No files found.
src/pages/bsmanager/workOrder/incident/incident.jsx
View file @
66c1197b
...
...
@@ -20,6 +20,9 @@ import {
notification
,
Tree
,
Button
,
Modal
,
Input
,
message
,
}
from
'antd'
;
import
{
...
...
@@ -32,12 +35,14 @@ import {
OrderedListOutlined
,
ApartmentOutlined
,
DesktopOutlined
,
FormOutlined
,
}
from
'@ant-design/icons'
;
import
{
GetCM_Event_LoadEventTable
,
CM_Event_RemoveEventTable
,
CM_Event_ReOrder
,
GetCM_Event_LoadEventTypeTable
,
CM_Event_EditBusinessType
}
from
'@/services/standingBook/api'
;
import
classnames
from
'classnames'
;
import
styles
from
'./incident.less'
;
...
...
@@ -71,6 +76,8 @@ const incident = () => {
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
const
[
hoverItemIndex
,
setHoverItemIndex
]
=
useState
(
0
);
// hover流程索引
const
[
keepIdValue
,
setKeepIdValue
]
=
useState
([]);
const
[
editBusinessVisible
,
setEditBusinessVisible
]
=
useState
(
false
);
const
[
addForm
]
=
Form
.
useForm
();
const
columns
=
[
{
...
...
@@ -469,7 +476,42 @@ const incident = () => {
});
}
});
};
const
editBusiness
=
()
=>
{
setEditBusinessVisible
(
true
)
addForm
.
setFieldsValue
({
newBusinessType
:
pickItem
})
}
const
editOk
=
()
=>
{
let
aa
=
addForm
.
getFieldsValue
().
newBusinessType
;
console
.
log
(
aa
);
CM_Event_EditBusinessType
({
oldBusinessType
:
pickItem
,
newBusinessType
:
aa
}).
then
(
res
=>
{
if
(
res
.
code
===
0
){
setEditBusinessVisible
(
false
);
setFlag
(
flag
+
1
);
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'编辑成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
'编辑失败'
,
});
}
}).
catch
(
err
=>
{
message
.
error
(
err
);
});
}
return
(
<
div
className=
{
styles
.
incidentContainer
}
>
<
div
className=
{
styles
.
contentContainers
}
>
...
...
@@ -569,6 +611,8 @@ const incident = () => {
})
}
>
<
div
style=
{
{
height
:
'50px'
}
}
>
<
span
className=
{
styles
.
titleName
}
>
【
{
pickItem
}
】
</
span
>
<
span
><
Tooltip
title=
"编辑业务类型名称"
><
FormOutlined
className=
{
styles
.
iconSize
}
onClick=
{
editBusiness
}
/></
Tooltip
></
span
>
<
span
style=
{
{
float
:
'right'
,
marginRight
:
'10px'
}
}
>
<
Button
icon=
{
<
OrderedListOutlined
className=
{
styles
.
icon
}
/>
}
...
...
@@ -629,6 +673,21 @@ const incident = () => {
callBackSubmit=
{
onOK
}
keepIdValue=
{
keepIdValue
}
/>
<
Modal
title=
'编辑业务类型名称'
visible=
{
editBusinessVisible
}
onCancel=
{
()
=>
setEditBusinessVisible
(
false
)
}
onOk=
{
()
=>
editOk
()
}
>
<
Form
form=
{
addForm
}
labelCol=
{
{
span
:
3
}
}
>
<
Form
.
Item
name=
"newBusinessType"
label=
"名称"
rules=
{
[{
required
:
true
,
message
:
'不能为空'
}]
}
>
<
Input
placeholder=
"请输入名称"
style=
{
{
width
:
'95%'
}
}
allowClear
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"newBusinessType"
label=
"名称"
style=
{
{
display
:
'none'
}
}
>
<
Input
placeholder=
"请输入名称"
style=
{
{
width
:
'95%'
}
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
</
div
>
</
div
>
);
...
...
src/pages/bsmanager/workOrder/incident/incident.less
View file @
66c1197b
...
...
@@ -404,6 +404,22 @@
color: rgba(0, 0, 0, 0.85);
}
}
.iconSize{
font-size: 18px;
color: #1890FF;
svg{
margin-top:-7px;
}
}
.titleName{
font-size: 18px;
color: rgba(0, 114, 255, 1);
font-weight: bold;
display: inline-block;
margin-left: 10px;
line-height: 50px;
}
// .panda-pro-pages-platform-center-bsmanager-work-order-incident-filed_listItem {
// display: flex;
...
...
src/services/standingBook/api.js
View file @
66c1197b
...
...
@@ -47,6 +47,10 @@ export const CM_Event_LoadDepartmentAndRoles = query =>
export
const
CM_Event_EditEventTable
=
data
=>
post
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/CM_Event_EditEventTable`
,
data
);
// 修改事件业务类型
export
const
CM_Event_EditBusinessType
=
data
=>
post
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/CM_Event_EditBusinessType`
,
data
);
// 加载事件权限部门角色
export
const
GetCM_Event_QueryEventType
=
query
=>
get
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/GetCM_Event_QueryEventType`
,
query
);
...
...
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