|
@@ -21,13 +21,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<el-row>
|
|
<el-row>
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col :span="5">
|
|
|
<div :style="{ height: height + 'px'}">
|
|
<div :style="{ height: height + 'px'}">
|
|
|
<div ref="chart1" class="chart" />
|
|
<div ref="chart1" class="chart" />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="18">
|
|
|
|
|
|
|
+ <el-col :span="19">
|
|
|
<div id="chart2" ref="chart2" class="chart2" :style="{ height: height + 'px'}" />
|
|
<div id="chart2" ref="chart2" class="chart2" :style="{ height: height + 'px'}" />
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -70,6 +70,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
rightCustomShow: false, // 右图自定义
|
|
rightCustomShow: false, // 右图自定义
|
|
|
rightData: {
|
|
rightData: {
|
|
|
|
|
+ direction: 'x',
|
|
|
title: '人数', // 右图标题
|
|
title: '人数', // 右图标题
|
|
|
xAxisName: '', // 右图x轴标题
|
|
xAxisName: '', // 右图x轴标题
|
|
|
yAxisName: '', // 右图y轴标题
|
|
yAxisName: '', // 右图y轴标题
|
|
@@ -113,11 +114,11 @@ export default {
|
|
|
created () {
|
|
created () {
|
|
|
this.generalData = this.generalList[0]
|
|
this.generalData = this.generalList[0]
|
|
|
const height = this.generalData.rightData.yAxisData.length * 100
|
|
const height = this.generalData.rightData.yAxisData.length * 100
|
|
|
- this.height = height > 300 ? height : 300
|
|
|
|
|
|
|
+ this.height = this.generalData.rightData.direction === 'x' ? 400 : height > 300 ? height : 300
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.getOption(this.generalData.leftData)
|
|
this.getOption(this.generalData.leftData)
|
|
|
- this.barDataPlan(this.generalData.rightData, this.generalData.rightCustomShow)
|
|
|
|
|
|
|
+ this.barDataPlan(this.generalData.rightData, this.generalData.rightCustomShow, this.generalData.rightData.direction)
|
|
|
}, 100)
|
|
}, 100)
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|