提交 bf1a3621 编写于 作者: tony001's avatar tony001

update:自定义布局

上级 cd2aa5ba
...@@ -273,3 +273,28 @@ export default class ${srfclassname('${view.name}')}Base extends Vue { ...@@ -273,3 +273,28 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
<#if view.hasPSControl('toolbar')> <#if view.hasPSControl('toolbar')>
${P.getCtrlCode('toolbar', 'CONTROL.vue').code} ${P.getCtrlCode('toolbar', 'CONTROL.vue').code}
</#if> </#if>
<!-- 自定义视图布局 -->
<#if view.getPSViewLayoutPanel()?? && !view.getPSViewLayoutPanel().isUseDefaultLayout() && view.getPSViewLayoutPanel().getAllPSPanelItems()??>
public layoutModelDetails:any = {
<#list view.getPSViewLayoutPanel().getAllPSPanelItems() as panelItem>
<#assign detail>caption: '${panelItem.getCaption()}', itemType: '${panelItem.getItemType()}',visible: <#if panelItem.getPSPanelItemGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, disabled: false, name: '${panelItem.getName()}', panel: this</#assign>
<#if panelItem.getItemType() == 'CONTAINER'>
${panelItem.name}:new PanelContainerModel({ ${detail}<#if panelItem.getPSPanelItems()??>,details:[<#list panelItem.getPSPanelItems() as childPanelItem>'${childPanelItem.getName()}'<#if childPanelItem_has_next>,</#if></list>]</#if> })<#if panelItem_has_next>,</#if>
<#elseif panelItem.getItemType() == 'RAWITEM'>
${panelItem.name}:new PanelRawitemModel({ ${detail} })<#if panelItem_has_next>,</#if>
<#elseif panelItem.getItemType() == 'FIELD'>
${panelItem.name}:new PanelFieldModel({ ${detail} })<#if panelItem_has_next>,</#if>
<#elseif panelItem.getItemType() == 'CONTROL'>
${panelItem.name}:new PanelControlModel({ ${detail} })<#if panelItem_has_next>,</#if>
<#elseif panelItem.getItemType() == 'BUTTON'>
${panelItem.name}:new PanelButtonModel({ ${detail} })<#if panelItem_has_next>,</#if>
<#elseif panelItem.getItemType() == 'USERCONTROL'>
${panelItem.name}:new PanelUserControlModel({ ${detail} })<#if panelItem_has_next>,</#if>
<#elseif panelItem.getItemType() == 'TABPANEL'>
${panelItem.name}:new PanelTabPanelModel({ ${detail}<#if panelItem.getPSPanelTabPages()??>,details:[<#list panelItem.getPSPanelTabPages() as tabpage>'${tabpage.getName()}'<#if tabpage_has_next>,</#if></#list>]</#if> })<#if panelItem_has_next>,</#if>
<#elseif panelItem.getItemType() == 'TABPAGE'>
${panelItem.name}:new PanelTabPageModel({ ${detail} })<#if panelItem_has_next>,</#if>
</#if>
</#list>
};
</#if>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册