diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 3537a59c..806f954d 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -332,14 +332,26 @@ const remainingRouter: AppRouteRecordRaw[] = [ } }, { - path: 'manager/model/create-update', // TODO @goldenzqqq:是不是拆分成两个,一个 create 创建流程;一个 update 修改流程? - component: () => import('@/views/bpm/model/CreateUpdate.vue'), // TODO @goldenzqqq:是不是放到 '@/views/bpm/model/form/index.vue'。然后,原本的 editor/index.vue 是不是可以清理了呀? - name: 'BpmModelCreateUpdate', + path: 'manager/model/create', + component: () => import('@/views/bpm/model/form/index.vue'), + name: 'BpmModelCreate', meta: { noCache: true, hidden: true, canTo: true, - title: '创建/修改流程', + title: '创建流程', + activeMenu: '/bpm/manager/model' + } + }, + { + path: 'manager/model/update/:id', + component: () => import('@/views/bpm/model/form/index.vue'), + name: 'BpmModelUpdate', + meta: { + noCache: true, + hidden: true, + canTo: true, + title: '修改流程', activeMenu: '/bpm/manager/model' } } diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index 8009e693..37045568 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -339,8 +339,10 @@ const handleChangeState = async (row: any) => { /** 设计流程 */ const handleDesign = (row: any) => { - // TODO @goldenzqqq:最好使用 name 哈 - push(`/bpm/manager/model/create-update?id=${row.id}`) + push({ + name: 'BpmModelUpdate', + params: { id: row.id } + }) } /** 发布流程 */ @@ -483,11 +485,13 @@ const handleDeleteCategory = async () => { /** 添加流程模型弹窗 */ const modelFormRef = ref() const openModelForm = (type: string, id?: number) => { - // TODO @goldenzqqq:最好使用 name 哈 if (type === 'create') { - push('/bpm/manager/model/create-update') + push({ name: 'BpmModelCreate' }) } else { - push(`/bpm/manager/model/create-update?id=${id}`) + push({ + name: 'BpmModelUpdate', + params: { id } + }) } } diff --git a/src/views/bpm/model/form/BasicInfo.vue b/src/views/bpm/model/form/BasicInfo.vue new file mode 100644 index 00000000..088a8cac --- /dev/null +++ b/src/views/bpm/model/form/BasicInfo.vue @@ -0,0 +1,305 @@ + + + + + diff --git a/src/views/bpm/model/form/FormDesign.vue b/src/views/bpm/model/form/FormDesign.vue new file mode 100644 index 00000000..c0c06189 --- /dev/null +++ b/src/views/bpm/model/form/FormDesign.vue @@ -0,0 +1,111 @@ + + + \ No newline at end of file diff --git a/src/views/bpm/model/form/ProcessDesign.vue b/src/views/bpm/model/form/ProcessDesign.vue new file mode 100644 index 00000000..934de5a8 --- /dev/null +++ b/src/views/bpm/model/form/ProcessDesign.vue @@ -0,0 +1,74 @@ + + + diff --git a/src/views/bpm/model/form/index.vue b/src/views/bpm/model/form/index.vue new file mode 100644 index 00000000..1b9e4f50 --- /dev/null +++ b/src/views/bpm/model/form/index.vue @@ -0,0 +1,251 @@ + + + + + diff --git a/src/views/bpm/model/index.vue b/src/views/bpm/model/index.vue index d779a9f2..c7d94170 100644 --- a/src/views/bpm/model/index.vue +++ b/src/views/bpm/model/index.vue @@ -126,9 +126,12 @@ const handleQuery = () => { const formRef = ref() const openForm = (type: string, id?: number) => { if (type === 'create') { - push('/bpm/manager/model/create-update') + push({ name: 'BpmModelCreate' }) } else { - push(`/bpm/manager/model/create-update?id=${id}`) + push({ + name: 'BpmModelUpdate', + params: { id } + }) } }