提交 8941e91f 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新

上级 03281470
...@@ -495,7 +495,7 @@ import UIService from '@/uiservice/ui-service'; ...@@ -495,7 +495,7 @@ import UIService from '@/uiservice/ui-service';
this.data[name] = value; this.data[name] = value;
this.layoutData[name] = value; this.layoutData[name] = value;
this.layoutModelDetails[name].setData(value); this.layoutModelDetails[name].setData(value);
this.panelLogic(name); this.panelLogic(name, index);
this.panelEditItemChange(this.data, name, value); this.panelEditItemChange(this.data, name, value);
} }
...@@ -530,9 +530,83 @@ import UIService from '@/uiservice/ui-service'; ...@@ -530,9 +530,83 @@ import UIService from '@/uiservice/ui-service';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public panelLogic(name: string, index?: number): void { public panelLogic(name: string, index?: number): void {
<#if P.getPartCode(item,'PANEL_LOGIC').code?length gt 0> if (name && (index || index === 0)) {
${P.getPartCode(item,'PANEL_LOGIC').code} <#noparse>name = name.replace(`_${index}`,"");</#noparse>
}
<#list ctrl.getAllPSPanelItems() as panelItem>
<#if panelItem.getPSPanelItemGroupLogic('ITEMBLANK')??>
<#assign ITEMBLANK = panelItem.getPSPanelItemGroupLogic('ITEMBLANK')/>
if (Object.is(name, '')<#if ITEMBLANK.getRelatedItemNames()??><#list ITEMBLANK.getRelatedItemNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = true;
<#if ITEMBLANK.getRelatedItemNames()??>
<#list ITEMBLANK.getRelatedItemNames() as detailName>
let _${detailName} = '';
if (index || index === 0) {
_${detailName} = this.layoutData[`${detailName}<#noparse>_${index}</#noparse>`];
} else {
_${detailName} = this.layoutData['${detailName}'];
}
</#list>
</#if> </#if>
if (<@panelLogic ITEMBLANK/>) {
ret = false;
}
if (index || index === 0) {
this.layoutModelDetails[`${panelItem.name}<#noparse>_${index}</#noparse>`].required = ret;
} else {
this.layoutModelDetails['${panelItem.name}'].required = ret;
}
}
</#if>
<#if panelItem.getPSPanelItemGroupLogic('ITEMENABLE')??>
<#assign ITEMENABLE = panelItem.getPSPanelItemGroupLogic('ITEMENABLE')/>
if (Object.is(name, '')<#if ITEMENABLE.getRelatedItemNames()??><#list ITEMENABLE.getRelatedItemNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if ITEMENABLE.getRelatedItemNames()??>
<#list ITEMENABLE.getRelatedItemNames() as detailName>
let _${detailName} = '';
if (index || index === 0) {
_${detailName} = this.layoutData[`${detailName}<#noparse>_${index}</#noparse>`];
} else {
_${detailName} = this.layoutData['${detailName}'];
}
</#list>
</#if>
if (<@panelLogic ITEMENABLE/>) {
ret = true;
}
if (index || index === 0) {
this.layoutModelDetails[`${panelItem.name}<#noparse>_${index}</#noparse>`].disabled = !ret;
} else {
this.layoutModelDetails['${panelItem.name}'].disabled = !ret;
}
}
</#if>
<#if panelItem.getPSPanelItemGroupLogic('PANELVISIBLE')??>
<#assign PANELVISIBLE = panelItem.getPSPanelItemGroupLogic('PANELVISIBLE')/>
if (Object.is(name, '')<#if PANELVISIBLE.getRelatedItemNames()??><#list PANELVISIBLE.getRelatedItemNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if PANELVISIBLE.getRelatedItemNames()??>
<#list PANELVISIBLE.getRelatedItemNames() as detailName>
let _${detailName} = '';
if (index || index === 0) {
_${detailName} = this.layoutData[`${detailName}<#noparse>_${index}</#noparse>`];
} else {
_${detailName} = this.layoutData['${detailName}'];
}
</#list>
</#if>
if (<@panelLogic PANELVISIBLE/>) {
ret = true;
}
if (index || index === 0) {
this.layoutModelDetails[`${panelItem.name}<#noparse>_${index}</#noparse>`].visible = ret;
} else {
this.layoutModelDetails['${panelItem.name}'].visible = ret;
}
}
</#if>
</#list>
} }
/** /**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册