<template>
  <div class="cooperation-desk-account default-layout-container">
    <div class="default-layout-container-inner">
      <!-- 顶部tab切换栏 -->
      <dsk-tab-toggle v-model="currentList" :tabs="toggleTabs"></dsk-tab-toggle>

      <!-- 项目列表 -->
      <project-list v-if="currentList == 'project'"></project-list>

      <!-- 企业列表 -->
      <enterprise-list v-if="currentList == 'enterprise'"></enterprise-list>

    </div>
  </div>
</template>
<script>
import DskTabToggle from "@/components/DskTabToggle";
import ProjectList from "@/views/consultingOrgManagement/components/ProjectList";
import EnterpriseList from "@/views/consultingOrgManagement/components/EnterpriseList";
import { v4 } from 'uuid';
export default {
  name: "cooperationDeskAccount",
  components: {
    DskTabToggle,
    ProjectList,
    EnterpriseList
  },
  data() {
    return {
      currentList: "project",
      toggleTabs: [
        {
          value: "project",
          name: "项目列表",
          id: v4()
        },
        {
          value: "enterprise",
          name: "企业列表",
          id: v4()
        }
      ]
    };
  },
  //可访问data属性
  created() {
    const target = this.$route.query.target;
    if (target && ["project", "enterprise"].includes(target)) {
      this.currentList = target;
    }
  },
  //计算集
  computed: {

  },
  //方法集
  methods: {
  },
}
</script>
<style lang="scss" scoped>
.cooperation-desk-account {
  .default-layout-container-inner {
    .cooperation-desk-account-project,
    .cooperation-desk-account-enterprise {
      overflow: hidden;
      height: calc(100% - 48px);
    }
  }
}
</style>
