CONTROL.vue.ftl 3.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<#assign import_block>
<#if ctrl.getPSPortlets?? && ctrl.getPSPortlets()??>
<#list ctrl.getPSPortlets() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
<#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>
</#assign>

<#assign components>
<#if ctrl.getPSPortlets?? && ctrl.getPSPortlets()??>
<#list ctrl.getPSPortlets() as subctrl>
<#if subctrl.getControlType() != 'TOOLBAR' && subctrl.getControlType() != 'CONTEXTMENU'>
view_${subctrl.getName()}, 
</#if>
</#list>
</#if>
</#assign>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.getPSAppDataEntity().getCodeName()}')}</#if>${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'>
<#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>
41
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';
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
</#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'>
        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 <#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>