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

update:更新

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