feat(personal-center): 将加班申请功能重构为业务学习功能。

fix(week-report): 修复周报中工作日志的显示问题。
feat(work-report): 点击编辑时,自动刷新出最新的内容。
This commit is contained in:
dk
2026-07-19 14:04:51 +08:00
parent f6cf03a34a
commit 7f31bed6f6
14 changed files with 106 additions and 64 deletions

View File

@@ -145,7 +145,7 @@ const approvalBizTabs: Array<{ key: ApprovalBizType; label: string }> = [
{ key: 'monthly', label: '月报' },
{ key: 'project', label: '项目半月报' },
{ key: 'performance', label: '我的绩效' },
{ key: 'overtime_application', label: '加班申请' }
{ key: 'overtime_application', label: '业务学习' }
];
const hasWorkReportApprovePermission = computed(() => hasButtonPermission('project:work-report:approve'));
@@ -224,7 +224,7 @@ const performanceActionVisible = ref(false);
const currentPerformanceSheet = ref<Api.Performance.Sheet.Sheet | null>(null);
const currentPerformanceActionType = ref<PerformanceApprovalActionType>('confirm');
// 批量审批选中状态(存原始加班申请 id避免映射转换
// 批量审批选中状态(存原始业务学习 id避免映射转换
const selectedOvertimeIds = ref<Set<string>>(new Set());
const APPROVAL_ENTRY_ICON = markRaw(IconMdiClipboardCheckOutline);
@@ -234,7 +234,7 @@ function getApprovalCategoryLabel(bizType: ApprovalBizType) {
if (bizType === 'monthly') return '月报';
if (bizType === 'project') return '项目半月报';
if (bizType === 'performance') return '我的绩效';
if (bizType === 'overtime_application') return '加班申请';
if (bizType === 'overtime_application') return '业务学习';
return '待审批';
}
@@ -786,7 +786,7 @@ async function handleOvertimeActionSubmit(payload: { actionType: OvertimeApprova
}
overtimeDetailVisible.value = false;
window.$message?.success(payload.actionType === 'approve' ? '加班申请已通过' : '加班申请已退回');
window.$message?.success(payload.actionType === 'approve' ? '业务学习已通过' : '业务学习已退回');
await loadOvertimeApprovalItems();
}
@@ -902,7 +902,7 @@ watch(activeApprovalBizType, () => {
clearOvertimeSelection();
});
// 当前页加班申请是否全部选中(用于全选复选框状态)
// 当前页业务学习是否全部选中(用于全选复选框状态)
const allOvertimeItemsSelected = computed(() => {
const items = overtimeApprovalItems.value;
if (items.length === 0) return false;
@@ -980,11 +980,11 @@ async function loadOvertimeApprovalItems() {
data.list.map(item => ({
id: `overtime-application-${item.id}`,
category: 'approval',
categoryLabel: '加班申请',
title: `${item.applicantName} · ${item.overtimeDate.slice(5, 7)}加班 ${item.overtimeDuration} 申请待审批`,
categoryLabel: '业务学习',
title: `${item.applicantName} · ${item.overtimeDate.slice(5, 7)}学习 ${item.overtimeDuration} 申请待审批`,
createdTime: item.submitTime || item.createTime,
deadline: item.submitTime || item.createTime,
source: `加班申请 · ${item.applicantName}`,
source: `业务学习 · ${item.applicantName}`,
priority: 'mid',
approvalBizType: 'overtime_application',
approvalBizId: item.id
@@ -1198,7 +1198,7 @@ onActivated(refresh);
</div>
<div class="workbench-todo__content">
<!-- 批量操作栏加班申请待审批时显示 -->
<!-- 批量操作栏业务学习待审批时显示 -->
<div
v-if="
activeTab === 'approval' &&
@@ -1239,7 +1239,7 @@ onActivated(refresh);
}"
>
<div class="workbench-todo__leading">
<!-- 加班申请待审批时显示复选框 -->
<!-- 业务学习待审批时显示复选框 -->
<ElCheckbox
v-if="
activeTab === 'approval' &&