提交 6d5de021 编写于 作者: WodahsOrez's avatar WodahsOrez

lxm--门户部件--fix3

上级 69ce061e
...@@ -4,32 +4,27 @@ ...@@ -4,32 +4,27 @@
<app-build @handleClick="handleClick"></app-build> <app-build @handleClick="handleClick"></app-build>
</row> </row>
<row v-if="!isHasCustomized"> <row v-if="!isHasCustomized">
<#-- BEGIN:看板Flex布局-前 -->
<#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
<div style = '<#if layout == 'FLEX' > display : flex; <#if ctrl.getFlexAlign()??> justify-content :${ctrl.getFlexAlign()};</#if> <#if ctrl.getFlexDir()??> flex-direction:${ctrl.getFlexDir()};</#if> <#if ctrl.getFlexVAlign()??>align-items:${ctrl.getFlexVAlign()};</#if></#if> '>
</#if>
<#-- END:看板Flex布局-前 -->
<#list ctrl.getPSPortlets() as portlet><#t> <#list ctrl.getPSPortlets() as portlet><#t>
<#if portlet.getPortletType?? && portlet.getPortletType()??><#t> <#if portlet.getPortletType?? && portlet.getPortletType()??><#t>
<#-- BEGIN:处理参数layout,LayoutPos --> <#-- BEGIN:获取父的layout,自己的LayoutPos -->
<#assign layout='TABLE_24COL'> <#assign layout='TABLE_24COL'>
<#if portlet.getPSLayoutPos()??> <#if portlet.getPSLayoutPos?? && portlet.getPSLayoutPos()??>
<#if portlet.getPSLayoutPos().getParentPSLayout()??> <#if portlet.getPSLayoutPos().getParentPSLayout()??>
<#assign layout='${portlet.getPSLayoutPos().getParentPSLayout().getLayout()}'> <#assign layout='${portlet.getPSLayoutPos().getParentPSLayout().getLayout()}'>
</#if> </#if>
</#if>
<#assign LayoutPos = portlet.getPSLayoutPos()><#t> <#assign LayoutPos = portlet.getPSLayoutPos()><#t>
<#-- END:处理参数layout,LayoutPos -->
<#-- BEGIN:第一个门户部件前 -->
<#if portlet_index == 0 >
<#list ctrl.getPSPortlets() as container><#t>
<#if container.getPortletType() == 'CONTAINER' && layout == 'FLEX'>
<#assign flexLayout = container.getPSLayout()><#t>
</#if>
</#list>
<div style = '<#if layout == 'FLEX' > display : flex; justify-content : ${flexLayout.getAlign()}; flex-direction:${flexLayout.getDir()} ;align-items:${flexLayout.getVAlign()};flex-wrap: wrap;</#if>'>
</#if> </#if>
<#-- END:第一个门户部件前 --> <#-- END:获取父的layout,自己的LayoutPos -->
<#-- BEGIN:门户部件绘制,栅格布局 --> <#-- BEGIN:门户部件绘制,栅格布局 -->
<#if layout == 'TABLE_24COL' && LayoutPos??><#t> <#if layout == 'TABLE_24COL' && LayoutPos??><#t>
<i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>> <i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>>
<card class="portlet-card" :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.isShowTitleBar() && portlet.getTitle()?has_content> <#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<p slot='title'> <p slot='title'>
${portlet.getTitle()} ${portlet.getTitle()}
<span class="line"></span> <span class="line"></span>
...@@ -43,12 +38,13 @@ ...@@ -43,12 +38,13 @@
</span> </span>
</card> </card>
</i-col> </i-col>
<#-- ELSE:门户部件布局,Flex --> <#-- ELSE:门户部件绘制,Flex -->
<#else> <#else>
<card class="portlet-card" :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.isShowTitleBar() && portlet.getTitle()?has_content><#t> <#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<p slot='title'> <p slot='title'>
${portlet.getTitle()} ${portlet.getTitle()}
<span class="line"></span>
</p> </p>
<a slot='extra'></a> <a slot='extra'></a>
</#if> </#if>
...@@ -59,14 +55,14 @@ ...@@ -59,14 +55,14 @@
</span> </span>
</card> </card>
</#if> </#if>
<#-- END:门户部件布局 --> <#-- END:门户部件绘制 -->
<#-- BEGIN:最后一个门户部件后 -->
<#if !portlet_has_next>
</div>
</#if>
<#-- END:最后一个门户部件后 -->
</#if> </#if>
</#list> </#list>
<#-- BEGIN:看板Flex布局-后 -->
<#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
</div>
</#if>
<#-- END:看板Flex布局-后 -->
</row> </row>
<row v-if="isHasCustomized" style="width: 100%;min-height: calc(100% - 40px);"> <row v-if="isHasCustomized" style="width: 100%;min-height: calc(100% - 40px);">
<div class="portlet-container" style="position: relative;width:100%;"> <div class="portlet-container" style="position: relative;width:100%;">
......
<#if ctrl.getPortletType() != 'CONTAINER'> <#if ctrl.getPortletType() != 'CONTAINER'>
<#assign portletHeight = "calc(100% - 16px)">
<#assign portletWidth = "calc(100% - 16px)">
<#assign portletClass = "portlet">
<template> <template>
<div class='${portletClass} ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? '${portletHeight}' : <#if ctrl.getHeight() == 0>'auto'<#else>'${ctrl.getHeight()?c}px'</#if>,</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? '${portletWidth}' : '${ctrl.getWidth()?c}px '</#if>}"> <div class='portlet ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? 'calc(100% - 16px)' : <#if ctrl.getHeight() == 0>'auto'<#else>'${ctrl.getHeight()?c}px'</#if>,</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? 'calc(100% - 16px)' : '${ctrl.getWidth()?c}px '</#if>}">
<#if ctrl.getPortletType?? && ctrl.getPortletType()??><#t> <#if ctrl.getPortletType?? && ctrl.getPortletType()??><#t>
<#-- 视图 --> <#-- 视图 -->
<#if ctrl.getPortletType() == 'VIEW' && ctrl.getPortletPSAppView?? && ctrl.getPortletPSAppView()??><#t> <#if ctrl.getPortletType() == 'VIEW' && ctrl.getPortletPSAppView?? && ctrl.getPortletPSAppView()??><#t>
......
...@@ -4,17 +4,25 @@ ...@@ -4,17 +4,25 @@
../@MACRO/HTML/DEFAULT.html.ftl ../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude> </#ibizinclude>
<#else> <#else>
<#assign portletClass = "portlet-container"> <div class='portlet-container ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? '100%' : <#if ctrl.getHeight() == 0>'auto'<#else>'${ctrl.getHeight()?c}px'</#if>,</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? '100%' : '${ctrl.getWidth()?c}px '</#if>}">
<#assign portletHeight = "100%"> <row>
<#assign portletWidth = "100%"> <#-- BEGIN:容器Flex布局-前 -->
<div class='${portletClass} ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? '${portletHeight}' : <#if ctrl.getHeight() == 0>'auto'<#else>'${ctrl.getHeight()?c}px'</#if>,</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? '${portletWidth}' : '${ctrl.getWidth()?c}px '</#if>}"> <#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
<div style = '<#if layout == 'FLEX' > display : flex; <#if ctrl.getFlexAlign()??> justify-content :${ctrl.getFlexAlign()};</#if> <#if ctrl.getFlexDir()??> flex-direction:${ctrl.getFlexDir()};</#if> <#if ctrl.getFlexVAlign()??>align-items:${ctrl.getFlexVAlign()};</#if></#if> '>
</#if>
<#-- END:容器Flex布局-前 -->
<#list ctrl.getPSPortlets() as portlet><#t> <#list ctrl.getPSPortlets() as portlet><#t>
<#if portlet.getPortletType?? && portlet.getPortletType()??><#t> <#if portlet.getPortletType?? && portlet.getPortletType()??><#t>
<#assign layout='TABLE_24COL'><#if portlet.getPSLayoutPos()??><#if portlet.getPSLayoutPos().getParentPSLayout()??><#assign layout='${portlet.getPSLayoutPos().getParentPSLayout().getLayout()}'></#if></#if><#t> <#-- BEGIN:获取父的layout,自己的LayoutPos -->
<#assign layout='TABLE_24COL'>
<#if portlet.getPSLayoutPos?? && portlet.getPSLayoutPos()??>
<#if portlet.getPSLayoutPos().getParentPSLayout()??>
<#assign layout='${portlet.getPSLayoutPos().getParentPSLayout().getLayout()}'>
</#if>
<#assign LayoutPos = portlet.getPSLayoutPos()><#t> <#assign LayoutPos = portlet.getPSLayoutPos()><#t>
<#if layout == 'FLEX' >
<div style = '<#if layout == 'FLEX' > display : flex; <#if ctrl.getFlexAlign()??> justify-content :${ctrl.getFlexAlign()};</#if> <#if ctrl.getFlexDir()??> flex-direction:${ctrl.getFlexDir()};</#if> <#if ctrl.getFlexVAlign()??>align-items:${ctrl.getFlexVAlign()};</#if></#if> '>
</#if> </#if>
<#-- END:获取父的layout,自己的LayoutPos -->
<#-- BEGIN:子门户部件绘制,栅格绘制 -->
<#if layout == 'TABLE_24COL' && LayoutPos??><#t> <#if layout == 'TABLE_24COL' && LayoutPos??><#t>
<i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>> <i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>>
<div class="portlet-without-title"> <div class="portlet-without-title">
...@@ -23,6 +31,7 @@ ...@@ -23,6 +31,7 @@
</@ibizindent> </@ibizindent>
</div> </div>
</i-col> </i-col>
<#-- BEGIN:子门户部件绘制,Flex -->
<#else> <#else>
<div class="portlet-without-title"> <div class="portlet-without-title">
<@ibizindent blank=18> <@ibizindent blank=18>
...@@ -30,10 +39,14 @@ ...@@ -30,10 +39,14 @@
</@ibizindent> </@ibizindent>
</div> </div>
</#if> </#if>
<#if layout == 'FLEX' > <#-- END:子门户部件绘制 -->
</div>
</#if>
</#if> </#if>
</#list> </#list>
<#-- BEGIN:容器Flex布局-后 -->
<#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
</div>
</#if>
</row>
<#-- END:容器Flex布局-后 -->
</div> </div>
</#if> </#if>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册