<template>
  <div>
    <el-tabs type="border-card" v-model="componentName">
      <el-tab-pane :label="$t('expressFileReceiveList.assetsFileReceive')" name="ExpressFileReceive">
      </el-tab-pane>
      <el-tab-pane :label="$t('expressFileReceiveList.projectFileReceive')" name="AssetsFileReceive">
      </el-tab-pane>
      <keep-alive>
        <component :is="componentName" :isRefresh="isRefresh"></component>
      </keep-alive>
    </el-tabs>
  </div>
</template>

<script>
import ExpressFileReceive from '@/pages/shourang/expressFileReceive/expressFileReceive'
import AssetsFileReceive from '@/pages/shourang/expressFileReceive/assetsFileReceive'
/* 引入数据存储 */
import store from '@/store'
export default {
  name: 'expressFileReceiveList',
  components: {
    ExpressFileReceive,
    AssetsFileReceive
  },
  mounted () {
    store.dispatch('getReceiCode').then(res => {
      this.isRefresh = !this.isRefresh
    })
    store.dispatch('getReceiCode1')
    store.dispatch('getReceiCode2')
    store.dispatch('getReceiCode3')
  },
  data () {
    return {
      isRefresh: true,
      componentName: 'ExpressFileReceive'
    }
  }
}
</script>

<style scoped lang="scss">
  @import '~@/styles/shourang/expressFileReceive/expressFileReceiveList.scss';
</style>
