{"version":3,"sources":["webpack:///./src/lib/flow/images/complete_tasks_256.png","webpack:///./src/pages/flow/ProcessDesignPage.vue?a5b0","webpack:///./src/pages/flow/ProcessDesignPage.vue?d968","webpack:///src/pages/flow/ProcessDesignPage.vue","webpack:///./src/pages/flow/ProcessDesignPage.vue?aac2","webpack:///./src/pages/flow/ProcessDesignPage.vue","webpack:///./src/lib/flow/flow.js"],"names":["module","exports","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","_v","_s","$t","on","addData","startWork","stopWork","ref","tableData","handleRowChange","scopedSlots","_u","key","fn","scope","getStateValue","row","EnabledMark","$event","editView","Id","pageSize","pageTotal","_nowPageSize","changePage","styles","model","value","callback","$$v","showViewModel","expression","staticStyle","currentStep","flowInstance","ruleValidate","isRead","$set","selectFlow","_l","item","ItemDetailId","ItemName","isDelFlow","prevStep","nextStep","submitFlow","titleNodeName","showViewNode","nodeBaseInfo","ruleNode","changeAuthorizeType","yang","nodeSave","showViewLine","addPositionLine","deletePositionLine","lineSearchName","Query","slot","lineData","lineColumns","lineSave","staticRenderFns","data","code","console","log","res","state","Error","name","showDeleteTips","searchName","switchAdvancedSearch","isAdvancedSearch","isSave","frmapp","formType","schemeType","allAuthorizeCheckData","shcemeAuthorizeData","schemeContentOld","frmData","flowData","SchemeContent","isSystemTable","FrmDbId","FrmTable","FrmName","FrmContent","FrmTableId","FrmId","SchemeInfoId","InfoEntity","flowDesignPanel","flowDesignObject","nodelist","node","lineFieldValue","lineobject","tableSelection","currentRow","schemeInfoId","pageCurrent","SchemeTypeTips","NodeCodeTips","NodeNameTips","height","overflow","paddingBottom","position","padding","nodeRejectType","nodeRejectStep","SchemeCode","SchemeName","SchemeType","NodeCode","NodeName","inject","mounted","kw","eventBus","$on","mockTableData","FlowPanel","$frmpreview","attr","html","defaults","flowcontent","frmtype","width","OpenNode","OpenLine","NodeRemarks","cursor","that","direct","startround","endround","stepnode","shuntnode","confluencenode","group","haveTool","toolBtns","isprocessing","nodeData","baseData","activityId","preview","options","haveHead","headBtns","haveGroup","useOperStack","setNodeRemarks","loadData","window","exportDataEx","_data","exportData","_fromlines","i","lines","undefined","from","push","to","_tolines","j","nodes","_node","_flag","type","_startroundFlag","id","message","error","_endroundFlag","_fnodes","_hnodes","labellingRedNode","_nodes","length","a","aNondeid","_hhnodeid","b","btoNode","_nextLine","_nextNode","SetNodeEx","setName","SetLineEx","LineName","tipHtml","find","css","remove","append","setInfo","Taged","tagname","NodeDesignateData","_row","userInfo","user","forEach","userData","userId","role","roleData","roleId","newArr","indexOf","strUser","substr","_frmitems","_frmitem","control_field","control_label","DataBaseLinkData","url","dataType","async","success","items","rows","DatabaseLinkId","DBAlias","$message","errorThrown","_NodeRejectType","0","1","2","3","4","_NodeIsOver","_NodeDesignate","NodeDesignateType1","NodeDesignateType2","NodeDesignateType3","NodeDesignateType4","NodeDesignateType5","NodeDesignateType6","_NodeConfluenceType","_popoverhtml","Description","NodeConfluenceType","NodeDataBase","NodeTable","NodePram","_rowstr","_postitem","_one","top","clientroleData","_item","frmPermissionInfo","_downtext","down","NodeSQL","popover","addClass","methods","TypeId","param","pagination","page","sidx","sord","keyword","records","search","advancedSearch","handleReset","$refs","resetFields","getFlowType","initFlowInfo","loadFormData","postdata","result","schemeinfo","schemecontent","initSchemeAuthorize","bindingSchemeAuthorize","AuthorizeType","_roleData","_postData","_userGroupData","_userData","apply","String","flag","bindingFlow","_content","JSON","stringify","Frm","Flow","object","$nodeData","$focus","initLoadNodeData","initNodeControl","$lineData","_fromNode","FrmType","frmCotent","parse","nodePramData","label","column","remark","ConditionJson","setFlowInfo","callBackNode","callBackLine","changeNodeReject","NodeDesignate","GetDesignateMemberTree","setTimeout","_NodeCode","addTree","tree","children","title","text","expand","disabled","getParentArry","arry","parentId","parentnodes","treeArray","ChildNodes","reqUrl","GetNodeTree","reqUrl1","showcheck","oncheckboxclick","$item","et","mytype","_html","show","hide","FieldId","FieldName","FilterId","FilterName","FilterValue","Logic","pop","conditionValueJson","tdData","ParamName","Operation","ParamValue","postData","ConditionValueJson","parseInt","params","infoEntity","contentEntity","e","deleteView","deleteCancel","index","sel_Table","selection","enabledmark","component","GooFlow","bgDiv","property","navigator","userAgent","prototype","useSVG","$id","$bgDiv","$tool","$head","$title","$nodeRemark","$nowType","$lineCount","$nodeCount","$areaData","$areaCount","$lineDom","$nodeDom","$areaDom","$max","initNum","$cursor","$editable","$deletedItem","headHeight","tmp","initLabelText","x","$","onBtnNewClick","onBtnOpenClick","onBtnSaveClick","onFreshClick","inthis","event","tar","target","tagName","childNode","This","undo","redo","toolWidth","split","parentNode","switchToolBtn","$workArea","$draw","initDraw","$group","initGroup","X","Y","ev","mousePosition","t","getElCoordinate","left","scrollLeft","y","scrollTop","executeadd","_nodeData","each","alert","addNode","img","n","prop","blurItem","mousemove","lineStart","line","document","getElementById","childNodes","setAttribute","getAttribute","points","mouseup","removeData","removeChild","initWorkForNode","$ghost","$textArea","$lineMove","button","lm","p","vX","vY","isMove","onmousemove","onmouseup","setLineM","focusItem","$lineOper","delLine","style","display","setLineType","onItemAdd","onItemDel","onItemMove","onItemRename","onItemFocus","onItemBlur","onItemResize","onLineMove","onLineSetType","onItemMark","$undoStack","$redoStack","$isUndo","pushOper","funcName","paras","shift","splice","pushExternalOper","func","jsonPara","keydown","keyCode","delNode","dom","offsetTop","l","offsetLeft","offsetParent","pageX","pageY","clientX","documentElement","body","clientLeft","clientY","clientTop","getSvgMarker","color","m","createElementNS","path","appendChild","prepend","defs","createElement","coordsize","insertBefore","tmpClk","delegate","val","hack","empty","resizeArea","outerWidth","outerHeight","moveArea","oldTxt","innerHTML","focus","parent","one","delArea","setAreaColor","addArea","removeClass","json","mark","ua","toLowerCase","alt","Dom","parents","clone","prependTo","moveNode","drawLine","addLine","hasClass","cancelBubble","stopPropagation","resizeNode","getItemInfo","jq","marked","strokeColor","bool","M","resetLines","setinfo","oldName","textContent","Min","offsetWidth","k","setTitle","areas","loadDataAjax","para","ajax","msg","dataFilter","XMLHttpRequest","textStatus","ret","_nodeobject","_lineobject","k1","k2","exportAlter","k3","deletedItem","transNewId","oldId","newId","clearData","destrory","sp","ep","dash","hi","strokeWeight","stroke","EndArrow","dashstyle","drawPoly","m1","m2","poly","strPath","filled","calcStartEnd","n1","n2","X_1","Y_1","X_2","Y_2","x11","x12","x21","x22","y11","y12","y21","y22","calcPolyPoints","SP","EP","start","end","getMValue","mType","offsetHeight","other","newType","para2","noStack","ps","markItem","$undoStatck","reinitSize","w","h","extend","createGooFlow","ComboBox","$select","$select_html","description","allowSearch","$option_html","$option","loadComboBoxView","dialogMsg","click","data_text","data_value","slideUp","trigger","hover","toggleClass","searchValue","$_html","bind","select","unbind","is","offset","slideDown","_top","srcElement","ComboBoxSetValue","isNullOrEmpty","Date","DateAdd","strInterval","Number","dtTmp","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","obj","standTabchange","forid","arrayClone","map","newGuid","guid","Math","floor","random","toString","swapClass","c1","c2","switchClass","treeview","settings","dfop","method","datatype","cbiconpath","icons","onnodeclick","cascadecheck","clicktoggle","theme","isTool","nodeTools","treenodes","me","getTime","slimscroll","buildtree","join","InitEvent","im","Image","src","ht","buildnode","asnyloadc","unshift","nd","deep","isend","nid","replace","cs","hasChildren","isexpand","classes","checkstate","ii","toolItem","render","getItem","ap","check","pstate","ch","cascade","args","len","bubble","nodeclick","ul","next","complete","asnybuild","s","r","call","citem","expandnode","pnode","visibility","prev","isAsync","builparam","encodeURIComponent","bindevent","reflash","itemId","li","getck","c","getCkAndHalfCk","getSelectedNodes","gethalfchecknode","getSelectedValues","getCurrentItem","itemOrItemId","getCheckedNodes","getCheckedAllNodes","_length","trim","_src","lastIndexOf","_value","substring","setCheckedNodes","setCheckedNodeOne","setNoCheckedNodes","getTSNs","getCurrentNode","ItemOrItemId","setTreeHeight","setNodeChecked","refreshNode","refreshNodeIcon","icon","_classs","_aa","removeAttr","jQuery"],"mappings":"qGAAAA,EAAOC,QAAU,IAA0B,uC,oCCA3C,yBAAkgB,EAAG,G,y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,KAAM,MAAOrhB,KAAK,KAGxE,QAAYhC,GAARmI,EAAmB,CACnB,IAAImf,EAAU5e,EAAOjL,KAAK,SACtB8pB,EAAM7Z,EAAI1L,KAAKmG,GACnBof,EAAIC,WAAW,SACfD,EAAInhB,SAASkhB,GAIjB5e,EAAO8e,WAAW,SAClB9e,EAAOtC,SAASihB,IAjrBxB,CAmrBGI,K","file":"js/chunk-4730cb04.277a85b8.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/complete_tasks_256.37385591.png\";","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProcessDesignPage.vue?vue&type=style&index=0&id=3b5ba6ce&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProcessDesignPage.vue?vue&type=style&index=0&id=3b5ba6ce&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container\",attrs:{\"id\":\"productList\"}},[_c('section',{staticClass:\"toolBar\"},[_c('h5',[_c('el-breadcrumb',{attrs:{\"separator-class\":\"el-icon-arrow-right\"}},[_c('el-breadcrumb-item',[_c('a',[_vm._v(_vm._s(_vm.$t(\"label.flowdesign\")))])])],1)],1),_c('div',{staticClass:\"right\"},[_c('el-button-group',[_c('el-button',{attrs:{\"type\":\"primary\",\"icon\":\"el-icon-circle-plus-outline\"},on:{\"click\":_vm.addData}},[_vm._v(_vm._s(_vm.$t(\"btn.add\")))])],1),_c('el-button-group',[_c('el-button',{attrs:{\"type\":\"primary\",\"icon\":\"el-icon-circle-check\"},on:{\"click\":_vm.startWork}},[_vm._v(_vm._s(_vm.$t(\"btn.enable\")))])],1),_c('el-button-group',[_c('el-button',{attrs:{\"type\":\"primary\",\"icon\":\"el-icon-circle-close\"},on:{\"click\":_vm.stopWork}},[_vm._v(_vm._s(_vm.$t(\"btn.disable\")))])],1)],1)]),_c('section',{staticClass:\"content\"},[_c('br'),_c('el-row',[_c('el-table',{ref:\"selection\",attrs:{\"data\":_vm.tableData,\"highlight-current-row\":\"\",\"cell-style\":{ 'text-align': 'center' }},on:{\"row-click\":_vm.handleRowChange}},[_c('el-table-column',{attrs:{\"prop\":\"SchemeCode\",\"sortable\":\"\",\"label\":_vm.$t('label.ProcessNumber'),\"width\":\"180\",\"header-align\":\"center\"}}),_c('el-table-column',{attrs:{\"prop\":\"SchemeName\",\"sortable\":\"\",\"label\":_vm.$t('columns.processname'),\"width\":\"200\",\"header-align\":\"center\"}}),_c('el-table-column',{attrs:{\"prop\":\"SchemeTypeName\",\"sortable\":\"\",\"label\":_vm.$t('columns.classify'),\"width\":\"150\",\"header-align\":\"center\"}}),_c('el-table-column',{attrs:{\"prop\":\"EnabledMark\",\"label\":_vm.$t('columns.status'),\"width\":\"70\",\"header-align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(\" \"+_vm._s(_vm.getStateValue(scope.row.EnabledMark))+\" \")]}}])}),_c('el-table-column',{attrs:{\"prop\":\"ModifyUserName\",\"sortable\":\"\",\"label\":_vm.$t('columns.editUser'),\"width\":\"150\",\"header-align\":\"center\"}}),_c('el-table-column',{attrs:{\"prop\":\"ModifyDate\",\"sortable\":\"\",\"label\":_vm.$t('columns.editTime'),\"width\":\"180\",\"header-align\":\"center\"}}),_c('el-table-column',{attrs:{\"prop\":\"CreateUserName\",\"sortable\":\"\",\"label\":_vm.$t('label.createuser'),\"width\":\"100\",\"header-align\":\"center\"}}),_c('el-table-column',{attrs:{\"prop\":\"CreateDate\",\"sortable\":\"\",\"label\":_vm.$t('label.createtime'),\"width\":\"180\",\"header-align\":\"center\"}}),_c('el-table-column',{attrs:{\"prop\":\"Description\",\"sortable\":\"\",\"label\":_vm.$t('columns.remarks'),\"header-align\":\"center\"}}),_c('el-table-column',{attrs:{\"fixed\":\"right\",\"label\":_vm.$t('columns.operate'),\"header-align\":\"center\",\"width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-button',{attrs:{\"type\":\"text\"},on:{\"click\":function($event){return _vm.editView(scope.row.Id)}}},[_vm._v(_vm._s(_vm.$t('btn.edit')))])]}}])})],1)],1),_c('el-pagination',{attrs:{\"page-sizes\":[10, 15, 20, 30, 50, 100],\"page-size\":_vm.pageSize,\"prev-text\":\"\",\"layout\":\"total, prev, pager, next, jumper, sizes\",\"total\":_vm.pageTotal},on:{\"size-change\":_vm._nowPageSize,\"current-change\":_vm.changePage}})],1),_c('Drawer',{attrs:{\"title\":_vm.$t('columns.ModifyProcess'),\"closable\":true,\"mask-closable\":false,\"width\":\"1000px\",\"styles\":_vm.styles},model:{value:(_vm.showViewModel),callback:function ($$v) {_vm.showViewModel=$$v},expression:\"showViewModel\"}},[[_c('div',{staticStyle:{\"margin-left\":\"15px\",\"margin-top\":\"10px\"}},[_c('Steps',{attrs:{\"current\":_vm.currentStep,\"size\":\"small\"}},[_c('Step',{attrs:{\"title\":_vm.$t('columns.basicconfiguration')}}),_c('Step',{attrs:{\"title\":_vm.$t('label.flowdesign')}}),_c('Step',{attrs:{\"title\":_vm.$t('columns.Hasbeencreated')}})],1)],1)],_c('div',{staticStyle:{\"padding\":\"15px\"},attrs:{\"id\":\"step-1\"}},[_c('i-Form',{ref:\"flowInstance\",attrs:{\"model\":_vm.flowInstance,\"label-width\":120,\"rules\":_vm.ruleValidate,\"label-position\":\"left\"}},[_c('Form-Item',{attrs:{\"label\":_vm.$t('label.ProcessNumber'),\"prop\":\"SchemeCode\"}},[_c('i-Input',{attrs:{\"readonly\":_vm.isRead},model:{value:(_vm.flowInstance.SchemeCode),callback:function ($$v) {_vm.$set(_vm.flowInstance, \"SchemeCode\", $$v)},expression:\"flowInstance.SchemeCode\"}})],1),_c('Form-Item',{attrs:{\"label\":_vm.$t('columns.processname'),\"prop\":\"SchemeName\"}},[_c('i-Input',{attrs:{\"readonly\":_vm.isRead},model:{value:(_vm.flowInstance.SchemeName),callback:function ($$v) {_vm.$set(_vm.flowInstance, \"SchemeName\", $$v)},expression:\"flowInstance.SchemeName\"}})],1),_c('Form-Item',{attrs:{\"label\":_vm.$t('columns.classify'),\"prop\":\"SchemeType\"}},[_c('i-select',{on:{\"on-change\":function($event){return _vm.selectFlow()}},model:{value:(_vm.flowInstance.SchemeType),callback:function ($$v) {_vm.$set(_vm.flowInstance, \"SchemeType\", $$v)},expression:\"flowInstance.SchemeType\"}},_vm._l((_vm.schemeType),function(item){return _c('i-option',{key:item.ItemDetailId,attrs:{\"value\":item.ItemDetailId}},[_vm._v(_vm._s(item.ItemName))])}),1)],1),_c('Form-Item',{attrs:{\"label\":\"用户组\",\"hidden\":_vm.isDelFlow}},[_c('i-Input',{attrs:{\"placeholder\":\"请输入用户组名称,多个以','进行分隔,填0或为空表示选择所有组\"},model:{value:(_vm.flowInstance.GroupIds),callback:function ($$v) {_vm.$set(_vm.flowInstance, \"GroupIds\", $$v)},expression:\"flowInstance.GroupIds\"}})],1),_c('Form-Item',{attrs:{\"label\":_vm.$t('columns.remarks'),\"prop\":\"Description\"}},[_c('i-Input',{attrs:{\"type\":\"textarea\",\"rows\":12},model:{value:(_vm.flowInstance.Description),callback:function ($$v) {_vm.$set(_vm.flowInstance, \"Description\", $$v)},expression:\"flowInstance.Description\"}})],1)],1)],1),_c('div',{attrs:{\"id\":\"step-4\"}},[_c('div',{attrs:{\"id\":\"FlowPanel\"}})]),_c('div',{attrs:{\"id\":\"step-5\"}},[_c('div',{staticStyle:{\"padding-top\":\"100px\",\"text-align\":\"center\"}},[_c('i',{staticStyle:{\"display\":\"inline-block\"}},[_c('img',{attrs:{\"src\":require(\"../../lib/flow/images/complete_tasks_256.png\")}})]),_c('p',[_vm._v(_vm._s(_vm.$t('columns.Designcompleted')))])])]),_c('div',{staticClass:\"demo-drawer-footer\"},[_c('i-Button',{staticStyle:{\"margin-right\":\"8px\"},attrs:{\"id\":\"btn_prev\"},on:{\"click\":_vm.prevStep}},[_vm._v(_vm._s(_vm.$t('columns.laststep')))]),_c('i-Button',{staticStyle:{\"margin-right\":\"8px\"},attrs:{\"id\":\"btn_next\"},on:{\"click\":_vm.nextStep}},[_vm._v(_vm._s(_vm.$t('columns.nextstep')))]),_c('i-Button',{attrs:{\"type\":\"primary\",\"id\":\"btn_submit\"},on:{\"click\":_vm.submitFlow}},[_vm._v(_vm._s(_vm.$t('btn.submit')))])],1)],2),_c('Drawer',{attrs:{\"title\":_vm.titleNodeName,\"closable\":true,\"mask-closable\":false,\"width\":\"800px\",\"styles\":_vm.styles},model:{value:(_vm.showViewNode),callback:function ($$v) {_vm.showViewNode=$$v},expression:\"showViewNode\"}},[_c('Tabs',{staticStyle:{\"height\":\"600px\"},attrs:{\"type\":\"card\"}},[_c('tab-pane',{attrs:{\"label\":_vm.$t('columns.basicconfiguration')}},[_c('div',{staticStyle:{\"padding\":\"10px\"}},[_c('i-Form',{ref:\"nodeBaseInfo\",attrs:{\"model\":_vm.nodeBaseInfo,\"rules\":_vm.ruleNode,\"label-width\":85,\"label-position\":\"left\"}},[_c('Form-Item',{attrs:{\"label\":_vm.$t('columns.nodeidentifier'),\"prop\":\"NodeCode\"}},[_c('i-Input',{model:{value:(_vm.nodeBaseInfo.NodeCode),callback:function ($$v) {_vm.$set(_vm.nodeBaseInfo, \"NodeCode\", $$v)},expression:\"nodeBaseInfo.NodeCode\"}})],1),_c('Form-Item',{attrs:{\"label\":_vm.$t('columns.nodname'),\"prop\":\"NodeName\"}},[_c('i-Input',{model:{value:(_vm.nodeBaseInfo.NodeName),callback:function ($$v) {_vm.$set(_vm.nodeBaseInfo, \"NodeName\", $$v)},expression:\"nodeBaseInfo.NodeName\"}})],1),_c('Form-Item',{attrs:{\"label\":_vm.$t('columns.remarks'),\"prop\":\"Description\"}},[_c('i-Input',{attrs:{\"type\":\"textarea\",\"rows\":10},model:{value:(_vm.nodeBaseInfo.Description),callback:function ($$v) {_vm.$set(_vm.nodeBaseInfo, \"Description\", $$v)},expression:\"nodeBaseInfo.Description\"}})],1)],1)],1)]),_c('tab-pane',{staticStyle:{\"position\":\"relative\"},attrs:{\"label\":_vm.$t('columns.auditor')}},[_c('div',{staticClass:\"bottomline\"},[_c('Radio-Group',{on:{\"on-change\":_vm.changeAuthorizeType},model:{value:(_vm.nodeBaseInfo.NodeDesignate),callback:function ($$v) {_vm.$set(_vm.nodeBaseInfo, \"NodeDesignate\", $$v)},expression:\"nodeBaseInfo.NodeDesignate\"}},[_c('Radio',{attrs:{\"label\":\"NodeDesignateType2\"}},[_vm._v(_vm._s(_vm.$t('columns.specifiedmember')))]),_c('Radio',{attrs:{\"label\":\"NodeDesignateType5\"}},[_vm._v(_vm._s(_vm.$t('columns.departmenthead')))])],1)],1),_c('div',{staticStyle:{\"position\":\"absolute\"},attrs:{\"id\":\"DesignateMember_node\"}},[_c('div',{staticClass:\"standtabborder\"},[_c('div',{staticClass:\"standtab standtabactived\",on:{\"click\":function($event){return _vm.yang(this, 'Role_node')}}},[_vm._v(\" \"+_vm._s(_vm.$t('codecs.role'))+\" \")]),_c('div',{staticClass:\"standtab\",on:{\"click\":function($event){return _vm.yang(this, 'User_node')}}},[_vm._v(\" \"+_vm._s(_vm.$t('columns.user')))])]),_c('div',{staticClass:\"standtab-pane\",attrs:{\"id\":\"Role_node\"}}),_c('div',{staticClass:\"standtab-pane\",staticStyle:{\"display\":\"none\"},attrs:{\"id\":\"User_node\"}}),_c('div',{staticStyle:{\"margin\":\"0px\",\"border-right\":\"none\",\"border-left\":\"none\",\"border-bottom\":\"none\",\"background-color\":\"#fff\",\"overflow\":\"auto\",\"padding-bottom\":\"10px\",\"height\":\"510px\"},attrs:{\"id\":\"DesignateMemberlist_node\"}},[_c('div',{staticClass:\"SchemeAuthorizePanel\",attrs:{\"id\":\"RoleDiv_node\"}},[_c('div',{staticClass:\"flow-portal-panel-title\"},[_c('i',{staticClass:\"fa fa-paw\"}),_vm._v(\" \"+_vm._s(_vm.$t('codecs.role'))+\" \")])]),_c('div',{staticClass:\"SchemeAuthorizePanel\",attrs:{\"id\":\"UserDiv_node\"}},[_c('div',{staticClass:\"flow-portal-panel-title\"},[_c('i',{staticClass:\"fa fa-user\"}),_vm._v(\" \"+_vm._s(_vm.$t('columns.user'))+\" \")])])])]),_c('div',{staticStyle:{\"top\":\"40px\",\"left\":\"0px\",\"z-index\":\"2\",\"width\":\"800px\",\"height\":\"512px\",\"background\":\"#000\",\"filter\":\"alpha(opacity=10)\",\"opacity\":\"0.1\",\"position\":\"absolute\"},attrs:{\"id\":\"Treebackground_node\"}})])],1),_c('div',{staticClass:\"demo-drawer-footer\"},[_c('i-Button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.nodeSave}},[_vm._v(_vm._s(_vm.$t('columns.confirm'))+\" \")]),_c('i-Button',{attrs:{\"type\":\"text\"},on:{\"click\":function($event){_vm.showViewNode = false}}},[_vm._v(_vm._s(_vm.$t('columns.close')))])],1)],1),_c('Drawer',{attrs:{\"title\":\"流转条件设置\",\"closable\":true,\"mask-closable\":false,\"width\":\"800px\",\"styles\":_vm.styles},model:{value:(_vm.showViewLine),callback:function ($$v) {_vm.showViewLine=$$v},expression:\"showViewLine\"}},[_c('div',{staticStyle:{\"padding\":\"10px\",\"height\":\"50px\"}},[_c('div',{staticClass:\"float-left\"},[_c('button',{staticClass:\"ivu-btn ivu-btn-primary\",attrs:{\"type\":\"button\",\"id\":\"addPositionBtn\"},on:{\"click\":_vm.addPositionLine}},[_c('span',[_vm._v(\"+ 添加栏位\")])]),_c('button',{staticClass:\"ivu-btn ivu-btn-error\",attrs:{\"type\":\"button\",\"id\":\"deletePositionBtn\"},on:{\"click\":_vm.deletePositionLine}},[_c('span',[_vm._v(\"- 删除栏位\")])])]),_c('div',{staticClass:\"float-right\"},[_c('i-Input',{staticClass:\"search-item\",attrs:{\"placeholder\":\"请输入标题\"},model:{value:(_vm.lineSearchName),callback:function ($$v) {_vm.lineSearchName=$$v},expression:\"lineSearchName\"}},[_c('Icon',{attrs:{\"slot\":\"suffix\",\"type\":\"ios-search\"},on:{\"@click\":_vm.Query},slot:\"suffix\"})],1)],1)]),_c('div',{staticStyle:{\"padding\":\"10px\"},attrs:{\"id\":\"linelist\"}},[_c('i-table',{attrs:{\"border\":\"\",\"data\":_vm.lineData,\"columns\":_vm.lineColumns,\"stripe\":\"\",\"size\":\"small\"}})],1),_c('div',{staticClass:\"demo-drawer-footer\"},[_c('i-Button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.lineSave}},[_vm._v(_vm._s(_vm.$t('columns.confirm')))]),_c('i-Button',{attrs:{\"type\":\"text\"},on:{\"click\":function($event){_vm.showViewLine = false}}},[_vm._v(_vm._s(_vm.$t('columns.close')))])],1)])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProcessDesignPage.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProcessDesignPage.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ProcessDesignPage.vue?vue&type=template&id=3b5ba6ce&scoped=true&\"\nimport script from \"./ProcessDesignPage.vue?vue&type=script&lang=js&\"\nexport * from \"./ProcessDesignPage.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ProcessDesignPage.vue?vue&type=style&index=0&id=3b5ba6ce&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3b5ba6ce\",\n null\n \n)\n\nexport default component.exports","//定义一个区域图类:\r\nfunction GooFlow(bgDiv, property) {\r\n if (navigator.userAgent.indexOf(\"MSIE 8.0\") > 0 || navigator.userAgent.indexOf(\"MSIE 7.0\") > 0 || navigator.userAgent.indexOf(\"MSIE 6.0\") > 0)\r\n GooFlow.prototype.useSVG = \"\";\r\n else GooFlow.prototype.useSVG = \"1\";\r\n //初始化区域图的对象\r\n this.$id = bgDiv.attr(\"id\");\r\n this.$bgDiv = bgDiv; //最父框架的DIV\r\n this.$bgDiv.addClass(\"GooFlow\");\r\n var width = (property.width || 800) - 2;\r\n var height = (property.height || 500) - 2;\r\n this.$bgDiv.css({ width: width + \"px\", height: height + \"px\" });\r\n this.$tool = null; //左侧工具栏对象\r\n this.$head = null; //顶部标签及工具栏按钮\r\n this.$title = \"newFlow_1\"; //流程图的名称\r\n this.$nodeRemark = {}; //每一种结点或按钮的说明文字,JSON格式,key为类名,value为用户自定义文字说明\r\n this.$nowType = \"cursor\"; //当前要绘制的对象类型\r\n this.$lineData = {};\r\n this.$lineCount = 0;\r\n this.$nodeData = {};\r\n this.$nodeCount = 0;\r\n this.$areaData = {};\r\n this.$areaCount = 0;\r\n this.$lineDom = {};\r\n this.$nodeDom = {};\r\n this.$areaDom = {};\r\n this.$max = property.initNum || 1; //计算默认ID值的起始SEQUENCE\r\n this.$focus = \"\"; //当前被选定的结点/转换线ID,如果没选中或者工作区被清空,则为\"\"\r\n this.$cursor = \"default\"; //鼠标指针在工作区内的样式\r\n this.$editable = false; //工作区是否可编辑\r\n this.$deletedItem = {}; //在流程图的编辑操作中被删除掉的元素ID集合,元素ID为KEY,元素类型(node,line.area)为VALUE\r\n var headHeight = 0;\r\n var tmp = \"\";\r\n if (property.haveHead) {\r\n tmp = \"
\";\r\n for (var x = 0; x < property.headBtns.length; ++x) {\r\n tmp += \"\"\r\n }\r\n tmp += \"
\";\r\n this.$head = $(tmp);\r\n this.$bgDiv.append(this.$head);\r\n headHeight = 24;\r\n //以下是当工具栏按钮被点击时触发的事件自定义(虚函数),格式为function(),因为可直接用THIS操作对象本身,不用传参;用户可自行重定义:\r\n this.onBtnNewClick = null; //新建流程图按钮被点中\r\n this.onBtnOpenClick = null; //打开流程图按钮定义\r\n this.onBtnSaveClick = null; //保存流程图按钮定义\r\n this.onFreshClick = null; //重载流程图按钮定义\r\n if (property.headBtns)\r\n this.$head.on(\"click\", { inthis: this }, function(e) {\r\n if (!e) e = window.event;\r\n var tar = e.target;\r\n if (tar.tagName == \"DIV\" || tar.tagName == \"SPAN\") return;\r\n else if (tar.tagName == \"a\") tar = tar.childNode[0];\r\n var This = e.data.inthis;\r\n //定义顶部操作栏按钮的事件\r\n switch ($(tar).attr(\"class\")) {\r\n case \"ico_new\":\r\n if (This.onBtnNewClick != null) This.onBtnNewClick();\r\n break;\r\n case \"ico_open\":\r\n if (This.onBtnOpenClick != null) This.onBtnOpenClick();\r\n break;\r\n case \"ico_save\":\r\n if (This.onBtnSaveClick != null) This.onBtnSaveClick();\r\n break;\r\n case \"ico_undo\":\r\n This.undo();\r\n break;\r\n case \"ico_redo\":\r\n This.redo();\r\n break;\r\n case \"ico_reload\":\r\n if (This.onFreshClick != null) This.onFreshClick();\r\n break;\r\n }\r\n });\r\n }\r\n var toolWidth = 0;\r\n if (property.haveTool) {\r\n console.log(this.$bgDiv)\r\n this.$bgDiv.append(\"
\");\r\n this.$tool = this.$bgDiv.find(\".GooFlow_tool div\");\r\n //未加代码:加入绘图工具按钮\r\n this.$tool.append(\"\");\r\n if (property.toolBtns && property.toolBtns.length > 0) {\r\n tmp = \"\";\r\n for (var i = 0; i < property.toolBtns.length; ++i) {\r\n tmp += \"\"; //加入自定义按钮\r\n }\r\n this.$tool.append(tmp);\r\n }\r\n //加入区域划分框工具开关按钮\r\n if (property.haveGroup)\r\n this.$tool.append(\"\");\r\n toolWidth = 31;\r\n this.$nowType = \"cursor\";\r\n //绑定各个按钮的点击事件\r\n this.$tool.on(\"click\", { inthis: this }, function(e) {\r\n if (!e) e = window.event;\r\n var tar;\r\n switch (e.target.tagName) {\r\n case \"SPAN\":\r\n return false;\r\n case \"DIV\":\r\n return false;\r\n case \"B\":\r\n tar = e.target.parentNode;\r\n break;\r\n case \"A\":\r\n tar = e.target;\r\n };\r\n var type = $(tar).attr(\"type\");\r\n e.data.inthis.switchToolBtn(type);\r\n return false;\r\n });\r\n this.$editable = true; //只有具有工具栏时可编辑\r\n }\r\n width = width - toolWidth - 8;\r\n height = height;\r\n this.$bgDiv.append(\"
\");\r\n this.$workArea = $(\"
\")\r\n .attr({ \"unselectable\": \"on\", \"onselectstart\": 'return false', \"onselect\": 'document.selection.empty()' });\r\n this.$bgDiv.children(\".GooFlow_work\").append(this.$workArea);\r\n this.$draw = null; //画矢量线条的容器\r\n this.initDraw(\"draw_\" + this.$id, width, height);\r\n this.$group = null;\r\n if (property.haveGroup)\r\n this.initGroup(width, height);\r\n if (this.$editable) {\r\n this.$workArea.on(\"click\", { inthis: this }, function(e) {\r\n if (!e) e = window.event;\r\n if (!e.data.inthis.$editable) return;\r\n var type = e.data.inthis.$nowType;\r\n if (type == \"cursor\") {\r\n var t = $(e.target);\r\n var n = t.prop(\"tagName\");\r\n if (n == \"svg\" || (n == \"DIV\" && t.prop(\"class\").indexOf(\"GooFlow_work\") > -1) || n == \"LABEL\") e.data.inthis.blurItem();\r\n return;\r\n } else if (type == \"direct\" || type == \"group\") return;\r\n var X, Y;\r\n var ev = mousePosition(e),\r\n t = getElCoordinate(this);\r\n X = ev.x - t.left + this.parentNode.scrollLeft - 1;\r\n Y = ev.y - t.top + this.parentNode.scrollTop - 1;\r\n\r\n var name = \"新建节点\" + e.data.inthis.$max;\r\n var type = e.data.inthis.$nowType;\r\n if (type == 'startround') {\r\n name = \"开始\";\r\n }\r\n if (type == 'endround') {\r\n name = \"结束\";\r\n }\r\n var executeadd = true;\r\n var _nodeData = e.data.inthis.$nodeData;\r\n $.each(_nodeData, function(i) {\r\n if (_nodeData[i].name == name) {\r\n alert(name + '节点不能重复');\r\n executeadd = false;\r\n return false;\r\n }\r\n })\r\n if (executeadd) {\r\n e.data.inthis.addNode(e.data.inthis.$id + \"_node_\" + e.data.inthis.$max, { name: name, left: X, top: Y, type: e.data.inthis.$nowType, css: '', img: '', });\r\n e.data.inthis.$max++;\r\n }\r\n });\r\n //划线时用的绑定\r\n this.$workArea.mousemove({ inthis: this }, function(e) {\r\n if (e.data.inthis.$nowType != \"direct\") return;\r\n var lineStart = $(this).data(\"lineStart\");\r\n if (!lineStart) return;\r\n var ev = mousePosition(e),\r\n t = getElCoordinate(this);\r\n var X, Y;\r\n X = ev.x - t.left + this.parentNode.scrollLeft;\r\n Y = ev.y - t.top + this.parentNode.scrollTop;\r\n var line = document.getElementById(\"GooFlow_tmp_line\");\r\n if (GooFlow.prototype.useSVG != \"\") {\r\n line.childNodes[0].setAttribute(\"d\", \"M \" + lineStart.x + \" \" + lineStart.y + \" L \" + X + \" \" + Y);\r\n line.childNodes[1].setAttribute(\"d\", \"M \" + lineStart.x + \" \" + lineStart.y + \" L \" + X + \" \" + Y);\r\n if (line.childNodes[1].getAttribute(\"marker-end\") == \"url(\\\"#arrow2\\\")\")\r\n line.childNodes[1].setAttribute(\"marker-end\", \"url(#arrow3)\");\r\n else line.childNodes[1].setAttribute(\"marker-end\", \"url(#arrow2)\");\r\n } else line.points.value = lineStart.x + \",\" + lineStart.y + \" \" + X + \",\" + Y;\r\n });\r\n this.$workArea.mouseup({ inthis: this }, function(e) {\r\n if (e.data.inthis.$nowType != \"direct\") return;\r\n $(this).css(\"cursor\", \"auto\").removeData(\"lineStart\");\r\n var tmp = document.getElementById(\"GooFlow_tmp_line\");\r\n if (tmp) e.data.inthis.$draw.removeChild(tmp);\r\n });\r\n //为了结点而增加的一些集体delegate绑定\r\n this.initWorkForNode();\r\n //对结点进行移动或者RESIZE时用来显示的遮罩层\r\n this.$ghost = $(\"
\").attr({ \"unselectable\": \"on\", \"onselectstart\": 'return false', \"onselect\": 'document.selection.empty()' });\r\n this.$bgDiv.append(this.$ghost);\r\n this.$textArea = $(\"\");\r\n this.$bgDiv.append(this.$textArea);\r\n this.$lineMove = $(\"\"); //操作折线时的移动框\r\n this.$workArea.append(this.$lineMove);\r\n this.$lineMove.on(\"mousedown\", { inthis: this }, function(e) {\r\n if (e.button == 2) return false;\r\n var lm = $(this);\r\n lm.css({ \"background-color\": \"#333\" });\r\n var This = e.data.inthis;\r\n var ev = mousePosition(e),\r\n t = getElCoordinate(This.$workArea[0]);\r\n var X, Y;\r\n X = ev.x - t.left + This.$workArea[0].parentNode.scrollLeft;\r\n Y = ev.y - t.top + This.$workArea[0].parentNode.scrollTop;\r\n var p = This.$lineMove.position();\r\n var vX = X - p.left,\r\n vY = Y - p.top;\r\n var isMove = false;\r\n document.onmousemove = function(e) {\r\n console.log(11111111111111111);\r\n if (!e) e = window.event;\r\n var ev = mousePosition(e);\r\n var ps = This.$lineMove.position();\r\n X = ev.x - t.left + This.$workArea[0].parentNode.scrollLeft;\r\n Y = ev.y - t.top + This.$workArea[0].parentNode.scrollTop;\r\n if (This.$lineMove.data(\"type\") == \"lr\") {\r\n X = X - vX;\r\n if (X < 0) X = 0;\r\n else if (X > This.$workArea.width())\r\n X = This.$workArea.width();\r\n This.$lineMove.css({ left: X + \"px\" });\r\n } else if (This.$lineMove.data(\"type\") == \"tb\") {\r\n Y = Y - vY;\r\n if (Y < 0) Y = 0;\r\n else if (Y > This.$workArea.height())\r\n Y = This.$workArea.height();\r\n This.$lineMove.css({ top: Y + \"px\" });\r\n }\r\n isMove = true;\r\n }\r\n document.onmouseup = function(e) {\r\n if (isMove) {\r\n var p = This.$lineMove.position();\r\n if (This.$lineMove.data(\"type\") == \"lr\")\r\n This.setLineM(This.$lineMove.data(\"tid\"), p.left + 3);\r\n else if (This.$lineMove.data(\"type\") == \"tb\")\r\n This.setLineM(This.$lineMove.data(\"tid\"), p.top + 3);\r\n }\r\n This.$lineMove.css({ \"background-color\": \"transparent\" });\r\n if (This.$focus == This.$lineMove.data(\"tid\")) {\r\n This.focusItem(This.$lineMove.data(\"tid\"));\r\n }\r\n document.onmousemove = null;\r\n document.onmouseup = null;\r\n }\r\n });\r\n this.$lineOper = $(\"\"); //选定线时显示的操作框\r\n this.$workArea.append(this.$lineOper);\r\n this.$lineOper.on(\"click\", { inthis: this }, function(e) {\r\n if (!e) e = window.event;\r\n if (e.target.tagName != \"A\" && e.target.tagName != \"B\") return;\r\n var This = e.data.inthis;\r\n var id = $(this).data(\"tid\");\r\n switch ($(e.target).attr(\"class\")) {\r\n case \"b_x\":\r\n This.delLine(id);\r\n this.style.display = \"none\";\r\n break;\r\n case \"b_l1\":\r\n This.setLineType(id, \"lr\");\r\n break;\r\n case \"b_l2\":\r\n This.setLineType(id, \"tb\");\r\n break;\r\n case \"b_l3\":\r\n This.setLineType(id, \"sl\");\r\n break;\r\n break;\r\n }\r\n });\r\n\r\n //下面绑定当结点/线/分组块的一些操作事件,这些事件可直接通过this访问对象本身\r\n //当操作某个单元(结点/线/分组块)被添加时,触发的方法,返回FALSE可阻止添加事件的发生\r\n //格式function(id,type,json):id是单元的唯一标识ID,type是单元的种类,有\"node\",\"line\",\"area\"三种取值,json即addNode,addLine或addArea方法的第二个传参json.\r\n this.onItemAdd = null;\r\n //当操作某个单元(结点/线/分组块)被删除时,触发的方法,返回FALSE可阻止删除事件的发生\r\n //格式function(id,type):id是单元的唯一标识ID,type是单元的种类,有\"node\",\"line\",\"area\"三种取值\r\n this.onItemDel = null;\r\n //当操作某个单元(结点/分组块)被移动时,触发的方法,返回FALSE可阻止移动事件的发生\r\n //格式function(id,type,left,top):id是单元的唯一标识ID,type是单元的种类,有\"node\",\"area\"两种取值,线line不支持移动,left是新的左边距坐标,top是新的顶边距坐标\r\n this.onItemMove = null;\r\n //当操作某个单元(结点/线/分组块)被重命名时,触发的方法,返回FALSE可阻止重命名事件的发生\r\n //格式function(id,name,type):id是单元的唯一标识ID,type是单元的种类,有\"node\",\"line\",\"area\"三种取值,name是新的名称\r\n this.onItemRename = null;\r\n //当操作某个单元(结点/线)被由不选中变成选中时,触发的方法,返回FALSE可阻止选中事件的发生\r\n //格式function(id,type):id是单元的唯一标识ID,type是单元的种类,有\"node\",\"line\"两种取值,\"area\"不支持被选中\r\n this.onItemFocus = null;\r\n //当操作某个单元(结点/线)被由选中变成不选中时,触发的方法,返回FALSE可阻止取消选中事件的发生\r\n //格式function(id,type):id是单元的唯一标识ID,type是单元的种类,有\"node\",\"line\"两种取值,\"area\"不支持被取消选中\r\n this.onItemBlur = null;\r\n //当操作某个单元(结点/分组块)被重定义大小或造型时,触发的方法,返回FALSE可阻止重定大小/造型事件的发生\r\n //格式function(id,type,width,height):id是单元的唯一标识ID,type是单元的种类,有\"node\",\"line\",\"area\"三种取值;width是新的宽度,height是新的高度\r\n this.onItemResize = null;\r\n //当移动某条折线中段的位置,触发的方法,返回FALSE可阻止重定大小/造型事件的发生\r\n //格式function(id,M):id是单元的唯一标识ID,M是中段的新X(或Y)的坐标\r\n this.onLineMove = null;\r\n //当变换某条连接线的类型,触发的方法,返回FALSE可阻止重定大小/造型事件的发生\r\n //格式function(id,type):id是单元的唯一标识ID,type是连接线的新类型,\"sl\":直线,\"lr\":中段可左右移动的折线,\"tb\":中段可上下移动的折线\r\n this.onLineSetType = null;\r\n //当用重色标注某个结点/转换线时触发的方法,返回FALSE可阻止重定大小/造型事件的发生\r\n //格式function(id,type,mark):id是单元的唯一标识ID,type是单元类型(\"node\"结点,\"line\"转换线),mark为布尔值,表示是要标注TRUE还是取消标注FALSE\r\n this.onItemMark = null;\r\n\r\n if (property.useOperStack && this.$editable) { //如果要使用堆栈记录操作并提供“撤销/重做”的功能,只在编辑状态下有效\r\n this.$undoStack = [];\r\n this.$redoStack = [];\r\n this.$isUndo = 0;\r\n ///////////////以下是构造撤销操作/重做操作的方法\r\n //为了节省浏览器内存空间,undo/redo中的操作缓存栈,最多只可放40步操作;超过40步时,将自动删掉最旧的一个缓存\r\n this.pushOper = function(funcName, paras) {\r\n var len = this.$undoStack.length;\r\n if (this.$isUndo == 1) {\r\n this.$redoStack.push([funcName, paras]);\r\n this.$isUndo = false;\r\n if (this.$redoStack.length > 40) this.$redoStack.shift();\r\n } else {\r\n this.$undoStack.push([funcName, paras]);\r\n if (this.$undoStack.length > 40) this.$undoStack.shift();\r\n if (this.$isUndo == 0) {\r\n this.$redoStack.splice(0, this.$redoStack.length);\r\n }\r\n this.$isUndo = 0;\r\n }\r\n };\r\n //将外部的方法加入到GooFlow对象的事务操作堆栈中,在过后的undo/redo操作中可以进行控制,一般用于对流程图以外的附加信息进行编辑的事务撤销/重做控制;\r\n //传参func为要执行方法对象,jsonPara为外部方法仅有的一个面向字面的JSON传参,由JSON对象带入所有要传的信息;\r\n //提示:为了让外部方法能够被UNDO/REDO,需要在编写这些外部方法实现时,加入对该方法执行后效果回退的另一个执行方法的pushExternalOper\r\n this.pushExternalOper = function(func, jsonPara) {\r\n this.pushOper(\"externalFunc\", [func, jsonPara]);\r\n };\r\n //撤销上一步操作\r\n this.undo = function() {\r\n if (this.$undoStack.length == 0) return;\r\n var tmp = this.$undoStack.pop();\r\n this.$isUndo = 1;\r\n if (tmp[0] == \"externalFunc\") {\r\n tmp[1][0](tmp[1][1]);\r\n } else {\r\n //传参的数量,最多支持6个.\r\n switch (tmp[1].length) {\r\n case 0:\r\n this[tmp[0]]();\r\n break;\r\n case 1:\r\n this[tmp[0]](tmp[1][0]);\r\n break;\r\n case 2:\r\n this[tmp[0]](tmp[1][0], tmp[1][1]);\r\n break;\r\n case 3:\r\n this[tmp[0]](tmp[1][0], tmp[1][1], tmp[1][2]);\r\n break;\r\n case 4:\r\n this[tmp[0]](tmp[1][0], tmp[1][1], tmp[1][2], tmp[1][3]);\r\n break;\r\n case 5:\r\n this[tmp[0]](tmp[1][0], tmp[1][1], tmp[1][2], tmp[1][3], tmp[1][4]);\r\n break;\r\n case 6:\r\n this[tmp[0]](tmp[1][0], tmp[1][1], tmp[1][2], tmp[1][3], tmp[1][4], tmp[1][5]);\r\n break;\r\n }\r\n }\r\n };\r\n //重做最近一次被撤销的操作\r\n this.redo = function() {\r\n if (this.$redoStack.length == 0) return;\r\n var tmp = this.$redoStack.pop();\r\n this.$isUndo = 2;\r\n if (tmp[0] == \"externalFunc\") {\r\n tmp[1][0](tmp[1][1]);\r\n } else {\r\n //传参的数量,最多支持6个.\r\n switch (tmp[1].length) {\r\n case 0:\r\n this[tmp[0]]();\r\n break;\r\n case 1:\r\n this[tmp[0]](tmp[1][0]);\r\n break;\r\n case 2:\r\n this[tmp[0]](tmp[1][0], tmp[1][1]);\r\n break;\r\n case 3:\r\n this[tmp[0]](tmp[1][0], tmp[1][1], tmp[1][2]);\r\n break;\r\n case 4:\r\n this[tmp[0]](tmp[1][0], tmp[1][1], tmp[1][2], tmp[1][3]);\r\n break;\r\n case 5:\r\n this[tmp[0]](tmp[1][0], tmp[1][1], tmp[1][2], tmp[1][3], tmp[1][4]);\r\n break;\r\n case 6:\r\n this[tmp[0]](tmp[1][0], tmp[1][1], tmp[1][2], tmp[1][3], tmp[1][4], tmp[1][5]);\r\n break;\r\n }\r\n }\r\n };\r\n }\r\n $(document).keydown({ inthis: this }, function(e) {\r\n //绑定键盘操作\r\n var This = e.data.inthis;\r\n if (This.$focus == \"\") return;\r\n switch (e.keyCode) {\r\n case 46: //删除\r\n This.delNode(This.$focus, true);\r\n This.delLine(This.$focus);\r\n break;\r\n }\r\n });\r\n }\r\n}\r\nGooFlow.prototype = {\r\n useSVG: \"\",\r\n getSvgMarker: function(id, color) {\r\n var m = document.createElementNS(\"http://www.w3.org/2000/svg\", \"marker\");\r\n m.setAttribute(\"id\", id);\r\n m.setAttribute(\"viewBox\", \"0 0 6 6\");\r\n m.setAttribute(\"refX\", 5);\r\n m.setAttribute(\"refY\", 3);\r\n m.setAttribute(\"markerUnits\", \"strokeWidth\");\r\n m.setAttribute(\"markerWidth\", 6);\r\n m.setAttribute(\"markerHeight\", 6);\r\n m.setAttribute(\"orient\", \"auto\");\r\n var path = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\r\n path.setAttribute(\"d\", \"M 0 0 L 6 3 L 0 6 z\");\r\n path.setAttribute(\"fill\", color);\r\n path.setAttribute(\"stroke-width\", 0);\r\n m.appendChild(path);\r\n return m;\r\n },\r\n initDraw: function(id, width, height) {\r\n var elem;\r\n if (GooFlow.prototype.useSVG != \"\") {\r\n this.$draw = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\"); //可创建带有指定命名空间的元素节点\r\n this.$workArea.prepend(this.$draw);\r\n var defs = document.createElementNS(\"http://www.w3.org/2000/svg\", \"defs\");\r\n this.$draw.appendChild(defs);\r\n defs.appendChild(GooFlow.prototype.getSvgMarker(\"arrow1\", \"gray\"));\r\n defs.appendChild(GooFlow.prototype.getSvgMarker(\"arrow2\", \"#ff3300\"));\r\n defs.appendChild(GooFlow.prototype.getSvgMarker(\"arrow3\", \"#ff3300\"));\r\n } else {\r\n this.$draw = document.createElement(\"v:group\");\r\n this.$draw.coordsize = width * 3 + \",\" + height * 3;\r\n this.$workArea.prepend(\"
\");\r\n this.$workArea.children(\"div\")[0].insertBefore(this.$draw, null);\r\n }\r\n this.$draw.id = id;\r\n this.$draw.style.width = width * 3 + \"px\";\r\n this.$draw.style.height = +height * 3 + \"px\";\r\n //绑定连线的点击选中以及双击编辑事件\r\n var tmpClk = null;\r\n if (GooFlow.prototype.useSVG != \"\") tmpClk = \"g\";\r\n else tmpClk = \"PolyLine\";\r\n if (this.$editable) {\r\n $(this.$draw).delegate(tmpClk, \"click\", { inthis: this }, function(e) {\r\n e.data.inthis.focusItem(this.id, true);\r\n });\r\n $(this.$draw).delegate(tmpClk, \"dblclick\", { inthis: this }, function(e) {\r\n var This = e.data.inthis;\r\n OpenLine(this.id, This);\r\n //var oldTxt, x, y, from, to;\r\n //var This = e.data.inthis;\r\n //if (GooFlow.prototype.useSVG != \"\") {\r\n // oldTxt = this.childNodes[2].textContent;\r\n // from = this.getAttribute(\"from\").split(\",\");\r\n // to = this.getAttribute(\"to\").split(\",\");\r\n //} else {\r\n // oldTxt = this.childNodes[1].innerHTML;\r\n // var n = this.getAttribute(\"fromTo\").split(\",\");\r\n // from = [n[0], n[1]];\r\n // to = [n[2], n[3]];\r\n //}\r\n //if (This.$lineData[this.id].type == \"lr\") {\r\n // from[0] = This.$lineData[this.id].M;\r\n // to[0] = from[0];\r\n //}\r\n //else if (This.$lineData[this.id].type == \"tb\") {\r\n // from[1] = This.$lineData[this.id].M;\r\n // to[1] = from[1];\r\n //}\r\n //x = (parseInt(from[0], 10) + parseInt(to[0], 10)) / 2 - 60;\r\n //y = (parseInt(from[1], 10) + parseInt(to[1], 10)) / 2 - 12;\r\n //var t = getElCoordinate(This.$workArea[0]);\r\n //This.$textArea.val(oldTxt).css({\r\n // display: \"block\", width: 120, height: 14,\r\n // left: t.left + x - This.$workArea[0].parentNode.scrollLeft,\r\n // top: t.top + y - This.$workArea[0].parentNode.scrollTop\r\n //}).data(\"id\", This.$focus).focus();\r\n //This.$workArea.parent().one(\"mousedown\", function (e) {\r\n // if (e.button == 2) return false;\r\n // This.setName(This.$textArea.data(\"id\"), This.$textArea.val(), \"line\");\r\n // This.$textArea.val(\"\").removeData(\"id\").hide();\r\n //});\r\n });\r\n }\r\n },\r\n initGroup: function(width, height) {\r\n this.$group = $(\"
\"); //存放背景区域的容器\r\n this.$workArea.prepend(this.$group);\r\n if (!this.$editable) return;\r\n //区域划分框操作区的事件绑定\r\n this.$group.on(\"mousedown\", { inthis: this }, function(e) { //绑定RESIZE功能以及移动功能\r\n if (e.button == 2) return false;\r\n var This = e.data.inthis;\r\n if (This.$nowType != \"group\") return;\r\n if (This.$textArea.css(\"display\") == \"block\") {\r\n This.setName(This.$textArea.data(\"id\"), This.$textArea.val(), \"area\");\r\n This.$textArea.val(\"\").removeData(\"id\").hide();\r\n return false;\r\n };\r\n if (!e) e = window.event;\r\n var cursor = $(e.target).css(\"cursor\");\r\n var id = e.target.parentNode;\r\n switch (cursor) {\r\n case \"nw-resize\":\r\n id = id.parentNode;\r\n break;\r\n case \"w-resize\":\r\n id = id.parentNode;\r\n break;\r\n case \"n-resize\":\r\n id = id.parentNode;\r\n break;\r\n case \"move\":\r\n break;\r\n default:\r\n return;\r\n }\r\n id = id.id;\r\n var hack = 1;\r\n if (navigator.userAgent.indexOf(\"8.0\") != -1) hack = 0;\r\n var ev = mousePosition(e),\r\n t = getElCoordinate(This.$workArea[0]);\r\n\r\n var X, Y;\r\n X = ev.x - t.left + This.$workArea[0].parentNode.scrollLeft;\r\n Y = ev.y - t.top + This.$workArea[0].parentNode.scrollTop;\r\n if (cursor != \"move\") {\r\n This.$ghost.css({\r\n display: \"block\",\r\n width: This.$areaData[id].width - 2 + \"px\",\r\n height: This.$areaData[id].height - 2 + \"px\",\r\n top: This.$areaData[id].top + t.top - This.$workArea[0].parentNode.scrollTop + hack + \"px\",\r\n left: This.$areaData[id].left + t.left - This.$workArea[0].parentNode.scrollLeft + hack + \"px\",\r\n cursor: cursor\r\n });\r\n var vX = (This.$areaData[id].left + This.$areaData[id].width) - X;\r\n var vY = (This.$areaData[id].top + This.$areaData[id].height) - Y;\r\n } else {\r\n var vX = X - This.$areaData[id].left;\r\n var vY = Y - This.$areaData[id].top;\r\n }\r\n var isMove = false;\r\n This.$ghost.css(\"cursor\", cursor);\r\n document.onmousemove = function(e) {\r\n if (!e) e = window.event;\r\n var ev = mousePosition(e);\r\n if (cursor != \"move\") {\r\n X = ev.x - t.left + This.$workArea[0].parentNode.scrollLeft - This.$areaData[id].left + vX;\r\n Y = ev.y - t.top + This.$workArea[0].parentNode.scrollTop - This.$areaData[id].top + vY;\r\n if (X < 200) X = 200;\r\n if (Y < 100) Y = 100;\r\n switch (cursor) {\r\n case \"nw-resize\":\r\n This.$ghost.css({ width: X - 2 + \"px\", height: Y - 2 + \"px\" });\r\n break;\r\n case \"w-resize\":\r\n This.$ghost.css({ width: X - 2 + \"px\" });\r\n break;\r\n case \"n-resize\":\r\n This.$ghost.css({ height: Y - 2 + \"px\" });\r\n break;\r\n }\r\n } else {\r\n if (This.$ghost.css(\"display\") == \"none\") {\r\n This.$ghost.css({\r\n display: \"block\",\r\n width: This.$areaData[id].width - 2 + \"px\",\r\n height: This.$areaData[id].height - 2 + \"px\",\r\n top: This.$areaData[id].top + t.top - This.$workArea[0].parentNode.scrollTop + hack + \"px\",\r\n left: This.$areaData[id].left + t.left - This.$workArea[0].parentNode.scrollLeft + hack + \"px\",\r\n cursor: cursor\r\n });\r\n }\r\n X = ev.x - vX;\r\n Y = ev.y - vY;\r\n if (X < t.left - This.$workArea[0].parentNode.scrollLeft)\r\n X = t.left - This.$workArea[0].parentNode.scrollLeft;\r\n else if (X + This.$workArea[0].parentNode.scrollLeft + This.$areaData[id].width > t.left + This.$workArea.width())\r\n X = t.left + This.$workArea.width() - This.$workArea[0].parentNode.scrollLeft - This.$areaData[id].width;\r\n if (Y < t.top - This.$workArea[0].parentNode.scrollTop)\r\n Y = t.top - This.$workArea[0].parentNode.scrollTop;\r\n else if (Y + This.$workArea[0].parentNode.scrollTop + This.$areaData[id].height > t.top + This.$workArea.height())\r\n Y = t.top + This.$workArea.height() - This.$workArea[0].parentNode.scrollTop - This.$areaData[id].height;\r\n This.$ghost.css({ left: X + hack + \"px\", top: Y + hack + \"px\" });\r\n }\r\n isMove = true;\r\n }\r\n document.onmouseup = function(e) {\r\n This.$ghost.empty().hide();\r\n document.onmousemove = null;\r\n document.onmouseup = null;\r\n if (!isMove) return;\r\n if (cursor != \"move\")\r\n This.resizeArea(id, This.$ghost.outerWidth(), This.$ghost.outerHeight());\r\n else\r\n This.moveArea(id, X + This.$workArea[0].parentNode.scrollLeft - t.left, Y + This.$workArea[0].parentNode.scrollTop - t.top);\r\n return false;\r\n }\r\n });\r\n //绑定修改文字说明功能\r\n this.$group.on(\"dblclick\", { inthis: this }, function(e) {\r\n var This = e.data.inthis;\r\n if (This.$nowType != \"group\") return;\r\n if (!e) e = window.event;\r\n if (e.target.tagName != \"LABEL\") return false;\r\n var oldTxt = e.target.innerHTML;\r\n var p = e.target.parentNode;\r\n var x = parseInt(p.style.left, 10) + 18,\r\n y = parseInt(p.style.top, 10) + 1;\r\n var t = getElCoordinate(This.$workArea[0]);\r\n This.$textArea.val(oldTxt).css({\r\n display: \"block\",\r\n width: 100,\r\n height: 14,\r\n left: t.left + x - This.$workArea[0].parentNode.scrollLeft,\r\n top: t.top + y - This.$workArea[0].parentNode.scrollTop\r\n }).data(\"id\", p.id).focus();\r\n This.$workArea.parent().one(\"mousedown\", function(e) {\r\n if (e.button == 2) return false;\r\n if (This.$textArea.css(\"display\") == \"block\") {\r\n This.setName(This.$textArea.data(\"id\"), This.$textArea.val(), \"area\");\r\n This.$textArea.val(\"\").removeData(\"id\").hide();\r\n }\r\n });\r\n return false;\r\n });\r\n //绑定点击事件\r\n this.$group.mouseup({ inthis: this }, function(e) {\r\n\r\n var This = e.data.inthis;\r\n if (This.$nowType != \"group\") return;\r\n if (!e) e = window.event;\r\n switch ($(e.target).attr(\"class\")) {\r\n case \"rs_close\":\r\n This.delArea(e.target.parentNode.parentNode.id);\r\n return false; //删除该分组区域\r\n case \"bg\":\r\n return;\r\n }\r\n switch (e.target.tagName) {\r\n case \"LABEL\":\r\n return false;\r\n case \"B\": //绑定变色功能\r\n var id = e.target.parentNode.id;\r\n switch (This.$areaData[id].color) {\r\n case \"red\":\r\n This.setAreaColor(id, \"yellow\");\r\n break;\r\n case \"yellow\":\r\n This.setAreaColor(id, \"blue\");\r\n break;\r\n case \"blue\":\r\n This.setAreaColor(id, \"green\");\r\n break;\r\n case \"green\":\r\n This.setAreaColor(id, \"red\");\r\n break;\r\n }\r\n return false;\r\n }\r\n if (e.data.inthis.$ghost.css(\"display\") == \"none\") {\r\n var X, Y;\r\n var ev = mousePosition(e),\r\n t = getElCoordinate(this);\r\n X = ev.x - t.left + this.parentNode.parentNode.scrollLeft - 1;\r\n Y = ev.y - t.top + this.parentNode.parentNode.scrollTop - 1;\r\n var color = [\"red\", \"yellow\", \"blue\", \"green\"];\r\n e.data.inthis.addArea(e.data.inthis.$id + \"_area_\" + e.data.inthis.$max, { name: \"area_\" + e.data.inthis.$max, left: X, top: Y, color: color[e.data.inthis.$max % 4], width: 200, height: 100 });\r\n e.data.inthis.$max++;\r\n return false;\r\n }\r\n });\r\n },\r\n //每一种类型结点及其按钮的说明文字\r\n setNodeRemarks: function(remark) {\r\n if (this.$tool != null) {\r\n this.$tool.children(\"a\").each(function() {\r\n this.title = remark[$(this).attr(\"id\").split(\"btn_\")[1]];\r\n });\r\n this.$nodeRemark = remark;\r\n }\r\n },\r\n\r\n //切换左边工具栏按钮,传参TYPE表示切换成哪种类型的按钮\r\n switchToolBtn: function(type) {\r\n this.$tool.children(\"#\" + this.$id + \"_btn_\" + this.$nowType.split(\" \")[0]).attr(\"class\", \"GooFlow_tool_btn\");\r\n if (this.$nowType == \"group\") {\r\n this.$workArea.prepend(this.$group);\r\n for (var key in this.$areaDom) this.$areaDom[key].addClass(\"lock\").children(\"div:eq(1)\").css(\"display\", \"none\");\r\n }\r\n this.$nowType = type;\r\n this.$tool.children(\"#\" + this.$id + \"_btn_\" + type.split(\" \")[0]).attr(\"class\", \"GooFlow_tool_btndown\");\r\n if (this.$nowType == \"group\") {\r\n this.blurItem();\r\n this.$workArea.append(this.$group);\r\n for (var key in this.$areaDom) this.$areaDom[key].removeClass(\"lock\").children(\"div:eq(1)\").css(\"display\", \"\");\r\n }\r\n if (this.$textArea.css(\"display\") == \"none\") this.$textArea.removeData(\"id\").val(\"\").hide();\r\n },\r\n //增加一个流程结点,传参为一个JSON,有id,name,top,left,width,height,type(结点类型)等属性\r\n addNode: function(id, json) {\r\n if (this.onItemAdd != null && !this.onItemAdd(id, \"node\", json)) return;\r\n if (this.$undoStack && this.$editable) {\r\n this.pushOper(\"delNode\", [id]);\r\n }\r\n var mark = json.type;\r\n if (json.type != \"startround\" && json.type != \"endround\") {\r\n if (!json.width || json.width < 86) json.width = 150;\r\n if (!json.height || json.height < 24) json.height = 65;\r\n if (!json.top || json.top < 0) json.top = 0;\r\n if (!json.left || json.left < 0) json.left = 0;\r\n var hack = 0;\r\n if (navigator.userAgent.indexOf(\"8.0\") != -1) hack = 2;\r\n this.$nodeDom[id] = $(\"
\" + json.name + \"
\");\r\n if (json.type.indexOf(\" mix\") > -1) this.$nodeDom[id].addClass(mark);\r\n //json.css = mark;\r\n //json.img = mark;\r\n } else {\r\n json.width = 24;\r\n json.height = 24;\r\n var name = json.name;\r\n if (json.type == 'startround') {\r\n name = \"开始\";\r\n }\r\n if (json.type == 'endround') {\r\n name = \"结束\";\r\n }\r\n this.$nodeDom[id] = $(\"
\" + name + \"
\");\r\n }\r\n var ua = navigator.userAgent.toLowerCase();\r\n if (ua.indexOf('msie') != -1 && ua.indexOf('8.0') != -1)\r\n this.$nodeDom[id].css(\"filter\", \"progid:DXImageTransform.Microsoft.Shadow(color=#94AAC2,direction=135,strength=2)\");\r\n this.$workArea.append(this.$nodeDom[id]);\r\n this.$nodeData[id] = json;\r\n ++this.$nodeCount;\r\n if (this.$editable) {\r\n this.$nodeData[id].alt = true;\r\n if (this.$deletedItem[id]) delete this.$deletedItem[id]; //在回退删除操作时,去掉该元素的删除记录\r\n }\r\n },\r\n initWorkForNode: function() {\r\n //绑定点击事件\r\n this.$workArea.delegate(\".GooFlow_item\", \"click\", { inthis: this }, function(e) {\r\n e.data.inthis.focusItem(this.id, true);\r\n $(this).removeClass(\"item_mark\");\r\n //if (!$(this).hasClass(\"item_startround\")) {\r\n // LoadrightMenu(\"#\" + this.id);\r\n //}\r\n //if (!$(this).hasClass(\"item_endround\")) {\r\n // LoadrightMenu(\"#\" + this.id);\r\n //}\r\n });\r\n //绑定右击事件\r\n this.$workArea.delegate(\".GooFlow_item\", \"contextmenu\", { inthis: this }, function(e) {\r\n e.data.inthis.focusItem(this.id, true);\r\n $(this).removeClass(\"item_mark\");\r\n return false;\r\n });\r\n //绑定用鼠标移动事件\r\n this.$workArea.delegate(\".ico\", \"mousedown\", { inthis: this }, function(e) {\r\n if (!e) e = window.event;\r\n if (e.button == 2) return false;\r\n var This = e.data.inthis;\r\n if (This.$nowType == \"direct\") return;\r\n var Dom = $(this).parents(\".GooFlow_item\");\r\n var id = Dom.attr(\"id\");\r\n This.focusItem(id, true);\r\n var hack = 1;\r\n if (navigator.userAgent.indexOf(\"8.0\") != -1) hack = 0;\r\n var ev = mousePosition(e),\r\n t = getElCoordinate(This.$workArea[0]);\r\n\r\n Dom.children(\"table\").clone().prependTo(This.$ghost);\r\n var X, Y;\r\n X = ev.x - t.left + This.$workArea[0].parentNode.scrollLeft;\r\n Y = ev.y - t.top + This.$workArea[0].parentNode.scrollTop;\r\n var vX = X - This.$nodeData[id].left,\r\n vY = Y - This.$nodeData[id].top;\r\n var isMove = false;\r\n document.onmousemove = function(e) {\r\n\r\n if (!e) e = window.event;\r\n var ev = mousePosition(e);\r\n if (X == ev.x - vX && Y == ev.y - vY) return false;\r\n X = ev.x - vX;\r\n Y = ev.y - vY;\r\n\r\n if (isMove && This.$ghost.css(\"display\") == \"none\") {\r\n This.$ghost.css({\r\n display: \"block\",\r\n width: $('#' + id).width() - 2 + \"px\",\r\n height: $('#' + id).height() - 2 + \"px\",\r\n top: This.$nodeData[id].top + t.top - This.$workArea[0].parentNode.scrollTop + hack + \"px\",\r\n left: This.$nodeData[id].left + t.left - This.$workArea[0].parentNode.scrollLeft + hack + \"px\",\r\n cursor: \"move\"\r\n });\r\n }\r\n\r\n if (X < t.left - This.$workArea[0].parentNode.scrollLeft) {\r\n X = t.left - This.$workArea[0].parentNode.scrollLeft;\r\n } else if (X + This.$workArea[0].parentNode.scrollLeft + This.$nodeData[id].width > t.left + This.$workArea.width()) {\r\n X = t.left + This.$workArea.width() - This.$workArea[0].parentNode.scrollLeft - This.$nodeData[id].width;\r\n }\r\n if (Y < t.top - This.$workArea[0].parentNode.scrollTop) {\r\n Y = t.top - This.$workArea[0].parentNode.scrollTop;\r\n } else if (Y + This.$workArea[0].parentNode.scrollTop + This.$nodeData[id].height > t.top + This.$workArea.height()) {\r\n Y = t.top + This.$workArea.height() - This.$workArea[0].parentNode.scrollTop - This.$nodeData[id].height;\r\n }\r\n\r\n This.$ghost.css({ left: X + This.$workArea[0].parentNode.scrollLeft - t.left + hack + 62 + \"px\", top: Y + hack + \"px\" });\r\n isMove = true;\r\n }\r\n document.onmouseup = function(e) {\r\n if (isMove) This.moveNode(id, X + This.$workArea[0].parentNode.scrollLeft - t.left, Y + This.$workArea[0].parentNode.scrollTop - t.top);\r\n This.$ghost.empty().hide();\r\n document.onmousemove = null;\r\n document.onmouseup = null;\r\n }\r\n });\r\n if (!this.$editable) return;\r\n //绑定鼠标覆盖/移出事件\r\n this.$workArea.delegate(\".GooFlow_item\", \"mouseenter\", { inthis: this }, function(e) {\r\n if (e.data.inthis.$nowType != \"direct\") return;\r\n $(this).addClass(\"item_mark\");\r\n });\r\n this.$workArea.delegate(\".GooFlow_item\", \"mouseleave\", { inthis: this }, function(e) {\r\n if (e.data.inthis.$nowType != \"direct\") return;\r\n $(this).removeClass(\"item_mark\");\r\n });\r\n //绑定连线时确定初始点\r\n this.$workArea.delegate(\".GooFlow_item\", \"mousedown\", { inthis: this }, function(e) {\r\n if (e.button == 2) return false;\r\n var This = e.data.inthis;\r\n if (This.$nowType != \"direct\") return;\r\n var ev = mousePosition(e),\r\n t = getElCoordinate(This.$workArea[0]);\r\n var X, Y;\r\n X = ev.x - t.left + This.$workArea[0].parentNode.scrollLeft;\r\n Y = ev.y - t.top + This.$workArea[0].parentNode.scrollTop;\r\n This.$workArea.data(\"lineStart\", { \"x\": X, \"y\": Y, \"id\": this.id }).css(\"cursor\", \"crosshair\");\r\n var line = GooFlow.prototype.drawLine(\"GooFlow_tmp_line\", [X, Y], [X, Y], true, true);\r\n This.$draw.appendChild(line);\r\n });\r\n //绑定连线时确定结束点\r\n this.$workArea.delegate(\".GooFlow_item\", \"mouseup\", { inthis: this }, function(e) {\r\n var This = e.data.inthis;\r\n if (This.$nowType != \"direct\") return;\r\n var lineStart = This.$workArea.data(\"lineStart\");\r\n if (lineStart) This.addLine(This.$id + \"_line_\" + This.$max, { from: lineStart.id, to: this.id, name: \"\" });\r\n This.$max++;\r\n });\r\n //绑定双击编辑事件\r\n this.$workArea.delegate(\".GooFlow_item > .span\", \"dblclick\", { inthis: this }, function(e) {\r\n var This = e.data.inthis;\r\n var type = $('.item_focus').hasClass('item_startround');\r\n if (type) {\r\n OpenNode(This);\r\n }\r\n //var oldTxt = this.innerHTML;\r\n //var This = e.data.inthis;\r\n //var id = this.parentNode.id;\r\n //var t = getElCoordinate(This.$workArea[0]);\r\n //This.$textArea.val(oldTxt).css({\r\n // display: \"block\", height: $(this).height(), width: 100,\r\n // left: t.left + This.$nodeData[id].left - This.$workArea[0].parentNode.scrollLeft - 24,\r\n // top: t.top + This.$nodeData[id].top - This.$workArea[0].parentNode.scrollTop + 26\r\n //})\r\n //\t.data(\"id\", This.$focus).focus();\r\n //This.$workArea.parent().one(\"mousedown\", function (e) {\r\n // if (e.button == 2) return false;\r\n // This.setName(This.$textArea.data(\"id\"), This.$textArea.val(), \"node\");\r\n // This.$textArea.val(\"\").removeData(\"id\").hide();\r\n //});\r\n });\r\n //节点双击事件\r\n this.$workArea.delegate(\".ico + td\", \"dblclick\", { inthis: this }, function(e) {\r\n var This = e.data.inthis;\r\n console.log(this, \"window\", window)\r\n OpenNode(This);\r\n //var oldTxt = this.innerHTML;\r\n //var This = e.data.inthis;\r\n //var id = $(this).parents(\".GooFlow_item\").attr(\"id\");\r\n //var t = getElCoordinate(This.$workArea[0]);\r\n //This.$textArea.val(oldTxt).css({\r\n // display: \"block\", width: $(this).width() + 24, height: $(this).height(),\r\n // left: t.left + 24 + This.$nodeData[id].left - This.$workArea[0].parentNode.scrollLeft,\r\n // top: t.top + 2 + This.$nodeData[id].top - This.$workArea[0].parentNode.scrollTop\r\n //})\r\n //\t.data(\"id\", This.$focus).focus();\r\n //This.$workArea.parent().one(\"mousedown\", function (e) {\r\n // if (e.button == 2) return false;\r\n // This.setName(This.$textArea.data(\"id\"), This.$textArea.val(), \"node\");\r\n // This.$textArea.val(\"\").removeData(\"id\").hide();\r\n //});\r\n });\r\n //绑定结点的删除功能\r\n this.$workArea.delegate(\".rs_close\", \"click\", { inthis: this }, function(e) {\r\n if (!e) e = window.event;\r\n e.data.inthis.delNode(e.data.inthis.$focus);\r\n return false;\r\n });\r\n //绑定结点的RESIZE功能\r\n this.$workArea.delegate(\".GooFlow_item > div > div[class!=rs_close]\", \"mousedown\", { inthis: this }, function(e) {\r\n if (!e) e = window.event;\r\n if (e.button == 2) return false;\r\n var cursor = $(this).css(\"cursor\");\r\n if (cursor == \"pointer\") { return; }\r\n var This = e.data.inthis;\r\n var id = This.$focus;\r\n This.switchToolBtn(\"cursor\");\r\n e.cancelBubble = true;\r\n e.stopPropagation();\r\n var hack = 1;\r\n if (navigator.userAgent.indexOf(\"8.0\") != -1) hack = 0;\r\n var ev = mousePosition(e),\r\n t = getElCoordinate(This.$workArea[0]);\r\n This.$ghost.css({\r\n display: \"block\",\r\n width: This.$nodeData[id].width - 2 + \"px\",\r\n height: This.$nodeData[id].height - 2 + \"px\",\r\n top: This.$nodeData[id].top + t.top - This.$workArea[0].parentNode.scrollTop + hack + \"px\",\r\n left: This.$nodeData[id].left + t.left - This.$workArea[0].parentNode.scrollLeft + hack + \"px\",\r\n cursor: cursor\r\n });\r\n var X, Y;\r\n X = ev.x - t.left + This.$workArea[0].parentNode.scrollLeft;\r\n Y = ev.y - t.top + This.$workArea[0].parentNode.scrollTop;\r\n var vX = (This.$nodeData[id].left + This.$nodeData[id].width) - X;\r\n var vY = (This.$nodeData[id].top + This.$nodeData[id].height) - Y;\r\n var isMove = false;\r\n This.$ghost.css(\"cursor\", cursor);\r\n document.onmousemove = function(e) {\r\n if (!e) e = window.event;\r\n var ev = mousePosition(e);\r\n X = ev.x - t.left + This.$workArea[0].parentNode.scrollLeft - This.$nodeData[id].left + vX;\r\n Y = ev.y - t.top + This.$workArea[0].parentNode.scrollTop - This.$nodeData[id].top + vY;\r\n if (X < 86) X = 86;\r\n if (Y < 24) Y = 24;\r\n isMove = true;\r\n switch (cursor) {\r\n case \"nw-resize\":\r\n This.$ghost.css({ width: X - 2 + \"px\", height: Y - 2 + \"px\" });\r\n break;\r\n case \"w-resize\":\r\n This.$ghost.css({ width: X - 2 + \"px\" });\r\n break;\r\n case \"n-resize\":\r\n This.$ghost.css({ height: Y - 2 + \"px\" });\r\n break;\r\n }\r\n }\r\n document.onmouseup = function(e) {\r\n This.$ghost.hide();\r\n if (!isMove) return;\r\n if (!e) e = window.event;\r\n This.resizeNode(id, This.$ghost.outerWidth(), This.$ghost.outerHeight());\r\n document.onmousemove = null;\r\n document.onmouseup = null;\r\n }\r\n });\r\n },\r\n //获取结点/连线/分组区域的详细信息\r\n getItemInfo: function(id, type) {\r\n switch (type) {\r\n case \"node\":\r\n return this.$nodeData[id] || null;\r\n case \"line\":\r\n return this.$lineData[id] || null;\r\n case \"area\":\r\n return this.$areaData[id] || null;\r\n }\r\n },\r\n //取消所有结点/连线被选定的状态\r\n blurItem: function() {\r\n if (this.$focus != \"\") {\r\n var jq = $(\"#\" + this.$focus);\r\n if (jq.prop(\"tagName\") == \"DIV\") {\r\n if (this.onItemBlur != null && !this.onItemBlur(id, \"node\")) return false;\r\n jq.removeClass(\"item_focus\").children(\"div:eq(0)\").css(\"display\", \"none\");\r\n } else {\r\n if (this.onItemBlur != null && !this.onItemBlur(id, \"line\")) return false;\r\n if (GooFlow.prototype.useSVG != \"\") {\r\n if (!this.$lineData[this.$focus].marked) {\r\n jq[0].childNodes[1].setAttribute(\"stroke\", \"gray\");\r\n jq[0].childNodes[1].setAttribute(\"marker-end\", \"url(#arrow1)\");\r\n }\r\n } else {\r\n if (!this.$lineData[this.$focus].marked) jq[0].strokeColor = \"gray\";\r\n }\r\n this.$lineMove.hide().removeData(\"type\").removeData(\"tid\");\r\n if (this.$editable) this.$lineOper.hide().removeData(\"tid\");\r\n }\r\n }\r\n this.$focus = \"\";\r\n return true;\r\n },\r\n //选定某个结点/转换线 bool:TRUE决定了要触发选中事件,FALSE则不触发选中事件,多用在程序内部调用。\r\n focusItem: function(id, bool) {\r\n var jq = $(\"#\" + id);\r\n if (jq.length == 0) return;\r\n if (!this.blurItem()) return; //先执行\"取消选中\",如果返回FLASE,则也会阻止选定事件继续进行.\r\n if (jq.prop(\"tagName\") == \"DIV\") {\r\n if (bool && this.onItemFocus != null && !this.onItemFocus(id, \"node\")) return;\r\n jq.addClass(\"item_focus\");\r\n if (this.$editable) jq.children(\"div:eq(0)\").css(\"display\", \"block\");\r\n this.$workArea.append(jq);\r\n } else { //如果是连接线\r\n if (this.onItemFocus != null && !this.onItemFocus(id, \"line\")) return;\r\n if (GooFlow.prototype.useSVG != \"\") {\r\n jq[0].childNodes[1].setAttribute(\"stroke\", \"#ff3300\");\r\n jq[0].childNodes[1].setAttribute(\"marker-end\", \"url(#arrow2)\");\r\n } else jq[0].strokeColor = \"#ff3300\";\r\n if (!this.$editable) return;\r\n var x, y, from, to;\r\n if (GooFlow.prototype.useSVG != \"\") {\r\n from = jq.attr(\"from\").split(\",\");\r\n to = jq.attr(\"to\").split(\",\");\r\n } else {\r\n var n = jq[0].getAttribute(\"fromTo\").split(\",\");\r\n from = [n[0], n[1]];\r\n to = [n[2], n[3]];\r\n }\r\n from[0] = parseInt(from[0], 10);\r\n from[1] = parseInt(from[1], 10);\r\n to[0] = parseInt(to[0], 10);\r\n to[1] = parseInt(to[1], 10);\r\n //var t=getElCoordinate(this.$workArea[0]);\r\n if (this.$lineData[id].type == \"lr\") {\r\n from[0] = this.$lineData[id].M;\r\n to[0] = from[0];\r\n\r\n this.$lineMove.css({\r\n width: \"5px\",\r\n height: (to[1] - from[1]) * (to[1] > from[1] ? 1 : -1) + \"px\",\r\n left: from[0] - 3 + \"px\",\r\n top: (to[1] > from[1] ? from[1] : to[1]) + 1 + \"px\",\r\n cursor: \"e-resize\",\r\n display: \"block\"\r\n }).data({ \"type\": \"lr\", \"tid\": id });\r\n } else if (this.$lineData[id].type == \"tb\") {\r\n from[1] = this.$lineData[id].M;\r\n to[1] = from[1];\r\n this.$lineMove.css({\r\n width: (to[0] - from[0]) * (to[0] > from[0] ? 1 : -1) + \"px\",\r\n height: \"5px\",\r\n left: (to[0] > from[0] ? from[0] : to[0]) + 1 + \"px\",\r\n top: from[1] - 3 + \"px\",\r\n cursor: \"s-resize\",\r\n display: \"block\"\r\n }).data({ \"type\": \"tb\", \"tid\": id });\r\n }\r\n x = (from[0] + to[0]) / 2 - 35;\r\n y = (from[1] + to[1]) / 2 + 6;\r\n this.$lineOper.css({ display: \"block\", left: x + \"px\", top: y + \"px\" }).data(\"tid\", id);\r\n }\r\n this.$focus = id;\r\n this.switchToolBtn(\"cursor\");\r\n },\r\n //移动结点到一个新的位置\r\n moveNode: function(id, left, top) {\r\n if (!this.$nodeData[id]) return;\r\n if (this.onItemMove != null && !this.onItemMove(id, \"node\", left, top)) return;\r\n if (this.$undoStack) {\r\n var paras = [id, this.$nodeData[id].left, this.$nodeData[id].top];\r\n this.pushOper(\"moveNode\", paras);\r\n }\r\n if (left < 0) left = 0;\r\n if (top < 0) top = 0;\r\n $(\"#\" + id).css({ left: left + \"px\", top: top + \"px\" });\r\n this.$nodeData[id].left = left;\r\n this.$nodeData[id].top = top;\r\n //重画转换线\r\n this.resetLines(id, this.$nodeData[id]);\r\n if (this.$editable) {\r\n this.$nodeData[id].alt = true;\r\n }\r\n },\r\n //设置结点/连线/分组区域的文字信息\r\n setName: function(id, name, type, setinfo) {\r\n var oldName;\r\n if (type == \"node\") { //如果是结点\r\n this.$nodeData[id].setInfo = setinfo;\r\n if (!this.$nodeData[id])\r\n if (this.$nodeData[id].name == name)\r\n if (this.onItemRename != null && !this.onItemRename(id, name, \"node\"))\r\n oldName = this.$nodeData[id].name;\r\n this.$nodeData[id].name = name;\r\n if (this.$nodeData[id].type.indexOf(\"round\") > 1) {\r\n this.$nodeDom[id].children(\".span\").text(name);\r\n } else {\r\n this.$nodeDom[id].find(\"td:eq(1)\").text(name);\r\n var hack = 0;\r\n if (navigator.userAgent.indexOf(\"8.0\") != -1) hack = 2;\r\n var width = this.$nodeDom[id].outerWidth();\r\n var height = this.$nodeDom[id].outerHeight();\r\n this.$nodeDom[id].children(\"table\").css({ width: width - 2 + \"px\", height: height - 2 + \"px\" });\r\n this.$nodeData[id].width = width;\r\n this.$nodeData[id].height = height;\r\n }\r\n if (this.$editable) {\r\n this.$nodeData[id].alt = true;\r\n }\r\n //重画转换线\r\n this.resetLines(id, this.$nodeData[id]);\r\n } else if (type == \"line\") { //如果是线\r\n this.$lineData[id].setInfo = setinfo;\r\n if (!this.$lineData[id])\r\n if (this.$lineData[id].name == name)\r\n if (this.onItemRename != null && !this.onItemRename(id, name, \"line\"))\r\n oldName = this.$lineData[id].name;\r\n this.$lineData[id].name = name;\r\n if (GooFlow.prototype.useSVG != \"\") {\r\n this.$lineDom[id].childNodes[2].textContent = name;\r\n } else {\r\n this.$lineDom[id].childNodes[1].innerHTML = name;\r\n var n = this.$lineDom[id].getAttribute(\"fromTo\").split(\",\");\r\n var x;\r\n if (this.$lineData[id].type != \"lr\") {\r\n x = (n[2] - n[0]) / 2;\r\n } else {\r\n var Min = n[2] > n[0] ? n[0] : n[2];\r\n if (Min > this.$lineData[id].M) Min = this.$lineData[id].M;\r\n x = this.$lineData[id].M - Min;\r\n }\r\n if (x < 0) x = x * -1;\r\n this.$lineDom[id].childNodes[1].style.left = x - this.$lineDom[id].childNodes[1].offsetWidth / 2 + 4 + \"px\";\r\n }\r\n if (this.$editable) {\r\n this.$lineData[id].alt = true;\r\n }\r\n } else if (type == \"area\") { //如果是分组区域\r\n if (!this.$areaData[id]) return;\r\n if (this.$areaData[id].name == name) return;\r\n if (this.onItemRename != null && !this.onItemRename(id, name, \"area\")) return;\r\n oldName = this.$areaData[id].name;\r\n this.$areaData[id].name = name;\r\n this.$areaDom[id].children(\"label\").text(name);\r\n if (this.$editable) {\r\n this.$areaData[id].alt = true;\r\n }\r\n }\r\n if (this.$undoStack) {\r\n var paras = [id, oldName, type];\r\n this.pushOper(\"setName\", paras);\r\n }\r\n },\r\n //设置结点的尺寸,仅支持非开始/结束结点\r\n resizeNode: function(id, width, height) {\r\n if (!this.$nodeData[id]) return;\r\n if (this.onItemResize != null && !this.onItemResize(id, \"node\", width, height)) return;\r\n if (this.$nodeData[id].type == \"start\" || this.$nodeData[id].type == \"end\") return;\r\n if (this.$undoStack) {\r\n var paras = [id, this.$nodeData[id].width, this.$nodeData[id].height];\r\n this.pushOper(\"resizeNode\", paras);\r\n }\r\n var hack = 0;\r\n if (navigator.userAgent.indexOf(\"8.0\") != -1) hack = 2;\r\n this.$nodeDom[id].children(\"table\").css({ width: width - 2 + \"px\", height: height - 2 + \"px\" });\r\n width = this.$nodeDom[id].outerWidth() - hack;\r\n height = this.$nodeDom[id].outerHeight() - hack;\r\n this.$nodeDom[id].children(\"table\").css({ width: width - 2 + \"px\", height: height - 2 + \"px\" });\r\n this.$nodeData[id].width = width;\r\n this.$nodeData[id].height = height;\r\n if (this.$editable) {\r\n this.$nodeData[id].alt = true;\r\n }\r\n //重画转换线\r\n this.resetLines(id, this.$nodeData[id]);\r\n },\r\n //删除结点\r\n delNode: function(id) {\r\n if (!this.$nodeData[id]) return;\r\n if (this.onItemDel != null && !this.onItemDel(id, \"node\")) return;\r\n //先删除可能的连线\r\n for (var k in this.$lineData) {\r\n if (this.$lineData[k].from == id || this.$lineData[k].to == id) {\r\n //this.$draw.removeChild(this.$lineDom[k]);\r\n //delete this.$lineData[k];\r\n //delete this.$lineDom[k];\r\n this.delLine(k);\r\n }\r\n }\r\n //再删除结点本身\r\n if (this.$undoStack) {\r\n var paras = [id, this.$nodeData[id]];\r\n this.pushOper(\"addNode\", paras);\r\n }\r\n delete this.$nodeData[id];\r\n this.$nodeDom[id].remove();\r\n delete this.$nodeDom[id];\r\n --this.$nodeCount;\r\n if (this.$focus == id) this.$focus = \"\";\r\n\r\n if (this.$editable) {\r\n //在回退新增操作时,如果节点ID以this.$id+\"_node_\"开头,则表示为本次编辑时新加入的节点,这些节点的删除不用加入到$deletedItem中\r\n if (id.indexOf(this.$id + \"_node_\") < 0)\r\n this.$deletedItem[id] = \"node\";\r\n }\r\n },\r\n //设置流程图的名称\r\n setTitle: function(text) {\r\n this.$title = text;\r\n if (this.$head) this.$head.children(\"label\").attr(\"title\", text).text(text);\r\n },\r\n //载入一组数据\r\n loadData: function(data) {\r\n if (data == undefined) {\r\n data = \"\";\r\n }\r\n var t = this.$editable;\r\n this.$editable = false;\r\n if (data.title) this.setTitle(data.title);\r\n if (data.initNum) this.$max = data.initNum;\r\n for (var i in data.nodes)\r\n this.addNode(data.nodes[i].id, data.nodes[i]);\r\n for (var j in data.lines)\r\n this.addLine(data.lines[j].id, data.lines[j]);\r\n for (var k in data.areas)\r\n this.addArea(data.areas[k].id, data.areas[k]);\r\n this.$editable = t;\r\n this.$deletedItem = {};\r\n },\r\n //用AJAX方式,远程读取一组数据\r\n //参数para为JSON结构,与JQUERY中$.ajax()方法的传参一样\r\n loadDataAjax: function(para) {\r\n var This = this;\r\n $.ajax({\r\n type: para.type,\r\n url: para.url,\r\n dataType: \"json\",\r\n data: para.data,\r\n success: function(msg) {\r\n if (para.dataFilter) para.dataFilter(msg, \"json\");\r\n This.loadData(msg);\r\n if (para.success) para.success(msg);\r\n },\r\n error: function(XMLHttpRequest, textStatus, errorThrown) {\r\n if (para.error) para.error(textStatus, errorThrown);\r\n }\r\n })\r\n },\r\n //把画好的整个流程图导出到一个变量中(其实也可以直接访问GooFlow对象的$nodeData,$lineData,$areaData这三个JSON属性)\r\n exportData: function() {\r\n var ret = { title: this.$title, nodes: this.$nodeData, lines: this.$lineData, areas: this.$areaData, initNum: this.$max };\r\n\r\n var _nodeobject = [],\r\n _lineobject = [];\r\n for (var k1 in ret.nodes) {\r\n if (!ret.nodes[k1].marked) {\r\n delete ret.nodes[k1][\"marked\"];\r\n }\r\n ret.nodes[k1][\"id\"] = k1;\r\n _nodeobject.push(ret.nodes[k1]);\r\n }\r\n ret.nodes = _nodeobject;\r\n for (var k2 in ret.lines) {\r\n if (!ret.lines[k2].marked) {\r\n delete ret.lines[k2][\"marked\"];\r\n }\r\n ret.lines[k2][\"id\"] = k2;\r\n _lineobject.push(ret.lines[k2]);\r\n }\r\n ret.lines = _lineobject;\r\n return ret;\r\n },\r\n //只把本次编辑流程图中作了变更(包括增删改)的元素导出到一个变量中,以方便用户每次编辑载入的流程图后只获取变更过的数据\r\n exportAlter: function() {\r\n var ret = { nodes: {}, lines: {}, areas: {} };\r\n for (var k1 in this.$nodeData) {\r\n if (this.$nodeData[k1].alt) {\r\n ret.nodes[k1] = this.$nodeData[k1];\r\n }\r\n }\r\n for (var k2 in this.$lineData) {\r\n if (this.$lineData[k2].alt) {\r\n ret.lines[k2] = this.$lineData[k2];\r\n }\r\n }\r\n for (var k3 in this.$areaData) {\r\n if (this.$areaData[k3].alt) {\r\n ret.areas[k3] = this.$areaData[k3];\r\n }\r\n }\r\n ret.deletedItem = this.$deletedItem;\r\n return ret;\r\n },\r\n //变更元素的ID,一般用于快速保存后,将后台返回新元素的ID更新到页面中;type为元素类型(节点,连线,区块)\r\n transNewId: function(oldId, newId, type) {\r\n var tmp;\r\n switch (type) {\r\n case \"node\":\r\n if (this.$nodeData[oldId]) {\r\n tmp = this.$nodeData[oldId];\r\n delete this.$nodeData[oldId];\r\n this.$nodeData[newId] = tmp;\r\n }\r\n break;\r\n case \"line\":\r\n if (this.$lineData[oldId]) {\r\n tmp = this.$lineData[oldId];\r\n delete this.$lineData[oldId];\r\n this.$lineData[newId] = tmp;\r\n }\r\n break;\r\n case \"area\":\r\n if (this.$areaData[oldId]) {\r\n tmp = this.$areaData[oldId];\r\n delete this.$areaData[oldId];\r\n this.$areaData[newId] = tmp;\r\n }\r\n break;\r\n }\r\n },\r\n //清空工作区及已载入的数据\r\n clearData: function() {\r\n for (var key in this.$nodeData) {\r\n this.delNode(key);\r\n }\r\n for (var key in this.$lineData) {\r\n this.delLine(key);\r\n }\r\n for (var key in this.$areaData) {\r\n this.delArea(key);\r\n }\r\n this.$deletedItem = {};\r\n },\r\n //销毁自己\r\n destrory: function() {\r\n this.$bgDiv.empty();\r\n this.$lineData = null;\r\n this.$nodeData = null;\r\n this.$lineDom = null;\r\n this.$nodeDom = null;\r\n this.$areaDom = null;\r\n this.$areaData = null;\r\n this.$nodeCount = 0;\r\n this.$areaCount = 0;\r\n this.$areaCount = 0;\r\n this.$deletedItem = {};\r\n },\r\n ///////////以下为有关画线的方法\r\n //绘制一条箭头线,并返回线的DOM\r\n drawLine: function(id, sp, ep, mark, dash) {\r\n var line;\r\n if (GooFlow.prototype.useSVG != \"\") {\r\n line = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\r\n var hi = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\r\n var path = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\r\n\r\n if (id != \"\") line.setAttribute(\"id\", id);\r\n line.setAttribute(\"from\", sp[0] + \",\" + sp[1]);\r\n line.setAttribute(\"to\", ep[0] + \",\" + ep[1]);\r\n hi.setAttribute(\"visibility\", \"hidden\");\r\n hi.setAttribute(\"stroke-width\", 9);\r\n hi.setAttribute(\"fill\", \"none\");\r\n hi.setAttribute(\"stroke\", \"white\");\r\n hi.setAttribute(\"d\", \"M \" + sp[0] + \" \" + sp[1] + \" L \" + ep[0] + \" \" + ep[1]);\r\n hi.setAttribute(\"pointer-events\", \"stroke\");\r\n path.setAttribute(\"d\", \"M \" + sp[0] + \" \" + sp[1] + \" L \" + ep[0] + \" \" + ep[1]);\r\n path.setAttribute(\"stroke-width\", 2.0);\r\n path.setAttribute(\"stroke-linecap\", \"round\");\r\n path.setAttribute(\"fill\", \"none\");\r\n if (dash) path.setAttribute(\"style\", \"stroke-dasharray:6,5\");\r\n if (mark) {\r\n path.setAttribute(\"stroke\", \"#ff3300\");\r\n path.setAttribute(\"marker-end\", \"url(#arrow2)\");\r\n } else {\r\n path.setAttribute(\"stroke\", \"gray\");\r\n path.setAttribute(\"marker-end\", \"url(#arrow1)\");\r\n }\r\n line.appendChild(hi);\r\n line.appendChild(path);\r\n line.style.cursor = \"crosshair\";\r\n if (id != \"\" && id != \"GooFlow_tmp_line\") {\r\n var text = document.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\r\n //text.textContent=id;\r\n line.appendChild(text);\r\n var x = (ep[0] + sp[0]) / 2;\r\n var y = (ep[1] + sp[1]) / 2;\r\n text.setAttribute(\"text-anchor\", \"middle\");\r\n text.setAttribute(\"x\", x);\r\n text.setAttribute(\"y\", y - 5);\r\n line.style.cursor = \"pointer\";\r\n text.style.cursor = \"text\";\r\n }\r\n } else {\r\n line = document.createElement(\"v:polyline\");\r\n if (id != \"\") line.id = id;\r\n //line.style.position=\"absolute\";\r\n line.points.value = sp[0] + \",\" + sp[1] + \" \" + ep[0] + \",\" + ep[1];\r\n line.setAttribute(\"fromTo\", sp[0] + \",\" + sp[1] + \",\" + ep[0] + \",\" + ep[1]);\r\n line.strokeWeight = \"1.2\";\r\n line.stroke.EndArrow = \"Block\";\r\n line.style.cursor = \"crosshair\";\r\n if (id != \"\" && id != \"GooFlow_tmp_line\") {\r\n var text = document.createElement(\"div\");\r\n //text.innerHTML=id;\r\n line.appendChild(text);\r\n var x = (ep[0] - sp[0]) / 2;\r\n var y = (ep[1] - sp[1]) / 2;\r\n if (x < 0) x = x * -1;\r\n if (y < 0) y = y * -1;\r\n text.style.left = x + \"px\";\r\n text.style.top = y - 6 + \"px\";\r\n line.style.cursor = \"pointer\";\r\n }\r\n if (dash) line.stroke.dashstyle = \"Dash\";\r\n if (mark) line.strokeColor = \"#ff3300\";\r\n else line.strokeColor = \"gray\";\r\n }\r\n return line;\r\n },\r\n //画一条只有两个中点的折线\r\n drawPoly: function(id, sp, m1, m2, ep, mark) {\r\n var poly, strPath;\r\n if (GooFlow.prototype.useSVG != \"\") {\r\n poly = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\r\n var hi = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\r\n var path = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\r\n if (id != \"\") poly.setAttribute(\"id\", id);\r\n poly.setAttribute(\"from\", sp[0] + \",\" + sp[1]);\r\n poly.setAttribute(\"to\", ep[0] + \",\" + ep[1]);\r\n hi.setAttribute(\"visibility\", \"hidden\");\r\n hi.setAttribute(\"stroke-width\", 9);\r\n hi.setAttribute(\"fill\", \"none\");\r\n hi.setAttribute(\"stroke\", \"white\");\r\n strPath = \"M \" + sp[0] + \" \" + sp[1];\r\n if (m1[0] != sp[0] || m1[1] != sp[1])\r\n strPath += \" L \" + m1[0] + \" \" + m1[1];\r\n if (m2[0] != ep[0] || m2[1] != ep[1])\r\n strPath += \" L \" + m2[0] + \" \" + m2[1];\r\n strPath += \" L \" + ep[0] + \" \" + ep[1];\r\n hi.setAttribute(\"d\", strPath);\r\n hi.setAttribute(\"pointer-events\", \"stroke\");\r\n path.setAttribute(\"d\", strPath);\r\n path.setAttribute(\"stroke-width\", 2.0);\r\n path.setAttribute(\"stroke-linecap\", \"round\");\r\n path.setAttribute(\"fill\", \"none\");\r\n if (mark) {\r\n path.setAttribute(\"stroke\", \"#ff3300\");\r\n path.setAttribute(\"marker-end\", \"url(#arrow2)\");\r\n } else {\r\n path.setAttribute(\"stroke\", \"gray\");\r\n path.setAttribute(\"marker-end\", \"url(#arrow1)\");\r\n }\r\n poly.appendChild(hi);\r\n poly.appendChild(path);\r\n var text = document.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\r\n //text.textContent=id;\r\n poly.appendChild(text);\r\n var x = (m2[0] + m1[0]) / 2;\r\n var y = (m2[1] + m1[1]) / 2;\r\n text.setAttribute(\"text-anchor\", \"middle\");\r\n text.setAttribute(\"x\", x);\r\n text.setAttribute(\"y\", y - 5);\r\n text.style.cursor = \"text\";\r\n poly.style.cursor = \"pointer\";\r\n } else {\r\n poly = document.createElement(\"v:Polyline\");\r\n if (id != \"\") poly.id = id;\r\n poly.filled = \"false\";\r\n strPath = sp[0] + \",\" + sp[1];\r\n if (m1[0] != sp[0] || m1[1] != sp[1])\r\n strPath += \" \" + m1[0] + \",\" + m1[1];\r\n if (m2[0] != ep[0] || m2[1] != ep[1])\r\n strPath += \" \" + m2[0] + \",\" + m2[1];\r\n strPath += \" \" + ep[0] + \",\" + ep[1];\r\n poly.points.value = strPath;\r\n poly.setAttribute(\"fromTo\", sp[0] + \",\" + sp[1] + \",\" + ep[0] + \",\" + ep[1]);\r\n poly.strokeWeight = \"1.2\";\r\n poly.stroke.EndArrow = \"Block\";\r\n var text = document.createElement(\"div\");\r\n //text.innerHTML=id;\r\n poly.appendChild(text);\r\n var x = (m2[0] - m1[0]) / 2;\r\n var y = (m2[1] - m1[1]) / 2;\r\n if (x < 0) x = x * -1;\r\n if (y < 0) y = y * -1;\r\n text.style.left = x + \"px\";\r\n text.style.top = y - 4 + \"px\";\r\n poly.style.cursor = \"pointer\";\r\n if (mark) poly.strokeColor = \"#ff3300\";\r\n else poly.strokeColor = \"gray\";\r\n }\r\n return poly;\r\n },\r\n //计算两个结点间要连直线的话,连线的开始坐标和结束坐标\r\n calcStartEnd: function(n1, n2) {\r\n var X_1, Y_1, X_2, Y_2;\r\n //X判断:\r\n var x11 = n1.left,\r\n x12 = n1.left + n1.width,\r\n x21 = n2.left,\r\n x22 = n2.left + n2.width;\r\n //结点2在结点1左边\r\n if (x11 >= x22) {\r\n X_1 = x11;\r\n X_2 = x22;\r\n }\r\n //结点2在结点1右边\r\n else if (x12 <= x21) {\r\n X_1 = x12;\r\n X_2 = x21;\r\n }\r\n //结点2在结点1水平部分重合\r\n else if (x11 <= x21 && x12 >= x21 && x12 <= x22) {\r\n X_1 = (x12 + x21) / 2;\r\n X_2 = X_1;\r\n } else if (x11 >= x21 && x12 <= x22) {\r\n X_1 = (x11 + x12) / 2;\r\n X_2 = X_1;\r\n } else if (x21 >= x11 && x22 <= x12) {\r\n X_1 = (x21 + x22) / 2;\r\n X_2 = X_1;\r\n } else if (x11 <= x22 && x12 >= x22) {\r\n X_1 = (x11 + x22) / 2;\r\n X_2 = X_1;\r\n }\r\n\r\n //Y判断:\r\n var y11 = n1.top,\r\n y12 = n1.top + n1.height,\r\n y21 = n2.top,\r\n y22 = n2.top + n2.height;\r\n //结点2在结点1上边\r\n if (y11 >= y22) {\r\n Y_1 = y11;\r\n Y_2 = y22;\r\n }\r\n //结点2在结点1下边\r\n else if (y12 <= y21) {\r\n Y_1 = y12;\r\n Y_2 = y21;\r\n }\r\n //结点2在结点1垂直部分重合\r\n else if (y11 <= y21 && y12 >= y21 && y12 <= y22) {\r\n Y_1 = (y12 + y21) / 2;\r\n Y_2 = Y_1;\r\n } else if (y11 >= y21 && y12 <= y22) {\r\n Y_1 = (y11 + y12) / 2;\r\n Y_2 = Y_1;\r\n } else if (y21 >= y11 && y22 <= y12) {\r\n Y_1 = (y21 + y22) / 2;\r\n Y_2 = Y_1;\r\n } else if (y11 <= y22 && y12 >= y22) {\r\n Y_1 = (y11 + y22) / 2;\r\n Y_2 = Y_1;\r\n }\r\n return { \"start\": [X_1, Y_1], \"end\": [X_2, Y_2] };\r\n },\r\n //计算两个结点间要连折线的话,连线的所有坐标\r\n calcPolyPoints: function(n1, n2, type, M) {\r\n //开始/结束两个结点的中心\r\n var SP = { x: n1.left + n1.width / 2, y: n1.top + n1.height / 2 };\r\n var EP = { x: n2.left + n2.width / 2, y: n2.top + n2.height / 2 };\r\n var sp = [],\r\n m1 = [],\r\n m2 = [],\r\n ep = [];\r\n //如果是允许中段可左右移动的折线,则参数M为可移动中段线的X坐标\r\n //粗略计算起始点\r\n sp = [SP.x, SP.y];\r\n ep = [EP.x, EP.y];\r\n if (type == \"lr\") {\r\n //粗略计算2个中点\r\n m1 = [M, SP.y];\r\n m2 = [M, EP.y];\r\n //再具体分析修改开始点和中点1\r\n if (m1[0] > n1.left && m1[0] < n1.left + n1.width) {\r\n m1[1] = (SP.y > EP.y ? n1.top : n1.top + n1.height);\r\n sp[0] = m1[0];\r\n sp[1] = m1[1];\r\n } else {\r\n sp[0] = (m1[0] < n1.left ? n1.left : n1.left + n1.width)\r\n }\r\n //再具体分析中点2和结束点\r\n if (m2[0] > n2.left && m2[0] < n2.left + n2.width) {\r\n m2[1] = (SP.y > EP.y ? n2.top + n2.height : n2.top);\r\n ep[0] = m2[0];\r\n ep[1] = m2[1];\r\n } else {\r\n ep[0] = (m2[0] < n2.left ? n2.left : n2.left + n2.width)\r\n }\r\n }\r\n //如果是允许中段可上下移动的折线,则参数M为可移动中段线的Y坐标\r\n else if (type == \"tb\") {\r\n //粗略计算2个中点\r\n m1 = [SP.x, M];\r\n m2 = [EP.x, M];\r\n //再具体分析修改开始点和中点1\r\n if (m1[1] > n1.top && m1[1] < n1.top + n1.height) {\r\n m1[0] = (SP.x > EP.x ? n1.left : n1.left + n1.width);\r\n sp[0] = m1[0];\r\n sp[1] = m1[1];\r\n } else {\r\n sp[1] = (m1[1] < n1.top ? n1.top : n1.top + n1.height)\r\n }\r\n //再具体分析中点2和结束点\r\n if (m2[1] > n2.top && m2[1] < n2.top + n2.height) {\r\n m2[0] = (SP.x > EP.x ? n2.left + n2.width : n2.left);\r\n ep[0] = m2[0];\r\n ep[1] = m2[1];\r\n } else {\r\n ep[1] = (m2[1] < n2.top ? n2.top : n2.top + n2.height);\r\n }\r\n }\r\n return { start: sp, m1: m1, m2: m2, end: ep };\r\n },\r\n //初始化折线中段的X/Y坐标,mType='rb'时为X坐标,mType='tb'时为Y坐标\r\n getMValue: function(n1, n2, mType) {\r\n if (mType == \"lr\") {\r\n return (n1.left + n1.width / 2 + n2.left + n2.width / 2) / 2;\r\n } else if (mType == \"tb\") {\r\n return (n1.top + n1.height / 2 + n2.top + n2.height / 2) / 2;\r\n }\r\n },\r\n //增加一条线\r\n addLine: function(id, json) {\r\n if (this.onItemAdd != null && !this.onItemAdd(id, \"line\", json)) return;\r\n if (this.$undoStack && this.$editable) {\r\n this.pushOper(\"delLine\", [id]);\r\n }\r\n var n1 = null,\r\n n2 = null; //获取开始/结束结点的数据\r\n if (json.from == json.to) return;\r\n //避免两个节点间不能有一条以上同向接连线\r\n for (var k in this.$lineData) {\r\n if ((json.from == this.$lineData[k].from && json.to == this.$lineData[k].to))\r\n return;\r\n }\r\n var n1 = this.$nodeData[json.from],\r\n n2 = this.$nodeData[json.to]; //获取开始/结束结点的数据\r\n if (!n1 || !n2) return;\r\n var res;\r\n if (json.type && json.type != \"sl\")\r\n res = GooFlow.prototype.calcPolyPoints(n1, n2, json.type, json.M);\r\n else\r\n res = GooFlow.prototype.calcStartEnd(n1, n2);\r\n if (!res) return;\r\n this.$lineData[id] = {};\r\n this.$lineData[id].setInfo = json.setInfo;\r\n this.$lineData[id].id = json.id;\r\n if (json.type) {\r\n this.$lineData[id].type = json.type;\r\n this.$lineData[id].M = json.M;\r\n } else this.$lineData[id].type = \"sl\"; //默认为直线\r\n this.$lineData[id].from = json.from;\r\n this.$lineData[id].to = json.to;\r\n this.$lineData[id].name = json.name;\r\n if (json.mark) this.$lineData[id].marked = json.mark;\r\n else this.$lineData[id].marked = false;\r\n\r\n if (this.$lineData[id].type == \"sl\")\r\n this.$lineDom[id] = GooFlow.prototype.drawLine(id, res.start, res.end, json.mark);\r\n else\r\n this.$lineDom[id] = GooFlow.prototype.drawPoly(id, res.start, res.m1, res.m2, res.end, json.mark);\r\n this.$draw.appendChild(this.$lineDom[id]);\r\n if (GooFlow.prototype.useSVG == \"\") {\r\n this.$lineDom[id].childNodes[1].innerHTML = json.name;\r\n if (this.$lineData[id].type != \"sl\") {\r\n var Min = (res.start[0] > res.end[0] ? res.end[0] : res.start[0]);\r\n if (Min > res.m2[0]) Min = res.m2[0];\r\n if (Min > res.m1[0]) Min = res.m1[0];\r\n this.$lineDom[id].childNodes[1].style.left = (res.m2[0] + res.m1[0]) / 2 - Min - this.$lineDom[id].childNodes[1].offsetWidth / 2 + 4;\r\n Min = (res.start[1] > res.end[1] ? res.end[1] : res.start[1]);\r\n if (Min > res.m2[1]) Min = res.m2[1];\r\n if (Min > res.m1[1]) Min = res.m1[1];\r\n this.$lineDom[id].childNodes[1].style.top = (res.m2[1] + res.m1[1]) / 2 - Min - this.$lineDom[id].childNodes[1].offsetHeight / 2;\r\n } else\r\n this.$lineDom[id].childNodes[1].style.left =\r\n ((res.end[0] - res.start[0]) * (res.end[0] > res.start[0] ? 1 : -1) - this.$lineDom[id].childNodes[1].offsetWidth) / 2 + 4;\r\n } else this.$lineDom[id].childNodes[2].textContent = json.name;\r\n ++this.$lineCount;\r\n if (this.$editable) {\r\n this.$lineData[id].alt = true;\r\n if (this.$deletedItem[id]) delete this.$deletedItem[id]; //在回退删除操作时,去掉该元素的删除记录\r\n }\r\n },\r\n //重构所有连向某个结点的线的显示,传参结构为$nodeData数组的一个单元结构\r\n resetLines: function(id, node) {\r\n for (var i in this.$lineData) {\r\n var other = null; //获取结束/开始结点的数据\r\n var res;\r\n if (this.$lineData[i].from == id) { //找结束点\r\n other = this.$nodeData[this.$lineData[i].to] || null;\r\n if (other == null) continue;\r\n if (this.$lineData[i].type == \"sl\")\r\n res = GooFlow.prototype.calcStartEnd(node, other);\r\n else\r\n res = GooFlow.prototype.calcPolyPoints(node, other, this.$lineData[i].type, this.$lineData[i].M)\r\n if (!res) break;\r\n } else if (this.$lineData[i].to == id) { //找开始点\r\n other = this.$nodeData[this.$lineData[i].from] || null;\r\n if (other == null) continue;\r\n if (this.$lineData[i].type == \"sl\")\r\n res = GooFlow.prototype.calcStartEnd(other, node);\r\n else\r\n res = GooFlow.prototype.calcPolyPoints(other, node, this.$lineData[i].type, this.$lineData[i].M);\r\n if (!res) break;\r\n }\r\n if (other == null) continue;\r\n this.$draw.removeChild(this.$lineDom[i]);\r\n if (this.$lineData[i].type == \"sl\") {\r\n this.$lineDom[i] = GooFlow.prototype.drawLine(i, res.start, res.end, this.$lineData[i].marked);\r\n } else {\r\n this.$lineDom[i] = GooFlow.prototype.drawPoly(i, res.start, res.m1, res.m2, res.end, this.$lineData[i].marked);\r\n }\r\n this.$draw.appendChild(this.$lineDom[i]);\r\n if (GooFlow.prototype.useSVG == \"\") {\r\n this.$lineDom[i].childNodes[1].innerHTML = this.$lineData[i].name;\r\n if (this.$lineData[i].type != \"sl\") {\r\n var Min = (res.start[0] > res.end[0] ? res.end[0] : res.start[0]);\r\n if (Min > res.m2[0]) Min = res.m2[0];\r\n if (Min > res.m1[0]) Min = res.m1[0];\r\n this.$lineDom[i].childNodes[1].style.left = (res.m2[0] + res.m1[0]) / 2 - Min - this.$lineDom[i].childNodes[1].offsetWidth / 2 + 4;\r\n Min = (res.start[1] > res.end[1] ? res.end[1] : res.start[1]);\r\n if (Min > res.m2[1]) Min = res.m2[1];\r\n if (Min > res.m1[1]) Min = res.m1[1];\r\n this.$lineDom[i].childNodes[1].style.top = (res.m2[1] + res.m1[1]) / 2 - Min - this.$lineDom[i].childNodes[1].offsetHeight / 2 - 4;\r\n } else\r\n this.$lineDom[i].childNodes[1].style.left =\r\n ((res.end[0] - res.start[0]) * (res.end[0] > res.start[0] ? 1 : -1) - this.$lineDom[i].childNodes[1].offsetWidth) / 2 + 4;\r\n } else this.$lineDom[i].childNodes[2].textContent = this.$lineData[i].name;\r\n }\r\n },\r\n //重新设置连线的样式 newType= \"sl\":直线, \"lr\":中段可左右移动型折线, \"tb\":中段可上下移动型折线\r\n setLineType: function(id, newType) {\r\n if (!newType || newType == null || newType == \"\" || newType == this.$lineData[id].type) return false;\r\n if (this.onLineSetType != null && !this.onLineSetType(id, newType)) return;\r\n if (this.$undoStack) {\r\n var paras = [id, this.$lineData[id].type];\r\n this.pushOper(\"setLineType\", paras);\r\n if (this.$lineData[id].type != \"sl\") {\r\n var para2 = [id, this.$lineData[id].M];\r\n this.pushOper(\"setLineM\", para2);\r\n }\r\n }\r\n var from = this.$lineData[id].from;\r\n var to = this.$lineData[id].to;\r\n this.$lineData[id].type = newType;\r\n var res;\r\n //如果是变成折线\r\n if (newType != \"sl\") {\r\n var res = GooFlow.prototype.calcPolyPoints(this.$nodeData[from], this.$nodeData[to], this.$lineData[id].type, this.$lineData[id].M);\r\n this.setLineM(id, this.getMValue(this.$nodeData[from], this.$nodeData[to], newType), true);\r\n }\r\n //如果是变回直线\r\n else {\r\n delete this.$lineData[id].M;\r\n this.$lineMove.hide().removeData(\"type\").removeData(\"tid\");\r\n res = GooFlow.prototype.calcStartEnd(this.$nodeData[from], this.$nodeData[to]);\r\n if (!res) return;\r\n this.$draw.removeChild(this.$lineDom[id]);\r\n this.$lineDom[id] = GooFlow.prototype.drawLine(id, res.start, res.end, this.$lineData[id].marked || this.$focus == id);\r\n this.$draw.appendChild(this.$lineDom[id]);\r\n if (GooFlow.prototype.useSVG == \"\") {\r\n this.$lineDom[id].childNodes[1].innerHTML = this.$lineData[id].name;\r\n this.$lineDom[id].childNodes[1].style.left =\r\n ((res.end[0] - res.start[0]) * (res.end[0] > res.start[0] ? 1 : -1) - this.$lineDom[id].childNodes[1].offsetWidth) / 2 + 4;\r\n } else\r\n this.$lineDom[id].childNodes[2].textContent = this.$lineData[id].name;\r\n }\r\n if (this.$focus == id) {\r\n this.focusItem(id);\r\n }\r\n if (this.$editable) {\r\n this.$lineData[id].alt = true;\r\n }\r\n },\r\n //设置折线中段的X坐标值(可左右移动时)或Y坐标值(可上下移动时)\r\n setLineM: function(id, M, noStack) {\r\n if (!this.$lineData[id] || M < 0 || !this.$lineData[id].type || this.$lineData[id].type == \"sl\") return false;\r\n if (this.onLineMove != null && !this.onLineMove(id, M)) return false;\r\n if (this.$undoStack && !noStack) {\r\n var paras = [id, this.$lineData[id].M];\r\n this.pushOper(\"setLineM\", paras);\r\n }\r\n var from = this.$lineData[id].from;\r\n var to = this.$lineData[id].to;\r\n this.$lineData[id].M = M;\r\n var ps = GooFlow.prototype.calcPolyPoints(this.$nodeData[from], this.$nodeData[to], this.$lineData[id].type, this.$lineData[id].M);\r\n this.$draw.removeChild(this.$lineDom[id]);\r\n this.$lineDom[id] = GooFlow.prototype.drawPoly(id, ps.start, ps.m1, ps.m2, ps.end, this.$lineData[id].marked || this.$focus == id);\r\n this.$draw.appendChild(this.$lineDom[id]);\r\n if (GooFlow.prototype.useSVG == \"\") {\r\n this.$lineDom[id].childNodes[1].innerHTML = this.$lineData[id].name;\r\n var Min = (ps.start[0] > ps.end[0] ? ps.end[0] : ps.start[0]);\r\n if (Min > ps.m2[0]) Min = ps.m2[0];\r\n if (Min > ps.m1[0]) Min = ps.m1[0];\r\n this.$lineDom[id].childNodes[1].style.left = (ps.m2[0] + ps.m1[0]) / 2 - Min - this.$lineDom[id].childNodes[1].offsetWidth / 2 + 4;\r\n Min = (ps.start[1] > ps.end[1] ? ps.end[1] : ps.start[1]);\r\n if (Min > ps.m2[1]) Min = ps.m2[1];\r\n if (Min > ps.m1[1]) Min = ps.m1[1];\r\n this.$lineDom[id].childNodes[1].style.top = (ps.m2[1] + ps.m1[1]) / 2 - Min - this.$lineDom[id].childNodes[1].offsetHeight / 2 - 4;\r\n } else this.$lineDom[id].childNodes[2].textContent = this.$lineData[id].name;\r\n if (this.$editable) {\r\n this.$lineData[id].alt = true;\r\n }\r\n },\r\n //删除转换线\r\n delLine: function(id) {\r\n if (!this.$lineData[id]) return;\r\n if (this.onItemDel != null && !this.onItemDel(id, \"node\")) return;\r\n if (this.$undoStack) {\r\n var paras = [id, this.$lineData[id]];\r\n this.pushOper(\"addLine\", paras);\r\n }\r\n this.$draw.removeChild(this.$lineDom[id]);\r\n delete this.$lineData[id];\r\n delete this.$lineDom[id];\r\n if (this.$focus == id) this.$focus = \"\";\r\n --this.$lineCount;\r\n if (this.$editable) {\r\n //在回退新增操作时,如果节点ID以this.$id+\"_line_\"开头,则表示为本次编辑时新加入的节点,这些节点的删除不用加入到$deletedItem中\r\n if (id.indexOf(this.$id + \"_line_\") < 0)\r\n this.$deletedItem[id] = \"line\";\r\n }\r\n this.$lineOper.hide();\r\n },\r\n //用颜色标注/取消标注一个结点或转换线,常用于显示重点或流程的进度。\r\n //这是一个在编辑模式中无用,但是在纯浏览模式中非常有用的方法,实际运用中可用于跟踪流程的进度。\r\n markItem: function(id, type, mark) {\r\n if (type == \"node\") {\r\n if (!this.$nodeData[id]) return;\r\n if (this.onItemMark != null && !this.onItemMark(id, \"node\", mark)) return;\r\n this.$nodeData[id].marked = mark || false;\r\n if (mark) this.$nodeDom[id].addClass(\"item_mark\");\r\n else this.$nodeDom[id].removeClass(\"item_mark\");\r\n\r\n } else if (type == \"line\") {\r\n if (!this.$lineData[id]) return;\r\n if (this.onItemMark != null && !this.onItemMark(id, \"line\", mark)) return;\r\n this.$lineData[id].marked = mark || false;\r\n if (GooFlow.prototype.useSVG != \"\") {\r\n if (mark) {\r\n this.$nodeDom[id].childNodes[1].setAttribute(\"stroke\", \"#ff3300\");\r\n this.$nodeDom[id].childNodes[1].setAttribute(\"marker-end\", \"url(#arrow2)\");\r\n } else {\r\n this.$nodeDom[id].childNodes[1].setAttribute(\"stroke\", \"gray\");\r\n this.$nodeDom[id].childNodes[1].setAttribute(\"marker-end\", \"url(#arrow1)\");\r\n }\r\n } else {\r\n if (mark) this.$nodeDom[id].strokeColor = \"#ff3300\";\r\n else this.$nodeDom[id].strokeColor = \"gray\"\r\n }\r\n }\r\n if (this.$undoStatck) {\r\n var paras = [id, type, !mark];\r\n this.pushOper(\"markItem\", paras);\r\n }\r\n },\r\n ////////////////////////以下为区域分组块操作\r\n moveArea: function(id, left, top) {\r\n if (!this.$areaData[id]) return;\r\n if (this.onItemMove != null && !this.onItemMove(id, \"area\", left, top)) return;\r\n if (this.$undoStack) {\r\n var paras = [id, this.$areaData[id].left, this.$areaData[id].top];\r\n this.pushOper(\"moveNode\", paras);\r\n }\r\n if (left < 0) left = 0;\r\n if (top < 0) top = 0;\r\n $(\"#\" + id).css({ left: left + \"px\", top: top + \"px\" });\r\n this.$areaData[id].left = left;\r\n this.$areaData[id].top = top;\r\n if (this.$editable) {\r\n this.$areaData[id].alt = true;\r\n }\r\n },\r\n //删除区域分组\r\n delArea: function(id) {\r\n if (!this.$areaData[id]) return;\r\n if (this.$undoStack) {\r\n var paras = [id, this.$areaData[id]];\r\n this.pushOper(\"addArea\", paras);\r\n }\r\n if (this.onItemDel != null && !this.onItemDel(id, \"node\")) return;\r\n delete this.$areaData[id];\r\n this.$areaDom[id].remove();\r\n delete this.$areaDom[id];\r\n --this.$areaCount;\r\n if (this.$editable) {\r\n //在回退新增操作时,如果节点ID以this.$id+\"_area_\"开头,则表示为本次编辑时新加入的节点,这些节点的删除不用加入到$deletedItem中\r\n if (id.indexOf(this.$id + \"_area_\") < 0)\r\n this.$deletedItem[id] = \"area\";\r\n }\r\n },\r\n //设置区域分组的颜色\r\n setAreaColor: function(id, color) {\r\n if (!this.$areaData[id]) return;\r\n if (this.$undoStack) {\r\n var paras = [id, this.$areaData[id].color];\r\n this.pushOper(\"setAreaColor\", paras);\r\n }\r\n if (color == \"red\" || color == \"yellow\" || color == \"blue\" || color == \"green\") {\r\n this.$areaDom[id].removeClass(\"area_\" + this.$areaData[id].color).addClass(\"area_\" + color);\r\n this.$areaData[id].color = color;\r\n }\r\n if (this.$editable) {\r\n this.$areaData[id].alt = true;\r\n }\r\n },\r\n //设置区域分块的尺寸\r\n resizeArea: function(id, width, height) {\r\n if (!this.$areaData[id]) return;\r\n if (this.onItemResize != null && !this.onItemResize(id, \"area\", width, height)) return;\r\n if (this.$undoStack) {\r\n var paras = [id, this.$areaData[id].width, this.$areaData[id].height];\r\n this.pushOper(\"resizeArea\", paras);\r\n }\r\n var hack = 0;\r\n if (navigator.userAgent.indexOf(\"8.0\") != -1) hack = 2;\r\n this.$areaDom[id].children(\".bg\").css({ width: width - 2 + \"px\", height: height - 2 + \"px\" });\r\n width = this.$areaDom[id].outerWidth();\r\n height = this.$areaDom[id].outerHeight();\r\n this.$areaDom[id].children(\"bg\").css({ width: width - 2 + \"px\", height: height - 2 + \"px\" });\r\n this.$areaData[id].width = width;\r\n this.$areaData[id].height = height;\r\n if (this.$editable) {\r\n this.$areaData[id].alt = true;\r\n }\r\n },\r\n addArea: function(id, json) {\r\n if (this.onItemAdd != null && !this.onItemAdd(id, \"area\", json)) return;\r\n if (this.$undoStack && this.$editable) {\r\n this.pushOper(\"delArea\", [id]);\r\n }\r\n this.$areaDom[id] = $(\"
\" +\r\n \"
\");\r\n this.$areaData[id] = json;\r\n this.$group.append(this.$areaDom[id]);\r\n if (this.$nowType != \"group\") this.$areaDom[id].children(\"div:eq(1)\").css(\"display\", \"none\");\r\n ++this.$areaCount;\r\n if (this.$editable) {\r\n this.$areaData[id].alt = true;\r\n if (this.$deletedItem[id]) delete this.$deletedItem[id]; //在回退删除操作时,去掉该元素的删除记录\r\n }\r\n },\r\n //重构整个流程图设计器的宽高\r\n reinitSize: function(width, height) {\r\n var w = (width || 800) - 2;\r\n var h = (height || 500) - 2;\r\n this.$bgDiv.css({ height: h + \"px\", width: w + \"px\" });\r\n var headHeight = 0,\r\n hack = 10;\r\n if (this.$head != null) {\r\n headHeight = 24;\r\n hack = 7;\r\n }\r\n if (this.$tool != null) {\r\n this.$tool.css({ height: h - headHeight - hack + \"px\" });\r\n }\r\n w -= 39;\r\n h = h - headHeight - (this.$head != null ? 5 : 8);\r\n this.$workArea.parent().css({ height: h + \"px\", width: w + \"px\" });\r\n this.$workArea.css({ height: h * 3 + \"px\", width: w * 3 + \"px\" });\r\n if (GooFlow.prototype.useSVG == \"\") {\r\n this.$draw.coordsize = w * 3 + \",\" + h * 3;\r\n }\r\n this.$draw.style.width = w * 3 + \"px\";\r\n this.$draw.style.height = +h * 3 + \"px\";\r\n if (this.$group == null) {\r\n this.$group.css({ height: h * 3 + \"px\", width: w * 3 + \"px\" });\r\n }\r\n }\r\n }\r\n //将此类的构造函数加入至JQUERY对象中\r\n$.extend({\r\n createGooFlow: function(bgDiv, property) {\r\n return new GooFlow(bgDiv, property);\r\n }\r\n});\r\n//获取一个DIV的绝对坐标的功能函数,即使是非绝对定位,一样能获取到\r\nfunction getElCoordinate(dom) {\r\n var t = dom.offsetTop;\r\n var l = dom.offsetLeft;\r\n dom = dom.offsetParent;\r\n while (dom) {\r\n t += dom.offsetTop;\r\n l += dom.offsetLeft;\r\n dom = dom.offsetParent;\r\n };\r\n return {\r\n top: t,\r\n left: l\r\n };\r\n}\r\n//兼容各种浏览器的,获取鼠标真实位置\r\nfunction mousePosition(ev) {\r\n if (!ev) ev = window.event;\r\n if (ev.pageX || ev.pageY) {\r\n return { x: ev.pageX, y: ev.pageY };\r\n }\r\n return {\r\n x: ev.clientX + document.documentElement.scrollLeft - document.body.clientLeft,\r\n y: ev.clientY + document.documentElement.scrollTop - document.body.clientTop\r\n };\r\n}\r\n\r\n\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////////////////eden-ui.js\r\n\r\n\r\n$.fn.ComboBox = function(options) {\r\n //options参数:description,height,width,allowSearch,url,param,data\r\n var $select = $(this);\r\n if (!$select.attr('id')) {\r\n return false;\r\n }\r\n if (options) {\r\n if ($select.find('.ui-select-text').length == 0) {\r\n var $select_html = \"\";\r\n $select_html += \"
\" + options.description + \"
\";\r\n $select_html += \"
\";\r\n $select_html += \"
\" + $select.html() + \"
\";\r\n if (options.allowSearch) {\r\n $select_html += \"
\";\r\n }\r\n $select_html += \"
\";\r\n $select.html('');\r\n $select.append($select_html);\r\n }\r\n }\r\n var $option_html = $($(\"

\").append($select.find('.ui-select-option').clone()).html());\r\n $option_html.attr('id', $select.attr('id') + '-option');\r\n $select.find('.ui-select-option').remove();\r\n if ($option_html.length > 0) {\r\n $('body').find('#' + $select.attr('id') + '-option').remove();\r\n }\r\n $('body').prepend($option_html);\r\n var $option = $(\"#\" + $select.attr('id') + \"-option\");\r\n\r\n if (options.url != undefined) {\r\n $option.find('.ui-select-option-content').html('');\r\n $.ajax({\r\n url: options.url,\r\n data: options.param,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n async: false,\r\n success: function(data) {\r\n options.data = data;\r\n var json = data;\r\n loadComboBoxView(json);\r\n },\r\n error: function(XMLHttpRequest, textStatus, errorThrown) {\r\n dialogMsg(errorThrown, -1);\r\n }\r\n });\r\n } else if (options.data != undefined) {\r\n var json = options.data;\r\n loadComboBoxView(json);\r\n } else {\r\n $option.find('li').css('padding', \"0 5px\");\r\n $option.find('li').click(function(e) {\r\n var data_text = $(this).text();\r\n var data_value = $(this).attr('data-value');\r\n $select.attr(\"data-value\", data_value).attr(\"data-text\", data_text);\r\n $select.find('.ui-select-text').html(data_text).css('color', '#000');\r\n $option.slideUp(150);\r\n $select.trigger(\"change\");\r\n e.stopPropagation();\r\n }).hover(function(e) {\r\n if (!$(this).hasClass('liactive')) {\r\n $(this).toggleClass('on');\r\n }\r\n e.stopPropagation();\r\n });\r\n }\r\n\r\n function loadComboBoxView(json, searchValue, m) {\r\n if (json.length > 0) {\r\n var $_html = $('

    ');\r\n if (options.description) {\r\n $_html.append('
  • ' + options.description + '
  • ');\r\n }\r\n $.each(json, function(i) {\r\n var row = json[i];\r\n var title = row[options.title];\r\n if (title == undefined) {\r\n title = \"\";\r\n }\r\n if (searchValue != undefined) {\r\n if (row[m.text].indexOf(searchValue) != -1) {\r\n $_html.append('
  • ' + row[options.text] + '
  • ');\r\n }\r\n } else {\r\n $_html.append('
  • ' + row[options.text] + '
  • ');\r\n }\r\n });\r\n $option.find('.ui-select-option-content').html($_html);\r\n $option.find('li').css('padding', \"0 5px\");\r\n $option.find('li').click(function(e) {\r\n var data_text = $(this).text();\r\n var data_value = $(this).attr('data-value');\r\n $select.attr(\"data-value\", data_value).attr(\"data-text\", data_text);\r\n $select.find('.ui-select-text').html(data_text).css('color', '#000');\r\n $option.slideUp(150);\r\n $select.trigger(\"change\");\r\n e.stopPropagation();\r\n }).hover(function(e) {\r\n if (!$(this).hasClass('liactive')) {\r\n $(this).toggleClass('on');\r\n }\r\n e.stopPropagation();\r\n });\r\n }\r\n }\r\n //操作搜索事件\r\n if (options.allowSearch) {\r\n $option.find('.ui-select-option-search').find('input').bind(\"keypress\", function(e) {\r\n if (event.keyCode == \"13\") {\r\n var value = $(this).val();\r\n loadComboBoxView($(this)[0].options.data, value, $(this)[0].options);\r\n }\r\n }).focus(function() {\r\n $(this).select();\r\n })[0][\"options\"] = options;\r\n }\r\n\r\n $select.unbind('click');\r\n $select.bind(\"click\", function(e) {\r\n if ($select.attr('readonly') == 'readonly' || $select.attr('disabled') == 'disabled') {\r\n return false;\r\n }\r\n $(this).addClass('ui-select-focus');\r\n if ($option.is(\":hidden\")) {\r\n $select.find('.ui-select-option').hide();\r\n $('.ui-select-option').hide();\r\n var left = $select.offset().left;\r\n var top = $select.offset().top + 29;\r\n var width = $select.width();\r\n if (options.width) {\r\n width = options.width;\r\n }\r\n if (($option.height() + top) < $(window).height()) {\r\n $option.slideDown(150).css({ top: top, left: left, width: width });\r\n } else {\r\n var _top = (top - $option.height() - 32)\r\n $option.show().css({ top: _top, left: left, width: width });\r\n $option.attr('data-show', true);\r\n }\r\n $option.css('border-top', '1px solid #ccc');\r\n $option.find('li').removeClass('liactive');\r\n $option.find('[data-value=' + $select.attr('data-value') + ']').addClass('liactive');\r\n $option.find('.ui-select-option-search').find('input').select();\r\n } else {\r\n if ($option.attr('data-show')) {\r\n $option.hide();\r\n } else {\r\n $option.slideUp(150);\r\n }\r\n }\r\n e.stopPropagation();\r\n });\r\n $(document).click(function(e) {\r\n var e = e ? e : window.event;\r\n var tar = e.srcElement || e.target;\r\n if (!$(tar).hasClass('form-control')) {\r\n if ($option.attr('data-show')) {\r\n $option.hide();\r\n } else {\r\n $option.slideUp(150);\r\n }\r\n $select.removeClass('ui-select-focus');\r\n e.stopPropagation();\r\n }\r\n });\r\n return $select;\r\n}\r\n\r\n$.fn.ComboBoxSetValue = function(value) {\r\n if ($.isNullOrEmpty(value)) {\r\n return;\r\n }\r\n var $select = $(this);\r\n var $option = $(\"#\" + $select.attr('id') + \"-option\");\r\n $select.attr('data-value', value);\r\n var data_text = $option.find('ul').find('[data-value=' + value + ']').html();\r\n if (data_text) {\r\n $select.attr('data-text', data_text);\r\n $select.find('.ui-select-text').html(data_text).css('color', '#000');\r\n $option.find('ul').find('[data-value=' + value + ']').addClass('liactive')\r\n }\r\n return $select;\r\n}\r\n\r\nDate.prototype.DateAdd = function(strInterval, Number) {\r\n //y年 q季度 m月 d日 w周 h小时 n分钟 s秒 ms毫秒\r\n var dtTmp = this;\r\n switch (strInterval) {\r\n case 's':\r\n return new Date(Date.parse(dtTmp) + (1000 * Number));\r\n case 'n':\r\n return new Date(Date.parse(dtTmp) + (60000 * Number));\r\n case 'h':\r\n return new Date(Date.parse(dtTmp) + (3600000 * Number));\r\n case 'd':\r\n return new Date(Date.parse(dtTmp) + (86400000 * Number));\r\n case 'w':\r\n return new Date(Date.parse(dtTmp) + ((86400000 * 7) * Number));\r\n case 'q':\r\n return new Date(dtTmp.getFullYear(), (dtTmp.getMonth()) + Number * 3, dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(), dtTmp.getSeconds());\r\n case 'm':\r\n return new Date(dtTmp.getFullYear(), (dtTmp.getMonth()) + Number, dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(), dtTmp.getSeconds());\r\n case 'y':\r\n return new Date((dtTmp.getFullYear() + Number), dtTmp.getMonth(), dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(), dtTmp.getSeconds());\r\n }\r\n}\r\n\r\n$.isNullOrEmpty = function(obj) {\r\n if ((typeof(obj) == \"string\" && obj == \"\") || obj == null || obj == undefined) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}\r\n\r\n$.standTabchange = function(object, forid) {\r\n $(\".standtabactived\").removeClass(\"standtabactived\");\r\n $(object).addClass(\"standtabactived\");\r\n $('.standtab-pane').css('display', 'none');\r\n $('#' + forid).css('display', 'block');\r\n}\r\n\r\n$.arrayClone = function(data) {\r\n return $.map(data, function(obj) {\r\n return $.extend(true, {}, obj);\r\n });\r\n}\r\n\r\nnewGuid = function() {\r\n var guid = \"\";\r\n for (var i = 1; i <= 32; i++) {\r\n var n = Math.floor(Math.random() * 16.0).toString(16);\r\n guid += n;\r\n if ((i == 8) || (i == 12) || (i == 16) || (i == 20)) guid += \"-\";\r\n }\r\n return guid;\r\n};\r\n\r\n\r\n\r\n////////////////////tree.js\r\n/**\r\n * @description {Class} wdTree\r\n * This is the main class of wdTree.法法师法\r\n */\r\n;\r\n(function($) {\r\n $.fn.swapClass = function(c1, c2) {\r\n return this.removeClass(c1).addClass(c2);\r\n };\r\n $.fn.switchClass = function(c1, c2) {\r\n if (this.hasClass(c1)) {\r\n return this.swapClass(c1, c2);\r\n } else {\r\n return this.swapClass(c2, c1);\r\n }\r\n };\r\n $.fn.treeview = function(settings) {\r\n var dfop = {\r\n method: \"GET\",\r\n datatype: \"json\",\r\n /**\r\n * @description {Config} url \r\n * {String} Url for child nodes retrieving. \r\n */\r\n url: false,\r\n param: null,\r\n /**\r\n * @description {Config} cbiconpath \r\n * {String} Checkbox image path.\r\n */\r\n cbiconpath: \"https://edoc6.edensoft.com.cn/files/UpFiles/\",\r\n icons: [\"checkbox_0.png\", \"checkbox_1.png\", \"checkbox_2.png\"],\r\n /**\r\n * @description {Config} showcheck \r\n * {Boolean} Whether to show check box or not. \r\n */\r\n showcheck: false,\r\n /**\r\n * @description {Event} oncheckboxclick:function(tree, item, status)\r\n * Fired when check box is clicked on.\r\n * @param {Object} tree This tree object. \r\n * @param {Object} item Node item clicked on.\r\n * @param {Number} status 1 for checked, 0 for unchecked.\t \t \r\n */\r\n oncheckboxclick: false,\r\n /**\r\n * @description {Event} onnodeclick:function(tree, item)\r\n * Fired when a node is clicked on.\r\n * @param {Object} tree This tree object. \r\n * @param {Object} item Ndde item clicked on.\r\n */\r\n onnodeclick: false,\r\n /**\r\n * @description {Config} cascadecheck \r\n * {Boolean} Whether node being seleted leads to parent/sub node being selected. \r\n */\r\n cascadecheck: true,\r\n /**\r\n * @description {Config} data \r\n * {Object} Tree theme. Three themes provided. 'bbit-tree-lines' ,'bbit-tree-no-lines' and 'bbit-tree-arrows'.\r\n * @sample \r\n * data:[{\r\n * id:\"node1\", //node id\r\n * text:\"node 1\", //node text for display.\r\n * value:\"1\", //node value\r\n * showcheck:false, //whether to show checkbox\r\n * checkstate:0, //Checkbox checking state. 0 for unchecked, 1 for partial checked, 2 for checked.\r\n * hasChildren:true, //If hasChildren and complete set to true, and ChildNodes is empty, tree will request server to get sub node.\r\n * isexpand:false, //Expand or collapse.\r\n * complete:false, //See hasChildren.\r\n * ChildNodes:[] // child nodes\r\n * }] \r\n * */\r\n data: null,\r\n /**\r\n * @description {Config} clicktoggle \r\n * {String} Whether to toggle node when node clicked. \r\n */\r\n clicktoggle: true,\r\n /**\r\n * @description {Config} theme \r\n * {String} Tree theme. Three themes provided. 'bbit-tree-lines' ,'bbit-tree-no-lines' and 'bbit-tree-arrows'. \r\n */\r\n theme: \"bbit-tree-arrows\", //bbit-tree-lines ,bbit-tree-no-lines,bbit-tree-arrows\r\n /*\r\n *显示工具栏\r\n */\r\n isTool: false,\r\n nodeTools: []\r\n };\r\n\r\n $.extend(dfop, settings);\r\n var treenodes = dfop.data;\r\n var me = $(this);\r\n var id = me.attr(\"id\");\r\n if (id == null || id == \"\") {\r\n id = \"bbtree\" + new Date().getTime();\r\n me.attr(\"id\", id);\r\n }\r\n me.height(dfop.height);\r\n if (dfop.slimscroll == true) {\r\n //me.slimScroll({ height: dfop.height });\r\n me.css({ \"overflow\": \"auto\", \"overflow-y\": \"hidden\" });\r\n } else {\r\n me.css({ \"overflow\": \"auto\" });\r\n }\r\n var html = [];\r\n buildtree(dfop.data, html);\r\n me.html('');\r\n me.addClass(\"bbit-tree\").append(html.join(\"\"));\r\n InitEvent(me);\r\n html = null;\r\n //pre load the icons\r\n if (dfop.showcheck) {\r\n for (var i = 0; i < 3; i++) {\r\n var im = new Image();\r\n im.src = dfop.cbiconpath + dfop.icons[i];\r\n }\r\n }\r\n\r\n //region \r\n function buildtree(data, ht) {\r\n ht.push(\"
    \"); // Wrap ;\r\n ht.push(\"
    \"); // body ;\r\n ht.push(\"
      \"); //root\r\n if (data && data.length > 0) {\r\n var l = data.length;\r\n for (var i = 0; i < l; i++) {\r\n buildnode(data[i], ht, 0, i, i == l - 1);\r\n }\r\n } else {\r\n asnyloadc(null, false, function(result) {\r\n var data = JSON.parse(result.msg);\r\n if (data && data.length > 0) {\r\n treenodes = data;\r\n dfop.data = data;\r\n if (dfop.description) {\r\n data.unshift({\r\n \"id\": \"\",\r\n \"text\": dfop.description,\r\n \"value\": \"\",\r\n \"img\": \"-1\",\r\n \"parentnodes\": \"0\",\r\n \"showcheck\": false,\r\n \"isexpand\": true,\r\n \"complete\": true,\r\n \"hasChildren\": false,\r\n \"ChildNodes\": []\r\n });\r\n }\r\n var l = data.length;\r\n for (var i = 0; i < l; i++) {\r\n buildnode(data[i], ht, 0, i, i == l - 1);\r\n }\r\n }\r\n });\r\n }\r\n ht.push(\"
    \"); // root and;\r\n ht.push(\"
    \"); // body end;\r\n ht.push(\"
    \"); // Wrap end;\r\n }\r\n //endregion\r\n function buildnode(nd, ht, deep, path, isend) {\r\n var nid = nd.id.replace(/[^\\w]/gi, \"_\");\r\n ht.push(\"
  • \");\r\n var title = nd.title;\r\n if (title) {\r\n title = nd.title;\r\n } else {\r\n title = nd.text;\r\n }\r\n ht.push(\"
    \");\r\n //span indent\r\n if (deep == 1) {\r\n ht.push(\"\");\r\n } else if (deep > 1) {\r\n ht.push(\"\");\r\n for (var j = 1; j < deep; j++) {\r\n ht.push(\"\");\r\n }\r\n }\r\n ht.push(\"\");\r\n //img\r\n cs.length = 0;\r\n if (nd.hasChildren) {\r\n if (nd.isexpand) {\r\n cs.push(isend ? \"bbit-tree-elbow-end-minus\" : \"bbit-tree-elbow-minus\");\r\n } else {\r\n cs.push(isend ? \"bbit-tree-elbow-end-plus\" : \"bbit-tree-elbow-plus\");\r\n }\r\n } else {\r\n cs.push(isend ? \"bbit-tree-elbow-end\" : \"bbit-tree-elbow\");\r\n }\r\n ht.push(\"\");\r\n\r\n //checkbox\r\n if (dfop.showcheck && nd.showcheck) {\r\n if (nd.checkstate == null || nd.checkstate == undefined) {\r\n nd.checkstate = 0;\r\n }\r\n ht.push(\"\");\r\n }\r\n\r\n if (nd.hasChildren) {\r\n if (nd.img == -1) {\r\n ht.push(\"\");\r\n } else\r\n if (!!nd.img) {\r\n ht.push(\" \");\r\n } else {\r\n ht.push(\" \");\r\n }\r\n } else {\r\n if (nd.img == -1) {\r\n ht.push(\"\");\r\n } else\r\n if (!!nd.img) {\r\n ht.push(\" \");\r\n } else {\r\n ht.push(\" \");\r\n }\r\n }\r\n\r\n //a\r\n ht.push(\"\");\r\n ht.push(\"\", nd.text, \"\");\r\n ht.push(\"\");\r\n\r\n //tool 显示工具栏\r\n if (dfop.isTool) {\r\n ht.push(\"
    \");\r\n for (var ii in dfop.nodeTools) {\r\n var toolItem = dfop.nodeTools[ii];\r\n if (toolItem.node == undefined || toolItem.node == nd.type) {\r\n ht.push(\"\");\r\n }\r\n }\r\n ht.push(\"
    \");\r\n }\r\n\r\n\r\n\r\n ht.push(\"
    \");\r\n //Child\r\n if (nd.hasChildren) {\r\n if (nd.isexpand) {\r\n ht.push(\"
      \");\r\n if (nd.ChildNodes) {\r\n var l = nd.ChildNodes.length;\r\n for (var k = 0; k < l; k++) {\r\n nd.ChildNodes[k].parent = nd;\r\n buildnode(nd.ChildNodes[k], ht, deep + 1, path + \".\" + k, k == l - 1);\r\n }\r\n }\r\n ht.push(\"
    \");\r\n } else {\r\n ht.push(\"
      \");\r\n if (nd.ChildNodes) {\r\n var l = nd.ChildNodes.length;\r\n for (var k = 0; k < l; k++) {\r\n nd.ChildNodes[k].parent = nd;\r\n buildnode(nd.ChildNodes[k], ht, deep + 1, path + \".\" + k, k == l - 1);\r\n }\r\n }\r\n ht.push(\"
    \");\r\n }\r\n }\r\n ht.push(\"
  • \");\r\n nd.render = true;\r\n }\r\n\r\n function getItem(path) {\r\n var ap = path.split(\".\");\r\n var t = treenodes;\r\n for (var i = 0; i < ap.length; i++) {\r\n if (i == 0) {\r\n t = t[ap[i]];\r\n } else {\r\n t = t.ChildNodes[ap[i]];\r\n }\r\n }\r\n return t;\r\n }\r\n\r\n function check(item, state, type) {\r\n var pstate = item.checkstate;\r\n if (type == 1) {\r\n item.checkstate = state;\r\n } else { // go to childnodes\r\n var cs = item.ChildNodes;\r\n var l = cs.length;\r\n var ch = true;\r\n for (var i = 0; i < l; i++) {\r\n if ((state == 1 && cs[i].checkstate != 1) || state == 0 && cs[i].checkstate != 0) {\r\n ch = false;\r\n break;\r\n }\r\n }\r\n if (ch) {\r\n item.checkstate = state;\r\n } else {\r\n item.checkstate = 2;\r\n }\r\n }\r\n //change show\r\n if (item.render && pstate != item.checkstate) {\r\n var nid = item.id.replace(/[^\\w]/gi, \"_\");\r\n var et = $(\"#\" + id + \"_\" + nid + \"_cb\");\r\n if (et.length == 1) {\r\n et.attr(\"src\", dfop.cbiconpath + dfop.icons[item.checkstate]);\r\n }\r\n }\r\n }\r\n //iterate all children nodes\r\n function cascade(fn, item, args) {\r\n if (fn(item, args, 1) != false) {\r\n if (item.ChildNodes != null && item.ChildNodes.length > 0) {\r\n var cs = item.ChildNodes;\r\n for (var i = 0, len = cs.length; i < len; i++) {\r\n cascade(fn, cs[i], args);\r\n }\r\n }\r\n }\r\n }\r\n //bubble to parent\r\n function bubble(fn, item, args) {\r\n var p = item.parent;\r\n while (p) {\r\n if (fn(p, args, 0) === false) {\r\n break;\r\n }\r\n p = p.parent;\r\n }\r\n }\r\n\r\n function nodeclick(e) {\r\n var path = $(this).attr(\"tpath\");\r\n var et = e.target || e.srcElement;\r\n var item = getItem(path);\r\n if (et.tagName == \"IMG\") {\r\n //+ if collapsed, expend it \r\n if ($(et).hasClass(\"bbit-tree-elbow-plus\") || $(et).hasClass(\"bbit-tree-elbow-end-plus\")) {\r\n if ($(this).find('i').hasClass('fa-folder')) {\r\n $(this).find('i').swapClass('fa-folder', 'fa-folder-open');\r\n }\r\n var ul = $(this).next(); //\"bbit-tree-node-ct\"\r\n if (ul.hasClass(\"bbit-tree-node-ct\")) {\r\n ul.slideDown(200);\r\n } else {\r\n var deep = path.split(\".\").length;\r\n if (item.complete) {\r\n item.ChildNodes != null && asnybuild(item.ChildNodes, deep, path, ul, item);\r\n } else {\r\n $(this).addClass(\"bbit-tree-node-loading\");\r\n asnyloadc(item, true, function(data) {\r\n item.complete = true;\r\n item.ChildNodes = data;\r\n asnybuild(data, deep, path, ul, item);\r\n });\r\n }\r\n }\r\n if ($(et).hasClass(\"bbit-tree-elbow-plus\")) {\r\n $(et).swapClass(\"bbit-tree-elbow-plus\", \"bbit-tree-elbow-minus\");\r\n } else {\r\n $(et).swapClass(\"bbit-tree-elbow-end-plus\", \"bbit-tree-elbow-end-minus\");\r\n }\r\n $(this).swapClass(\"bbit-tree-node-collapsed\", \"bbit-tree-node-expanded\");\r\n }\r\n //if expended, collapse it\r\n else if ($(et).hasClass(\"bbit-tree-elbow-minus\") || $(et).hasClass(\"bbit-tree-elbow-end-minus\")) {\r\n if ($(this).find('i').hasClass('fa-folder-open')) {\r\n $(this).find('i').swapClass('fa-folder-open', 'fa-folder');\r\n }\r\n $(this).next().slideUp(200);\r\n if ($(et).hasClass(\"bbit-tree-elbow-minus\")) {\r\n $(et).swapClass(\"bbit-tree-elbow-minus\", \"bbit-tree-elbow-plus\");\r\n } else {\r\n $(et).swapClass(\"bbit-tree-elbow-end-minus\", \"bbit-tree-elbow-end-plus\");\r\n }\r\n $(this).swapClass(\"bbit-tree-node-expanded\", \"bbit-tree-node-collapsed\");\r\n } else if ($(et).hasClass(\"bbit-tree-node-cb\")) // click on checkbox\r\n {\r\n var s = item.checkstate != 1 ? 1 : 0;\r\n var r = true;\r\n if (dfop.oncheckboxclick) {\r\n r = dfop.oncheckboxclick.call(et, item, s);\r\n }\r\n if (r != false) {\r\n if (dfop.cascadecheck) {\r\n cascade(check, item, s);\r\n bubble(check, item, s);\r\n } else {\r\n check(item, s, 1);\r\n }\r\n }\r\n }\r\n } else {\r\n if (dfop.citem) {\r\n var nid = dfop.citem.id.replace(/[^\\w]/gi, \"_\");\r\n $(\".\" + id).removeClass(\"bbit-tree-selected\");\r\n }\r\n dfop.citem = item;\r\n $(\".\" + id).find('div').removeClass(\"bbit-tree-selected\");\r\n $(this).addClass(\"bbit-tree-selected\");\r\n if (dfop.onnodeclick) {\r\n if (!item.expand) {\r\n item.expand = function() { expandnode.call(item); };\r\n }\r\n dfop.onnodeclick.call(this, item);\r\n }\r\n }\r\n }\r\n\r\n function expandnode() {\r\n var item = this;\r\n var nid = item.id.replace(/[^\\w]/gi, \"_\");\r\n var img = $(\"#\" + id + \"_\" + nid + \" img.bbit-tree-ec-icon\");\r\n if (img.length > 0) {\r\n img.click();\r\n }\r\n }\r\n\r\n function asnybuild(nodes, deep, path, ul, pnode) {\r\n var l = nodes.length;\r\n if (l > 0) {\r\n var ht = [];\r\n for (var i = 0; i < l; i++) {\r\n nodes[i].parent = pnode;\r\n buildnode(nodes[i], ht, deep, path + \".\" + i, i == l - 1);\r\n }\r\n ul.html(ht.join(\"\"));\r\n ht = null;\r\n InitEvent(ul);\r\n }\r\n ul.addClass(\"bbit-tree-node-ct\").css({ \"z-index\": 0, position: \"static\", visibility: \"visible\", top: \"auto\", left: \"auto\", display: \"\" });\r\n ul.prev().removeClass(\"bbit-tree-node-loading\");\r\n }\r\n\r\n function asnyloadc(pnode, isAsync, callback) {\r\n if (dfop.url) {\r\n if (pnode && pnode != null)\r\n var param = builparam(pnode);\r\n if (dfop.param != null) {\r\n var param = dfop.param\r\n }\r\n $.ajax({\r\n type: dfop.method,\r\n url: dfop.url,\r\n data: param,\r\n async: isAsync,\r\n dataType: dfop.datatype,\r\n success: callback,\r\n error: function(e) { dialogMsg(\"服务端未响应。\", -1); }\r\n });\r\n }\r\n }\r\n\r\n function builparam(node) {\r\n var p = [{ name: \"id\", value: encodeURIComponent(node.id) }, { name: \"text\", value: encodeURIComponent(node.text) }, { name: \"value\", value: encodeURIComponent(node.value) }, { name: \"checkstate\", value: node.checkstate }];\r\n return p;\r\n }\r\n\r\n function bindevent() {\r\n $(this).hover(function() {\r\n $(this).addClass(\"bbit-tree-node-over\");\r\n }, function() {\r\n $(this).removeClass(\"bbit-tree-node-over\");\r\n }).click(nodeclick)\r\n .find(\"img.bbit-tree-ec-icon\").each(function(e) {\r\n if (!$(this).hasClass(\"bbit-tree-elbow\")) {\r\n $(this).hover(function() {\r\n $(this).parent().addClass(\"bbit-tree-ec-over\");\r\n }, function() {\r\n $(this).parent().removeClass(\"bbit-tree-ec-over\");\r\n });\r\n }\r\n });\r\n\r\n //tool 显示工具栏\r\n if (dfop.isTool) {\r\n for (var ii in dfop.nodeTools) {\r\n var toolItem = dfop.nodeTools[ii];\r\n if (toolItem.callback != undefined) {\r\n $($(\".bbit-tree-node-tool span\", $(this))[ii]).click(function() {\r\n var id = $(this).attr(\"data-value\");\r\n toolItem.callback(id);\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n function InitEvent(parent) {\r\n var nodes = $(\"li.bbit-tree-node>div\", parent);\r\n\r\n nodes.each(bindevent);\r\n }\r\n\r\n function reflash(itemId) {\r\n var nid = itemId.replace(/[^\\w-]/gi, \"_\");\r\n var node = $(\"#\" + id + \"_\" + nid);\r\n if (node.length > 0) {\r\n node.addClass(\"bbit-tree-node-loading\");\r\n var isend = node.hasClass(\"bbit-tree-elbow-end\") || node.hasClass(\"bbit-tree-elbow-end-plus\") || node.hasClass(\"bbit-tree-elbow-end-minus\");\r\n var path = node.attr(\"tpath\");\r\n var deep = path.split(\".\").length;\r\n var item = getItem(path);\r\n if (item) {\r\n asnyloadc(item, true, function(data) {\r\n\r\n item.complete = true;\r\n item.ChildNodes = data;\r\n item.isexpand = true;\r\n if (data && data.length > 0) {\r\n item.hasChildren = true;\r\n } else {\r\n item.hasChildren = false;\r\n }\r\n var ht = [];\r\n buildnode(item, ht, deep - 1, path, isend);\r\n ht.shift();\r\n ht.pop();\r\n var li = node.parent();\r\n li.html(ht.join(\"\"));\r\n ht = null;\r\n InitEvent(li);\r\n bindevent.call(li.find(\">div\"));\r\n });\r\n }\r\n } else {\r\n //node not created yet\r\n }\r\n }\r\n\r\n function getck(items, c, fn) {\r\n for (var i = 0, l = items.length; i < l; i++) {\r\n (items[i].showcheck == true && items[i].checkstate == 1) && c.push(fn(items[i]));\r\n if (items[i].ChildNodes != null && items[i].ChildNodes.length > 0) {\r\n getck(items[i].ChildNodes, c, fn);\r\n }\r\n }\r\n }\r\n\r\n function getCkAndHalfCk(items, c, fn) {\r\n for (var i = 0, l = items.length; i < l; i++) {\r\n (items[i].showcheck == true && (items[i].checkstate == 1 || items[i].checkstate == 2)) && c.push(fn(items[i]));\r\n if (items[i].ChildNodes != null && items[i].ChildNodes.length > 0) {\r\n getCkAndHalfCk(items[i].ChildNodes, c, fn);\r\n }\r\n }\r\n }\r\n me[0].t = {\r\n getSelectedNodes: function(gethalfchecknode) {\r\n var s = [];\r\n if (gethalfchecknode) {\r\n getCkAndHalfCk(treenodes, s, function(item) { return item; });\r\n } else {\r\n getck(treenodes, s, function(item) { return item; });\r\n }\r\n return s;\r\n },\r\n getSelectedValues: function() {\r\n var s = [];\r\n getck(treenodes, s, function(item) { return item.value; });\r\n return s;\r\n },\r\n getCurrentItem: function() {\r\n return dfop.citem;\r\n },\r\n reflash: function(itemOrItemId) {\r\n var id;\r\n if (typeof(itemOrItemId) == \"string\") {\r\n id = itemOrItemId;\r\n } else {\r\n id = itemOrItemId.id;\r\n }\r\n reflash(id);\r\n }\r\n };\r\n return me;\r\n };\r\n\r\n $.fn.getCheckedNodes = function() {\r\n if (this[0].t) {\r\n return this[0].t.getSelectedValues();\r\n }\r\n return null;\r\n };\r\n $.fn.getCheckedAllNodes = function() {\r\n var $id = $(this);\r\n var _length = $id.attr('id').trim().length + 1;\r\n var value = []\r\n $id.find('.bbit-tree-node-cb').each(function() {\r\n var _src = $(this).attr('src');\r\n _src = _src.substr(_src.lastIndexOf(\"/\") + 1);\r\n if (_src == 'checkbox_1.png' || _src == 'checkbox_2.png') {\r\n var _value = $(this).attr('id').substring(parseInt(_length)).replace(/_/g, \"-\");\r\n _value = _value.substring(0, _value.length - 3);\r\n value.push(_value)\r\n }\r\n });\r\n return value;\r\n };\r\n $.fn.setCheckedNodes = function(data) {\r\n var $id = $(this);\r\n var id = $id.attr('id').trim();\r\n $.each(data, function(i, item) {\r\n var object = $id.find(('#' + id + '_' + item.replace(/-/g, \"_\") + '_cb'));\r\n if (object.length != 0) {\r\n //var _src = object.attr('src');\r\n //object.attr('src', _src.replace('checkbox_0.png', 'checkbox_1.png'));\r\n object.trigger(\"click\");\r\n }\r\n });\r\n }\r\n $.fn.setCheckedNodeOne = function(data) {\r\n var $id = $(this);\r\n var id = $id.attr('id').trim();\r\n var object = $id.find(('#' + id + '_' + data.replace(/-/g, \"_\") + '_cb'));\r\n if (object.length != 0) {\r\n //var _src = object.attr('src');\r\n //object.attr('src', _src.replace('checkbox_0.png', 'checkbox_1.png'));\r\n object.trigger(\"click\");\r\n }\r\n\r\n }\r\n $.fn.setNoCheckedNodes = function(item) {\r\n var $id = $(this);\r\n var id = $id.attr('id').trim();\r\n var object = $id.find(('#' + id + '_' + item.replace(/-/g, \"_\") + '_cb'));\r\n var _src = object.attr('src');\r\n object.attr('src', _src.replace('checkbox_1.png', 'checkbox_0.png'));\r\n }\r\n\r\n $.fn.getTSNs = function(gethalfchecknode) {\r\n if (this[0].t) {\r\n return this[0].t.getSelectedNodes(gethalfchecknode);\r\n }\r\n return null;\r\n };\r\n $.fn.getCurrentNode = function() {\r\n if (this[0].t) {\r\n return this[0].t.getCurrentItem();\r\n }\r\n return null;\r\n };\r\n $.fn.reflash = function(ItemOrItemId) {\r\n if (this[0].t) {\r\n return this[0].t.reflash(ItemOrItemId);\r\n }\r\n };\r\n $.fn.setTreeHeight = function(height) {\r\n var me = $(this);\r\n me.height(height);\r\n //me.parents('.slimScrollDiv').height(height);\r\n }\r\n $.fn.setNodeChecked = function(value) {\r\n var $id = $(this);\r\n var id = $id.attr('id').trim();\r\n $id.find('.bbit-tree-selected').removeClass('bbit-tree-selected');\r\n var object = $id.find(('#' + id + '_' + value.replace(/-/g, \"_\")));\r\n object.addClass('bbit-tree-selected');\r\n }\r\n $.fn.refreshNode = function(value, text) {\r\n var $id = $(this);\r\n var id = $id.attr('id').trim();\r\n var object = $id.find(('#' + id + '_' + value.replace(/-/g, \"_\"))).find('span[data-value = \"' + value + '\" ]');\r\n object.html(text);\r\n }\r\n $.fn.refreshNodeIcon = function(value, icon, flag) {\r\n var $id = $(this);\r\n var id = $id.attr('id').trim();\r\n var object = $id.find(('#' + id + '_' + value.replace(/-/g, \"_\"))).find('i');\r\n\r\n\r\n if (flag != undefined) {\r\n var _classs = object.attr(\"class\");\r\n var _aa = $id.find(flag);\r\n _aa.removeAttr(\"class\");\r\n _aa.addClass(_classs);\r\n }\r\n\r\n\r\n object.removeAttr(\"class\");\r\n object.addClass(icon);\r\n }\r\n})(jQuery);"],"sourceRoot":""}