Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
57bf62fc
Commit
57bf62fc
authored
Jul 16, 2020
by
sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 日志列表
parent
38509f8b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
center-manage/app/base/system.js
+10
-10
center-manage/app/base/utils/logClient.js
+5
-3
No files found.
center-manage/app/base/system.js
View file @
57bf62fc
...
...
@@ -74,9 +74,8 @@ class System {
},
body
:
data
},
function
(
error
,
response
,
body
)
{
console
.
log
(
response
)
console
.
log
(
error
)
if
(
!
error
)
{
console
.
log
(
body
);
rtn
.
statusCode
=
response
.
statusCode
if
(
body
)
{
rtn
.
data
=
body
...
...
@@ -85,6 +84,7 @@ class System {
}
resv
(
rtn
);
}
else
{
console
.
log
(
error
)
rej
(
error
)
}
});
...
...
@@ -267,9 +267,9 @@ class System {
*/
static
execLogs
(
opTitle
,
params
,
identifyCode
,
resultInfo
,
errorInfo
)
{
var
reqUrl
=
settings
.
logUrl
();
let
isLogData
=
true
if
(
params
.
method
&&
(
params
.
method
.
indexOf
(
"find"
)
>=
0
||
params
.
method
.
indexOf
(
"get"
)
>=
0
))
{
isLogData
=
false
let
isLogData
=
true
if
(
params
.
method
&&
(
params
.
method
.
indexOf
(
"find"
)
>=
0
||
params
.
method
.
indexOf
(
"get"
)
>=
0
))
{
isLogData
=
false
}
var
param
=
{
actionType
:
"produceLogsData"
,
// Y 功能名称
...
...
@@ -278,17 +278,17 @@ class System {
identifyCode
:
identifyCode
||
"brg-center-manage"
,
// Y 操作的业务标识
indexName
:
settings
.
logindex
,
// Y es索引值,同一个项目用一个值
messageBody
:
params
,
//日志的描述信息
resultInfo
:
isLogData
?
resultInfo
:{
status
:
resultInfo
.
status
},
//返回信息
resultInfo
:
isLogData
?
resultInfo
:
{
status
:
resultInfo
.
status
},
//返回信息
errorInfo
:
errorInfo
,
//错误信息
requestId
:
resultInfo
.
requestId
||
""
}
};
console
.
log
(
JSON
.
stringify
(
param
))
let
P
=
new
Promise
((
resv
,
rej
)
=>
{
this
.
postJsonTypeReq
(
reqUrl
,
param
).
then
(
res
=>
{
if
(
res
.
statusCode
==
200
)
{
let
P
=
new
Promise
((
resv
,
rej
)
=>
{
this
.
postJsonTypeReq
(
reqUrl
,
param
).
then
(
res
=>
{
if
(
res
.
statusCode
==
200
)
{
resv
(
res
.
data
)
}
else
{
}
else
{
rej
(
null
)
}
});
...
...
center-manage/app/base/utils/logClient.js
View file @
57bf62fc
...
...
@@ -16,8 +16,9 @@ class LogClient {
async
log
(
pobj
,
req
,
rtninfo
,
errinfo
)
{
rtninfo
.
requestId
=
this
.
getUUID
()
req
.
params
.
param
=
pobj
if
(
!
[
"findSystemMsgCount"
,
"findUnreadCount"
].
includes
(
req
.
params
&&
req
.
params
.
method
||
''
))
{
//第三个字段应该存公司id
system
.
execLogs
(
settings
.
appname
+
"_"
+
req
.
xctx
.
codetitle
,
req
.
params
,
pobj
.
company_id
+
"_"
,
rtninfo
,
errinfo
).
then
(
res
=>
{
system
.
execLogs
(
settings
.
appname
+
"_"
+
req
.
xctx
.
codetitle
,
req
.
params
,
"_"
+
pobj
.
company_id
+
"_"
,
rtninfo
,
errinfo
).
then
(
res
=>
{
if
(
res
&&
res
.
status
==
1
)
{
console
.
log
(
"log.....success"
)
}
else
{
...
...
@@ -27,16 +28,17 @@ class LogClient {
console
.
log
(
"log.....fail"
)
})
}
}
async
logList
(
pobj
)
{
let
{
search
,
pageInfo
,
company_id
}
=
pobj
;
let
query
=
{
indexName
:
settings
.
logindex
,
indexName
:
`logs-sytxpublic-msgq-
${
settings
.
logindex
}
`
,
pageSize
:
pageInfo
.
pageSize
,
currentPage
:
pageInfo
.
pageNo
};
if
(
company_id
&&
company_id
!=
1
)
{
query
.
identifyCode
=
company_id
query
.
identifyCode
=
`_
${
company_id
}
_`
}
if
(
search
.
opTitle
)
{
query
.
opTitle
=
search
.
opTitle
...
...
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