<!--
鉴权行为统计
@Author: linqian
@Date: 2021-05-28 08:51
-->
<template>
  <div>
    <!-- 搜索项 -->
    <search-bar ref="searchbar" :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
    <!-- 表格 -->
    <new-table
      ref="table"
      :tableUrl="authServiceLogStatisticsTableUrl"
      :tableHeader="authBehaviorStatisticTableHeader"
      :condition="condition"
      :lazyLoad="true"
    >
    </new-table>
  </div>
</template>

<script>
import newTable from '@/components/new-table';
import { authBehaviorStatisticTableHeader } from '../permiss-log-manage/DataConfig';
import { authServiceLogStatisticsTableUrl } from '@/api/permiss-log-manage';
import searchBar from '@/components/search-bar';
import { searchOpt } from '@/mixins/page-opt';
export default {
  components: {
    newTable,
    searchBar
  },
  mixins: [searchOpt],
  data() {
    return {
      authServiceLogStatisticsTableUrl,
      authBehaviorStatisticTableHeader,
      conditionForm: [
        {
          label: '鉴权时间',
          name: 'createTime',
          op: 'between',
          type: 'DATE',
          value: '',
          valueFormat: 'yyyyMMddHHmmss',
          component: 'DgDatePicker',
          clearable: false
        }
      ]
    };
  },
  computed: {},
  methods: {},
  created() {
    const startTime = this.$moment().subtract('1', 'year').format('YYYYMMDDHHmmss');
    const endTime = this.$moment().format('YYYYMMDDHHmmss');
    this.conditionForm[0].value = [startTime, endTime];
  },
  mounted() {
    this.$nextTick(() => {
      this.$refs.searchbar.handleSearch();
    });
  }
};
</script>

<style lang='scss'>
</style>