修改
This commit is contained in:
@@ -36,9 +36,9 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="考试类型" prop="examType">
|
||||
<el-form-item label="考试类型" prop="carTypeId">
|
||||
<el-select
|
||||
v-model="formData.examType"
|
||||
v-model="formData.carTypeIds"
|
||||
placeholder="选择考试类型"
|
||||
clearable
|
||||
filterable
|
||||
@@ -144,9 +144,8 @@ const resetForm = () => {
|
||||
idcard: '',
|
||||
id: undefined,
|
||||
sex: 1,
|
||||
examType: [1011]
|
||||
carTypeIds: [1011]
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select
|
||||
v-model="searchForm.examType"
|
||||
v-model="searchForm.carTypeId"
|
||||
placeholder="选择考试类型"
|
||||
clearable
|
||||
filterable
|
||||
@@ -70,10 +70,15 @@
|
||||
<el-table v-loading="loading" :data="tableList" border stripe>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="姓名" prop="userName" />
|
||||
<el-table-column label="性别" prop="sex" />
|
||||
<el-table-column label="性别" prop="sex">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.sex == 1">男</span>
|
||||
<span v-else>女</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机号码" prop="phone" width="120" />
|
||||
<el-table-column label="身份证号" prop="idcard" min-width="120" />
|
||||
<el-table-column label="考试类型" prop="examType" min-width="120" />
|
||||
<el-table-column label="考试类型" prop="carTypeName" min-width="120" />
|
||||
<el-table-column label="操作" width="260" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
@@ -117,7 +122,7 @@ const carTypeOptions = ref([])
|
||||
|
||||
const searchForm = ref({
|
||||
userName: undefined,
|
||||
examType: 1011,
|
||||
carTypeId: 1011,
|
||||
pageNo: 1,
|
||||
pageSize: 20
|
||||
})
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select
|
||||
v-model="searchForm.examType"
|
||||
v-model="searchForm.carTypeId"
|
||||
placeholder="选择考试类型"
|
||||
clearable
|
||||
filterable
|
||||
@@ -74,7 +74,7 @@
|
||||
<el-table-column label="姓名" prop="userName" />
|
||||
<el-table-column label="手机号码" prop="phone" width="120" />
|
||||
<el-table-column label="身份证号" prop="idcard" min-width="120" />
|
||||
<el-table-column label="考试类型" prop="examType" min-width="120" />
|
||||
<el-table-column label="考试类型" prop="carTypeName" min-width="120" />
|
||||
<el-table-column label="考试科目" prop="subject" min-width="120" />
|
||||
<el-table-column label="考试得分" prop="score" min-width="120" />
|
||||
<el-table-column label="交卷时间" prop="createTime" min-width="120" />
|
||||
@@ -92,6 +92,7 @@
|
||||
<script setup name="ExamRecord">
|
||||
import { removeNullField } from '@/utils'
|
||||
import * as ExamRecordApi from '@/api/customer/examRecord.js'
|
||||
import download from '@/utils/download'
|
||||
|
||||
import { getCustomerExamCarType } from '@/api/customer/customer.js'
|
||||
|
||||
@@ -102,7 +103,7 @@ const carTypeOptions = ref([])
|
||||
|
||||
const searchForm = ref({
|
||||
userName: undefined,
|
||||
examType: 1011,
|
||||
carTypeId: 1011,
|
||||
pageNo: 1,
|
||||
pageSize: 20
|
||||
})
|
||||
@@ -153,11 +154,13 @@ function handleExport() {
|
||||
params.endTime = undefined
|
||||
}
|
||||
ExamRecordApi.exportRecord(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
message.success('导出成功')
|
||||
} else {
|
||||
message.error(res.msg)
|
||||
}
|
||||
download.excel(res, '考试成绩.xls')
|
||||
|
||||
// if (res.code === 200) {
|
||||
// message.success('导出成功')
|
||||
// } else {
|
||||
// message.error(res.msg)
|
||||
// }
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user