index.vue
1.81 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<template>
<div class="human-layout">
<tab
:tabList="tabList"
:activeName.sync="activeName"
/>
<template v-for="i in tabList">
<component
:ref="i.componentName"
:key="i.id"
:is="i.componentName"
v-show="activeName == i.id"
:show="activeName == i.id && show"
:pageId="`human-${pageId}`"
:searchTime="searchTime"
:pageData="pageData"
@openReceptionDialog="$emit('openReceptionDialog',$event)"
/>
</template>
</div>
</template>
<script type='text/ecmascript-6'>
import Tab from '../Tab'
import Output from './Output.vue'
import Behavior from './Behavior.vue'
import Reception from './Reception.vue'
export default {
components: {
Tab,
Output,
Behavior,
Reception
},
props: {
pageId: {
type: String,
default: ''
},
show: Boolean,
searchTime: {
type: Object,
default: () => { }
},
pageData: {
type: Object,
default: () => { }
},
},
name: '',
watch: {
show (val) {
if (val) this.activeName = this.tabList[0].id
}
},
data () {
return {
activeName: '',
tabList: [
{
label: '产值分析',
componentName: 'Output',
id: '1',
},
{
label: '行为分析',
componentName: 'Behavior',
id: '2',
},
{
label: '接待分析',
componentName: 'Reception',
id: '3',
},
// {
// label: '人员变动',
// componentName: 'OutputLine',
// id: '4',
// },
]
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.human-layout {
background-color: #fff;
position: relative;
transform: translateY(-54px);
}
</style>