<template>
  <div>
    <el-tabs :lazy="true" v-model="activeName" type="border-card" @tab-click="handleClick">
      <el-tab-pane label="报警手动设定" name="1"><alarmSetting v-if="isFirst" ref="fresh1"/></el-tab-pane>
      <el-tab-pane label="报警导入设定" name="2"><alarmImport v-if="isSecond" ref="fresh2"/></el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import alarmImport from '@/views/SystemMaintenance/BasicAlarmMaintenance/alarmImport.vue'
import alarmSetting from '@/views/SystemMaintenance/BasicAlarmMaintenance/alarmSetting.vue'
export default {
  components: {
    'alarmSetting': alarmSetting,
    'alarmImport': alarmImport
  },
  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>
