<template>
  <div class="p10">
    <el-form ref="form" label-position="top" inline>
      <el-form-item label="时间" prop="time">
        <el-select size="medium" v-model="form.time"></el-select>
      </el-form-item>
      <el-form-item label="是否标注" prop="time">
        <el-select size="medium" v-model="form.time"></el-select>
      </el-form-item>
      <el-form-item label="搜索" prop="time">
        <el-input size="medium"></el-input>
      </el-form-item>
      <el-form-item label="排序" prop="time">
        <el-select size="medium" v-model="form.time"></el-select>
      </el-form-item>
    </el-form>

    <r-table
      :columns="columns"
      :data="tableConfig.tableData"
      :deletion="false"
      :total="tableConfig.total"
      @currentChange="handleCurrentChange"
      @sizeChange="handleSizeChange"
      :currentPage="tableConfig.pageNum"
      :pageSize="tableConfig.pageSize"
    ></r-table>
  </div>
</template>
<script>
export default {
  name: 'logs',
  data() {
    return {
      form: {
        time: ''
      },
      tableConfig: {
        tableData: [],
        pageSize: 10,
        pageNum: 1,
        total: 0
      }
    }
  },
  props: {},
  watch: {},
  components: {},
  filters: {},
  methods: {
    handleCurrentChange(val) {
      this.tableConfig.pageNum = val
      this.load()
    },
    handleSizeChange(val) {
      this.tableConfig.pageNum = 1
      this.tableConfig.pageSize = val
      this.load()
    },
    load() {
      this.tableConfig.tableData = []
    }
  },
  created() {},
  mounted() {},
  computed: {
    columns: () => {
      return [
        {
          title: '标题',
          prop: 'index'
        },
        {
          label: '用户',
          prop: 'time'
        },
        {
          label: '状态',
          prop: 'content'
        },
        {
          label: '消息数',
          prop: 'operation'
        },
        {
          label: '用户反馈',
          prop: 'operation'
        },
        {
          label: '管理员反馈',
          prop: 'operation'
        },
        {
          label: '更新时间',
          prop: 'operation'
        },
        {
          label: '创建时间',
          prop: 'operation'
        }
      ]
    }
  }
}
</script>
<style scoped lang="scss">
#logs-container {
}
</style>
