<template>
  <div class="fix-height-subpage column no-wrap q-pa-md">
    <list-header></list-header>
    <list-table></list-table>
  </div>
</template>

<script lang="ts">
import { date } from 'quasar'
import { inject, provide, reactive, toRefs, defineComponent } from 'vue';
import useMetaModule from '../../module/meta/metaModule'
import { useI18n } from 'vue-i18n'
import { DirtionmaryHelper } from '../../config/dictionary';
import ListHeader from 'src/components/ticket/list/ListHeader.vue';
import ListTable from 'src/components/ticket/list/ListTable.vue';
import { getStoreGetter } from '../../store/utils'
export default defineComponent({
  components: { ListHeader, ListTable },
  setup(props) {
    let { setTitle } = useMetaModule()
    const { t } = useI18n()
    const pageTitle = inject(DirtionmaryHelper.PAGE_TITLE_KEY) as any
    pageTitle.value = t('v102.ticket.pageTitle')
    setTitle(pageTitle.value)

    const data= reactive({
    })
    const search = reactive({
      msg:{
        QCountry: '651',
        QProvince: 0,
        QCity: 0,
        QDistrict: 0,
        Name:'',
        OpenTime: date.formatDate(date.addToDate(new Date(), { days: 0 }), 'YYYY/MM/DD'),
        StartPrice: '',
        EndPrice: '',
        ViewType:1,//列表模式
      },
    })
    let userInfo = getStoreGetter<UserGetter>('user', 'getUser')
    if(userInfo.groupId==100){
      search.msg.QCountry=0
    }
    provide(DirtionmaryHelper.TICKET_QUERY_PARAM, search)
    const menu=inject(DirtionmaryHelper.MENU_KEYS) as any
    menu.value=8
    const methods = {
    }

    return {
      ...toRefs(data),
      ...methods
    }
  }
})
</script>

<style>

</style>
