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

增加状态向导面板

上级 9c1cae78
此差异已折叠。
<#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
<#if ctrl.getPSControlActions()??>
<#list ctrl.getPSControlActions() as action>
<#if action.getPSAppDEMethod?? && action.getPSAppDEMethod()??>
${action.name?lower_case}Action='${action.getPSAppDEMethod().getCodeName()}'
</#if>
</#list>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
.app-wizard {
background: #fff;
height: 100%;
.wizard-steps{
padding: 10px 50px;
border-bottom: 1px solid #ddd;
margin-bottom: 10px;
.el-step__head.is-process{
border-color: #7e8187;
color: #7e8187;
}
.el-step__title.is-process{
color: #7e8187;
}
.el-step__head.is-success{
border-color: #1890ff;
color: #1890ff;
}
.el-step__title.is-success{
color: #1890ff;
}
}
.app-wizard-content{
height: 100%;
overflow-y: auto;
}
.app-wizard-footer {
padding: 10px;
text-align: right;
.ivu-btn {
margin: 0 5px;
}
}
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
public getDataItems(): any[] {
return [
<#-- 主实体所有属性 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.getAllPSAppDEFields?? && appDataEntity.getAllPSAppDEFields()??>
<#list appDataEntity.getAllPSAppDEFields() as defield>
{
<#if defield.isKeyField()>
name: '${appDataEntity.getCodeName()?lower_case}',
prop: '${defield.getCodeName()?lower_case}',
<#else>
name: '${defield.getCodeName()?lower_case}',
prop: '${defield.getCodeName()?lower_case}',
</#if>
},
</#list>
</#if>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
</#if>
]
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
/**
* 初始化向导
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public init(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 向导结束
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public finish(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=STATEWIZARDPANEL
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_STATEWIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL-BASE.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_STATEWIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_STATEWIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('SERVICE.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_STATEWIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL.less').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_STATEWIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册