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

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

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