App.vue
2.77 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
117
<template>
<div id="glsx-sub-system" :class="isFullsize?'full-size':''">
<div id="wrap" class="wrap" :class="isCollapse?'full-width':''">
<!-- 主体 -->
<main>
<!-- <el-row class="topbar">
<el-button type="primary" size="small" @click="toggle" class="toggle-btn"><i class="fa fa-bars"></i></el-button>
<img :src="logo" class="logo">
<a class="pull-right right-link" href="logout">
<i class="fa fa-sign-out"></i> 登 出
</a>
<a class="pull-right right-link" href="javascript(0)" @click.prevent="navigate">
<i class="fa fa-bell-o"></i> 系统公告
</a>
</el-row> -->
<router-view></router-view>
</main>
<!-- 主体 /-->
<!-- 左边导航栏 -->
<!-- <v-side-bar class="sidebar"></v-side-bar> -->
<!-- 左边导航栏 /-->
</div>
</div>
</template>
<script>
import store from './vuex/store.js'
import { mapGetters, mapActions } from 'vuex'
import vSideBar from 'components/SideBar.vue'
export default {
name: 'app',
data() {
return {
logo: require('images/logo.png')
}
},
mounted(){
// store.dispatch('getDeviceResources')
// store.dispatch('getLoginUser').then((res)=>{
// if(store.state.common.username === 'gqgdcx'){
// this.$router.push({path:"business/gqOrder"})
// }
// if(store.state.common.isCheckbook){
// // console.log(this.$route)
// // this.$router.push({path:"accounts/accountsList"})
// }
// })
// window.onresize = ()=>{
// const w = window,
// d = document,
// e = d.documentElement,
// g = d.getElementsByTagName('body')[0],
// x = w.innerWidth || e.clientWidth || g.clientWidth,
// y = w.innerHeight|| e.clientHeight|| g.clientHeight;
// d.getElementsByTagName('main')[0].style['minHeight'] = y+'px'
// }
// window.onresize()
},
computed: {
...mapGetters([
'isCollapse',
'isFullsize'
])
},
methods: {
toggle(){
this.toggleCollapse()
},
...mapActions([
'toggleCollapse'
]),
navigate(){
let routeData = this.$router.resolve({
path: '/notice',
query: {
}
});
window.open(routeData.href, '_blank');
}
},
components: {
vSideBar
},
store
}
</script>
<style scoped>
.topbar {
min-height: 50px;
padding: 15px 10px;
}
.toggle-btn, .logo{
vertical-align: middle;
}
.logo{
margin-left: 10px;
}
a.right-link{
color: #999;
font-size: 14px;
margin-right: 20px;
line-height: 30px;
text-decoration: none;
}
.full-size main{
margin: 0;
}
.full-size .sidebar, .full-size .topbar{
display: none;
}
</style>