Browse Source

设备在线率

develop
王兴琳 3 months ago
parent
commit
0391c4f749
  1. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/query/data.js
  2. 61
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/query/index.vue

2
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/query/data.js

@ -143,7 +143,7 @@ export const searchFormList = [
required: true,
type: "datePicker",
default: [
moment().startOf("month").format("YYYY-MM-DD HH:mm:ss"),
moment().subtract(1, 'days').endOf('day').format("YYYY-MM-DD HH:mm:ss"),
moment().format("YYYY-MM-DD HH:mm:ss"),
],
options: {

61
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/query/index.vue

@ -7,9 +7,24 @@
<el-button v-hasPermi="['maintain:equipmentOnlineAnalysis:export']" size="mini" icon="el-icon-download" class="btnSearch" @click="SystemStatusExport('1')">导出丢包</el-button>
</div>
<div class="right-div">
<InputSearch
<div class="dsort">
<el-button class="btnSearch" @click.native="onDate1" style="width: 80px">上一日</el-button>
<el-button class="btnSearch" @click.native="onDate2" style="width: 80px">下一日</el-button>
<el-date-picker
v-model="datetime"
@change="handleSearch"
:clearable=false
type="date"
value-format="yyyy-MM-dd"
placeholder="选择告警时间"
class="shezhi"
>
</el-date-picker>
</div>
<!-- <InputSearch
ref="searchComp"
:formList="searchFormList" @handleSearch="handleSearch" />
:formList="searchFormList" @handleSearch="handleSearch" />-->
</div>
</div>
<div class="anacontent" style="height: calc(100vh - 225px)">
@ -39,7 +54,7 @@
<span>{{ scope.row.direction == "1" ? "菏泽方向" : scope.row.direction == "2" ? "双向": "济南方向"}}</span>
</template>
</ElTableColumn>
<ElTableColumn prop="deviceIp" width="120" label="IP"> </ElTableColumn>
<ElTableColumn prop="deviceIp" width="120" label="IP"></ElTableColumn>
<!-- <ElTableColumn prop="statisticalDate" width="200" label="监测时间"> </ElTableColumn> -->
<ElTableColumn prop="deviceStatus" width="120" label="设备状态" >
<template slot-scope="scope" >
@ -125,6 +140,7 @@ export default {
sectionData: [],
searchFormList,
searchFormList2,
datetime: moment().format('YYYY-MM-DD'),
startTime: "",
time: "",
deviceName: null,
@ -144,7 +160,12 @@ export default {
destroyed() {
},
methods: {
init(){
this.datetime = moment().format('YYYY-MM-DD');
this.handleSearch(datetime);
},
showRecord(item){
this.dialogData = item;
this.dialogVisible = true;
@ -253,7 +274,7 @@ export default {
formatter: function (value, index) {
const date = moment(value);
const isSameDay = index > 0 && moment(x[index - 1]).isSame(date, 'day');
return date.format('YYYY-MM-DD');
return date.format('MM-DD HH');
}
}
};
@ -310,6 +331,14 @@ export default {
}
});
},
onDate1(){
this.datetime = moment(this.datetime).subtract(1, "days").format('YYYY-MM-DD');
this.handleSearch( this.datetime);
},
onDate2(){
this.datetime = moment(this.datetime).subtract(-1, "days").format('YYYY-MM-DD');
this.handleSearch( this.datetime);
},
onDeviceChange(){
//
if(this.devices.indexOf('all') !== -1 && this.devicesSource.indexOf('all') === -1){
@ -334,8 +363,8 @@ export default {
this.initQueryTable();
},
handleSearch(data) {
this.startTime = moment(data.time[0]).format("YYYY-MM-DD") + ' 00:00:00';
this.time = moment(data.time[1]).format("YYYY-MM-DD") + ' 23:59:59';
this.startTime = moment(data).format("YYYY-MM-DD") + ' 00:00:00';
this.time = moment(data).format("YYYY-MM-DD") + ' 23:59:59';
this.searchText = `${moment(this.startTime).format(
@ -362,8 +391,8 @@ export default {
text: "文件正在下载...",
});
const params = {
startTime: this.startTime,
time: this.time,
startTime: moment(this.datetime).format("YYYY-MM-DD") + ' 00:00:00',
time: moment(this.datetime).format("YYYY-MM-DD") + ' 23:59:59',
type: this.devices.join(','),
pageNum: this.searchData.pageNum,
pageSize: this.searchData.pageSize,
@ -401,7 +430,7 @@ export default {
},
},
async mounted() {
this.startTime = moment().startOf("month").format("YYYY-MM-DD HH:mm:ss");
this.startTime = moment().subtract(1, 'days').endOf('day').format("YYYY-MM-DD HH:mm:ss");
this.time = moment().format("YYYY-MM-DD HH:mm:ss");
@ -571,4 +600,18 @@ export default {
border: 0px !important;
background-color: transparent !important;
}
.dsort {
font-size: 12px;
display: flex;
flex-direction: row;
justify-content: flex-end;
gap: 14px;
}
.shezhi{
width: 150px;
height: 34px;
::v-deep .el-input__inner{
height:32px;
}
}
</style>

Loading…
Cancel
Save