修复:综合浏览数据表统计报表请求失败问题

master
Guo XIn 1 year ago
parent df430e8054
commit 17721915ae
  1. 7
      shandan-browser/src/main/resources/static/js/report.js

@ -63,7 +63,7 @@ ReportComponent.prototype.openEchartsConfigLayer = function () {
$('#echartsConfigForm').parent().css('overflow', 'visible') $('#echartsConfigForm').parent().css('overflow', 'visible')
}, },
yes: function (index) { yes: function (index) {
_this.requestData(()=> layer.close(index)); _this.requestData(() => layer.close(index));
} }
}); });
} }
@ -203,12 +203,15 @@ ReportComponent.prototype.validate = function (formVal) {
if (!formVal.aggregationType) { if (!formVal.aggregationType) {
showErrorMsg('请设置聚合方式'); showErrorMsg('请设置聚合方式');
return; return;
} else { }
if ((formVal.aggregationType == 'sum' || formVal.aggregationType == 'avg') && !formVal.fieldY) { if ((formVal.aggregationType == 'sum' || formVal.aggregationType == 'avg') && !formVal.fieldY) {
showErrorMsg('请设置聚合字段'); showErrorMsg('请设置聚合字段');
return; return;
} }
if(formVal.aggregationType == 'count' && !formVal.fieldY){
formVal.fieldY = formVal.fieldX;
} }
return true; return true;
} }