fix(产品管理、项目管理、登录密码校验、工作报告): 修复用户们提出的一系列问题。
This commit is contained in:
@@ -11,6 +11,10 @@ export type WorkbenchTodoPriority = 'high' | 'mid' | 'low';
|
||||
export interface WorkbenchTodoItemSource {
|
||||
id: string;
|
||||
category: WorkbenchTodoCategory;
|
||||
/** 左侧分类 tag 文案;不传时按 category 默认映射 */
|
||||
categoryLabel?: string;
|
||||
/** 左侧分类 tag 色调;不传时按 category 默认映射 */
|
||||
categoryTone?: WorkbenchTodoItem['categoryTone'];
|
||||
title: string;
|
||||
/** 创建时间,ISO 字符串。列表默认按这个升序 */
|
||||
createdTime: string;
|
||||
@@ -126,8 +130,8 @@ export function buildWorkbenchTodoItems(source: readonly WorkbenchTodoItemSource
|
||||
...item,
|
||||
deadlineLabel: formatDeadline(item.deadline),
|
||||
remainingDays: getRemainingDays(item.deadline),
|
||||
categoryLabel: meta.label,
|
||||
categoryTone: meta.tone
|
||||
categoryLabel: item.categoryLabel || meta.label,
|
||||
categoryTone: item.categoryTone || meta.tone
|
||||
} satisfies WorkbenchTodoItem;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -187,6 +187,14 @@ const OVERTIME_APPROVAL_ACTION_ICONS = {
|
||||
detail: markRaw(IconMdiEyeOutline)
|
||||
};
|
||||
|
||||
function getApprovalCategoryLabel(bizType: ApprovalBizType) {
|
||||
if (bizType === 'weekly') return '周报';
|
||||
if (bizType === 'monthly') return '月报';
|
||||
if (bizType === 'project') return '项目半月报';
|
||||
if (bizType === 'overtime_application') return '加班申请';
|
||||
return '待审批';
|
||||
}
|
||||
|
||||
const PERSONAL_ACTION_ICONS = {
|
||||
detail: markRaw(IconMdiEyeOutline),
|
||||
worklog: markRaw(IconMdiClipboardEditOutline),
|
||||
@@ -789,6 +797,7 @@ 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} 申请待审批`,
|
||||
createdTime: item.submitTime || item.createTime,
|
||||
deadline: item.submitTime || item.createTime,
|
||||
@@ -810,6 +819,7 @@ function buildWorkReportApprovalItems<T extends WorkReportRow>(
|
||||
rows.map(item => ({
|
||||
id: `${bizType}-${item.id}`,
|
||||
category: 'approval',
|
||||
categoryLabel: getApprovalCategoryLabel(bizType),
|
||||
title: `${reportTypeLabel} · ${bizType === 'weekly' ? formatWeeklyPeriodLabel(item) : formatPeriod(item)} 待审批`,
|
||||
createdTime: item.submitTime || item.createTime || '',
|
||||
deadline: item.submitTime || item.createTime || null,
|
||||
@@ -1439,7 +1449,7 @@ onActivated(refresh);
|
||||
|
||||
.workbench-todo__item {
|
||||
display: grid;
|
||||
grid-template-columns: 72px minmax(0, 1fr) auto;
|
||||
grid-template-columns: max-content minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
padding: 14px 16px;
|
||||
@@ -1460,17 +1470,20 @@ onActivated(refresh);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
width: 72px;
|
||||
min-width: 0;
|
||||
min-width: max-content;
|
||||
}
|
||||
|
||||
.workbench-todo__category {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 3px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.workbench-todo__category--sky {
|
||||
|
||||
Reference in New Issue
Block a user