<template>
  <div style="width: 100%;">
    <el-tabs v-model="activeName">
      <el-tab-pane label="苏商日志" name="smb">
        <SmbList ref="smbRef" />
      </el-tab-pane>
      <!-- <el-tab-pane label="交行日志" name="bocom">
        <BocomList ref="bocomRef" />
      </el-tab-pane> -->
    </el-tabs>
  </div>
</template>

<script>
export default {
  name: 'SmbLogManage',
  components: {
    SmbList: () => import('./components/SmbList.vue'),
    BocomList: () => import('./components/BocomList.vue')
  },
  data() {
    return {
      activeName: 'smb'
    }
  },
  watch: {
    activeName: {
      handler(val) {
        if (val === 'smb') {
          setTimeout(() => {
            this.$refs.smbRef.fetchData()
            this.$refs.smbRef.queryAllTransCode()
          }, 300)
        } else {
          this.$nextTick(() => {
            this.$refs.bocomRef.fetchData()
            this.$refs.bocomRef.queryAllTransCode()
          })
        }
      },
      immediate: true
    }
  }
}
</script>

<style lang="scss">

</style>
