Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haobanDevOps
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
haobanDevOps
Commits
8fe52c29
Commit
8fe52c29
authored
Oct 23, 2019
by
Kyle_Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
767c8380
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
19 deletions
+61
-19
api-retry.vue
src/views/haoban/api-retry.vue
+61
-19
No files found.
src/views/haoban/api-retry.vue
View file @
8fe52c29
...
...
@@ -4,18 +4,17 @@
<header>
<el-date-picker
v-model=
"searchData.date"
type=
"daterange"
type=
"date
time
range"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd
HH:mm:ss
"
style=
"width: 400px"
@
change=
"onSearchDataChange"
>
</el-date-picker>
</header>
<!-- 表格 -->
<el-table
v-loading=
"load"
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
...
...
@@ -24,42 +23,45 @@
label=
"品牌"
show-overflow-tooltip
>
<template
slot-scope=
"
{row}">
{{
row
.
i
}}
{{
row
.
enterpriseName
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"接口名称"
show-overflow-tooltip
>
<
template
slot-scope=
"{row}"
>
{{
row
.
field
Name
||
'--'
}}
{{
row
.
interface
Name
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"重试状态"
show-overflow-tooltip
>
<
template
slot-scope=
"{row}"
>
{{
row
.
triggerCuInfo
||
'--'
}}
{{
row
.
statusDesc
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
<
!-- <
el-table-column
label="失败原因"
show-overflow-tooltip>
<template slot-scope="{row}">
{{ row.targetCuInfo || '--' }}
</template>
</el-table-column>
</el-table-column>
-->
<el-table-column
label=
"时间"
>
label=
"时间"
show-overflow-tooltip
>
<
template
slot-scope=
"{row}"
>
<div
class=
"twoLine"
>
{{
row
.
beforeData
||
'--'
}}
{{
row
.
createTime
|
formatDate
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
label=
"操作"
width=
"90"
fixed=
"right"
>
<
template
slot-scope=
"{row}"
>
<el-button
type=
"text"
@
click
.
prevent
.
native=
"retry(row.
a
)"
>
重试
</el-button>
<el-button
type=
"text"
@
click
.
prevent
.
native=
"retry(row.
id
)"
>
重试
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -79,7 +81,7 @@
</template>
<
script
>
/* eslint-disable */
import
{
getRequest
}
from
'@/api/api'
;
import
{
getRequest
,
putRequest
}
from
'@/api/api'
;
export
default
{
name
:
'api-retry'
,
...
...
@@ -107,7 +109,7 @@ export default {
this
.
getLogsList
();
},
mounted
()
{
//
this.$emit('showTab', 'platform_erp_retry');
this
.
$emit
(
'showTab'
,
'platform_erp_retry'
);
},
methods
:
{
getLogsList
()
{
...
...
@@ -122,11 +124,13 @@ export default {
pageSize
:
pageSize
||
20
};
getRequest
(
'/gic-platform-operation/erp/list'
,
params
).
then
(
res
=>
{
console
.
log
(
res
)
const
{
result
}
=
res
;
if
(
result
)
{
this
.
page
.
totalCount
=
result
.
totalCount
||
0
;
this
.
tableData
=
result
.
result
||
[];
const
{
data
}
=
res
;
console
.
log
(
data
)
if
(
data
.
errorCode
==
0
)
{
this
.
page
.
totalCount
=
data
.
totalCount
;
this
.
tableData
=
data
.
result
||
[];
}
else
{
this
.
$messaage
.
warning
(
data
.
message
)
}
})
},
...
...
@@ -146,6 +150,25 @@ export default {
this
.
page
.
currentPage
=
val
;
this
.
getLogsList
();
},
retry
(
id
)
{
this
.
$confirm
(
'是否确定重试'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
params
=
{
erpErrorId
:
id
}
putRequest
(
`/gic-platform-operation/erp/retry/
${
id
}
`
,
params
).
then
(
res
=>
{
const
{
data
}
=
res
;
this
.
$message
({
type
:
data
.
errorCode
==
0
?
'success'
:
'warn'
,
message
:
data
.
errorCode
==
0
?
'重试成功'
:
'重试失败'
,
});
this
.
getLogsList
();
})
})
}
},
props
:
{
// 左侧菜单选中 id
...
...
@@ -156,15 +179,33 @@ export default {
}
}
},
filters
:
{
formatDate
(
val
)
{
if
(
!
val
)
return
'--'
;
val
=
new
Date
(
val
);
let
y
=
val
.
getFullYear
();
let
m
=
(
val
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
);
let
d
=
val
.
getDate
().
toString
().
padStart
(
2
,
'0'
);
let
h
=
val
.
getHours
().
toString
().
padStart
(
2
,
'0'
);
let
mm
=
val
.
getMinutes
().
toString
().
padStart
(
2
,
'0'
);
let
s
=
val
.
getSeconds
().
toString
().
padStart
(
2
,
'0'
);
return
`
${
y
}
-
${
m
}
-
${
d
}
\xa0\xa0\xa0
${
h
}
:
${
mm
}
:
${
s
}
`
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
#api-retry
{
padding
:
20px
;
background-color
:
#fff
;
header
{
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
20px
;
}
.el-pagination
{
margin-top
:
20px
;
text-align
:
right
;
}
}
</
style
>
\ No newline at end of file
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