feat: 引入 ECharts 统一图表并完善员工画像标签分页

后端优化员工行为画像服务和辅助函数,完善系统设置模型和
配置持久化,前端引入 ECharts 替换所有图表组件实现统一
渲染,新增员工画像标签分页器和数字员工工作记录组件,优
化工作台响应式布局和登录页过渡动画,完善预算中心和数字
员工页面样式细节。
This commit is contained in:
caoxiaozhu
2026-05-28 16:24:59 +08:00
parent 8a4a777be7
commit e384318046
53 changed files with 4698 additions and 2468 deletions

View File

@@ -0,0 +1,548 @@
.digital-work-records {
min-height: 0;
display: grid;
grid-template-rows: auto auto minmax(0, 1fr);
gap: 12px;
}
.work-records-head {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(420px, 0.8fr);
align-items: start;
gap: 16px;
}
.work-records-head h3 {
margin: 0;
color: #0f172a;
font-size: 16px;
}
.work-records-head p {
margin: 6px 0 0;
color: #64748b;
font-size: 13px;
}
.work-records-kpis {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px;
justify-self: end;
width: min(100%, 480px);
}
.work-record-kpi {
min-height: 58px;
padding: 10px 12px;
border: 1px solid #dfe7ef;
border-radius: 4px;
background: #fff;
}
.work-record-kpi span {
display: block;
color: #64748b;
font-size: 12px;
font-weight: 700;
}
.work-record-kpi strong {
display: block;
margin-top: 6px;
color: #0f172a;
font-size: 22px;
line-height: 1;
}
.work-record-kpi.success strong {
color: var(--success-active);
}
.work-record-kpi.danger strong {
color: #dc2626;
}
.work-records-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
color: #64748b;
font-size: 13px;
}
.work-records-toolbar button {
min-height: 34px;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 0 12px;
border: 1px solid #d8e1eb;
border-radius: 4px;
background: #fff;
color: #0f172a;
font-size: 13px;
font-weight: 700;
cursor: pointer;
}
.work-records-toolbar button:disabled {
cursor: not-allowed;
opacity: 0.7;
}
.work-records-table-wrap {
min-height: 400px;
overflow: auto;
border: 1px solid #edf2f7;
border-radius: 10px;
background: linear-gradient(180deg, #fcfefd 0%, #f4f8f6 100%);
}
.work-records-table-wrap.is-empty {
display: grid;
align-items: center;
justify-content: center;
}
.digital-work-records-table {
width: 100%;
min-width: 1180px;
table-layout: fixed;
border-collapse: collapse;
}
.digital-work-records-table .col-time { width: 14%; }
.digital-work-records-table .col-module { width: 12%; }
.digital-work-records-table .col-source { width: 10%; }
.digital-work-records-table .col-status { width: 17%; }
.digital-work-records-table .col-summary { width: 31%; }
.digital-work-records-table .col-trace { width: 16%; }
.digital-work-records-table thead th {
position: sticky;
top: 0;
z-index: 1;
padding: 13px 12px;
border-bottom: 1px solid #edf2f7;
background: #f7fafc;
color: #64748b;
font-size: 13px;
font-weight: 800;
line-height: 1.35;
text-align: center;
white-space: nowrap;
}
.digital-work-records-table tbody td {
padding: 13px 12px;
border-bottom: 1px solid #edf2f7;
color: #24324a;
font-size: 14px;
line-height: 1.35;
text-align: center;
vertical-align: middle;
}
.digital-work-records-table tbody tr {
cursor: pointer;
outline: none;
}
.digital-work-records-table tbody tr:hover,
.digital-work-records-table tbody tr:focus-visible {
background: linear-gradient(90deg, rgba(58, 124, 165, .08), rgba(58, 124, 165, .03));
}
.digital-work-records-table tbody tr:focus-visible {
box-shadow: inset 0 0 0 2px rgba(58, 124, 165, .28);
}
.digital-work-records-table tbody tr:last-child td {
border-bottom: 0;
}
.work-record-status-stack {
display: grid;
gap: 5px;
justify-items: center;
}
.work-record-status-stack > span:last-child {
color: #64748b;
font-size: 12px;
line-height: 1.5;
}
.work-record-summary-cell {
text-align: left !important;
}
.work-record-summary-cell strong,
.work-record-summary-cell span,
.work-record-summary-cell em {
display: block;
overflow: hidden;
text-overflow: ellipsis;
}
.work-record-summary-cell strong {
color: #0f172a;
font-size: 13px;
font-weight: 800;
white-space: nowrap;
}
.work-record-summary-cell span {
margin-top: 4px;
color: #64748b;
font-size: 13px;
line-height: 1.5;
white-space: nowrap;
}
.work-record-summary-cell em {
margin-top: 6px;
color: #94a3b8;
font-size: 12px;
font-style: normal;
white-space: nowrap;
}
.work-record-trace-cell {
color: #2563eb !important;
word-break: break-all;
}
.status-pill {
min-height: 24px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 9px;
border: 1px solid transparent;
border-radius: 6px;
font-size: 12px;
font-weight: 750;
white-space: nowrap;
}
.status-pill.success {
border-color: var(--success-line);
background: var(--success-soft);
color: var(--success-active);
}
.status-pill.warning {
border-color: #fed7aa;
background: #fff7ed;
color: #f97316;
}
.status-pill.danger {
border-color: #fecaca;
background: #fef2f2;
color: #dc2626;
}
.status-pill.info {
border-color: #bfdbfe;
background: #eff6ff;
color: #2563eb;
}
.status-pill.muted {
border-color: #cbd5e1;
background: #f8fafc;
color: #475569;
}
.table-state,
.work-records-empty {
width: 100%;
min-height: 260px;
display: grid;
place-items: center;
gap: 10px;
padding: 28px 20px;
color: #64748b;
font-size: 13px;
text-align: center;
}
.table-state.error {
background: linear-gradient(180deg, #fffdfd 0%, #fff6f6 100%);
}
.table-state.error .mdi {
color: #ef4444;
font-size: 28px;
}
.table-state.error strong {
color: #0f172a;
font-size: 15px;
}
.table-state.error p {
margin: 0;
}
.work-record-detail-mask {
position: fixed;
inset: 0;
z-index: 2800;
display: flex;
justify-content: flex-end;
background: rgba(15, 23, 42, .28);
}
.work-record-detail-panel {
width: min(720px, calc(100vw - 32px));
height: 100%;
display: grid;
grid-template-rows: auto minmax(0, 1fr);
border-left: 1px solid #dfe7ef;
background: #fff;
box-shadow: -18px 0 42px rgba(15, 23, 42, .18);
}
.work-record-detail-head {
min-height: 76px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
padding: 16px 18px;
border-bottom: 1px solid #edf2f7;
}
.work-record-detail-head span {
color: #64748b;
font-size: 12px;
font-weight: 800;
}
.work-record-detail-head h3 {
margin: 5px 0 0;
color: #0f172a;
font-size: 17px;
line-height: 1.35;
}
.work-record-detail-head button {
width: 34px;
height: 34px;
display: grid;
flex: 0 0 auto;
place-items: center;
border: 1px solid #d8e1eb;
border-radius: 4px;
background: #fff;
color: #64748b;
}
.work-record-detail-head button:hover {
color: var(--theme-primary-active);
}
.work-record-detail-body {
min-height: 0;
display: grid;
align-content: start;
gap: 12px;
padding: 16px 18px 22px;
overflow-y: auto;
background: #f8fafc;
}
.work-record-detail-section,
.work-record-detail-state {
border: 1px solid #e5edf5;
border-radius: 6px;
background: #fff;
}
.work-record-detail-section {
padding: 14px;
}
.work-record-detail-state {
min-height: 100%;
display: grid;
place-items: center;
gap: 10px;
padding: 30px 18px;
color: #64748b;
text-align: center;
}
.work-record-detail-state.error .mdi {
color: #dc2626;
font-size: 30px;
}
.work-record-detail-state.error strong {
color: #0f172a;
}
.work-record-detail-state.error p {
margin: 0;
}
.work-record-detail-state.error button {
height: 34px;
padding: 0 12px;
border: 1px solid #fecaca;
border-radius: 4px;
background: #fff;
color: #dc2626;
font-weight: 750;
}
.work-record-section-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.work-record-section-head h4 {
margin: 0;
color: #0f172a;
font-size: 15px;
}
.work-record-section-head > span:not(.status-pill) {
color: #94a3b8;
font-size: 12px;
font-weight: 750;
}
.work-record-info-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.work-record-info-grid div {
min-width: 0;
padding: 10px;
border: 1px solid #edf2f7;
border-radius: 4px;
background: #f8fafc;
}
.work-record-info-grid span {
display: block;
color: #64748b;
font-size: 12px;
font-weight: 750;
}
.work-record-info-grid strong {
display: block;
margin-top: 5px;
overflow-wrap: anywhere;
color: #0f172a;
font-size: 13px;
}
.work-record-result-text,
.work-record-error-text,
.work-record-inline-empty {
margin: 0;
color: #475569;
font-size: 13px;
line-height: 1.65;
}
.work-record-error-text {
margin-top: 10px;
padding: 10px 12px;
border: 1px solid #fecaca;
border-radius: 4px;
background: #fef2f2;
color: #b91c1c;
}
.work-record-tool-list {
display: grid;
gap: 8px;
}
.work-record-tool-list article {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 10px 12px;
border: 1px solid #edf2f7;
border-radius: 4px;
background: #f8fafc;
}
.work-record-tool-list strong {
color: #0f172a;
font-size: 13px;
}
.work-record-tool-list span {
color: #64748b;
font-size: 12px;
}
.work-record-code-block {
max-height: 320px;
margin: 0;
padding: 12px;
overflow: auto;
border: 1px solid #e2e8f0;
border-radius: 4px;
background: #0f172a;
color: #e2e8f0;
font-size: 12px;
line-height: 1.55;
}
.work-record-detail-enter-active,
.work-record-detail-leave-active {
transition: opacity 180ms ease;
}
.work-record-detail-enter-active .work-record-detail-panel,
.work-record-detail-leave-active .work-record-detail-panel {
transition: transform 220ms ease;
}
.work-record-detail-enter-from,
.work-record-detail-leave-to {
opacity: 0;
}
.work-record-detail-enter-from .work-record-detail-panel,
.work-record-detail-leave-to .work-record-detail-panel {
transform: translateX(24px);
}
@media (max-width: 980px) {
.work-records-head {
grid-template-columns: 1fr;
}
.work-records-kpis {
justify-self: stretch;
width: 100%;
}
.work-record-info-grid {
grid-template-columns: 1fr;
}
}

View File

@@ -2,7 +2,7 @@
@media (max-height: 980px) and (min-width: 761px) {
.workbench {
--hero-padding-top: 20px;
--hero-padding-bottom: 12px;
--hero-padding-bottom: 20px;
--hero-title-size: 28px;
--hero-copy-gap: 5px;
--hero-title-bottom-gap: 14px;
@@ -44,6 +44,7 @@
@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;
@@ -116,8 +117,10 @@
--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%);
linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 56%, rgba(255, 255, 255, 0.22) 100%),
linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, color-mix(in srgb, var(--workbench-primary-soft) 40%, rgba(255, 255, 255, 0.5)) 58%, color-mix(in srgb, var(--workbench-secondary) 15%, rgba(255, 255, 255, 0.1)) 100%);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
}
.assistant-copy {
@@ -154,10 +157,12 @@
--assistant-art-width: min(380px, 78vw);
--assistant-art-x: 12px;
--assistant-art-y: -6px;
padding: 24px 18px 20px;
padding: 24px 18px 24px;
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);
linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.7) 100%),
color-mix(in srgb, var(--workbench-primary-soft) 22%, rgba(255, 255, 255, 0.5));
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
}
.assistant-copy {
@@ -259,7 +264,7 @@
.assistant-hero {
--assistant-art-width: min(280px, 70vw);
padding: 20px 14px 16px;
padding: 20px 14px 20px;
}
}

View File

@@ -1,6 +1,6 @@
.workbench {
--hero-padding-top: 26px;
--hero-padding-bottom: 14px;
--hero-padding-bottom: 26px;
--hero-title-size: 30px;
--hero-copy-gap: 6px;
--hero-title-bottom-gap: 18px;
@@ -64,9 +64,11 @@
border: 1px solid color-mix(in srgb, var(--workbench-primary) 14%, var(--workbench-line));
border-radius: 4px;
background:
linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 44%, rgba(255, 255, 255, 0.16) 66%, rgba(255, 255, 255, 0.02) 100%),
linear-gradient(135deg, #ffffff 0%, color-mix(in srgb, var(--workbench-primary-soft) 56%, #ffffff) 62%, color-mix(in srgb, var(--workbench-secondary) 8%, #ffffff) 100%);
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 44%, rgba(255, 255, 255, 0.2) 66%, rgba(255, 255, 255, 0.05) 100%),
linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, color-mix(in srgb, var(--workbench-primary-soft) 40%, rgba(255, 255, 255, 0.5)) 62%, color-mix(in srgb, var(--workbench-secondary) 15%, rgba(255, 255, 255, 0.1)) 100%);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
isolation: isolate;
}