diff --git a/web/src/assets/styles/components/personal-workbench-responsive.css b/web/src/assets/styles/components/personal-workbench-responsive.css index be12f44..9231a54 100644 --- a/web/src/assets/styles/components/personal-workbench-responsive.css +++ b/web/src/assets/styles/components/personal-workbench-responsive.css @@ -96,7 +96,7 @@ } .progress-row { - grid-template-columns: minmax(126px, 0.9fr) minmax(270px, 1.35fr) minmax(86px, auto); + grid-template-columns: minmax(72px, 0.42fr) minmax(126px, 0.86fr) minmax(270px, 1.32fr) minmax(86px, auto); gap: 12px; } } @@ -325,15 +325,24 @@ /* 重点优化:费用进度行的网格区域(Grid Area)双行重构 */ .progress-row { display: grid; - grid-template-columns: 1fr 1fr; + grid-template-columns: minmax(70px, auto) 1fr minmax(74px, auto); grid-template-areas: - "identity result" - "steps steps"; + "time identity result" + "steps steps steps"; gap: 8px; padding: 10px 0; align-items: center; } + .progress-time { + grid-area: time; + width: 100%; + } + + .progress-time time { + font-size: 11.5px; + } + .progress-identity { grid-area: identity; width: 100%; diff --git a/web/src/assets/styles/components/personal-workbench.css b/web/src/assets/styles/components/personal-workbench.css index 764f38f..67eb13b 100644 --- a/web/src/assets/styles/components/personal-workbench.css +++ b/web/src/assets/styles/components/personal-workbench.css @@ -554,7 +554,7 @@ .progress-row { display: grid; - grid-template-columns: minmax(138px, 0.9fr) minmax(300px, 1.5fr) minmax(92px, auto); + grid-template-columns: minmax(78px, 0.44fr) minmax(138px, 0.86fr) minmax(300px, 1.46fr) minmax(92px, auto); align-items: center; gap: 12px; width: 100%; @@ -563,6 +563,7 @@ text-align: left; } +.progress-time, .progress-identity, .progress-result { min-width: 0; @@ -570,6 +571,28 @@ gap: 2px; } +.progress-time { + color: var(--workbench-muted); +} + +.progress-time time { + min-width: 0; + overflow: hidden; + color: var(--workbench-ink); + font-size: 12px; + font-weight: 850; + line-height: 1.2; + text-overflow: ellipsis; + white-space: nowrap; +} + +.progress-time small { + color: var(--workbench-muted); + font-size: 10px; + font-weight: 750; + line-height: 1.2; +} + .progress-result { justify-items: end; } diff --git a/web/src/components/business/PersonalWorkbench.vue b/web/src/components/business/PersonalWorkbench.vue index e8bcee3..22c6257 100644 --- a/web/src/components/business/PersonalWorkbench.vue +++ b/web/src/components/business/PersonalWorkbench.vue @@ -205,6 +205,11 @@ class="progress-row" @click="openWorkbenchTarget(item)" > + + + 更新 + + {{ item.id }} {{ item.title }} @@ -459,9 +464,26 @@ const visibleProgressItems = computed(() => { const rows = Array.isArray(props.workbenchSummary.progressItems) ? props.workbenchSummary.progressItems : [] - return rows.slice(0, 5) + return rows.slice(0, 5).map((item) => ({ + ...item, + displayTime: formatProgressTime(item?.updatedAt) + })) }) +function formatProgressTime(value) { + const text = String(value || '').trim() + if (!text) { + return '最近更新' + } + + const match = /^(\d{4})-(\d{2})-(\d{2})(?:[T\s](\d{2}):(\d{2}))?/.exec(text) + if (match) { + return match[4] ? `${match[2]}-${match[3]} ${match[4]}:${match[5]}` : `${match[2]}-${match[3]}` + } + + return text +} + function buildSelectedFileKey(file) { return [file?.name, file?.size, file?.lastModified, file?.type].join('__') } diff --git a/web/tests/personal-workbench-assistant.test.mjs b/web/tests/personal-workbench-assistant.test.mjs index 8979cc5..d010537 100644 --- a/web/tests/personal-workbench-assistant.test.mjs +++ b/web/tests/personal-workbench-assistant.test.mjs @@ -142,3 +142,13 @@ test('workbench submit shows intent recognition feedback before assistant opens' assert.match(workbench, /if \(open\) \{\s*clearPendingAction\(\)/) assert.match(workbench, /:readonly="isComposerPending"/) }) + +test('workbench progress rows show update time first', () => { + assert.match(workbench, /class="progress-time"/) + assert.match(workbench, /