|
|
@ -10,7 +10,7 @@ |
|
|
|
icon="el-icon-delete" |
|
|
|
size="mini" |
|
|
|
:loading="crud.delAllLoading" |
|
|
|
@click="confirmDelAll()" |
|
|
|
@click="delVisible=true" |
|
|
|
> |
|
|
|
清空 |
|
|
|
</el-button> |
|
|
@ -50,6 +50,17 @@ |
|
|
|
</el-dialog> |
|
|
|
<!--分页组件--> |
|
|
|
<pagination /> |
|
|
|
<!-- 清空 --> |
|
|
|
<el-dialog :visible.sync="delVisible" title="确认清空"> |
|
|
|
<span class="dialog-right-top" /> |
|
|
|
<span class="dialog-left-bottom" /> |
|
|
|
<div class="setting-dialog"> |
|
|
|
<p class="delMsg" style="padding-top:20px">确认清空所有操作日志吗?</p> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="confirmDelAll">确定</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -70,7 +81,7 @@ export default { |
|
|
|
mixins: [presenter()], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
errorInfo: '', dialog: false |
|
|
|
errorInfo: '', dialog: false, delVisible: false |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -90,23 +101,24 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
confirmDelAll() { |
|
|
|
this.$confirm(`确认清空所有异常日志吗?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.crud.delAllLoading = true |
|
|
|
delAllError().then(res => { |
|
|
|
this.crud.delAllLoading = false |
|
|
|
this.crud.dleChangePage(1) |
|
|
|
this.crud.delSuccessNotify() |
|
|
|
this.crud.toQuery() |
|
|
|
}).catch(err => { |
|
|
|
this.crud.delAllLoading = false |
|
|
|
console.log(err.response.data.message) |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
// this.$confirm(`确认清空所有异常日志吗?`, '提示', { |
|
|
|
// confirmButtonText: '确定', |
|
|
|
// cancelButtonText: '取消', |
|
|
|
// type: 'warning' |
|
|
|
// }).then(() => { |
|
|
|
this.crud.delAllLoading = true |
|
|
|
delAllError().then(res => { |
|
|
|
this.crud.delAllLoading = false |
|
|
|
this.crud.dleChangePage(1) |
|
|
|
this.crud.delSuccessNotify() |
|
|
|
this.crud.toQuery() |
|
|
|
this.delVisible = false |
|
|
|
}).catch(err => { |
|
|
|
this.crud.delAllLoading = false |
|
|
|
console.log(err.response.data.message) |
|
|
|
}) |
|
|
|
// }).catch(() => { |
|
|
|
// }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|