删除不必要的文件

This commit is contained in:
joylink_cuiweidong 2020-09-25 14:48:09 +08:00
parent 4dfb904133
commit dd9ffdeb52

View File

@ -1,185 +0,0 @@
<template>
<el-dialog :visible.sync="dialogVisible" fullscreen>
<el-container class="quiz">
<el-container class="quiz__container">
<el-header class="quiz__container-header layer-center">
<div class="titles">考试结果</div>
</el-header>
<el-main class="quiz__container-main layer-center">
<div v-for="(el,i) in sortedList" :id="'anchor__lst-'+i" :key="i" class="section">
<template v-if="el.children.length">
<div class="caption">{{ index2UnicodeList[i] }}{{ el.title }}</div>
<question v-for="(item,j) in el.children" :id="'anchor__lst-'+item.type+'-'+item.index" :key="j" v-model="item.answer" class="context" :option="item" />
</template>
</div>
<div style="padding-left: 20px;margin-top: 20px;">
<span>考试总分: </span>
<span style="font-size: 20px">{{ totalScore }}</span>
</div>
</el-main>
<el-footer class="quiz__container-footer layer-center" @click="returnTop">
<el-button-group class="buttons">
<el-button type="primary" @click="restart">重新测验</el-button>
<el-button type="primary" @click="close">返回</el-button>
</el-button-group>
</el-footer>
</el-container>
</el-container>
</el-dialog>
</template>
<script>
import Question from './requestQuestion';
export default {
name: 'ExamResult',
components: {
Question
},
props: {
},
data() {
return {
index: 0,
height: 0,
loading: false,
formModel: {
description: '',
duration: 10,
name: '',
status: '',
totalScore: 0,
passScore: 10
},
totalScore: 0,
examQuestions: [],
dialogVisible: false
};
},
computed: {
examId() {
return this.$route.params.examId;
},
userExamId() {
return this.$route.params.userExamId;
},
question() {
return this.examQuestions[this.index] || {};
},
index2UnicodeList() {
return ['一', '二', '三', '四'];
},
sortedList() {
return [
{
title: '判断题',
children: this.examQuestions.filter(el => { return el.type === 'judge'; })
},
{
title: '选择题',
children: this.examQuestions.filter(el => { return el.type === 'select'; })
}
];
}
},
created() {
},
methods: {
doShow(result) {
this.examQuestions = [];
this.dialogVisible = true;
if (result.length) {
result.forEach((item, i) => {
this.examQuestions.push({...item.question, ...{answer: String(item.answerOptionId), score: item.score, index: i}});
});
this.totalScore = result.reduce((pre, ver) => pre + ver.score, 0);
}
},
restart() {
this.$emit('restart');
},
close() {
this.dialogVisible = false;
},
returnTop() {
document.querySelector('.el-header').scrollIntoView(true);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.layer-center {
width: 900px;
height: 100%;
margin: auto;
background: #fff;
padding-top: 0;
}
.quiz {
background: #eee;
height: 100%;
&::-webkit-scrollbar {
display:none
}
&__card {
height: 100%;
.dir-item {
padding-left: 25px;
}
.dir-caption {
padding-left: 10px;
line-height: 26px;
background: #f1f1f1;
}
}
&__container {
height: 100%;
&-header {
height: auto !important;
.titles {
font-size: 24px;
line-height: 60px;
font-weight: bold;
text-align: center;
margin: 0 auto;
}
.notes {
color:#606266;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: 0 20px;
}
}
&-main {
.section {
padding: 5px 20px;
.caption {
line-height: 26px;
}
.context {
}
}
}
&-footer {
text-align: right;
position: sticky;
bottom: 0px;
padding: 40px ;
.buttons {
position: relative;
bottom: 20px;
}
}
}
}
</style>