提交 14dd1232 authored 作者: 王鹏飞's avatar 王鹏飞

updates

上级 fe34fc16
...@@ -52,8 +52,8 @@ export default { ...@@ -52,8 +52,8 @@ export default {
position: relative; position: relative;
} }
.question-list-hd { .question-list-hd {
position: sticky; // position: sticky;
top: 0; // top: 0;
display: flex; display: flex;
align-items: center; align-items: center;
height: 45px; height: 45px;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="tit">{{ item.title }}</div> <div class="tit">{{ item.title }}</div>
<ul> <ul>
<template v-for="(cItem, index) in item.question_list"> <template v-for="(cItem, index) in item.question_list">
<li @click="goQuestion(cItem.id)" :class="`stu${cItem.cardStust}`" :key="cItem.id ">{{ index + 1 }}</li> <li @click="goQuestion(cItem.id)" :class="`stu${cItem.cardStust}`" :key="cItem.id">{{ index + 1 }}</li>
</template> </template>
</ul> </ul>
</div> </div>
...@@ -76,13 +76,13 @@ export default { ...@@ -76,13 +76,13 @@ export default {
this.data.questions.question_items.forEach(list => { this.data.questions.question_items.forEach(list => {
list.question_list = list.question_list.reduce((a, b) => { list.question_list = list.question_list.reduce((a, b) => {
return a.concat(b) return a.concat(b)
}) }, [])
list.question_list.map(item => { list.question_list.map(item => {
if (!this.data.answers[list.question_item_id][item.id].answer.length) { if (!this.data.answers[list.question_item_id][item.id].answer.length) {
item.cardStust = 3 item.cardStust = 3
return item return item
} else { } else {
this.data.score_items[list.question_item_id][item.id].is_right ? item.cardStust = 1 : item.cardStust = 2 this.data.score_items[list.question_item_id][item.id].is_right ? (item.cardStust = 1) : (item.cardStust = 2)
return item return item
} }
}) })
...@@ -97,10 +97,10 @@ export default { ...@@ -97,10 +97,10 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.card-box{ .card-box {
position: relative; position: relative;
height: 100%; height: 100%;
.tips-box{ .tips-box {
display: flex; display: flex;
justify-content: center; justify-content: center;
padding: 15px 0 10px; padding: 15px 0 10px;
...@@ -108,57 +108,57 @@ export default { ...@@ -108,57 +108,57 @@ export default {
margin: 0; margin: 0;
list-style: none; list-style: none;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
li{ li {
&:nth-child(2){ &:nth-child(2) {
margin: 0 50px; margin: 0 50px;
} }
.circle1{ .circle1 {
width: 24px; width: 24px;
height: 24px; height: 24px;
background: #fff; background: #fff;
border: 2px solid #0FC118; border: 2px solid #0fc118;
border-radius: 50%; border-radius: 50%;
box-sizing: border-box; box-sizing: border-box;
} }
.circle2{ .circle2 {
width: 24px; width: 24px;
height: 24px; height: 24px;
border: 2px solid #C01540; border: 2px solid #c01540;
border-radius: 50%; border-radius: 50%;
box-sizing: border-box; box-sizing: border-box;
} }
.circle3{ .circle3 {
width: 24px; width: 24px;
height: 24px; height: 24px;
background: #999999; background: #999999;
border-radius: 50%; border-radius: 50%;
} }
.circle4{ .circle4 {
position: relative; position: relative;
width: 24px; width: 24px;
height: 24px; height: 24px;
border: 1px solid #CCCCCC; border: 1px solid #cccccc;
border-radius: 50%; border-radius: 50%;
&::after{ &::after {
content: ''; content: '';
position: absolute; position: absolute;
top: -1px; top: -1px;
right: -1px; right: -1px;
width: 4px; width: 4px;
height: 4px; height: 4px;
background: #C01540; background: #c01540;
border-radius: 50%; border-radius: 50%;
} }
} }
.txt{ .txt {
margin-top: 5px; margin-top: 5px;
font-size: 12px; font-size: 12px;
color: #CCCCCC; color: #cccccc;
line-height: 17px; line-height: 17px;
} }
} }
} }
.order-num{ .order-num {
height: 420px; height: 420px;
overflow-y: scroll; overflow-y: scroll;
padding-left: 30px; padding-left: 30px;
...@@ -167,27 +167,27 @@ export default { ...@@ -167,27 +167,27 @@ export default {
display: none; display: none;
} }
// padding-bottom: 90px; // padding-bottom: 90px;
.tit{ .tit {
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
line-height: 17px; line-height: 17px;
margin-bottom: 12px; margin-bottom: 12px;
margin-top: 30px; margin-top: 30px;
} }
ul{ ul {
display: flex; display: flex;
list-style: none; list-style: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
flex-wrap: wrap; flex-wrap: wrap;
li{ li {
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
border-radius: 50px; border-radius: 50px;
width: 24px; width: 24px;
height: 24px; height: 24px;
border: 1px solid #CCCCCC; border: 1px solid #cccccc;
font-size: 12px; font-size: 12px;
color: #666666; color: #666666;
line-height: 24px; line-height: 24px;
...@@ -197,22 +197,22 @@ export default { ...@@ -197,22 +197,22 @@ export default {
// &:nth-child(5n+5){ // &:nth-child(5n+5){
// margin-right: 0; // margin-right: 0;
// } // }
&.stu1{ &.stu1 {
border: 2px solid #0FC118; border: 2px solid #0fc118;
line-height: 22px; line-height: 22px;
} }
&.stu2{ &.stu2 {
border: 2px solid #C01540; border: 2px solid #c01540;
line-height: 22px; line-height: 22px;
} }
&.stu3{ &.stu3 {
color: #fff; color: #fff;
background: #999999; background: #999999;
} }
} }
} }
} }
.btn-box{ .btn-box {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
...@@ -222,26 +222,26 @@ export default { ...@@ -222,26 +222,26 @@ export default {
align-items: center; align-items: center;
height: 60px; height: 60px;
background: #fff; background: #fff;
.btn{ .btn {
width: 116px; width: 116px;
height: 40px; height: 40px;
text-align: center; text-align: center;
line-height: 40px; line-height: 40px;
border-radius: 4px; border-radius: 4px;
cursor: pointer; cursor: pointer;
&:nth-child(1){ &:nth-child(1) {
border: 1px solid #CCCCCC; border: 1px solid #cccccc;
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
color: #999999; color: #999999;
box-sizing: border-box; box-sizing: border-box;
} }
&:nth-child(2){ &:nth-child(2) {
background: #C01540; background: #c01540;
border-radius: 4px; border-radius: 4px;
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
color: #FFFFFF; color: #ffffff;
margin-left: 30px; margin-left: 30px;
} }
} }
......
...@@ -37,9 +37,13 @@ export default { ...@@ -37,9 +37,13 @@ export default {
}) })
}, },
startExam(item) { startExam(item) {
if (item.status === 0 || item.status === 3) { if ([0, 3].includes(item.status)) {
this.open(item) this.open(item)
} else if ([1, 2].includes(item.status)) {
// 已完成
this.$router.push({ path: '/testExam/result', query: { exam_id: item.id } })
} else { } else {
// 未做
this.$router.push({ path: '/testExam/exam', query: { exam_id: item.id, is_create: 0 } }) this.$router.push({ path: '/testExam/exam', query: { exam_id: item.id, is_create: 0 } })
} }
}, },
...@@ -65,8 +69,6 @@ export default { ...@@ -65,8 +69,6 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.exam-list {
}
.exam-item { .exam-item {
display: inline-block; display: inline-block;
width: 300px; width: 300px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论