<template>
  <div>
    <el-tabs :lazy="true" v-model="activeName" type="border-card" @tab-click="handleClick">
      <el-tab-pane label="邮箱设定" name="1"><SendEmail v-if="isFirst" ref="fresh1"/></el-tab-pane>
      <el-tab-pane label="企业微信设定" name="2"><SendWeChat v-if="isSecond" ref="fresh2"/></el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import SendEmail from '@/views/SystemMaintenance/SendMessageMaintenance/SendEmail.vue'
import SendWeChat from '@/views/SystemMaintenance/SendMessageMaintenance/SendWeChat.vue'
export default {
  components: {
    'SendEmail': SendEmail,
    'SendWeChat': SendWeChat
  },
  data() {
    return {
      isFirst: true,
      isSecond: false,
      activeName: '1',
      permissionControl1: false,
      permissionControl: false
    }
  },
  methods: {
    handleClick() {
      switch (this.activeName) {
        case '1': {
          this.isFirst = true
          this.isSecond = false
          break
        }
        case '2': {
          this.isFirst = false
          this.isSecond = true
          break
        }
      }
    }
  }
}
</script>

<style scoped>
</style>
