提交 0fb19336 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新视图布局面板逻辑

上级 44980683
<#ibizinclude>
./VIEW_LAYOUTPANEL/VIEW_LAYOUTPANEL_UIACTION/VIEW_LAYOUTPANEL_UIACTION.ftl
</#ibizinclude>
<#ibizinclude>
./VIEW_LAYOUTPANEL/VIEW_LAYOUTPANEL_LOGIC.ftl
</#ibizinclude>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
......@@ -548,6 +551,63 @@ ${P.getCtrlCode('toolbar', 'CONTROL.vue').code}
const {name,value} = args;
this.layoutData[name] = value;
this.layoutModelDetails[name].setData(value);
this.panelLogic(name);
}
/**
* 面板逻辑
*
* @public
* @memberof ${srfclassname('${view.name}')}Base
*/
public panelLogic(name: string): void {
<#list ctrl.getAllPSPanelItems() as panelItem>
<#if panelItem.getPSDEFDGroupLogic('ITEMBLANK')??>
<#assign ITEMBLANK = panelItem.getPSDEFDGroupLogic('ITEMBLANK')/>
if (Object.is(name, '')<#if ITEMBLANK.getRelatedDetailNames()??><#list ITEMBLANK.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = true;
<#if ITEMBLANK.getRelatedDetailNames()??>
<#list ITEMBLANK.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (<@panelLogic ITEMBLANK/>) {
ret = false;
}
this.layoutModelDetails['${panelItem.name}'].required = ret;
}
</#if>
<#if panelItem.getPSDEFDGroupLogic('ITEMENABLE')??>
<#assign ITEMENABLE = panelItem.getPSDEFDGroupLogic('ITEMENABLE')/>
if (Object.is(name, '')<#if ITEMENABLE.getRelatedDetailNames()??><#list ITEMENABLE.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if ITEMENABLE.getRelatedDetailNames()??>
<#list ITEMENABLE.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (<@panelLogic ITEMENABLE/>) {
ret = true;
}
this.layoutModelDetails['${panelItem.name}'].disabled = !ret;
}
</#if>
<#if panelItem.getPSDEFDGroupLogic('PANELVISIBLE')??>
<#assign PANELVISIBLE = panelItem.getPSDEFDGroupLogic('PANELVISIBLE')/>
if (Object.is(name, '')<#if PANELVISIBLE.getRelatedDetailNames()??><#list PANELVISIBLE.getRelatedDetailNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if PANELVISIBLE.getRelatedDetailNames()??>
<#list PANELVISIBLE.getRelatedDetailNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (<@panelLogic PANELVISIBLE/>) {
ret = true;
}
this.layoutModelDetails['${panelItem.name}'].visible = ret;
}
</#if>
</#list>
}
/**
......
<#macro panelLogic item>
<@compress single_line=true>
<#if item.getLogicType() == 'GROUP'>
<#if item.isNotMode()>
!(
</#if>
<#if item.getPSDEFDLogics()??>
<#list item.getPSDEFDLogics() as subLogic>
<#if subLogic_index gt 0>
<#if item.getGroupOP() == 'AND'>
&&
</#if>
<#if item.getGroupOP() == 'OR'>
||
</#if>
</#if>
<@panelLogic subLogic/>
</#list>
</#if>
<#if item.isNotMode()>
)
</#if>
<#elseif item.getLogicType() == 'SINGLE'>
this.$verify.testCond(_${item.getDEFDName()?lower_case}, "${item.getPSDBValueOPId()}", "${item.getValue()}");
</#if>
</@compress>
</#macro>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册