已修复:

新增不受 100 条分页限制的课程选项接口。
培养方案、教学任务全部改用新接口。
教师课程申报使用独立接口,可查看全部启用课程。
学院教务仍只能使用公共课和本院专业课,不会越权看到外院专业课。
实际接口验证:
校级教务:152 门,其中公共课 29 门。
学院教务:40 门,其中公共课 29 门,其余为本院专业课。
教师申报:152 门,其中公共课 29 门。
This commit is contained in:
2026-07-24 20:44:06 +08:00 Unverified
parent 20ca205080
commit 6619179acc
5 changed files with 67 additions and 8 deletions
+2 -2
View File
@@ -294,12 +294,12 @@ async function deleteCourse(moduleId: string, item: any) {
onMounted(async () => {
const [optionRes, courseRes] = await Promise.all([
http.get('/curriculum-plans/filter-options'),
http.get('/courses', { params: { page: 1, pageSize: 100, isEnabled: true } }),
http.get('/courses/options'),
])
colleges.value = optionRes.data.colleges
majors.value = optionRes.data.majors
grades.value = optionRes.data.grades
courses.value = courseRes.data.items
courses.value = courseRes.data
if (isCollegeAdmin.value && auth.user?.collegeId) {
query.collegeId = auth.user.collegeId
}
+2 -4
View File
@@ -111,13 +111,11 @@ async function review() {
onMounted(async () => {
const requests: Promise<any>[] = [http.get('/base-data/terms')]
if (isTeacher.value) {
requests.push(http.get('/courses', {
params: { page: 1, pageSize: 100, isEnabled: true },
}))
requests.push(http.get('/teacher-course-applications/course-options'))
}
const [termRes, courseRes] = await Promise.all(requests)
terms.value = termRes.data
courses.value = courseRes?.data.items ?? []
courses.value = courseRes?.data ?? []
filters.academicTermId = terms.value.find((item) => item.isCurrent)?.id
await load()
})
+2 -2
View File
@@ -300,13 +300,13 @@ async function generatePublicTasks() {
onMounted(async () => {
const [termRes, courseRes, teacherRes, classRes, majorRes] = await Promise.all([
http.get('/base-data/terms'),
http.get('/courses', { params: { page: 1, pageSize: 100, isEnabled: true } }),
http.get('/courses/options'),
http.get('/personnel/teachers', { params: { page: 1, pageSize: 100, teacherStatus: 'Active' } }),
http.get('/base-data/classes'),
http.get('/base-data/majors'),
])
terms.value = termRes.data
courses.value = courseRes.data.items
courses.value = courseRes.data
teachers.value = teacherRes.data.items
classes.value = classRes.data
majors.value = majorRes.data