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
<#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>