fix(课程管理):课程管理模块相关调整优化
deploy-hxtesting / build-and-deploy (push) Successful in 1m20s

1.”课程编号、课程名称、所属部门、说明、课程权限、分类、类型、线上/线下、讲师、时长、课件、试题、发布状态、创建时间、创建人“可滑动部分字段从左到右顺序”课程编号、课程名称、讲师、课件、试题、课程权限、分类、类型、线上/线下、时长、发布状态、创建时间、创建人、所属部门、说明“
2.增加一个字段适合人员作为备注字段承接”年培训计划“和”月培训计划“过来的”适合人员“信息只做展示用,支持用户自定义录入,
3.”课程权限“默认当前所示部门,“全部”选项放在下拉列最前面排在部门选项上面
4.列表右侧固定字段“状态”、“操作”宽度再收窄一些
5.审核时要校验“课程名称、所属部门、课程权限、课件”必填!所属部门默认当前录入人员所属部门支持修改,课程权限也是默认当前录入人员所属部门支持修改
This commit is contained in:
runny committed 2026-11-26 23:07:10 +08:00
1 parent 2f1cda34da
commit 0427a60bc3
13 files changed
+179 -49

No files matched your search

+5 -1
View File
@@ -1085,9 +1085,12 @@ func (h *Handler) syncDemandLecturerToLibrary(ctx context.Context, tenantID uint
category, suitable := trimSpace(d.Category), trimSpace(d.PostScope)
// 仅按需求侧非空字段判断差异(空值=未填,不覆盖课程管理已有值,防止
// 旧行误清讲师/分类);任一非空字段与条目不一致才回写并重置待核验。
// 适合人员备注(000165):需求「适合人员」变更同步到课程管理备注字段,
// 与存量 suitable_members 口径一并比较(老数据备注为空时首改会触发回写)。
changed := (hasLecturer && (item.LecturerID != lecturerID || item.LecturerExternal != lecturerExt)) ||
(category != "" && item.Category != category) ||
(suitable != "" && item.SuitableMembers != suitable)
(suitable != "" && item.SuitableMembers != suitable) ||
(suitable != "" && item.PostScope != suitable)
if !changed {
continue
}
@@ -1101,6 +1104,7 @@ func (h *Handler) syncDemandLecturerToLibrary(ctx context.Context, tenantID uint
}
if suitable != "" {
updated.SuitableMembers = suitable
updated.PostScope = suitable
}
if _, err := h.svc.SaveCourseLibraryItem(ctx, tenantID, &updated, updaterID); err != nil {
logger.Error(ctx, "Failed to sync demand course info to course library", err)
@@ -34,8 +34,11 @@ type saveCourseLibraryRequest struct {
SuitableMembers string `json:"suitable_members"`
// PermDeptIDs/PermUserIDs 课程权限(000163):可见部门/人员 id 列表(逗号
// 分隔);两者与 suitable_members 同时为空的存量课程沿用老口径。
PermDeptIDs string `json:"perm_dept_ids"`
PermUserIDs string `json:"perm_user_ids"`
PermDeptIDs string `json:"perm_dept_ids"`
PermUserIDs string `json:"perm_user_ids"`
// PostScope 适合人员备注(000165):自由文本只做展示,不参与权限过滤;
// 承接年/月培训计划的适合人员信息,并支持用户自定义录入。
PostScope string `json:"post_scope"`
Category string `json:"category"`
Type string `json:"type"`
Mode string `json:"mode"`
@@ -58,6 +61,7 @@ func toCourseLibrary(req saveCourseLibraryRequest) *types.TrainingCourseLibrary
SuitableMembers: req.SuitableMembers,
PermDeptIDs: req.PermDeptIDs,
PermUserIDs: req.PermUserIDs,
PostScope: req.PostScope,
Category: req.Category,
Type: req.Type,
Mode: req.Mode,