when unselected form, popup alert.

This commit is contained in:
cxc
2023-01-05 10:02:46 +08:00
parent a73aec666f
commit 72556f3cd6

View File

@ -94,39 +94,21 @@ function goToFormSelect() {
)?.businessObject?.formKey ?? false; )?.businessObject?.formKey ?? false;
if (!formKeyExist) { if (!formKeyExist) {
// msgInstance?.close();
ElMessageBox.alert("请为开始节点选择表单", "未选择表单", { ElMessageBox.alert("请为开始节点选择表单", "未选择表单", {
confirmButtonText: "去选择", confirmButtonText: "去选择",
callback: () => { icon: "warning",
})
.then(() => {
const startEle = window.bpmnInstances.elementRegistry.find( const startEle = window.bpmnInstances.elementRegistry.find(
(el) => el.type == "bpmn:StartEvent" (el) => el.type == "bpmn:StartEvent"
); );
const EventBus = window.bpmnInstances.eventBus; const EventBus = window.bpmnInstances.eventBus;
if (element.type != "bpmn:StartEvent") { startEle && EventBus.fire("element.click", { element: startEle });
console.log(bmpnProcessPenalRef.value); nextTick(() => {
startEle && EventBus.fire("element.click", { element: startEle }); bmpnProcessPenalRef.value.openFormColla();
nextTick(() => { });
bmpnProcessPenalRef.value.openFormColla(); })
}); .catch(() => {});
}
},
});
// return;
// msgInstance = ElMessage.warning({
// message: "请为开始节点选择表单",
// showClose: true,
// duration: 0,
// onClose: () => {
// const startEle = window.bpmnInstances.elementRegistry.find(
// (el) => el.type == "bpmn:StartEvent"
// );
// const EventBus = window.bpmnInstances.eventBus;
// if (element.type != "bpmn:StartEvent") {
// startEle && EventBus.fire("element.click", { element: startEle });
// }
// // startEle && bmpnProcessPenalRef.value.initFormOnChanged(startEle);
// },
// });
} }
} }
function onSaveProcess(saveData) { function onSaveProcess(saveData) {