提交 032c8bb7 编写于 作者: zcdtk's avatar zcdtk

Merge remote-tracking branch 'core/dev' into dev

......@@ -37,38 +37,30 @@
*/
public async search(itemType: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
let item: any = {};
let action: string = '';
data = this.handleRequestData('', context, data);
await this.onBeforeAction('', context, data, isLoading);
this.model.itemType = itemType;
try {
switch (itemType) {
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendarItem>
item = {
<#list ctrl.getPSSysCalendarItems() as calendarItem>
<#if calendarItem.getPSAppDataEntity()?? && calendarItem.getPSDEDataSet()??>
<#assign _appde = calendarItem.getPSAppDataEntity() />
<#assign deDataSet = calendarItem.getPSDEDataSet() />
case "${calendarItem.getItemType()?lower_case}":
action = 'Fetch${deDataSet.getCodeName()}';
data = this.handleRequestData(action, context, data);
await this.onBeforeAction(action, context, data, isLoading);
<#if _appde.getId() == appde.getId()>
item = {
...{ ${calendarItem.getItemType()?lower_case}: await this.loadDEDataSet(action, context, data, '${calendarItem.getItemType()?lower_case}') },
};
...{ ${calendarItem.getItemType()?lower_case}: await this.loadDEDataSet('Fetch${deDataSet.getCodeName()}', context, data, '${calendarItem.getItemType()?lower_case}') },
<#else>
item = {
...{ ${calendarItem.getItemType()?lower_case}: await this.loadDEDataSet(action, context, data, '${calendarItem.getItemType()?lower_case}', '${_appde.getCodeName()?lower_case}') },
};
...{ ${calendarItem.getItemType()?lower_case}: await this.loadDEDataSet('Fetch${deDataSet.getCodeName()}', context, data, '${calendarItem.getItemType()?lower_case}') },
</#if>
break;
</#if>
</#list>
</#if>
</#list>
};
</#if>
} catch (response) {
await this.onAfterAction(action, context, response);
await this.onAfterAction('', context, response);
return new HttpResponse(response.status);
}
await this.onAfterAction(action, context);
await this.onAfterAction('', context);
return new HttpResponse(200, item);
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册