Skip to content

Commit e44f48c

Browse files
committed
perf: bpm模型复制优化
1 parent 2f7200a commit e44f48c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/views/bpm/model/CategoryDraggableModel.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ import { checkPermi } from '@/utils/permission'
254254
import { useUserStoreWithOut } from '@/store/modules/user'
255255
import { useAppStore } from '@/store/modules/app'
256256
import { cloneDeep } from 'lodash-es'
257+
import {useTagsView} from "@/hooks/web/useTagsView";
257258
258259
defineOptions({ name: 'BpmModel' })
259260
@@ -474,6 +475,7 @@ const handleDeleteCategory = async () => {
474475
} catch {}
475476
}
476477
478+
const tagsView = useTagsView();
477479
/** 添加流程模型弹窗 */
478480
const modelFormRef = ref()
479481
const openModelForm = (type: string, id?: number) => {
@@ -483,6 +485,10 @@ const openModelForm = (type: string, id?: number) => {
483485
push({
484486
name: 'BpmModelUpdate',
485487
params: { id, type }
488+
}).then((_) => {
489+
if (type === 'copy') {
490+
tagsView.setTitle('复制流程')
491+
}
486492
})
487493
}
488494
}

src/views/bpm/model/form/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ const initData = async () => {
160160
// 复制场景
161161
if (route.params.type === 'copy') {
162162
delete formData.value.id
163+
formData.value.name += '副本'
164+
formData.value.key += '_copy'
163165
}
164166
} else {
165167
// 新增场景

0 commit comments

Comments
 (0)