<template>
|
<div class="operationLog">
|
<TableCustom :tableData="list" :total="total" :heigth="null"
|
@handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange">
|
<template #table>
|
<el-table-column label="序号" type="index" show-overflow-tooltip />
|
<el-table-column label="操作时间" prop="operTime" show-overflow-tooltip />
|
<el-table-column label="操作人" prop="nickName" show-overflow-tooltip />
|
<el-table-column label="操作内容" prop="title" show-overflow-tooltip />
|
</template>
|
</TableCustom>
|
</div>
|
</template>
|
|
<script>
|
import { getList } from './service'
|
export default {
|
name: 'operationLog',
|
data() {
|
return {
|
list: [],
|
total: 0,
|
listLoading: false,
|
queryForm: {
|
pageNum: 1,
|
pageSize: 10
|
}
|
}
|
},
|
created() {
|
this.fetchData()
|
},
|
methods: {
|
handleSizeChange(val) {
|
this.queryForm.pageSize = val
|
this.fetchData()
|
},
|
handleCurrentChange(val) {
|
this.queryForm.pageNum = val
|
this.fetchData()
|
},
|
async fetchData() {
|
try {
|
this.listLoading = true
|
getList(this.queryForm).then(res => {
|
if (res) {
|
this.list = res.records
|
this.total = res.total
|
} else {
|
// this.$message.error('获取数据失败')
|
}
|
})
|
} catch (error) {
|
// console.error('获取操作日志列表失败:', error)
|
// this.$message.error('获取操作日志列表失败')
|
} finally {
|
this.listLoading = false
|
}
|
}
|
}
|
}
|
</script>
|
<style scoped lang="less">
|
.operationLog {
|
height: 100%;
|
}
|
</style>
|