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
e9e4fe05
Commit
e9e4fe05
authored
Sep 08, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '优化空数据展示'
parent
81646cbf
Pipeline
#78678
passed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
index.jsx
src/pages/homePage/index.jsx
+16
-4
No files found.
src/pages/homePage/index.jsx
View file @
e9e4fe05
...
@@ -93,6 +93,7 @@ const HomePage = () => {
...
@@ -93,6 +93,7 @@ const HomePage = () => {
moment
(
new
Date
(),
'YYYY-MM-DD HH:mm:ss'
),
moment
(
new
Date
(),
'YYYY-MM-DD HH:mm:ss'
),
]);
]);
const
[
activeKey
,
setActiveKey
]
=
useState
(
'1'
);
const
[
activeKey
,
setActiveKey
]
=
useState
(
'1'
);
const
[
title
,
setTitle
]
=
useState
(
'最近10条异常API'
);
useEffect
(()
=>
{
useEffect
(()
=>
{
setLoading
(
true
);
setLoading
(
true
);
...
@@ -102,6 +103,7 @@ const HomePage = () => {
...
@@ -102,6 +103,7 @@ const HomePage = () => {
}
else
{
}
else
{
setShow
(
false
);
setShow
(
false
);
}
}
getDataBaseConfig
();
getOMSDashboard
();
getOMSDashboard
();
newGetSolution
();
newGetSolution
();
getSiteCode
();
getSiteCode
();
...
@@ -112,7 +114,6 @@ const HomePage = () => {
...
@@ -112,7 +114,6 @@ const HomePage = () => {
onGetProduct
();
onGetProduct
();
getLimits
();
getLimits
();
getMapLayer
();
getMapLayer
();
getDataBaseConfig
();
getApiCount
();
getApiCount
();
},
[
flag
]);
},
[
flag
]);
...
@@ -277,7 +278,7 @@ const HomePage = () => {
...
@@ -277,7 +278,7 @@ const HomePage = () => {
});
});
}
}
}
else
{
}
else
{
setState
(
''
);
setState
(
false
);
notification
.
error
({
notification
.
error
({
message
:
'提示'
,
message
:
'提示'
,
duration
:
15
,
duration
:
15
,
...
@@ -820,6 +821,13 @@ const HomePage = () => {
...
@@ -820,6 +821,13 @@ const HomePage = () => {
const
onChange
=
e
=>
{
const
onChange
=
e
=>
{
setActiveKey
(
e
);
setActiveKey
(
e
);
if
(
e
===
'1'
)
{
setTitle
(
'最近10条异常API'
);
}
else
if
(
e
===
'2'
)
{
setTitle
(
'耗时排名前10的API'
);
}
else
if
(
e
===
'3'
)
{
setTitle
(
'调用频次前10的API'
);
}
};
};
return
(
return
(
...
@@ -1065,6 +1073,7 @@ const HomePage = () => {
...
@@ -1065,6 +1073,7 @@ const HomePage = () => {
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
content
}
>
<
div
className=
{
styles
.
content
}
>
{
!
dashboardData
.
用户登录统计
&&
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
}
<
ReactEcharts
style=
{
{
width
:
'100%'
,
height
:
'100%'
}
}
option=
{
option
}
/>
<
ReactEcharts
style=
{
{
width
:
'100%'
,
height
:
'100%'
}
}
option=
{
option
}
/>
</
div
>
</
div
>
</
Spin
>
</
Spin
>
...
@@ -1121,6 +1130,9 @@ const HomePage = () => {
...
@@ -1121,6 +1130,9 @@ const HomePage = () => {
</
div
>
</
div
>
</
div
>
</
div
>
)
}
)
}
{
!
dashboardData
.
异常登录
&&
state
===
''
&&
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
{
dashboardData
.
异常登录
===
0
&&
dashboardData
.
消息数量
===
0
&&
state
&&
(
{
dashboardData
.
异常登录
===
0
&&
dashboardData
.
消息数量
===
0
&&
state
&&
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
)
}
...
@@ -1134,7 +1146,7 @@ const HomePage = () => {
...
@@ -1134,7 +1146,7 @@ const HomePage = () => {
<
div
className=
{
styles
.
title
}
>
<
div
className=
{
styles
.
title
}
>
<
div
className=
{
styles
.
titleLeft
}
>
<
div
className=
{
styles
.
titleLeft
}
>
<
div
className=
{
styles
.
icon
}
/>
<
div
className=
{
styles
.
icon
}
/>
<
span
className=
{
styles
.
text
}
>
API调用日志(
最近10条
)
</
span
>
<
span
className=
{
styles
.
text
}
>
API调用日志(
{
title
}
)
</
span
>
</
div
>
</
div
>
<
div
className=
{
styles
.
linkIcon
}
>
<
div
className=
{
styles
.
linkIcon
}
>
<
span
onClick=
{
()
=>
toLogCenter
()
}
style=
{
{
cursor
:
'pointer'
}
}
>
<
span
onClick=
{
()
=>
toLogCenter
()
}
style=
{
{
cursor
:
'pointer'
}
}
>
...
@@ -1149,7 +1161,7 @@ const HomePage = () => {
...
@@ -1149,7 +1161,7 @@ const HomePage = () => {
tabPosition=
"left"
tabPosition=
"left"
style=
{
{
height
:
'100%'
}
}
style=
{
{
height
:
'100%'
}
}
>
>
<
TabPane
tab=
"
错误
API"
key=
"1"
>
<
TabPane
tab=
"
异常
API"
key=
"1"
>
<
Table
<
Table
size=
"small"
size=
"small"
bordered
bordered
...
...
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