feat: 增强规则资产管理与审计页面运行时调试

后端新增规则资产版本管理和规则文件 CRUD 接口,优化风险
规则生成模板执行和员工数据模型字段,知识库 RAG 增强本
地回退和文档提取能力,清理旧风险规则文件统一由生成引擎
管理,前端审计页面增加运行时调试面板和规则资产编辑交互,
补充单元测试覆盖。
This commit is contained in:
caoxiaozhu
2026-05-24 21:44:17 +08:00
parent 575f093c74
commit 50b1c3f9a9
113 changed files with 13896 additions and 5044 deletions

View File

@@ -94,6 +94,7 @@
grid-template-rows: auto minmax(0, 1fr);
overflow: hidden;
}
.main.documents-main,
.main.requests-main,
.main.approval-main,
.main.archive-main,
@@ -114,6 +115,7 @@
}
.workarea { min-height: 0; overflow: auto; padding: 24px; }
.workarea.requests-workarea,
.workarea.documents-workarea,
.workarea.approval-workarea,
.workarea.archive-workarea,
.workarea.policies-workarea,

View File

@@ -0,0 +1,330 @@
.expense-application-mask {
position: fixed;
inset: 0;
z-index: 120;
display: flex;
align-items: center;
justify-content: center;
padding: 28px;
background: rgba(15, 23, 42, 0.26);
backdrop-filter: blur(10px);
}
.expense-application-dialog {
width: min(1040px, calc(100vw - 56px));
max-height: calc(100vh - 56px);
display: flex;
flex-direction: column;
overflow: hidden;
border: 1px solid #dbe5ee;
border-radius: 8px;
background: #fff;
box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}
.application-dialog-header,
.application-dialog-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 22px;
border-bottom: 1px solid #e8eef4;
}
.application-dialog-footer {
justify-content: flex-end;
gap: 12px;
border-top: 1px solid #e8eef4;
border-bottom: 0;
}
.application-dialog-eyebrow {
display: block;
margin-bottom: 4px;
color: #059669;
font-size: 12px;
font-weight: 800;
}
.application-dialog-header h2 {
margin: 0;
color: #102033;
font-size: 20px;
font-weight: 850;
}
.dialog-icon-btn {
width: 36px;
height: 36px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid #dbe5ee;
border-radius: 8px;
background: #fff;
color: #4b5f73;
cursor: pointer;
}
.application-dialog-body {
display: grid;
grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr);
gap: 18px;
min-height: 0;
padding: 20px 22px;
overflow: auto;
background: #f7fafc;
}
.application-input-panel,
.application-ontology-panel {
border: 1px solid #e1e9f0;
border-radius: 8px;
background: #fff;
padding: 18px;
}
.application-field-label {
display: block;
margin-bottom: 10px;
color: #425466;
font-size: 13px;
font-weight: 800;
}
.application-input-panel textarea {
width: 100%;
min-height: 132px;
resize: vertical;
border: 1px solid #cfd9e3;
border-radius: 8px;
padding: 12px;
color: #182536;
font: inherit;
line-height: 1.55;
outline: none;
}
.application-input-panel textarea:focus {
border-color: #10b981;
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.application-example-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 14px 0;
}
.application-example-chip {
border: 1px solid #dbe5ee;
border-radius: 8px;
background: #f8fbfd;
color: #395066;
padding: 7px 10px;
font-size: 12px;
cursor: pointer;
}
.primary-parse-btn,
.confirm-btn,
.secondary-btn {
min-height: 38px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
border-radius: 8px;
padding: 0 16px;
font-weight: 850;
cursor: pointer;
}
.primary-parse-btn,
.confirm-btn {
border: 0;
background: #059669;
color: #fff;
}
.primary-parse-btn {
width: 100%;
}
.secondary-btn {
border: 1px solid #dbe5ee;
background: #fff;
color: #395066;
}
.primary-parse-btn:disabled,
.confirm-btn:disabled {
background: #b7c5d1;
cursor: not-allowed;
}
.application-error {
margin: 12px 0 0;
color: #dc2626;
font-size: 13px;
}
.ontology-panel-head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 14px;
color: #425466;
font-size: 13px;
font-weight: 850;
}
.ontology-panel-head strong {
color: #059669;
}
.ontology-empty-state {
min-height: 300px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
color: #6b7c8f;
text-align: center;
}
.ontology-empty-state i {
color: #94a3b8;
font-size: 34px;
}
.ontology-empty-state p {
max-width: 360px;
margin: 0;
line-height: 1.6;
}
.ontology-chip-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 14px;
}
.ontology-chip {
border-radius: 8px;
background: #eefbf5;
color: #047857;
padding: 6px 10px;
font-size: 12px;
font-weight: 800;
}
.application-field-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.application-field-card {
min-height: 76px;
border: 1px solid #e4ebf2;
border-radius: 8px;
padding: 12px;
background: #fbfdff;
}
.application-field-card span,
.application-reason-block span,
.application-missing-block span {
display: block;
margin-bottom: 7px;
color: #6b7c8f;
font-size: 12px;
font-weight: 800;
}
.application-field-card strong {
color: #182536;
font-size: 15px;
}
.application-policy-strip,
.application-reason-block,
.application-missing-block {
margin-top: 12px;
border: 1px solid #dbe5ee;
border-radius: 8px;
padding: 12px;
background: #fff;
}
.application-policy-strip {
display: flex;
gap: 12px;
align-items: flex-start;
}
.application-policy-strip i {
margin-top: 2px;
color: #059669;
font-size: 20px;
}
.application-policy-strip.required {
border-color: #fed7aa;
background: #fff7ed;
}
.application-policy-strip.required i {
color: #ea580c;
}
.application-policy-strip strong {
color: #182536;
}
.application-policy-strip p,
.application-reason-block p {
margin: 5px 0 0;
color: #4b5f73;
line-height: 1.55;
}
.application-missing-block div {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.application-missing-block em {
border-radius: 8px;
background: #fff7ed;
color: #c2410c;
padding: 5px 8px;
font-style: normal;
font-size: 12px;
font-weight: 800;
}
@media (max-width: 860px) {
.expense-application-mask {
align-items: stretch;
padding: 14px;
}
.expense-application-dialog {
width: 100%;
max-height: calc(100vh - 28px);
}
.application-dialog-body {
grid-template-columns: 1fr;
}
.application-field-grid {
grid-template-columns: 1fr;
}
}

View File

@@ -0,0 +1,741 @@
.risk-sim-backdrop {
position: fixed;
inset: 0;
z-index: 1200;
display: flex;
align-items: center;
justify-content: center;
padding: 18px;
background: rgba(15, 23, 42, 0.44);
backdrop-filter: blur(12px);
}
.risk-sim-modal {
width: min(1180px, 100%);
height: min(820px, calc(100vh - 36px));
display: grid;
grid-template-rows: auto auto minmax(0, 1fr) auto;
overflow: hidden;
border: 1px solid rgba(203, 213, 225, 0.88);
border-radius: 18px;
background: #f8fafc;
box-shadow: 0 26px 70px rgba(15, 23, 42, 0.26);
}
.risk-sim-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 18px;
padding: 18px 20px 14px;
border-bottom: 1px solid #e2e8f0;
background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.risk-sim-title span,
.risk-sim-context-panel span,
.risk-sim-result-head span,
.risk-sim-evidence span,
.risk-sim-file-strip > span {
color: #64748b;
font-size: 12px;
font-weight: 850;
}
.risk-sim-title h3 {
margin: 4px 0 5px;
color: #0f172a;
font-size: 19px;
font-weight: 900;
line-height: 1.25;
}
.risk-sim-title p {
margin: 0;
color: #475569;
font-size: 13px;
line-height: 1.55;
}
.risk-sim-icon-btn,
.risk-sim-tool-btn,
.risk-sim-send-btn {
display: grid;
place-items: center;
border: 1px solid #dbe5ef;
background: #fff;
color: #475569;
cursor: pointer;
}
.risk-sim-icon-btn {
width: 38px;
height: 38px;
border-radius: 12px;
}
.risk-sim-meta {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
padding: 10px 20px;
border-bottom: 1px solid #e5edf5;
background: #fff;
}
.risk-sim-meta span {
min-height: 28px;
display: inline-flex;
align-items: center;
padding: 0 10px;
border: 1px solid #e2e8f0;
border-radius: 999px;
background: #f8fafc;
color: #475569;
font-size: 12px;
font-weight: 800;
}
.risk-sim-meta .tone-low {
border-color: #bfdbfe;
background: #eff6ff;
color: #1d4ed8;
}
.risk-sim-meta .tone-medium {
border-color: #fed7aa;
background: #fff7ed;
color: #c2410c;
}
.risk-sim-meta .tone-high {
border-color: #fecaca;
background: #fef2f2;
color: #b91c1c;
}
.risk-sim-main {
min-height: 0;
display: grid;
grid-template-columns: minmax(0, 1fr) 300px;
gap: 14px;
padding: 14px;
}
.risk-sim-dialog-panel,
.risk-sim-context-panel {
min-height: 0;
border: 1px solid #dfe8f1;
border-radius: 14px;
background: #fff;
}
.risk-sim-dialog-panel {
display: grid;
grid-template-rows: minmax(0, 1fr) auto auto;
overflow: hidden;
}
.risk-sim-message-list {
min-height: 0;
display: grid;
align-content: start;
gap: 14px;
overflow-y: auto;
padding: 18px;
background: #f8fafc;
}
.risk-sim-message-row {
display: grid;
grid-template-columns: 34px minmax(0, 1fr);
gap: 10px;
align-items: start;
}
.risk-sim-message-row.user {
grid-template-columns: minmax(0, 1fr) 34px;
}
.risk-sim-message-row.user .risk-sim-avatar {
grid-column: 2;
grid-row: 1;
}
.risk-sim-message-row.user .risk-sim-bubble {
grid-column: 1;
justify-self: end;
background: #0f766e;
color: #fff;
}
.risk-sim-message-row.user .risk-sim-bubble header,
.risk-sim-message-row.user .risk-sim-bubble p {
color: #fff;
}
.risk-sim-avatar {
width: 34px;
height: 34px;
display: grid;
place-items: center;
border: 1px solid #dbe5ef;
border-radius: 12px;
background: #fff;
color: #0f766e;
}
.risk-sim-message-row.user .risk-sim-avatar {
color: #2563eb;
}
.risk-sim-bubble {
max-width: min(100%, 760px);
padding: 11px 13px;
border: 1px solid #e2e8f0;
border-radius: 14px;
background: #fff;
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}
.risk-sim-bubble header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 6px;
color: #64748b;
font-size: 11px;
}
.risk-sim-bubble header strong {
color: #0f172a;
font-size: 12px;
font-weight: 850;
}
.risk-sim-bubble p {
margin: 0;
color: #1e293b;
font-size: 13px;
line-height: 1.65;
white-space: pre-wrap;
}
.risk-sim-thinking {
display: inline-flex;
align-items: center;
gap: 8px;
}
.risk-sim-message-files,
.risk-sim-file-strip div {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.risk-sim-message-files {
margin-top: 9px;
}
.risk-sim-message-files span,
.risk-sim-file-chip {
min-width: 0;
max-width: 260px;
display: inline-flex;
align-items: center;
gap: 5px;
min-height: 28px;
padding: 0 9px;
border: 1px solid rgba(191, 219, 254, 0.8);
border-radius: 999px;
background: #eff6ff;
color: #1d4ed8;
font-size: 12px;
font-weight: 750;
}
.risk-sim-message-files span {
color: #dbeafe;
border-color: rgba(219, 234, 254, 0.38);
background: rgba(255, 255, 255, 0.12);
}
.risk-sim-result-card {
margin-top: 12px;
overflow: hidden;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #fff;
}
.risk-sim-result-card.high {
border-color: #fecaca;
}
.risk-sim-result-card.medium {
border-color: #fed7aa;
}
.risk-sim-result-card.low {
border-color: #bfdbfe;
}
.risk-sim-result-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 11px 12px;
border-bottom: 1px solid #edf2f7;
}
.risk-sim-result-head strong {
display: block;
margin-top: 3px;
color: #0f172a;
font-size: 14px;
font-weight: 900;
}
.risk-sim-result-head b {
padding: 5px 9px;
border-radius: 999px;
background: #f1f5f9;
color: #475569;
font-size: 12px;
}
.risk-sim-result-card.high .risk-sim-result-head b {
background: #fef2f2;
color: #b91c1c;
}
.risk-sim-result-card.medium .risk-sim-result-head b {
background: #fff7ed;
color: #c2410c;
}
.risk-sim-result-card.low .risk-sim-result-head b {
background: #eff6ff;
color: #1d4ed8;
}
.risk-sim-result-message {
padding: 10px 12px 0;
}
.risk-sim-blocking-message {
padding: 10px 12px 0;
color: #92400e;
}
.risk-sim-field-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
padding: 12px;
}
.risk-sim-field-grid div {
min-width: 0;
padding: 9px 10px;
border: 1px solid #edf2f7;
border-radius: 10px;
background: #f8fafc;
}
.risk-sim-field-grid span {
display: block;
color: #64748b;
font-size: 11px;
font-weight: 800;
}
.risk-sim-field-grid strong {
display: block;
margin-top: 4px;
overflow: hidden;
color: #0f172a;
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.risk-sim-evidence {
display: grid;
gap: 6px;
padding: 0 12px 12px;
}
.risk-sim-missing-fields {
display: flex;
gap: 7px;
flex-wrap: wrap;
padding: 0 12px 12px;
}
.risk-sim-missing-fields span {
flex: 0 0 100%;
color: #92400e;
font-size: 12px;
font-weight: 850;
}
.risk-sim-missing-fields b {
min-height: 26px;
display: inline-flex;
align-items: center;
padding: 0 8px;
border: 1px solid #fed7aa;
border-radius: 999px;
background: #fff7ed;
color: #c2410c;
font-size: 11px;
font-weight: 850;
}
.risk-sim-evidence ul {
display: grid;
gap: 5px;
margin: 0;
padding-left: 18px;
color: #334155;
font-size: 12px;
line-height: 1.55;
}
.risk-sim-file-strip {
display: grid;
gap: 8px;
padding: 10px 14px;
border-top: 1px solid #e2e8f0;
background: #fff;
}
.risk-sim-file-chip {
cursor: pointer;
}
.risk-sim-file-chip span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.risk-sim-file-chip em {
color: inherit;
font-size: 11px;
font-style: normal;
opacity: 0.78;
white-space: nowrap;
}
.risk-sim-file-chip.pending {
border-color: #dbe5ef;
background: #f8fafc;
color: #475569;
}
.risk-sim-file-chip.recognizing {
border-color: #dbeafe;
background: #eff6ff;
color: #2563eb;
}
.risk-sim-file-chip.recognized {
border-color: #bbf7d0;
background: #ecfdf5;
color: #047857;
}
.risk-sim-file-chip.failed {
border-color: #fed7aa;
background: #fff7ed;
color: #c2410c;
}
.risk-sim-composer {
display: grid;
grid-template-columns: 42px minmax(0, 1fr) 42px;
gap: 10px;
align-items: center;
padding: 12px 14px 14px;
border-top: 1px solid #e2e8f0;
background: #fff;
}
.risk-sim-composer.text-only {
grid-template-columns: minmax(0, 1fr) 42px;
}
.risk-sim-file-input {
display: none;
}
.risk-sim-tool-btn,
.risk-sim-send-btn {
width: 42px;
height: 42px;
border-radius: 999px;
}
.risk-sim-send-btn {
border-color: #0f766e;
background: #0f766e;
color: #fff;
}
.risk-sim-tool-btn:disabled,
.risk-sim-send-btn:disabled,
.risk-sim-primary-btn:disabled,
.risk-sim-secondary-btn:disabled {
opacity: 0.48;
cursor: not-allowed;
}
.risk-sim-composer-shell {
min-height: 42px;
display: flex;
align-items: center;
border: 1px solid #cbd5e1;
border-radius: 999px;
background: #fff;
}
.risk-sim-composer-shell:focus-within {
border-color: rgba(15, 118, 110, 0.58);
box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.risk-sim-composer-shell textarea {
width: 100%;
min-height: 34px;
max-height: 110px;
resize: none;
border: 0;
padding: 8px 14px;
background: transparent;
color: #0f172a;
font-size: 13px;
line-height: 1.45;
}
.risk-sim-composer-shell textarea:focus {
outline: none;
}
.risk-sim-context-panel {
display: grid;
align-content: start;
gap: 12px;
padding: 14px;
}
.risk-sim-context-panel section {
display: grid;
gap: 7px;
padding: 12px;
border: 1px solid #edf2f7;
border-radius: 12px;
background: #f8fafc;
}
.risk-sim-step-list,
.risk-sim-recognition-list {
display: grid;
gap: 9px;
}
.risk-sim-step {
display: grid;
grid-template-columns: 28px minmax(0, 1fr);
gap: 9px;
align-items: flex-start;
padding: 9px;
border: 1px solid #e2e8f0;
border-radius: 10px;
background: #fff;
}
.risk-sim-step i {
width: 28px;
height: 28px;
display: grid;
place-items: center;
border-radius: 10px;
background: #f1f5f9;
color: #64748b;
}
.risk-sim-step.done i {
background: #ecfdf5;
color: #047857;
}
.risk-sim-step.running i {
background: #eff6ff;
color: #2563eb;
}
.risk-sim-step.warning i {
background: #fff7ed;
color: #c2410c;
}
.risk-sim-step strong {
color: #0f172a;
font-size: 12px;
font-weight: 900;
}
.risk-sim-step p,
.risk-sim-recognition-list p,
.risk-sim-recognition-list small {
margin: 2px 0 0;
color: #64748b;
font-size: 11px;
line-height: 1.45;
}
.risk-sim-recognition-list article {
min-width: 0;
padding: 9px;
border: 1px solid #e2e8f0;
border-radius: 10px;
background: #fff;
}
.risk-sim-recognition-list article strong {
display: block;
color: #0f172a;
font-size: 12px;
font-weight: 900;
}
.risk-sim-recognition-list small {
display: block;
}
.risk-sim-error-text {
color: #c2410c;
}
.risk-sim-context-panel strong {
color: #0f172a;
font-size: 14px;
font-weight: 900;
}
.risk-sim-context-panel p,
.risk-sim-field-list em {
margin: 0;
color: #475569;
font-size: 12px;
line-height: 1.55;
}
.risk-sim-field-list {
display: flex;
gap: 7px;
flex-wrap: wrap;
}
.risk-sim-field-list b {
max-width: 100%;
min-height: 26px;
display: inline-flex;
align-items: center;
padding: 0 8px;
overflow: hidden;
border: 1px solid #dbe5ef;
border-radius: 999px;
background: #fff;
color: #334155;
font-size: 11px;
font-weight: 800;
text-overflow: ellipsis;
white-space: nowrap;
}
.risk-sim-foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px 14px;
border-top: 1px solid #dfe8f1;
background: #fff;
}
.risk-sim-foot > span {
color: #64748b;
font-size: 12px;
font-weight: 750;
}
.risk-sim-foot div {
display: flex;
align-items: center;
gap: 10px;
}
.risk-sim-primary-btn,
.risk-sim-secondary-btn {
min-height: 36px;
display: inline-flex;
align-items: center;
gap: 7px;
padding: 0 13px;
border-radius: 10px;
font-size: 13px;
font-weight: 850;
}
.risk-sim-primary-btn {
border: 1px solid #0f766e;
background: #0f766e;
color: #fff;
}
.risk-sim-secondary-btn {
border: 1px solid #dbe5ef;
background: #f8fafc;
color: #334155;
}
.risk-sim-dialog-enter-active,
.risk-sim-dialog-leave-active {
transition: opacity 0.18s ease;
}
.risk-sim-dialog-enter-from,
.risk-sim-dialog-leave-to {
opacity: 0;
}
@media (max-width: 920px) {
.risk-sim-main {
grid-template-columns: 1fr;
}
.risk-sim-context-panel {
display: none;
}
.risk-sim-field-grid {
grid-template-columns: 1fr;
}
.risk-sim-foot {
align-items: stretch;
flex-direction: column;
}
.risk-sim-foot div {
justify-content: flex-end;
}
}

View File

@@ -155,6 +155,53 @@
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.review-submit-test-state,
.risk-rule-action-confirm,
.risk-rule-action-note {
display: grid;
gap: 6px;
padding: 10px 12px;
border: 1px solid #e2e8f0;
border-radius: 8px;
background: #f8fafc;
}
.review-submit-test-state span,
.risk-rule-action-confirm span,
.risk-rule-action-note span {
color: #64748b;
font-size: 12px;
font-weight: 800;
}
.review-submit-test-state strong,
.risk-rule-action-confirm strong {
color: #b45309;
font-size: 13px;
font-weight: 850;
}
.review-submit-test-state strong.passed {
color: #047857;
}
.review-submit-test-state p {
margin: 0;
color: #64748b;
font-size: 12px;
line-height: 1.5;
}
.risk-rule-action-note textarea {
width: 100%;
padding: 10px 12px;
border: 1px solid #cbd5e1;
border-radius: 8px;
resize: vertical;
color: #0f172a;
font-size: 13px;
}
.review-submit-hint {
margin: 0;
padding: 10px 12px;
@@ -847,6 +894,41 @@
grid-column: 1 / -1;
}
.risk-rule-create-toggle {
display: flex !important;
align-items: flex-start;
gap: 10px;
padding: 12px;
border: 1px solid #dbe5ef;
border-radius: 10px;
background: #f8fafc;
}
.risk-rule-create-toggle input {
width: 16px;
height: 16px;
margin-top: 3px;
accent-color: #0f766e;
}
.risk-rule-create-toggle span {
display: grid;
gap: 3px;
min-width: 0;
}
.risk-rule-create-toggle strong {
color: #0f172a;
font-size: 13px;
font-weight: 850;
}
.risk-rule-create-toggle small {
color: #64748b;
font-size: 12px;
line-height: 1.5;
}
.risk-rule-create-form label span {
color: #475569;
font-size: 12px;
@@ -949,6 +1031,20 @@
color: #059669;
}
.minor-action.enable-action {
border-color: rgba(100, 116, 139, 0.26);
color: #64748b;
}
.minor-action.enable-action.is-on {
border-color: rgba(5, 150, 105, 0.26);
color: #059669;
}
.minor-action.enable-action i {
font-size: 18px;
}
.minor-action.danger-action {
border-color: rgba(220, 38, 38, 0.2);
color: #dc2626;
@@ -1009,6 +1105,16 @@
color: #fff;
}
.mini-btn.danger {
border-color: rgba(220, 38, 38, 0.24);
color: #dc2626;
}
.mini-btn.warning {
border-color: rgba(245, 158, 11, 0.28);
color: #b45309;
}
@media (max-width: 1320px) {
.detail-hero {
grid-template-columns: 1fr;
@@ -1325,16 +1431,18 @@
padding-bottom: 2px;
}
.json-risk-summary-card,
.json-risk-flow-card,
.json-risk-description-card {
background: #ffffff;
border: 1px solid #e2e8f0;
}
.json-risk-flow-card {
min-width: 0;
overflow: hidden;
}
.json-risk-description-card {
border-color: #fecdd3;
background: linear-gradient(180deg, #fffafb 0%, #ffffff 100%);
}
.json-risk-description-text {
margin: 0;
padding: 0 4px 8px;
@@ -1348,36 +1456,109 @@
.json-risk-description-source {
margin: 0;
padding: 8px 12px 4px;
border-top: 1px solid #ffe4e6;
border-top: 1px solid #e2e8f0;
color: #94a3b8;
font-size: 12px;
line-height: 1.5;
}
.json-risk-summary-grid {
.json-risk-meta-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
column-gap: 36px;
row-gap: 0;
}
.json-risk-summary-grid span {
min-height: 34px;
.json-risk-meta-item {
display: flex;
flex-direction: column;
gap: 4px;
padding: 10px 12px;
border-radius: 10px;
background: #f8fafc;
color: #475569;
font-size: 12px;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #f1f5f9;
font-size: 13px;
min-height: 40px;
}
.json-risk-summary-grid strong {
.json-risk-meta-item.full-width {
grid-column: span 2;
}
.json-risk-meta-label {
width: 84px;
flex-shrink: 0;
color: #64748b;
font-weight: 500;
}
.json-risk-meta-value {
color: #0f172a;
font-weight: 600;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 6px;
min-width: 0;
}
.meta-value-hint {
color: #64748b;
font-size: 11.5px;
font-weight: 400;
margin-left: 2px;
}
.json-risk-meta-badge {
display: inline-flex;
align-items: center;
padding: 2px 8px;
border-radius: 999px;
font-size: 11px;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.04em;
line-height: 1.2;
}
.json-risk-meta-badge.high {
background: #fef2f2;
color: #dc2626;
}
.json-risk-meta-badge.medium {
background: #fff7ed;
color: #ea580c;
}
.json-risk-meta-badge.low {
background: #ecfdf5;
color: #059669;
}
.json-risk-meta-badge.test-passed {
background: #ecfdf5;
color: #047857;
}
.json-risk-meta-badge.test-pending {
background: #fff7ed;
color: #b45309;
}
.meta-status-indicator {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 12.5px;
font-weight: 600;
}
.meta-status-indicator .indicator-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #94a3b8;
}
.meta-status-indicator.is-active .indicator-dot {
background: #10b981;
box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
}
.json-risk-editor-toolbar {
@@ -1403,9 +1584,12 @@
@media (max-width: 760px) {
.risk-rule-create-form,
.json-risk-summary-grid {
.json-risk-meta-grid {
grid-template-columns: 1fr;
}
.json-risk-meta-item.full-width {
grid-column: span 1;
}
}
@media (max-width: 860px) {
@@ -1417,4 +1601,5 @@
.json-risk-editor-actions {
justify-content: flex-start;
}
}

View File

@@ -423,11 +423,11 @@
font-weight: 700;
}
table {
width: 100%;
min-width: 1120px;
border-collapse: collapse;
}
table {
width: 100%;
min-width: 1260px;
border-collapse: collapse;
}
th,
td {

View File

@@ -0,0 +1,720 @@
.documents-page {
height: 100%;
min-height: 0;
display: grid;
grid-template-rows: minmax(0, 1fr);
animation: fadeUp 220ms var(--ease) both;
overflow: hidden;
}
.documents-list {
min-height: 0;
display: grid;
grid-template-rows: auto auto minmax(0, 1fr) auto;
padding: 16px 18px;
overflow: hidden;
}
.status-tabs {
display: flex;
gap: 28px;
margin-top: 14px;
border-bottom: 1px solid #dbe4ee;
}
.status-tabs button {
position: relative;
min-height: 36px;
display: inline-flex;
align-items: center;
gap: 7px;
border: 0;
background: transparent;
color: #64748b;
font-size: 14px;
font-weight: 750;
}
.status-tabs button.active {
color: #059669;
}
.status-tabs button.active::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: -1px;
height: 3px;
border-radius: 999px 999px 0 0;
background: #10b981;
}
.scope-tab-badge {
min-width: 18px;
height: 18px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 5px;
border-radius: 999px;
background: #ef4444;
color: #fff;
font-size: 11px;
font-weight: 850;
line-height: 1;
box-shadow: 0 6px 14px rgba(239, 68, 68, 0.22);
}
.document-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-top: 14px;
}
.filter-set,
.document-actions {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}
.list-search {
position: relative;
width: 280px;
}
.list-search .mdi {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
color: #64748b;
font-size: 15px;
}
.list-search input {
width: 100%;
height: 38px;
padding: 0 12px 0 36px;
border: 1px solid #d7e0ea;
border-radius: 8px;
background: #fff;
color: #0f172a;
font-size: 13px;
transition: border-color 160ms ease, box-shadow 160ms ease;
}
.list-search input::placeholder {
color: #8da0b4;
}
.list-search input:focus {
border-color: #10b981;
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
outline: none;
}
.filter-btn,
.page-size {
min-height: 38px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 9px;
padding: 0 14px;
border: 1px solid #d7e0ea;
border-radius: 8px;
background: #fff;
color: #334155;
font-size: 14px;
font-weight: 750;
white-space: nowrap;
}
.filter-btn {
min-width: 120px;
justify-content: space-between;
}
.filter-btn:hover,
.page-size:hover {
border-color: rgba(16, 185, 129, .32);
color: #0f9f78;
}
.document-filter,
.date-range-filter {
position: relative;
}
.document-filter-menu,
.date-range-popover,
.page-size-dropdown {
position: absolute;
z-index: 40;
border: 1px solid #d7e0ea;
border-radius: 10px;
background: #fff;
box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
overflow: hidden;
}
.document-filter-menu {
top: calc(100% + 8px);
left: 0;
min-width: 150px;
max-height: 280px;
padding: 6px;
overflow-y: auto;
}
.document-filter-menu button,
.page-size-dropdown button {
display: block;
width: 100%;
min-height: 36px;
padding: 0 12px;
border: 0;
border-radius: 8px;
background: transparent;
color: #334155;
font-size: 13px;
font-weight: 650;
text-align: left;
white-space: nowrap;
}
.document-filter-menu button:hover,
.document-filter-menu button.active {
background: rgba(16, 185, 129, 0.1);
color: #047857;
}
.date-range-trigger {
min-width: 150px;
}
.date-range-label {
max-width: 104px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.date-range-popover {
top: calc(100% + 8px);
left: 0;
width: 320px;
display: grid;
gap: 14px;
padding: 16px;
}
.date-range-popover header,
.date-range-popover footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.date-range-popover header strong {
color: #0f172a;
font-size: 15px;
}
.date-range-popover header button {
width: 30px;
height: 30px;
display: grid;
place-items: center;
border: 0;
border-radius: 8px;
background: transparent;
color: #64748b;
}
.date-range-fields {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.date-range-fields label {
display: grid;
gap: 6px;
}
.date-range-fields span {
color: #64748b;
font-size: 12px;
font-weight: 700;
}
.date-range-fields input {
width: 100%;
height: 38px;
padding: 0 9px;
border: 1px solid #d7e0ea;
border-radius: 8px;
color: #0f172a;
font-size: 13px;
}
.ghost-btn,
.apply-btn {
height: 36px;
padding: 0 14px;
border-radius: 8px;
font-size: 13px;
font-weight: 750;
}
.ghost-btn {
border: 1px solid #d7e0ea;
background: #fff;
color: #334155;
}
.apply-btn {
border: 0;
background: #10b981;
color: #fff;
}
.apply-btn:disabled {
cursor: not-allowed;
background: #cbd5e1;
}
.create-request-btn {
min-height: 40px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 0 18px;
border: 0;
border-radius: 10px;
background: linear-gradient(135deg, #10b981, #059669);
color: #fff;
font-size: 14px;
font-weight: 800;
white-space: nowrap;
box-shadow: 0 10px 24px rgba(5, 150, 105, 0.2);
transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.create-request-btn.secondary {
border: 1px solid #d7e0ea;
background: #fff;
color: #334155;
box-shadow: none;
}
.create-request-btn:hover {
transform: translateY(-1px);
box-shadow: 0 14px 28px rgba(5, 150, 105, 0.24);
filter: saturate(1.02);
}
.create-request-btn.secondary:hover {
border-color: rgba(16, 185, 129, .32);
color: #047857;
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.document-status-filter {
display: inline-flex;
align-items: center;
justify-content: flex-start;
gap: 10px;
min-height: 38px;
}
.status-dropdown-filter {
min-width: 154px;
}
.status-filter-trigger {
min-width: 154px;
}
.status-filter-trigger > .mdi:first-child {
color: #10b981;
}
.status-filter-menu {
min-width: 154px;
}
.table-wrap {
min-height: 400px;
margin-top: 10px;
overflow-x: auto;
overflow-y: auto;
border: 1px solid #edf2f7;
border-radius: 10px;
background: linear-gradient(180deg, #fcfefd 0%, #f4f8f6 100%);
display: flex;
flex-direction: column;
}
.table-wrap.is-empty {
align-items: center;
justify-content: center;
}
.table-wrap table {
width: 100%;
align-self: flex-start;
}
.table-state {
width: 100%;
min-height: 260px;
display: grid;
place-items: center;
gap: 10px;
padding: 28px 20px;
text-align: center;
color: #64748b;
background: linear-gradient(180deg, #fcfffd 0%, #f5f9f7 100%);
}
.table-state .mdi {
font-size: 28px;
color: #10b981;
}
.table-state strong {
color: #0f172a;
font-size: 15px;
}
.table-state p {
max-width: 420px;
margin: 0;
font-size: 13px;
line-height: 1.6;
}
.table-state.error {
background: linear-gradient(180deg, #fffdfd 0%, #fff6f6 100%);
}
.table-state.error .mdi {
color: #ef4444;
}
.retry-btn {
height: 36px;
padding: 0 14px;
border: 1px solid #f1c5c5;
border-radius: 8px;
background: #fff;
color: #b91c1c;
font-size: 13px;
font-weight: 750;
}
table {
width: 100%;
min-width: 1320px;
border-collapse: collapse;
table-layout: fixed;
}
.col-id { width: 11%; }
.col-created { width: 10%; }
.col-stay { width: 9%; }
.col-doc-type { width: 9%; }
.col-scene { width: 10%; }
.col-title { width: 18%; }
.col-amount { width: 9%; }
.col-node { width: 12%; }
.col-status { width: 8%; }
.col-updated { width: 9%; }
th,
td {
padding: 13px 12px;
border-bottom: 1px solid #edf2f7;
color: #24324a;
font-size: 14px;
line-height: 1.35;
text-align: center;
vertical-align: middle;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
th {
position: sticky;
top: 0;
z-index: 1;
background: #f7fafc;
color: #64748b;
font-size: 13px;
font-weight: 800;
}
tbody tr {
cursor: pointer;
}
tbody tr:hover {
background: linear-gradient(90deg, rgba(16, 185, 129, .08), rgba(16, 185, 129, .03));
}
tbody tr:last-child td {
border-bottom: 0;
}
.doc-id {
color: #059669;
font-weight: 800;
}
.doc-kind-tag,
.type-tag,
.status-tag {
display: inline-flex;
align-items: center;
justify-content: center;
white-space: nowrap;
}
.doc-kind-tag {
min-height: 26px;
padding: 0 10px;
border-radius: 7px;
font-size: 12px;
font-weight: 800;
}
.doc-kind-tag.reimbursement {
background: #ecfdf5;
color: #059669;
}
.doc-kind-tag.application {
background: #eff6ff;
color: #2563eb;
}
.type-tag {
min-height: 26px;
padding: 0 10px;
border-radius: 999px;
font-size: 12px;
font-weight: 800;
}
.type-tag.travel,
.type-tag.hotel,
.type-tag.transport {
background: #ecfdf5;
color: #047857;
}
.type-tag.entertainment,
.type-tag.meal {
background: #fff7ed;
color: #ea580c;
}
.type-tag.office {
background: #eff6ff;
color: #2563eb;
}
.type-tag.meeting,
.type-tag.training {
background: #eef2ff;
color: #4f46e5;
}
.type-tag.other {
background: #f8fafc;
color: #475569;
}
.status-tag {
min-height: 24px;
padding: 0 9px;
border: 1px solid transparent;
border-radius: 6px;
font-size: 12px;
font-weight: 750;
}
.status-tag.info {
border-color: #bfdbfe;
background: #eff6ff;
color: #2563eb;
}
.status-tag.success,
.status-tag.archived {
border-color: #bbf7d0;
background: #ecfdf5;
color: #059669;
}
.status-tag.warning,
.status-tag.draft {
border-color: #fed7aa;
background: #fff7ed;
color: #f97316;
}
.status-tag.danger {
border-color: #fecaca;
background: #fef2f2;
color: #dc2626;
}
.status-tag.neutral {
border-color: #cbd5e1;
background: #f8fafc;
color: #475569;
}
.list-foot {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 16px;
margin-top: 12px;
}
.page-summary {
color: #64748b;
font-size: 14px;
font-weight: 650;
}
.pager {
display: inline-flex;
justify-content: center;
gap: 6px;
padding: 4px;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #f8fafc;
}
.pager button {
width: 32px;
height: 32px;
border: 0;
border-radius: 9px;
background: transparent;
color: #334155;
font-size: 14px;
font-weight: 800;
}
.pager button:hover:not(.active) {
background: #fff;
color: #059669;
box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}
.pager button.active {
background: #059669;
color: #fff;
box-shadow: 0 8px 16px rgba(5, 150, 105, .20);
}
.pager button:disabled {
color: #cbd5e1;
cursor: not-allowed;
}
.page-size-wrap {
position: relative;
justify-self: end;
}
.page-size {
min-width: 112px;
border-radius: 10px;
background: #fff;
box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.page-size-dropdown {
right: 0;
bottom: calc(100% + 6px);
display: grid;
}
.page-size-dropdown button {
border-radius: 0;
text-align: center;
padding: 0 20px;
}
.page-size-dropdown button:hover {
background: #f0fdf4;
color: #059669;
}
.page-size-dropdown button.active {
background: #059669;
color: #fff;
}
@media (max-width: 1200px) {
.document-toolbar,
.list-foot {
grid-template-columns: 1fr;
}
.document-toolbar {
align-items: stretch;
flex-direction: column;
}
.document-actions {
justify-content: flex-start;
}
}
@media (max-width: 760px) {
.documents-list {
padding: 16px;
}
.status-tabs {
gap: 18px;
overflow-x: auto;
}
.filter-set,
.document-actions,
.document-status-filter,
.list-search,
.filter-btn,
.page-size {
width: 100%;
}
.document-status-filter {
align-items: stretch;
flex-direction: column;
gap: 6px;
}
.list-foot {
display: grid;
justify-items: stretch;
}
}

View File

@@ -237,7 +237,7 @@
color: #475569;
font-size: 12px;
font-weight: 800;
text-align: left;
text-align: center;
white-space: nowrap;
}
@@ -260,11 +260,13 @@
border-bottom: 1px solid #eef3f8;
color: #0f172a;
font-size: 13px;
vertical-align: top;
text-align: center;
vertical-align: middle;
}
.summary-cell {
min-width: 220px;
text-align: left;
}
.summary-cell strong,
@@ -301,6 +303,7 @@
display: grid;
gap: 5px;
align-content: start;
justify-items: center;
}
.status-note {
@@ -632,52 +635,60 @@
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 56px;
padding: 4px 9px;
border-radius: 999px;
padding: 3px 8px;
border-radius: 6px;
font-size: 12px;
font-weight: 800;
font-weight: 600;
white-space: nowrap;
border: 1px solid transparent;
}
.status-pill.success {
background: rgba(22, 163, 74, 0.12);
border-color: rgba(22, 163, 74, 0.2);
color: #166534;
}
.status-pill.warning {
background: rgba(245, 158, 11, 0.14);
border-color: rgba(245, 158, 11, 0.25);
color: #b45309;
}
.status-pill.danger {
background: rgba(239, 68, 68, 0.14);
border-color: rgba(239, 68, 68, 0.25);
color: #b91c1c;
}
.status-pill.muted {
background: rgba(148, 163, 184, 0.14);
border-color: rgba(148, 163, 184, 0.25);
color: #475569;
}
.status-pill.info,
.level-pill.info {
background: rgba(37, 99, 235, 0.12);
border-color: rgba(37, 99, 235, 0.25);
color: #1d4ed8;
}
.level-pill.warning {
background: rgba(245, 158, 11, 0.14);
border-color: rgba(245, 158, 11, 0.25);
color: #b45309;
}
.level-pill.danger {
background: rgba(239, 68, 68, 0.14);
border-color: rgba(239, 68, 68, 0.25);
color: #b91c1c;
}
.level-pill.muted {
background: rgba(148, 163, 184, 0.14);
border-color: rgba(148, 163, 184, 0.25);
color: #475569;
}