WarnGroup.vue
1.86 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="warn-group">
<div class="tab">
<el-tabs v-model="activeName">
<el-tab-pane
v-for="item in tabList"
:key="item.id"
:label="item.label"
:name="item.id"
/>
</el-tabs>
</div>
<div class="warn-component">
<template v-for="i in tabList">
<component
:ref="i.name"
:key="i.id"
:is="i.componentName"
v-show="activeName == i.id"
:show="activeName == i.id"
@openWindow="$emit('openWindow',$event)"
:pageId="i.id"
:businessType="businessType"
/>
</template>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import WarnTable from './WarnTable'
import storeWarn from '../../../store/indexControl'
export default {
name: '',
components: {
WarnTable,
storeWarn
},
props:{
businessType: [String, Number]
},
data () {
return {
activeName: '1',
tabList: [
{
label: '业绩风险榜',
componentName: 'WarnTable',
id: '1'
},
{
label: '新店风险榜',
componentName: 'WarnTable',
id: '2'
},
{
label: '门店盯防预警',
componentName: 'storeWarn',
id: '3'
}
]
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.warn-group {
margin-top: 16px;
background: #fff;
// height: calc(100% - 394px);
height: 100%;
border-radius: 4px;
.tab {
::v-deep .el-tabs__nav-wrap {
padding: 0 20px;
}
::v-deep .el-tabs__item {
height: 54px;
line-height: 54px;
}
::v-deep.el-tabs__nav-wrap::after {
height: 1px;
background: #e5e5e5;
}
}
.warn-component {
position: relative;
height: calc(100% - 68px);
}
}
</style>