|
|
@@ -64,9 +64,7 @@ export default {
|
|
|
asyncBefore: false,
|
|
|
exclusive: false
|
|
|
},
|
|
|
- loopInstanceForm: {
|
|
|
- completionCondition:''
|
|
|
- }
|
|
|
+ loopInstanceForm: {}
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -114,17 +112,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
changeLoopCharacteristicsType(type) {
|
|
|
- this.loopInstanceForm.completionCondition = ''
|
|
|
// this.loopInstanceForm = { ...this.defaultLoopInstanceForm }; // 切换类型取消原表单配置
|
|
|
// 取消多实例配置
|
|
|
if (type === "Null") {
|
|
|
- window.bpmnInstances.modeling.updateProperties(this.bpmnElement, { loopCharacteristics: null });
|
|
|
- return;
|
|
|
- }
|
|
|
- // 并行
|
|
|
- if (type === "ParallelMultiInstance") {
|
|
|
- this.loopInstanceForm.completionCondition = '${ nrOfCompletedInstances == 1 }'
|
|
|
- this.updateLoopCondition(this.loopInstanceForm.completionCondition)
|
|
|
+ window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {loopCharacteristics: null});
|
|
|
return;
|
|
|
}
|
|
|
// 配置循环
|
|
|
@@ -138,9 +129,9 @@ export default {
|
|
|
}
|
|
|
// 时序
|
|
|
if (type === "SequentialMultiInstance") {
|
|
|
- this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", { isSequential: true });
|
|
|
+ this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", {isSequential: true});
|
|
|
} else {
|
|
|
- this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", { collection: "${coll_userList}" });
|
|
|
+ this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", {collection: "${coll_userList}"});
|
|
|
}
|
|
|
window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
|
|
|
loopCharacteristics: this.multiLoopInstance
|
|
|
@@ -150,17 +141,17 @@ export default {
|
|
|
updateLoopCardinality(cardinality) {
|
|
|
let loopCardinality = null;
|
|
|
if (cardinality && cardinality.length) {
|
|
|
- loopCardinality = window.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: cardinality });
|
|
|
+ loopCardinality = window.bpmnInstances.moddle.create("bpmn:FormalExpression", {body: cardinality});
|
|
|
}
|
|
|
- window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, { loopCardinality });
|
|
|
+ window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, {loopCardinality});
|
|
|
},
|
|
|
// 完成条件
|
|
|
updateLoopCondition(condition) {
|
|
|
let completionCondition = null;
|
|
|
if (condition && condition.length) {
|
|
|
- completionCondition = window.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: condition });
|
|
|
+ completionCondition = window.bpmnInstances.moddle.create("bpmn:FormalExpression", {body: condition});
|
|
|
}
|
|
|
- window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, { completionCondition });
|
|
|
+ window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, {completionCondition});
|
|
|
},
|
|
|
// 重试周期
|
|
|
updateLoopTimeCycle(timeCycle) {
|
|
|
@@ -171,7 +162,7 @@ export default {
|
|
|
})
|
|
|
]
|
|
|
});
|
|
|
- window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, { extensionElements });
|
|
|
+ window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, {extensionElements});
|
|
|
},
|
|
|
// 直接更新的基础信息
|
|
|
updateLoopBase() {
|
|
|
@@ -182,11 +173,11 @@ export default {
|
|
|
},
|
|
|
// 各异步状态
|
|
|
updateLoopAsync(key) {
|
|
|
- const { asyncBefore, asyncAfter } = this.loopInstanceForm;
|
|
|
+ const {asyncBefore, asyncAfter} = this.loopInstanceForm;
|
|
|
let asyncAttr = Object.create(null);
|
|
|
if (!asyncBefore && !asyncAfter) {
|
|
|
this.$set(this.loopInstanceForm, "exclusive", false);
|
|
|
- asyncAttr = { asyncBefore: false, asyncAfter: false, exclusive: false, extensionElements: null };
|
|
|
+ asyncAttr = {asyncBefore: false, asyncAfter: false, exclusive: false, extensionElements: null};
|
|
|
} else {
|
|
|
asyncAttr[key] = this.loopInstanceForm[key];
|
|
|
}
|