|
@@ -0,0 +1,55 @@
|
|
|
+<template>
|
|
|
+ <div id="index">
|
|
|
+ <detail-frame :title="pageTitle">
|
|
|
+ <data-table :fields="fields" :data="list" :opera="[]" :total="total" @query="search"> </data-table>
|
|
|
+ </detail-frame>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import detailFrame from '@frame/layout/admin/detail-frame';
|
|
|
+import dataTable from '@frame/components/filter-page-table.vue';
|
|
|
+import { mapState, createNamespacedHelpers, mapActions } from 'vuex';
|
|
|
+const { mapActions: logs } = createNamespacedHelpers('logs');
|
|
|
+export default {
|
|
|
+ name: 'index',
|
|
|
+ props: {},
|
|
|
+ components: { detailFrame, dataTable },
|
|
|
+ data: function() {
|
|
|
+ return {
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ fields: [
|
|
|
+ { label: 'ip', prop: 'ip' },
|
|
|
+ { label: '操作人', prop: 'name' },
|
|
|
+ { label: '操作', prop: 'opera' },
|
|
|
+ { label: '时间', prop: 'time' },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...logs(['query']),
|
|
|
+ async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ const res = await this.query({ skip, limit, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ pageTitle() {
|
|
|
+ return `${this.$route.meta.title}`;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped></style>
|