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

处理表格导航视图导航数据

上级 00dae9c0
...@@ -20,4 +20,26 @@ ...@@ -20,4 +20,26 @@
</#if> </#if>
</#list> </#list>
</#if> </#if>
</#macro>
<#-- 获取导航上下文 -->
<#macro getNavigateContext currentItem>
{<#t>
<#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><#t>
</#list>
</#if>
}<#t>
</#macro>
<#-- 获取导航参数 -->
<#macro getNavigateParams currentItem>
{<#t>
<#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><#t>
</#list>
</#if>
}<#t>
</#macro> </#macro>
\ No newline at end of file
...@@ -17,27 +17,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -17,27 +17,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl ../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude> </#ibizinclude>
<#-- 获取树节点导航上下文 --> <#ibizinclude>
<#macro getNavigateContext currentItem> ../@MACRO/FUNC/MACRO.ftl
{<#t> </#ibizinclude>
<#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><#t>
</#list>
</#if>
}<#t>
</#macro>
<#-- 获取树节点导航参数 -->
<#macro getNavigateParams currentItem>
{<#t>
<#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><#t>
</#list>
</#if>
}<#t>
</#macro>
<#-- 获取树节点关系导航上下文 --> <#-- 获取树节点关系导航上下文 -->
<#macro getNavContext nodeRs> <#macro getNavContext nodeRs>
...@@ -571,7 +553,7 @@ ${navParam.getKey()}:<#if navParam.isRawValue()?? && navParam.isRawValue() == tr ...@@ -571,7 +553,7 @@ ${navParam.getKey()}:<#if navParam.isRawValue()?? && navParam.isRawValue() == tr
<#if node.getNavFilter()??> <#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" }); Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if> </#if>
Object.assign(treeNode, { curData: entity }); Object.assign(treeNode, { curData: entity });
<#if node.getPSNavigateContexts?? && node.getPSNavigateContexts()??> <#if node.getPSNavigateContexts?? && node.getPSNavigateContexts()??>
Object.assign(treeNode, {navigateContext: <@getNavigateContext node /> }); Object.assign(treeNode, {navigateContext: <@getNavigateContext node /> });
</#if> </#if>
......
...@@ -56,6 +56,10 @@ ...@@ -56,6 +56,10 @@
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#ibizinclude>
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??> <#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic> <#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'> <#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
...@@ -341,6 +345,12 @@ ...@@ -341,6 +345,12 @@
Object.assign(data,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']}); Object.assign(data,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']});
Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']}); Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']});
</#if> </#if>
<#if xDataControl.getPSNavigateContexts?? && xDataControl.getPSNavigateContexts()??>
let tempNavigateContext:any = <@getNavigateContext xDataControl />;
</#if>
<#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??>
let tempNavigateParams:any = <@getNavigateParams xDataControl />;
</#if>
</#if> </#if>
this.selection = {}; this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data }); Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册