|
@@ -3468,9 +3468,93 @@ export default {
|
|
|
});
|
|
|
break;
|
|
|
case "3":
|
|
|
+ this.disposeChart();
|
|
|
+ let ethyleneArray = [];
|
|
|
+ let ethyleneIndexArray = [];
|
|
|
+ let propyleneArray = [];
|
|
|
+ let propyleneIndexArray = [];
|
|
|
+ let sampleDateArray = [];
|
|
|
listS4013(this.analysisQueryParams).then(response => {
|
|
|
let data = response.data;
|
|
|
- console.log(data)
|
|
|
+ for(let i = 0 ; i < data.length; i++){
|
|
|
+ ethyleneArray.push(data[i].ethylene);
|
|
|
+ ethyleneIndexArray.push("99.95");
|
|
|
+ sampleDateArray.push(data[i].sampleDate);
|
|
|
+ }
|
|
|
+ listS5003(this.analysisQueryParams).then(response => {
|
|
|
+ let data = response.data;
|
|
|
+ for(let i = 0 ; i < data.length; i++){
|
|
|
+ propyleneArray.push(data[i].propylene);
|
|
|
+ propyleneIndexArray.push("99.6");
|
|
|
+ }
|
|
|
+ let option = {
|
|
|
+ title: {
|
|
|
+ text: dictLabel,
|
|
|
+ left: 'center',
|
|
|
+ textStyle: {
|
|
|
+ fontSize: 16
|
|
|
+ }
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis'
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ x: 'center',
|
|
|
+ y: 'bottom',
|
|
|
+ data: ['Ethylene', '乙烯指标', 'Propylene', '丙烯指标']
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ top: '10%',
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '10%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ toolbox: {
|
|
|
+ feature: {
|
|
|
+ saveAsImage: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ boundaryGap: false,
|
|
|
+ data: sampleDateArray,
|
|
|
+ axisLabel: {
|
|
|
+ interval: 0,
|
|
|
+ rotate: 45
|
|
|
+ }
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value',
|
|
|
+ min: 99.5,
|
|
|
+ max: 100,
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: 'Ethylene',
|
|
|
+ type: 'line',
|
|
|
+ data: ethyleneArray
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '乙烯指标',
|
|
|
+ type: 'line',
|
|
|
+ data: ethyleneIndexArray
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'Propylene',
|
|
|
+ type: 'line',
|
|
|
+ data: propyleneArray
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '丙烯指标',
|
|
|
+ type: 'line',
|
|
|
+ data: propyleneIndexArray
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ this.chart = this.echarts.init(document.getElementById('chart'));
|
|
|
+ this.chart.setOption(option);
|
|
|
+ });
|
|
|
});
|
|
|
break;
|
|
|
case "4":
|