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

多数据面板导航参数

上级 3ad9c282
......@@ -3,8 +3,8 @@
<component
v-if="inited && view.viewname && !Object.is(view.viewname, '')"
:is="view.viewname"
:_context="JSON.stringify(context)"
:_viewparams="JSON.stringify(viewparams)"
:_context="JSON.stringify(_context)"
:_viewparams="JSON.stringify(_viewparams)"
:viewDefaultUsage="false"
:isSingleSelect="isSingleSelect"
:isShowButtons="isShowButtons"
......
<#ibizinclude>../../@NAVPARAMS/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#ibizinclude>
./CONTROL-BASE.template.ftl
</#ibizinclude>
......@@ -5,6 +6,38 @@
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 面板导航参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public panelNavParam= <@getNavigateParams ctrl />;
/**
* 面板导航上下文
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public panelNavContext= <@getNavigateContext ctrl />;
/**
* 应用上下文
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public _context: any;
/**
* 视图参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public _viewparams: any;
/**
* 获取多项数据
......@@ -114,6 +147,7 @@
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected afterCreated(){
this.parsePanelParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
......@@ -127,6 +161,17 @@
}
}
/**
* 解析面板导航参数
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected parsePanelParam(){
const { context: navContext, param: navParam } = this.$viewTool.formatNavigateParam({ context: this.panelNavContext, param: this.panelNavParam }, this.context, this.viewparams, {});
this._context = { ...this.context, ...navContext };
this._viewparams = { ...this.viewparams, ...navParam };
}
/**
* vue 生命周期
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册