You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.2 KiB
55 lines
1.2 KiB
<template>
|
|
<div class="block">
|
|
<el-timeline>
|
|
<el-timeline-item v-for="(item,index) of timeline" :key="index" :timestamp="item.timestamp" placement="top">
|
|
<el-card>
|
|
<h4>{{ item.created_at }}</h4>
|
|
<p>{{ item.name }}</p>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
</el-timeline>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
listlog
|
|
} from "../../../api/system/log.js";
|
|
export default {
|
|
data() {
|
|
return {
|
|
timeline: [],
|
|
paginations: {
|
|
page: 1,
|
|
page_size: 15,
|
|
total: 0
|
|
},
|
|
tableHeight: 0,
|
|
//查询条件字段
|
|
searchFields: {
|
|
keyword: ""
|
|
}
|
|
}
|
|
},
|
|
created() {
|
|
this.load();
|
|
},
|
|
methods: {
|
|
load() {
|
|
var that = this;
|
|
listlog({
|
|
page: that.paginations.page,
|
|
...this.searchFields
|
|
}).then(response => {
|
|
var data = response.data;
|
|
this.paginations.total = response.total;
|
|
that.timeline = data;
|
|
}).catch(error => {
|
|
console.log(error)
|
|
//reject(error)
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|