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
5be2d7ef
Commit
5be2d7ef
authored
Apr 09, 2025
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '事件删除交互改为弹窗'
parent
b0c35094
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
incident.jsx
src/pages/bsmanager/workOrder/incident/incident.jsx
+21
-6
No files found.
src/pages/bsmanager/workOrder/incident/incident.jsx
View file @
5be2d7ef
...
...
@@ -40,6 +40,7 @@ import {
FormOutlined
,
ImportOutlined
,
ExportOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
GetCM_Event_LoadEventTable
,
...
...
@@ -63,6 +64,7 @@ import ViewModal from './ViewModal';
import
{
LoadEventFields
}
from
'@/services/tablemanager/tablemanager'
;
const
{
Search
}
=
Input
;
const
{
confirm
}
=
Modal
;
const
incident
=
()
=>
{
const
history
=
useHistory
();
...
...
@@ -97,6 +99,7 @@ const incident = () => {
const
[
addForm
]
=
Form
.
useForm
();
const
[
file
,
setFile
]
=
useState
();
// 上传文件信息
const
[
caseCount
,
setCaseCount
]
=
useState
(
0
);
// 事件相关工单数量
const
[
showDeletePop
,
setShowDeletePop
]
=
useState
(
false
);
// 事件删除提示展示
const
columns
=
[
{
...
...
@@ -244,26 +247,38 @@ const incident = () => {
/>
</
Tooltip
>
<
Tooltip
title=
"删除事件"
>
<
Popconfirm
// visible={showDeletePop}
{
/* <Popconfirm
placement="bottomRight"
title={<p>{caseCount?`此事件有${caseCount}条工单,删除事件后会删除对应的工单,请谨慎操作。`: `即将删除事件类型表,是否确认删除?`}</p>}
okText="确认"
cancelText="取消"
onConfirm={() => deleteEventType(record)}
>
<
DeleteOutlined
onClick=
{
()
=>
getCaseCount
(
record
.
name
)
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Popconfirm
>
>
*/
}
<
DeleteOutlined
onClick=
{
()
=>
getCaseCount
(
record
.
name
,
record
)
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
{
/* </Popconfirm> */
}
</
Tooltip
>
</
Space
>
),
},
];
const
getCaseCount
=
async
(
eventName
)
=>
{
const
getCaseCount
=
async
(
eventName
,
record
)
=>
{
let
res
=
await
GetFlowCaseNum
({
eventName
})
if
(
res
.
code
===
0
)
{
setCaseCount
(
res
.
data
)
confirm
({
title
:
'确定要删除当前事件吗?'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
<
p
>
{
res
.
data
?
`此事件有${res.data}条工单,删除事件后会删除对应的工单,请谨慎操作。`
:
`即将删除事件类型表,是否确认删除?`
}
</
p
>,
okText
:
'是'
,
okType
:
'danger'
,
cancelText
:
'否'
,
onOk
()
{
deleteEventType
(
record
)
},
onCancel
()
{
},
});
}
}
...
...
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