<template>
  <basic-container>
    <el-tabs type="border-card" @tab-click="handleClick">
      <el-tab-pane v-if="permission.returns_view" label="新開戶退件登記表" name="returns">
        <div v-if="activeTab == 'returns'">
          <release-returns></release-returns>
        </div>
      </el-tab-pane>
     <!-- <el-tab-pane v-if="permission.cardswallow_view" label="自助設備吞卡資料">
        <init-cardswallow></init-cardswallow>
        <release-cardswallow></release-cardswallow>
      </el-tab-pane>-->
    </el-tabs>
  </basic-container>
</template>

<script>
  import {mapGetters} from "vuex";
  import ReleaseReturns from "../../components/release/release-returns";
  import ReleaseCardswallow from "../../components/release/release-cardswallow";

  export default {
    components: {ReleaseCardswallow, ReleaseReturns},
    data() {
      return {
        activeTab: "returns",
        data: []
      };
    },
    computed: {
      ...mapGetters(["permission"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.notice_add, false),
          viewBtn: this.vaildData(this.permission.notice_view, false),
          delBtn: this.vaildData(this.permission.notice_delete, false),
          editBtn: this.vaildData(this.permission.notice_edit, false)
        };
      },
      ids() {
        let ids = [];
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
      }
    },
    mounted() {
      this.$nextTick(() => {
        document.getElementById("tab-returns").click();
      })
    },
    methods: {
      handleClick(tab, event) {
        this.activeTab = tab.name;
      }
    }
  };
</script>

<style>
</style>
