修改bug及能源分析样式

This commit is contained in:
2023-09-27 09:33:28 +08:00
parent 42550264c8
commit ee40707d2c
15 changed files with 302 additions and 53 deletions

View File

@@ -2,20 +2,25 @@
<div class="app-container">
<!-- 搜索工作栏 -->
<search-area @submit="getList" @exportD="exportData"/>
<div style='width: 100%;height: 300px;'>
<line-chart ref="analysisLineChart" :chartData="chartData"/>
<div v-show='chartData.length'>
<div style='width: 100%;height: 400px;'>
<line-chart ref="analysisLineChart" :chartData="chartData"/>
</div>
<!-- 表格 -->
<base-table
:table-props="tableProps"
:table-data="list"
:max-height="tableH"
class="yoy-out-table"
/>
</div>
<!-- 表格 -->
<base-table
:table-props="tableProps"
:table-data="list"
:max-height="tableH"
class="yoy-out-table"
/>
<!-- 没有数据 -->
<div class="no-data-bg" v-show='!chartData.length'></div>
</div>
</template>
<script>
import { getYoy } from "@/api/analysis/energyAnalysis"
import subRate from "./components/subRate.vue"
import SearchArea from "./components/searchArea"
import LineChart from "./components/lineChart"
import FileSaver from "file-saver"
@@ -28,12 +33,12 @@ export default {
chartData: [],
tableProps: [],
list: [],
tableH: this.tableHeight(500)
tableH: this.tableHeight(600)
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(500)
this.tableH = this.tableHeight(600)
})
},
methods: {
@@ -65,11 +70,15 @@ export default {
let obj = {}
obj.prop = tempX[j].prop + '_' + nameData[i].name
obj.label = nameData[i].name
if (obj.label.indexOf('同比')!= -1) {
obj.subcomponent = subRate
}
tempX[j].children.push(obj)
}
}
}
this.tableProps = [{prop: 'time',label: '时间'}].concat(tempX)
console.log(this.tableProps)
// 数据
this.list = []
for (let k = 0; k < data.length; k++) {