fix:对接接口
This commit is contained in:
@@ -5,4 +5,5 @@ export enum energyAlarmApi {
|
|||||||
getCodeList = `${BASE_URL}/api/AlarmEnergyConsumptionLog/selectErrorCodeList `, //能碳告警 列表
|
getCodeList = `${BASE_URL}/api/AlarmEnergyConsumptionLog/selectErrorCodeList `, //能碳告警 列表
|
||||||
getSelectAlarmEnergyConsumptionLogStatusProcess = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/selectAlarmEnergyConsumptionLogStatusProcess`, //能碳告警 状态 没有创建工单log接口
|
getSelectAlarmEnergyConsumptionLogStatusProcess = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/selectAlarmEnergyConsumptionLogStatusProcess`, //能碳告警 状态 没有创建工单log接口
|
||||||
noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/creatOrUpdate`, //能碳告警 状态 没有创建工单 添加 修改状态log
|
noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/creatOrUpdate`, //能碳告警 状态 没有创建工单 添加 修改状态log
|
||||||
|
getEnergyGraph = `${BASE_URL}/energy/trigger/getEnergyGraph`, //能碳告警 状态 echarts图
|
||||||
}
|
}
|
||||||
|
@@ -5,4 +5,5 @@ export enum equipmentAlarmApi {
|
|||||||
getCodeList = `${BASE_URL}/api/AlarmEquipmentLog/selectErrorCodeList`, //设备告警 列表
|
getCodeList = `${BASE_URL}/api/AlarmEquipmentLog/selectErrorCodeList`, //设备告警 列表
|
||||||
getSelectAlarmEquipmentLogStatusProcess = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/selectAlarmEquipmentLogStatusProcess`, //设备告警 状态 没有创建工单log接口
|
getSelectAlarmEquipmentLogStatusProcess = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/selectAlarmEquipmentLogStatusProcess`, //设备告警 状态 没有创建工单log接口
|
||||||
noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/creatOrUpdate`, //设备告警 状态 没有创建工单 添加 修改状态log
|
noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/creatOrUpdate`, //设备告警 状态 没有创建工单 添加 修改状态log
|
||||||
|
getDeviceGraph = `${BASE_URL}/equipment/trigger/getDeviceGraph`, //设备告警 echats图
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
}}</a-descriptions-item>
|
}}</a-descriptions-item>
|
||||||
<a-descriptions-item label="错误码">{{ infoObject.errorCode }}</a-descriptions-item>
|
<a-descriptions-item label="错误码">{{ infoObject.errorCode }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="告警描述">
|
<a-descriptions-item label="告警描述">
|
||||||
<div style="color: #2778ff">{{ infoObject.alarmTitle }}</div>
|
<div style="color: rgba(255, 118, 54, 1)">{{ infoObject.alarmTitle }}</div>
|
||||||
{{ infoObject.abnormalDescription }}</a-descriptions-item
|
{{ infoObject.abnormalDescription }}</a-descriptions-item
|
||||||
>
|
>
|
||||||
<a-descriptions-item label="监测点位">
|
<a-descriptions-item label="监测点位">
|
||||||
@@ -56,6 +56,9 @@
|
|||||||
});
|
});
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
|
import { energyAlarmApi } from '/@/api/alarmManagement/energyAlarm';
|
||||||
|
import { http } from '/nerv-lib/util';
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
let chartInstance: echarts.ECharts | null = null;
|
let chartInstance: echarts.ECharts | null = null;
|
||||||
const graphChart = ref(null);
|
const graphChart = ref(null);
|
||||||
@@ -94,19 +97,21 @@
|
|||||||
const toggle = (data: any) => {
|
const toggle = (data: any) => {
|
||||||
infoObject.value = data;
|
infoObject.value = data;
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
getChatr();
|
// getChatr();
|
||||||
}, 500);
|
// }, 500);
|
||||||
|
http.get(energyAlarmApi.getEnergyGraph, { logId: infoObject.value.id }).then((res: any) => {
|
||||||
|
if (res.msg === 'success') {
|
||||||
|
const data = res.data;
|
||||||
|
if (data.length > 0) {
|
||||||
|
getChatr(data[0]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
message.error(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
const getChatr = () => {
|
const getChatr = (data) => {
|
||||||
let dayData = [];
|
|
||||||
let energyAlarm: any = [];
|
|
||||||
|
|
||||||
// Extend data for 30 days
|
|
||||||
for (let i = 1; i < 30; i++) {
|
|
||||||
dayData.push(`3/${i}`);
|
|
||||||
energyAlarm.push(Math.floor(Math.random() * 250));
|
|
||||||
}
|
|
||||||
if (chartInstance) {
|
if (chartInstance) {
|
||||||
chartInstance.dispose();
|
chartInstance.dispose();
|
||||||
}
|
}
|
||||||
@@ -182,7 +187,7 @@
|
|||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: dayData,
|
data: data.dateList,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
@@ -342,7 +347,7 @@
|
|||||||
shadowBlur: 20,
|
shadowBlur: 20,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: energyAlarm,
|
data: data.data,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
@@ -54,6 +54,9 @@
|
|||||||
});
|
});
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
|
import { equipmentAlarmApi } from '/@/api/alarmManagement/equipmentAlarm';
|
||||||
|
import { http } from '/nerv-lib/util';
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
let chartInstance: echarts.ECharts | null = null;
|
let chartInstance: echarts.ECharts | null = null;
|
||||||
const graphChart = ref(null);
|
const graphChart = ref(null);
|
||||||
@@ -92,20 +95,23 @@
|
|||||||
const toggle = (data: any) => {
|
const toggle = (data: any) => {
|
||||||
infoObject.value = data;
|
infoObject.value = data;
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
//获取数据 echarts图展示
|
// //获取数据 echarts图展示
|
||||||
getChatr();
|
// getChatr();
|
||||||
}, 500);
|
// }, 500);
|
||||||
|
http.get(equipmentAlarmApi.getDeviceGraph, { logId: infoObject.value.id }).then((res: any) => {
|
||||||
|
if (res.msg === 'success') {
|
||||||
|
console.log(res.data, '数据');
|
||||||
|
const data = res.data;
|
||||||
|
if (data.length > 0) {
|
||||||
|
getChatr(data[0]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
message.error(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
const getChatr = () => {
|
const getChatr = (data: any) => {
|
||||||
let dayData = [];
|
|
||||||
let energyAlarm: any = [];
|
|
||||||
|
|
||||||
// Extend data for 30 days
|
|
||||||
for (let i = 1; i < 30; i++) {
|
|
||||||
dayData.push(`3/${i}`);
|
|
||||||
energyAlarm.push(Math.floor(Math.random() * 250));
|
|
||||||
}
|
|
||||||
if (chartInstance) {
|
if (chartInstance) {
|
||||||
chartInstance.dispose();
|
chartInstance.dispose();
|
||||||
}
|
}
|
||||||
@@ -182,7 +188,7 @@
|
|||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: dayData,
|
data: data.dateList,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
@@ -342,7 +348,7 @@
|
|||||||
shadowBlur: 20,
|
shadowBlur: 20,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: energyAlarm,
|
data: data.data,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user