feat: 新增数字员工管理页面与工作台首页重构

后端优化 agent 资产种子初始化和常量配置,前端新增数字员工
视图和调度对话框组件,重构个人工作台首页布局和洞察面板,
完善审计页面数字员工详情和运行时模型,优化侧边栏导航和图
标配置,新增工作台摘要和工作台数据模块,补充单元测试。
This commit is contained in:
caoxiaozhu
2026-05-28 09:30:34 +08:00
parent d4d5d40569
commit 04cd6d0f81
38 changed files with 3413 additions and 1301 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -135,6 +135,7 @@
.main.archive-main,
.main.policies-main,
.main.audit-main,
.main.digital-employees-main,
.main.logs-main,
.main.employees-main,
.main.settings-main {
@@ -151,10 +152,12 @@
.workarea { min-height: 0; overflow: auto; padding: 24px; }
.workarea.requests-workarea,
.workarea.documents-workarea,
.workarea.workbench-workarea,
.workarea.approval-workarea,
.workarea.archive-workarea,
.workarea.policies-workarea,
.workarea.audit-workarea,
.workarea.digital-employees-workarea,
.workarea.logs-workarea,
.workarea.employees-workarea,
.workarea.settings-workarea {
@@ -162,6 +165,10 @@
overflow: hidden;
padding: 20px 24px;
}
.workarea.workbench-workarea {
overflow: hidden;
padding: 12px 14px 14px;
}
.workarea.settings-workarea {
padding: 0;
background: #fff;
@@ -195,6 +202,7 @@
}
.workarea { padding: 18px 16px 28px; }
.workarea.workbench-workarea { overflow: auto; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {

View File

@@ -0,0 +1,166 @@
.digital-schedule-overlay {
position: fixed;
inset: 0;
z-index: 1200;
display: flex;
align-items: flex-end;
justify-content: flex-end;
padding: 32px;
background: rgba(15, 23, 42, 0.28);
}
.digital-schedule-dialog {
width: min(520px, calc(100vw - 64px));
border-radius: 8px;
background: #fff;
box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
overflow: hidden;
}
.digital-schedule-head,
.digital-schedule-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 18px 20px;
border-bottom: 1px solid #e2e8f0;
}
.digital-schedule-head h3 {
margin: 4px 0 0;
color: #0f172a;
font-size: 18px;
font-weight: 820;
}
.digital-schedule-kicker {
color: #64748b;
font-size: 12px;
font-weight: 760;
}
.digital-schedule-close {
width: 32px;
height: 32px;
display: grid;
place-items: center;
border: 1px solid #dbe4ee;
border-radius: 6px;
background: #fff;
color: #475569;
cursor: pointer;
}
.digital-schedule-body {
padding: 18px 20px 20px;
}
.digital-schedule-mode-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 8px;
}
.digital-schedule-mode {
min-height: 36px;
border: 1px solid #dbe4ee;
border-radius: 6px;
background: #fff;
color: #475569;
font-size: 13px;
font-weight: 760;
cursor: pointer;
}
.digital-schedule-mode.active {
border-color: rgba(var(--theme-primary-rgb), 0.42);
background: var(--theme-primary-soft);
color: var(--theme-primary-active);
}
.digital-schedule-fields {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
margin-top: 16px;
}
.digital-schedule-fields label {
display: grid;
gap: 6px;
color: #334155;
font-size: 13px;
font-weight: 760;
}
.digital-schedule-fields input,
.digital-schedule-fields select {
width: 100%;
min-height: 38px;
border: 1px solid #dbe4ee;
border-radius: 6px;
padding: 0 10px;
color: #0f172a;
font: inherit;
background: #fff;
}
.digital-schedule-cron-field {
grid-column: 1 / -1;
}
.digital-schedule-preview {
margin: 16px 0 0;
padding: 10px 12px;
border-radius: 6px;
background: #f8fafc;
color: #475569;
font-size: 13px;
font-weight: 700;
}
.digital-schedule-error {
margin: 10px 0 0;
color: #b91c1c;
font-size: 13px;
font-weight: 760;
}
.digital-schedule-actions {
justify-content: flex-end;
border-top: 1px solid #e2e8f0;
border-bottom: 0;
}
.digital-schedule-actions .success-action {
border-color: var(--success-line);
background: var(--success-soft);
color: var(--success-hover);
}
.digital-schedule-dialog-enter-active,
.digital-schedule-dialog-leave-active {
transition: opacity 160ms ease;
}
.digital-schedule-dialog-enter-from,
.digital-schedule-dialog-leave-to {
opacity: 0;
}
@media (max-width: 720px) {
.digital-schedule-overlay {
align-items: flex-end;
padding: 16px;
}
.digital-schedule-dialog {
width: 100%;
}
.digital-schedule-mode-grid,
.digital-schedule-fields {
grid-template-columns: 1fr;
}
}

View File

@@ -0,0 +1,135 @@
.side-column {
display: grid;
grid-template-rows: minmax(0, 0.94fr) minmax(0, 1fr);
gap: 14px;
min-height: 0;
height: 100%;
}
.side-panel {
padding: 10px 12px;
gap: 6px;
}
.side-panel .section-head {
min-height: 24px;
margin-bottom: 0;
}
.side-panel .section-head h2 {
font-size: 15px;
}
.side-card-head {
align-items: center;
}
.detail-action {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
min-height: 24px;
padding: 0;
border: 0;
background: transparent;
color: var(--workbench-muted);
font-size: 13px;
font-weight: 800;
white-space: nowrap;
}
.detail-action:hover {
color: var(--workbench-primary-active);
}
.detail-action i {
font-size: 16px;
}
.expense-stats-panel,
.usage-profile-panel {
min-height: 0;
display: grid;
grid-template-rows: auto minmax(0, 1fr);
}
.insight-metric-list,
.insight-profile-list {
min-height: 0;
display: grid;
grid-auto-rows: minmax(0, 1fr);
overflow: hidden;
}
.insight-metric-row,
.insight-profile-card {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
min-height: 0;
padding: 6px 0;
border-top: 1px solid var(--workbench-line-soft);
}
.insight-metric-row:first-child,
.insight-profile-card:first-child {
border-top: 0;
}
.insight-metric-label,
.insight-profile-label {
min-width: 0;
overflow: hidden;
color: var(--workbench-muted);
font-size: 12px;
font-weight: 650;
line-height: 1.2;
text-overflow: ellipsis;
white-space: nowrap;
}
.insight-metric-value,
.insight-profile-value {
min-width: 0;
overflow: hidden;
color: var(--workbench-ink);
font-size: 14px;
font-weight: 850;
line-height: 1.15;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
font-variant-numeric: tabular-nums;
}
.insight-metric-value small,
.insight-profile-value small {
margin-left: 2px;
color: var(--workbench-muted);
font-size: 11px;
font-weight: 700;
}
.insight-metric-row--amount .insight-metric-value {
color: var(--workbench-primary-active);
}
.insight-metric-row--warning .insight-metric-value {
color: var(--warning);
}
.insight-metric-row--info .insight-metric-value {
color: var(--workbench-chart-blue);
}
.insight-profile-icon,
.insight-profile-hint {
display: none;
}
.insight-profile-copy {
min-width: 0;
display: contents;
}

View File

@@ -0,0 +1,198 @@
/* 1080p / 小高度屏:进一步压缩 AI 助手卡片高度 */
@media (max-height: 980px) {
.workbench {
--hero-padding-top: 20px;
--hero-padding-bottom: 12px;
--hero-title-size: 28px;
--hero-copy-gap: 5px;
--composer-min-height: 108px;
--composer-textarea-height: 48px;
--composer-padding-block: 10px;
--quick-prompts-gap-top: 8px;
--capability-row-height: 96px;
gap: 9px;
}
.assistant-hero {
--assistant-art-width: min(560px, 42vw);
padding: var(--hero-padding-top) 18px var(--hero-padding-bottom) 44px;
}
.assistant-copy p {
font-size: 14px;
line-height: 1.5;
margin-bottom: 0;
}
.assistant-composer textarea {
font-size: 15px;
}
.composer-icon-button,
.composer-related-button,
.composer-send-button {
height: 32px;
}
.composer-send-button {
width: 50px;
}
}
/* 2K 宽屏但内容区仍偏高时,略收紧(避免 hero 独占过多纵向空间) */
@media (min-width: 1920px) and (max-height: 1100px) {
.workbench {
--hero-padding-top: 22px;
--hero-title-size: 29px;
--composer-min-height: 114px;
--composer-textarea-height: 50px;
--capability-row-height: 100px;
}
}
@media (max-width: 1440px) {
.workbench {
grid-template-rows: auto var(--capability-row-height) minmax(0, 1fr);
gap: 10px;
}
.assistant-hero {
--assistant-art-width: min(620px, 44vw);
--assistant-art-x: 48px;
--assistant-art-y: -10px;
padding: var(--hero-padding-top) 18px var(--hero-padding-bottom) 44px;
}
.assistant-copy {
width: min(1040px, 92%);
}
.assistant-copy h1 {
font-size: 33px;
}
.capability-card {
padding: 17px 12px 17px 22px;
}
.capability-copy {
padding-left: 14px;
}
.workbench-content-grid {
grid-template-columns: minmax(300px, 0.92fr) minmax(480px, 1.34fr) minmax(270px, 0.76fr);
gap: 14px;
}
.workbench-card {
padding: 10px 12px;
}
.progress-row {
grid-template-columns: minmax(126px, 0.9fr) minmax(270px, 1.35fr) minmax(86px, auto);
gap: 12px;
}
}
@media (max-width: 1180px) {
.assistant-hero {
--assistant-art-width: min(540px, 50vw);
--assistant-art-x: 36px;
--assistant-art-y: -8px;
background:
linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 56%, rgba(255, 255, 255, 0.22) 100%),
linear-gradient(135deg, #ffffff 0%, color-mix(in srgb, var(--workbench-primary-soft) 48%, #ffffff) 58%, color-mix(in srgb, var(--workbench-secondary) 8%, #ffffff) 100%);
}
.assistant-copy {
width: min(820px, 92%);
}
.capability-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.workbench-content-grid {
grid-template-columns: 1fr;
}
.side-column {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 760px) {
.workbench {
height: auto;
grid-template-rows: none;
gap: 14px;
overflow: visible;
}
.assistant-hero {
min-height: auto;
--assistant-art-width: min(380px, 78vw);
--assistant-art-x: 12px;
--assistant-art-y: -6px;
padding: 24px 18px 20px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.94) 100%),
color-mix(in srgb, var(--workbench-primary-soft) 22%, #ffffff);
}
.assistant-copy {
width: 100%;
}
.assistant-copy h1 {
max-width: 320px;
font-size: 28px;
}
.assistant-composer {
padding: 14px;
}
.composer-toolbar {
gap: 8px;
flex-wrap: wrap;
}
.composer-count {
order: 4;
width: 100%;
margin-left: 0;
}
.composer-send-button {
margin-left: auto;
}
.capability-grid,
.side-column {
grid-template-columns: 1fr;
}
.todo-row,
.progress-row {
grid-template-columns: 1fr;
justify-items: start;
}
.todo-row {
grid-template-columns: 48px minmax(0, 1fr);
}
.todo-meta,
.progress-result {
justify-items: start;
}
.todo-meta {
grid-column: 2;
}
.progress-steps {
width: 100%;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -207,6 +207,11 @@
stroke-linejoin: round;
}
.nav-btn :deep(svg text) {
fill: currentColor;
stroke: none;
}
.nav-label {
flex: 1;
min-width: 0;

View File

@@ -1810,6 +1810,40 @@
background: #ffffff;
}
.digital-worker-source-card {
min-height: 0;
}
.digital-worker-source-card .card-head {
align-items: center;
}
.digital-worker-source-editor {
width: 100%;
min-height: 360px;
resize: vertical;
border: 1px solid #dbe4ef;
border-radius: 8px;
padding: 14px 16px;
background: #0f172a;
color: #e2e8f0;
font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
font-size: 12.5px;
line-height: 1.7;
outline: none;
}
.digital-worker-source-editor:focus {
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.digital-worker-source-editor[readonly] {
color: #cbd5e1;
background: #1e293b;
cursor: default;
}
@media (max-width: 760px) {
.risk-rule-create-form,
.json-risk-meta-grid {

View File

@@ -0,0 +1,94 @@
.digital-employees-view {
height: 100%;
min-height: 0;
}
.digital-employees-list {
height: 100%;
}
.digital-employees-list .table-wrap {
min-height: 0;
}
.digital-employees-table {
min-width: 1060px;
table-layout: fixed;
}
.digital-employees-table .col-skill { width: 27%; }
.digital-employees-table .col-schedule { width: 16%; }
.digital-employees-table .col-mode { width: 12%; }
.digital-employees-table .col-skill-type { width: 11%; }
.digital-employees-table .col-status { width: 11%; }
.digital-employees-table .col-enabled { width: 11%; }
.digital-employees-table .col-updated { width: 12%; }
.digital-employees-table td {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.digital-employees-table tbody tr {
cursor: pointer;
}
.digital-refresh-action i {
font-size: 16px;
}
.skill-type-pill {
border-color: #dbeafe;
background: #eff6ff;
color: #1d4ed8;
}
.digital-employee-detail {
height: 100%;
}
.digital-employee-detail .detail-scroll {
min-height: 0;
overflow: auto;
}
.digital-employee-detail-actions .detail-action-group {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 10px;
flex-wrap: wrap;
}
.digital-employee-detail-actions .success-action {
border-color: var(--success-line);
background: var(--success-soft);
color: var(--success-hover);
}
.digital-employee-detail-actions .enable-action.is-on {
border-color: #fed7aa;
background: #fff7ed;
color: #ea580c;
}
@media (max-width: 980px) {
.digital-employees-table {
min-width: 1040px;
}
.digital-employee-detail-actions {
align-items: stretch;
flex-direction: column;
}
.digital-employee-detail-actions .detail-action-group {
justify-content: stretch;
}
.digital-employee-detail-actions .detail-action-group button {
flex: 1 1 0;
justify-content: center;
}
}

View File

@@ -258,7 +258,7 @@
table {
width: 100%;
min-width: 690px;
min-width: 780px;
border-collapse: collapse;
}
@@ -365,10 +365,9 @@ th {
.state-cell {
display: grid;
justify-items: center;
gap: 6px;
}
.state-time {
.ingest-time-cell {
color: #64748b;
font-size: 11px;
line-height: 1.4;