<template>
|
<div id="examine">
|
<div class="examine_heard">
|
保安员考试系统-签到
|
<div class="e_h_right">
|
<img
|
src="http://nx.baibaodun.cn:80/assets/images/username-person.png"
|
alt=""
|
/>
|
<span> {{ userName }} </span>
|
<div @click="logout">退出登录</div>
|
</div>
|
</div>
|
<div class="examine_body">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tab-pane label="身份识别" name="first">
|
<div class="examine_body_left">
|
<div class="e_m_left">
|
<forms></forms>
|
</div>
|
<div class="e_m_right">
|
<tables></tables>
|
</div>
|
</div>
|
</el-tab-pane>
|
<el-tab-pane label="签到记录" name="second">
|
<signIn v-if="activeName == 'second'"></signIn>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import { mapGetters } from "vuex";
|
import { resetRouter } from "@/router/router";
|
import tables from "./tables.vue";
|
import forms from "./forms.vue";
|
import signIn from "./signIn.vue";
|
|
export default {
|
data() {
|
return {
|
tabs: "",
|
userName: "",
|
activeName: "first"
|
};
|
},
|
components: {
|
tables,
|
forms,
|
signIn
|
},
|
computed: {
|
...mapGetters(["userInfo"])
|
},
|
watch: {
|
userInfo() {
|
// console.log(userInfo);
|
}
|
},
|
mounted() {
|
this.userName = this.userInfo.account;
|
},
|
methods: {
|
handleClick(tab, event) {
|
// console.log(tab.name, 77777);
|
},
|
logout() {
|
this.$confirm(this.$t("logoutTip"), this.$t("tip"), {
|
confirmButtonText: this.$t("submitText"),
|
cancelButtonText: this.$t("cancelText"),
|
type: "warning"
|
}).then(() => {
|
this.$store.dispatch("LogOut").then(() => {
|
resetRouter();
|
this.$router.push({ path: "/login" });
|
});
|
});
|
}
|
}
|
};
|
</script>
|
<style lang="scss">
|
#examine {
|
width: 100%;
|
height: 100%;
|
overflow: hidden;
|
box-sizing: border-box;
|
.examine_heard {
|
background-color: #25aff3;
|
width: 100%;
|
padding-left: 30px;
|
box-sizing: border-box;
|
height: 50px;
|
color: #ffffff;
|
font-size: 24px;
|
line-height: 50px;
|
.e_h_right {
|
float: right;
|
margin-right: 20px;
|
img {
|
display: inline-block;
|
vertical-align: middle;
|
}
|
span {
|
font-style: normal;
|
color: #ffffff;
|
font-size: 16px;
|
line-height: 50px;
|
display: inline-block;
|
margin: 0;
|
padding-left: 4px;
|
}
|
div {
|
display: inline;
|
margin-left: 15px;
|
color: #ffffff;
|
font-size: 16px;
|
line-height: 50px;
|
}
|
}
|
}
|
.examine_body {
|
width: 100%;
|
height: calc(100% - 50px);
|
// border: 1px solid red;
|
box-sizing: border-box;
|
}
|
.examine_body_left {
|
width: 100%;
|
height: calc(100% - 55px);
|
// height: 100% !important;
|
// border: 1px solid rgb(0, 26, 255);
|
box-sizing: border-box;
|
display: flex;
|
// align-items: center;
|
justify-content: center;
|
position: relative;
|
.e_m_left {
|
width: 47%;
|
height: 100%;
|
|
box-sizing: border-box;
|
overflow-x: hidden;
|
overflow-y: scroll;
|
}
|
.e_m_right {
|
width: 53%;
|
height: 100%;
|
// border: 1px solid rgb(0, 255, 64);
|
// border: 1px solid red;
|
}
|
}
|
}
|
</style>
|