提交 71aefad2 编写于 作者: tony001's avatar tony001

调整分页视图面板导航参数 --- fix1

上级 fbec24d2
......@@ -3,8 +3,8 @@
<#if ctrl.getEmbeddedPSAppDEView()??><#assign embedddevedview = ctrl.getEmbeddedPSAppDEView()>
<${srffilepath2(embedddevedview.getCodeName())}
class='viewcontainer2'
:viewdata="JSON.stringify(context)"
:viewparam="JSON.stringify(getNavViewParams())"
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false" >
</${srffilepath2(embedddevedview.getCodeName())}></#if>
......@@ -62,6 +62,22 @@
*/
public localViewParam: any = <#if ctrl.getPSNavigateParams?? && ctrl.getPSNavigateParams()??><@getNavigateParams ctrl /><#else>null</#if>;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
......@@ -86,6 +102,7 @@
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
......@@ -105,18 +122,24 @@
}
/**
* 传入导航视图参数
* 初始化导航参数
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getNavViewParams(){
if(Object.is(this.navfilter,"")){
return this.viewparams;
}else{
let tempViewParams:any = JSON.parse(JSON.stringify(this.viewparams));
Object.assign(tempViewParams,{[this.navfilter]:this.context['${ctrl.getPSAppDataEntity().getCodeName()?lower_case}']});
return tempViewParams;
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册