VIEW-BASE.vue.ftl 1.1 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
<#assign import_block>
import UIService from '@/uiservice/ui-service';
</#assign> 
<#assign created_block>
    this.viewInit();
</#assign> 
<#assign self_content>
    /**
     * 初始化视图
     *
     * @memberof WFCIDWFDataRedirectViewBase
     */    
    public async viewInit(){
        const {srfkey:srfkey,srfappde:srfappde,srfworklist:srfworklist} = this.viewparams;
        const uiService:UIService = new UIService();
        const targetService:any = await uiService.getService(srfappde.toLowerCase());
        targetService.getRDAppView(srfkey,${view.isEnableWorkflow()?c}).then((res:any) =>{
            if(res && res.viewname && res.srfappde){
                // <#noparse>?worklist=${srfworklist}</#noparse>
                console.log('重定向之后的视图'+res.viewname);
                const path:string =<#noparse>`/${res.srfappde}/${srfkey}/${res.viewname}`</#noparse>;
                this.$router.push({path:path});
            }else{
                console.error("未查找到重定向视图")
            }
        })
    }
</#assign>

<#ibizinclude>
../@MACRO/VIEW-BASE.vue.ftl
</#ibizinclude>