(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1ead6ee3"],{"5b3d":function(A,e,t){},ce66:function(A,e,t){"use strict";t.r(e);var o=function(){var A=this,e=A.$createElement,t=A._self._c||e;return t("div",{staticClass:"flow-editor"},[t("div",{staticClass:"toolbar"},[t("el-button-group",[t("el-button",{attrs:{size:"small"},on:{click:A.downloadImage}},[A._v("导出图片")]),t("el-button",{attrs:{size:"small"},on:{click:A.saveData}},[A._v("保存数据")]),t("el-button",{attrs:{size:"small"},on:{click:A.clearGraph}},[A._v("清空画布")]),t("el-button",{attrs:{size:"small"},on:{click:A.undo}},[A._v("撤销")]),t("el-button",{attrs:{size:"small"},on:{click:A.redo}},[A._v("重做")])],1)],1),t("div",{staticClass:"bpmn-example-container"},[t("div",{staticClass:"dnd-panel"}),t("div",{ref:"logicContainer",staticClass:"viewport"})])])},n=[],i=t("5530"),a=(t("d9e2"),t("d3b7"),t("0643"),t("4e3e"),t("159b"),t("5e90")),l=t.n(a),s=t("eb21"),r=(t("7692"),t("417c"),{data:function(){return{lf:null,config:{stopScrollGraph:!1,stopZoomGraph:!1,metaKeyMultipleSelected:!0,grid:{size:10,type:"dot"},keyboard:{enabled:!0},snapline:!0,background:{color:"#f7f9ff"},nodeTextEdit:!0,edgeTextEdit:!0,plugins:[s["b"],s["a"],s["c"],s["d"]]}}},mounted:function(){var A=this;this.$nextTick((function(){setTimeout((function(){A.initLogicFlow()}),500)}))},methods:{initLogicFlow:function(){try{var A=this.$refs.logicContainer;if(!A)throw new Error("找不到画布容器元素");this.lf=new l.a(Object(i["a"])(Object(i["a"])({container:A},this.config),{},{pluginOptions:{dndPanel:{enable:!0,container:"#dnd-panel"}}})),console.log("flow",this.lf),this.registerNode(),this.lf.render(),this.initDndPanel(),console.log("LogicFlow和插件初始化成功")}catch(e){console.error("LogicFlow初始化失败:",e)}},initDndPanel:function(){try{if(!this.lf)throw new Error("LogicFlow实例未创建");console.log(this.lf);var A=this.lf.extension.dndPanel;if(!A)throw new Error("DndPanel插件未正确加载");A.setPatternItems([{label:"开始节点",type:"start",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADWSURBVDhPY2AYNKCoqIgTiOcD8X8gBgFkOQZSDDwPxH+B+D8Qg8B9IP4MxLNhgkgG/gNiEAAZtBaI1wPxByA+DsT3gPgWEF8C4t1AbAnEbDADQRjEwQVABlEKQAY+ggpjA8+BeDkQGwGxGhA/hSrBBj4B8SwgVgViYySsjST3FYjPAjE/ELMiYTmomZ+A+AcQXwBiNiRsDjXzH9RQOAAZxoWEQeAzEP8G4mtAzIuEdaFmwg2kBEANfQPEF4GYDwmDXPsbauZqICbJUFIww+C2/QBif2ocCQBT+3tCYGwpmwAAAABJRU5ErkJggg==",properties:{}},{label:"结束节点",type:"end",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADWSURBVDhPY2AYNKCoqIgTiOcD8X8gBgFkOQZSDDwPxH+B+D8Qg8B9IP4MxLNhgkgG/gNiEAAZtBaI1wPxByA+DsT3gPgWEF8C4t1AbAnEbDADQRjEwQVABlEKQAY+ggpjA8+BeDkQGwGxGhA/hSrBBj4B8SwgVgViYySsjST3FYjPAjE/ELMiYTmomZ+A+AcQXwBiNiRsDjXzH9RQOAAZxoWEQeAzEP8G4mtAzIuEdaFmwg2kBEANfQPEF4GYDwmDXPsbauZqICbJUFIww+C2/QBif2ocCQBT+3tCYGwpmwAAAABJRU5ErkJggg==",properties:{}},{label:"普通节点",type:"rect",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAsSURBVDhPY2AYBaOA5gDIpxN5/x/CwQKQJUYBPWLYqIGjBo4aOGrg4DUQAPo5DuFWOqnJAAAAAElFTkSuQmCC",properties:{}},{label:"判断节点",type:"diamond",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA7SURBVDhPY2AYBaOAKMDIyPgfi4QYEhsrIC6Q/v//j1UBshyyHF6ArIBxNFBHA3U0UEcDdTRQRwN1GAAAWsMsD2BZkH8AAAAASUVORK5CYII=",properties:{}}]),console.log("DndPanel初始化成功")}catch(e){console.error("DndPanel初始化失败:",e)}},registerNode:function(){var A=this;try{if(!this.lf)throw new Error("LogicFlow实例未创建");var e=[{type:"start",view:StartNode,model:StartNodeModel},{type:"end",view:EndNode,model:EndNodeModel}];e.forEach((function(e){var t=e.type,o=e.view,n=e.model;A.lf.register({type:t,view:o,model:n})})),console.log("节点注册成功")}catch(t){console.error("节点注册失败:",t)}},downloadImage:function(){this.lf.getSnapshot()},saveData:function(){var A=this.lf.getGraphData();console.log("流程数据",A)},clearGraph:function(){this.lf.clearData()},undo:function(){this.lf.undo()},redo:function(){this.lf.redo()}},beforeDestroy:function(){this.lf&&(this.lf.dispose(),this.lf=null)}}),c=r,d=(t("ff57"),t("2877")),g=Object(d["a"])(c,o,n,!1,null,"5418fa32",null);e["default"]=g.exports},ff57:function(A,e,t){"use strict";t("5b3d")}}]);