From 571417f689a6ddf6aeb0074006ac36ddc19bf128 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 22 Oct 2026 08:46:35 +0000 Subject: [PATCH] =?UTF-8?q?style(dashboard):=20=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4=E5=8F=B3=E5=AF=B9=E9=BD=90?= =?UTF-8?q?=EF=BC=8C=E7=A9=BA=E5=80=BC=E7=95=99=E7=A9=BA=E5=B9=B6=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E6=95=B4=E7=BB=84=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/js/pages/manage/dashboard.vue | 27 ++++++++++++++----- .../assets/sass/pages/page-dashboard.scss | 20 ++++++++++++++ 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/resources/assets/js/pages/manage/dashboard.vue b/resources/assets/js/pages/manage/dashboard.vue index f50f215d1..9915e97c5 100644 --- a/resources/assets/js/pages/manage/dashboard.vue +++ b/resources/assets/js/pages/manage/dashboard.vue @@ -189,7 +189,7 @@ {{listEmptyText(group.type)}} -
+
{{$L('任务')}} @@ -243,7 +243,7 @@ {{deadlineText(item.end_at) || '—'}} + :title="item.end_at">{{deadlineText(item.end_at) || (windowPortrait ? '' : '—')}}
+ :class="[`group-${group.type}`, emptyColumnClass(groupList(group, quadLimit))]">
{{group.title}} @@ -283,9 +283,9 @@ class="status-pill" :class="item.flow_item_name ? item.flow_item_status : {end: !!item.complete_at}" @click.stop="openMenu($event, item)">{{item.flow_item_name || (item.complete_at ? $L('已完成') : $L('未完成'))}} - {{item.p_name || '—'}} - {{item.sub_num > 0 ? `${item.sub_complete}/${item.sub_num}` : '—'}} - {{deadlineText(item.end_at) || '—'}} + {{item.p_name || (windowPortrait ? '' : '—')}} + {{item.sub_num > 0 ? `${item.sub_complete}/${item.sub_num}` : (windowPortrait ? '' : '—')}} + {{deadlineText(item.end_at) || (windowPortrait ? '' : '—')}}
@@ -808,6 +808,21 @@ export default { return group.type === 'completed' ? this.completedLimit : this.groupLimit; }, + /** + * 移动端:当前显示的任务某一栏全部为空时,整栏隐藏 + * @param list + * @returns {object} + */ + emptyColumnClass(list) { + if (!this.windowPortrait) { + return {}; + } + return { + 'no-priority': !list.some(item => item.p_name), + 'no-end': !list.some(item => item.end_at), + }; + }, + listEmptyText(type) { switch (type) { case 'overdue': diff --git a/resources/assets/sass/pages/page-dashboard.scss b/resources/assets/sass/pages/page-dashboard.scss index 2c5b735dd..4322f868f 100644 --- a/resources/assets/sass/pages/page-dashboard.scss +++ b/resources/assets/sass/pages/page-dashboard.scss @@ -2082,6 +2082,19 @@ body.window-portrait { .cell-name .name-status { display: inline-block; } + + .t-end { + text-align: right; + } + } + + // 整组都没有截止时间时隐藏该栏 + .table-body.no-end .table-row { + grid-template-columns: 28px minmax(0, 1fr); + + .t-end { + display: none; + } } .table-all-empty { @@ -2126,6 +2139,13 @@ body.window-portrait { display: none; } .quad-priority { width: 16px; > span { display: none; } } + .t-end { text-align: right; } + } + + // 整个象限都没有优先级/截止时间时隐藏对应栏 + &.no-priority .quad-row .quad-priority, + &.no-end .quad-row .t-end { + display: none; } } }