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

调整状态向导面板

上级 4430b89d
......@@ -17,7 +17,7 @@
<#if ctrl.getPSDEWizard?? && ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardSteps?? && ctrl.getPSDEWizard().getPSDEWizardSteps()??>
<div class="view-steps">
<div class="background-box"></div>
<div class="steps_icon" @click="onClickPrev(activeForm)"><i class="el-icon-arrow-left"></i></div>
<div class="steps_icon" @click="handleClick('PRE')"><i class="el-icon-arrow-left"></i></div>
<el-steps class="wizard-steps" :active="(wizardForms.indexOf(activeForm) + 1)" finish-status="success">
<#list ctrl.getPSDEWizard().getPSDEWizardSteps() as step>
<el-step :class="{'app-active-step':activeForm==='<@getStepForm ctrlmodel=ctrl step=step />'?true:false}">
......@@ -29,7 +29,7 @@
</el-step>
</#list>
</el-steps>
<div class="steps_icon" @click="onClickNext(activeForm)"><i class="el-icon-arrow-right"></i></div>
<div class="steps_icon" @click="handleClick('NEXT')"><i class="el-icon-arrow-right"></i></div>
</div>
<#if ctrl.getPSDEEditForms()??>
<#list ctrl.getPSDEEditForms() as form>
......@@ -173,6 +173,14 @@
*/
public stateField: string = '${ctrl.getStatePSAppDEField().getCodeName()?lower_case}';
/**
* 当前显示表单
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public curShow:string ="";
/**
* 向导表单参数
*
......@@ -461,6 +469,9 @@
public setPopVisiable(name:string,isVisiable:boolean){
this.stepVisiable[name] = isVisiable;
(this.$refs[name+'_popover'] as any).showPopper = isVisiable;
if(isVisiable){
this.curShow = name;
}
}
/**
......@@ -479,6 +490,7 @@
}
this.stepVisiable[name] = !this.stepVisiable[name];
if(this.stepVisiable[name]){
this.curShow = name;
this.formLoad(name);
}
}
......@@ -555,6 +567,29 @@
}
}
/**
* 左右两侧点击事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleClick(mode:string){
let curIndex:number = this.wizardForms.indexOf(this.curShow);
if(Object.is(mode,"PRE") && (curIndex !== 0)){
this.setPopVisiable(this.wizardForms[curIndex],false);
setTimeout(() => {
this.setPopVisiable(this.wizardForms[curIndex-1],true);
this.formLoad(this.wizardForms[curIndex-1]);
}, 0);
}
if(Object.is(mode,"NEXT") && (curIndex < (this.wizardForms.length - 1) && this.historyForms.includes(this.wizardForms[curIndex+1]))){
this.setPopVisiable(this.wizardForms[curIndex],false);
setTimeout(() => {
this.setPopVisiable(this.wizardForms[curIndex+1],true);
this.formLoad(this.wizardForms[curIndex+1]);
}, 0);
}
}
/**
* 是否显示
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册