下架审计日志未实现功能(id排序、删除按钮)

This commit is contained in:
lanrenwo 2022-09-16 19:15:16 +08:00
parent 38afab2440
commit a5b4463280
2 changed files with 5 additions and 40 deletions

View File

@ -29,7 +29,7 @@
}, },
mounted() { mounted() {
this.initChart() this.initChart()
window.addEventListener('resize', this.listenerResize); window.addEventListener('resize', this.listenerResize)
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener('resize', this.listenerResize) window.removeEventListener('resize', this.listenerResize)
@ -44,7 +44,7 @@
}, },
methods: { methods: {
listenerResize() { listenerResize() {
this.chart.resize(); this.chart.resize()
}, },
initChart() { initChart() {
this.chart = echarts.init(this.$el) this.chart = echarts.init(this.$el)

View File

@ -66,16 +66,15 @@
border> border>
<el-table-column <el-table-column
sortable="true"
prop="id" prop="id"
label="ID" label="ID"
width="60"> width="100">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="username" prop="username"
label="用户名" label="用户名"
width="120"> width="140">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -99,7 +98,7 @@
<el-table-column <el-table-column
prop="access_proto" prop="access_proto"
label="访问协议" label="访问协议"
width="85" width="80"
:formatter="protoFormat"> :formatter="protoFormat">
</el-table-column> </el-table-column>
@ -114,24 +113,6 @@
width="150" width="150"
:formatter="tableDateFormat"> :formatter="tableDateFormat">
</el-table-column> </el-table-column>
<el-table-column
label="操作"
width="100">
<template slot-scope="scope">
<el-popconfirm
class="m-left-10"
@confirm="handleDel(scope.row)"
title="确定要删除审计日志吗?">
<el-button
slot="reference"
size="mini"
type="danger">删除
</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table> </el-table>
<div class="sh-20"></div> <div class="sh-20"></div>
@ -237,22 +218,6 @@ export default {
pageChange(p) { pageChange(p) {
this.getData(p) this.getData(p)
}, },
handleDel(row) {
axios.post('/set/audit/del?id=' + row.id).then(resp => {
var rdata = resp.data
if (rdata.code === 0) {
this.$message.success(rdata.msg);
this.getData(1);
} else {
this.$message.error(rdata.msg);
}
console.log(rdata);
}).catch(error => {
this.$message.error('哦,请求出错');
console.log(error);
});
},
handleExport() { handleExport() {
if (this.count > this.maxExportNum) { if (this.count > this.maxExportNum) {
var formatNum = (this.maxExportNum + "").replace(/\d{1,3}(?=(\d{3})+$)/g,function(s){ var formatNum = (this.maxExportNum + "").replace(/\d{1,3}(?=(\d{3})+$)/g,function(s){