|
|
@@ -3,28 +3,16 @@
|
|
|
<!-- 顶部统计卡片 -->
|
|
|
<el-row :gutter="16" class="kb-stats">
|
|
|
<el-col :span="6">
|
|
|
- <el-card shadow="hover" class="stat-card">
|
|
|
- <div class="stat-label">文档总数</div>
|
|
|
- <div class="stat-value">{{ stats.total || 0 }}</div>
|
|
|
- </el-card>
|
|
|
+ <StatCard label="文档总数" :value="stats.total || 0" />
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-card shadow="hover" class="stat-card">
|
|
|
- <div class="stat-label">文章来源</div>
|
|
|
- <div class="stat-value">{{ (stats.by_source && stats.by_source.article) || 0 }}</div>
|
|
|
- </el-card>
|
|
|
+ <StatCard label="文章来源" :value="(stats.by_source && stats.by_source.article) || 0" />
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-card shadow="hover" class="stat-card">
|
|
|
- <div class="stat-label">菌群知识库</div>
|
|
|
- <div class="stat-value">{{ (stats.by_source && stats.by_source.microbiome) || 0 }}</div>
|
|
|
- </el-card>
|
|
|
+ <StatCard label="菌群知识库" :value="(stats.by_source && stats.by_source.microbiome) || 0" />
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-card shadow="hover" class="stat-card">
|
|
|
- <div class="stat-label">知识库(DAN)</div>
|
|
|
- <div class="stat-value">{{ (stats.by_source && stats.by_source.dan_knowledge) || 0 }}</div>
|
|
|
- </el-card>
|
|
|
+ <StatCard label="知识库(DAN)" :value="(stats.by_source && stats.by_source.dan_knowledge) || 0" />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
@@ -277,19 +265,6 @@ export default {
|
|
|
.kb-stats {
|
|
|
margin-bottom: 12px;
|
|
|
}
|
|
|
-.stat-card {
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-.stat-label {
|
|
|
- font-size: 13px;
|
|
|
- color: #909399;
|
|
|
- margin-bottom: 8px;
|
|
|
-}
|
|
|
-.stat-value {
|
|
|
- font-size: 26px;
|
|
|
- font-weight: 700;
|
|
|
- color: #303133;
|
|
|
-}
|
|
|
.kb-toolbar {
|
|
|
margin-bottom: 12px;
|
|
|
}
|
|
|
@@ -312,6 +287,6 @@ export default {
|
|
|
gap: 8px;
|
|
|
}
|
|
|
.danger-text {
|
|
|
- color: #f56c6c;
|
|
|
+ color: var(--adm-error);
|
|
|
}
|
|
|
</style>
|