From e635b5b4edab0a000a0af533b6b36f7300c5fa42 Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Fri, 02 Feb 2024 10:07:00 +0800 Subject: [PATCH] fix:断线监控 --- src/views/onlineRate/index.vue | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/src/views/onlineRate/index.vue b/src/views/onlineRate/index.vue index 717daa8..abe1530 100644 --- a/src/views/onlineRate/index.vue +++ b/src/views/onlineRate/index.vue @@ -69,7 +69,7 @@ </el-form> </div> <div> - <p>���������������������<span class="greenClor">{{ tableData.length }}</span>������������<span class="greenClor">{{ onlineData }}</span>��������������� <span :class=" onlineRate<90 ?'redClor':'greenClor'">{{ onlineRate.toFixed(2) }}%</span></p> + <p>���������������������<span class="greenClor">{{ macOnlineData.sum }}</span>������������<span class="greenClor">{{ macOnlineData.online }}</span>��������������� <span :class="Number(macOnlineData.onlineRate)<90 ?'redClor':'greenClor'">{{ macOnlineData.onlineRate }}%</span></p> <div> <el-table v-loading="loading" @@ -216,6 +216,7 @@ time: '������', selectTime: '', macDate: {}, + macOnlineData: {}, orgData: [], tableData: [], handleShow: false, @@ -302,6 +303,7 @@ this.macDate.endTime = this.formInline.endTime }, handleSearch () { + this.getOnlineData() if (this.formInline.organizationId !== '') { if (this.time === '������') { this.formInline.startTime = dayjs().startOf('day').format('YYYY-MM-DD HH:mm') @@ -326,6 +328,21 @@ this.$message.warning('���������������������������') } }, + getOnlineData () { + this.$request({ + url: '/onlineRate/state', + method: 'get', + params: { + organizationId: this.formInline.organizationId + } + }) + .then(res => { + this.macOnlineData = res.data + }) + .catch(err => { + console.log(err) + }) + }, getOrganizationId () { this.$request({ url: '/organization/getOrganizationId', -- Gitblit v1.8.0