gexinzhineng/gxzn27 2 年之前
父節點
當前提交
b700b316cd

+ 8 - 4
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue

@@ -316,7 +316,9 @@ const openListenerForm = (listener, index) => {
   // 打开侧边栏并清楚验证状态
   listenerFormModelVisible.value = true
   nextTick(() => {
-    if (listenerFormRef.value) listenerFormRef.value.clearValidate()
+    if (listenerFormRef.value) {
+      listenerFormRef.value.clearValidate()
+    }
   })
 }
 // 打开监听器字段编辑弹窗
@@ -325,7 +327,9 @@ const openListenerFieldForm = (field, index) => {
   editingListenerFieldIndex.value = field ? index : -1
   listenerFieldFormModelVisible.value = true
   nextTick(() => {
-    if (listenerFieldFormRef.value) listenerFieldFormRef.value.clearValidate()
+    if (listenerFieldFormRef.value) {
+      listenerFieldFormRef.value.clearValidate()
+    }
   })
 }
 // 保存监听器注入字段
@@ -345,7 +349,7 @@ const saveListenerFiled = async () => {
   })
 }
 // 移除监听器字段
-const removeListenerField = (field, index) => {
+const removeListenerField = (index) => {
   ElMessageBox.confirm('确认移除该字段吗?', '提示', {
     confirmButtonText: '确 认',
     cancelButtonText: '取 消'
@@ -357,7 +361,7 @@ const removeListenerField = (field, index) => {
     .catch(() => console.info('操作取消'))
 }
 // 移除监听器
-const removeListener = (listener, index) => {
+const removeListener = (index) => {
   ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
     confirmButtonText: '确 认',
     cancelButtonText: '取 消'

+ 4 - 4
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue

@@ -87,8 +87,8 @@ const defaultLoopInstanceForm = ref({
   exclusive: false
 })
 const loopInstanceForm = ref({})
-const bpmnElement = ref()
-const multiLoopInstance = ref()
+const bpmnElement = ref(null)
+const multiLoopInstance = ref(null)
 
 const getElementLoop = (businessObject) => {
   if (!businessObject.loopCharacteristics) {
@@ -158,7 +158,7 @@ const changeLoopCharacteristicsType = (type) => {
     )
   }
   window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), {
-    loopCharacteristics: multiLoopInstance.value
+    loopCharacteristics: toRaw(multiLoopInstance.value)
   })
 }
 // 循环基数
@@ -245,7 +245,7 @@ onBeforeUnmount(() => {
 })
 
 watch(
-  () => props.type,
+  () => props.businessObject,
   (val) => {
     bpmnElement.value = window.bpmnInstances.bpmnElement
     getElementLoop(val)

+ 2 - 2
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue

@@ -21,7 +21,7 @@
 </template>
 
 <script setup lang="ts" name="ElementTaskConfig">
-import { ref, watch, shallowRef } from 'vue'
+import { ref, watch } from 'vue'
 import { ElForm, ElFormItem, ElCheckbox } from 'element-plus'
 import UserTask from './task-components/UserTask.vue'
 import ScriptTask from './task-components/ScriptTask.vue'
@@ -36,7 +36,7 @@ const taskConfigForm = ref({
   asyncBefore: false,
   exclusive: false
 })
-const witchTaskComponent = shallowRef()
+const witchTaskComponent = ref()
 const installedComponent = ref({
   // 手工任务与普通任务一致,不需要其他配置
   // 接收消息任务,需要在全局下插入新的消息实例,并在该节点下的 messageRef 属性绑定该实例

+ 1 - 1
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue

@@ -112,7 +112,7 @@ onBeforeUnmount(() => {
 watch(
   () => props.id,
   () => {
-    bpmnElement.value = window.bpmnInstances.bpmnElement
+    // bpmnElement.value = window.bpmnInstances.bpmnElement
     nextTick(() => {
       getBindMessage()
     })