Files
foton-laws-system-front/src/pages/home2/index.vue
T
2021-12-14 19:09:34 +08:00

198 lines
5.0 KiB
Vue

<template>
<div class="home">
<div class="home_main">
<div class="left_wrapper">
<search-group></search-group>
<div class="main-tabs" style="box-shadow:1px 1px 10px rgba(0,0,0,0.1);border-radius: 3px;" >
<div class="main-left-wrap" >
<!-- <el-button type="text" style="font-size: 14px" class="more" @click="MORE">MORE</el-button>-->
<el-tabs
v-model="activeName"
class="home-tabs"
@tab-click="handleTabClick"
>
<el-tab-pane name="solicitOpinions">
<span slot="label"><i class="el-icon-s-order"></i> 标准征求意见</span>
<solicitOpinions></solicitOpinions>
</el-tab-pane>
<el-tab-pane name="release">
<span slot="label"><i class="el-icon-s-promotion"></i> 标准发布</span>
<release></release>
</el-tab-pane>
</el-tabs>
</div>
</div>
<div style="height: 20px;background-color: #fff;text-align: right;color: #4788c0">
<span style="margin-right: 10px;cursor: pointer;font-size: 12px" @click="$router.push('standardForComments')">更多 </span>
</div>
</div>
<div class="right_wrapper">
<nav-menu></nav-menu>
<todo-list></todo-list>
</div>
</div>
<div calss="home_footer" style="padding: 0">
<Empennage></Empennage>
</div>
</div>
</template>
<script>
import searchGroup from './components/searchGroup'
import release from './components/release'
import solicitOpinions from './components/solicitopinions'
import navMenu from './components/navMenu'
import todoList from './components/todoList'
import Empennage from "./components/empennage"
export default {
name: "Home2",
components: {
searchGroup,
solicitOpinions,
release,
navMenu,
todoList,
Empennage,
},
data() {
return {
activeName: 'solicitOpinions',
}
},
methods: {
handleTabClick(tab, event) {},
//退出登录
logout(){
this.$confirm('您确认要退出吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
this.$store.commit('setTypeFlag', 'loginOut')
this.$http.get('logout', {}, {
_this: this
}, res => {
this.$store.dispatch('logout')
this.$router.push('/login')
}, e => {})
}).catch(() => {
})
},
MORE() {
switch (this.activeName) {
case 'solicitOpinions':
this.$router.push({name: 'standardForComments'})
break
case 'release':
this.$confirm('请选择国内/海外标准', {
confirmButtonText: '国内标准',
cancelButtonText: '海外标准',
type: 'warning',
center: true
}).then(() => {
this.$router.push({name: 'domesticStandardsAndRegulations'})
}).catch(() => {
this.$router.push({name: 'foreignStandardsAndRegulations'})
});
break
default:
break
}
}
},
};
</script>
<style lang="less" scoped>
.home{
height: 100%;
display: flex;
flex-direction: column;
background-color: #F0F2F5;
background-size: 100% 100%;
.home_main {
display: flex;
flex: 1;
overflow: hidden;
.left_wrapper {
display: flex;
flex: 1;
flex-direction: column;
width: 47vw;
height: calc(~'100% - 10px');
margin-right: 10px;
.more {
float: right;
color: #333333;
margin: 0px 15px;
&:hover {
color: red;
cursor: pointer;
}
}
.home-tabs {
/deep/.el-tabs__content {
height: calc(~'100% - 55px');
margin: 0 10px;
}
::v-deep.el-tabs__header{
margin: 0 10px 15px 10px;
border-bottom: 1px solid #F4F4F4;
}
::v-deep {
.el-tabs__item {
font-size: 15px;
font-weight: 600;
/*color: #333333;*/
}
.el-tabs__nav-wrap::after {
/*background-color: transparent;*/
}
}
}
.main-tabs {
display: flex;
flex: 1;
flex-direction: column;
width: 100%;
height: 40vh;
margin-right: 10px;
background:#FFFFFF;
.main-left-wrap {
height: 100%;
width: 100%;
.home-tabs {
height: 100%;
width: 100%;
}
}
}
}
.right_wrapper {
display: flex;
flex-direction: column;
width: 30vw;
height: 100%;
}
.search-condition {
display: block;
.el-input {
width: 300px;
}
}
}
/deep/.el-card__body {
padding: 0;
}
.home_footer {
height: 70px;
line-height: 33px;
//margin-top: 0.3vh;
//line-height: 5.2vh;
background: #FFFFFF;
}
}
</style>