Commit fe11f30b authored by huanghaoting's avatar huanghaoting

Merge remote-tracking branch 'origin/b-master' into b-master

parents 618283e4 10355965
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -635,6 +635,23 @@ import { ...@@ -635,6 +635,23 @@ import {
postTopBHXLXJ1, postTopBHXLXJ1,
postTopSecondTempAvg, postTopSecondTempAvg,
} from "../../api/ranking"; } from "../../api/ranking";
// 静态数据
import {
rankingOverview,
rankingTopHeatUC,
rankingTopBHXL,
rankingTopBHXLXJ1,
rankingTopDayHeatUC,
rankingTopElecUC,
rankingTopFirsFlow,
rankingTopFirsHW,
rankingTopSecondTempAvg,
rankingTopWaterUC,} from "../../dataJson/mock-data/mock"
const curwidth = ref(1700); const curwidth = ref(1700);
const curheight = ref(1000); const curheight = ref(1000);
const switchV = ref(false); const switchV = ref(false);
...@@ -935,113 +952,153 @@ function timeFun() { ...@@ -935,113 +952,153 @@ function timeFun() {
//换热站机组排名页概况 //换热站机组排名页概况
function postOverviewFun(enertySend) { function postOverviewFun(enertySend) {
fullscreenLoading.value = true; fullscreenLoading.value = true;
postOverview(enertySend).then((res) => {
if (res.success === true) { // 静态数据
overviewList.value = res.data[0]; overviewList.value = rankingOverview.data[0]
} else { fullscreenLoading.value = false;
ElMessage.error(res.message);
} // postOverview(enertySend).then((res) => {
fullscreenLoading.value = false; // if (res.success === true) {
}); // overviewList.value = res.data[0];
// } else {
// ElMessage.error(res.message);
// }
// fullscreenLoading.value = false;
// });
} }
//换热站机组排名(热单耗) //换热站机组排名(热单耗)
function postTopHeatUCFun(enertySend) { function postTopHeatUCFun(enertySend) {
postTopHeatUC(enertySend).then((res) => {
if (res.success === true) { // 静态数据
topHeatUCList.value = res.data; topHeatUCList.value = rankingTopHeatUC.data
} else {
ElMessage.error(res.message); // postTopHeatUC(enertySend).then((res) => {
} // if (res.success === true) {
}); // topHeatUCList.value = res.data;
// } else {
// ElMessage.error(res.message);
// }
// });
} }
//换热站机组排名(度日数热耗) //换热站机组排名(度日数热耗)
function postTopDayHeatUCFun(enertySend) { function postTopDayHeatUCFun(enertySend) {
postTopDayHeatUC(enertySend).then((res) => {
if (res.success === true) { // 静态数据
topDayHeatUC.value = res.data; topDayHeatUC.value = rankingTopDayHeatUC.data
} else {
ElMessage.error(res.message); // postTopDayHeatUC(enertySend).then((res) => {
} // if (res.success === true) {
}); // topDayHeatUC.value = res.data;
// } else {
// ElMessage.error(res.message);
// }
// });
} }
//换热站机组排名(水单耗) //换热站机组排名(水单耗)
function postTopWaterUCFun(enertySend) { function postTopWaterUCFun(enertySend) {
postTopWaterUC(enertySend).then((res) => {
if (res.success === true) { // 静态数据
topWaterUC.value = res.data; topWaterUC.value = rankingTopWaterUC.data
} else {
ElMessage.error(res.message); // postTopWaterUC(enertySend).then((res) => {
} // if (res.success === true) {
}); // topWaterUC.value = res.data;
// } else {
// ElMessage.error(res.message);
// }
// });
} }
//换热站机组排名(电单耗) //换热站机组排名(电单耗)
function postTopElecUCFun(enertySend) { function postTopElecUCFun(enertySend) {
postTopElecUC(enertySend).then((res) => {
if (res.success === true) { // 静态数据
topElecUC.value = res.data; topElecUC.value = rankingTopElecUC.data
} else {
ElMessage.error(res.message); // postTopElecUC(enertySend).then((res) => {
} // if (res.success === true) {
}); // topElecUC.value = res.data;
// } else {
// ElMessage.error(res.message);
// }
// });
} }
//换热站机组排名(一网回温) //换热站机组排名(一网回温)
function postTopFirsHWFun(enertySend) { function postTopFirsHWFun(enertySend) {
postTopFirsHW(enertySend).then((res) => {
if (res.success === true) { // 静态数据
topFirsHW.value = res.data; topFirsHW.value = rankingTopFirsHW.data
} else {
ElMessage.error(res.message); // postTopFirsHW(enertySend).then((res) => {
} // if (res.success === true) {
}); // topFirsHW.value = res.data;
// } else {
// ElMessage.error(res.message);
// }
// });
} }
//换热站机组排名(一网万平米流量) //换热站机组排名(一网万平米流量)
function postTopFirsFlowFun(enertySend) { function postTopFirsFlowFun(enertySend) {
postTopFirsFlow(enertySend).then((res) => { // 静态数据
if (res.success === true) { topFirsFlow.value = rankingTopFirsFlow.data
topFirsFlow.value = res.data;
} else { // postTopFirsFlow(enertySend).then((res) => {
ElMessage.error(res.message); // if (res.success === true) {
} // topFirsFlow.value = res.data;
}); // } else {
// ElMessage.error(res.message);
// }
// });
} }
//换热站机组排名(热效率) //换热站机组排名(热效率)
function postTopBHXLFun(enertySend) { function postTopBHXLFun(enertySend) {
postTopBHXL(enertySend).then((res) => {
if (res.success === true) { // 静态数据
topBHXL.value = res.data; topBHXL.value = rankingTopBHXL.data
} else {
ElMessage.error(res.message); // postTopBHXL(enertySend).then((res) => {
} // if (res.success === true) {
}); // topBHXL.value = res.data;
// } else {
// ElMessage.error(res.message);
// }
// });
} }
//换热站机组排名(板换效率趋势一) //换热站机组排名(板换效率趋势一)
function postTopBHXLXJ1Fun(enertySend) { function postTopBHXLXJ1Fun(enertySend) {
postTopBHXLXJ1(enertySend).then((res) => {
if (res.success === true) { // 静态数据
topBHXLXJ1.value = res.data; topBHXLXJ1.value = rankingTopBHXLXJ1.data
} else {
ElMessage.error(res.message); // postTopBHXLXJ1(enertySend).then((res) => {
} // if (res.success === true) {
}); // topBHXLXJ1.value = res.data;
// } else {
// ElMessage.error(res.message);
// }
// });
} }
//换热站机组排名(二网均温) //换热站机组排名(二网均温)
function postTopSecondTempAvgFun(enertySend) { function postTopSecondTempAvgFun(enertySend) {
postTopSecondTempAvg(enertySend).then((res) => {
if (res.success === true) { // 静态数据
topSecondTempAvg.value = res.data; topSecondTempAvg.value = rankingTopSecondTempAvg.data
} else {
ElMessage.error(res.message); // postTopSecondTempAvg(enertySend).then((res) => {
} // if (res.success === true) {
}); // topSecondTempAvg.value = res.data;
// } else {
// ElMessage.error(res.message);
// }
// });
} }
function sendClick() { function sendClick() {
......
...@@ -175,6 +175,13 @@ import { saveAs } from "file-saver"; ...@@ -175,6 +175,13 @@ import { saveAs } from "file-saver";
import XLSX from "xlsx-js-style"; import XLSX from "xlsx-js-style";
import { postExternalQOQ, postWithinQOQ } from "../../api/analysis"; import { postExternalQOQ, postWithinQOQ } from "../../api/analysis";
// 静态数据
import {
externalQOQ,
withinQOQ
} from "../../dataJson/mock-data/mock"
const tdType = ref(1); const tdType = ref(1);
const networkType = ref(2); const networkType = ref(2);
const enertyInfo = reactive({ const enertyInfo = reactive({
...@@ -380,29 +387,40 @@ function postExternalQOQFun() { ...@@ -380,29 +387,40 @@ function postExternalQOQFun() {
}; };
clearData(); clearData();
if (networkType.value == 2) { if (networkType.value == 2) {
postExternalQOQ(params).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); // 静态数据
if (res.success === true) { echarts.dispose(document.getElementById("echartsLayer"));
if (res.data.hourWater.length > 0) { pageInitFun(externalQOQ)
pageInitFun(res); tableData = externalQOQ.data.hourWater
tableData = res.data.hourWater;
} // postExternalQOQ(params).then((res) => {
} else { // echarts.dispose(document.getElementById("echartsLayer"));
ElMessage.error(res.message); // if (res.success === true) {
} // if (res.data.hourWater.length > 0) {
}); // pageInitFun(res);
// tableData = res.data.hourWater;
// }
// } else {
// ElMessage.error(res.message);
// }
// });
} else { } else {
postWithinQOQ(params).then((res) => { // 静态数据
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { pageInitFun(withinQOQ)
if (res.data.data.length > 0) { tableData = withinQOQ.data.hourWater
pageInitFun(res);
tableData = res.data.hourWater; // postWithinQOQ(params).then((res) => {
} // echarts.dispose(document.getElementById("echartsLayer"));
} else { // if (res.success === true) {
ElMessage.error(res.message); // if (res.data.data.length > 0) {
} // pageInitFun(res);
}); // tableData = res.data.hourWater;
// }
// } else {
// ElMessage.error(res.message);
// }
// });
} }
} }
......
...@@ -263,6 +263,13 @@ import { ElMessage, ElMessageBox } from "element-plus"; ...@@ -263,6 +263,13 @@ import { ElMessage, ElMessageBox } from "element-plus";
import { saveAs } from "file-saver"; import { saveAs } from "file-saver";
import XLSX from "xlsx-js-style"; import XLSX from "xlsx-js-style";
import { postExternalYOY, postWithinYOY } from "../../api/analysis"; import { postExternalYOY, postWithinYOY } from "../../api/analysis";
// 静态数据
import {
externalYOY,
withinYOY,
} from "../../dataJson/mock-data/mock"
const loading = ref(false); const loading = ref(false);
const tdType = ref(1); const tdType = ref(1);
const networkType = ref(2); const networkType = ref(2);
...@@ -588,14 +595,14 @@ function postExternalYOYFun() { ...@@ -588,14 +595,14 @@ function postExternalYOYFun() {
loading.value = true; loading.value = true;
if (networkType.value == 2) { if (networkType.value == 2) {
enertyInfo.deviceId = deviceIdOut; enertyInfo.deviceId = deviceIdOut;
postExternalYOY(enertyInfo).then((res) => {
// 静态数据
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
let arr = []; let arr = [];
if (enertyInfo.interval != 1) { if (enertyInfo.interval != 1) {
tableData.value = res.data.data; tableData.value = externalYOY.data.data;
} else { } else {
res.data.data.forEach((item) => { externalYOY.data.data.forEach((item) => {
item.forEach((item1) => { item.forEach((item1) => {
arr.push(item1); arr.push(item1);
}); });
...@@ -605,26 +612,51 @@ function postExternalYOYFun() { ...@@ -605,26 +612,51 @@ function postExternalYOYFun() {
tableData.value.forEach((item) => { tableData.value.forEach((item) => {
item.gatherTime = item.gatherTime.replace("T", " "); item.gatherTime = item.gatherTime.replace("T", " ");
}); });
if (res.data.data.length > 0) { if (externalYOY.data.data.length > 0) {
pageInitFun(res); pageInitFun(externalYOY);
} else { } else {
nodata.value = false; nodata.value = false;
} }
} else {
ElMessage.error(res.message); loading.value = false;
}
loading.value = false; // postExternalYOY(enertyInfo).then((res) => {
}); // echarts.dispose(document.getElementById("echartsLayer"));
// if (res.success === true) {
// let arr = [];
// if (enertyInfo.interval != 1) {
// tableData.value = res.data.data;
// } else {
// res.data.data.forEach((item) => {
// item.forEach((item1) => {
// arr.push(item1);
// });
// });
// }
// tableData.value = arr;
// tableData.value.forEach((item) => {
// item.gatherTime = item.gatherTime.replace("T", " ");
// });
// if (res.data.data.length > 0) {
// pageInitFun(res);
// } else {
// nodata.value = false;
// }
// } else {
// ElMessage.error(res.message);
// }
// loading.value = false;
// });
} else { } else {
enertyInfo.deviceId = deviceIdIn; enertyInfo.deviceId = deviceIdIn;
postWithinYOY(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); // 静态数据
if (res.success === true) { echarts.dispose(document.getElementById("echartsLayer"));
let arr = []; let arr = [];
if (enertyInfo.interval != 1) { if (enertyInfo.interval != 1) {
tableData.value = res.data.data; tableData.value = withinYOY.data.data;
} else { } else {
res.data.data.forEach((item) => { withinYOY.data.data.forEach((item) => {
item.forEach((item1) => { item.forEach((item1) => {
arr.push(item1); arr.push(item1);
}); });
...@@ -634,16 +666,41 @@ function postExternalYOYFun() { ...@@ -634,16 +666,41 @@ function postExternalYOYFun() {
tableData.value.forEach((item) => { tableData.value.forEach((item) => {
item.gatherTime = item.gatherTime.replace("T", " "); item.gatherTime = item.gatherTime.replace("T", " ");
}); });
if (res.data.data.length > 0) { if (withinYOY.data.data.length > 0) {
pageInitFun(res); pageInitFun(withinYOY);
} else { } else {
nodata.value = false; nodata.value = false;
} }
} else {
ElMessage.error(res.message);
}
loading.value = false; loading.value = false;
});
// postWithinYOY(enertyInfo).then((res) => {
// echarts.dispose(document.getElementById("echartsLayer"));
// if (res.success === true) {
// let arr = [];
// if (enertyInfo.interval != 1) {
// tableData.value = res.data.data;
// } else {
// res.data.data.forEach((item) => {
// item.forEach((item1) => {
// arr.push(item1);
// });
// });
// }
// tableData.value = arr;
// tableData.value.forEach((item) => {
// item.gatherTime = item.gatherTime.replace("T", " ");
// });
// if (res.data.data.length > 0) {
// pageInitFun(res);
// } else {
// nodata.value = false;
// }
// } else {
// ElMessage.error(res.message);
// }
// loading.value = false;
// });
} }
} }
......
...@@ -19,6 +19,16 @@ import { makeData } from '../../utils/utils'; ...@@ -19,6 +19,16 @@ import { makeData } from '../../utils/utils';
import store from "../../store/index"; import store from "../../store/index";
import http from '../../api/http' import http from '../../api/http'
// 静态数据
import {
pipeReal1,
pipeReal2,
boilerReal,
deviceReal1,
deviceReal2,
deviceReal3,
deviceReal4,} from "../../dataJson/mock-data/mock"
const enterpriseId = ref(null); const enterpriseId = ref(null);
onMounted(() => { onMounted(() => {
...@@ -48,9 +58,13 @@ for(let i=0;i<7;i++){ ...@@ -48,9 +58,13 @@ for(let i=0;i<7;i++){
//固定供热站名称、换热站名称、锅炉总管名称、采集时间、编号 //固定供热站名称、换热站名称、锅炉总管名称、采集时间、编号
async function getPipe() { async function getPipe() {
//
// var result = await http.post("/api/pipe/Real",{enterpriseId:enterpriseId.value,deviceType:1});
// var data = result.data;
// 静态数据
var data = pipeReal1.data
var result = await http.post("/api/pipe/Real",{enterpriseId:enterpriseId.value,deviceType:1});
var data = result.data;
var tmpdata = makeData(data); var tmpdata = makeData(data);
tmpdata.dataRows.push({ tmpdata.dataRows.push({
name: 'rowIndex', name: 'rowIndex',
...@@ -82,11 +96,19 @@ async function getPipe() { ...@@ -82,11 +96,19 @@ async function getPipe() {
// Pipedata.tableData = data.realData; // Pipedata.tableData = data.realData;
// TablesArray.tables[1].table.tableData=data; // TablesArray.tables[1].table.tableData=data;
// TablesArray.tables[1].table.alarm = result.data.alarmData; // TablesArray.tables[1].table.alarm = result.data.alarmData;
TablesArray.tables[1]={ name: '总管', table:{dataRows: tmpdata.dataRows, tableData: tmpdata.tableData, alarm: result.data.alarmData} };
// TablesArray.tables[1]={ name: '总管', table:{dataRows: tmpdata.dataRows, tableData: tmpdata.tableData, alarm: result.data.alarmData} };
// 静态数据
TablesArray.tables[1]={ name: '总管', table:{dataRows: tmpdata.dataRows, tableData: tmpdata.tableData, alarm: pipeReal1.data.alarmData} };
// TablesArray.tables.push({ name: '换热站实时数据', table: {dataRows:[],tableData:data, alarm: result.data.alarmData} }); // TablesArray.tables.push({ name: '换热站实时数据', table: {dataRows:[],tableData:data, alarm: result.data.alarmData} });
http.post('/api/pipe/Real',{enterpriseId:enterpriseId.value,deviceType:8}).then((result)=>{ // http.post('/api/pipe/Real',{enterpriseId:enterpriseId.value,deviceType:8}).then((result)=>{
var data = result.data; // var data = result.data;
// 静态数据
var data = pipeReal2.data
var tmpdata = makeData(data); var tmpdata = makeData(data);
tmpdata.dataRows.push({ tmpdata.dataRows.push({
name: 'rowIndex', name: 'rowIndex',
...@@ -113,15 +135,23 @@ async function getPipe() { ...@@ -113,15 +135,23 @@ async function getPipe() {
isVisible:true isVisible:true
}) })
TablesArray.tables[0]={ name: '计量站', table: {dataRows: tmpdata.dataRows, tableData: tmpdata.tableData, alarm: result.data.alarmData} }; // TablesArray.tables[0]={ name: '计量站', table: {dataRows: tmpdata.dataRows, tableData: tmpdata.tableData, alarm: result.data.alarmData} };
})
// 静态数据
TablesArray.tables[0]={ name: '计量站', table: {dataRows: tmpdata.dataRows, tableData: tmpdata.tableData, alarm: pipeReal2.data.alarmData} };
// })
} }
function getBoiler() { function getBoiler() {
http.post('/api/boiler/Real',{enterpriseId:enterpriseId.value,deviceType:0}).then((result)=>{ // http.post('/api/boiler/Real',{enterpriseId:enterpriseId.value,deviceType:0}).then((result)=>{
var data = result.data; // var data = result.data;
// 静态数据
var data = boilerReal.data;
var tmpdata = makeData(data); var tmpdata = makeData(data);
tmpdata.dataRows.push({ tmpdata.dataRows.push({
name: 'rowIndex', name: 'rowIndex',
...@@ -156,16 +186,35 @@ function getBoiler() { ...@@ -156,16 +186,35 @@ function getBoiler() {
isVisible:true isVisible:true
}) })
//TablesArray.tables[2]={ name: '锅炉', table: tmpdata }; //TablesArray.tables[2]={ name: '锅炉', table: tmpdata };
TablesArray.tables[2]={ name: '锅炉', table:{dataRows: tmpdata.dataRows, tableData: tmpdata.tableData, alarm: result.data.alarmData} }; // TablesArray.tables[2]={ name: '锅炉', table:{dataRows: tmpdata.dataRows, tableData: tmpdata.tableData, alarm: result.data.alarmData} };
})
// 静态数据
TablesArray.tables[2]={ name: '锅炉', table:{dataRows: tmpdata.dataRows, tableData: tmpdata.tableData, alarm: boilerReal.data.alarmData} };
// })
} }
//水5电7热6气4 //水5电7热6气4
function getDevice(name, deviceType) { function getDevice(name, deviceType) {
http.post('/api/device/Real',{enterpriseId:enterpriseId.value,deviceType:deviceType}).then((result)=>{ // http.post('/api/device/Real',{enterpriseId:enterpriseId.value,deviceType:deviceType}).then((result)=>{
var data = result.data; // var data = result.data;
var tmpdata = makeData(data);
var data = [deviceReal1.data,deviceReal2.data,deviceReal3.data,deviceReal4.data];
var i = 0;
// 静态数据
if (deviceType == 4){
i = 0
}else if (deviceType == 5){
i = 1
}else if (deviceType == 6){
i = 2
}else if (deviceType == 7){
i = 3
}
var tmpdata = makeData(data[i]);
// var tmpdata = makeData(data);
tmpdata.dataRows.push({ tmpdata.dataRows.push({
name: 'rowIndex', name: 'rowIndex',
showName: '编号', showName: '编号',
...@@ -199,7 +248,7 @@ function getDevice(name, deviceType) { ...@@ -199,7 +248,7 @@ function getDevice(name, deviceType) {
isVisible:true isVisible:true
}) })
TablesArray.tables[deviceType-1]={ name: name, table: tmpdata }; TablesArray.tables[deviceType-1]={ name: name, table: tmpdata };
}) // })
} }
function createTimer(task, interval) { function createTimer(task, interval) {
......
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