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