提交 ceace172 编写于 作者: tony001's avatar tony001

填充图表数据查询的参数---fix1

上级 3a64e243
......@@ -264,7 +264,16 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams});
Object.assign(arg,{viewparams:this.viewparams,page:0,size:1000});
<#if ctrl.getPSDEDataSet()??>
<#assign appDataSet = ctrl.getPSDEDataSet() />
<#if appDataSet.getMajorSortDir()?? && appDataSet.getMajorSortPSDEField()??>
Object.assign(arg,{sort: '${appDataSet.getMajorSortPSDEField().getCodeName()?lower_case},${appDataSet.getMajorSortDir()?lower_case}'});
</#if>
<#if appDataSet.getPageSize()??>
Object.assign(arg,{size:${appDataSet.getPageSize()}});
</#if>
</#if>
this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)),arg,this.showBusyIndicator).then((res) => {
if (res) {
this.transformToBasicChartSetData(res.data,() =>{_this.drawCharts()});
......
......@@ -10,10 +10,22 @@
*/
public getDataItems(): any[] {
return [
{
name:'query',
prop:'query'
},
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
}
]
}
......
......@@ -17,15 +17,6 @@
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
<#if ctrl.getPSDEDataSet()??>
<#assign appDataSet = ctrl.getPSDEDataSet() />
<#if appDataSet.getMajorSortDir()?? && appDataSet.getMajorSortPSDEField()??>
{sort: '${appDataSet.getMajorSortPSDEField().getCodeName()?lower_case},${appDataSet.getMajorSortDir()?lower_case}'}
</#if>
<#if appDataSet.getPageSize()??>
{size:${appDataSet.getPageSize()}}
</#if>
</#if>
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册