feat(projects): 工作台小组件设计

This commit is contained in:
2026-05-28 08:20:01 +08:00
parent 3988eaf910
commit 4ed4b537ad
54 changed files with 4726 additions and 2720 deletions

View File

@@ -57,7 +57,7 @@ const mainTabs: Array<{ key: WorkbenchTodoMainTab; label: string }> = [
{ key: 'task', label: '任务' },
{ key: 'ticket', label: '工单' },
{ key: 'personal', label: '个人事项' },
{ key: 'review', label: '待审' }
{ key: 'approval', label: '待审' }
];
const deadlineFilters: Array<{ key: Exclude<WorkbenchTodoDeadlineFilter, null>; label: string }> = [
@@ -85,7 +85,7 @@ const tabCounts = computed(() => {
task: 0,
ticket: 0,
personal: 0,
review: 0
approval: 0
};
allItems.value.forEach(item => {
counts[item.category] += 1;
@@ -99,7 +99,7 @@ const tabOverdueCount = computed(() => {
task: 0,
ticket: 0,
personal: 0,
review: 0
approval: 0
};
allItems.value.forEach(item => {
if (!isWorkbenchTodoOverdue(item)) return;
@@ -144,6 +144,7 @@ watch([activeTab, activeDeadlineFilter, activeSort], () => {
function handleSelectTab(key: WorkbenchTodoMainTab) {
if (activeTab.value === key) return;
activeTab.value = key;
if (key === 'approval') activeDeadlineFilter.value = null;
activeDeadlineFilter.value = null;
if (key !== 'task' && activeSort.value === 'priority') {
activeSort.value = 'deadline';
@@ -209,7 +210,7 @@ function getDeadlineToneClass(item: WorkbenchTodoItem) {
</div>
<div class="workbench-todo__filters">
<div class="workbench-todo__filters-left">
<div v-if="activeTab !== 'approval'" class="workbench-todo__filters-left">
<button
v-for="filter in deadlineFilters"
:key="filter.key"
@@ -221,6 +222,7 @@ function getDeadlineToneClass(item: WorkbenchTodoItem) {
{{ filter.label }}
</button>
</div>
<div v-else></div>
<ElDropdown trigger="click" placement="bottom-end" @command="handleSelectSort">
<span class="workbench-todo__sort">