<template>
  <div>
    <!-- <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> -->
      <!-- <el-tab-pane label="四性检测" name="first">
        <first-box />
      </el-tab-pane> -->
      <!-- <el-tab-pane label="接收工具" name="second"> -->
        <two-box :treeData="twotreeData" :twoFieldType="twoFieldType" />
      <!-- </el-tab-pane> -->
      <!-- <el-tab-pane label="数据质检" name="third">
        数据质检
      </el-tab-pane>
      <el-tab-pane label="申请入库" name="fourth">申请入库</el-tab-pane> -->
    <!-- </el-tabs> -->
  </div>
</template>
<script>
  import {
    message,
    clearObjValue
  } from "@/utils/common";
  import {
    getFindList
  } from "@/api/system-management/templateSetting"
  import {
    getTree,
  } from "@/api/archives-management/fileManagement/notStoredArchives.js";
  import firstBox from "./components/firstBox";
  import twoBox from "./components/two";
  export default {
    data() {
      return {
        activeName: "second",
        clickTab: {},
        twotreeData: [],
        twoFieldType: []
      }
    },
    components: {
      firstBox,
      twoBox,
    },
    methods: {
      intTree() {
        let data = {
          className: "档案"
        };
        getTree(data).then(res => {
          this.twotreeData = res.body.list
        })
      },
      getStyleList() {
        getFindList({
          type: "columnClass"
        }).then(res => {
          this.twoFieldType = res.body.list
        })
      },
      handleClick(tab) {
        this.clickTab = tab;
        switch (tab.name) {
          case 'first':
            break;
          case 'second':
            // this.intTree()
            // this.getStyleList()
            break;
          case 'third':
            break;
          case 'fourth':
            break;
        }
      }
    },
    created() {
      this.intTree()
      this.getStyleList()
    }
  }

</script>
