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

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

@ -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;
} }