feat(web): AI 工作台会话与文档卡片渲染增强

- aiConversationHtmlRenderer 识别单据记录类表格并渲染为卡片列表,新增删除申请单详情的禁用占位链接
- aiWorkbenchConversationStore 增加草稿删除后会话链接失效处理,避免点击已删除单据跳转
- aiApplicationPreviewActions 调整提交/草稿调用路径,PersonalWorkbenchAiMode 接入新的会话存储与渲染
- ConfirmDialog/TravelRequestDeleteDialog/useAppShell/AppShellRouteView 配套适配,同步更新相关前端测试
This commit is contained in:
caoxiaozhu
2026-06-20 21:44:16 +08:00
parent 81e990ab72
commit 0cda750ff0
19 changed files with 734 additions and 92 deletions

View File

@@ -1321,6 +1321,8 @@
margin-top: 18px;
border: 1px solid rgba(226, 232, 240, 0.9);
border-radius: 14px;
background: #ffffff;
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}
.workbench-ai-answer-markdown :deep(table) {
@@ -1342,6 +1344,123 @@
font-weight: 850;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-list) {
display: grid;
gap: 10px;
margin-top: 18px;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-item) {
display: grid;
grid-template-columns: minmax(220px, 1.15fr) minmax(260px, 0.85fr) auto;
gap: 16px;
align-items: center;
padding: 15px 16px;
border: 1px solid rgba(203, 213, 225, 0.86);
border-left: 3px solid #60a5fa;
border-radius: 14px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.9));
box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
}
.workbench-ai-answer-markdown :deep(.ai-html-record-main) {
min-width: 0;
display: grid;
gap: 5px;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-kicker) {
width: fit-content;
max-width: 100%;
padding: 2px 8px;
border-radius: 999px;
background: rgba(37, 99, 235, 0.08);
color: #1d4ed8;
font-size: 12px;
font-weight: 850;
line-height: 1.35;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-id) {
color: #0f172a;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
font-size: 15px;
font-weight: 860;
line-height: 1.45;
overflow-wrap: anywhere;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-reason) {
color: #475569;
font-size: 14px;
font-weight: 660;
line-height: 1.55;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-meta) {
min-width: 0;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
gap: 10px;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-meta-item) {
min-width: 0;
display: grid;
gap: 2px;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-meta-item small) {
color: #94a3b8;
font-size: 12px;
font-weight: 760;
line-height: 1.3;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-meta-item b) {
color: #334155;
font-size: 14px;
font-weight: 780;
line-height: 1.45;
overflow-wrap: anywhere;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-action) {
justify-self: end;
display: inline-flex;
align-items: center;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-action .ai-html-action-link) {
min-height: 32px;
padding: 0 15px;
border-radius: 10px;
background: #2563eb;
color: #ffffff;
box-shadow: none;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-action .ai-html-action-link:hover) {
background: #1d4ed8;
color: #ffffff;
transform: translateY(-1px);
}
.workbench-ai-answer-markdown :deep(.ai-html-action-link.is-disabled) {
cursor: not-allowed;
pointer-events: none;
background: rgba(100, 116, 139, 0.14);
color: #64748b;
box-shadow: none;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-action .ai-html-action-link.is-disabled:hover) {
background: rgba(100, 116, 139, 0.14);
color: #64748b;
transform: none;
}
.workbench-ai-answer-markdown :deep(.ai-html-image-frame) {
margin: 0;
overflow: hidden;
@@ -1418,6 +1537,15 @@
}
@media (max-width: 720px) {
.workbench-ai-answer-markdown :deep(.ai-html-record-item) {
grid-template-columns: 1fr;
align-items: stretch;
}
.workbench-ai-answer-markdown :deep(.ai-html-record-action) {
justify-self: start;
}
.workbench-ai-answer-markdown :deep(.ai-document-card) {
padding: 14px;
}