Commit 061a9056 authored by 朱超's avatar 朱超

同比环比更新

parent 96fbb393
......@@ -92,8 +92,15 @@ export const postExternalQOQ = params => {
})
}
//换热站机组用量同比接口(耗水量、耗电量、耗热量)
export const postYOY = params => {
//换热站机组用量同比接口(耗水量、耗电量、耗热量)网内
export const postWithinYOY = params => {
return http.post(`/api/analysis/within/YOY`, params).then(res => res).catch(function (error) {
console.log(error);
})
}
//换热站机组用量同比接口(耗水量、耗电量、耗热量)网外
export const postExternalYOY = params => {
return http.post(`/api/analysis/external/YOY`, params).then(res => res).catch(function (error) {
console.log(error);
})
......
......@@ -128,7 +128,7 @@
</el-card>
<div v-show="!switchV">
<el-table
:data="tableData"
:data="tableData.value"
:height="tableHeight"
style="width: 100%"
empty-text="暂无数据"
......@@ -196,7 +196,7 @@ const props = { multiple: true, emitPath: false };
const switchV = ref(true);
const echartF = ref(false);
const nodata = ref(true);
let tableData = reactive([]);
const tableData = reactive([]);
const echartTitle = reactive(["耗水量趋势图"]);
const echartData = reactive([]);
const echartDataTime = reactive([]);
......@@ -449,6 +449,7 @@ function postExternalQOQFun() {
postExternalQOQ(params).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
tableData.value = res.data.hourWater;
if (res.data.hourWater.length > 0) {
pageInitFun(res);
} else {
......@@ -463,6 +464,7 @@ function postExternalQOQFun() {
postWithinQOQ(params).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
tableData.value = res.data.data;
if (res.data.data.length > 0) {
pageInitFun(res);
} else {
......@@ -502,7 +504,7 @@ function pageInitFun(res) {
echartDataLegend.length = 0;
echartDataTime.length = 0;
if (res.data.hourWater.length > 0) {
tableData = res.data.hourWater;
tableData.value = res.data.hourWater;
nodata.value = true;
echartData.value = dataDeal(res.data.hourWater);
echartData.value[0].listInfo.forEach((element) => {
......@@ -700,6 +702,7 @@ function changeFun() {
onMounted(() => {
timeFun();
setContentHeight();
getEnterprise();
getSupplys();
postExternalQOQFun();
......
This diff is collapsed.
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