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

树部件导航数据处理

上级 3bb405b4
......@@ -17,6 +17,30 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#-- 获取树节点导航上下文 -->
<#macro getNavigateContext currentItem>
<#compress>
{
<#if currentItem.getPSNavigateContexts?? && currentItem.getPSNavigateContexts()??>
<#list currentItem.getPSNavigateContexts() as navContext>
${navContext.getKey()}:<#if navContext.isRawValue()?? && navContext.isRawValue() == true>"${navContext.getValue()}"<#else>"%${navContext.getValue()}%"</#if><#if navContext_has_next>,</#if>
</#list>
</#if>
}
</#compress>
</#macro>
<#-- 获取树节点导航参数 -->
<#macro getNavigateParams currentItem>
{
<#if currentItem.getPSNavigateParams?? && currentItem.getPSNavigateParams()??>
<#list currentItem.getPSNavigateParams() as navParam >
${navParam.getKey()}:<#if navParam.isRawValue()?? && navParam.isRawValue() == true>"${navParam.getValue()}"<#else>"%${navParam.getValue()}%"</#if><#if navParam_has_next>,</#if>
</#list>
</#if>
}
</#macro>
<#-- 获取树节点关系导航上下文 -->
<#macro getNavContext nodeRs>
<#compress>
......@@ -280,8 +304,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() != "">
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' });
<#if node.getPSNavigateContexts?? && node.getPSNavigateContexts()??>
Object.assign(treeNode, {navigateContext: '${node.getPSNavigateContexts()}' });
</#if>
<#if node.getPSNavigateParams?? && node.getPSNavigateParams()??>
Object.assign(treeNode, {navigateParams: '${node.getPSNavigateParams()}' });
</#if>
<#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey });
......@@ -346,8 +373,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if node.getNavFilter()??>
Object.assign(item, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() !="">
Object.assign(item, { navparams: '${node.getNavViewParam()}' });
<#if node.getPSNavigateContexts?? && node.getPSNavigateContexts()??>
Object.assign(treeNode, {navigateContext: '${node.getPSNavigateContexts()}' });
</#if>
<#if node.getPSNavigateParams?? && node.getPSNavigateParams()??>
Object.assign(treeNode, {navigateParams: '${node.getPSNavigateParams()}' });
</#if>
<#-- 补充nodeid和nodeid2 -->
Object.assign(item, { nodeid: item.srfkey });
......@@ -412,8 +442,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() !="">
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' });
<#if node.getPSNavigateContexts?? && node.getPSNavigateContexts()??>
Object.assign(treeNode, {navigateContext: '${node.getPSNavigateContexts()}' });
</#if>
<#if node.getPSNavigateParams?? && node.getPSNavigateParams()??>
Object.assign(treeNode, {navigateParams: '${node.getPSNavigateParams()}' });
</#if>
if(item.children && item.children.length >0){
Object.assign(treeNode, { children: item.children });
......@@ -540,8 +573,11 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() != "">
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' });
<#if node.getPSNavigateContexts?? && node.getPSNavigateContexts()??>
Object.assign(treeNode, {navigateContext: '${node.getPSNavigateContexts()}' });
</#if>
<#if node.getPSNavigateParams?? && node.getPSNavigateParams()??>
Object.assign(treeNode, {navigateParams: '${node.getPSNavigateParams()}' });
</#if>
<#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册