feat(zone): 三区标记M3——新增BotSourceTag组件(最近Bot更新时间/来源/批次,缺失隐藏),接入/kpis/:id、/bot-kpis、/alerts三页 (three-zone P0-①)

This commit is contained in:
Hermes CI Fix
2026-09-03 17:52:10 +08:00
parent 4c01f2bf21
commit 92873456ab
4 changed files with 83 additions and 1 deletions
+45
View File
@@ -0,0 +1,45 @@
<template>
<div v-if="show" class="bot-source-tag">
<span class="bst-label">最近Bot更新:{{ updatedAt }}</span>
<span v-if="source" class="bst-sep">|</span>
<span v-if="source" class="bst-source">来源:{{ source }}</span>
<span v-if="batch && batch !== source" class="bst-sep">|</span>
<span v-if="batch && batch !== source" class="bst-batch">批次:{{ batch }}</span>
</div>
</template>
<script setup lang="ts">
// C区(Bot区)数据标注组件:展示"最近Bot更新时间/来源/批次"
// 无数据时整块隐藏;样式与 Element Plus 灰阶文本一致,不使用 emoji
import { computed } from 'vue'
const props = withDefaults(defineProps<{
/** 最近Bot更新时间,如 '2026-09-03 12:34';空/缺省则按需隐藏 */
updatedAt?: string
/** 来源(Bot名/引擎名),如 finance-bot、预警引擎 */
source?: string
/** 批次(source_batch),如 finance-bot 或导入批次号 */
batch?: string
}>(), { updatedAt: '', source: '', batch: '' })
const show = computed(() => !!(props.updatedAt && props.source))
</script>
<style scoped>
.bot-source-tag {
display: inline-flex;
align-items: center;
flex-wrap: wrap;
font-size: 12px;
color: #909399;
background: #f7f8fa;
border: 1px solid #ebeef5;
border-radius: 4px;
padding: 2px 10px;
line-height: 20px;
white-space: nowrap;
}
.bst-label { color: #606266; }
.bst-sep { margin: 0 4px; color: #dcdfe6; }
.bst-source, .bst-batch { color: #409eff; }
</style>