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,7 +2,7 @@ | ||
| 2 | <div class="container"> | 2 | <div class="container"> |
| 3 | <h3>{{ info.TestPaperName }}</h3> | 3 | <h3>{{ info.TestPaperName }}</h3> |
| 4 | <div class="header-opts"> | 4 | <div class="header-opts"> |
| 5 | - <el-button type="text">查看回放</el-button> | 5 | + <el-button type="text">查看回放</el-button> |
| 6 | </div> | 6 | </div> |
| 7 | <div class="questions"> | 7 | <div class="questions"> |
| 8 | <el-card class="box-card" v-for="item in list" :key="item.id"> | 8 | <el-card class="box-card" v-for="item in list" :key="item.id"> |
| @@ -12,16 +12,25 @@ | @@ -12,16 +12,25 @@ | ||
| 12 | }}</el-tag> | 12 | }}</el-tag> |
| 13 | 【{{ item.subjectName }}】{{ item.subject }} | 13 | 【{{ item.subjectName }}】{{ item.subject }} |
| 14 | </h4> | 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 | <el-tag size="mini" type="primary" effect="dark">{{ | 26 | <el-tag size="mini" type="primary" effect="dark">{{ |
| 18 | i.option | 27 | i.option |
| 19 | }}</el-tag> | 28 | }}</el-tag> |
| 20 | {{ i.optionContent }} | 29 | {{ i.optionContent }} |
| 21 | </li> | 30 | </li> |
| 22 | </ul> | 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 | </el-card> | 34 | </el-card> |
| 26 | </div> | 35 | </div> |
| 27 | </div> | 36 | </div> |
| @@ -35,18 +44,30 @@ | @@ -35,18 +44,30 @@ | ||
| 35 | display: flex; | 44 | display: flex; |
| 36 | flex-direction: column; | 45 | flex-direction: column; |
| 37 | align-items: center; | 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 | .questions { | 56 | .questions { |
| 45 | width: 100%; | 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 | </style> | 73 | </style> |