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
4bbd842b
Commit
4bbd842b
authored
Dec 11, 2020
by
陈前坚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 默认错误类型
parent
37bf2d2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
index.js
src/pages/log/omsLog/index.js
+11
-11
index.js
src/pages/log/serviceLog/index.js
+11
-11
No files found.
src/pages/log/omsLog/index.js
View file @
4bbd842b
...
...
@@ -33,7 +33,7 @@ const ServiceLog = () => {
const
[
endTime
,
setEndTime
]
=
useState
(
moment
(
new
Date
(),
'YYYY-MM-DD HH:mm:ss'
),
// 默认值,当前时间
);
const
[
logType
,
setLogType
]
=
useState
(
0
);
// 请求参数,日志类型,默认是正常,0:成功 -1:错误 9999:全部
const
[
logType
,
setLogType
]
=
useState
(
-
1
);
// 请求参数,日志类型,默认是正常,0:成功 -1:错误 9999:全部
const
[
searchWord
,
setSearchWord
]
=
useState
(
''
);
// 关键字
// 计算时间间隔(分钟)
...
...
@@ -154,15 +154,15 @@ const ServiceLog = () => {
post
(
`
${
PUBLISH_SERVICE
}
/LogCenter
${
url
}
`
,
{
// 获取日志表数据时PageSize设置为200,其他接口默认值20
PageSize
:
url
===
'/GetOMSLog'
?
200
:
20
,
//
DateFrom: startTime.format('YYYY-MM-DD HH:mm:ss'),
//
DateTo: endTime.format('YYYY-MM-DD HH:mm:ss'),
//
IP: '',
//
Module: url === '/GetOMSLog' ? searchWord : '',
// LogType: url === '/GetOMSLog' ? +logType : ''
,
//
Description: '',
//
LoginName: '',
//
UserName: '',
//
StaticsType: +timeInterval,
DateFrom
:
startTime
.
format
(
'YYYY-MM-DD HH:mm:ss'
),
DateTo
:
endTime
.
format
(
'YYYY-MM-DD HH:mm:ss'
),
IP
:
''
,
Module
:
url
===
'/GetOMSLog'
?
searchWord
:
''
,
LogType
:
+
logType
,
Description
:
''
,
LoginName
:
''
,
UserName
:
''
,
StaticsType
:
+
timeInterval
,
})
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
@@ -255,7 +255,7 @@ const ServiceLog = () => {
<
Button
onClick
=
{()
=>
setTime
(
24
*
60
,
'3'
)}
>
近
1
天
<
/Button
>
<
Button
onClick
=
{()
=>
setTime
(
24
*
7
*
60
,
'4'
)}
>
近
1
周
<
/Button
>
<
span
style
=
{{
marginLeft
:
'20px'
}}
>
返回状态:
<
/span
>
<
Select
defaultValue
=
"
正常
"
onChange
=
{
changeStatus
}
>
<
Select
defaultValue
=
"
错误
"
onChange
=
{
changeStatus
}
>
<
Option
value
=
"9999"
>
全部
<
/Option
>
<
Option
value
=
"0"
>
正常
<
/Option
>
<
Option
value
=
"-1"
>
错误
<
/Option
>
...
...
src/pages/log/serviceLog/index.js
View file @
4bbd842b
...
...
@@ -33,7 +33,7 @@ const ServiceLog = () => {
const
[
endTime
,
setEndTime
]
=
useState
(
moment
(
new
Date
(),
'YYYY-MM-DD HH:mm:ss'
),
// 默认值,当前时间
);
const
[
logType
,
setLogType
]
=
useState
(
0
);
// 请求参数,日志类型,默认是正常,0:成功 -1:错误 9999:全部
const
[
logType
,
setLogType
]
=
useState
(
-
1
);
// 请求参数,日志类型,默认是正常,0:成功 -1:错误 9999:全部
const
[
searchWord
,
setSearchWord
]
=
useState
(
''
);
// 关键字
// 计算时间间隔(分钟)
...
...
@@ -154,15 +154,15 @@ const ServiceLog = () => {
post
(
`
${
PUBLISH_SERVICE
}
/LogCenter
${
url
}
`
,
{
// 获取日志表数据时PageSize设置为200,其他接口默认值20
PageSize
:
url
===
'/GetOMSLog'
?
200
:
20
,
//
DateFrom: startTime.format('YYYY-MM-DD HH:mm:ss'),
//
DateTo: endTime.format('YYYY-MM-DD HH:mm:ss'),
//
IP: '',
//
Module: url === '/GetOMSLog' ? searchWord : '',
// LogType: url === '/GetOMSLog' ? +logType : ''
,
//
Description: '',
//
LoginName: '',
//
UserName: '',
//
StaticsType: +timeInterval,
DateFrom
:
startTime
.
format
(
'YYYY-MM-DD HH:mm:ss'
),
DateTo
:
endTime
.
format
(
'YYYY-MM-DD HH:mm:ss'
),
IP
:
''
,
Module
:
url
===
'/GetOMSLog'
?
searchWord
:
''
,
LogType
:
+
logType
,
Description
:
''
,
LoginName
:
''
,
UserName
:
''
,
StaticsType
:
+
timeInterval
,
})
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
@@ -255,7 +255,7 @@ const ServiceLog = () => {
<
Button
onClick
=
{()
=>
setTime
(
24
*
60
,
'3'
)}
>
近
1
天
<
/Button
>
<
Button
onClick
=
{()
=>
setTime
(
24
*
7
*
60
,
'4'
)}
>
近
1
周
<
/Button
>
<
span
style
=
{{
marginLeft
:
'20px'
}}
>
返回状态:
<
/span
>
<
Select
defaultValue
=
"
正常
"
onChange
=
{
changeStatus
}
>
<
Select
defaultValue
=
"
错误
"
onChange
=
{
changeStatus
}
>
<
Option
value
=
"9999"
>
全部
<
/Option
>
<
Option
value
=
"0"
>
正常
<
/Option
>
<
Option
value
=
"-1"
>
错误
<
/Option
>
...
...
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