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