2.4dev 修复一些错误和新增日志一键清空,异常日志导出接口 (#56)
* 1.新增日志信息一键清空按钮 * 1.新增日志信息一键清空按钮 * 1.修复新增用户,编辑用户,角色在一次失败了,roles 传入后台格式错误问题
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
|
||||
<script>
|
||||
import crud from '@/mixins/crud'
|
||||
import { getErrDetail } from '@/api/monitor/log'
|
||||
import { getErrDetail, delAllError } from '@/api/monitor/log'
|
||||
import Search from './search'
|
||||
export default {
|
||||
name: 'ErrorLog',
|
||||
@@ -77,34 +77,59 @@ export default {
|
||||
getErrDetail(id).then(res => {
|
||||
this.errorInfo = res.exception
|
||||
})
|
||||
},
|
||||
confirmDelAll() {
|
||||
this.delAllLoading = true
|
||||
delAllError().then(res => {
|
||||
this.delAllLoading = false
|
||||
this.$children.forEach(children => {
|
||||
if (children.$refs.del_all) {
|
||||
children.$refs.del_all.doClose()
|
||||
}
|
||||
})
|
||||
this.dleChangePage()
|
||||
this.init()
|
||||
this.$notify({
|
||||
title: '删除成功',
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
}).catch(err => {
|
||||
this.delAllLoading = false
|
||||
this.$children.forEach(children => {
|
||||
if (children.$refs.del_all) {
|
||||
children.$refs.del_all.doClose()
|
||||
}
|
||||
})
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.demo-table-expand {
|
||||
font-size: 0;
|
||||
}
|
||||
.demo-table-expand label {
|
||||
width: 70px;
|
||||
color: #99a9bf;
|
||||
}
|
||||
.demo-table-expand .el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.demo-table-expand .el-form-item__content {
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
/deep/ .el-dialog__body{
|
||||
padding: 0 20px 10px 20px !important;
|
||||
}
|
||||
.java.hljs{
|
||||
color: #444;
|
||||
background: #ffffff !important;
|
||||
height: 630px !important;
|
||||
}
|
||||
.demo-table-expand {
|
||||
font-size: 0;
|
||||
}
|
||||
.demo-table-expand label {
|
||||
width: 70px;
|
||||
color: #99a9bf;
|
||||
}
|
||||
.demo-table-expand .el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.demo-table-expand .el-form-item__content {
|
||||
font-size: 12px;
|
||||
}
|
||||
/deep/ .el-dialog__body {
|
||||
padding: 0 20px 10px 20px !important;
|
||||
}
|
||||
.java.hljs {
|
||||
color: #444;
|
||||
background: #ffffff !important;
|
||||
height: 630px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
<script>
|
||||
import crud from '@/mixins/crud'
|
||||
import Search from './search'
|
||||
import { delAllInfo } from '@/api/monitor/log'
|
||||
export default {
|
||||
name: 'Log',
|
||||
components: { Search },
|
||||
@@ -63,26 +64,51 @@ export default {
|
||||
this.url = 'api/logs'
|
||||
this.params['logType'] = 'INFO'
|
||||
return true
|
||||
},
|
||||
confirmDelAll() {
|
||||
this.delAllLoading = true
|
||||
delAllInfo().then(res => {
|
||||
this.delAllLoading = false
|
||||
this.$children.forEach(children => {
|
||||
if (children.$refs.del_all) {
|
||||
children.$refs.del_all.doClose()
|
||||
}
|
||||
})
|
||||
this.dleChangePage()
|
||||
this.init()
|
||||
this.$notify({
|
||||
title: '删除成功',
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
}).catch(err => {
|
||||
this.delAllLoading = false
|
||||
this.$children.forEach(children => {
|
||||
if (children.$refs.del_all) {
|
||||
children.$refs.del_all.doClose()
|
||||
}
|
||||
})
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.demo-table-expand {
|
||||
font-size: 0;
|
||||
}
|
||||
.demo-table-expand label {
|
||||
width: 70px;
|
||||
color: #99a9bf;
|
||||
}
|
||||
.demo-table-expand .el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.demo-table-expand .el-form-item__content {
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
.demo-table-expand {
|
||||
font-size: 0;
|
||||
}
|
||||
.demo-table-expand label {
|
||||
width: 70px;
|
||||
color: #99a9bf;
|
||||
}
|
||||
.demo-table-expand .el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.demo-table-expand .el-form-item__content {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
<template>
|
||||
<div class="head-container">
|
||||
<el-input v-model="query.blurry" clearable size="small" placeholder="请输入你要搜索的内容" style="width: 200px;" class="filter-item" />
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的内容"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
:default-time="['00:00:00','23:59:59']"
|
||||
@@ -12,7 +19,13 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
/>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="$parent.toQuery">搜索</el-button>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-search"
|
||||
@click="$parent.toQuery"
|
||||
>搜索</el-button>
|
||||
<!-- 导出 -->
|
||||
<el-button
|
||||
:loading="$parent.downloadLoading"
|
||||
@@ -22,6 +35,27 @@
|
||||
icon="el-icon-download"
|
||||
@click="$parent.downloadMethod"
|
||||
>导出</el-button>
|
||||
<el-button
|
||||
slot="reference"
|
||||
v-popover:del_all
|
||||
:loading="$parent.delAllLoading"
|
||||
type="danger"
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
icon="el-icon-delete"
|
||||
>清空数据</el-button>
|
||||
<el-popover ref="del_all" placement="top" width="200" trigger="click">
|
||||
<p>确定删除所有数据吗?</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="$refs['del_all'].doClose()">取消</el-button>
|
||||
<el-button
|
||||
:loading="$parent.delAllLoading"
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="$parent.confirmDelAll"
|
||||
>确定</el-button>
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user