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

lxm--门户部件测试

上级 a23315a5
...@@ -4,32 +4,36 @@ ...@@ -4,32 +4,36 @@
<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 = '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>
<#-- 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=ctrl.getLayoutMode()>
<#if portlet.getPSLayoutPos()??> <#assign LayoutPos = portlet.getPSLayoutPos()>
<#if portlet.getPSLayoutPos().getParentPSLayout()??> <#-- END:获取父的layout,自己的LayoutPos -->
<#assign layout='${portlet.getPSLayoutPos().getParentPSLayout().getLayout()}'> <#-- BEGIN:门户部件绘制,栅格布局 -->
</#if> <#if layout == 'TABLE_12COL'>
</#if> <#assign multiple = 2/>
<#assign LayoutPos = portlet.getPSLayoutPos()><#t> <#else>
<#-- END:处理参数layout,LayoutPos --> <#assign multiple = 1/>
<#-- BEGIN:第一个门户部件前 -->
<#if portlet_index == 0 >
<#list ctrl.getPSPortlets() as container><#t>
<#if container.getPortletType() == 'CONTAINER' && layout == 'FLEX'>
<#assign flexLayout = container.getPSLayout()><#t>
</#if> </#if>
</#list> <#macro format_numer num>
<div style = '<#if layout == 'FLEX' > display : flex; justify-content : ${flexLayout.getAlign()}; flex-direction:${flexLayout.getDir()} ;align-items:${flexLayout.getVAlign()};flex-wrap: wrap;</#if>'> <#if num lt 0 >
0<#t>
<#elseif num gt 24>
24<#t>
<#else>
${num}<#t>
</#if> </#if>
<#-- END:第一个门户部件前 --> </#macro>
<#-- BEGIN:门户部件绘制,栅格布局 --> <#if (layout == 'TABLE_24COL' || layout == 'TABLE_12COL') && LayoutPos??><#t>
<#if layout == 'TABLE_24COL' && LayoutPos??><#t> <i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: <@format_numer LayoutPos.getColXS()*multiple/>, offset: <#if LayoutPos.getColXSOffset() != -1><@format_numer LayoutPos.getColXSOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: <@format_numer LayoutPos.getColSM()*multiple />, offset: <#if LayoutPos.getColSMOffset() != -1><@format_numer LayoutPos.getColSMOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: <@format_numer LayoutPos.getColMD()*multiple />, offset: <#if LayoutPos.getColMDOffset() != -1><@format_numer LayoutPos.getColMDOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: <@format_numer LayoutPos.getColLG()*multiple />, offset: <#if LayoutPos.getColLGOffset() != -1><@format_numer LayoutPos.getColLGOffset()*multiple /><#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 +47,13 @@ ...@@ -43,12 +47,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 +64,14 @@ ...@@ -59,14 +64,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%;">
...@@ -253,7 +258,12 @@ import UtilService from '@/utilservice/util-service'; ...@@ -253,7 +258,12 @@ import UtilService from '@/utilservice/util-service';
this.isHasCustomized = false; this.isHasCustomized = false;
this.notifyState(); this.notifyState();
} }
}) }).catch((error:any)=>{
console.error("加载面板模型异常");
console.error(error);
this.isHasCustomized = false;
this.notifyState();
});
}) })
}else{ }else{
this.notifyState(); this.notifyState();
......
<#ibizinclude> <script lang='tsx'>
../@MACRO/CONTROL/CONTROL.vue.ftl import { Component } from 'vue-property-decorator';
</#ibizinclude> import ${srfclassname('${ctrl.codeName}')}Base from './${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}-base.vue';
\ No newline at end of file <#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU' && (subctrl.getControlType() != 'PORTLET' || subctrl.getPortletType() != 'CONTAINER') >
<#if subctrl.getPSAppDataEntity?? && subctrl.getPSAppDataEntity()??>
import view_${subctrl.getName()} from '@widgets/${srffilepath2(subctrl.getPSAppDataEntity().getCodeName())}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
<#else>
import view_${subctrl.getName()} from '@widgets/app/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}/${srffilepath2(subctrl.getCodeName())}-${subctrl.getControlType()?lower_case}.vue';
</#if>
</#if>
</#list>
</#if>
<#if ctrl.getPSLayoutPanels?? && ctrl.getPSLayoutPanels()??>
<#list ctrl.getPSLayoutPanels() as panel>
import layout_${panel.getName()} from '@widgets/${srffilepath2(panel.getPSAppDataEntity().getCodeName())}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}/${srffilepath2(panel.getCodeName())}-${panel.getControlType()?lower_case}.vue';
</#list>
</#if>
<#if import_block??>${import_block}</#if>
@Component({
components: {
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU' && (subctrl.getControlType() != 'PORTLET' || subctrl.getPortletType() != 'CONTAINER') >
view_${subctrl.getName()},
</#if>
</#list>
</#if>
<#if ctrl.getPSLayoutPanels?? && ctrl.getPSLayoutPanels()??>
<#list ctrl.getPSLayoutPanels() as panel>
layout_${panel.getName()},
</#list>
</#if>
<#if components??>${components}</#if>
}
})
export default class ${srfclassname('${ctrl.codeName}')} extends ${srfclassname('${ctrl.codeName}')}Base {
}
</script>
\ No newline at end of file
<#-- -->
<#if ctrl.getPortletType() != 'CONTAINER'>
<#assign content>
<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>
:height="${ctrl.getHeight()?c}"
</#if>
<#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>
:width="${ctrl.getWidth()?c}"
</#if>
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl ../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude> </#ibizinclude>
<#else>
<div class='portlet-container ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': '${ctrl.getHeight()?c}px',</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': '${ctrl.getWidth()?c}px '</#if>}">
<#-- BEGIN:容器Flex布局-前 -->
<#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
<div style = '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>'>
<#else>
<row>
</#if>
<#-- END:容器Flex布局-前 -->
<#list ctrl.getPSPortlets() as portlet><#t>
<#if portlet.getPortletType?? && portlet.getPortletType()??><#t>
<#-- BEGIN:获取父的layout,自己的LayoutPos -->
<#assign layout=ctrl.getLayoutMode()>
<#assign LayoutPos = portlet.getPSLayoutPos()>
<#-- END:获取父的layout,自己的LayoutPos -->
<#-- BEGIN:子门户部件绘制,栅格绘制 -->
<#if layout == 'TABLE_12COL'>
<#assign multiple = 2/>
<#else>
<#assign multiple = 1/>
</#if>
<#macro format_numer num>
<#if num lt 0 >
0<#t>
<#elseif num gt 24>
24<#t>
<#else>
${num}<#t>
</#if>
</#macro>
<#if (layout == 'TABLE_24COL' || layout == 'TABLE_12COL') && LayoutPos??><#t>
<i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: <@format_numer LayoutPos.getColXS()*multiple/>, offset: <#if LayoutPos.getColXSOffset() != -1><@format_numer LayoutPos.getColXSOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: <@format_numer LayoutPos.getColSM()*multiple />, offset: <#if LayoutPos.getColSMOffset() != -1><@format_numer LayoutPos.getColSMOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: <@format_numer LayoutPos.getColMD()*multiple />, offset: <#if LayoutPos.getColMDOffset() != -1><@format_numer LayoutPos.getColMDOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: <@format_numer LayoutPos.getColLG()*multiple />, offset: <#if LayoutPos.getColLGOffset() != -1><@format_numer LayoutPos.getColLGOffset()*multiple /><#else>0</#if> }"</#if>>
<div class="portlet-without-title">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<p slot='title'>
${portlet.getTitle()}
<span class="line"></span>
</p>
<a slot='extra'></a>
</#if>
<span>
<@ibizindent blank=14><#t>
${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent>
</span>
</card>
</div>
</i-col>
<#-- BEGIN:子门户部件绘制,Flex -->
<#else>
<div class="portlet-without-title">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<p slot='title'>
${portlet.getTitle()}
<span class="line"></span>
</p>
<a slot='extra'></a>
</#if>
<span>
<@ibizindent blank=14><#t>
${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent>
</span>
</card>
</div>
</#if>
<#-- END:子门户部件绘制 -->
</#if>
</#list>
<#-- BEGIN:容器Flex布局-后 -->
<#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
</div>
<#else>
</row>
</#if>
<#-- END:容器Flex布局-后 -->
</div>
</#if>
\ No newline at end of file
<#if ctrl.getPortletType() != 'CONTAINER'>
<#ibizinclude> <#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl ../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude> </#ibizinclude>
...@@ -25,6 +26,13 @@ ...@@ -25,6 +26,13 @@
i{ i{
margin-right: 5px; margin-right: 5px;
} }
>.portlet-action{
margin-left: 12px;
font-size: 14px;
>a{
padding: 6px;
}
}
} }
> .portlet-with-title{ > .portlet-with-title{
width:100%; width:100%;
...@@ -52,3 +60,4 @@ ...@@ -52,3 +60,4 @@
} }
} }
} }
</#if>
\ No newline at end of file
<#if ctrl.getPortletType() != 'CONTAINER'>
<#assign import_block> <#assign import_block>
<#if ctrl.getPSPortlets?? && ctrl.getPSPortlets()??> <#if ctrl.getPSPortlets?? && ctrl.getPSPortlets()??>
<#list ctrl.getPSPortlets() as subctrl> <#list ctrl.getPSPortlets() as subctrl>
...@@ -63,3 +64,4 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get ...@@ -63,3 +64,4 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
} }
</script> </script>
</#if>
\ No newline at end of file
<#if ctrl.getPortletType() != 'CONTAINER'>
<#ibizinclude> <#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl ../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude> </#ibizinclude>
</#if>
\ No newline at end of file
<#if ctrl.getPortletType() != 'CONTAINER'>
<#ibizinclude> <#ibizinclude>
../@MACRO/SERVICE/DEFAULT.ts.ftl ../@MACRO/SERVICE/DEFAULT.ts.ftl
</#ibizinclude> </#ibizinclude>
</#if>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册