提交 62151c43 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新

上级 eb516c4e
......@@ -210,10 +210,7 @@ import UIService from '@/uiservice/ui-service';
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public layoutItems:any = {
<#list ctrl.getAllPSPanelItems() as panelItem>
<#assign type='ITEMLAYOUT'/>
<#-- <@getLayoutItemModel panelItem type view /> -->
</#list>
<@getLayoutItemModel panelItems=ctrl.getAllPSPanelItems() type='ITEMLAYOUT' view />
};
/**
......@@ -384,18 +381,7 @@ import UIService from '@/uiservice/ui-service';
</#list>
}
/**
* 处理按钮点击
*
* @public
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public handleButtonClick(name: string, $event?: any) {
<@panelButtonActionParam />
<#list ctrl.getAllPSPanelItems() as panelItem>
<@executePanelButtonAction panelItem />
</#list>
}
<@handleButtonClick panelItems=ctrl.getAllPSPanelItems() item=ctrl />
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
<#list ctrl.getPSUIActions() as uiAction>
......
......@@ -103,8 +103,15 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
</#if>
</#macro>
<#-- 面板按钮行为参数 -->
<#macro panelButtonActionParam>
<#-- 处理按钮点击 -->
<#macro handleButtonClick panelItems item>
/**
* 处理按钮点击
*
* @public
* @memberof ${srfclassname('${item.name}')}Base
*/
public handleButtonClick(name: string, $event?: any) {
let datas: any[] = [];
const data: any = this.layoutModelDetails[name].getData();
if (data) {
......@@ -118,10 +125,7 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
const paramJO: any = {};
const contextJO: any = {};
const _this: any = this;
</#macro>
<#-- 执行面板按钮行为 -->
<#macro executePanelButtonAction panelItem>
<#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")>
......@@ -136,10 +140,13 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
</#if>
}
</#if>
</#list>
}
</#macro>
<#-- 获取布局项模型 type-布局项类型('ITEMLAYOUT' | 'VIEWLAYOUT') -->
<#macro getLayoutItemModel panelItem type view>
<#macro getLayoutItemModel panelItems type view>
<#list panelItems as panelItem>
<#assign detail>
name: '${panelItem.getName()}',
type: '${type}',
......@@ -285,4 +292,5 @@ this.$verify.testCond(_${item.getDstModelField()?lower_case}, "${item.getCondOp(
<@compress single_line=true>${panelItem.name}:{ ${detail}<#if panelItem.getPSPanelItems()??>,
details:[<#list panelItem.getPSPanelItems() as childPanelItem>'${childPanelItem.getName()}'<#if childPanelItem_has_next>,</#if></#list>]</#if>}<#if panelItem_has_next>,</#if></@compress>
</#if>
</#list>
</#macro>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册