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

视图面板参数及处理

上级 505204cb
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
:_context="JSON.stringify(context)" :_context="JSON.stringify(context)"
:_viewparams="JSON.stringify(viewparams)" :_viewparams="JSON.stringify(viewparams)"
:viewDefaultUsage="false" > :viewDefaultUsage="false" >
:panelNavParam="panelNavParam"
:panelNavContext="panelNavContext"
</${srffilepath2(embedddevedview.getCodeName())}></#if> </${srffilepath2(embedddevedview.getCodeName())}></#if>
</div> </div>
</#if> </#if>
......
<#ibizinclude>../../@NAVPARAMS/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../../@NAVPARAMS/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#assign content> <#assign content>
panelNavParam= '<@getNavigateParams ctrl />' :panelNavParam= '<@getNavigateParams ctrl />'
panelNavContext= '<@getNavigateContext ctrl />' :panelNavContext= '<@getNavigateContext ctrl />'
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl ../@MACRO/HTML/DEFAULT.html.ftl
......
...@@ -117,6 +117,22 @@ export default class ${srfclassname('${view.name}')}Base extends Vue { ...@@ -117,6 +117,22 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
protected navParam: any = {<#if view.getPSAppViewNavParams?? && view.getPSAppViewNavParams()??> <#list view.getPSAppViewNavParams() as param>'${param.getKey()?lower_case}': '<#if param.isRawValue()>${param.getValue()}<#else>%${param.getValue()}%</#if>'<#if param_has_next>, </#if></#list> </#if>}; protected navParam: any = {<#if view.getPSAppViewNavParams?? && view.getPSAppViewNavParams()??> <#list view.getPSAppViewNavParams() as param>'${param.getKey()?lower_case}': '<#if param.isRawValue()>${param.getValue()}<#else>%${param.getValue()}%</#if>'<#if param_has_next>, </#if></#list> </#if>};
/**
* 面板导航参数
*
* @type {*}
* @memberof ${srfclassname('${view.name}')}Base
*/
@Prop({ default: {} }) protected panelNavParam?: any;
/**
* 面板导航上下文
*
* @type {*}
* @memberof ${srfclassname('${view.name}')}Base
*/
@Prop({ default: {} }) protected panelNavContext?: any;
/** /**
* 视图模型数据 * 视图模型数据
...@@ -209,7 +225,8 @@ ${P.getCtrlCode(ctrl, 'CONTROL.vue').code} ...@@ -209,7 +225,8 @@ ${P.getCtrlCode(ctrl, 'CONTROL.vue').code}
*/ */
protected parseViewParam(): void { protected parseViewParam(): void {
const { context, viewparams } = this.$viewTool.parseViewData(this, ${view.isPSDEView()?c}); const { context, viewparams } = this.$viewTool.parseViewData(this, ${view.isPSDEView()?c});
this.context = { ...this.context, ...context }; const { context:navContext, param: navParam } = this.$viewTool.formatNavigateParam({ context: this.panelNavContext, param: this.panelNavParam }, this.context, this.viewparams, {});
this.context = { ...this.context, ...context, ...navContext };
this.viewparams = { ...this.viewparams, ...viewparams } this.viewparams = { ...this.viewparams, ...viewparams }
} }
<#-- 移动端参数:BEGIN --> <#-- 移动端参数:BEGIN -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册