|
@ -9,7 +9,7 @@ |
|
|
icon="el-icon-delete" |
|
|
icon="el-icon-delete" |
|
|
size="mini" |
|
|
size="mini" |
|
|
:loading="crud.delAllLoading" |
|
|
:loading="crud.delAllLoading" |
|
|
@click="confirmDelAll()" |
|
|
|
|
|
|
|
|
@click="delVisible = true" |
|
|
> |
|
|
> |
|
|
清空 |
|
|
清空 |
|
|
</el-button> |
|
|
</el-button> |
|
@ -48,6 +48,17 @@ |
|
|
</el-table> |
|
|
</el-table> |
|
|
<!--分页组件--> |
|
|
<!--分页组件--> |
|
|
<pagination /> |
|
|
<pagination /> |
|
|
|
|
|
<!-- 清空 --> |
|
|
|
|
|
<el-dialog :visible.sync="delVisible" title="确认清空"> |
|
|
|
|
|
<span class="dialog-right-top" /> |
|
|
|
|
|
<span class="dialog-left-bottom" /> |
|
|
|
|
|
<div class="setting-dialog"> |
|
|
|
|
|
<p class="delMsg">确认清空所有操作日志吗?</p> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button type="primary" @click="confirmDelAll">确定</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
@ -67,6 +78,11 @@ export default { |
|
|
return CRUD({ title: '日志', url: 'api/logs' }) |
|
|
return CRUD({ title: '日志', url: 'api/logs' }) |
|
|
}, |
|
|
}, |
|
|
mixins: [presenter()], |
|
|
mixins: [presenter()], |
|
|
|
|
|
data() { |
|
|
|
|
|
return { |
|
|
|
|
|
delVisible: false |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.crud.optShow = { |
|
|
this.crud.optShow = { |
|
|
add: false, |
|
|
add: false, |
|
@ -77,23 +93,23 @@ export default { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
confirmDelAll() { |
|
|
confirmDelAll() { |
|
|
this.$confirm(`确认清空所有操作日志吗?`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.crud.delAllLoading = true |
|
|
|
|
|
delAllInfo().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 |
|
|
|
|
|
delAllInfo().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) |
|
|
}) |
|
|
}) |
|
|
|
|
|
// }) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|