feat(web): AI 文档详情引用解析与查询卡片增强
- 新增 aiDocumentDetailReference,统一解析 #ai-open-document-detail / #ai-open-application-detail 引用,兼容 A/R/D 短格式与 AP-/RE-/AD- 旧格式单号,提供 isBusinessDocumentReference 判定 - aiDocumentQueryModel 文档卡片接入详情引用,按申请单/报销单生成对应 href,HTML 渲染器识别单据记录表格并生成卡片链接 - PersonalWorkbenchAiMode 处理文档详情点击跳转,卡片样式重构为结构化布局并更新背景资源 - expenseApplicationPreview 补充事由字段,同步新增/更新 ai-document-detail-reference、document-query-model、html-renderer、workbench-ai-mode 等测试 - 更新公司通信费报销规则表
This commit is contained in:
@@ -1151,27 +1151,34 @@
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card) {
|
||||
--ai-document-card-head-bg: rgba(37, 99, 235, 0.075);
|
||||
position: relative;
|
||||
display: grid;
|
||||
gap: 0;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
border: 1px solid rgba(203, 213, 225, 0.76);
|
||||
border-left: 0;
|
||||
border-radius: 12px;
|
||||
background: rgba(255, 255, 255, 0.96);
|
||||
border: 0;
|
||||
border-radius: 14px;
|
||||
background-color: #ffffff;
|
||||
background-image:
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.9)),
|
||||
url("../../ai-document-card-bg.png");
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
box-shadow:
|
||||
inset 0 0 0 1px rgba(203, 213, 225, 0.5),
|
||||
0 1px 2px rgba(15, 23, 42, 0.035),
|
||||
0 10px 26px rgba(15, 23, 42, 0.045);
|
||||
0 14px 34px rgba(15, 23, 42, 0.05);
|
||||
color: #334155;
|
||||
animation: workbenchDocumentCardReveal 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
|
||||
transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
|
||||
transition: box-shadow 180ms ease, transform 180ms ease;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card:hover) {
|
||||
border-color: rgba(148, 163, 184, 0.72);
|
||||
background: #ffffff;
|
||||
box-shadow: 0 8px 22px rgba(15, 23, 42, 0.065);
|
||||
box-shadow:
|
||||
inset 0 0 0 1px rgba(148, 163, 184, 0.46),
|
||||
0 1px 2px rgba(15, 23, 42, 0.04),
|
||||
0 18px 38px rgba(15, 23, 42, 0.07);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
@@ -1194,8 +1201,8 @@
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
min-width: 0;
|
||||
padding: 13px 18px;
|
||||
background: rgba(37, 99, 235, 0.11);
|
||||
padding: 13px 18px 13px 20px;
|
||||
background: var(--ai-document-card-head-bg);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__status) {
|
||||
@@ -1213,15 +1220,15 @@
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card.is-success .ai-document-card__head) {
|
||||
background: rgba(22, 163, 74, 0.1);
|
||||
background: rgba(22, 163, 74, 0.08);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card.is-warning .ai-document-card__head) {
|
||||
background: rgba(217, 119, 6, 0.12);
|
||||
background: rgba(217, 119, 6, 0.09);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card.is-danger .ai-document-card__head) {
|
||||
background: rgba(220, 38, 38, 0.1);
|
||||
background: rgba(220, 38, 38, 0.08);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card.is-pending .ai-document-card__status) {
|
||||
@@ -1242,9 +1249,9 @@
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__body) {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
gap: 15px;
|
||||
min-width: 0;
|
||||
padding: 16px 18px 18px;
|
||||
padding: 15px 18px 18px;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__reason) {
|
||||
@@ -1271,12 +1278,68 @@
|
||||
color: #991b1b;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card--application) {
|
||||
--ai-document-card-head-bg: rgba(37, 99, 235, 0.075);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card--application .ai-document-card__head) {
|
||||
background: var(--ai-document-card-head-bg);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card--application .ai-document-card__reason) {
|
||||
color: #1e40af;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card--reimbursement) {
|
||||
--ai-document-card-head-bg: rgba(13, 148, 136, 0.075);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card--reimbursement .ai-document-card__head) {
|
||||
background: var(--ai-document-card-head-bg);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card--reimbursement .ai-document-card__reason) {
|
||||
color: #0f766e;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card--approval-task) {
|
||||
--ai-document-card-head-bg: rgba(245, 158, 11, 0.1);
|
||||
box-shadow:
|
||||
inset 0 0 0 1px rgba(245, 158, 11, 0.18),
|
||||
0 1px 2px rgba(120, 53, 15, 0.04),
|
||||
0 14px 34px rgba(120, 53, 15, 0.06);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card--approval-task .ai-document-card__head) {
|
||||
background: var(--ai-document-card-head-bg);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card--approval-task .ai-document-card__reason) {
|
||||
color: #92400e;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card--approval-task .ai-document-card__status) {
|
||||
min-height: 26px;
|
||||
padding: 0 10px;
|
||||
border-radius: 999px;
|
||||
background: rgba(245, 158, 11, 0.18);
|
||||
color: #b45309;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__summary),
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__details) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px 28px;
|
||||
padding-top: 2px;
|
||||
border-top: 1px solid rgba(203, 213, 225, 0.76);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__summary) {
|
||||
padding-bottom: 14px;
|
||||
border-bottom: 1px solid rgba(203, 213, 225, 0.76);
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__details) {
|
||||
padding-top: 1px;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__field) {
|
||||
@@ -1288,7 +1351,11 @@
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__field--action) {
|
||||
grid-column: 1 / -1;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__field--wide) {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__label) {
|
||||
@@ -1373,109 +1440,6 @@
|
||||
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;
|
||||
@@ -1484,12 +1448,6 @@
|
||||
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;
|
||||
@@ -1547,6 +1505,29 @@
|
||||
color: #1e40af;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__field--action .ai-document-card__action) {
|
||||
min-height: 26px;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
color: #1d4ed8;
|
||||
font-size: 14px;
|
||||
font-weight: 820;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__field--action .ai-document-card__action:hover) {
|
||||
background: transparent;
|
||||
color: #1e40af;
|
||||
text-decoration: underline;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__field--action .ai-document-card__action.is-disabled) {
|
||||
background: transparent;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
@keyframes workbenchDocumentCardReveal {
|
||||
from {
|
||||
opacity: 0;
|
||||
@@ -1566,15 +1547,6 @@
|
||||
}
|
||||
|
||||
@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: 0;
|
||||
}
|
||||
@@ -1595,15 +1567,17 @@
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__summary) {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 10px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__field) {
|
||||
grid-template-columns: 76px minmax(0, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__field--action) {
|
||||
grid-column: auto;
|
||||
}
|
||||
|
||||
.workbench-ai-answer-markdown :deep(.ai-document-card__number) {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user