WXL (wul)
21 小时以前 0c7cc21d8a51e164dd2fe4ce73ab566b3a9081a9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!-- StatisticsMain.vue -->
<template>
  <div class="statistics-main">
    <el-tabs v-model="activeTab" @tab-click="handleTabChange">
      <el-tab-pane label="随访统计" name="followup">
        <followup-statistics
          v-if="activeTab === 'followup'"
          ref="followupRef"
        />
      </el-tab-pane>
      <el-tab-pane label="满意度统计" name="satisfaction">
        <satisfaction-statistics
          v-if="activeTab === 'satisfaction'"
          ref="satisfactionRef"
        />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
 
<script>
import FollowupStatistics from './components/FollowupStatistics.vue';
import SatisfactionStatistics from './components/SatisfactionStatistics.vue';
 
export default {
  name: 'StatisticsMain',
  components: {
    FollowupStatistics,
    SatisfactionStatistics
  },
  data() {
    return {
      activeTab: 'followup'
    };
  },
  methods: {
    handleTabChange(tab) {
      console.log('切换到:', tab.name);
    }
  }
};
</script>
 
<style lang="scss" scoped>
.statistics-main {
  padding: 20px;
  background: #fff;
  min-height: calc(100vh - 84px);
 
  ::v-deep .el-tabs__header {
    margin-bottom: 20px;
  }
 
  ::v-deep .el-tabs__item {
    font-size: 16px;
    font-weight: 500;
  }
 
  ::v-deep .el-tabs__nav-wrap::after {
    height: 1px;
  }
}
</style>