Browse Source

偏差分析图形调整

xuxiaoming
wangxy 2 years ago
parent
commit
fe2ab18948
3 changed files with 76 additions and 8 deletions
  1. +35
    -3
      src/views/plan/workbench/homePage/formal/analysis/commonLineChart.vue
  2. +6
    -2
      src/views/plan/workbench/homePage/formal/analysis/index.vue
  3. +35
    -3
      src/views/plan/workbench/homePage/formal/analysis/lineBarChart.vue

+ 35
- 3
src/views/plan/workbench/homePage/formal/analysis/commonLineChart.vue View File

@ -1,5 +1,5 @@
<template> <template>
<div style="height:150px;width:100%;margin-top: 0px;" />
<div style="height:162px;width:100%;margin-top: 0px;" />
</template> </template>
<script> <script>
@ -93,11 +93,43 @@ export default {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({ this.chart.setOption({
color: ['#126db9'], color: ['#126db9'],
dataZoom: [
{
// start: 0,//0
// end: 100,//100
type: 'slider',
show: true,
// xAxisIndex: [0],
handleSize: 0,// 2
startValue: 0, //
endValue: 30, //
height: 10,//
left: '5%', //
right: '5%',//
bottom: 10,//
borderColor: "#000",
fillerColor: '#269cdb',
borderRadius: 5,
backgroundColor: '#33384b',//
showDataShadow: false,// auto
showDetail: false,// true
realtime: false, //
filterMode: 'filter',
},
//
{
type: 'inside',
show: true,
// xAxisIndex: [0],
start: 1,//1
end: 10,//100
},
],
grid: { grid: {
top: '10%', top: '10%',
left: '5%', left: '5%',
right: '0%',
bottom: '0%',
right: '5%',
bottom: '15%',
containLabel: true containLabel: true
}, },
legend: { legend: {


+ 6
- 2
src/views/plan/workbench/homePage/formal/analysis/index.vue View File

@ -60,10 +60,10 @@
</div> </div>
</el-col> </el-col>
<el-col :span="allTheSingle === '2' ? 16 : 20"> <el-col :span="allTheSingle === '2' ? 16 : 20">
<div class="">
<div class="analysis-chart-wrapper">
<CommonLineChart :dataList="dataList.PerCustomerDeviationDetailItem|| []" /> <CommonLineChart :dataList="dataList.PerCustomerDeviationDetailItem|| []" />
</div> </div>
<div class="">
<div class="analysis-chart-wrapper" style="margin-top: 20px;">
<LineBarChart :dataList="dataList.CustomerDeviationDetailItem || []" /> <LineBarChart :dataList="dataList.CustomerDeviationDetailItem || []" />
</div> </div>
</el-col> </el-col>
@ -226,5 +226,9 @@ export default {
.parts-table { .parts-table {
width: 100%; width: 100%;
} }
.analysis-chart-wrapper {
width: 100%;
overflow-x: auto;
}
} }
</style> </style>

+ 35
- 3
src/views/plan/workbench/homePage/formal/analysis/lineBarChart.vue View File

@ -1,5 +1,5 @@
<template> <template>
<div style="height:150px;width:100%;margin-top:10px;" />
<div style="height:162px;width:100%;margin-top:10px;" />
</template> </template>
<script> <script>
@ -74,6 +74,38 @@ export default {
color: '#fff' color: '#fff'
} }
}, },
dataZoom: [
{
// start: 0,//0
// end: 100,//100
type: 'slider',
show: true,
// xAxisIndex: [0],
handleSize: 0,// 2
startValue: 0, //
endValue: 30, //
height: 10,//
left: '5%', //
right: '5%',//
bottom: 10,//
borderColor: "#000",
fillerColor: '#269cdb',
borderRadius: 5,
backgroundColor: '#33384b',//
showDataShadow: false,// auto
showDetail: false,// true
realtime: true, //
filterMode: 'filter',
},
//
{
type: 'inside',
show: true,
// xAxisIndex: [0],
start: 1,//1
end: 100,//100
},
],
color: ['#126db9'], color: ['#126db9'],
legend: { legend: {
data: this.seriesArray.map(e=>e.name) data: this.seriesArray.map(e=>e.name)
@ -81,8 +113,8 @@ export default {
grid: { grid: {
top: '10%', top: '10%',
left: '5%', left: '5%',
right: '0%',
bottom: '0%',
right: '5%',
bottom: '15%',
containLabel: true containLabel: true
}, },
xAxis: { xAxis: {


Loading…
Cancel
Save