/*
|
* @Author: Morpheus
|
* @Date: 2021-08-02 09:31:54
|
* @Last Modified by: Morpheus
|
* @Last Modified time: 2021-08-02 09:31:54
|
* menu-name 成绩管理
|
*/
|
<template>
|
<div class="exam-end">
|
<button class="logout"
|
onmouseover="this.style.backgroundColor='red';"
|
onmouseout="this.style.backgroundColor='';"
|
@click="handleLogout">退出系统</button>
|
<div class="end">
|
<div class="title">
|
<span>考试结束</span>
|
</div>
|
|
<div class="score">
|
<span>本次考试得分: {{score}} 分</span>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import {getExamScore} from "@/api/exam/examscore";
|
|
export default {
|
data () {
|
return {
|
score:0,
|
}
|
},
|
created () {
|
|
|
},
|
mounted () {
|
//获取考试成绩
|
this.getExamScore();
|
},
|
methods: {
|
//退出登录
|
handleLogout() {
|
this.$confirm("是否退出系统, 是否继续?", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning"
|
}).then(() => {
|
this.$store.dispatch("LogOut").then(() => {
|
this.$router.push({ path: "/login" });
|
});
|
});
|
},
|
getExamScore(){
|
var data = {
|
userId:this.$route.query.userId,
|
examId:this.$route.query.examId
|
}
|
getExamScore(data).then((res) => {
|
this.score = res.data.data.theoryGrade;
|
})
|
}
|
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.exam-end{
|
position: fixed;
|
width: 100%;
|
height: 100%;
|
}
|
|
.logout{
|
border: 0px;
|
margin-left: 92%;
|
margin-top: 30px;
|
border-radius: 5px;
|
font-size: 14px;
|
width: 80px;
|
height: 30px;
|
letter-spacing: 1px;
|
}
|
|
.end{
|
width: 20%;
|
height: 200px;
|
line-height: 200px;
|
text-align: center;
|
background-color: #fff;
|
border-radius: 5px;
|
margin-left: 40%;
|
margin-top: 10%;
|
|
.title{
|
width: 100%;
|
height: 40px;
|
|
span{
|
color: blueviolet;
|
letter-spacing: 2px;
|
}
|
}
|
|
.score{
|
font-size: 16px;
|
color: darkorchid;
|
}
|
|
|
|
}
|
</style>
|