tabbar.vue
2.6 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<template>
<div id="app">
<div class="dinbu">
<img src="../assets/wuliu-img.png" class="wuliu" alt="" />
<div class="yunshu">
<div :class="active == 1 ? 'active' : 'yun'" @click="yuns(1)">
运输监管
<div class="gexian" v-if="active == 1"></div>
</div>
<div :class="active == 2 ? 'active' : 'yun'" @click="yuns(2)">
运输管理
<div class="gexian" v-if="active == 2"></div>
</div>
<div :class="active == 3 ? 'active' : 'yun'" @click="yuns(3)">
主数据管理
<div class="gexian" v-if="active == 3"></div>
</div>
<div :class="active == 4 ? 'active' : 'yun'" @click="yuns(4)">
系统管理
<div class="gexian" v-if="active == 4"></div>
</div>
</div>
<div class="touxian">
<div class="tou-img" @click="showPopup">
<img src="../assets/touxian.png" class="touxina" alt="" />
<div class="name">连义昌</div>
</div>
<div class="yous" @click="news">
<img src="../assets/youixna.png" class="you-img" alt="" />
<div class="dian"></div>
</div>
<div class="tuichus">退出登录</div>
</div>
</div>
<popup v-show="isPopupVisible" @close="closePopup">
</popup>
<router-view />
</div>
</template>
<script>
import popup from "./popup";
export default {
name: "App",
props: ["actives"],
components: {
popup,
},
data() {
return {
active: "1",
dialogVisibleyu: false,
isPopupVisible: false,
};
},
mounted() {
this.active = this.actives;
console.log(this.actives);
},
methods: {
//tab切换
yuns(index) {
console.log(index)
this.active = index;
if (this.active == 1) {
this.$router.push("./home");
} else if (this.active == 2) {
this.$router.push("./transport");
}else if(this.active == 3){
this.$router.push("./zhushu");
}else if(this.active == 4){
this.$router.push("./xitons");
}
},
//消息
news() {
this.$router.push("./xiaoxi?ac=" + this.active);
},
showPopup() {
this.isPopupVisible = true;
},
closePopup() {
this.isPopupVisible = false;
},
},
};
</script>
<style>
* {
margin: 0;
padding: 0;
}
.box-a .el-dialog {
width: 100px !important;
height: 100px !important;
}
.el-dialog__body {
overflow: auto;
color: #666666;
}
.el-dialog{
margin-top: 0 !important;
border-radius: 10px;
}
.el-button.is-round{
border-radius: 20px;
padding: 12px 51px;
}
</style>
<style scoped>
@import "../css/app.css";
</style>