index.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!--
  2. 鉴权行为统计
  3. @Author: linqian
  4. @Date: 2021-05-28 08:51
  5. -->
  6. <template>
  7. <div>
  8. <!-- 搜索项 -->
  9. <search-bar ref="searchbar" :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
  10. <!-- 表格 -->
  11. <new-table
  12. ref="table"
  13. :tableUrl="authServiceLogStatisticsTableUrl"
  14. :tableHeader="authBehaviorStatisticTableHeader"
  15. :condition="condition"
  16. :lazyLoad="true"
  17. >
  18. </new-table>
  19. </div>
  20. </template>
  21. <script>
  22. import newTable from '@/components/new-table';
  23. import { authBehaviorStatisticTableHeader } from '../permiss-log-manage/DataConfig';
  24. import { authServiceLogStatisticsTableUrl } from '@/api/permiss-log-manage';
  25. import searchBar from '@/components/search-bar';
  26. import { searchOpt } from '@/mixins/page-opt';
  27. export default {
  28. components: {
  29. newTable,
  30. searchBar
  31. },
  32. mixins: [searchOpt],
  33. data() {
  34. return {
  35. authServiceLogStatisticsTableUrl,
  36. authBehaviorStatisticTableHeader,
  37. conditionForm: [
  38. {
  39. label: '鉴权时间',
  40. name: 'createTime',
  41. op: 'between',
  42. type: 'DATE',
  43. value: '',
  44. valueFormat: 'yyyyMMddHHmmss',
  45. component: 'DgDatePicker',
  46. clearable: false
  47. }
  48. ]
  49. };
  50. },
  51. computed: {},
  52. methods: {},
  53. created() {
  54. const startTime = this.$moment().subtract('1', 'year').format('YYYYMMDDHHmmss');
  55. const endTime = this.$moment().format('YYYYMMDDHHmmss');
  56. this.conditionForm[0].value = [startTime, endTime];
  57. },
  58. mounted() {
  59. this.$nextTick(() => {
  60. this.$refs.searchbar.handleSearch();
  61. });
  62. }
  63. };
  64. </script>
  65. <style lang='scss'>
  66. </style>