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

lxm--门户部件测试

上级 a23315a5
......@@ -4,32 +4,36 @@
<app-build @handleClick="handleClick"></app-build>
</row>
<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>
<#if portlet.getPortletType?? && portlet.getPortletType()??><#t>
<#-- BEGIN:处理参数layout,LayoutPos -->
<#assign layout='TABLE_24COL'>
<#if portlet.getPSLayoutPos()??>
<#if portlet.getPSLayoutPos().getParentPSLayout()??>
<#assign layout='${portlet.getPSLayoutPos().getParentPSLayout().getLayout()}'>
</#if>
</#if>
<#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>
<#-- END:第一个门户部件前 -->
<#-- BEGIN:获取父的layout,自己的LayoutPos -->
<#assign layout=ctrl.getLayoutMode()>
<#assign LayoutPos = portlet.getPSLayoutPos()>
<#-- END:获取父的layout,自己的LayoutPos -->
<#-- BEGIN:门户部件绘制,栅格布局 -->
<#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>>
<#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>>
<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'>
${portlet.getTitle()}
<span class="line"></span>
......@@ -43,12 +47,13 @@
</span>
</card>
</i-col>
<#-- ELSE:门户部件布局,Flex -->
<#-- ELSE:门户部件绘制,Flex -->
<#else>
<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'>
${portlet.getTitle()}
<span class="line"></span>
</p>
<a slot='extra'></a>
</#if>
......@@ -59,14 +64,14 @@
</span>
</card>
</#if>
<#-- END:门户部件布局 -->
<#-- BEGIN:最后一个门户部件后 -->
<#if !portlet_has_next>
</div>
</#if>
<#-- END:最后一个门户部件后 -->
<#-- END:门户部件绘制 -->
</#if>
</#list>
<#-- BEGIN:看板Flex布局-后 -->
<#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
</div>
</#if>
<#-- END:看板Flex布局-后 -->
</row>
<row v-if="isHasCustomized" style="width: 100%;min-height: calc(100% - 40px);">
<div class="portlet-container" style="position: relative;width:100%;">
......@@ -253,7 +258,12 @@ import UtilService from '@/utilservice/util-service';
this.isHasCustomized = false;
this.notifyState();
}
})
}).catch((error:any)=>{
console.error("加载面板模型异常");
console.error(error);
this.isHasCustomized = false;
this.notifyState();
});
})
}else{
this.notifyState();
......
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import ${srfclassname('${ctrl.codeName}')}Base from './${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}-base.vue';
<#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 portletClass = "portlet-container">
<#assign portletHeight = "100%">
<#assign portletWidth = "100%">
<#else>
<#assign portletHeight = "calc(100% - 16px)">
<#assign portletWidth = "calc(100% - 16px)">
<#assign portletClass = "portlet">
</#if>
<#if ctrl.getPortletType() != 'CONTAINER'>
<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)' : (height > 0 ? height+'px' :'${ctrl.getHeight()?c}px'),</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? 'calc(100% - 16px)' : (width ? width+'px' :'${ctrl.getWidth()?c}px')</#if>}">
<#if ctrl.getPortletType?? && ctrl.getPortletType()??><#t>
<#-- 视图 -->
<#if ctrl.getPortletType() == 'VIEW' && ctrl.getPortletPSAppView?? && ctrl.getPortletPSAppView()??><#t>
<#-- 视图 -->
<#if ctrl.getPortletType() == 'VIEW' && ctrl.getPortletPSAppView?? && ctrl.getPortletPSAppView()??><#t>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
${ctrl.getTitle()}
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
<span class="portlet-action">
<#list UIActionDetails as uiactiondetail>
<a @click="uiAction('${uiactiondetail.getName()?lower_case}', $event)"><#if uiactiondetail.getPSUIAction()??>${uiactiondetail.getPSUIAction().getCaption()}</#if></a>
</#list>
</span>
</#if>
</p>
</#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
<#assign refview = ctrl.getPortletPSAppView()><#t>
<${srffilepath2(refview.getCodeName())} :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></${srffilepath2(refview.getCodeName())}>
</div>
<#-- 菜单 -->
<#elseif ctrl.getPortletType() == 'APPMENU'><#t>
<#-- 菜单 -->
<#elseif ctrl.getPortletType() == 'APPMENU'><#t>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
${ctrl.getTitle()}
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
<span class="portlet-action">
<#list UIActionDetails as uiactiondetail>
<a @click="uiAction('${uiactiondetail.getName()?lower_case}', $event)"><#if uiactiondetail.getPSUIAction()??>${uiactiondetail.getPSUIAction().getCaption()}</#if></a>
</#list>
</span>
</#if>
</p>
</#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
......@@ -36,12 +44,20 @@
${P.getCtrlCode(appmenu, 'CONTROL.html').code}
</@ibizindent>
</div>
<#-- 自定义 -->
<#elseif ctrl.getPortletType() == 'CUSTOM'>
<#-- 自定义 -->
<#elseif ctrl.getPortletType() == 'CUSTOM'>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
${ctrl.getTitle()}
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
<span class="portlet-action">
<#list UIActionDetails as uiactiondetail>
<a @click="uiAction('${uiactiondetail.getName()?lower_case}', $event)"><#if uiactiondetail.getPSUIAction()??>${uiactiondetail.getPSUIAction().getCaption()}</#if></a>
</#list>
</span>
</#if>
</p>
</#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
......@@ -51,8 +67,8 @@
<div>无扩展插件</div>
</#if>
</div>
<#-- 操作栏 -->
<#elseif ctrl.getPortletType() == 'ACTIONBAR'>
<#-- 操作栏 -->
<#elseif ctrl.getPortletType() == 'ACTIONBAR'>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
......@@ -66,52 +82,39 @@
<app-actionbar :items="actionBarModelData" @itemClick="handleItemClick"></app-actionbar>
</#if>
</div>
<#-- HTML -->
<#elseif ctrl.getPortletType() == 'HTML'>
<#-- HTML -->
<#elseif ctrl.getPortletType() == 'HTML'>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
${ctrl.getTitle()}
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
<span class="portlet-action">
<#list UIActionDetails as uiactiondetail>
<a @click="uiAction('${uiactiondetail.getName()?lower_case}', $event)"><#if uiactiondetail.getPSUIAction()??>${uiactiondetail.getPSUIAction().getCaption()}</#if></a>
</#list>
</span>
</#if>
</p>
</#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
<iframe src="<#if ctrl.getPageUrl()??>${ctrl.getPageUrl()}</#if>" style="height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}<#else>400</#if>px;width: 100%;border-width: 1px;"></iframe>
</div>
<#-- 容器 -->
<#elseif ctrl.getPortletType() == 'CONTAINER'><#t>
<#list ctrl.getPSPortlets() as portlet><#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>
<#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 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>>
<div class="portlet-without-title">
<@ibizindent blank=18>
${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent>
</div>
</i-col>
<#else>
<div class="portlet-without-title">
<@ibizindent blank=18>
${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent>
</div>
</#if>
<#if layout == 'FLEX' >
</div>
</#if>
</#if>
</#list>
<#-- 其他部件 -->
<#elseif ctrl.getContentPSControl()??><#t>
<#-- 其他部件 -->
<#elseif ctrl.getContentPSControl()??><#t>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
${ctrl.getTitle()}
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
<span class="portlet-action">
<#list UIActionDetails as uiactiondetail>
<a @click="uiAction('${uiactiondetail.getName()?lower_case}', $event)"><#if uiactiondetail.getPSUIAction()??>${uiactiondetail.getPSUIAction().getCaption()}</#if></a>
</#list>
</span>
</#if>
</p>
</#if>
<div class="<#if ctrl.isShowTitleBar()>portlet-with-title<#else>portlet-without-title</#if>">
......@@ -121,14 +124,33 @@
${P.getCtrlCode(control, 'CONTROL.html').code}
</@ibizindent>
</div>
</#if>
</#if>
</#if>
</div>
</template>
<#assign import_block>
import { Environment } from '@/environments/environment';
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_PORTLET-HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 长度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public width?: number;
<#if ctrl.getPortletType() == 'ACTIONBAR'>
/**
* 操作栏模型数据
......@@ -257,10 +279,30 @@
</#if>
}
<#if ctrl.getPortletType() != 'ACTIONBAR'>
<#if ctrl.getPSUIActionGroup?? && ctrl.getPSUIActionGroup()?? && ctrl.getPSUIActionGroup().getPSUIActionGroupDetails()??>
<#assign UIActionDetails=ctrl.getPSUIActionGroup().getPSUIActionGroupDetails() />
/**
* 执行界面行为
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public uiAction(tag:string,event:any){
<#list UIActionDetails as uiactiondetail>
if(Object.is(tag,'${uiactiondetail.getName()?lower_case}')){
this.${ctrl.getName()?lower_case}_${uiactiondetail.getName()?lower_case}_click(null,tag,event);
}
</#list>
}
</#if>
</#if>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
</#if>
\ 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>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
</#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>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
......@@ -25,6 +26,13 @@
i{
margin-right: 5px;
}
>.portlet-action{
margin-left: 12px;
font-size: 14px;
>a{
padding: 6px;
}
}
}
> .portlet-with-title{
width:100%;
......@@ -51,4 +59,5 @@
}
}
}
}
\ No newline at end of file
}
</#if>
\ No newline at end of file
<#if ctrl.getPortletType() != 'CONTAINER'>
<#assign import_block>
<#if ctrl.getPSPortlets?? && ctrl.getPSPortlets()??>
<#list ctrl.getPSPortlets() as subctrl>
......@@ -62,4 +63,5 @@ import layout_${panel.getName()} from '@widgets/${srffilepath2(panel.getPSAppDat
export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.getPSAppDataEntity().getCodeName()}')}</#if>${srfclassname('${ctrl.codeName}')} extends <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.getPSAppDataEntity().getCodeName()}')}</#if>${srfclassname('${ctrl.codeName}')}Base {
}
</script>
\ No newline at end of file
</script>
</#if>
\ No newline at end of file
<#if ctrl.getPortletType() != 'CONTAINER'>
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
</#if>
\ No newline at end of file
<#if ctrl.getPortletType() != 'CONTAINER'>
<#ibizinclude>
../@MACRO/SERVICE/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
</#if>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册