提交 2daa1904 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新

上级 ad9dda84
......@@ -117,6 +117,44 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
</#if>
</#list>
}
/**
* 处理按钮点击
*
* @public
* @memberof ${srfclassname('${item.name}')}Base
*/
public handleButtonClick(name: string, $event?: any) {
let datas: any[] = [];
const data: any = this.layoutModelDetails[name].getData();
if (data) {
if (data instanceof Array) {
datas = [...data];
} else {
datas = [data];
}
}
const xData: any = this.layoutModelDetails[name].getDataArea();
const paramJO: any = {};
const contextJO: any = {};
const _this: any = this;
<#list panelItems as panelItem>
<#if panelItem.getItemType() == 'BUTTON' && panelItem.getPSUIAction?? && panelItem.getPSUIAction()??>
if (Object.is(name, '${panelItem.name}')) {
<#if panelItem.getPSUIAction().getPSAppDataEntity?? && panelItem.getPSUIAction().getPSAppDataEntity()?? && panelItem.getPSUIAction().getUIActionMode()?? && (panelItem.getPSUIAction().getUIActionMode() == "FRONT" || panelItem.getPSUIAction().getUIActionMode() == "BACKEND" || panelItem.getPSUIAction().getUIActionMode() == "WFFRONT" || panelItem.getPSUIAction().getUIActionMode() == "WFBACKEND")>
<#assign curAppEntity = panelItem.getPSUIAction().getPSAppDataEntity() />
window.uiServiceRegister.getService('${curAppEntity.getCodeName()?lower_case}').then((UIService: any) => {
if (UIService && UIService[`${panelItem.getPSUIAction().getFullCodeName()}`] && UIService[`${panelItem.getPSUIAction().getFullCodeName()}`] instanceof Function) {
UIService[`${panelItem.getPSUIAction().getFullCodeName()}`](datas, contextJO, paramJO, $event, xData, this, undefined);
}
})
<#else>
_this.${panelItem.getPSUIAction().getFullCodeName()}(datas, contextJO, paramJO, $event, xData, this, undefined);
</#if>
}
</#if>
</#list>
}
</#macro>
<#-- 处理按钮点击 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册