|
@@ -30,15 +30,15 @@
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
- <a-form-item label="专业" name="majorId">
|
|
|
|
|
|
|
+ <!-- <a-form-item label="专业" name="majorId">
|
|
|
<a-select v-model:value="form.majorId" placeholder="请选择专业" allowClear @change="handleMajorChange">
|
|
<a-select v-model:value="form.majorId" placeholder="请选择专业" allowClear @change="handleMajorChange">
|
|
|
<a-select-option v-for="item in majorList" :key="item.id" :value="item.id">
|
|
<a-select-option v-for="item in majorList" :key="item.id" :value="item.id">
|
|
|
{{ item.majorName }}
|
|
{{ item.majorName }}
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
- </a-form-item>
|
|
|
|
|
|
|
+ </a-form-item> -->
|
|
|
<a-form-item label="课程" name="courseId">
|
|
<a-form-item label="课程" name="courseId">
|
|
|
- <a-select v-model:value="form.courseId" placeholder="请选择课程" allowClear :disabled="!form.majorId">
|
|
|
|
|
|
|
+ <a-select v-model:value="form.courseId" placeholder="请选择课程" allowClear :disabled="!form.semesterId">
|
|
|
<a-select-option v-for="item in courseList" :key="item.courseId" :value="item.courseId">
|
|
<a-select-option v-for="item in courseList" :key="item.courseId" :value="item.courseId">
|
|
|
{{ item.courseName }}
|
|
{{ item.courseName }}
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
@@ -91,6 +91,7 @@
|
|
|
v-model:value="paperPage.queryParam.paperType"
|
|
v-model:value="paperPage.queryParam.paperType"
|
|
|
placeholder="请选择试卷类型"
|
|
placeholder="请选择试卷类型"
|
|
|
@change="paperTypeChange"
|
|
@change="paperTypeChange"
|
|
|
|
|
+ disabled
|
|
|
>
|
|
>
|
|
|
<a-select-option v-for="item in paperTypeEnum" :key="item.key" :value="item.key">
|
|
<a-select-option v-for="item in paperTypeEnum" :key="item.key" :value="item.key">
|
|
|
{{ item.value }}
|
|
{{ item.value }}
|
|
@@ -111,11 +112,11 @@
|
|
|
:pagination="false"
|
|
:pagination="false"
|
|
|
style="margin-top: 16px"
|
|
style="margin-top: 16px"
|
|
|
>
|
|
>
|
|
|
- <template #bodyCell="{ column, record }">
|
|
|
|
|
|
|
+ <!-- <template #bodyCell="{ column, record }">
|
|
|
<template v-if="column.key === 'subjectId'">
|
|
<template v-if="column.key === 'subjectId'">
|
|
|
{{ subjectEnumFormat(record.subjectId) }}
|
|
{{ subjectEnumFormat(record.subjectId) }}
|
|
|
</template>
|
|
</template>
|
|
|
- </template>
|
|
|
|
|
|
|
+ </template> -->
|
|
|
</a-table>
|
|
</a-table>
|
|
|
<a-pagination
|
|
<a-pagination
|
|
|
v-show="paperPage.total > 0"
|
|
v-show="paperPage.total > 0"
|
|
@@ -163,8 +164,8 @@
|
|
|
startTime: null,
|
|
startTime: null,
|
|
|
endTime: null,
|
|
endTime: null,
|
|
|
examStatus: 0,
|
|
examStatus: 0,
|
|
|
- semesterId: null,
|
|
|
|
|
- majorId: null
|
|
|
|
|
|
|
+ semesterId: null
|
|
|
|
|
+ // majorId: null
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const rules = {
|
|
const rules = {
|
|
@@ -193,8 +194,8 @@
|
|
|
selectedPaper: null,
|
|
selectedPaper: null,
|
|
|
showDialog: false,
|
|
showDialog: false,
|
|
|
queryParam: {
|
|
queryParam: {
|
|
|
- subjectId: null,
|
|
|
|
|
- paperType: null,
|
|
|
|
|
|
|
+ paperId: null,
|
|
|
|
|
+ paperType: '5',
|
|
|
pageIndex: 1,
|
|
pageIndex: 1,
|
|
|
pageSize: 5
|
|
pageSize: 5
|
|
|
},
|
|
},
|
|
@@ -219,21 +220,21 @@
|
|
|
courseList.value = []
|
|
courseList.value = []
|
|
|
|
|
|
|
|
// 如果学期和专业都已选择,则查询课程列表
|
|
// 如果学期和专业都已选择,则查询课程列表
|
|
|
- if (value && form.majorId) {
|
|
|
|
|
|
|
+ if (value) {
|
|
|
loadCourseList()
|
|
loadCourseList()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 专业变更处理函数
|
|
// 专业变更处理函数
|
|
|
- const handleMajorChange = (value) => {
|
|
|
|
|
- form.courseId = null
|
|
|
|
|
- courseList.value = []
|
|
|
|
|
|
|
+ // const handleMajorChange = (value) => {
|
|
|
|
|
+ // form.courseId = null
|
|
|
|
|
+ // courseList.value = []
|
|
|
|
|
|
|
|
- // 如果学期和专业都已选择,则查询课程列表
|
|
|
|
|
- if (value && form.semesterId) {
|
|
|
|
|
- loadCourseList()
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // // 如果学期和专业都已选择,则查询课程列表
|
|
|
|
|
+ // if (value && form.semesterId) {
|
|
|
|
|
+ // loadCourseList()
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
// 加载课程列表
|
|
// 加载课程列表
|
|
|
const loadCourseList = () => {
|
|
const loadCourseList = () => {
|
|
@@ -242,8 +243,7 @@
|
|
|
// 根据选择的学期和专业加载课程列表
|
|
// 根据选择的学期和专业加载课程列表
|
|
|
resourceAuditApi
|
|
resourceAuditApi
|
|
|
.courseAllList({
|
|
.courseAllList({
|
|
|
- semesterId: form.semesterId,
|
|
|
|
|
- majorId: form.majorId
|
|
|
|
|
|
|
+ semesterId: form.semesterId
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -267,7 +267,7 @@
|
|
|
|
|
|
|
|
// 试卷类型变更
|
|
// 试卷类型变更
|
|
|
const paperTypeChange = () => {
|
|
const paperTypeChange = () => {
|
|
|
- paperPage.queryParam.subjectId = null
|
|
|
|
|
|
|
+ paperPage.queryParam.paperId = null
|
|
|
form.paperId = null
|
|
form.paperId = null
|
|
|
selectedPaperName.value = ''
|
|
selectedPaperName.value = ''
|
|
|
}
|
|
}
|
|
@@ -290,7 +290,7 @@
|
|
|
}
|
|
}
|
|
|
delete params.pageIndex
|
|
delete params.pageIndex
|
|
|
delete params.pageSize
|
|
delete params.pageSize
|
|
|
- const data = await examPaperApi.pageList(params)
|
|
|
|
|
|
|
+ const data = await examPaperApi.selectExamList(params)
|
|
|
const re = data
|
|
const re = data
|
|
|
paperPage.tableData = re.records
|
|
paperPage.tableData = re.records
|
|
|
paperPage.total = re.total
|
|
paperPage.total = re.total
|
|
@@ -360,7 +360,7 @@
|
|
|
form.examName = ''
|
|
form.examName = ''
|
|
|
form.paperId = null
|
|
form.paperId = null
|
|
|
form.semesterId = null // 重置学期
|
|
form.semesterId = null // 重置学期
|
|
|
- form.majorId = null // 重置专业
|
|
|
|
|
|
|
+ // form.majorId = null // 重置专业
|
|
|
form.courseId = null
|
|
form.courseId = null
|
|
|
form.startTime = null
|
|
form.startTime = null
|
|
|
form.endTime = null
|
|
form.endTime = null
|
|
@@ -392,7 +392,7 @@
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
// 如果是编辑模式,需要根据已有数据加载相应的课程列表
|
|
// 如果是编辑模式,需要根据已有数据加载相应的课程列表
|
|
|
- if (re.semesterId && re.majorId) {
|
|
|
|
|
|
|
+ if (re.semesterId) {
|
|
|
// 直接加载课程列表
|
|
// 直接加载课程列表
|
|
|
loadCourseList()
|
|
loadCourseList()
|
|
|
}
|
|
}
|
|
@@ -421,22 +421,22 @@
|
|
|
semesterLoading()
|
|
semesterLoading()
|
|
|
})
|
|
})
|
|
|
// 加载专业
|
|
// 加载专业
|
|
|
- const majorLoading = message.loading('正在加载专业列表...', 0)
|
|
|
|
|
- resourceAuditApi
|
|
|
|
|
- .majordownList()
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- if (res.code === 200) {
|
|
|
|
|
- majorList.value = res.data
|
|
|
|
|
- } else {
|
|
|
|
|
- message.error('加载专业列表失败:' + (res.msg || '未知错误'))
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch((err) => {
|
|
|
|
|
- message.error('加载专业列表失败:' + (err.message || '网络错误'))
|
|
|
|
|
- })
|
|
|
|
|
- .finally(() => {
|
|
|
|
|
- majorLoading()
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // const majorLoading = message.loading('正在加载专业列表...', 0)
|
|
|
|
|
+ // resourceAuditApi
|
|
|
|
|
+ // .majordownList()
|
|
|
|
|
+ // .then((res) => {
|
|
|
|
|
+ // if (res.code === 200) {
|
|
|
|
|
+ // majorList.value = res.data
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // message.error('加载专业列表失败:' + (res.msg || '未知错误'))
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .catch((err) => {
|
|
|
|
|
+ // message.error('加载专业列表失败:' + (err.message || '网络错误'))
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .finally(() => {
|
|
|
|
|
+ // majorLoading()
|
|
|
|
|
+ // })
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|