mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-24 04:19:48 +01:00
parent
3f4e0b4aa0
commit
087a202e31
3 changed files with 25 additions and 0 deletions
|
|
@ -67,4 +67,7 @@ public class KnowledgeBaseDTO implements Serializable {
|
|||
|
||||
@Schema(description = "文档数量")
|
||||
private Integer documentCount;
|
||||
|
||||
@Schema(description = "异常提示")
|
||||
private String errorMessage;
|
||||
}
|
||||
|
|
@ -147,6 +147,7 @@ public class KnowledgeBaseServiceImpl extends BaseServiceImpl<KnowledgeBaseDao,
|
|||
} catch (Exception e) {
|
||||
log.warn("同步数据集信息失败 {}: {}", dto.getName(), e.getMessage());
|
||||
dto.setDocumentCount(0);
|
||||
dto.setErrorMessage(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@
|
|||
:class="{ active: selectedKb && selectedKb.datasetId === kb.datasetId }"
|
||||
@click="selectKnowledgeBase(kb)"
|
||||
>
|
||||
<el-tooltip v-if="kb.errorMessage" :content="kb.errorMessage" placement="bottom-start" effect="dark">
|
||||
<div class="kb-card-warning">
|
||||
<i class="el-icon-warning"></i>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<div class="kb-card-actions-top">
|
||||
<button class="kb-action-icon" :title="$t('knowledgeBaseManagement.edit')" @click.stop="editKnowledgeBase(kb)">
|
||||
<i class="el-icon-edit"></i>
|
||||
|
|
@ -888,6 +893,22 @@ export default {
|
|||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.kb-card-warning {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 4px;
|
||||
z-index: 2;
|
||||
color: #e6a23c;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
animation: warning-pulse 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes warning-pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.5; }
|
||||
}
|
||||
|
||||
.kb-card-actions-top {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
|
|
|
|||
Loading…
Reference in a new issue