修改bug及能源分析样式
This commit is contained in:
@@ -75,6 +75,7 @@ export default {
|
||||
}
|
||||
}
|
||||
var option = {
|
||||
color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF','#FF6860','#FF9747','#B0EB42','#D680FF','#0043D2'],
|
||||
legend: {
|
||||
data: keys
|
||||
},
|
||||
@@ -82,8 +83,8 @@ export default {
|
||||
trigger: 'axis'
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
|
||||
18
src/views/energy/analysis/yoyAnalysis/components/subRate.vue
Normal file
18
src/views/energy/analysis/yoyAnalysis/components/subRate.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<svg-icon icon-class="upArrow" v-show='injectData[injectData.prop] > 0'/>
|
||||
<svg-icon icon-class="downArrow" v-show='injectData[injectData.prop] < 0'/>
|
||||
<span style="margin-left: 5px;">{{ injectData[injectData.prop] }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'subRate',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user