From e65870ac6eb66884b03fb6e95637e858aeda4fb6 Mon Sep 17 00:00:00 2001 From: wangzhibiao Date: Mon, 14 Sep 2026 15:20:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9F=B9=E8=AE=AD=EF=BC=9A?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8F=82=E8=AE=AD=E4=BA=BA=E5=91=98=E4=B8=8E?= =?UTF-8?q?=E6=8E=92=E8=AF=BE=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_ui/src/api/train/enrollment.js | 56 ++ build_ui/src/api/train/timetable.js | 44 + .../train/plan/components/EnrollmentPanel.vue | 586 ++++++++++++++ .../train/plan/components/TimetablePanel.vue | 755 ++++++++++++++++++ build_ui/src/views/train/plan/index.vue | 129 ++- 5 files changed, 1567 insertions(+), 3 deletions(-) create mode 100644 build_ui/src/api/train/enrollment.js create mode 100644 build_ui/src/api/train/timetable.js create mode 100644 build_ui/src/views/train/plan/components/EnrollmentPanel.vue create mode 100644 build_ui/src/views/train/plan/components/TimetablePanel.vue diff --git a/build_ui/src/api/train/enrollment.js b/build_ui/src/api/train/enrollment.js new file mode 100644 index 000000000..05675f22f --- /dev/null +++ b/build_ui/src/api/train/enrollment.js @@ -0,0 +1,56 @@ +import request from '@/utils/request' + +// 3.1 查看本期参训名单 (UC-06) 【P0】 +export function listPlanEnrollments(planId, query) { + return request({ + url: `/train/plans/${planId}/enrollments`, + method: 'get', + params: query + }) +} + +// 3.2 添加单名参训人员 (UC-04) 【P0】 +export function addPlanEnrollment(planId, data) { + return request({ + url: `/train/plans/${planId}/enrollments`, + method: 'post', + data: data + }) +} + +// 3.3 Excel批量导入参训人员 (UC-05) 【P0】 +export function importPlanEnrollments(planId, data) { + return request({ + url: `/train/plans/${planId}/enrollments/batch`, + method: 'post', + data: data, + headers: { + 'Content-Type': 'multipart/form-data' + } + }) +} + +// 3.4 获取参训档案详情 【P0】 +export function getEnrollmentDetail(enrollmentId) { + return request({ + url: `/train/enrollments/${enrollmentId}`, + method: 'get' + }) +} + +// 3.5 变更参训状态 【P1】 +export function updateEnrollmentStatus(enrollmentId, data) { + return request({ + url: `/train/enrollments/${enrollmentId}/status`, + method: 'put', + data: data + }) +} + +// 3.6 移除参训人员 【P1】 +export function removeEnrollment(enrollmentId) { + return request({ + url: `/train/enrollments/${enrollmentId}`, + method: 'delete' + }) +} diff --git a/build_ui/src/api/train/timetable.js b/build_ui/src/api/train/timetable.js new file mode 100644 index 000000000..5b0f4d333 --- /dev/null +++ b/build_ui/src/api/train/timetable.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 4.5 获取计划完整课表 (UC-11) 【P0】 +export function getPlanTimetable(planId) { + return request({ + url: `/train/plans/${planId}/timetable`, + method: 'get' + }) +} + +// 4.1 新增课次 (UC-07) 【P0】 +export function addLesson(planId, data) { + return request({ + url: `/train/plans/${planId}/lessons`, + method: 'post', + data: data + }) +} + +// 4.2 修改课次 (UC-08) 【P0】 +export function updateLesson(lessonId, data) { + return request({ + url: `/train/lessons/${lessonId}`, + method: 'put', + data: data + }) +} + +// 4.3 删除课次 (UC-09) 【P1】 +export function removeLesson(lessonId) { + return request({ + url: `/train/lessons/${lessonId}`, + method: 'delete' + }) +} + +// 4.4 排课冲突检查接口 (UC-10) 【P0】 +export function checkLessonConflict(data) { + return request({ + url: '/train/lessons/check-conflict', + method: 'post', + data: data + }) +} diff --git a/build_ui/src/views/train/plan/components/EnrollmentPanel.vue b/build_ui/src/views/train/plan/components/EnrollmentPanel.vue new file mode 100644 index 000000000..ec6981e9b --- /dev/null +++ b/build_ui/src/views/train/plan/components/EnrollmentPanel.vue @@ -0,0 +1,586 @@ + + + + + diff --git a/build_ui/src/views/train/plan/components/TimetablePanel.vue b/build_ui/src/views/train/plan/components/TimetablePanel.vue new file mode 100644 index 000000000..ad0d4272f --- /dev/null +++ b/build_ui/src/views/train/plan/components/TimetablePanel.vue @@ -0,0 +1,755 @@ + + + + + diff --git a/build_ui/src/views/train/plan/index.vue b/build_ui/src/views/train/plan/index.vue index 071e9ddae..5c175eb3a 100644 --- a/build_ui/src/views/train/plan/index.vue +++ b/build_ui/src/views/train/plan/index.vue @@ -69,9 +69,24 @@ >{{ scope.row.courseCount || 0 }} - - + + + + @@ -262,9 +364,15 @@ import { addPlan, completePlan, getPlan, listPlan, updatePlan } from '@/api/train/plan' import { listPlanCourses, configurePlanCourses, removePlanCourse } from '@/api/train/planCourse' import { listCourse } from '@/api/train/course' +import EnrollmentPanel from './components/EnrollmentPanel.vue' +import TimetablePanel from './components/TimetablePanel.vue' export default { name: 'Plan', + components: { + EnrollmentPanel, + TimetablePanel + }, data() { return { loading: true, @@ -317,7 +425,13 @@ export default { }, list: [] }, - selectedCourses: [] + selectedCourses: [], + // 计划综合详情对话框 + planDetailDialog: { + open: false, + activeTab: 'course', + plan: {} + } } }, created() { @@ -503,6 +617,15 @@ export default { this.loadPlanCourses(this.courseDialog.planId) this.getList() }).catch(() => {}) + }, + handleOpenPlanDetail(row, activeTab = 'course') { + this.planDetailDialog.plan = row + this.planDetailDialog.activeTab = activeTab + this.planDetailDialog.open = true + this.courseDialog.planId = row.planId + this.courseDialog.planName = row.planName + this.courseDialog.planStatus = row.planStatus + this.loadPlanCourses(row.planId) } } }