Ver código fonte

质量月报 - DS系统关键控制指标

wangggziwen 1 ano atrás
pai
commit
92d5deebde
1 arquivos alterados com 110 adições e 2 exclusões
  1. 110 2
      ui/src/views/production/quality/index.vue

+ 110 - 2
ui/src/views/production/quality/index.vue

@@ -3644,9 +3644,117 @@ export default {
           });
           break;
         case "5":
-          listS2400(this.analysisQueryParams).then(response => {
+          listS2002(this.analysisQueryParams).then(response => {
             let data = response.data;
-            console.log(data)
+            let cod2002Array = [];
+            let ph2002Array = [];
+            let cod2400Array = [];
+            let ph2400Array = [];
+            let codIndexArray = [];
+            let phIndexArray = [];
+            let sampleDateArray = [];
+            for(let i = 0 ; i < data.length; i++){
+              cod2002Array.push(data[i].cod);
+              ph2002Array.push(data[i].ph);
+              codIndexArray .push("1400");
+              phIndexArray .push("8.5");
+              sampleDateArray.push(data[i].sampleDate);
+            }
+            listS2400(this.analysisQueryParams).then(response => {
+              let data = response.data;
+              for(let i = 0 ; i < data.length; i++){
+                cod2400Array.push(data[i].cod);
+                ph2400Array.push(data[i].ph);
+              }
+              let option = {
+                title: {
+                  text: dictLabel,
+                  left: 'center',
+                  textStyle: {
+                    fontSize: 16
+                  }
+                },
+                tooltip: {
+                  trigger: 'axis'
+                },
+                legend: {
+                  x: 'center',
+                  y: 'bottom',
+                  data: ['C270 COD', 'C290 COD', 'COD指标', 'C270 PH', 'C290 PH', 'PH指标',]
+                },
+                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',
+                    position: 'left'
+                  },
+                  {
+                    type: 'value',
+                    position: 'right'
+                  }
+                ],
+                series: [
+                  {
+                    name: 'C270 COD',
+                    type: 'line',
+                    data: cod2002Array,
+                    yAxisIndex: 0
+                  },
+                  {
+                    name: 'C290 COD',
+                    type: 'line',
+                    data: cod2400Array,
+                    yAxisIndex: 0
+                  },
+                  {
+                    name: 'COD指标',
+                    type: 'line',
+                    data: codIndexArray,
+                    yAxisIndex: 0
+                  },
+                  {
+                    name: 'C270 PH',
+                    type: 'line',
+                    data: ph2002Array,
+                    yAxisIndex: 1
+                  },
+                  {
+                    name: 'C290 PH',
+                    type: 'line',
+                    data: ph2400Array,
+                    yAxisIndex: 1
+                  },
+                  {
+                    name: 'PH指标',
+                    type: 'line',
+                    data: phIndexArray,
+                    yAxisIndex: 1
+                  }
+                ]
+              };
+              this.chart = this.echarts.init(document.getElementById('chart'));
+              this.chart.setOption(option);
+            });
           });
           break;
         case "6":