(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5b3aef70","chunk-2d706637","chunk-de8192b6","chunk-beca18fa","chunk-2d20fa9b","chunk-2d230e19"],{"0059":function(t,e,a){"use strict";a("1240")},"0e83":function(t,e,a){},1240:function(t,e,a){},"2c11":function(t,e,a){"use strict";a("3342")},3342:function(t,e,a){},"34c0":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("command",{attrs:{name:t.command}},[e("icon",{attrs:{type:t.iconType,title:t.text}}),t.label?e("span",[t._v(t._s(t.label))]):t._e()],1)},o=[],i=a("bc4c"),s=a("af3e"),r={name:"EditorToolbarButton",props:["command","icon","text","label"],computed:{iconType:function(){return"icon".concat(this.icon||this.command)}},components:{Command:i["Command"],Icon:s["default"]}},l=r,d=a("2877"),c=Object(d["a"])(l,n,o,!1,null,null,null);e["default"]=c.exports},"4ee7":function(t,e,a){"use strict";a("0e83")},6609:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("toolbar",{staticClass:"toolbar"},[[e("toolbar-button",{attrs:{command:"undo",text:"撤销"}}),e("toolbar-button",{attrs:{command:"redo",text:"重做"}}),e("div",{staticClass:"split"})],e("toolbar-button",{attrs:{command:"zoomIn",icon:"zoom-in",text:"放大"}}),e("toolbar-button",{attrs:{command:"zoomOut",icon:"zoom-out",text:"缩小"}}),e("toolbar-button",{attrs:{command:"autoZoom",icon:"fit",text:"自适应"}}),e("toolbar-button",{attrs:{command:"resetZoom",icon:"actual-size",text:"实际尺寸"}}),[e("div",{staticClass:"split"}),e("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:t.disabledBtn,expression:"disabledBtn"}],attrs:{command:"selectAll",icon:"select-all",text:"全选"}}),e("toolbar-button",{directives:[{name:"shof",rawName:"v-shof",value:t.disabledBtn,expression:"disabledBtn"}],attrs:{command:"multiSelect",icon:"select",text:"框选"}}),t.disabledBtn?e("div",{staticClass:"split"}):t._e(),e("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:t.disabledBtn,expression:"disabledBtn"}],attrs:{command:"delete",text:"删除"}}),e("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:t.disabledBtn,expression:"disabledBtn"}],attrs:{command:"clear",icon:"clear",text:"清空画布"}})],[e("div",{staticClass:"split"}),e("toolbar-button",{attrs:{command:"downloadImage",icon:"image",text:"下载图像"}})],e("el-button",{attrs:{disabled:!t.disabledBtn,icon:"el-icon-check",plain:"",size:"small",type:"success"},on:{click:t.saveClickHandler}},[t._v("保存\n ")]),e("el-button",{attrs:{disabled:!t.disabledBtn,icon:"el-icon-close",plain:"",size:"small",type:"danger"},on:{click:t.removeClickHandler}},[t._v("取消\n ")])],2)},o=[],i=a("bc4c"),s=a("34c0"),r={name:"FlowToolbar",components:{Toolbar:i["Toolbar"],ToolbarButton:s["default"]},props:["chartData","toggleReadOnly"],created:function(){},computed:{disabledBtn:function(){return this.$store.state.flow.methodBtn}},methods:{removeClickHandler:function(){var t=this;this.$confirm("您确认执行取消操作?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$store.dispatch("updateMethodBtn",!1),t.$store.dispatch("typeChange",""),console.log(t.$s)})).catch((function(){t.$message({type:"info",message:"已取消"})}))},saveClickHandler:function(){this.$emit("handler-save")}}},l=r,d=(a("2c11"),a("2877")),c=Object(d["a"])(l,n,o,!1,null,"18b9397a",null);e["default"]=c.exports},"6f36":function(t,e,a){},"759a":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("context-menu",{staticClass:"contextMenu"},[e("node-menu",[e("menu-li",{attrs:{command:"delete",text:"删除"}})],1),e("edge-menu",[e("menu-li",{attrs:{command:"delete",text:"删除"}})],1),e("canvas-menu",[e("menu-li",{attrs:{command:"undo",text:"撤销"}}),e("menu-li",{attrs:{command:"redo",text:"重做"}})],1)],1)},o=[],i=a("bc4c"),s=a("c92d"),r={name:"EditorContextMenu",components:{NodeMenu:i["NodeMenu"],EdgeMenu:i["EdgeMenu"],GroupMenu:i["GroupMenu"],MultiMenu:i["MultiMenu"],CanvasMenu:i["CanvasMenu"],ContextMenu:i["ContextMenu"],MenuLi:s["default"]}},l=r,d=(a("b809"),a("2877")),c=Object(d["a"])(l,n,o,!1,null,"7e9e6a8a",null);e["default"]=c.exports},"75de":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"item_panel_box"},[e("el-input",{attrs:{placeholder:"输入关键字进行过滤",size:"mini"},model:{value:t.filterText,callback:function(e){t.filterText=e},expression:"filterText"}}),e("div",{staticClass:"box_item"},[e("item-panel",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"item-panel"},[t._l(t.nodeItems,(function(a,n){return[e("item",{key:n,attrs:{model:{color:a.color||"#1890FF",label:a.id||"节点"},shape:a.shape||"flow-rect",size:a.size||"72*43",type:a.type||"node"}},[a.src?[e("div",{staticClass:"item item-img"},[e("img",{attrs:{alt:a.id,src:a.src}})])]:[e("div",{class:"item item-"+(a.shape||"flow-rect")},[a.id.length>9?e("el-tooltip",{attrs:{content:a.id,effect:"light",placement:"top"}},[e("span",{staticClass:"spanValue"},[t._v(t._s(a.id))])]):e("span",[t._v(t._s(a.id))])],1)]],2)]}))],2)],1)],1)},o=[],i=(a("6762"),a("2fdb"),a("bc4c")),s={name:"EditorItemPanel",components:{ItemPanel:i["ItemPanel"],Item:i["Item"]},props:{nodeItems:{type:Array,default:function(){return[]}}},data:function(){return{filterText:"",loading:!1}},created:function(){this.loading=!1},computed:{filterNode:function(){var t=this;return this.nodeItems.filter((function(e){return e.id.includes(t.filterText)}))}}},r=s,l=(a("0059"),a("2877")),d=Object(l["a"])(r,n,o,!1,null,"6fbba382",null);e["default"]=d.exports},"97a2":function(t,e,a){"use strict";a("c433")},b51c:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",[e("register-command",{attrs:{name:"generateData",config:t.generateDataCommandConfig,extend:"copy"}}),e("register-command",{attrs:{name:"downloadImage",config:t.downloadImageCommandConfig,extend:"copy"}})],1)},o=[],i=a("bc4c"),s={name:"CustomCommand",components:{RegisterCommand:i["RegisterCommand"]},inject:["root"],props:["save","download"],data:function(){var t=this.root.propsAPI,e=this.save,a=this.download;return{generateDataCommandConfig:{queue:!1,enable:function(){return!0},execute:function(){console.log("执行正向命令");var a=t.save();console.log(a),console.log(JSON.stringify(a)),e(a),alert(JSON.stringify(a))},back:function(){console.log("执行反向命令")}},downloadImageCommandConfig:{queue:!1,enable:function(){return!0},execute:function(){a()},back:function(){}}}}},r=s,l=a("2877"),d=Object(l["a"])(r,n,o,!1,null,null,null);e["default"]=d.exports},b809:function(t,e,a){"use strict";a("6f36")},c433:function(t,e,a){},cfad:function(t,e,a){"use strict";a.r(e);a("7f7f");var n=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"tree_data_box"},[e("el-form",{ref:"form",attrs:{model:t.newRowData,rules:t.rules,"label-width":"80px",size:"mini"}},[e("el-form-item",{attrs:{label:"模板名称",prop:"id"}},[e("el-input",{attrs:{disabled:!t.disabledBtn,maxLength:20,clearable:""},model:{value:t.newRowData.id,callback:function(e){t.$set(t.newRowData,"id","string"===typeof e?e.trim():e)},expression:"newRowData.id"}})],1),e("el-form-item",{attrs:{label:"标签",prop:"name"}},[e("el-input",{attrs:{disabled:!t.disabledBtn,clearable:""},model:{value:t.newRowData.name,callback:function(e){t.$set(t.newRowData,"name","string"===typeof e?e.trim():e)},expression:"newRowData.name"}})],1),e("el-form-item",{attrs:{label:"起始状态",prop:"startStatus"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{disabled:!t.disabledBtn,placeholder:"请选择起始状态"},model:{value:t.newRowData.startStatus,callback:function(e){t.$set(t.newRowData,"startStatus",e)},expression:"newRowData.startStatus"}},t._l(t.existNodes,(function(t){return e("el-option",{key:t.id,attrs:{label:t.id,value:t.id}})})),1)],1),e("el-form-item",{attrs:{label:"描述"}},[e("el-input",{attrs:{disabled:!t.disabledBtn,type:"textarea"},model:{value:t.newRowData.description,callback:function(e){t.$set(t.newRowData,"description","string"===typeof e?e.trim():e)},expression:"newRowData.description"}})],1)],1)],1),e("detail-panel",{scopedSlots:t._u([{key:"default",fn:function(a){var n=a.status;return[e("node-panel",{attrs:{status:n}},[e("detail-form",{ref:"detailFrom",attrs:{type:"node"}})],1),e("edge-panel",{attrs:{status:n}},[e("detail-form",{attrs:{type:"edge"}})],1),e("group-panel",{attrs:{status:n}},[e("detail-form",{attrs:{type:"group"}})],1),"edge-selected"===n?e("div",{staticClass:"event"},[e("hr"),e("h4",[t._v("跃迁事件")]),e("el-select",{ref:"mySelect",staticStyle:{width:"100%"},attrs:{disabled:!t.disabledBtn,multiple:"",size:"mini","value-key":"oid"},on:{change:t.handleChange},model:{value:t.currentSelectedLine.events,callback:function(e){t.$set(t.currentSelectedLine,"events",e)},expression:"currentSelectedLine.events"}},t._l(t.newRowData.eventList,(function(t,a){return e("el-option",{key:a,attrs:{label:t,value:t}})})),1)],1):t._e()]}}])})],1)},o=[],i=(a("ac6a"),a("456d"),a("53ca")),s=(a("96cf"),a("1da1")),r=a("bc4c"),l=a("36f1"),d={name:"EditorDetailPanel",components:{NodePanel:r["NodePanel"],EdgePanel:r["EdgePanel"],GroupPanel:r["GroupPanel"],MultiPanel:r["MultiPanel"],CanvasPanel:r["CanvasPanel"],DetailPanel:r["DetailPanel"],DetailForm:l["default"]},props:["rowData","existNodes","existEdges","type","currentSelectedLine"],data:function(){return{newRowData:{startStatus:void 0,name:void 0,id:void 0,remark:void 0,saveEventList:[]},rules:{name:[{required:!0,message:"标签不能为空",trigger:"blur"}],id:[{required:!0,message:"名称不能为空",trigger:"blur"},{pattern:/^[A-z]+$/g,message:"标签只能输入英文",trigger:"blur"}],startStatus:[{required:!0,message:"起始状态不能为空",trigger:"change"}]},eventList:[{oid:"1",value:"xxx",eventShowName:"xxx"}],edgeEventList:{},currentActive:0}},created:function(){},computed:{disabledBtn:function(){return this.$store.state.flow.methodBtn}},methods:{getNewRowDate:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){e.$refs.form.validate((function(a){t(!!a&&e.newRowData)}))})));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),handleChange:function(t){}},watch:{rowData:{deep:!0,immediate:!0,handler:function(t){"object"===Object(i["a"])(t)&&null!==t&&Object.keys(this.rowData).length>0&&(this.newRowData=Object.assign({},t))}},existNodes:function(t){var e=this,a=t.some((function(t){return t.id===e.newRowData.startStatus}));a||(this.newRowData.startStatus=void 0)}}},c=d,u=(a("97a2"),a("2877")),m=Object(u["a"])(c,n,o,!1,null,"79db3554",null);e["default"]=m.exports},d49b:function(t,e,a){"use strict";a.r(e);a("7f7f");var n=function(){var t=this,e=t._self._c;return e("vue-flowchart-editor",{ref:"flowChart",staticClass:"vue-flowchart-editor"},[e("div",{staticClass:"vfe-chart"},["detail"!==t.type?e("div",{staticClass:"vfe-chart-header"},[e("editor-toolbar",{attrs:{"chart-data":t.chartData},on:{"handler-save":t.handlerSave,"reset-tree":t.handleResetTree}})],1):t._e(),e("div",{staticClass:"vfe-chart-container"},[t.disabledBtn?e("div",{staticClass:"vfe-chart-sidebar"},[e("editor-item-panel",{attrs:{"node-items":t.chartDataNodeItems}})],1):t._e(),e("div",{staticClass:"vfe-chart-main"},[e("flow",{attrs:{data:t.chartData,onAfterChange:t.onAfterChange,onAfterItemSelected:t.onAfterItemSelected}}),e("div",{staticClass:"tooltip"},[t._l(t.tooltipData,(function(a){return[e("p",[t._v(t._s(a.name)+": "+t._s(a.value))])]}))],2),t.disabledBtn?t._e():e("div",{staticClass:"mask"})],1),e("div",{staticClass:"vfe-chart-panel"},[e("div",{staticClass:"vfe-chart-panel-detail"},[e("editor-detail-panel",{ref:"EditorDetailPanel",attrs:{currentSelectedLine:t.currentSelectedLine,existEdges:t.existEdges,existNodes:t.existNodes,rowData:t.rowData,type:t.type}})],1)])])]),"detail"!==t.type?e("editor-context-menu"):t._e(),e("register-edge",{attrs:{config:t.customEdgeConfig,extend:"flow-polyline",name:"custom-polyline"}}),e("custom-command",{attrs:{download:t.downloadImage}})],1)},o=[],i=a("bc4c"),s=a.n(i),r=a("6609"),l=a("75de"),d=a("cfad"),c=a("edbf"),u=a("759a"),m=a("b51c"),f={name:"FlowchartEditor",components:{VueFlowchartEditor:s.a,Flow:i["Flow"],EditorToolbar:r["default"],EditorItemPanel:l["default"],EditorDetailPanel:d["default"],EditorMinimap:c["default"],EditorContextMenu:u["default"],CustomCommand:m["default"],RegisterEdge:i["RegisterEdge"]},props:["chartData","chartDataNodeItems","saveData","rowData","type"],data:function(){return{flowChartData:{},customEdgeConfig:{getActivedStyle:function(){return{lineWidth:3}},getSelectedStyle:function(){return{lineWidth:3}}},tooltipShow:!0,tooltipData:[],existNodes:this.chartData.nodes||[],existEdges:this.chartData.edges||[],currentSelectedLine:{}}},computed:{disabledBtn:function(){return this.$store.state.flow.methodBtn}},mounted:function(){var t=this;"add"===this.type&&this.$nextTick((function(){t.$refs.flowChart.propsAPI.executeCommand("autoZoom")}))},methods:{update:function(){this.$refs.flowChart.propsAPI.read(this.flowChartData)},onAfterChange:function(t){try{"add"===t.action&&"node"===t.model.type&&(t.model.change||(this.$refs.flowChart.propsAPI.remove(t.item),t.model.id=t.model.label,t.model.change=!0,this.$refs.flowChart.propsAPI.add("node",t.model)))}catch(o){o.message==="id:".concat(t.model.label," has already been set, please set new one")&&this.$message.error("不能添加已存在的节点!")}var e=this.$refs.flowChart.propsAPI.save(),a=e.nodes,n=e.edges;this.existNodes=a||[],this.existEdges=n||[]},onAfterItemSelected:function(t){var e=t.item;if(e.target){var a=this.existEdges.filter((function(t){return t.id===e.id}))[0]||{};Array.isArray(a.events)||(a.events=[]),this.currentSelectedLine=a}},_downloadImage:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flowchart.png",a=document.createElement("a");a.href=t,a.download=e,document.body.appendChild(a),a.click()},downloadImage:function(){var t=this.$refs["flowChart"].propsAPI.editor.getCurrentPage();this._downloadImage(t.saveImage().toDataURL("image/png"))},getNewRowData:function(){return this.$refs.EditorDetailPanel.getNewRowDate()},getFlowData:function(){return this.$refs.flowChart.propsAPI.save()},getEdgesEvents:function(){return this.$refs.EditorDetailPanel.edgeEventList},handleResetTree:function(){this.$emit("reset-tree")},handlerSave:function(){this.$emit("handler-save")}}},p=f,h=(a("4ee7"),a("2877")),v=Object(h["a"])(p,n,o,!1,null,"532ec11f",null);e["default"]=v.exports},edbf:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("minimap",{attrs:{height:200}})},o=[],i=a("bc4c"),s={name:"EditorMinimap",components:{Minimap:i["Minimap"]}},r=s,l=a("2877"),d=Object(l["a"])(r,n,o,!1,null,null,null);e["default"]=d.exports}}]);
|