<template>
  <div>
    <TicketTag v-model="tags"></TicketTag>
    <TicketList :tags="tags"></TicketList>
  </div>
</template>

<script>
import TicketTag from './TicketTag'
import TicketList from './TicketList'
import { getTicketCategory } from '@/api/ticketSetting/ticketCategory'
import { getIdGreyList } from '@/api/greylist'

export default {
  components: {
    TicketTag,
    TicketList
  },
  created () {
    this.getTicketCategory()
    this.getIdGreyList()
    this.$store.dispatch('getLimitGroupList')
  },
  data () {
    return {
      tags: []
    }
  },
  methods: {
    getTicketCategory () {
      getTicketCategory({ status: ['active'] }).then(res => {
        this.$store.commit('SET_TICKET_TYPE_LIST', res.extraInfo.list)
      })
    },
    getIdGreyList () {
      getIdGreyList({ pageNum: 0, pageSize: 0, status: ['active', 'inactive'] }).then(res => {
        this.$store.commit('SET_GREY_LIST', res.extraInfo.list)
      })
    }
  }
}
</script>

<style scoped>

</style>
