sc
This commit is contained in:
@@ -15,6 +15,14 @@ export const searchExamRecords = async (params) => {
|
||||
})
|
||||
}
|
||||
|
||||
// 考试详情
|
||||
export const searchExamDetail = async (params) => {
|
||||
return await request.get({
|
||||
url: 'admin-api/applet/wrj/questionTest/detail',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 收藏记录
|
||||
export const searchCollectRecords = async (params) => {
|
||||
return await request.get({
|
||||
|
||||
@@ -47,6 +47,7 @@ const submitForm = async () => {
|
||||
formLoading.value = true
|
||||
try {
|
||||
const params = {
|
||||
driverTypeId: formData.value.driverTypeId,
|
||||
configKey: formData.value.configKey,
|
||||
configValue: formData.value.configValue,
|
||||
configJson: formData.value.configJson,
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user