提交 8a572da1 编写于 作者: tony001's avatar tony001

选择面板导航参数处理---fix1

上级 13cc018e
......@@ -176,6 +176,7 @@ import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.code
* @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)) {
......@@ -190,6 +191,25 @@ import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.code
}
}
/**
* 初始化导航参数
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public initNavParam(){
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);
}
/**
* vue 生命周期
*
......
<#-- content -->
<#assign content>
<view_${ctrl.getName()}
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
name="${ctrl.name}"
ref='${ctrl.name}'
<#if ctrl.getHookEventNames()??>
<#list ctrl.getHookEventNames() as eventName>
@${eventName?lower_case}="${ctrl.name}_${eventName?lower_case}($event)"
</#list>
</#if>
@closeview="closeView($event)">
</view_${ctrl.getName()}>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册