题库维护。刷题软件数据后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.8 KiB

1 month ago
<template>
<div>
<el-form :model="searchForm" inline @submit.prevent>
<el-form-item>
<el-input
1 week ago
v-model="searchForm.userName"
1 month ago
placeholder="输入学员姓名/手机号"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-select
1 week ago
v-model="searchForm.isPass"
1 month ago
placeholder="选择考试结果"
@change="handleQuery"
style="width: 150px"
clearable
>
<el-option label="合格" :value="1" />
<el-option label="不合格" :value="0" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery"> 搜索 </el-button>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="tableList"
highlight-current-row
1 week ago
max-height="calc(100vh - 260px)"
1 month ago
>
<el-table-column type="index" width="55" align="center" />
1 week ago
<el-table-column label="姓名" prop="userName" />
1 month ago
<el-table-column label="手机号" prop="phone" />
1 week ago
<el-table-column label="无人机类型" prop="modelName" />
<el-table-column label="驾驶员类型" prop="typeName" />
<el-table-column label="交卷时间" prop="submitTime" />
<el-table-column label="模考时长" prop="testTimeStr" />
1 month ago
<el-table-column label="得分" prop="score" />
1 week ago
<el-table-column label="答题结果" prop="isPass">
1 month ago
<template #default="{ row }">
1 week ago
<el-tag v-if="row.isPass" type="success">合格</el-tag>
<el-tag v-else type="danger">不合格</el-tag>
1 month ago
</template>
</el-table-column>
<el-table-column label="操作" width="100">
<template #default="{ row }">
<el-button type="text" @click="handleView(row)">查看明细</el-button>
</template>
</el-table-column>
</el-table>
<pagination
style="margin-bottom: 0"
v-show="total > 0"
:total="total"
v-model:page="searchForm.pageNo"
v-model:limit="searchForm.pageSize"
@pagination="getList"
/>
</div>
</template>
<script setup>
1 week ago
import { searchExamRecords, searchStudyRecords } from '@/api/uav/record'
1 month ago
const searchForm = ref({
1 week ago
userName: '',
1 month ago
pageNo: 1,
1 week ago
pageSize: 50
1 month ago
})
const loading = ref(false)
const total = ref(0)
const tableList = ref([])
onMounted(() => {
handleQuery()
})
function getList() {
loading.value = true
1 week ago
try {
searchExamRecords(searchForm.value).then((res) => {
tableList.value = res.list
total.value = res.total
})
} finally {
loading.value = false
}
1 month ago
}
function handleQuery() {
searchForm.value.pageNo = 1
getList()
}
function handleView(row) {
1 week ago
try {
const query = {}
// 跳转到考试记录详情页面
} finally {
}
1 month ago
}
</script>
<style lang="scss" scoped></style>