Commit 1fbfef79 authored by co_dengxiongwen's avatar co_dengxiongwen

Merge branch 'dev' of gitlab.suntrayoa.com:geqilin/energyai_vue into dev

parents b9337dc5 25e9a077
...@@ -7,8 +7,12 @@ div(:id="id", :style="{ width: '100%', height: '90%' }") ...@@ -7,8 +7,12 @@ div(:id="id", :style="{ width: '100%', height: '90%' }")
export default { export default {
props: ['id', 'data', 'title', 'color', 'yAxisName'], props: ['id', 'data', 'title', 'color', 'yAxisName'],
watch: { watch: {
data() { data: {
this.initChart() immediate: true,
deep: true,
handler(newValue, oldValue) {
this.initChart()
}
} }
}, },
mounted() { mounted() {
......
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
<!-- <energy-total-charts></energy-total-charts> --> <!-- <energy-total-charts></energy-total-charts> -->
<chart <chart
id="home" id="home"
:data="dataList.energyList" :data="data"
title="能耗统计" title="能耗统计"
color="#21ACFC" color="#21ACFC"
ref="chart" ref="chart"
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
cardListLeftTitle: '能耗统计', cardListLeftTitle: '能耗统计',
cardListRightTitle: '旅客满意度调查', cardListRightTitle: '旅客满意度调查',
activeIndex: 0, activeIndex: 0,
dataList: this.$store.state.d2admin.paramsList.list.syBean || [], dataList: [] || this.$store.state.d2admin.paramsList.list.syBean,
dateList: [ dateList: [
{ {
value: 0, value: 0,
...@@ -233,6 +233,8 @@ export default { ...@@ -233,6 +233,8 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
console.log('首页:', data) console.log('首页:', data)
this.dataList = data.bean this.dataList = data.bean
this.data = data.bean.energyList //默认
} }
}) })
}, },
......
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