<!--
 * @Descripttion: 
 * @version: 
 * @Author: ysh
 * @Date: 2022-09-05 16:56:02
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-12-30 16:21:40
-->
<template>
  <div class="project-wrapper">
    <el-tabs v-model="tablsActiveName" class="demo-tabs" @tab-click="handleTabsClick">
      <el-tab-pane label="项目管理" name="project">
        <Project ref="projectRef"></Project>
      </el-tab-pane>
      <el-tab-pane label="成果管理" name="achievement">
        <Achievement ref="achievementRef"></Achievement>
      </el-tab-pane>
      <el-tab-pane label="存储地址" name="storage" v-if="$store.getters.roles.includes('archive')">
        <Storage ref="storageRef"></Storage>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import Project from './project.vue'
import Achievement from './achievement.vue'
import Storage from './storage.vue'
export default {
  components: { Project, Achievement, Storage },
  data() {
    return {
      tablsActiveName: "project",
    }
  },
  methods: {
    handleTabsClick() {
      if (this.tablsActiveName == "project") {
        this.$refs.projectRef.getProList();
      } else if (this.tablsActiveName == "achievement") {
        this.$refs.achievementRef.getAchiList();
      }
    }
  },
}



</script>
<style lang="scss" scoped>
.project-wrapper {
  padding: 10px 20px 0px;
}
</style>