|
@@ -4149,14 +4149,30 @@ export default {
|
|
|
},
|
|
|
/** 处理趋势图对话框开始/结束日期change事件 */
|
|
|
handleAnalysisQuery() {
|
|
|
- this.disposeChart();
|
|
|
- this.valueList = [];
|
|
|
- this.dateList = [];
|
|
|
- let endDate = new Date(this.analysisQueryParams.endDate);
|
|
|
- let startDate = new Date(this.analysisQueryParams.startDate);
|
|
|
- this.analysisQueryParams.endDate = endDate.getFullYear() + "-" + Number(endDate.getMonth() + 1) + "-" + endDate.getDate();
|
|
|
- this.analysisQueryParams.startDate = startDate.getFullYear() + "-" + Number(startDate.getMonth() + 1) + "-" + startDate.getDate();
|
|
|
- this.draw();
|
|
|
+ if (this.chemicalChosen != null && this.chemicalChosen != "") {
|
|
|
+ this.analysisQueryParams.fieldName = this.chemicalChosen;
|
|
|
+ for (let i = 0; i < this.chemicalsOptions.length; i++) {
|
|
|
+ if (this.chemicalsOptions[i].dictValue == this.chemicalChosen) {
|
|
|
+ this.fieldNameTitle2 = this.chemicalsOptions[i].dictLabel;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.disposeChart();
|
|
|
+ this.valueList2 = [];
|
|
|
+ let endDate = new Date(this.analysisQueryParams.endDate);
|
|
|
+ let startDate = new Date(this.analysisQueryParams.startDate);
|
|
|
+ this.analysisQueryParams.endDate = endDate.getFullYear() + "-" + Number(endDate.getMonth() + 1) + "-" + endDate.getDate();
|
|
|
+ this.analysisQueryParams.startDate = startDate.getFullYear() + "-" + Number(startDate.getMonth() + 1) + "-" + startDate.getDate();
|
|
|
+ this.draw2();
|
|
|
+ } else {
|
|
|
+ this.disposeChart();
|
|
|
+ this.valueList = [];
|
|
|
+ this.dateList = [];
|
|
|
+ let endDate = new Date(this.analysisQueryParams.endDate);
|
|
|
+ let startDate = new Date(this.analysisQueryParams.startDate);
|
|
|
+ this.analysisQueryParams.endDate = endDate.getFullYear() + "-" + Number(endDate.getMonth() + 1) + "-" + endDate.getDate();
|
|
|
+ this.analysisQueryParams.startDate = startDate.getFullYear() + "-" + Number(startDate.getMonth() + 1) + "-" + startDate.getDate();
|
|
|
+ this.draw();
|
|
|
+ }
|
|
|
},
|
|
|
/** 绘制趋势图 */
|
|
|
draw() {
|