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
| <template>
| <div class="internert-equipment">
| <!-- 左侧tab栏 -->
| <div class="left_tab">
| <tab-single
| v-for="(item,index) in tabArr"
| :id="index"
| :key="index"
| :icon="item.icon"
| :title="item.title"
| :activeTab="activeTab"
| @click.native="toggleActive(index)"
| />
| </div>
|
| <!-- 右侧内容 -->
| <div class="right_content">
| <!-- 安全帽设备 -->
| <helemetEquipment />
|
| </div>
| </div>
| </template>
|
| <script>
| import tabSingle from "../components/tabSingle.vue";
| import helemetEquipment from '@/pages/internetEquipment/views/helemetEquipment'
|
| export default {
| data (){
| return {
| // 左侧tab数据
| tabArr: [
| {icon: "\ue77f", title: "安全帽设备"},
| {icon: "\ue767", title: "供配电设备"},
| {icon: "\ue763", title: "消防设备"},
| {icon: "\ue765", title: "能源设备"},
| {icon: "\ue7c0", title: "给排水设备"},
| ],
| activeTab: 0
| }
| },
| components: {
| tabSingle,
| helemetEquipment
| },
| methods :{
| toggleActive (index){
| this.activeTab = index
| }
| }
| }
| </script>
|
| <style scoped lang="scss">
|
| .internert-equipment {
| display: flex;
| height: 100%;
| background-color: #fff;
| border-top: 1px solid #E0E0E0;
|
| .left_tab {
| padding: 20px;
| width: 230px;
| height: 100%;
|
| .tab_single {
| margin-bottom: 10px;
| }
| }
|
| .right_content {
| height: 100%;
| width: 100%;
| }
| }
| </style>
|
| <style >
| * {
| box-sizing: border-box;
| }
| </style>
|
|