<template>
  <div style="width: 100%;">
    <cy-comm-table
      ref="commTable"
      v-loading="loading"
      :columns="columns"
      :table-options="tableOptions"
      :data="tableData"
      :count="total"
      parent-component="LogDetail"
    />
  </div>
</template>

<script>
import indexTable from './detailTable'
import request from '@/utils/request'

export default {
  name: 'LogDetail',
  mixins: [indexTable],
  data() {
    return {
      search: {
        loginTime: '',
        userName: ''
      },
      loading: false
    }
  },
  mounted() {
    this.fetchData()
  },
  methods: {
    fetchData() {
      this.loading = true
      request({
        url: '/operationLog/findByLoginId',
        method: 'get',
        params: {
          page: this.page,
          rows: this.size,
          logInId: this.$route.query.id
        }
      }).then(({ rows, records }) => {
        this.tableData = rows || []
        this.total = records
        this.loading = false
      })
    }
  }
}
</script>

<style lang="scss">

</style>
