Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
22
议题
22
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7
提交
e738cc93
提交
e738cc93
编写于
6月 30, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整状态向导面板 --- fix3
上级
a1fff56d
变更
1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
59 行增加
和
18 行删除
+59
-18
CONTROL-BASE.vue.ftl
@CONTROL/状态向导面板/CONTROL-BASE.vue.ftl
+59
-18
未找到文件。
@CONTROL/状态向导面板/CONTROL-BASE.vue.ftl
浏览文件 @
e738cc93
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<#list ctrl.getPSDEWizard().getPSDEWizardSteps() as step>
<#list ctrl.getPSDEWizard().getPSDEWizardSteps() as step>
<el-step>
<el-step>
<template v-slot:title>
<template v-slot:title>
<div v-popover:<@getStepForm ctrlmodel=ctrl step=step />_popover>${step.getTitle()}</div>
<div v-popover:<@getStepForm ctrlmodel=ctrl step=step />_popover
@click="hanleClick('<@getStepForm ctrlmodel=ctrl step=step />')"
>${step.getTitle()}</div>
</template>
</template>
</el-step>
</el-step>
</#list>
</#list>
...
@@ -27,12 +27,12 @@
...
@@ -27,12 +27,12 @@
<#if ctrl.getPSDEEditForms()??>
<#if ctrl.getPSDEEditForms()??>
<#list ctrl.getPSDEEditForms() as form>
<#list ctrl.getPSDEEditForms() as form>
<#assign handler = form.getPSAjaxControlHandler() />
<#assign handler = form.getPSAjaxControlHandler() />
<el-popover
v-if="activeForm === '${form.getName()}'"
ref="${form.getName()}_popover" popper-class="app-wizard-popover-container" placement="bottom-start" trigger="click">
<el-popover ref="${form.getName()}_popover" popper-class="app-wizard-popover-container" placement="bottom-start" trigger="click">
<div class="app-wizard-container">
<div class="app-wizard-container">
<div class="app-wizard-header">
<div class="app-wizard-header">
<div class="app-wizard-header-extra">
<div class="app-wizard-header-extra">
<Icon type="md-open" size="18" @click="handleOPen"/>
<Icon type="md-open" size="18" @click="handleOPen"/>
<Icon type="md-close" size="18" @click="handleClose"/>
<Icon type="md-close" size="18" @click="handleClose
('${form.getName()}')
"/>
</div>
</div>
</div>
</div>
<div class="app-wizard-content">
<div class="app-wizard-content">
...
@@ -54,9 +54,9 @@
...
@@ -54,9 +54,9 @@
</view_${form.getName()}>
</view_${form.getName()}>
</div>
</div>
<div class="app-wizard-footer">
<div class="app-wizard-footer">
<i-button size="small"
:disabled="isDisabled(
'PREV')" @click="onClickPrev()" type="primary">上一步</i-button>
<i-button size="small"
v-if="isVisiable('${form.name}',
'PREV')" @click="onClickPrev()" type="primary">上一步</i-button>
<i-button size="small"
:disabled="isDisabled(
'NEXT')" @click="onClickNext()" type="primary">下一步</i-button>
<i-button size="small"
v-if="isVisiable('${form.name}',
'NEXT')" @click="onClickNext()" type="primary">下一步</i-button>
<i-button size="small"
:disabled="isDisabled(
'FINISH')" @click="onClickFinish()" type="primary">完成</i-button>
<i-button size="small"
v-if="isVisiable('${form.name}',
'FINISH')" @click="onClickFinish()" type="primary">完成</i-button>
</div>
</div>
</div>
</div>
</el-popover>
</el-popover>
...
@@ -179,6 +179,14 @@
...
@@ -179,6 +179,14 @@
*/
*/
public stepTags: any = {};
public stepTags: any = {};
/**
* 步骤是否显示集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public stepVisiable:any = {};
/**
/**
* 向导表单集合
* 向导表单集合
*
*
...
@@ -248,6 +256,7 @@
...
@@ -248,6 +256,7 @@
public regFormAction(name: string, actions: Array<string>,stepTag:any) {
public regFormAction(name: string, actions: Array<string>,stepTag:any) {
this.stepActions[name] = actions;
this.stepActions[name] = actions;
this.stepTags[name] = stepTag;
this.stepTags[name] = stepTag;
this.stepVisiable[name] = false;
this.wizardForms.push(name);
this.wizardForms.push(name);
}
}
...
@@ -258,10 +267,26 @@
...
@@ -258,10 +267,26 @@
*/
*/
public computedActiveForm(data:any){
public computedActiveForm(data:any){
if(data[this.stateField]){
if(data[this.stateField]){
if(Object.keys(this.stepTags).length >0){
Object.keys(this.stepTags).forEach((name:string) =>{
if(this.stepTags[name] === data[this.stateField]){
this.activeForm = name;
}
})
}
if(!this.activeForm){
this.activeForm = this.firstForm;
}
}else{
this.activeForm = this.firstForm;
}
}
if(this.activeForm) {
if(this.activeForm) {
this.historyForms.push(this.activeForm);
let index = this.wizardForms.indexOf(this.activeForm);
this.wizardForms.forEach((item:any,inx:number) =>{
if(inx <= index){
this.historyForms.push(item);
}
})
}
}
}
}
...
@@ -282,7 +307,7 @@
...
@@ -282,7 +307,7 @@
if(response.data.${ctrl.getPSAppDataEntity().getCodeName()?lower_case}){
if(response.data.${ctrl.getPSAppDataEntity().getCodeName()?lower_case}){
Object.assign(this.context,{${ctrl.getPSAppDataEntity().getCodeName()?lower_case}:response.data.${ctrl.getPSAppDataEntity().getCodeName()?lower_case}})
Object.assign(this.context,{${ctrl.getPSAppDataEntity().getCodeName()?lower_case}:response.data.${ctrl.getPSAppDataEntity().getCodeName()?lower_case}})
}
}
this.
formLoad(
);
this.
computedActiveForm(response.data
);
}
}
}).catch((response: any) => {
}).catch((response: any) => {
if (response && response.status === 401) {
if (response && response.status === 401) {
...
@@ -381,8 +406,25 @@
...
@@ -381,8 +406,25 @@
*
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
*/
public handleClose(){
public handleClose(name:string){
this.activeForm = "";
this.stepVisiable[name] = false;
}
/**
* 导航条点击事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public hanleClick(name:string){
let activeIndex:number = this.wizardForms.indexOf(this.activeForm);
let curIndex:number = this.wizardForms.indexOf(name);
if(curIndex > activeIndex){
return;
}
this.stepVisiable[name] = !this.stepVisiable[name];
if(this.stepVisiable[name]){
this.formLoad();
}
}
}
/**
/**
...
@@ -457,19 +499,18 @@
...
@@ -457,19 +499,18 @@
}
}
/**
/**
* 是否
禁用
* 是否
显示
*
*
* @param {string} type
* @memberof ${srfclassname('${ctrl.codeName}')}Base
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
*/
public is
Disabled(
type: string) {
public is
Visiable(name:string,
type: string) {
const actions: Array<string> = this.stepActions[
this.activeForm]
const actions: Array<string> = this.stepActions[
name];
if(actions && actions.indexOf(type)
< 0
) {
if(actions && actions.indexOf(type)
!== -1
) {
return true;
return true;
}
}
else{
return false;
return false;
}
}
}
<#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录