This commit is contained in:
2021-12-01 14:53:42 +08:00
parent 124f27fe5f
commit 6073b6d43b
10 changed files with 478 additions and 91 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-19 10:55:33
* @LastEditors: gtz
* @LastEditTime: 2021-11-30 20:23:45
* @LastEditTime: 2021-12-01 09:17:51
* @Description:
-->
<template>
@@ -51,7 +51,7 @@
</el-row>
</el-col>
<el-col style="height: 500px">
<chart height="100%" width="100%" :title="eleType" :showId="showId" titleFooter="氨气使用量" :dataList="dataList" :lastDataList="lastDataList" :chartType="chartType" />
<chart height="100%" width="100%" :title="eleType" :showId="showId" :titleHeader="yaoluName" titleFooter="氨气使用量(㎡)" :dataList="dataList" :lastDataList="lastDataList" :chartType="chartType" />
</el-col>
</el-row>
</el-col>
@@ -665,13 +665,15 @@ export default {
chartType: ['柱状'],
eleType: '年',
showId: 0,
yaoluIndex: 0
yaoluIndex: 0,
yaoluName: ''
}
},
mounted () {
this.dataList = this.eleYearList
this.lastDataList = this.lastEleYearList
this.showId = this.yaoluList[0].id
this.yaoluName = this.yaoluList[0].label
},
methods: {
changeEleType (v) {
@@ -701,6 +703,7 @@ export default {
handleNode (obj, node, e) {
if (!(obj.children)) {
this.showId = obj.id
this.yaoluName = obj.label
}
}
}