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

调整状态向导面板 --- fix7

上级 0700b117
......@@ -378,11 +378,15 @@
public ${ctrl.name}_formsave(args: any, name: string, $event2?: any) {
Object.assign(this.formParam, args);
if(Object.is(this.curState, 'NEXT')) {
if(this.historyForms.indexOf(name) === -1){
this.historyForms.push(name);
if (this.getNextForm()) {
this.activeForm = this.getNextForm();
}
this.setPopVisiable(name,false);
if (this.getNextForm(name)) {
let nextForm:any = this.getNextForm(name);
this.setPopVisiable(nextForm,true);
setTimeout(() => {
this.formLoad(this.activeForm);
this.formLoad(nextForm);
}, 1);
} else {
this.doFinish();
......@@ -407,8 +411,17 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleClose(name:string){
this.stepVisiable[name] = false;
(this.$refs[name+'_popover'] as any).showPopper = false;
this.setPopVisiable(name,false);
}
/**
* 设置popover是否显示
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public setPopVisiable(name:string,isVisiable:boolean){
this.stepVisiable[name] = isVisiable;
(this.$refs[name+'_popover'] as any).showPopper = isVisiable;
}
/**
......@@ -436,8 +449,8 @@
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getNextForm() {
let index = this.wizardForms.indexOf(this.activeForm);
public getNextForm(name:string) {
let index = this.wizardForms.indexOf(name);
if(index >= 0) {
if(this.wizardForms[index + 1]) {
return this.wizardForms[index + 1];
......@@ -457,7 +470,9 @@
if(length > 1) {
this.curState = 'PREV';
let curIndex:number = this.historyForms.indexOf(name);
this.setPopVisiable(name,false);
setTimeout(() => {
this.setPopVisiable(this.historyForms[curIndex - 1],true);
this.formLoad(this.historyForms[curIndex - 1]);
}, 1);
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册