Commit b1174313 by zws

feat: bpm 添加流程模型复制功能

parent 8df285ae
...@@ -344,7 +344,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ ...@@ -344,7 +344,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
} }
}, },
{ {
path: 'manager/model/update/:id', path: 'manager/model/:type/:id',
component: () => import('@/views/bpm/model/form/index.vue'), component: () => import('@/views/bpm/model/form/index.vue'),
name: 'BpmModelUpdate', name: 'BpmModelUpdate',
meta: { meta: {
......
...@@ -165,6 +165,15 @@ ...@@ -165,6 +165,15 @@
</el-button> </el-button>
<el-button <el-button
link link
type="primary"
@click="openModelForm('copy', scope.row.id)"
v-hasPermi="['bpm:model:update']"
:disabled="!isManagerUser(scope.row)"
>
复制
</el-button>
<el-button
link
class="!ml-5px" class="!ml-5px"
type="primary" type="primary"
@click="handleDeploy(scope.row)" @click="handleDeploy(scope.row)"
...@@ -473,7 +482,7 @@ const openModelForm = (type: string, id?: number) => { ...@@ -473,7 +482,7 @@ const openModelForm = (type: string, id?: number) => {
} else { } else {
push({ push({
name: 'BpmModelUpdate', name: 'BpmModelUpdate',
params: { id } params: { id, type }
}) })
} }
} }
......
...@@ -162,7 +162,10 @@ const initData = async () => { ...@@ -162,7 +162,10 @@ const initData = async () => {
if (modelId) { if (modelId) {
// 修改场景 // 修改场景
formData.value = await ModelApi.getModel(modelId) formData.value = await ModelApi.getModel(modelId)
// 复制场景
if (route.params.type === 'copy') {
delete formData.value.id
}
} else { } else {
// 新增场景 // 新增场景
formData.value.managerUserIds.push(userStore.getUser.id) formData.value.managerUserIds.push(userStore.getUser.id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment