Commit a63af57c702c64606cfca255e671b17257925993
1 parent
109e9818
超哥牛批
Showing
1 changed file
with
34 additions
and
13 deletions
src/views/AnswerResult/detail.vue
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | <div class="container"> |
| 3 | 3 | <h3>{{ info.TestPaperName }}</h3> |
| 4 | 4 | <div class="header-opts"> |
| 5 | - <el-button type="text">查看回放</el-button> | |
| 5 | + <el-button type="text">查看回放</el-button> | |
| 6 | 6 | </div> |
| 7 | 7 | <div class="questions"> |
| 8 | 8 | <el-card class="box-card" v-for="item in list" :key="item.id"> |
| ... | ... | @@ -12,16 +12,25 @@ |
| 12 | 12 | }}</el-tag> |
| 13 | 13 | 【{{ item.subjectName }}】{{ item.subject }} |
| 14 | 14 | </h4> |
| 15 | - <ul v-if="item.subjectType == 1"> | |
| 16 | - <li v-for="i in item.subjectContentObj" :key="i.option"> | |
| 15 | + <div v-if="item.subjectType == 4"> | |
| 16 | + <audio controls> | |
| 17 | + <source :src="BASE_URL + item.answer" /> | |
| 18 | + </audio> | |
| 19 | + </div> | |
| 20 | + <ul class="answer-list" v-if="item.subjectType == 1"> | |
| 21 | + <li | |
| 22 | + v-for="i in item.subjectContentObj" | |
| 23 | + :key="i.option" | |
| 24 | + :class="{ active: item.answer == i.option }" | |
| 25 | + > | |
| 17 | 26 | <el-tag size="mini" type="primary" effect="dark">{{ |
| 18 | 27 | i.option |
| 19 | 28 | }}</el-tag> |
| 20 | 29 | {{ i.optionContent }} |
| 21 | 30 | </li> |
| 22 | 31 | </ul> |
| 23 | - <p v-if="item.subjectType == 1">Ta的答案:{{ item.answer }}</p> | |
| 24 | - <p v-if="item.subjectType == 1">正确答案:B</p> | |
| 32 | + <!-- <p v-if="item.subjectType == 1">Ta的答案:{{ item.answer }}</p> --> | |
| 33 | + <!-- <p v-if="item.subjectType == 1">正确答案:B</p> --> | |
| 25 | 34 | </el-card> |
| 26 | 35 | </div> |
| 27 | 36 | </div> |
| ... | ... | @@ -35,18 +44,30 @@ |
| 35 | 44 | display: flex; |
| 36 | 45 | flex-direction: column; |
| 37 | 46 | align-items: center; |
| 38 | - .header-opts{ | |
| 39 | - display: flex; | |
| 40 | - align-items: center; | |
| 41 | - justify-content: center; | |
| 42 | - padding: 10px; | |
| 47 | + .header-opts { | |
| 48 | + display: flex; | |
| 49 | + align-items: center; | |
| 50 | + justify-content: center; | |
| 51 | + padding: 10px; | |
| 52 | + } | |
| 53 | + .box-card { | |
| 54 | + margin-bottom: 20px; | |
| 43 | 55 | } |
| 44 | 56 | .questions { |
| 45 | 57 | width: 100%; |
| 46 | 58 | } |
| 47 | - li { | |
| 48 | - list-style: none; | |
| 49 | - margin-bottom: 10px; | |
| 59 | + .answer-list { | |
| 60 | + display: flex; | |
| 61 | + flex-direction: column; | |
| 62 | + li { | |
| 63 | + list-style: none; | |
| 64 | + margin-bottom: 10px; | |
| 65 | + padding: 10px 10px; | |
| 66 | + &.active { | |
| 67 | + border: 2px solid #00c9ff; | |
| 68 | + border-radius: 10px; | |
| 69 | + } | |
| 70 | + } | |
| 50 | 71 | } |
| 51 | 72 | } |
| 52 | 73 | </style> | ... | ... |