2026-03-25 14:05:30 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<aside class="project-analysis-sidebar">
|
2026-03-25 19:10:49 +08:00
|
|
|
|
<section class="sidebar-profile">
|
|
|
|
|
|
<div class="sidebar-section__title">人物档案</div>
|
|
|
|
|
|
<div class="sidebar-profile__name-row">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<div class="sidebar-profile__name">{{ sidebarData.basicInfo.name || "-" }}</div>
|
|
|
|
|
|
<div class="sidebar-profile__meta">
|
|
|
|
|
|
<span>工号 {{ sidebarData.basicInfo.staffCode || "-" }}</span>
|
|
|
|
|
|
<span>部门 {{ sidebarData.basicInfo.department || "-" }}</span>
|
|
|
|
|
|
</div>
|
2026-03-25 17:26:50 +08:00
|
|
|
|
</div>
|
2026-03-25 19:10:49 +08:00
|
|
|
|
<span class="sidebar-risk-badge">{{ sidebarData.basicInfo.riskLevel || "-" }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="sidebar-profile__grid">
|
|
|
|
|
|
<div class="sidebar-profile__item">
|
|
|
|
|
|
<span class="sidebar-profile__label">所属项目</span>
|
|
|
|
|
|
<span class="sidebar-profile__value">{{ sidebarData.basicInfo.projectName || "-" }}</span>
|
2026-03-25 17:26:50 +08:00
|
|
|
|
</div>
|
2026-03-25 19:10:49 +08:00
|
|
|
|
<div class="sidebar-profile__item">
|
|
|
|
|
|
<span class="sidebar-profile__label">风险等级</span>
|
|
|
|
|
|
<span class="sidebar-profile__value">{{ sidebarData.basicInfo.riskLevel || "-" }}</span>
|
2026-03-25 17:26:50 +08:00
|
|
|
|
</div>
|
2026-03-25 14:05:30 +08:00
|
|
|
|
</div>
|
2026-03-25 19:10:49 +08:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<section class="sidebar-summary">
|
|
|
|
|
|
<div class="sidebar-section__title">模型摘要</div>
|
|
|
|
|
|
<div class="sidebar-summary__metric">
|
|
|
|
|
|
<span class="sidebar-summary__label">命中模型数</span>
|
|
|
|
|
|
<strong class="sidebar-summary__value">{{ sidebarData.modelSummary.modelCount || "-" }}</strong>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="sidebar-summary__block">
|
|
|
|
|
|
<span class="sidebar-summary__label">核心异常标签</span>
|
|
|
|
|
|
<div v-if="sidebarData.modelSummary.riskTags.length" class="tag-list">
|
|
|
|
|
|
<el-tag
|
|
|
|
|
|
v-for="(tag, index) in sidebarData.modelSummary.riskTags"
|
|
|
|
|
|
:key="`${formatRiskTag(tag)}-${index}`"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
effect="plain"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ formatRiskTag(tag) }}
|
|
|
|
|
|
</el-tag>
|
2026-03-25 14:05:30 +08:00
|
|
|
|
</div>
|
2026-03-25 19:10:49 +08:00
|
|
|
|
<span v-else class="sidebar-summary__empty">暂无异常标签</span>
|
2026-03-25 14:05:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
2026-03-25 19:10:49 +08:00
|
|
|
|
|
|
|
|
|
|
<section class="sidebar-hint">
|
|
|
|
|
|
<div class="sidebar-section__title">辅助提示</div>
|
|
|
|
|
|
<p class="sidebar-hint__text">
|
|
|
|
|
|
侧栏仅保留人物身份与模型摘要,详细异常请在主区页签中继续查看。
|
|
|
|
|
|
</p>
|
|
|
|
|
|
</section>
|
2026-03-25 14:05:30 +08:00
|
|
|
|
</aside>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: "ProjectAnalysisSidebar",
|
|
|
|
|
|
props: {
|
|
|
|
|
|
sidebarData: {
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
default: () => ({
|
|
|
|
|
|
basicInfo: {},
|
|
|
|
|
|
modelSummary: {
|
|
|
|
|
|
riskTags: [],
|
|
|
|
|
|
},
|
|
|
|
|
|
}),
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
2026-03-25 15:26:03 +08:00
|
|
|
|
methods: {
|
|
|
|
|
|
formatRiskTag(tag) {
|
|
|
|
|
|
if (typeof tag === "string") {
|
|
|
|
|
|
return tag;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (tag && typeof tag === "object") {
|
|
|
|
|
|
return tag.ruleName || tag.label || tag.name || "";
|
|
|
|
|
|
}
|
|
|
|
|
|
return "";
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
2026-03-25 14:05:30 +08:00
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.project-analysis-sidebar {
|
2026-03-25 18:32:53 +08:00
|
|
|
|
width: 100%;
|
2026-03-25 19:10:49 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 16px;
|
2026-03-25 14:05:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 19:10:49 +08:00
|
|
|
|
.sidebar-profile,
|
|
|
|
|
|
.sidebar-summary,
|
|
|
|
|
|
.sidebar-hint {
|
|
|
|
|
|
padding: 20px;
|
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
|
background: #ffffff;
|
2026-03-25 17:26:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 19:10:49 +08:00
|
|
|
|
.sidebar-section__title {
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
letter-spacing: 0.08em;
|
|
|
|
|
|
color: #92400e;
|
2026-03-25 17:26:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 19:10:49 +08:00
|
|
|
|
.sidebar-profile__name-row {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
margin-top: 14px;
|
2026-03-25 14:05:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 19:10:49 +08:00
|
|
|
|
.sidebar-profile__name {
|
|
|
|
|
|
font-size: 24px;
|
2026-03-25 14:05:30 +08:00
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #0f172a;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 19:10:49 +08:00
|
|
|
|
.sidebar-profile__meta {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: #64748b;
|
2026-03-25 14:05:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 19:10:49 +08:00
|
|
|
|
.sidebar-risk-badge {
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
padding: 6px 12px;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
background: #fee2e2;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #b91c1c;
|
2026-03-25 14:05:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 19:10:49 +08:00
|
|
|
|
.sidebar-profile__grid {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: minmax(0, 1fr);
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
margin-top: 18px;
|
2026-03-25 14:05:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 19:10:49 +08:00
|
|
|
|
.sidebar-profile__item,
|
|
|
|
|
|
.sidebar-summary__metric,
|
|
|
|
|
|
.sidebar-summary__block {
|
|
|
|
|
|
padding: 14px 16px;
|
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
|
background: #f8fafc;
|
2026-03-25 18:47:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 19:10:49 +08:00
|
|
|
|
.sidebar-profile__label,
|
|
|
|
|
|
.sidebar-summary__label {
|
|
|
|
|
|
display: block;
|
2026-03-25 14:05:30 +08:00
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: #64748b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 19:10:49 +08:00
|
|
|
|
.sidebar-profile__value,
|
|
|
|
|
|
.sidebar-summary__value,
|
|
|
|
|
|
.sidebar-summary__empty {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
|
font-size: 14px;
|
2026-03-25 14:05:30 +08:00
|
|
|
|
line-height: 1.6;
|
|
|
|
|
|
color: #0f172a;
|
|
|
|
|
|
word-break: break-all;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 19:10:49 +08:00
|
|
|
|
.sidebar-summary {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sidebar-hint__text {
|
|
|
|
|
|
margin: 14px 0 0;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.7;
|
|
|
|
|
|
color: #64748b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 14:05:30 +08:00
|
|
|
|
.tag-list {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
2026-03-25 18:47:27 +08:00
|
|
|
|
justify-content: flex-start;
|
2026-03-25 14:05:30 +08:00
|
|
|
|
gap: 8px;
|
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|