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