Browse Source

设备在线分析

develop
王兴琳 4 weeks ago
parent
commit
3fbbee6d2b
  1. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogProcess/index.vue
  2. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/analysis/components/deviceSummary/index.vue
  3. 107
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/query/index.vue

12
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogProcess/index.vue

@ -290,7 +290,7 @@
"> ">
{{ formFileData.content }} {{ formFileData.content }}
</textarea> </textarea>
<p style=" <p style="
@ -418,7 +418,7 @@ export default {
this.eventId = this.provideDetail.id; this.eventId = this.provideDetail.id;
this.activeName = 'first' this.activeName = 'first'
await this.initData(); await this.initData();
await this.getReportData(); await this.getReportData();
this.getImportantFileStatus(); this.getImportantFileStatus();
} }
} }
@ -463,7 +463,7 @@ export default {
info.endStakeMark = numbers; info.endStakeMark = numbers;
} }
} }
if(info.eventType === 7){ if(info.eventType === 7){
// //
if(info.dcEventConstruction.endStakeMark && typeof info.dcEventConstruction.endStakeMark == "string"){ if(info.dcEventConstruction.endStakeMark && typeof info.dcEventConstruction.endStakeMark == "string"){
@ -471,7 +471,7 @@ export default {
info.endStakeMark = numbers; info.endStakeMark = numbers;
} }
} }
let _confirgList = _.cloneDeep(configList[info.eventName]); let _confirgList = _.cloneDeep(configList[info.eventName]);
@ -712,7 +712,7 @@ export default {
this.reload(); this.reload();
}); });
} else { } else {
addEventImportantFile(data).then((res) => { addEventImportantFile(data).then((res) => {
if (res.code != 200) return Message.error(res?.msg); if (res.code != 200) return Message.error(res?.msg);
this.$message.success('报送成功') this.$message.success('报送成功')
this.submitting = false; this.submitting = false;
@ -720,7 +720,7 @@ export default {
this.reload(); this.reload();
}); });
} }
this.getImportantFileStatus(); this.getImportantFileStatus();
if (this.activeName == "second") { if (this.activeName == "second") {
this.getEventImportantFileList(1); this.getEventImportantFileList(1);

4
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/analysis/components/deviceSummary/index.vue

@ -124,12 +124,12 @@
{{ item.pctOffl }} {{ item.pctOffl }}
</div> </div>
</div> </div>
<div class="list-text"> <!-- <div class="list-text">
<span class="title">丢包</span> <span class="title">丢包</span>
<div class="value value3"> <div class="value value3">
{{ item.pctLose }} {{ item.pctLose }}
</div> </div>
</div> </div>-->
</div> </div>
</div> </div>
</div> </div>

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

@ -7,7 +7,7 @@
<el-button v-hasPermi="['maintain:equipmentOnlineAnalysis:export']" size="mini" icon="el-icon-download" class="btnSearch" @click="SystemStatusExport('1')">导出丢包</el-button> <el-button v-hasPermi="['maintain:equipmentOnlineAnalysis:export']" size="mini" icon="el-icon-download" class="btnSearch" @click="SystemStatusExport('1')">导出丢包</el-button>
</div> </div>
<div class="right-div"> <div class="right-div">
<InputSearch <InputSearch
ref="searchComp" ref="searchComp"
:formList="searchFormList" @handleSearch="handleSearch" /> :formList="searchFormList" @handleSearch="handleSearch" />
</div> </div>
@ -17,7 +17,7 @@
<el-checkbox-group class="device" v-model="devices" @change="onDeviceChange"> <el-checkbox-group class="device" v-model="devices" @change="onDeviceChange">
<el-checkbox v-for="(item,index) in deviceTypeList" :label="item.value" >{{ item.label }}</el-checkbox> <el-checkbox v-for="(item,index) in deviceTypeList" :label="item.value" >{{ item.label }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="cright"> <div class="cright">
<div class="queryChart"> <div class="queryChart">
<Empty <Empty
@ -58,10 +58,10 @@
</template> </ElTableColumn> </template> </ElTableColumn>
<ElTableColumn prop="id" width="200" label="日志"> <ElTableColumn prop="id" width="200" label="日志">
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">
<InputSearch2 <InputSearch2
placeholder="搜索" placeholder="搜索"
:formList="searchFormList2" :formList="searchFormList2"
@handleSearch="handleSearch2" /> @handleSearch="handleSearch2" />
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -142,7 +142,7 @@ export default {
}; };
}, },
destroyed() { destroyed() {
}, },
methods: { methods: {
showRecord(item){ showRecord(item){
@ -206,42 +206,79 @@ export default {
params.direction = this.direction params.direction = this.direction
} }
request({ request({
url: "/system/status/list", url: "/system/status/listHourSystem",
method: "get", method: "get",
params params
}).then((res) => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
const _chartsOption = _.cloneDeep(chartsOption) const _chartsOption = _.cloneDeep(chartsOption);
this.setStatus("01", "finish"); this.setStatus("01", "finish");
let x = []; let x = [];
let serie = []; let serie = [];
for(let i in res.data){
//
Object.keys(res.data).forEach(i => {
const s = _.cloneDeep(chartsOption.series[0]); const s = _.cloneDeep(chartsOption.series[0]);
if(x.length === 0){
for(let j in res.data[i]){ //
x.push(j) const _deviceType = _.find(deviceType, { value: i });
s.name = _deviceType.label;
s.itemStyle.color = _deviceType.color;
//
Object.values(res.data[i]).forEach(dateData => {
//
Object.keys(dateData).forEach(timeStr => {
// X
if (!x.includes(timeStr)) {
x.push(timeStr);
}
// series
s.data.push(parseFloat(dateData[timeStr].replace(/%|W/, '')));
});
});
serie.push(s);
});
// X
x.sort((a, b) => moment(a).diff(moment(b)));
//
_chartsOption.xAxis = {
data: x,
axisLabel: {
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');
} }
} }
const _deviceType = _.find(deviceType,{value:i}) };
s.name = _deviceType.label // tooltip
s.itemStyle.color = _deviceType.color _chartsOption.tooltip = {
s.data = []; trigger: 'axis',
for(let j in res.data[i]){ formatter: function (params) {
const p = res.data[i][j]; let tooltip = '';
s.data.push(parseFloat(p.substr(0,p.length-1))); params.forEach(param => {
const date = moment(param.name);
tooltip += `${date.format('YYYY-MM-DD HH:mm')}<br>${param.seriesName}: ${param.value}%<br>`;
});
return tooltip;
} }
serie.push(s); };
}
x.sort(function(a,b){return moment(a).diff(moment(b))}) _chartsOption.series = serie;
_chartsOption.xAxis.data = x;
_chartsOption.series= serie; // ECharts
this.queryChart = echarts.init(this.$refs["queryChart"]); this.queryChart = echarts.init(this.$refs["queryChart"]);
this.queryChart.setOption(_chartsOption); this.queryChart.setOption(_chartsOption);
} }
}); });
}, },
// //
initQueryTable() { initQueryTable() {
this.loading = true; this.loading = true;
@ -259,7 +296,7 @@ export default {
if(this.deviceName){ if(this.deviceName){
params.deviceName = this.deviceName params.deviceName = this.deviceName
} }
request({ request({
url: "/system/status/tablist", url: "/system/status/tablist",
method: "get", method: "get",
@ -269,7 +306,7 @@ export default {
this.loading = false; this.loading = false;
this.total = res.total; this.total = res.total;
this.tableData = res.rows this.tableData = res.rows
} }
}); });
}, },
@ -288,7 +325,7 @@ export default {
}, },
onRefreshData() { onRefreshData() {
this.$refs.searchComp.handleResetForm(); this.$refs.searchComp.handleResetForm();
this.searchData.pageNum = 1; this.searchData.pageNum = 1;
@ -307,12 +344,12 @@ export default {
this.deviceName = data.deviceName this.deviceName = data.deviceName
this.direction = data.direction this.direction = data.direction
this.initQueryChart(); this.initQueryChart();
}, },
handleSearch2(data){ handleSearch2(data){
this.searchData.pageNum = 1; this.searchData.pageNum = 1;
this.tabelSearch = data; this.tabelSearch = data;
this.initQueryTable(); this.initQueryTable();
@ -342,7 +379,7 @@ export default {
if(t === '1'){ if(t === '1'){
params.exportType='1' params.exportType='1'
fileName = '设备丢包信息.xlsx' fileName = '设备丢包信息.xlsx'
} }
getSystemStatusExport(params) getSystemStatusExport(params)
.then((res) => { .then((res) => {
const url = window.URL.createObjectURL(new Blob([res])); const url = window.URL.createObjectURL(new Blob([res]));
@ -377,7 +414,7 @@ export default {
this.queryChart.resize(); this.queryChart.resize();
} }
}); });
}, },
}; };
</script> </script>

Loading…
Cancel
Save