update 调整路由

This commit is contained in:
gssong 2024-06-01 22:00:22 +08:00
parent 58e6fdef78
commit d98c2822d5
3 changed files with 31 additions and 31 deletions

View File

@ -1,29 +1,29 @@
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types'; import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
export default { export default {
routerJump(routerJumpVo: RouterJumpVo,proxy){ routerJump(routerJumpVo: RouterJumpVo, proxy) {
if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'static' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) { if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'static' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`, path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
query: { query: {
id: routerJumpVo.businessKey, id: routerJumpVo.businessKey,
type: routerJumpVo.type, type: routerJumpVo.type,
taskId: routerJumpVo.taskId 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 {
proxy?.$modal.msgError('请到模型配置菜单!');
} }
});
} 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 {
proxy?.$modal.msgError('请到模型配置菜单!');
} }
} }
};

View File

@ -164,7 +164,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [
] ]
}, },
{ {
path: '/demo/leaveEdit', path: '/workflow/leaveEdit',
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['demo:leave:edit'], permissions: ['demo:leave:edit'],
@ -173,7 +173,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [
path: 'index', path: 'index',
component: () => import('@/views/workflow/leave/leaveEdit.vue'), component: () => import('@/views/workflow/leave/leaveEdit.vue'),
name: 'leaveEdit', name: 'leaveEdit',
meta: { title: '请假申请', activeMenu: '/demo/leave', noCache: true } meta: { title: '请假申请', activeMenu: '/workflow/leave', noCache: true }
} }
] ]
} }

View File

@ -184,9 +184,9 @@ const handleSelectionChange = (selection: LeaveVO[]) => {
/** 新增按钮操作 */ /** 新增按钮操作 */
const handleAdd = () => { const handleAdd = () => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push(`/demo/leaveEdit/index/add/add`); proxy.$router.push(`/workflow/leaveEdit/index/add/add`);
proxy.$router.push({ proxy.$router.push({
path: `/demo/leaveEdit/index`, path: `/workflow/leaveEdit/index`,
query: { query: {
type: 'add' type: 'add'
} }
@ -197,7 +197,7 @@ const handleAdd = () => {
const handleUpdate = (row?: LeaveVO) => { const handleUpdate = (row?: LeaveVO) => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/demo/leaveEdit/index`, path: `/workflow/leaveEdit/index`,
query: { query: {
id: row.id, id: row.id,
type: 'update' type: 'update'
@ -209,7 +209,7 @@ const handleUpdate = (row?: LeaveVO) => {
const handleView = (row?: LeaveVO) => { const handleView = (row?: LeaveVO) => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/demo/leaveEdit/index`, path: `/workflow/leaveEdit/index`,
query: { query: {
id: row.id, id: row.id,
type: 'view' type: 'view'
@ -229,7 +229,7 @@ const handleDelete = async (row?: LeaveVO) => {
/** 导出按钮操作 */ /** 导出按钮操作 */
const handleExport = () => { const handleExport = () => {
proxy?.download( proxy?.download(
'demo/leave/export', 'workflow/leave/export',
{ {
...queryParams.value ...queryParams.value
}, },