chore: 规范不符合eslint校验规则的代码

This commit is contained in:
Siyu Kong
2023-02-21 18:29:27 +08:00
parent 2ec6978400
commit f2f564dc0c
24 changed files with 127 additions and 97 deletions

View File

@@ -64,8 +64,9 @@ const bpmnElement = ref<any>()
const bpmnMessageRefsMap = ref<any>()
const bpmnRootElements = ref<any>()
const bpmnInstances = () => (window as any).bpmnInstances
const getBindMessage = () => {
bpmnElement.value = window.bpmnInstances.bpmnElement
bpmnElement.value = bpmnInstances().bpmnElement
bindMessageId.value = bpmnElement.value.businessObject?.messageRef?.id || '-1'
}
const openMessageModel = () => {
@@ -77,7 +78,7 @@ const createNewMessage = () => {
message.error('该消息已存在请修改id后重新保存')
return
}
const newMessage = window.bpmnInstances.moddle.create('bpmn:Message', newMessageForm.value)
const newMessage = bpmnInstances().moddle.create('bpmn:Message', newMessageForm.value)
bpmnRootElements.value.push(newMessage)
messageMap.value[newMessageForm.value.id] = newMessageForm.value.name
bpmnMessageRefsMap.value[newMessageForm.value.id] = newMessage
@@ -85,11 +86,11 @@ const createNewMessage = () => {
}
const updateTaskMessage = (messageId) => {
if (messageId === '-1') {
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), {
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
messageRef: null
})
} else {
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), {
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
messageRef: bpmnMessageRefsMap.value[messageId]
})
}
@@ -97,7 +98,7 @@ const updateTaskMessage = (messageId) => {
onMounted(() => {
bpmnMessageRefsMap.value = Object.create(null)
bpmnRootElements.value = window.bpmnInstances.modeler.getDefinitions().rootElements
bpmnRootElements.value = bpmnInstances().modeler.getDefinitions().rootElements
bpmnRootElements.value
.filter((el) => el.$type === 'bpmn:Message')
.forEach((m) => {
@@ -113,7 +114,7 @@ onBeforeUnmount(() => {
watch(
() => props.id,
() => {
// bpmnElement.value = window.bpmnInstances.bpmnElement
// bpmnElement.value = bpmnInstances().bpmnElement
nextTick(() => {
getBindMessage()
})