<#assign import_block> import UIService from '@/uiservice/ui-service'; </#assign> <#assign created_block> this.viewInit(); </#assign> <#assign self_content> /** * 是否在工作流中 * * @memberof ${srfclassname('${view.name}')}Base */ public isEnableWorkflow:boolean = false; /** * 初始化视图 * * @memberof ${srfclassname('${view.name}')}Base */ public async viewInit(){ const {srfkey:srfkey,srfappde:srfappde} = this.viewparams; const uiService:UIService = new UIService(); const targetService:any = await uiService.getService(srfappde.toLowerCase()); targetService.getRDAppView(srfkey,this.isEnableWorkflow).then((res:any) =>{ if(res && res.viewname && res.srfappde){ 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>