添加排课功能

This commit is contained in:
2026-09-17 15:58:33 +08:00
parent 80e91707e6
commit a958bcf059
8 changed files with 1173 additions and 2 deletions
@@ -0,0 +1,60 @@
import request from '@/utils/request'
/**
* 实施排课窗口:班次头 + 课程列表 + 周次×星期×节次格子。
* 后端:SchedulingWindowController /schedulingWindow
*/
// 排课窗组合视图
export function getSchedulingView(xydxqbh) {
return request({
url: '/schedulingWindow/view',
method: 'get',
params: { xydxqbh }
})
}
// 安排所选节次(硬冲突格忽略并返回原因;软提示格照常安排)
export function arrangeLessons(data) {
return request({
url: '/schedulingWindow/arrange',
method: 'post',
data
})
}
// 删除所选节次(仅删除该课程在这些格上的课次;已提交实施计划的课次会被拒绝)
export function deleteLessonCells(data) {
return request({
url: '/schedulingWindow/deleteCells',
method: 'post',
data
})
}
// 删除该课程的全部节次(课程仍保留在列表)
export function clearCourseLessons(sskcbh) {
return request({
url: '/schedulingWindow/clearCourse',
method: 'post',
params: { sskcbh }
})
}
// 彻底删除运行课程(课次与列表项一起删,编制侧任务保留)
export function deleteRunningCourse(sskcbh) {
return request({
url: '/schedulingWindow/deleteCourse',
method: 'post',
params: { sskcbh }
})
}
// 排课日志(按课程,可叠加操作类型)
export function listSchedulingLogs(sskcbh, czlx) {
return request({
url: '/schedulingWindow/logs',
method: 'get',
params: { sskcbh, czlx }
})
}
File diff suppressed because it is too large Load Diff
@@ -121,11 +121,12 @@
</template>
</el-table-column>
<el-table-column prop="bz" label="备注" min-width="120" align="left" header-align="center" show-overflow-tooltip />
<el-table-column label="操作" width="250" align="center" fixed="right">
<el-table-column label="操作" width="310" align="center" fixed="right">
<template slot-scope="{ row }">
<el-button type="text" size="small" @click="handleEdit(row)">编辑</el-button>
<el-button type="text" size="small" @click="handleEditEventCalendar(row)">班历</el-button>
<el-button type="text" size="small" @click="handleEditCalendar(row)">教学任务</el-button>
<el-button type="text" size="small" @click="handleSchedule(row)">排课</el-button>
<el-button type="text" size="small" class="text-danger" @click="handleDeleteRow(row)">删除</el-button>
</template>
</el-table-column>
@@ -637,6 +638,21 @@ export default {
this.eventCalendarVisible = true
},
// 跳转到排课窗口,并带上当前班次学期编号
handleSchedule(row) {
const target = row || this.currentRow
if (!target) {
this.$message.warning('请先在列表中选择一条班次学期信息')
return
}
const bh = target.bh || target.xydxqbh
if (!bh) {
this.$message.warning('该班次学期缺少编号,无法进入排课窗口')
return
}
this.$router.push({ path: '/schedule/schedulingWindow', query: { xydxqbh: bh } })
},
handleAllocation(row) {
const target = row || this.currentRow
if (!target) {