|
@@ -1001,7 +1001,7 @@ export default {
|
|
|
if (response.code == 200) {
|
|
|
this.$message.success("修改成功");
|
|
|
} else {
|
|
|
- this.$message.error("未知错误,请联系管理员");
|
|
|
+ this.$message.error("未知错误,请联系管理员。");
|
|
|
}
|
|
|
getEligibleProductRate(year).then(response => {
|
|
|
this.tableEligibleProductRate = response.data;
|
|
@@ -1042,14 +1042,23 @@ export default {
|
|
|
},
|
|
|
/** 处理趋势分析时间区间change事件 */
|
|
|
handleAnalysisTimeIntervalChange() {
|
|
|
- this.disposeChart();
|
|
|
- let startDate = this.analysisDialogElement.startDate;
|
|
|
- let endDate = this.analysisDialogElement.endDate;
|
|
|
- this.analysisQueryParams.fromYear = startDate.getFullYear();
|
|
|
- this.analysisQueryParams.fromMonth = startDate.getMonth() + 1;
|
|
|
- this.analysisQueryParams.toYear = endDate.getFullYear();
|
|
|
- this.analysisQueryParams.toMonth = endDate.getMonth() + 1;
|
|
|
- this.draw();
|
|
|
+ if (this.analysisDialogElement.startDate.getTime() >= this.analysisDialogElement.endDate.getTime()) {
|
|
|
+ let startDate = new Date();
|
|
|
+ let endDate = new Date();
|
|
|
+ startDate.setFullYear(startDate.getFullYear() - 1);
|
|
|
+ this.analysisDialogElement.startDate = startDate;
|
|
|
+ this.analysisDialogElement.endDate = endDate;
|
|
|
+ this.$message.info("开始日期不能大于等于结束日期,请重新选择日期范围。");
|
|
|
+ } else {
|
|
|
+ this.disposeChart();
|
|
|
+ let startDate = this.analysisDialogElement.startDate;
|
|
|
+ let endDate = this.analysisDialogElement.endDate;
|
|
|
+ this.analysisQueryParams.fromYear = startDate.getFullYear();
|
|
|
+ this.analysisQueryParams.fromMonth = startDate.getMonth() + 1;
|
|
|
+ this.analysisQueryParams.toYear = endDate.getFullYear();
|
|
|
+ this.analysisQueryParams.toMonth = endDate.getMonth() + 1;
|
|
|
+ this.draw();
|
|
|
+ }
|
|
|
},
|
|
|
/** 绘制趋势图 */
|
|
|
draw() {
|