feat(web): 工作台 AI 模式与差旅/风险建议交互优化
- 新增 PersonalWorkbenchAiMode 组件、AI 侧边栏与 orb 机器人视觉资源 - 新增 aiApplicationDraftModel / aiExpenseDraftModel / aiWorkbenchConversationStore 及业务准入 aiSidebarBusinessAccess,支撑 AI 模式下的申请与报销草稿 - 顶栏、侧边栏、工作台样式重构,适配 AI 模式切换与响应式布局 - 同步 steward plan/off_topic、差旅报销引导流、风险建议卡片等测试
This commit is contained in:
@@ -1,77 +1,40 @@
|
||||
/* 1080p / 小高度屏:进一步压缩 AI 助手卡片高度 (排除手机端) */
|
||||
/* 1080p / 小高度屏:让传统模式顶部趋势卡更紧凑 */
|
||||
@media (max-height: 980px) and (min-width: 761px) {
|
||||
.workbench {
|
||||
--hero-padding-top: 20px;
|
||||
--hero-padding-bottom: 20px;
|
||||
--hero-title-size: 28px;
|
||||
--hero-copy-gap: 16px;
|
||||
--hero-title-bottom-gap: 10px;
|
||||
--composer-min-height: 108px;
|
||||
--composer-textarea-height: 48px;
|
||||
--composer-padding-block: 10px;
|
||||
--quick-prompts-gap-top: 8px;
|
||||
--capability-row-height: 96px;
|
||||
--hero-title-size: 31px;
|
||||
--trend-card-min-height: 232px;
|
||||
--capability-row-height: 106px;
|
||||
gap: 9px;
|
||||
}
|
||||
|
||||
.assistant-hero {
|
||||
--assistant-bg-position: right center;
|
||||
--assistant-decor-width: clamp(760px, 66vw, 980px);
|
||||
--assistant-decor-opacity: 0.86;
|
||||
padding: var(--hero-padding-top) 18px var(--hero-padding-bottom) 44px;
|
||||
.workbench-trend-hero {
|
||||
padding: 24px 20px 10px 20px;
|
||||
}
|
||||
|
||||
.assistant-copy p {
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 0;
|
||||
.workbench-trend-card {
|
||||
}
|
||||
|
||||
.assistant-composer textarea {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.composer-icon-button,
|
||||
.composer-send-button {
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.composer-send-button {
|
||||
width: 50px;
|
||||
.trend-chart-panel {
|
||||
min-height: 128px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 2K 宽屏但内容区仍偏高时,略收紧(避免 hero 独占过多纵向空间) */
|
||||
@media (min-width: 1920px) and (max-height: 1100px) {
|
||||
.workbench {
|
||||
--hero-padding-top: 22px;
|
||||
--hero-padding-bottom: 22px;
|
||||
--hero-title-size: 29px;
|
||||
--composer-min-height: 114px;
|
||||
--composer-textarea-height: 50px;
|
||||
--capability-row-height: 100px;
|
||||
--hero-title-size: 32px;
|
||||
--trend-card-min-height: 236px;
|
||||
--capability-row-height: 108px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1440px) {
|
||||
.workbench {
|
||||
grid-template-rows: auto var(--capability-row-height) minmax(0, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.assistant-hero {
|
||||
--assistant-bg-position: right center;
|
||||
--assistant-decor-width: clamp(760px, 66vw, 980px);
|
||||
--assistant-decor-opacity: 0.9;
|
||||
padding: var(--hero-padding-top) 18px var(--hero-padding-bottom) 44px;
|
||||
}
|
||||
|
||||
.assistant-copy {
|
||||
width: min(940px, 92%);
|
||||
}
|
||||
|
||||
.assistant-copy h1 {
|
||||
font-size: 33px;
|
||||
.trend-summary-panel h1 {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.capability-grid--privileged {
|
||||
@@ -83,7 +46,7 @@
|
||||
}
|
||||
|
||||
.capability-card {
|
||||
padding: 17px 12px 17px 22px;
|
||||
padding: 18px 14px 18px 22px;
|
||||
}
|
||||
|
||||
.capability-copy {
|
||||
@@ -109,24 +72,15 @@
|
||||
.workbench {
|
||||
height: auto;
|
||||
min-height: 100%;
|
||||
grid-template-rows: auto auto auto;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.assistant-hero {
|
||||
--assistant-bg-position: right center;
|
||||
--assistant-decor-width: clamp(620px, 74vw, 860px);
|
||||
--assistant-decor-opacity: 0.62;
|
||||
--assistant-readability-mask:
|
||||
linear-gradient(90deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.5) 58%, rgba(255, 255, 255, 0.06) 100%);
|
||||
--assistant-theme-tint:
|
||||
linear-gradient(135deg, rgba(var(--theme-primary-rgb, 58, 124, 165), 0.12) 0%, rgba(var(--theme-primary-rgb, 58, 124, 165), 0.04) 58%, rgba(var(--theme-primary-rgb, 58, 124, 165), 0.09) 100%);
|
||||
backdrop-filter: blur(10px) saturate(1.12);
|
||||
-webkit-backdrop-filter: blur(10px) saturate(1.12);
|
||||
.workbench-trend-card {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.assistant-copy {
|
||||
width: min(820px, 92%);
|
||||
.trend-summary-panel {
|
||||
align-content: start;
|
||||
}
|
||||
|
||||
.capability-grid--privileged {
|
||||
@@ -149,126 +103,91 @@
|
||||
@media (min-width: 961px) and (max-width: 1440px),
|
||||
(min-width: 961px) and (max-height: 820px) {
|
||||
.workbench {
|
||||
--hero-padding-top: 14px;
|
||||
--hero-padding-bottom: 14px;
|
||||
--hero-title-size: 24px;
|
||||
--hero-copy-gap: 14px;
|
||||
--hero-title-bottom-gap: 8px;
|
||||
--composer-min-height: 92px;
|
||||
--composer-textarea-height: 38px;
|
||||
--composer-padding-block: 8px;
|
||||
--quick-prompts-gap-top: 5px;
|
||||
--capability-row-height: 82px;
|
||||
--hero-title-size: 30px;
|
||||
--trend-card-min-height: 232px;
|
||||
--capability-row-height: 102px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.assistant-hero {
|
||||
--assistant-decor-width: clamp(680px, 60vw, 880px);
|
||||
--assistant-decor-opacity: 0.72;
|
||||
padding: var(--hero-padding-top) 16px var(--hero-padding-bottom) 34px;
|
||||
.workbench-trend-hero {
|
||||
padding: 24px 18px 10px 18px;
|
||||
}
|
||||
|
||||
.assistant-copy {
|
||||
width: min(900px, 92%);
|
||||
.workbench-trend-card {
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.assistant-copy h1 {
|
||||
margin-bottom: var(--hero-title-bottom-gap);
|
||||
.trend-summary-panel {
|
||||
gap: 7px;
|
||||
}
|
||||
|
||||
.trend-summary-panel h1 {
|
||||
margin-bottom: 28px;
|
||||
font-size: var(--hero-title-size);
|
||||
line-height: 1.14;
|
||||
}
|
||||
|
||||
.assistant-composer {
|
||||
min-height: var(--composer-min-height);
|
||||
gap: 4px;
|
||||
padding: var(--composer-padding-block) 14px 8px;
|
||||
.trend-total {
|
||||
font-size: 42px;
|
||||
}
|
||||
|
||||
.assistant-composer textarea {
|
||||
height: var(--composer-textarea-height);
|
||||
min-height: var(--composer-textarea-height);
|
||||
max-height: var(--composer-textarea-height);
|
||||
.trend-summary-panel small {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.trend-chart-panel {
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.trend-chart-head strong {
|
||||
font-size: 14px;
|
||||
line-height: 1.42;
|
||||
}
|
||||
|
||||
.composer-toolbar {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.composer-icon-button,
|
||||
.composer-send-button {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.composer-icon-button {
|
||||
width: 30px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.composer-send-button {
|
||||
width: 46px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.composer-count {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.quick-prompts {
|
||||
gap: 8px;
|
||||
margin-top: var(--quick-prompts-gap-top);
|
||||
.trend-chart-source {
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
||||
.quick-prompts button {
|
||||
min-height: 24px;
|
||||
padding: 0 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.capability-grid {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.capability-card {
|
||||
grid-template-columns: 34px minmax(0, 1fr) 14px;
|
||||
gap: 10px;
|
||||
padding: 12px 12px 12px 16px;
|
||||
grid-template-columns: 40px minmax(0, 1fr) 16px;
|
||||
gap: 12px;
|
||||
padding: 15px 14px 15px 18px;
|
||||
}
|
||||
|
||||
.capability-icon {
|
||||
--workbench-list-icon-size: 34px;
|
||||
--workbench-list-icon-art-size: 20px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
--workbench-list-icon-size: 40px;
|
||||
--workbench-list-icon-art-size: 24px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.capability-copy {
|
||||
gap: 2px;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.capability-copy strong {
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.capability-copy small {
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
line-height: 1.22;
|
||||
}
|
||||
|
||||
.capability-arrow {
|
||||
width: 14px;
|
||||
min-width: 14px;
|
||||
font-size: 16px;
|
||||
width: 16px;
|
||||
min-width: 16px;
|
||||
font-size: 17px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.workbench {
|
||||
height: auto;
|
||||
grid-template-rows: none;
|
||||
gap: 14px;
|
||||
overflow: visible;
|
||||
--workbench-glass-base:
|
||||
@@ -279,47 +198,36 @@
|
||||
--workbench-glass-blur: blur(14px) saturate(1.2);
|
||||
}
|
||||
|
||||
.assistant-hero {
|
||||
min-height: auto;
|
||||
--assistant-bg-position: right center;
|
||||
--assistant-decor-width: min(620px, 118vw);
|
||||
--assistant-decor-opacity: 0.36;
|
||||
--assistant-readability-mask:
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.76) 100%),
|
||||
linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.52) 100%);
|
||||
--assistant-theme-tint:
|
||||
linear-gradient(135deg, rgba(var(--theme-primary-rgb, 58, 124, 165), 0.12) 0%, rgba(var(--theme-primary-rgb, 58, 124, 165), 0.04) 100%);
|
||||
padding: 24px 18px 24px;
|
||||
backdrop-filter: blur(9px) saturate(1.1);
|
||||
-webkit-backdrop-filter: blur(9px) saturate(1.1);
|
||||
.workbench-trend-hero {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.assistant-copy {
|
||||
width: 100%;
|
||||
.workbench-trend-card {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.assistant-copy h1 {
|
||||
.trend-summary-panel h1 {
|
||||
max-width: 320px;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.assistant-composer {
|
||||
padding: 14px;
|
||||
.trend-summary-panel {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.composer-toolbar {
|
||||
.trend-total {
|
||||
font-size: 34px;
|
||||
}
|
||||
|
||||
.trend-chart-head {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.composer-count {
|
||||
order: 4;
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.composer-send-button {
|
||||
margin-left: auto;
|
||||
.trend-chart-panel {
|
||||
min-height: 148px;
|
||||
}
|
||||
|
||||
.capability-grid,
|
||||
@@ -356,88 +264,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* 针对低高度视口(如低于 840px,包含大部分笔记本 768px 高度),解除 height: 100% 限制,让内容流式高度,防止纵向元素被过度压扁 (排除手机端) */
|
||||
/* 针对低高度视口,解除 height: 100% 限制,防止纵向元素被过度压扁 */
|
||||
@media (max-height: 840px) and (min-width: 761px) {
|
||||
.workbench {
|
||||
height: auto;
|
||||
min-height: 100%;
|
||||
grid-template-rows: auto var(--capability-row-height) auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* 手机端/窄屏自适应优化 (560px 以下) */
|
||||
@media (max-width: 560px) {
|
||||
/* 常用提问横向滑动展示,避免折行过多撑爆高度 */
|
||||
.quick-prompts {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
width: 100%;
|
||||
gap: 8px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.quick-prompts span {
|
||||
display: none; /* 隐藏“常用提问:”前缀,以最大化利用横向空间 */
|
||||
}
|
||||
|
||||
.quick-prompts button {
|
||||
flex-shrink: 0;
|
||||
padding: 0 10px;
|
||||
min-height: 26px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* 隐藏常用提问横滑条的原生滚动条,保持精致视觉 */
|
||||
.quick-prompts::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.assistant-hero {
|
||||
--assistant-bg-position: 72% center;
|
||||
padding: 20px 14px 20px;
|
||||
.workbench-trend-hero {
|
||||
padding: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 手机端/窄屏自适应优化 (480px 以下) */
|
||||
@media (max-width: 480px) {
|
||||
/* 输入框更小巧 */
|
||||
.assistant-composer {
|
||||
padding: 10px 12px;
|
||||
min-height: 94px;
|
||||
.trend-summary-panel h1 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.assistant-composer textarea {
|
||||
font-size: 14px;
|
||||
height: 42px;
|
||||
min-height: 42px;
|
||||
.trend-total {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.composer-toolbar {
|
||||
gap: 6px;
|
||||
.trend-chart-panel {
|
||||
min-height: 132px;
|
||||
}
|
||||
|
||||
.composer-icon-button,
|
||||
.composer-send-button {
|
||||
height: 30px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.composer-icon-button {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.composer-send-button {
|
||||
width: 46px;
|
||||
}
|
||||
|
||||
/* 限制上传的附件文件芯片的最大宽度,防止溢出 */
|
||||
.assistant-file-chip {
|
||||
max-width: 110px;
|
||||
}
|
||||
|
||||
/* AI 财务助手卡片尺寸更精致 */
|
||||
.capability-card {
|
||||
padding: 12px 10px 12px 14px;
|
||||
gap: 8px;
|
||||
@@ -463,7 +316,6 @@
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* 重点优化:费用进度行的网格区域(Grid Area)双行重构 */
|
||||
.progress-row {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(70px, auto) 1fr minmax(74px, auto);
|
||||
@@ -506,7 +358,7 @@
|
||||
.progress-result {
|
||||
grid-area: result;
|
||||
width: 100%;
|
||||
justify-items: end; /* 金额和状态右对齐 */
|
||||
justify-items: end;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
@@ -515,9 +367,9 @@
|
||||
}
|
||||
|
||||
.progress-status {
|
||||
font-size: 11px;
|
||||
min-height: 18px;
|
||||
padding: 0 5px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.progress-steps {
|
||||
@@ -526,7 +378,6 @@
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* 缩小步骤图图标与连线 */
|
||||
.progress-step i {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
@@ -541,7 +392,6 @@
|
||||
top: 7px;
|
||||
}
|
||||
|
||||
/* 侧边分析栏优化 */
|
||||
.side-panel {
|
||||
padding: 8px 10px;
|
||||
gap: 4px;
|
||||
|
||||
Reference in New Issue
Block a user