【代码评审】BPM:流程编辑

This commit is contained in:
YunaiV
2025-01-15 20:25:07 +08:00
parent d32a9a37bf
commit 6fba4b7228
8 changed files with 51 additions and 86 deletions

View File

@ -51,7 +51,7 @@ const formType = ref(20)
provide('formFields', formFields)
provide('formType', formType)
//注入 流程数据
// 注入流程数据
const xmlString = inject('processData') as Ref
const modeler = shallowRef() // BPMN Modeler
@ -66,13 +66,12 @@ const controlForm = ref({
})
const model = ref<ModelApi.ModelVO>() // 流程模型的信息
/** 初始化 modeler */
// TODO @zws需要初始化不然首次创建后无法发布相当于说key、name 要去赋值下
const initModeler = async (item) => {
modeler.value = item
}
/** 添加/修改模型 */
const save = async (bpmnXml: string) => {
try {
@ -84,7 +83,6 @@ const save = async (bpmnXml: string) => {
}
}
// 在组件卸载时清理
onBeforeUnmount(() => {
modeler.value = null
@ -94,8 +92,6 @@ onBeforeUnmount(() => {
w.bpmnInstances = null
}
})
</script>
<style lang="scss">
.process-panel__container {