fix(bug):1.帮我检查一下平台中有多少处显示部门地方这种“e10-、、、、”字样拿掉不要显示
deploy-hxtesting / build-and-deploy (push) Successful in 1m28s
deploy-hxtesting / build-and-deploy (push) Successful in 1m28s
2.月培训计划发布时授课时间默认空着点击【发布】时提示先维护授课时间,(不要默认年培训计划) 3.授课地点默认“年度计划”所设置的授课地点,如果年培训计划没有维护发布时也要必填 4.点击【发布】时要校验参加人员不能为空!默认为所属部门下的人员~ 认真阅读相关代码~
This commit is contained in:
1 parent
6cdcc4f221
commit
858c352991
16 files changed
+421
-89
No files matched your search
@@ -537,6 +537,8 @@ import * as XLSX from 'xlsx'
|
||||
import { COURSE_LIBRARY_TEMPLATE_KEY, QUESTION_TEMPLATE_KEY, downloadTrainingTemplate } from '../trainingTemplates'
|
||||
import { apiErrorMessage, get } from '@/utils/request'
|
||||
import { fmtBeijingTime } from '@/utils/datetime'
|
||||
// 部门名展示清洗:剥离企微同步残留的「e10-<ID>」字样(2026-11 需求)
|
||||
import { cleanDeptName, cleanDeptNameText } from '@/utils/deptName'
|
||||
import TrainingPagination from './TrainingPagination.vue'
|
||||
import { useTrainingPager } from './useTrainingPager'
|
||||
import {
|
||||
@@ -746,13 +748,15 @@ const permToFields = () => {
|
||||
}
|
||||
|
||||
// 列表「课程权限」列展示文本:perm 两列解析为「部门、人员」;存量行回退原文本
|
||||
// (2026-11 需求:e10-<ID> 残留部门已从部门表过滤,查不到的 id 跳过不回显原文)
|
||||
const permissionText = (row: TrainingLibraryCourse) => {
|
||||
if ((row.perm_dept_ids || '').trim() || (row.perm_user_ids || '').trim()) {
|
||||
const deptNames = (row.perm_dept_ids || '').split(',').filter(Boolean).map((id) => depts.value.find((d) => d.id === id)?.name || id)
|
||||
const deptNames = (row.perm_dept_ids || '').split(',').filter(Boolean)
|
||||
.map((id) => cleanDeptName(depts.value.find((d) => d.id === id)?.name)).filter(Boolean)
|
||||
const userNames = (row.perm_user_ids || '').split(',').filter(Boolean).map(memberDisplayName)
|
||||
return [...deptNames, ...userNames].join('、')
|
||||
}
|
||||
return row.suitable_members || ''
|
||||
return cleanDeptNameText(row.suitable_members)
|
||||
}
|
||||
|
||||
// 课程权限是否已设置(审核前置,000163:权限必填)
|
||||
@@ -867,14 +871,19 @@ const loadAll = async () => {
|
||||
// 本人档案:新增课程「所属部门」默认当前登录用户所在部门
|
||||
getMyProfile().catch(() => null),
|
||||
])
|
||||
items.value = unwrap(lib)?.items || []
|
||||
// 2026-11 需求:主办部门列/适合人员剥离企微同步残留的「e10-<ID>」字样
|
||||
items.value = (unwrap<{ items: TrainingLibraryCourse[] }>(lib)?.items || []).map((row) => ({
|
||||
...row,
|
||||
owner_dept_name: cleanDeptName(row.owner_dept_name),
|
||||
suitable_members: cleanDeptNameText(row.suitable_members),
|
||||
}))
|
||||
members.value = m || []
|
||||
depts.value = (d && unwrap(d)) || []
|
||||
configCategories.value = cats
|
||||
const meBody = me && unwrap(me)
|
||||
myDeptId.value = meBody?.dept_id || ''
|
||||
myUserId.value = meBody?.user_id || ''
|
||||
meDeptName.value = meBody?.dept_name || ''
|
||||
meDeptName.value = cleanDeptName(meBody?.dept_name)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user