Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_vue_manage
Project
Project
Details
Activity
Releases
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
杨硕
91isoft_vue_manage
Commits
3e1dfc0e
Commit
3e1dfc0e
authored
Jan 05, 2021
by
Asjoker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常日志-导出
parent
3bb08ee1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
15 deletions
+27
-15
index.vue
src/views/monitor/errorLog/index.vue
+27
-15
No files found.
src/views/monitor/errorLog/index.vue
View file @
3e1dfc0e
...
...
@@ -336,21 +336,33 @@ export default {
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
Object
.
assign
({},
this
.
queryParams
)
// queryParams.operTime = queryParams.operTime ? this.$parseDate(new Date(queryParams.operTime), 'YYYYMM') : ''
delete
queryParams
.
page
delete
queryParams
.
rows
queryParams
.
ids
=
this
.
ids
.
join
(
','
)
||
null
exportErrLog
(
queryParams
).
then
(
response
=>
{
this
.
download
(
response
.
msg
)
}).
catch
(
function
()
{})
// this.$confirm('是否确认导出所有日志异常数据项?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(function() {
// return exportErrLog(queryParams)
// })
// const queryParams = Object.assign({}, this.queryParams)
// // queryParams.operTime = queryParams.operTime ? this.$parseDate(new Date(queryParams.operTime), 'YYYYMM') : ''
// delete queryParams.page
// delete queryParams.rows
// queryParams.ids = this.ids.join(',') || null
// exportErrLog(queryParams).then(response => {
// this.download(response.msg)
// }).catch(function() {})
const
queryParams
=
this
.
queryParams
this
.
$confirm
(
'是否确认导出所有日志异常数据项?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
exportErrLog
(
queryParams
).
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建下载的链接
downloadElement
.
href
=
href
downloadElement
.
download
=
'异常日志'
+
'.xls'
// 下载后文件名
document
.
body
.
appendChild
(
downloadElement
)
downloadElement
.
click
()
// 点击下载
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
// this.download(response.msg)
})
})
}
}
}
...
...
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