From ff72273c7cd5fd33173615ac188fc03bfc1a1ad7 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Sun, 04 Feb 2024 13:44:46 +0800
Subject: [PATCH] fix:修改成16位风向值
---
src/views/onlineRate/index.vue | 53 +++++++++++++++++++++++++++++++++++------------------
1 files changed, 35 insertions(+), 18 deletions(-)
diff --git a/src/views/onlineRate/index.vue b/src/views/onlineRate/index.vue
index 3c664be..abe1530 100644
--- a/src/views/onlineRate/index.vue
+++ b/src/views/onlineRate/index.vue
@@ -19,22 +19,6 @@
/>
</el-select>
</el-form-item>
- <el-form-item label="������������:">
- <el-select
- v-model="formInline.hourState"
- clearable
- placeholder="������������"
- >
- <el-option
- label="������"
- value="1"
- />
- <el-option
- label="������"
- value="0"
- />
- </el-select>
- </el-form-item>
<el-form-item>
<el-radio-group
v-model="time"
@@ -58,6 +42,22 @@
@change="changeDay"
/>
</el-form-item>
+ <el-form-item label="������������:">
+ <el-select
+ v-model="formInline.hourState"
+ clearable
+ placeholder="������������"
+ >
+ <el-option
+ label="������"
+ value="1"
+ />
+ <el-option
+ label="������"
+ value="0"
+ />
+ </el-select>
+ </el-form-item>
<el-form-item>
<el-button
type="primary"
@@ -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 }}%</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,
@@ -259,7 +260,7 @@
return this.tableData.filter(item => item.state !== '0').length || 0
},
onlineRate () {
- return Math.floor((this.onlineData / this.tableData.length) * 100) || 0
+ return (this.onlineData / this.tableData.length) * 100 || 0
}
},
watch: {
@@ -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