Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liwei13251026170
/
yh-other
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
8e43dad8
authored
2023-08-12 19:33:24 +0800
by
lixue
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: add msg
1 parent
480fe21d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
src/pages/Risk/index.jsx
src/services/risk.js
src/pages/Risk/index.jsx
View file @
8e43dad
...
...
@@ -5,11 +5,11 @@
*/
import
React
,
{
useEffect
}
from
'react'
;
import
{
connect
}
from
'umi'
;
import
{
Table
,
Tooltip
}
from
'antd'
;
import
{
Table
,
Tooltip
,
Modal
}
from
'antd'
;
import
{
paginations
,
mapStatus
,
mapRiskType
,
mapRiskSourceType
}
from
'@/constants'
;
import
{
StyledEllipsisWrap
}
from
'@/components/style'
;
import
moment
from
'moment'
;
import
{
httpGetMessage
}
from
'@/services/risk'
/* DataTable */
const
DataTable
=
props
=>
{
const
{
loading
,
dataRisk
}
=
props
;
...
...
@@ -125,6 +125,26 @@ const DataTable = props => {
return
`总共
${
total
}
条数据`
;
},
};
useEffect
(()
=>
{
getMsg
()
},[])
function
getMsg
()
{
httpGetMessage
().
then
(
res
=>
{
if
(
res
.
data
)
{
Modal
.
info
({
title
:
res
?.
data
[
0
].
companyName
,
content
:
(
<
div
>
<
p
>
riskName:
{
res
?.
data
[
0
].
riskName
}
</
p
>
<
p
>
riskKeyword:
{
res
?.
data
[
0
].
riskKeyword
}
</
p
>
</
div
>
)
})
}
})
}
return
(
<
Table
rowKey=
"id"
...
...
src/services/risk.js
View file @
8e43dad
...
...
@@ -23,3 +23,7 @@ export async function getEventRiskList(params) {
if
(
!
serialNumber
)
return
false
;
return
request
(
`/event/sn/
${
serialNumber
}
`
,
{
params
,
methods
:
'GET'
});
}
export
async
function
httpGetMessage
(
params
=
{})
{
return
request
(
'/event/sn/WX20230811225612cph'
,
{
params
,
methods
:
'GET'
});
}
\ No newline at end of file
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment