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

地图加载逻辑调整 --fix8

上级 c1fcfaa3
...@@ -2,43 +2,6 @@ ...@@ -2,43 +2,6 @@
<#ibizinclude> <#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl ../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude> </#ibizinclude>
public async search(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem>
<#if mapitem.getPSAppDEDataSet?? && mapitem.getPSAppDEDataSet()??>
const ${mapitem.getName()}Data = await this.${mapitem.getName()}_${mapitem.getPSAppDEDataSet().getCodeName()}(data);
</#if>
</#list>
</#if>
let responseData = {
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??><#list ctrl.getPSSysMapItems() as mapitem><#if mapitem.getPSAppDEDataSet?? && mapitem.getPSAppDEDataSet()??>${mapitem.getName()}:${mapitem.getName()}Data.data<#if mapitem_has_next>,</#if></#if></#list></#if>
}
let response = new HttpResponse(200,responseData);
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){
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 [];
}
</#if>
</#list>
</#if>
/** /**
* 地图项配置集合 * 地图项配置集合
* *
...@@ -53,7 +16,7 @@ ...@@ -53,7 +16,7 @@
'${mapItem.getItemType()?lower_case}': { '${mapItem.getItemType()?lower_case}': {
itemName : '${mapItem.getName()}', itemName : '${mapItem.getName()}',
itemType : '${mapItem.getItemType()?lower_case}', itemType : '${mapItem.getItemType()?lower_case}',
} },
</#if> </#if>
</#list> </#list>
</#if> </#if>
...@@ -69,7 +32,7 @@ ...@@ -69,7 +32,7 @@
* @returns {Promise<HttpResponse>} * @returns {Promise<HttpResponse>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service * @memberof ${srfclassname('${ctrl.codeName}')}Service
*/ */
public async search2(itemType: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> { public async search(itemType: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
let item: any = {}; let item: any = {};
try { try {
<#if ctrl.getPSSysMapItems()??> <#if ctrl.getPSSysMapItems()??>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册