1
This commit is contained in:
@@ -171,23 +171,109 @@
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="card-box">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span><i class="el-icon-truck"></i> 物流服务健康度</span>
|
||||
</div>
|
||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
||||
<table cellspacing="0" style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="el-table__cell is-leaf"><div class="cell">服务状态</div></td>
|
||||
<td class="el-table__cell is-leaf">
|
||||
<div class="cell">
|
||||
<el-tag :type="health.logistics && health.logistics.healthy ? 'success' : 'danger'">
|
||||
{{ health.logistics && health.logistics.status ? health.logistics.status : '未知' }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="el-table__cell is-leaf"><div class="cell">服务地址</div></td>
|
||||
<td class="el-table__cell is-leaf">
|
||||
<div class="cell" style="word-break: break-all;">
|
||||
{{ health.logistics && health.logistics.serviceUrl ? health.logistics.serviceUrl : '-' }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="el-table__cell is-leaf"><div class="cell">状态信息</div></td>
|
||||
<td class="el-table__cell is-leaf">
|
||||
<div class="cell" :class="{'text-danger': health.logistics && !health.logistics.healthy}">
|
||||
{{ health.logistics && health.logistics.message ? health.logistics.message : '-' }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="card-box">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span><i class="el-icon-message"></i> 微信推送服务健康度</span>
|
||||
</div>
|
||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
||||
<table cellspacing="0" style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="el-table__cell is-leaf"><div class="cell">服务状态</div></td>
|
||||
<td class="el-table__cell is-leaf">
|
||||
<div class="cell">
|
||||
<el-tag :type="health.wxSend && health.wxSend.healthy ? 'success' : 'danger'">
|
||||
{{ health.wxSend && health.wxSend.status ? health.wxSend.status : '未知' }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="el-table__cell is-leaf"><div class="cell">服务地址</div></td>
|
||||
<td class="el-table__cell is-leaf">
|
||||
<div class="cell" style="word-break: break-all;">
|
||||
{{ health.wxSend && health.wxSend.serviceUrl ? health.wxSend.serviceUrl : '-' }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="el-table__cell is-leaf"><div class="cell">状态信息</div></td>
|
||||
<td class="el-table__cell is-leaf">
|
||||
<div class="cell" :class="{'text-danger': health.wxSend && !health.wxSend.healthy}">
|
||||
{{ health.wxSend && health.wxSend.message ? health.wxSend.message : '-' }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getServer } from "@/api/monitor/server"
|
||||
import { getServer, getHealth } from "@/api/monitor/server"
|
||||
|
||||
export default {
|
||||
name: "Server",
|
||||
data() {
|
||||
return {
|
||||
// 服务器信息
|
||||
server: []
|
||||
server: [],
|
||||
// 健康度检测信息
|
||||
health: {
|
||||
logistics: null,
|
||||
wxSend: null
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getHealthInfo()
|
||||
this.openLoading()
|
||||
},
|
||||
methods: {
|
||||
@@ -198,6 +284,16 @@ export default {
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
/** 查询健康度检测信息 */
|
||||
getHealthInfo() {
|
||||
getHealth().then(response => {
|
||||
if (response.data) {
|
||||
this.health = response.data
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error("获取健康度检测信息失败", error)
|
||||
})
|
||||
},
|
||||
// 打开加载层
|
||||
openLoading() {
|
||||
this.$modal.loading("正在加载服务监控数据,请稍候!")
|
||||
|
||||
Reference in New Issue
Block a user