feat: exam/修改考试考试开始时间 和 删除分类功能

This commit is contained in:
zty 2024-12-19 15:10:36 +08:00
parent 0b5e7fe162
commit 5f398d6540
4 changed files with 9 additions and 7 deletions

View File

@ -27,7 +27,7 @@ export function updateQuestioncat(id, data) {
//删除题目类型 //删除题目类型
export function deleteQuestioncat(id) { export function deleteQuestioncat(id) {
return request({ return request({
url: `/exam/question/${id}/`, url: `/exam/questioncat/${id}/`,
method: 'delete' method: 'delete'
}) })
} }

View File

@ -22,9 +22,9 @@
align="right" align="right"
unlink-panels unlink-panels
range-separator="" range-separator=""
start-placeholder="开始日期" start-placeholder="考试开始日期"
end-placeholder="结束日期" end-placeholder="考试结束日期"
:picker-options="pickerOptions"> >
</el-date-picker> </el-date-picker>
<el-input <el-input
v-model="listQuery.search" v-model="listQuery.search"
@ -275,8 +275,8 @@
}).catch(e=>{loading.close()}) }).catch(e=>{loading.close()})
}, },
setTimeRange(){ setTimeRange(){
this.listQuery.start = this.value[0], this.listQuery.create_time__gte = this.value[0],
this.listQuery.end = this.value[1], this.listQuery.create_time__lte = this.value[1],
this.getList() this.getList()
}, },
changeSort (val) { changeSort (val) {

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div style="margin-top:10px"> <div style="margin-top:10px">
<el-select v-model="listQuery.questioncat" placeholder="题目分类" clearable style="width: 200px" class="filter-item" <el-select v-model="listQuery.questioncat" placeholder="题目分类" clearable filterable style="width: 200px" class="filter-item"
@change="handleFilter"> @change="handleFilter">
<el-option v-for="item in questioncatData" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in questioncatData" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>

View File

@ -8,6 +8,8 @@ class ExamRecordFilter(filters.FilterSet):
model = ExamRecord model = ExamRecord
fields = { fields = {
'start_time': ['exact', 'gte', 'lte'], 'start_time': ['exact', 'gte', 'lte'],
'end_time': ['exact', 'gte', 'lte'],
'create_time': ['exact', 'gte', 'lte'],
'is_pass': ['exact'], 'is_pass': ['exact'],
'type': ['exact'], 'type': ['exact'],
'is_submited': ['exact'], 'is_submited': ['exact'],