<#if item.getPSAppView()??>

/**
 * ${item.getName()}
 *
 * @param {*} [item={}]
 * @memberof ${srfclassname('${ctrl.codeName}')}
 */
<#assign dataview = item.getPSAppView()/>
public click${item.codeName}(item: any = {}) {
    // 打开应用视图
    const viewparam: any = <#if item.getOpenViewParam?? && item.getOpenViewParam()??>${item.getOpenViewParam()}<#else>{}</#if>;
    <#if dataview.getOpenMode() == 'INDEXVIEWTAB' || dataview.getOpenMode() == ''>
    <#--  const _params = this.$util.prepareRouteParmas({
        route: this.$route,
        sourceNode: this.$route.name,
        targetNode: '${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}',
        data: Object.assign({}, viewparam),
    });  -->
    this.$router.navigate(['${dataview.getPSAppModule().getCodeName()?lower_case}_${dataview.getCodeName()?lower_case}', viewparam], { relativeTo: this.$route });
    </#if>
    <#if dataview.getOpenMode() == 'POPUP'>
    console.log('-----POPUP-----非模式弹出，暂时不实现');
    </#if>
    <#if dataview.getOpenMode() == 'POPUPMODAL'>
    const view = { 
        viewname: '${srffilepath2(dataview.getCodeName())}', 
        title: '${dataview.title}', 
        height: ${dataview.getHeight()?c}, 
        width: ${dataview.getWidth()?c}, 
    };
    const data = { srfparentdata: viewparam };
    const appmodal = this.$appmodal.openModal(view, data);
    appmodal.subscribe((result: any) => {
        console.log(result);
    });
    </#if>
    <#if dataview.getOpenMode() == 'POPUPAPP'>
    console.log('-----POPUPAPP-----独立程序弹出，暂时不实现');
    </#if>
    <#if dataview.getOpenMode()?index_of('DRAWER') == 0>
    const view: any = {
        viewname: '${srffilepath2(dataview.getCodeName())}',
        title: '${dataview.title}',
        height: ${dataview.getHeight()?c},
        width: ${dataview.getWidth()?c},
        placement: '${dataview.getOpenMode()}'
    };
    const data: any = { srfparentdata: viewparam };
    const appdrawer = this.$appdrawer.openDrawer(view, data);
    appdrawer.subscribe((result: any) => {
        console.log(result);
    });
    </#if>
    <#if dataview.getOpenMode() == 'POPOVER'>
    const view: any = {
        viewname: '${srffilepath2(dataview.getCodeName())}',
        title: '${dataview.title}',
        height: ${dataview.getHeight()?c},
        width: ${dataview.getWidth()?c},
        placement: '${dataview.getOpenMode()}'
    };
    const data: any = { srfparentdata: viewparam };
    const appPopover = this.$apppopover.openPop($event, view, data);
    appPopover.subscribe((result: any) => {
        console.log(result);
    });
    </#if>
    <#if dataview.getOpenMode()?index_of('USER') == 0>
    console.log('-----${dataview.getOpenMode()}-----用户自定义');
    </#if>
}
</#if>