feat: 增强风险规则生成引擎与预算中心页面
后端拆分风险规则生成为解释器、语义分析、本体对齐等子模块, 优化模板执行和流程图生成,完善员工种子数据和导入逻辑,增强 报销单权限策略和草稿持久化,前端新增预算中心视图和趋势图 组件,重构审计页面和风险规则测试对话框交互,完善文档中心 和报销创建页面细节,补充单元测试覆盖。
This commit is contained in:
@@ -935,6 +935,7 @@
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
.risk-rule-create-form input:not([type='checkbox']),
|
||||
.risk-rule-create-form select,
|
||||
.risk-rule-create-form textarea {
|
||||
width: 100%;
|
||||
@@ -945,6 +946,7 @@
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.risk-rule-create-form input:not([type='checkbox']),
|
||||
.risk-rule-create-form select {
|
||||
min-height: 42px;
|
||||
padding: 0 12px;
|
||||
@@ -957,6 +959,7 @@
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.risk-rule-create-form input:not([type='checkbox']):focus,
|
||||
.risk-rule-create-form select:focus,
|
||||
.risk-rule-create-form textarea:focus {
|
||||
outline: 0;
|
||||
@@ -964,6 +967,7 @@
|
||||
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
|
||||
}
|
||||
|
||||
.risk-rule-create-form input:not([type='checkbox'])::placeholder,
|
||||
.risk-rule-create-form textarea::placeholder {
|
||||
color: #94a3b8;
|
||||
}
|
||||
@@ -1045,6 +1049,118 @@
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.risk-level-switch {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.minor-action.risk-level-action {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.minor-action.risk-level-action b {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 20px;
|
||||
padding: 0 7px;
|
||||
border-radius: 999px;
|
||||
font-size: 11px;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
.minor-action.risk-level-action.low {
|
||||
border-color: rgba(37, 99, 235, 0.22);
|
||||
color: #1d4ed8;
|
||||
}
|
||||
|
||||
.minor-action.risk-level-action.low b {
|
||||
background: #eff6ff;
|
||||
color: #1d4ed8;
|
||||
}
|
||||
|
||||
.minor-action.risk-level-action.medium {
|
||||
border-color: rgba(249, 115, 22, 0.26);
|
||||
color: #c2410c;
|
||||
}
|
||||
|
||||
.minor-action.risk-level-action.medium b {
|
||||
background: #fff7ed;
|
||||
color: #c2410c;
|
||||
}
|
||||
|
||||
.minor-action.risk-level-action.high {
|
||||
border-color: rgba(220, 38, 38, 0.22);
|
||||
color: #b91c1c;
|
||||
}
|
||||
|
||||
.minor-action.risk-level-action.high b {
|
||||
background: #fef2f2;
|
||||
color: #b91c1c;
|
||||
}
|
||||
|
||||
.risk-level-menu {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: calc(100% + 8px);
|
||||
z-index: 35;
|
||||
width: 146px;
|
||||
padding: 6px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
|
||||
}
|
||||
|
||||
.risk-level-option {
|
||||
width: 100%;
|
||||
min-height: 34px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 0 9px;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
color: #334155;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.risk-level-option:hover,
|
||||
.risk-level-option.active {
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
.risk-level-option:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.58;
|
||||
}
|
||||
|
||||
.risk-level-option i {
|
||||
margin-left: auto;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.risk-level-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #94a3b8;
|
||||
}
|
||||
|
||||
.risk-level-option.low .risk-level-dot {
|
||||
background: #2563eb;
|
||||
}
|
||||
|
||||
.risk-level-option.medium .risk-level-dot {
|
||||
background: #f97316;
|
||||
}
|
||||
|
||||
.risk-level-option.high .risk-level-dot {
|
||||
background: #dc2626;
|
||||
}
|
||||
|
||||
.minor-action.danger-action {
|
||||
border-color: rgba(220, 38, 38, 0.2);
|
||||
color: #dc2626;
|
||||
@@ -1174,6 +1290,8 @@
|
||||
.search-filter,
|
||||
.picker-trigger,
|
||||
.picker-filter,
|
||||
.risk-level-switch,
|
||||
.risk-level-switch .minor-action,
|
||||
.toolbar-actions > * {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -1303,6 +1421,62 @@
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.json-risk-score-ring {
|
||||
--score-ring: #f97316;
|
||||
--score-ring-bg: #fff7ed;
|
||||
flex: 0 0 auto;
|
||||
width: 82px;
|
||||
height: 82px;
|
||||
border-radius: 999px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
align-content: center;
|
||||
gap: 1px;
|
||||
border: 2px solid var(--score-ring);
|
||||
background: var(--score-ring-bg);
|
||||
box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
|
||||
.json-risk-score-ring strong {
|
||||
color: #0f172a;
|
||||
font-size: 22px;
|
||||
font-weight: 900;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.json-risk-score-ring span,
|
||||
.json-risk-score-ring em {
|
||||
color: #64748b;
|
||||
font-size: 11px;
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.json-risk-score-ring em {
|
||||
color: var(--score-ring);
|
||||
}
|
||||
|
||||
.json-risk-score-ring.low {
|
||||
--score-ring: #2563eb;
|
||||
--score-ring-bg: #eff6ff;
|
||||
}
|
||||
|
||||
.json-risk-score-ring.medium {
|
||||
--score-ring: #f97316;
|
||||
--score-ring-bg: #fff7ed;
|
||||
}
|
||||
|
||||
.json-risk-score-ring.high {
|
||||
--score-ring: #dc2626;
|
||||
--score-ring-bg: #fef2f2;
|
||||
}
|
||||
|
||||
.json-risk-score-ring.critical {
|
||||
--score-ring: #991b1b;
|
||||
--score-ring-bg: #fff1f2;
|
||||
}
|
||||
|
||||
.json-risk-editor-title {
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
@@ -1423,6 +1597,55 @@
|
||||
padding: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
.json-risk-generation-failure {
|
||||
min-height: 360px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
align-content: center;
|
||||
gap: 14px;
|
||||
padding: 44px 24px;
|
||||
border: 1px solid #fecaca;
|
||||
border-radius: 12px;
|
||||
background: #fffafa;
|
||||
text-align: center;
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
.json-risk-generation-failure i {
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: 18px;
|
||||
background: #fef2f2;
|
||||
color: #dc2626;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.json-risk-generation-failure h3 {
|
||||
margin: 0;
|
||||
color: #991b1b;
|
||||
font-size: 18px;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
.json-risk-generation-failure p {
|
||||
max-width: 520px;
|
||||
margin: 8px auto 0;
|
||||
color: #475569;
|
||||
font-size: 13px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.json-risk-generation-failure small {
|
||||
display: block;
|
||||
max-width: 640px;
|
||||
margin-top: 12px;
|
||||
color: #b91c1c;
|
||||
line-height: 1.6;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.json-risk-main-stage {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
@@ -1521,14 +1744,19 @@
|
||||
color: #dc2626;
|
||||
}
|
||||
|
||||
.json-risk-meta-badge.critical {
|
||||
background: #fff1f2;
|
||||
color: #991b1b;
|
||||
}
|
||||
|
||||
.json-risk-meta-badge.medium {
|
||||
background: #fff7ed;
|
||||
color: #ea580c;
|
||||
}
|
||||
|
||||
.json-risk-meta-badge.low {
|
||||
background: #ecfdf5;
|
||||
color: #059669;
|
||||
background: #eff6ff;
|
||||
color: #1d4ed8;
|
||||
}
|
||||
|
||||
.json-risk-meta-badge.test-passed {
|
||||
|
||||
Reference in New Issue
Block a user