|
@@ -2194,7 +2194,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listS0501, getS0501, delS0501, addS0501, updateS0501, exportS0501 } from "@/api/production/s0501";
|
|
|
+import { listS0501, listS0501Month, getS0501, delS0501, addS0501, updateS0501, exportS0501 } from "@/api/production/s0501";
|
|
|
import { listS1301, getS1301, delS1301, addS1301, updateS1301, exportS1301 } from "@/api/production/s1301";
|
|
|
import { listS2002, getS2002, delS2002, addS2002, updateS2002, exportS2002 } from "@/api/production/s2002";
|
|
|
import { listS2005, getS2005, delS2005, addS2005, updateS2005, exportS2005 } from "@/api/production/s2005";
|
|
@@ -3280,19 +3280,92 @@ export default {
|
|
|
handleAnalysisQuery() {
|
|
|
this.analysisQueryParams.startDate = this.analysisSampleDate[0];
|
|
|
this.analysisQueryParams.endDate = this.analysisSampleDate[1];
|
|
|
-
|
|
|
let dictLabel = "";
|
|
|
for(let i = 0; i < this.analysisOptions.length; i++) {
|
|
|
if (this.analysisOptions[i].dictValue == this.analysisValue) {
|
|
|
dictLabel = this.analysisOptions[i].dictLabel;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
switch (this.analysisValue) {
|
|
|
case "1":
|
|
|
- listS0501(this.analysisQueryParams).then(response => {
|
|
|
+ this.disposeChart();
|
|
|
+ listS0501Month(this.analysisQueryParams).then(response => {
|
|
|
let data = response.data;
|
|
|
- console.log(data)
|
|
|
+ let pArray = [];
|
|
|
+ let iArray = [];
|
|
|
+ let aArray = [];
|
|
|
+ let nArray = [];
|
|
|
+ let fiftyArray = [];
|
|
|
+ let sampleDateArray = [];
|
|
|
+ for(const key in data) {
|
|
|
+ sampleDateArray.push(key);
|
|
|
+ pArray.push(data[key].p);
|
|
|
+ iArray.push(data[key].i);
|
|
|
+ aArray.push(data[key].a);
|
|
|
+ nArray.push(data[key].n);
|
|
|
+ fiftyArray.push(data[key].fifty);
|
|
|
+ }
|
|
|
+ let option = {
|
|
|
+ title: {
|
|
|
+ text: dictLabel,
|
|
|
+ left: 'center',
|
|
|
+ textStyle: {
|
|
|
+ fontSize: 16
|
|
|
+ }
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis'
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ x: 'center',
|
|
|
+ y: 'bottom',
|
|
|
+ data: ['正构烷烃', '异构烷烃', '芳烃', '烷烃', '50%BP']
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ top: '10%',
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '10%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ boundaryGap: false,
|
|
|
+ data: sampleDateArray
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value'
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '正构烷烃',
|
|
|
+ type: 'line',
|
|
|
+ data: pArray
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '异构烷烃',
|
|
|
+ type: 'line',
|
|
|
+ data: iArray
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '芳烃',
|
|
|
+ type: 'line',
|
|
|
+ data: aArray
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '烷烃',
|
|
|
+ type: 'line',
|
|
|
+ data: nArray
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '50%BP',
|
|
|
+ type: 'line',
|
|
|
+ data: fiftyArray
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ this.chart = this.echarts.init(document.getElementById('chart'));
|
|
|
+ this.chart.setOption(option);
|
|
|
});
|
|
|
break;
|
|
|
case "2":
|