Browse Source

修改能源分析-能耗报表数据

meizhou
selia-zx 3 weeks ago
parent
commit
b31574e5fd
  1. 38
      src/views/hotWater/energyAnalysis/components/energyReport.vue

38
src/views/hotWater/energyAnalysis/components/energyReport.vue

@ -11,13 +11,13 @@
<div v-if="dateType === 'day'">与昨日相比</div>
<div v-if="dateType === 'month'">与上月相比</div>
<div v-if="dateType === 'year'">与上年相比</div>
<div class="upText" v-if="useWaterRadio > 0">
<i class="el-icon-bottom"></i>
<span>+{{ useWaterRadio }}</span>
<div class="upText" v-if="isPositive(useWaterRadio)">
<i class="el-icon-top"></i>
<span>{{ useWaterRadio }}</span>
</div>
<div class="downText" v-else>
<i class="el-icon-bottom"></i>
<span>-{{ useWaterRadio }}</span>
<span>{{ useWaterRadio }}</span>
</div>
</div>
<img
@ -36,13 +36,13 @@
<div v-if="dateType === 'day'">与昨日相比</div>
<div v-if="dateType === 'month'">与上月相比</div>
<div v-if="dateType === 'year'">与上年相比</div>
<div class="upText" v-if="useElectRadio > 0">
<i class="el-icon-bottom"></i>
<span>+{{ useElectRadio }}</span>
<div class="upText" v-if="isPositive(useElectRadio)">
<i class="el-icon-top"></i>
<span>{{ useElectRadio }}</span>
</div>
<div class="downText" v-else>
<i class="el-icon-bottom"></i>
<span>-{{ useElectRadio }}</span>
<span>{{ useElectRadio }}</span>
</div>
</div>
<img
@ -61,13 +61,13 @@
<div v-if="dateType === 'day'">与昨日相比</div>
<div v-if="dateType === 'month'">与上月相比</div>
<div v-if="dateType === 'year'">与上年相比</div>
<div class="upText" v-if="useUnitRadio > 0">
<i class="el-icon-bottom"></i>
<span>+{{ useUnitRadio }}</span>
<div class="upText" v-if="isPositive(useUnitRadio)">
<i class="el-icon-top"></i>
<span>{{ useUnitRadio }}</span>
</div>
<div class="downText" v-else>
<i class="el-icon-bottom"></i>
<span>-{{ useUnitRadio }}</span>
<span>{{ useUnitRadio }}</span>
</div>
</div>
<img
@ -250,6 +250,13 @@ export default {
window.removeEventListener("resize", this.screenAdapter);
},
methods: {
isPositive(value) {
//
const numberPart = value.replace("%", "");
//
const num = parseFloat(numberPart);
return num > 0;
},
handleEnter(index) {
this.currentIndex = index;
this.renderingBroken();
@ -620,12 +627,7 @@ export default {
import("@/assets/excel/Export2Excel").then((excel) => {
// excel
if (this.building == "所有") {
var tHeader = [
"日期",
"用水量(吨)",
"用电量(度)",
"单耗(度/吨)",
]; // excel
var tHeader = ["日期", "用水量(吨)", "用电量(度)", "单耗(度/吨)"]; // excel
var filterVal = [
"curDate",
"useHotWater",

Loading…
Cancel
Save