diff --git a/src/router/routes/basic.ts b/src/router/routes/basic.ts index ef51de0..18db286 100644 --- a/src/router/routes/basic.ts +++ b/src/router/routes/basic.ts @@ -244,3 +244,26 @@ export const PROCESS_MONITORING: AppRouteRecordRaw[] = [{ }, ] }] +// 自定义页面路由 + +export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{ + path: '', + name: '', + meta: { + title: '' + }, + component: LAYOUT, + children: [ + { + path: '/approve/Appro/form', + name: 'ApproForm', + component: () => import('/@/views/approve/Appro/components/createForm.vue'), + meta: { + title: (route) => '签报详情' + } + }, + ] + + + +}]; diff --git a/src/router/routes/index.ts b/src/router/routes/index.ts index 38ef482..cf9adf8 100644 --- a/src/router/routes/index.ts +++ b/src/router/routes/index.ts @@ -6,7 +6,8 @@ import { SYSTEM_ROUTE, USERCENTER_ROUTE, FLOW_ROUTE, - PROCESS_MONITORING + PROCESS_MONITORING, + PAGE_CUSTOM_ROUTE // CUSTOMFORM_ROUTE, } from '/@/router/routes/basic'; @@ -66,6 +67,7 @@ export const basicRoutes = [ SYSTEM_ROUTE, USERCENTER_ROUTE, ...FLOW_ROUTE, - ...PROCESS_MONITORING + ...PROCESS_MONITORING, + ...PAGE_CUSTOM_ROUTE // CUSTOMFORM_ROUTE, ]; diff --git a/src/views/approve/Appro/components/createForm.vue b/src/views/approve/Appro/components/createForm.vue index c2aab68..63d6040 100644 --- a/src/views/approve/Appro/components/createForm.vue +++ b/src/views/approve/Appro/components/createForm.vue @@ -197,6 +197,9 @@ getOption() if (pageId.value) { getInfo(pageId.value) + if (currentRoute.value.query?.disabled) { + isDisable.value = true + } } else { formState.empName = userInfo.name formState.empId = userInfo.id diff --git a/src/views/contract/ContractFact/components/createForm.vue b/src/views/contract/ContractFact/components/createForm.vue index 6a71faa..f4e0511 100644 --- a/src/views/contract/ContractFact/components/createForm.vue +++ b/src/views/contract/ContractFact/components/createForm.vue @@ -565,7 +565,13 @@ } if (btn == 'view') { - + router.push({ + path: '/approve/Appro/form', + query: { + id: record.id || record.approId, + disabled: true + } + }) } }