<template>
  <a-layout id="dxdcListMain" style="padding:5px 20px;">
    <a-tabs v-model="currentViewId" type="card">
        <a-tab-pane
            :tab="option.label"
            v-for="option in options"
            :key="option.value"
        >
          <!-- <component v-if="currentViewId == option.label" :is="option.value"></component> -->
          <a-col :span="24" ref="elm">
            <keep-alive>
              <component v-if="showTable" :is="option.value"/>
            </keep-alive>
          </a-col>
        </a-tab-pane>
      </a-tabs>
  </a-layout>
</template>

<script>
import report_sk from './report_sk.vue';
import report_sk2 from './report_sk2.vue';
import report_sk3 from './report_sk3.vue';
import report_sk4 from './report_sk4.vue';
import report_sk5 from './report_sk5.vue';
import report_sk6 from './report_sk6.vue';
import report_sk7 from './report_sk7.vue';

export default {
  components: {
    report_sk: report_sk,
    report_sk2: report_sk2,
    report_sk3: report_sk3,
    report_sk4: report_sk4,
    report_sk5: report_sk5,
    report_sk6: report_sk6,
    report_sk7: report_sk7,
  },
  props: [],

  data() {
    return {
      options: [
        {
          value: 'report_sk',
          label: '检查小型水库名称及分布情况表',
        },
        {
          value: 'report_sk2',
          label: '检查情况统计表',
        },
        {
          value: 'report_sk3',
          label: '检查发现问题汇总表',
        },
        {
          value: 'report_sk4',
          label: '责任追究建议',
        },
        {
          value: 'report_sk5',
          label: '未发挥效益水库清单',
        },
        {
          value: 'report_sk6',
          label: '存在重大安全隐患水库清单',
        },
        {
          value: 'report_sk7',
          label: '存在重大安全隐患水库问题汇总表',
        },
      ],
      value: '',
      currentViewId: 'report_sk',
      showTable: true,
      currentNodeType: '',

      ids: [],
      pid: '000',
      pidNodes: [],
      type: '001',
      dxdcMainHeight: window.innerHeight - 180,
      dxdcAsideHeight: window.innerHeight - 180,
      windowHeight: window.innerHeight - 200,
      windowWidth: window.innerWidth - 350,
      treeWidth: 250,
      elwspan: 0,
      elmspan: 24,
    };
  },
  computed: {
    persId() {
      return localStorage.getItem('userid')
        ? localStorage.getItem('userid')
        : '1098101939614724096';
    },
  },
  created() {},
  mounted() {},

  watch: {
    currentViewId() {},
  },

  methods: {},
};
</script>

<style>
</style>
