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

实体工作流动态操作视图逻辑补充 --- fix3

上级 0cdd5713
......@@ -3,13 +3,14 @@
<card class='view-card view-no-caption view-no-toolbar' :disHover="true" :padding="0" :bordered="false">
<div class="content-container">
<component
:is="formName"
:is="activeForm.name"
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
:loadAction="activeForm.loadAction"
name="form"
ref='form'>
</component>
......
<#assign watch_viewparam_block>
if(this.viewparams && this.viewparams.actionForm){
<#noparse>this.formName = `view_wfform_${this.viewparams.actionForm.toLowerCase()}`;</#noparse>
if(this.viewparams && this.viewparams.actionForm){
this.computeActivedForm(this.viewparams.actionForm);
}else{
this.computeActivedForm();
}
</#assign>
<#assign mounted_block>
this.viewState.next({ tag: "form", action: "load", data: this.viewparams });
this.viewState.next({ tag: "form", action: "load", data: this.viewparams });
</#assign>
<#assign self_content>
/**
* 显示表单名称
* 当前激活表单
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public formName:string = "";
public activeForm:any = {};
/**
* 所有表单
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public allForm:any = {
<#if view.getAllPSControls?? && view.getAllPSControls()??>
<#list view.getAllPSControls() as singleControl>
"${singleControl.getName()}":{name:"view_${singleControl.getName()}",loadAction:"<#if singleControl.getGetPSControlAction()?? && singleControl.getGetPSControlAction().getPSAppDEMethod()??>${singleControl.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"}<#if singleControl_has_next>,</#if>
"${singleControl.getCodeName()}":{name:"view_${singleControl.getName()}",loadAction:"<#if singleControl.getGetPSControlAction()?? && singleControl.getGetPSControlAction().getPSAppDEMethod()??>${singleControl.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"}<#if singleControl_has_next>,</#if>
</#list>
</#if>
};
/**
* 计算激活表单
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public computeActivedForm(inputForm?:string){
if(!inputForm){
this.activeForm = this.allForm;
}
if(this.allForm && Object.keys(this.allForm).length >0){
Object.keys(this.allForm).forEach((name:string) =>{
if(Object.is(name,inputForm)){
this.activeForm = this.allForm[name];
}
})
}
}
/**
* 确认
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册