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
08d43429
Commit
08d43429
authored
Nov 20, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '日志管理优化'
parent
8af63e57
Pipeline
#81950
passed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
11 deletions
+20
-11
index.jsx
src/pages/homePage/index.jsx
+1
-1
index.jsx
src/pages/log/logCenter/index.jsx
+19
-10
No files found.
src/pages/homePage/index.jsx
View file @
08d43429
...
...
@@ -351,7 +351,7 @@ const HomePage = () => {
dateFrom
:
allTime
[
0
].
format
(
'YYYY-MM-DD HH:mm:ss'
),
dateTo
:
allTime
[
1
].
format
(
'YYYY-MM-DD HH:mm:ss'
),
info
:
''
,
isSuccess
:
false
,
state
:
-
2
,
}).
then
(
res
=>
{
setLoadingApi
(
false
);
if
(
res
.
code
===
0
)
{
...
...
src/pages/log/logCenter/index.jsx
View file @
08d43429
...
...
@@ -88,17 +88,23 @@ const LogCenter = () => {
let
successState
=
''
;
if
(
success
)
{
if
(
success
===
'成功'
)
{
successState
=
true
;
successState
=
0
;
}
else
if
(
success
===
'警告'
)
{
successState
=
-
1
;
}
else
if
(
success
===
'失败'
)
{
successState
=
false
;
successState
=
-
2
;
}
else
if
(
success
===
'全部'
)
{
successState
=
null
;
}
}
else
{
if
(
selectState
===
'全部'
)
{
successState
=
''
;
successState
=
null
;
}
else
if
(
selectState
===
'成功'
)
{
successState
=
true
;
successState
=
0
;
}
else
if
(
selectState
===
'警告'
)
{
successState
=
-
1
;
}
else
if
(
selectState
===
'失败'
)
{
successState
=
false
;
successState
=
-
2
;
}
}
let
newUrl
=
url
?
url
:
requestUrl
;
...
...
@@ -114,7 +120,7 @@ const LogCenter = () => {
info
:
flag
?
''
:
newUrl
,
methodType
:
0
,
sortFieldsAndDirection
:
`
${
filterSorter
.
current
}
${
timeSorter
.
current
}
`
,
isSuccess
:
successState
,
state
:
successState
,
}).
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
...
...
@@ -252,15 +258,17 @@ const LogCenter = () => {
},
{
title
:
'调用结果'
,
dataIndex
:
'
errorMsg
'
,
key
:
'
errorMsg
'
,
dataIndex
:
'
code
'
,
key
:
'
code
'
,
width
:
100
,
align
:
'center'
,
render
:
record
=>
{
if
(
record
)
{
if
(
record
===
-
2
)
{
return
<
span
style=
{
{
color
:
'red'
,
fontWeight
:
'bold'
}
}
>
失败
</
span
>;
}
else
{
}
else
if
(
record
===
0
)
{
return
<
span
style=
{
{
color
:
'#6ecd3d'
,
fontWeight
:
'bold'
}
}
>
成功
</
span
>;
}
else
if
(
record
===
-
1
)
{
return
<
span
style=
{
{
color
:
'#efd341'
,
fontWeight
:
'bold'
}
}
>
警告
</
span
>;
}
},
},
...
...
@@ -751,6 +759,7 @@ const LogCenter = () => {
<
Select
style=
{
{
width
:
'180px'
}
}
value=
{
selectState
}
onSelect=
{
e
=>
changeSuccess
(
e
)
}
>
<
Option
value=
"全部"
>
全部
</
Option
>
<
Option
value=
"成功"
>
成功
</
Option
>
<
Option
value=
"警告"
>
警告
</
Option
>
<
Option
value=
"失败"
>
失败
</
Option
>
</
Select
>
<
span
style=
{
{
marginLeft
:
'20px'
}
}
>
接口名称:
</
span
>
...
...
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