This commit is contained in:
gexinzhineng/gxzn27 2023-01-31 10:37:35 +08:00
parent 1e8a379ed0
commit b700b316cd
4 changed files with 15 additions and 11 deletions

View File

@ -316,7 +316,9 @@ const openListenerForm = (listener, index) => {
// //
listenerFormModelVisible.value = true listenerFormModelVisible.value = true
nextTick(() => { 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 editingListenerFieldIndex.value = field ? index : -1
listenerFieldFormModelVisible.value = true listenerFieldFormModelVisible.value = true
nextTick(() => { 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('确认移除该字段吗?', '提示', { ElMessageBox.confirm('确认移除该字段吗?', '提示', {
confirmButtonText: '确 认', confirmButtonText: '确 认',
cancelButtonText: '取 消' cancelButtonText: '取 消'
@ -357,7 +361,7 @@ const removeListenerField = (field, index) => {
.catch(() => console.info('操作取消')) .catch(() => console.info('操作取消'))
} }
// //
const removeListener = (listener, index) => { const removeListener = (index) => {
ElMessageBox.confirm('确认移除该监听器吗?', '提示', { ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
confirmButtonText: '确 认', confirmButtonText: '确 认',
cancelButtonText: '取 消' cancelButtonText: '取 消'

View File

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

View File

@ -21,7 +21,7 @@
</template> </template>
<script setup lang="ts" name="ElementTaskConfig"> <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 { ElForm, ElFormItem, ElCheckbox } from 'element-plus'
import UserTask from './task-components/UserTask.vue' import UserTask from './task-components/UserTask.vue'
import ScriptTask from './task-components/ScriptTask.vue' import ScriptTask from './task-components/ScriptTask.vue'
@ -36,7 +36,7 @@ const taskConfigForm = ref({
asyncBefore: false, asyncBefore: false,
exclusive: false exclusive: false
}) })
const witchTaskComponent = shallowRef() const witchTaskComponent = ref()
const installedComponent = ref({ const installedComponent = ref({
// //
// messageRef // messageRef

View File

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