|
@@ -20,12 +20,12 @@
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <el-row :gutter="20">
|
|
|
|
|
|
|
+ <el-row>
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<div ref="chart1" class="chart" />
|
|
<div ref="chart1" class="chart" />
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="18">
|
|
<el-col :span="18">
|
|
|
- <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>
|
|
|
</div>
|
|
</div>
|
|
@@ -54,24 +54,31 @@ export default {
|
|
|
generalShow: this.show,
|
|
generalShow: this.show,
|
|
|
id: '',
|
|
id: '',
|
|
|
generalData: {
|
|
generalData: {
|
|
|
- title: '',
|
|
|
|
|
- titleCentr: false,
|
|
|
|
|
- alertShow: false,
|
|
|
|
|
|
|
+ title: '', // 弹出框标题
|
|
|
|
|
+ titleCentr: false, // 弹出框标题是否区中
|
|
|
|
|
+ alertShow: false, // 提示是否显示
|
|
|
alert: {
|
|
alert: {
|
|
|
- title: '',
|
|
|
|
|
- description: ''
|
|
|
|
|
|
|
+ title: '', // 提示标题
|
|
|
|
|
+ description: '' // 提示内容
|
|
|
|
|
+ },
|
|
|
|
|
+ leftData: {
|
|
|
|
|
+ leftTotal: 0, // 左图数量
|
|
|
|
|
+ title: '' // 左图标题,默认"完成率"
|
|
|
},
|
|
},
|
|
|
- leftTotal: 0,
|
|
|
|
|
rightData: {
|
|
rightData: {
|
|
|
- title: '人数',
|
|
|
|
|
- xAxisName: '',
|
|
|
|
|
- yAxisName: '',
|
|
|
|
|
- yAxisData: ['金源信通'],
|
|
|
|
|
|
|
+ title: '人数', // 右图标题
|
|
|
|
|
+ xAxisName: '', // 右图x轴标题
|
|
|
|
|
+ yAxisName: '', // 右图y轴标题
|
|
|
|
|
+ yAxisData: ['金源信通'], // 右图y轴项
|
|
|
series: [{
|
|
series: [{
|
|
|
- name: '总数',
|
|
|
|
|
- data: ['']
|
|
|
|
|
|
|
+ name: '总数', // 右图x轴项
|
|
|
|
|
+ data: [''] // 右图x轴数量
|
|
|
}],
|
|
}],
|
|
|
- color: ['rgb(55, 162, 218)', 'rgb(103, 224, 227)', 'rgb(253, 102, 109)']
|
|
|
|
|
|
|
+ color: ['rgb(55, 162, 218)', 'rgb(103, 224, 227)', 'rgb(253, 102, 109)'], // 颜色
|
|
|
|
|
+ tooltip: { // 右图弹出框
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ trigger: 'axis'
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
height: 300
|
|
height: 300
|
|
@@ -88,11 +95,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
created () {
|
|
created () {
|
|
|
this.generalData = this.generalList[0]
|
|
this.generalData = this.generalList[0]
|
|
|
- const height = this.generalData.rightData.yAxisData.length * 80
|
|
|
|
|
|
|
+ const height = this.generalData.rightData.yAxisData.length * 100
|
|
|
this.height = height > 300 ? height : 300
|
|
this.height = height > 300 ? height : 300
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- this.getOption(this.generalData.leftTotal)
|
|
|
|
|
|
|
+ this.getOption(this.generalData.leftData)
|
|
|
this.barDataPlan(this.generalData.rightData)
|
|
this.barDataPlan(this.generalData.rightData)
|
|
|
}, 100)
|
|
}, 100)
|
|
|
},
|
|
},
|
|
@@ -106,11 +113,11 @@ export default {
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.stopCenter{
|
|
.stopCenter{
|
|
|
- margin: 0 30px 20px 30px;
|
|
|
|
|
|
|
+ margin: 20px 30px 20px 30px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.tableTop{
|
|
.tableTop{
|
|
|
- margin: 10px 0;
|
|
|
|
|
|
|
+ margin: 0 0 10px 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.chart{
|
|
.chart{
|