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

视图面板参数及处理

上级 505204cb
......@@ -9,6 +9,8 @@
:_context="JSON.stringify(context)"
:_viewparams="JSON.stringify(viewparams)"
:viewDefaultUsage="false" >
:panelNavParam="panelNavParam"
:panelNavContext="panelNavContext"
</${srffilepath2(embedddevedview.getCodeName())}></#if>
</div>
</#if>
......
<#ibizinclude>../../@NAVPARAMS/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#assign content>
panelNavParam= '<@getNavigateParams ctrl />'
panelNavContext= '<@getNavigateContext ctrl />'
:panelNavParam= '<@getNavigateParams ctrl />'
:panelNavContext= '<@getNavigateContext ctrl />'
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
......
......@@ -118,6 +118,22 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
*/
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}
*/
protected parseViewParam(): void {
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 }
}
<#-- 移动端参数:BEGIN -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册