|
|
|
@ -59,11 +59,39 @@ |
|
|
|
|
v-model:limit="searchForm.pageSize" |
|
|
|
|
@pagination="getList" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<Dialog v-model="dialogVisible" title="考试详情" width="80%"> |
|
|
|
|
<el-table :data="testDetailList" border stripe max-height="calc(100vh - 180px)"> |
|
|
|
|
<el-table-column type="index" width="55" align="center" /> |
|
|
|
|
<el-table-column label="题目" prop="question" /> |
|
|
|
|
<el-table-column label="图片" width="120"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<img v-if="row.imageUrl" :src="row.imageUrl" width="100" height="100" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="选项"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<div v-for="(item, index) in optionArr" :key="index"> |
|
|
|
|
<span v-if="row['choose' + item]">{{ item }}. {{ row['choose' + item] }}</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="正确答案" prop="trueAnswer" width="85" /> |
|
|
|
|
<el-table-column label="答题选择" prop="answer" width="85" /> |
|
|
|
|
<el-table-column label="答题结果" prop="answerResult" width="100"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<el-tag v-if="!row.answerResult" type="info">未答</el-tag> |
|
|
|
|
<el-tag v-else-if="row.answerResult == 2" type="danger">答错</el-tag> |
|
|
|
|
<el-tag v-else type="success">答对</el-tag> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</Dialog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup> |
|
|
|
|
import { searchExamRecords, searchStudyRecords } from '@/api/uav/record' |
|
|
|
|
import { searchExamRecords, searchExamDetail } from '@/api/uav/record' |
|
|
|
|
|
|
|
|
|
const searchForm = ref({ |
|
|
|
|
userName: '', |
|
|
|
@ -95,10 +123,16 @@ function handleQuery() { |
|
|
|
|
getList() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const testDetailList = ref([]) |
|
|
|
|
const dialogVisible = ref(false) |
|
|
|
|
const optionArr = ['A', 'B', 'C', 'D', 'E'] |
|
|
|
|
function handleView(row) { |
|
|
|
|
try { |
|
|
|
|
const query = {} |
|
|
|
|
// 跳转到考试记录详情页面 |
|
|
|
|
searchExamDetail({ testId: row.testId }).then((res) => { |
|
|
|
|
testDetailList.value = res |
|
|
|
|
dialogVisible.value = true |
|
|
|
|
}) |
|
|
|
|
} finally { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|