Commit 11273b9f authored by 赵啸非's avatar 赵啸非

修改报表查询

parent 63b7af5a
......@@ -126,190 +126,7 @@
</p>
</div>
</div>
<!-- <el-row
:gutter="20"
style="height: 80px; align-items: center; margin-top: 10px"
>
<el-col :span="3">
<el-row type="flex" justify="center">
<span style="font-size: 20px"
><b>{{ statData.deviceTotalCount }}</b></span
></el-row
>
<el-row type="flex" justify="center">
<span style="font-size: 12px"
><span style="color: #6182f6">昨日 </span
><span
v-bind:class="{
success: statData.deviceAddCount >= 0,
warn: statData.deviceAddCount < 0,
}"
>{{
statData.deviceAddCount >= 0
? "+" + statData.deviceAddCount
: "-" + statData.deviceAddCount
}}</span
></span
></el-row
>
<el-row type="flex" justify="center">
<i class="el-icon-mobile customIcon"> 设备总数</i>
</el-row>
</el-col>
<el-col :span="3">
<el-row type="flex" justify="center"
><span style="font-size: 20px"
><b>{{ statData.siteTotalCount }}</b></span
></el-row
>
<el-row type="flex" justify="center">
<span style="font-size: 12px"
><span style="color: #6182f6">昨日 </span
><span
v-bind:class="{
success: statData.siteAddCount >= 0,
warn: statData.siteAddCount < 0,
}"
>{{
statData.siteAddCount >= 0
? "+" + statData.siteAddCount
: "-" + statData.siteAddCount
}}</span
></span
></el-row
>
<el-row type="flex" justify="center">
<i class="el-icon-place customIcon"> 监控站点数</i>
</el-row>
</el-col>
<el-col :span="3">
<el-row type="flex" justify="center"
><span style="font-size: 20px"
><b>{{ statData.deviceOnlineCount }}</b></span
></el-row
>
<el-row type="flex" justify="center">
<span style="font-size: 12px"
><span style="color: #6182f6">上线率 </span
><span
v-bind:class="{ success: statData.deviceOnlineRatio >= 0 }"
>{{ statData.deviceOnlineRatio * 100 }}%</span
></span
></el-row
>
<el-row type="flex" justify="center">
<i class="el-icon-data-line customIcon"> 在线设备</i>
</el-row>
</el-col>
<el-col :span="3">
<el-row type="flex" justify="center"
><span style="font-size: 20px"
><b>{{ statData.deviceOfflineCount }}</b></span
></el-row
>
<el-row type="flex" justify="center">
<span style="font-size: 12px"
><span style="color: #6182f6">离线率 </span
><span v-bind:class="{ warn: statData.deviceOfflineRatio >= 0 }"
>{{ statData.deviceOfflineRatio * 100 }}%</span
></span
></el-row
>
<el-row type="flex" justify="center">
<i class="el-icon-data-board customIcon"> 离线设备</i>
</el-row>
</el-col>
<el-col :span="3">
<el-row type="flex" justify="center"
><span style="font-size: 20px"
><b>{{ statData.deviceStopRatio }}</b></span
></el-row
>
<el-row type="flex" justify="center">
<span style="font-size: 12px"
><span style="color: #6182f6">停用率 </span
><span v-bind:class="{ warn: statData.deviceStopRatio >= 0 }"
>{{ statData.deviceStopRatio * 100 }}%</span
></span
></el-row
>
<el-row type="flex" justify="center">
<i class="el-icon-data-board customIcon">停用设备</i>
</el-row>
</el-col>
<el-col :span="3">
<el-row type="flex" justify="center"
><span style="font-size: 20px"
><b>{{ statData.alarmTotalCount }}</b></span
></el-row
>
<el-row type="flex" justify="center">
<span style="font-size: 12px"
><span style="color: #6182f6">昨日 </span
><span
v-bind:class="{
success: statData.alarmAddCount >= 0,
warn: statData.alarmAddCount < 0,
}"
>{{
statData.alarmAddCount >= 0
? "+" + statData.alarmAddCount
: "-" + statData.alarmAddCount
}}</span
></span
></el-row
>
<el-row type="flex" justify="center">
<i class="el-icon-data-board customIcon"> 今日告警次数</i>
</el-row>
</el-col>
<el-col :span="3">
<el-row type="flex" justify="center"
><span style="font-size: 20px"
><b>{{ statData.pushTotalCount }}</b></span
></el-row
>
<el-row type="flex" justify="center">
<span style="font-size: 12px"
><span style="color: #6182f6">昨日 </span
><span
v-bind:class="{
success: statData.pushAddCount >= 0,
warn: statData.pushAddCount < 0,
}"
>{{
statData.pushAddCount >= 0
? "+" + statData.pushAddCount
: "-" + statData.pushAddCount
}}</span
></span
></el-row
>
<el-row type="flex" justify="center">
<i class="el-icon-data-board customIcon"> 今日消息推送</i>
</el-row>
</el-col>
<el-col :span="3" type="flex" style="height: 100%">
<el-row type="flex" style="margin-top: 6px" justify="center"
><span style="font-size: 13px"
><span style="color: #6182f6">今日下发命令 </span>
<b>{{ statData.uploadMessageTotalCount }}</b></span
></el-row
>
<el-row type="flex" style="margin-top: 6px" justify="center"
><span style="font-size: 13px"
><span style="color: #6182f6">今日下发命令 </span>
<b>{{ statData.downloadMessageTotalCount }}</b></span
></el-row
>
<el-row type="flex" justify="center">
<i class="el-icon-data-board customIcon"> 数据获取</i>
</el-row>
</el-col>
</el-row> -->
</el-card>
</el-row>
......@@ -319,7 +136,7 @@
<el-card class="box-card">
<div id="deviceTotal" style="width: 100%; height: 300px"></div>
<!-- 天数选择 -->
<el-select class="change-day" v-model="myEchartsDay" size="mini" placeholder="请选择">
<el-select class="change-day" v-model="myEchartsDay" @change="changeEchartDay(1)" size="mini" placeholder="请选择">
<el-option label="近15天" :value="15"> </el-option>
<el-option label="近30天" :value="30"> </el-option>
</el-select>
......@@ -330,7 +147,7 @@
<el-card class="box-card">
<div id="deviceStat" style="width: 100%; height: 300px"></div>
<!-- 天数选择 -->
<el-select class="change-day" size="mini" placeholder="请选择" v-model="deviceStatEchartsDay">
<el-select class="change-day" size="mini" placeholder="请选择" @change="changeEchartDay(2)" v-model="deviceStatEchartsDay">
<el-option label="近15天" :value="15"> </el-option>
<el-option label="近30天" :value="30"> </el-option>
</el-select>
......@@ -345,7 +162,7 @@
<div id="deviceAlarm" style="width: 70%; height: 300px"></div>
<div id="PieEcharts" style="width: 30%; height: 300px"></div>
<!-- 天数选择 -->
<el-select class="change-day" v-model="deviceAlarmEchartsDay" size="mini" placeholder="请选择">
<el-select class="change-day" v-model="deviceAlarmEchartsDay" @change="changeEchartDay(3)" size="mini" placeholder="请选择">
<el-option label="近15天" :value="15"> </el-option>
<el-option label="近30天" :value="30"> </el-option>
</el-select>
......@@ -356,7 +173,7 @@
<el-card class="box-card">
<div id="devicePush" style="width: 100%; height: 300px"></div>
<!-- 天数选择 -->
<el-select class="change-day" v-model="devicePushEchartsDay" size="mini" placeholder="请选择">
<el-select class="change-day" v-model="devicePushEchartsDay" @change="changeEchartDay(4)" size="mini" placeholder="请选择">
<el-option label="近15天" :value="15"> </el-option>
<el-option label="近30天" :value="30"> </el-option>
</el-select>
......@@ -567,6 +384,26 @@ export default {
});
},
changeEchartDay(type){
let beforeday = new Date(today);
if(type==1){
beforeday.setDate(beforeday.getDate() - this.myEchartsDay);
this.findDeviceTotalStat(beforeday);
}
if(type==2){
beforeday.setDate(beforeday.getDate() - this.myEchartsDay);
this.deviceStatEchartsDay(beforeday);
}
if(type==3){
beforeday.setDate(beforeday.getDate() - this.deviceAlarmEchartsDay);
this.findDeviceAlarm(beforeday);
}
if(type==4){
beforeday.setDate(beforeday.getDate() - this.devicePushEchartsDay);
this.findDevicePush(beforeday);
}
},
// 设备数据图
myEcharts() {
// 基于准备好的dom,初始化echarts实例
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment