Merge branch 'feature/bpm' of https://github.com/yudaocode/yudao-ui-admin-vue3 into feature/bpm

This commit is contained in:
YunaiV
2025-01-17 19:38:28 +08:00
9 changed files with 110 additions and 61 deletions

View File

@ -262,6 +262,7 @@ import { checkPermi } from '@/utils/permission'
import { useUserStoreWithOut } from '@/store/modules/user'
import { useAppStore } from '@/store/modules/app'
import { cloneDeep } from 'lodash-es'
import {useTagsView} from "@/hooks/web/useTagsView";
defineOptions({ name: 'BpmModel' })
@ -498,6 +499,7 @@ const handleDeleteCategory = async () => {
} catch {}
}
const tagsView = useTagsView();
/** 添加流程模型弹窗 */
const modelFormRef = ref()
const openModelForm = (type: string, id?: number) => {
@ -507,6 +509,10 @@ const openModelForm = (type: string, id?: number) => {
push({
name: 'BpmModelUpdate',
params: { id, type }
}).then((_) => {
if (type === 'copy') {
tagsView.setTitle('复制流程')
}
})
}
}

View File

@ -12,6 +12,8 @@
:additionalModel="controlForm.additionalModel"
:model="model"
@save="save"
:process-id="modelKey"
:process-name="modelName"
/>
<!-- 流程属性器负责编辑每个流程节点的属性 -->
<MyProcessPenal
@ -53,6 +55,8 @@ provide('formType', formType)
// 注入流程数据
const xmlString = inject('processData') as Ref
// 注入模型数据
const modelData = inject('modelData') as Ref
const modeler = shallowRef() // BPMN Modeler
const processDesigner = ref()
@ -69,6 +73,8 @@ const model = ref<ModelApi.ModelVO>() // 流程模型的信息
/** 初始化 modeler */
// TODO @zws需要初始化不然首次创建后无法发布相当于说key、name 要去赋值下
const initModeler = async (item) => {
//先初始化模型数据
model.value = modelData.value
modeler.value = item
}

View File

@ -145,6 +145,7 @@ const formData: any = ref({
const processData = ref<any>()
provide('processData', processData)
provide('modelData', formData)
// 数据列表
const formList = ref([])
@ -160,6 +161,8 @@ const initData = async () => {
// 复制场景
if (route.params.type === 'copy') {
delete formData.value.id
formData.value.name += '副本'
formData.value.key += '_copy'
}
} else {
// 新增场景