Skip to content

Commit 5063db4

Browse files
committed
feat: 将流程模型新增/修改/设计整合到同一个页面中,分三个步骤进行;跳转传参逻辑与页面绘制
1 parent 295a43d commit 5063db4

File tree

6 files changed

+648
-43
lines changed

6 files changed

+648
-43
lines changed

src/router/modules/remaining.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,18 @@ const remainingRouter: AppRouteRecordRaw[] = [
330330
title: '查看 OA 请假',
331331
activeMenu: '/bpm/oa/leave'
332332
}
333+
},
334+
{
335+
path: 'manager/model/create-update',
336+
component: () => import('@/views/bpm/model/CreateUpdate.vue'),
337+
name: 'BpmModelCreateUpdate',
338+
meta: {
339+
noCache: true,
340+
hidden: true,
341+
canTo: true,
342+
title: '创建/修改流程',
343+
activeMenu: '/bpm/manager/model'
344+
}
333345
}
334346
]
335347
},

src/views/bpm/model/CategoryDraggableModel.vue

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -339,21 +339,22 @@ const handleChangeState = async (row: any) => {
339339
340340
/** 设计流程 */
341341
const handleDesign = (row: any) => {
342-
if (row.type == BpmModelType.BPMN) {
343-
push({
344-
name: 'BpmModelEditor',
345-
query: {
346-
modelId: row.id
347-
}
348-
})
349-
} else {
350-
push({
351-
name: 'SimpleModelDesign',
352-
query: {
353-
modelId: row.id
354-
}
355-
})
356-
}
342+
// if (row.type == BpmModelType.BPMN) {
343+
// push({
344+
// name: 'BpmModelEditor',
345+
// query: {
346+
// modelId: row.id
347+
// }
348+
// })
349+
// } else {
350+
// push({
351+
// name: 'SimpleModelDesign',
352+
// query: {
353+
// modelId: row.id
354+
// }
355+
// })
356+
// }
357+
push(`/bpm/manager/model/create-update?id=${row.id}`)
357358
}
358359
359360
/** 发布流程 */
@@ -496,7 +497,11 @@ const handleDeleteCategory = async () => {
496497
/** 添加流程模型弹窗 */
497498
const modelFormRef = ref()
498499
const openModelForm = (type: string, id?: number) => {
499-
modelFormRef.value.open(type, id)
500+
if (type === 'create') {
501+
push('/bpm/manager/model/create-update')
502+
} else {
503+
push(`/bpm/manager/model/create-update?id=${id}`)
504+
}
500505
}
501506
502507
watch(() => props.categoryInfo.modelList, updateModeList, { immediate: true })

0 commit comments

Comments
 (0)