mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-08-14 01:51:53 +08:00
chore: 规范不符合eslint校验规则的代码
This commit is contained in:
@@ -72,14 +72,15 @@ const bpmnElement = ref()
|
||||
const bpmnElementSource = ref()
|
||||
const bpmnElementSourceRef = ref()
|
||||
const flowConditionRef = ref()
|
||||
const bpmnInstances = () => (window as any)?.bpmnInstances
|
||||
const resetFlowCondition = () => {
|
||||
bpmnElement.value = window.bpmnInstances.bpmnElement
|
||||
bpmnElement.value = bpmnInstances().bpmnElement
|
||||
bpmnElementSource.value = bpmnElement.value.source
|
||||
bpmnElementSourceRef.value = bpmnElement.value.businessObject.sourceRef
|
||||
if (
|
||||
bpmnElementSourceRef.value &&
|
||||
bpmnElementSourceRef.value.default &&
|
||||
bpmnElementSourceRef.value.default.id === this.bpmnElement.id
|
||||
bpmnElementSourceRef.value.default.id === bpmnElement.value.id
|
||||
) {
|
||||
// 默认
|
||||
flowConditionForm.value = { type: 'default' }
|
||||
@@ -113,18 +114,18 @@ const resetFlowCondition = () => {
|
||||
const updateFlowType = (flowType) => {
|
||||
// 正常条件类
|
||||
if (flowType === 'condition') {
|
||||
flowConditionRef.value = window.bpmnInstances.moddle.create('bpmn:FormalExpression')
|
||||
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), {
|
||||
flowConditionRef.value = bpmnInstances().moddle.create('bpmn:FormalExpression')
|
||||
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
|
||||
conditionExpression: flowConditionRef.value
|
||||
})
|
||||
return
|
||||
}
|
||||
// 默认路径
|
||||
if (flowType === 'default') {
|
||||
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), {
|
||||
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
|
||||
conditionExpression: null
|
||||
})
|
||||
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElementSource.value), {
|
||||
bpmnInstances().modeling.updateProperties(toRaw(bpmnElementSource.value), {
|
||||
default: bpmnElement.value
|
||||
})
|
||||
return
|
||||
@@ -134,11 +135,11 @@ const updateFlowType = (flowType) => {
|
||||
bpmnElementSourceRef.value.default &&
|
||||
bpmnElementSourceRef.value.default.id === bpmnElement.value.id
|
||||
) {
|
||||
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElementSource.value), {
|
||||
bpmnInstances().modeling.updateProperties(toRaw(bpmnElementSource.value), {
|
||||
default: null
|
||||
})
|
||||
}
|
||||
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), {
|
||||
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
|
||||
conditionExpression: null
|
||||
})
|
||||
}
|
||||
@@ -146,22 +147,22 @@ const updateFlowCondition = () => {
|
||||
let { conditionType, scriptType, body, resource, language } = flowConditionForm.value
|
||||
let condition
|
||||
if (conditionType === 'expression') {
|
||||
condition = window.bpmnInstances.moddle.create('bpmn:FormalExpression', { body })
|
||||
condition = bpmnInstances().moddle.create('bpmn:FormalExpression', { body })
|
||||
} else {
|
||||
if (scriptType === 'inlineScript') {
|
||||
condition = window.bpmnInstances.moddle.create('bpmn:FormalExpression', { body, language })
|
||||
condition = bpmnInstances().moddle.create('bpmn:FormalExpression', { body, language })
|
||||
// this.$set(this.flowConditionForm, "resource", "");
|
||||
flowConditionForm.value['resource'] = ''
|
||||
} else {
|
||||
// this.$set(this.flowConditionForm, "body", "");
|
||||
flowConditionForm.value['body'] = ''
|
||||
condition = window.bpmnInstances.moddle.create('bpmn:FormalExpression', {
|
||||
condition = bpmnInstances().moddle.create('bpmn:FormalExpression', {
|
||||
resource,
|
||||
language
|
||||
})
|
||||
}
|
||||
}
|
||||
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), {
|
||||
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
|
||||
conditionExpression: condition
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user