兰宝车间质量管理系统-前端
gssong
2024-03-31 2ea1807f34479f683f4fc3691dfccf4146b94706
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
41
42
43
44
45
46
47
48
49
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
 
export default {
    routerJump(routerJumpVo: RouterJumpVo,proxy){
        if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'static' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
            proxy.$tab.closePage(proxy.$route);
            proxy.$router.push({
                path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
                query: {
                    id: routerJumpVo.businessKey,
                    type: routerJumpVo.type,
                    taskId: routerJumpVo.taskId
                }
            });
        } else if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'dynamic' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
            proxy.$tab.closePage(proxy.$route);
            proxy.$router.push({
                path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
                query: {
                    id: routerJumpVo.businessKey,
                    type: routerJumpVo.type,
                    taskId: routerJumpVo.taskId
                }
            });
        }else if (routerJumpVo.wfDefinitionConfigVo && routerJumpVo.wfDefinitionConfigVo.wfFormManageVo && routerJumpVo.wfDefinitionConfigVo.wfFormManageVo.formType === 'static') {
            proxy.$tab.closePage(proxy.$route);
            proxy.$router.push({
                path: `${routerJumpVo.wfDefinitionConfigVo.wfFormManageVo.router}`,
                query: {
                    id: routerJumpVo.businessKey,
                    type: routerJumpVo.type,
                    taskId: routerJumpVo.taskId
                }
            });
        }else if (routerJumpVo.wfDefinitionConfigVo && routerJumpVo.wfDefinitionConfigVo.wfFormManageVo && routerJumpVo.wfDefinitionConfigVo.wfFormManageVo.formType === 'dynamic') {
            proxy.$tab.closePage(proxy.$route);
            proxy.$router.push({
                path: `${routerJumpVo.wfDefinitionConfigVo.wfFormManageVo.router}`,
                query: {
                    id: routerJumpVo.businessKey,
                    type: routerJumpVo.type,
                    taskId: routerJumpVo.taskId
                }
            });
        } else {
            proxy?.$modal.msgError('请到流程定义菜单配置路由!');
        }
    }
}