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("正在加载服务监控数据,请稍候!")
|
||||
|
||||
@@ -9,20 +9,20 @@
|
||||
<el-form-item label="输入指令">
|
||||
<el-input v-model="form.command" type="textarea" :rows="8" placeholder="例如:京今日统计 / 京昨日订单 / 慢搜关键词 / 录单20250101-20250107" />
|
||||
</el-form-item>
|
||||
<el-form-item class="button-group button-group-primary">
|
||||
<div class="button-group button-group-primary">
|
||||
<el-button type="success" size="medium" @click="run" :loading="loading">执行</el-button>
|
||||
<el-button type="danger" size="medium" @click="clearAll">清空</el-button>
|
||||
<el-button size="warning" @click="fillMan">慢单</el-button>
|
||||
<el-button size="success" @click="fillSheng">生</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item class="button-group button-group-secondary">
|
||||
</div>
|
||||
<div class="button-group button-group-secondary">
|
||||
<el-button size="primary" @click="fillTF">腾峰</el-button>
|
||||
<el-button type="primary" size="medium" @click="fillFan">凡</el-button>
|
||||
<el-button type="primary" size="medium" @click="fillWen">纹</el-button>
|
||||
<el-button type="primary" size="medium" @click="fillHong">鸿</el-button>
|
||||
<el-button type="primary" size="medium" @click="fillPDD">拼多多</el-button>
|
||||
<el-button type="primary" size="medium" @click="fillPDDWen">拼多多-纹</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<el-divider>响应</el-divider>
|
||||
@@ -533,6 +533,7 @@ export default {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.button-group .el-button {
|
||||
@@ -597,14 +598,10 @@ export default {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* 确保el-form-item不会影响布局 */
|
||||
.button-group.el-form-item {
|
||||
margin-bottom: 12px !important;
|
||||
}
|
||||
|
||||
.button-group.el-form-item ::v-deep .el-form-item__content {
|
||||
/* 确保按钮组独立于form-item */
|
||||
.button-group {
|
||||
margin-left: 0 !important;
|
||||
width: 100% !important;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user