<template>
  <div>
    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
      <div style="padding: 20px; background-color: #fff;">
        会员详情
      </div>
    </div>
    <template>
      <el-tabs v-model="activeName"  :tab-position="tabPosition" style="height: 200px;margin: 40px">
        <el-tab-pane label="基本信息" name="basic"><userDetails  ref="userDetails" /></el-tab-pane>
        <el-tab-pane label="行为轨迹" name="behavior"><userBehavior  ref="userBehavior" /></el-tab-pane>
        <el-tab-pane label="训练营"  name="course"><userCoursePeriod  ref="userCoursePeriod" /></el-tab-pane>
      </el-tabs>
    </template>
  </div>

</template>



<script>
import userDetails from '@/views/store/components/userDetails.vue';
import userBehavior from './userBehavior.vue';
import userCoursePeriod from './userCoursePeriod.vue';

export default {
  name: "userDetailsByNew",
  props:["data"],
  components: { userDetails,userBehavior,userCoursePeriod},
  data() {
    return {
      activeName: 'basic',
      // 左侧遮罩层
      leftLoading: true,
      // 左侧查询参数
      leftQueryParams: {
        pageNum: 1,
        pageSize: 10,
        hasNextPage: false,
        scs: 'order_number(desc),training_camp_id(desc)',
        trainingCampName: null,
        userId:null,
      },
      tabPosition: 'top',
    }
  },
  created() {

  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    getDetails(userId) {
      this. activeName='basic';
      setTimeout(() => {
        this.$refs.userDetails.getDetails(userId);
      }, 1);
      setTimeout(() => {
        this.$refs.userBehavior.getDetails(userId);
      }, 1);
      setTimeout(() => {
        this.$refs.userCoursePeriod.getDetails(userId);
      }, 1);
    },
  }
}
</script>
<style>

</style>
