fix: 首页告警详情

develop
时启龙 2024-08-28 18:40:47 +08:00
parent b956ef7efe
commit fb7b29c116
1 changed files with 16 additions and 7 deletions

View File

@ -10,7 +10,7 @@
</template>
</el-table-column>
<el-table-column show-overflow-tooltip label="告警类型" prop="typeName"></el-table-column>
<el-table-column show-overflow-tooltip label="告警源" prop="sourceName"></el-table-column>
<el-table-column show-overflow-tooltip label="告警源" prop="sourceName"></el-table-column>
<el-table-column show-overflow-tooltip label="时间" prop="createTime"></el-table-column>
<el-table-column show-overflow-tooltip label="操作" width="80">
<template slot-scope="scope">
@ -19,13 +19,19 @@
</el-table-column>
<span slot="pagination"></span>
</cb-table>
<cb-detail-right v-if="dialog.visible" :title="detailData.alarmName" @goBack="goBack">
<cb-detail-right v-if="dialog.visible" :title="detailData.alarmName" @goBack="goBack" size="860px">
<div slot="custom_content">
<div class="message-card">
<pre class="site-message-detail">{{ detailData.content }}</pre>
<el-divider></el-divider>
<div class="text-right m-b-sm">发送人{{ detailData.senderName }}</div>
<div class="text-right">创建时间{{ detailData.gmtCreate }}</div>
<cb-detail-item label="标题">{{ detailData.alarmName || '--' }}</cb-detail-item>
<cb-detail-item label="级别">{{ getSeverity(detailData.severity).text }}</cb-detail-item>
<cb-detail-item label="告警类型">{{ detailData.typeName || '--' }}</cb-detail-item>
<cb-detail-item label="告警源">{{ detailData.sourceName || '--' }}</cb-detail-item>
<cb-detail-item label="资源类型">{{ detailData.category || '--' }}</cb-detail-item>
<cb-detail-item label="更新时间">{{ detailData.updateTime || '--' }}</cb-detail-item>
<cb-detail-item label="产生时间">{{ detailData.createTime || '--' }}</cb-detail-item>
<cb-detail-item label="告警详情" :col="24">
{{ detailData.content || '--' }}
</cb-detail-item>
</div>
</div>
</cb-detail-right>
@ -95,6 +101,7 @@ export default {
if (data.success) {
this.tableList = data.data.map(item => {
item.createTime = dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss')
item.updateTime = dayjs(item.updateTime).format('YYYY-MM-DD HH:mm:ss')
return item
})
// this.total = data.data.total
@ -115,8 +122,10 @@ export default {
}
.message-card {
padding: 20px;
font-size: 14px;
line-height: 20px;
.attr {
font-size: 14px !important;
}
}
.site-message-detail {