no start event node warning
This commit is contained in:
@ -35,7 +35,7 @@ import "@/plugins/package/theme/index.scss";
|
||||
import CustomContentPadProvider from "@/plugins/package/designer/plugins/content-pad";
|
||||
import CustomPaletteProvider from "@/plugins/package/designer/plugins/palette";
|
||||
import { ref, nextTick, reactive, toRefs } from "vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
|
||||
const props = defineProps({
|
||||
bpmnXml: {
|
||||
@ -49,7 +49,6 @@ const props = defineProps({
|
||||
});
|
||||
const { bpmnXml, designerForm } = toRefs(props);
|
||||
let element;
|
||||
let msgInstance;
|
||||
const modeler = ref(null);
|
||||
const height = ref(document.documentElement.clientHeight - 94.5 + "px;");
|
||||
const xmlString = ref(bpmnXml.value);
|
||||
@ -88,6 +87,14 @@ function handlerEvent(eventName) {
|
||||
|
||||
function goToFormSelect() {
|
||||
if (!window.bpmnInstances) return;
|
||||
const startEle = window.bpmnInstances.elementRegistry.find(
|
||||
(el) => el.type == "bpmn:StartEvent"
|
||||
);
|
||||
if (!startEle) {
|
||||
ElMessage.warning("请添加开始节点");
|
||||
return;
|
||||
}
|
||||
|
||||
const formKeyExist =
|
||||
!!window.bpmnInstances.elementRegistry.find(
|
||||
(el) => el.type == "bpmn:StartEvent"
|
||||
@ -99,9 +106,6 @@ function goToFormSelect() {
|
||||
icon: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
const startEle = window.bpmnInstances.elementRegistry.find(
|
||||
(el) => el.type == "bpmn:StartEvent"
|
||||
);
|
||||
const EventBus = window.bpmnInstances.eventBus;
|
||||
startEle && EventBus.fire("element.click", { element: startEle });
|
||||
nextTick(() => {
|
||||
|
Reference in New Issue
Block a user