提交 fa16a034 编写于 作者: KK's avatar KK

地图部件服务

上级 4339debc
...@@ -4,20 +4,37 @@ ...@@ -4,20 +4,37 @@
</#ibizinclude> </#ibizinclude>
public async search(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
let response: HttpResponse;
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??> <#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem> <#list ctrl.getPSSysMapItems() as mapitem>
<#if mapitem.getPSAppDEDataSet?? && mapitem.getPSAppDEDataSet()??> <#if mapitem.getPSAppDEDataSet?? && mapitem.getPSAppDEDataSet()??>
const ${mapitem.getName()}Data = await this.${mapitem.getName()}_${mapitem.getPSAppDEDataSet().getCodeName()}(data);
</#if>
</#list>
</#if>
Object.assign(response.data,<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??><#list ctrl.getPSSysMapItems() as mapitem><#if mapitem.getPSAppDEDataSet?? && mapitem.getPSAppDEDataSet()??>{${mapitem.getName()}:${mapitem.getName()}Data}<#if mapitem_has_next>,</#if></#if></#list></#if>)
return response;
}
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem>
<#if mapitem.getPSAppDEDataSet?? && mapitem.getPSAppDEDataSet()?? >
public async ${mapitem.getName()}_${mapitem.getPSAppDEDataSet().getCodeName()}(data:any){ public async ${mapitem.getName()}_${mapitem.getPSAppDEDataSet().getCodeName()}(data:any){
const service: any = await this.getService('<#if mapitem.getPSDataEntity?? && mapitem.getPSDataEntity()??>${mapitem.getPSDataEntity().getName()}</#if>'); const service: any = await this.getService('<#if mapitem.getPSDataEntity?? && mapitem.getPSDataEntity()??>${mapitem.getPSDataEntity().getName()?lower_case}</#if>');
if(service){
const response: any await service.${mapitem.getPSAppDEDataSet().getCodeName()}(data);
if(!response.isError()){
return response
}
}
return []; return [];
} }
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#ibizinclude> <#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl ../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册