dev-cl
parent
f6e98e71e2
commit
cc8da7e8e2
@ -0,0 +1,31 @@ |
|||||||
|
import request from '@/config/axios' |
||||||
|
|
||||||
|
// 创建
|
||||||
|
export const createCustomer = (data) => { |
||||||
|
return request.post({ url: '/admin-api/applet/xunjia/user/add', data, isSubmitForm: true }) |
||||||
|
} |
||||||
|
|
||||||
|
// 修改
|
||||||
|
export const updateCustomer = (data) => { |
||||||
|
return request.put({ url: '/admin-api/applet/xunjia/user/update', data }) |
||||||
|
} |
||||||
|
|
||||||
|
// 分页
|
||||||
|
export const getCustomerPage = (params) => { |
||||||
|
return request.get({ url: '/admin-api/applet/xunjia/user/page', params }) |
||||||
|
} |
||||||
|
|
||||||
|
// 删除
|
||||||
|
export const deleteCustomer = (userId) => { |
||||||
|
return request.delete({ url: '/admin-api/applet/xunjia/user/delete', params: { userId } }) |
||||||
|
} |
||||||
|
|
||||||
|
// 获取考试车型
|
||||||
|
export const getCustomerExamCarType = () => { |
||||||
|
return request.get({ url: '/admin-api/applet/xunjia/car/simple-list' }) |
||||||
|
} |
||||||
|
|
||||||
|
// 导入学员
|
||||||
|
export const importStudent = async (data) => { |
||||||
|
return await request.upload({ url: '/admin-api/applet/xunjia/user/import', data }) |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
import request from '@/config/axios' |
||||||
|
// 分页
|
||||||
|
export const getRecordPage = (data) => { |
||||||
|
return request.post({ url: '/admin-api/applet/xunjia/qestionTest/page', data }) |
||||||
|
} |
||||||
|
|
||||||
|
// 导出
|
||||||
|
export const exportRecord = (params) => { |
||||||
|
return request.download({ url: '/admin-api/applet/xunjia/qestionTest/export', params }) |
||||||
|
} |
@ -1,36 +0,0 @@ |
|||||||
import request from '@/config/axios' |
|
||||||
|
|
||||||
// 创建
|
|
||||||
export const createCustomer = (data) => { |
|
||||||
return request.post({ url: '/admin-api/tiku/customer/create', data, isSubmitForm: true }) |
|
||||||
} |
|
||||||
|
|
||||||
// 分页
|
|
||||||
export const getCustomerSimpleList = (params) => { |
|
||||||
return request.get({ url: '/admin-api/tiku/customer/list-all-simple', params }) |
|
||||||
} |
|
||||||
|
|
||||||
// 修改
|
|
||||||
export const updateCustomer = (data) => { |
|
||||||
return request.put({ url: '/admin-api/tiku/customer/update', data }) |
|
||||||
} |
|
||||||
|
|
||||||
// 分页
|
|
||||||
export const getCustomerPage = (params) => { |
|
||||||
return request.get({ url: '/admin-api/tiku/customer/page', params }) |
|
||||||
} |
|
||||||
|
|
||||||
// 详情
|
|
||||||
export const getCustomerDetail = (id) => { |
|
||||||
return request.get({ url: '/admin-api/tiku/customer/get', params: { id } }) |
|
||||||
} |
|
||||||
|
|
||||||
// 删除
|
|
||||||
export const deleteCustomer = (id) => { |
|
||||||
return request.delete({ url: '/admin-api/tiku/customer/delete', params: { id } }) |
|
||||||
} |
|
||||||
|
|
||||||
// 获取钉钉id
|
|
||||||
export const getDingUserId = (params) => { |
|
||||||
return request.get({ url: '/admin-api/tiku/customer/getDingTalkUserIdByMobile', params }) |
|
||||||
} |
|
@ -0,0 +1,165 @@ |
|||||||
|
<template> |
||||||
|
<div> |
||||||
|
<el-form :model="searchForm" inline @submit.prevent> |
||||||
|
<el-form-item> |
||||||
|
<el-input |
||||||
|
v-model="searchForm.userName" |
||||||
|
placeholder="请输入姓名" |
||||||
|
clearable |
||||||
|
@keyup.enter="handleQuery" |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item> |
||||||
|
<el-input |
||||||
|
v-model="searchForm.phone" |
||||||
|
placeholder="请输入手机号" |
||||||
|
clearable |
||||||
|
@keyup.enter="handleQuery" |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item> |
||||||
|
<el-input |
||||||
|
v-model="searchForm.idcard" |
||||||
|
placeholder="请输入身份证号" |
||||||
|
clearable |
||||||
|
@keyup.enter="handleQuery" |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item> |
||||||
|
<el-select |
||||||
|
v-model="searchForm.examType" |
||||||
|
placeholder="选择考试类型" |
||||||
|
clearable |
||||||
|
filterable |
||||||
|
@change="handleQuery" |
||||||
|
> |
||||||
|
<el-option |
||||||
|
v-for="item in carTypeOptions" |
||||||
|
:key="item.carTypeId" |
||||||
|
:label="item.carName" |
||||||
|
:value="item.carTypeId" |
||||||
|
/> |
||||||
|
</el-select> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item> |
||||||
|
<el-select |
||||||
|
v-model="searchForm.subject" |
||||||
|
placeholder="选择科目" |
||||||
|
clearable |
||||||
|
filterable |
||||||
|
@change="handleQuery" |
||||||
|
> |
||||||
|
<el-option label="科一" :value="1" /> |
||||||
|
<el-option label="科四" :value="4" /> |
||||||
|
</el-select> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item> |
||||||
|
<el-date-picker |
||||||
|
v-model="searchForm.examTime" |
||||||
|
type="daterange" |
||||||
|
range-separator="-" |
||||||
|
start-placeholder="考试日期" |
||||||
|
end-placeholder="日期" |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item> |
||||||
|
<el-button @click="handleQuery" v-hasPermi="['customer:exam-record:list']">搜索</el-button> |
||||||
|
<el-button @click="handleExport" v-hasPermi="['customer:exam-record:export']"> |
||||||
|
导出 |
||||||
|
</el-button> |
||||||
|
</el-form-item> |
||||||
|
</el-form> |
||||||
|
<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="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="subject" min-width="120" /> |
||||||
|
<el-table-column label="考试得分" prop="score" min-width="120" /> |
||||||
|
<el-table-column label="交卷时间" prop="createTime" min-width="120" /> |
||||||
|
<el-table-column label="考试时长" prop="testTimeStr" min-width="120" /> |
||||||
|
</el-table> |
||||||
|
<Pagination |
||||||
|
:total="total" |
||||||
|
v-model:page="searchForm.pageNo" |
||||||
|
v-model:limit="searchForm.pageSize" |
||||||
|
@pagination="getList" |
||||||
|
/> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script setup name="ExamRecord"> |
||||||
|
import { removeNullField } from '@/utils' |
||||||
|
import * as ExamRecordApi from '@/api/customer/examRecord.js' |
||||||
|
|
||||||
|
import { getCustomerExamCarType } from '@/api/customer/customer.js' |
||||||
|
|
||||||
|
const message = useMessage() // 消息弹窗 |
||||||
|
const { t } = useI18n() // 国际化 |
||||||
|
|
||||||
|
const carTypeOptions = ref([]) |
||||||
|
|
||||||
|
const searchForm = ref({ |
||||||
|
userName: undefined, |
||||||
|
examType: 1011, |
||||||
|
pageNo: 1, |
||||||
|
pageSize: 20 |
||||||
|
}) |
||||||
|
|
||||||
|
onMounted(() => { |
||||||
|
getCustomerExamCarType().then((res) => { |
||||||
|
carTypeOptions.value = res |
||||||
|
}) |
||||||
|
|
||||||
|
handleQuery() |
||||||
|
}) |
||||||
|
|
||||||
|
/** 搜索按钮操作 */ |
||||||
|
const handleQuery = () => { |
||||||
|
searchForm.value.pageNo = 1 |
||||||
|
getList() |
||||||
|
} |
||||||
|
|
||||||
|
const loading = ref(false) |
||||||
|
const tableList = ref([]) |
||||||
|
const total = ref(0) |
||||||
|
/** 查询列表 */ |
||||||
|
const getList = async () => { |
||||||
|
loading.value = true |
||||||
|
try { |
||||||
|
if (searchForm.value.examTime && searchForm.value.examTime.length > 0) { |
||||||
|
searchForm.value.startTime = searchForm.value.examTime[0] |
||||||
|
searchForm.value.endTime = searchForm.value.examTime[1] |
||||||
|
} else { |
||||||
|
searchForm.value.startTime = undefined |
||||||
|
searchForm.value.endTime = undefined |
||||||
|
} |
||||||
|
const data = await ExamRecordApi.getRecordPage(removeNullField(searchForm.value)) |
||||||
|
tableList.value = data.list |
||||||
|
total.value = data.total |
||||||
|
} finally { |
||||||
|
loading.value = false |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function handleExport() { |
||||||
|
const params = removeNullField(searchForm.value) |
||||||
|
if (params.examTime && params.examTime.length > 0) { |
||||||
|
params.startTime = params.examTime[0] |
||||||
|
params.endTime = params.examTime[1] |
||||||
|
} else { |
||||||
|
params.startTime = undefined |
||||||
|
params.endTime = undefined |
||||||
|
} |
||||||
|
ExamRecordApi.exportRecord(params).then((res) => { |
||||||
|
if (res.code === 200) { |
||||||
|
message.success('导出成功') |
||||||
|
} else { |
||||||
|
message.error(res.msg) |
||||||
|
} |
||||||
|
}) |
||||||
|
} |
||||||
|
</script> |
||||||
|
|
||||||
|
<style lang="scss" scoped></style> |
Loading…
Reference in new issue