2019-07-02 16:29:52 +08:00
|
|
|
<template>
|
2019-08-09 15:10:13 +08:00
|
|
|
<div class="app-wrapper" :class="classObj">
|
|
|
|
<div class="main-container">
|
|
|
|
<navbar />
|
2019-10-28 11:07:33 +08:00
|
|
|
<section class="app-main" :style="{height: height+'px'}">
|
2019-10-28 17:51:59 +08:00
|
|
|
<transition name="fade" mode="out-in">
|
|
|
|
<router-view />
|
|
|
|
</transition>
|
2019-10-28 11:07:33 +08:00
|
|
|
</section>
|
2019-10-29 16:23:57 +08:00
|
|
|
<el-footer class="footers" style="height:30px;">
|
2020-01-13 13:33:35 +08:00
|
|
|
<div v-if="!isHyd" style="font-size:14px;float:left;">{{ $t('global.companyInfo') }} {{ $t('global.companyTel') }}</div>
|
|
|
|
<div style="font-size:14px;float:right;">{{ isHyd? '哈尔滨盈达科技有限公司 联系电话:0451-87001273' : $t('global.companyICP') }}</div>
|
2019-10-24 18:28:06 +08:00
|
|
|
</el-footer>
|
2019-07-02 16:29:52 +08:00
|
|
|
</div>
|
2020-01-15 14:32:17 +08:00
|
|
|
<div>
|
|
|
|
<el-dialog
|
|
|
|
:title="$t('tip.hint')"
|
|
|
|
custom-class="dialogMessage"
|
|
|
|
:visible.sync="dialogVisible"
|
|
|
|
width="30%"
|
|
|
|
:before-close="closeDialog"
|
|
|
|
>
|
|
|
|
<span>{{ dialogMessage }}</span>
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
<el-button type="primary" @click="closeDialog">{{ $t('global.confirm') }}</el-button>
|
|
|
|
</span>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
2019-08-09 15:10:13 +08:00
|
|
|
</div>
|
2019-07-02 16:29:52 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-10-28 11:07:33 +08:00
|
|
|
import { Navbar } from './components'; // Sidebar
|
2020-01-13 13:33:35 +08:00
|
|
|
import { getSessionStorage } from '@/utils/auth';
|
2019-07-02 16:29:52 +08:00
|
|
|
|
2019-08-09 15:10:13 +08:00
|
|
|
export default {
|
2019-10-31 14:47:05 +08:00
|
|
|
name: 'Layout',
|
|
|
|
components: {
|
|
|
|
Navbar
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2020-01-15 14:32:17 +08:00
|
|
|
dialogVisible: false
|
2019-10-31 14:47:05 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
sidebar() {
|
|
|
|
return this.$store.state.app.sidebar;
|
|
|
|
},
|
|
|
|
device() {
|
|
|
|
return this.$store.state.app.device;
|
|
|
|
},
|
|
|
|
classObj() {
|
|
|
|
return {
|
|
|
|
withoutAnimation: this.sidebar.withoutAnimation,
|
|
|
|
mobile: this.device === 'mobile'
|
|
|
|
};
|
|
|
|
},
|
|
|
|
width() {
|
|
|
|
return this.$store.state.app.width;
|
|
|
|
},
|
|
|
|
height() {
|
|
|
|
return this.$store.state.app.height - 90;
|
2020-01-13 13:33:35 +08:00
|
|
|
},
|
|
|
|
isHyd() {
|
|
|
|
return getSessionStorage('project').endsWith('hyd');
|
2020-01-15 14:32:17 +08:00
|
|
|
},
|
|
|
|
dialogMessage() {
|
|
|
|
return this.$store.state.app.dialogMessage;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watch:{
|
|
|
|
'$store.state.app.dialogMessage':function(val) {
|
|
|
|
if (val == '') {
|
|
|
|
this.dialogVisible = false;
|
|
|
|
} else {
|
|
|
|
this.dialogVisible = true;
|
|
|
|
}
|
2019-10-31 14:47:05 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.watchRouterUpdate();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
handleClickOutside() {
|
|
|
|
this.$store.dispatch('CloseSideBar', { withoutAnimation: false });
|
|
|
|
},
|
|
|
|
watchRouterUpdate() {
|
|
|
|
this.$router.beforeEach((to, from, next) => {
|
|
|
|
next();
|
|
|
|
});
|
2020-01-15 14:32:17 +08:00
|
|
|
},
|
|
|
|
closeDialog() {
|
|
|
|
this.$store.dispatch('app/SET_DIALOG_MESSAGE', '');
|
2019-10-31 14:47:05 +08:00
|
|
|
}
|
|
|
|
}
|
2019-08-09 15:10:13 +08:00
|
|
|
};
|
2019-07-02 16:29:52 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
@import "src/styles/mixin.scss";
|
|
|
|
|
|
|
|
.app-wrapper {
|
|
|
|
@include clearfix;
|
|
|
|
position: relative;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
2019-10-28 17:51:59 +08:00
|
|
|
.app-main{
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
|
2019-07-02 16:29:52 +08:00
|
|
|
.drawer-bg {
|
|
|
|
background: #000;
|
|
|
|
opacity: 0.3;
|
|
|
|
width: 100%;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
height: 100%;
|
|
|
|
position: absolute;
|
|
|
|
z-index: 999;
|
2019-10-29 16:23:57 +08:00
|
|
|
}
|
|
|
|
.footers{
|
|
|
|
line-height: 30px;
|
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
bottom: 0;
|
|
|
|
background: #fff;
|
|
|
|
border-top: 1px #ebeef5 solid;
|
|
|
|
}
|
2019-08-09 15:10:13 +08:00
|
|
|
</style>
|
2019-10-28 11:07:33 +08:00
|
|
|
<style rel="stylesheet/scss" lang="scss">
|
|
|
|
.app_scrollbar_box{
|
|
|
|
.el-scrollbar__view{
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
2020-01-15 14:32:17 +08:00
|
|
|
.el-dialog.dialogMessage{
|
|
|
|
width:400px !important;
|
|
|
|
}
|
2019-10-28 17:51:59 +08:00
|
|
|
|
|
|
|
// 定义公共card样式
|
|
|
|
.joylink-card{
|
|
|
|
border: 1px solid #EBEEF5;
|
|
|
|
background-color: #FFF;
|
|
|
|
color: #303133;
|
|
|
|
transition: .3s;
|
|
|
|
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
|
|
|
}
|
|
|
|
|
|
|
|
// 谷歌、safari、qq浏览器、360浏览器滚动条样式
|
|
|
|
// 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
width: 6px;
|
2020-03-16 16:28:53 +08:00
|
|
|
height: 6px;
|
2019-10-29 09:43:56 +08:00
|
|
|
// height: 110px;
|
2019-10-28 17:51:59 +08:00
|
|
|
background-color: #FFFFFF;
|
|
|
|
}
|
|
|
|
/*定义滚动条轨道 内阴影+圆角*/
|
|
|
|
::-webkit-scrollbar-track {
|
|
|
|
// box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
|
|
|
border-radius: 10px;
|
|
|
|
background-color: #FFFFFF;;
|
|
|
|
}
|
|
|
|
/*定义滑块 内阴影+圆角*/
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
|
|
border-radius: 10px;
|
|
|
|
// box-shadow: inset 0 0 6px rgba(0,0,0,.3);
|
|
|
|
background-color: #eaeaea;
|
|
|
|
}
|
|
|
|
/*滑块效果*/
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
|
|
border-radius: 5px;
|
|
|
|
// box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
|
|
|
background: rgba(0,0,0,0.4);
|
|
|
|
}
|
|
|
|
/*IE滚动条颜色*/
|
|
|
|
html {
|
|
|
|
scrollbar-face-color:#bfbfbf;/*滚动条颜色*/
|
|
|
|
scrollbar-highlight-color:#000;
|
|
|
|
scrollbar-3dlight-color:#000;
|
|
|
|
scrollbar-darkshadow-color:#000;
|
|
|
|
scrollbar-Shadow-color:#adadad;/*滑块边色*/
|
|
|
|
scrollbar-arrow-color:rgba(0,0,0,0.4);/*箭头颜色*/
|
|
|
|
scrollbar-track-color:#eeeeee;/*背景颜色*/
|
|
|
|
}
|
2019-10-28 11:07:33 +08:00
|
|
|
</style>
|