报错基本解决,数据绑定还有些错误

This commit is contained in:
gexinzhineng/gxzn27
2023-01-28 17:42:19 +08:00
parent 3ce663c7a5
commit b704aae49b
16 changed files with 171 additions and 132 deletions

View File

@@ -50,7 +50,7 @@
</template>
<script setup lang="ts" name="ReceiveTask">
import { ref, watch, onBeforeUnmount, onMounted, nextTick } from 'vue'
import { ref, watch, onBeforeUnmount, onMounted, nextTick, toRaw } from 'vue'
import { ElMessage, ElFormItem, ElDialog, ElForm, ElSelect, ElOption } from 'element-plus'
const props = defineProps({
id: String,
@@ -85,11 +85,11 @@ const createNewMessage = () => {
}
const updateTaskMessage = (messageId) => {
if (messageId === '-1') {
window.bpmnInstances.modeling.updateProperties(bpmnElement.value, {
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), {
messageRef: null
})
} else {
window.bpmnInstances.modeling.updateProperties(bpmnElement.value, {
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), {
messageRef: bpmnMessageRefsMap.value[messageId]
})
}

View File

@@ -45,7 +45,7 @@
</template>
<script setup lang="ts" name="ScriptTask">
import { ref, watch, nextTick, onBeforeUnmount } from 'vue'
import { ref, watch, nextTick, onBeforeUnmount, toRaw } from 'vue'
import { ElInput, ElFormItem } from 'element-plus'
const props = defineProps({
id: String,
@@ -78,7 +78,7 @@ const updateElementTask = () => {
taskAttr.resource = scriptTaskForm.value.resource || null
taskAttr.script = null
}
window.bpmnInstances.modeling.updateProperties(bpmnElement.value, taskAttr)
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), taskAttr)
}
onBeforeUnmount(() => {

View File

@@ -38,7 +38,7 @@
</template>
<script setup lang="ts" name="UserTask">
import { ref, watch, nextTick, onBeforeUnmount } from 'vue'
import { ref, watch, nextTick, onBeforeUnmount, toRaw } from 'vue'
import { ElLink, ElFormItem, ElInput } from 'element-plus'
const props = defineProps({
id: String,
@@ -78,7 +78,7 @@ const updateElementTask = (key) => {
} else {
taskAttr[key] = userTaskForm.value[key] || null
}
window.bpmnInstances.modeling.updateProperties(bpmnElement.value, taskAttr)
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), taskAttr)
}
watch(