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

同比环比更新

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