{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\flow\\FlowConfig.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\flow\\FlowConfig.vue","mtime":1675071991803},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport flow from \"@/api/flow.js\";\r\nimport req from \"@/request.js\";\r\nimport { mapState, mapActions } from \"vuex\";\r\nconst FlowFormConfig = () => import(\"@/components/flow/FlowFormConfig.vue\");\r\nconst FlowNodeUserConfig = () =>\r\n import(\"@/components/flow/FlowNodeUserConfig.vue\");\r\nconst FlowNodeAttributes = () =>\r\n import(\"@/components/flow/FlowNodeAttributes.vue\");\r\nconst FlowNodeBtns = () => import(\"@/components/flow/FlowNodeBtns.vue\");\r\nconst FlowNodeCopyToUserConfig = () =>\r\n import(\"@/components/flow/FlowNodeCopyToUserConfig.vue\");\r\nconst FlowNodeRestfuls = () => import(\"@/components/flow/FlowNodeRestfuls.vue\");\r\nconst FlowBranchConditionList = () =>\r\n import(\"@/components/flow/FlowBranchConditionList.vue\");\r\nconst FlowNodeRemind = () => import(\"@/components/flow/FlowNodeRemind.vue\");\r\nconst FlowNodeJumpRule = () => import(\"@/components/flow/FlowNodeJumpRule.vue\");\r\nconst FlowSignConfig = () => import(\"@/components/flow/FlowSignConfig.vue\");\r\nconst FlowNodeScript = () => import(\"@/components/flow/FlowNodeScript.vue\");\r\nconst FlowAutoTask = () => import(\"@/components/flow/FlowAutoTask.vue\");\r\nconst FlowNodeStartNewFlow = () => import(\"@/components/flow/FlowNodeStartNewFlow.vue\");\r\n\r\nimport htUiUtil from \"@/hotent-ui-util.js\";\r\n\r\nexport default {\r\n props: [\"defId\", \"topDefKey\"],\r\n components: {\r\n FlowFormConfig,\r\n FlowNodeUserConfig,\r\n FlowNodeAttributes,\r\n FlowNodeBtns,\r\n FlowNodeCopyToUserConfig,\r\n FlowAutoTask,\r\n FlowNodeRestfuls,\r\n FlowBranchConditionList,\r\n FlowNodeRemind,\r\n FlowNodeJumpRule,\r\n FlowSignConfig,\r\n FlowNodeScript,\r\n FlowNodeStartNewFlow\r\n },\r\n data() {\r\n return {\r\n autoTask: {}, //当前自动任务的配置信息\r\n autoTaskData: {}, //自动任务配置,用于鼠标点击不同自动任务时获取不同的自动任务配置\r\n flowCanvasStyle: {},\r\n eventScriptData: {}, //事件脚本配置当前节点信息\r\n scriptData: {}, //事件脚本配置,用于鼠标点击不同节点任务时获取不同的事件脚本配置\r\n ruleData: {}, //跳转规则配置,用于鼠标点击不同节点任务时获取不同的跳转规则配置\r\n reminderData: {}, //催办设置,用于鼠标点击不同节点任务时获取不同的催办设置\r\n nodeDef: {}, //跳转规则配置当前节点信息\r\n nodeDefList: [], //跳转规则配置流程跳转节点\r\n activeNames: \"\", //更多设置手风琴绑定的model\r\n nodeList: [], //催办配置流程所有节点\r\n reminders: {}, //催办配置当前节点的信息\r\n startNewFlowConfMap: {}, //催办配置当前节点的信息\r\n nodeAttr: {\r\n jumpType: \"\",\r\n notify: \"\",\r\n backMode_all: \"\",\r\n skipExecutorEmpty_all: \"\"\r\n }, //节点属性批量勾选配置\r\n curActiveSet: \"basic\",\r\n isEditAllNode_forms: false, //节点表单\r\n isEditAllNode_btns: false, //节点按钮\r\n isEditAllNode_nodeUser: false, //节点人员\r\n isEditAllNode_nodeReadUser: false, //节点传阅人员\r\n isEditAllNode_properties: false, //节点属性\r\n isEditAllNode_restful: false, //节点事件\r\n fullscreenLoading: false,\r\n curSelectNodeId: \"\", //点击任务节点时获取节点ID\r\n curSelectNodeType: \"\", //点击任务节点时获取节点类型\r\n curCollapse: \"\",\r\n autoCollapsePaneName: \"\", //自动展开的选项卡名称\r\n boDefJson: [], //表单字段\r\n flowVar:null\r\n };\r\n },\r\n computed: mapState({\r\n defConfigData: state => state.flow.defConfigData,\r\n //仅仅做备份比对使用,勿更新此对象里的数据\r\n copyDefConfigData: state => state.flow.copyDefConfigData,\r\n }),\r\n watch: {\r\n curSelectNodeId: {\r\n handler(newValue, oldValue) {\r\n //消息任务和自动任务\r\n if (this.curSelectNodeType == \"SERVICETASK\") {\r\n //自动任务设置\r\n if (newValue && JSON.stringify(this.autoTaskData) != \"{}\") {\r\n let data = this.autoTaskData[newValue]; //获取当前鼠标点击的节点任务的催办信息\r\n //判断当前鼠标点击的节点任务的催办信息是否有值,没有则重新查询\r\n if (data) {\r\n if (data == \"无数据\") {\r\n this.autoTask = {};\r\n } else {\r\n this.autoTask = data;\r\n }\r\n } else {\r\n this.getAutoTask(this.defId, newValue); //获取脚本的设置\r\n }\r\n }\r\n }\r\n //EXCLUSIVEGATEWAY:分支;SERVICETASK:消息任务和自动任务;PARALLELGATEWAY:同步;INCLUSIVEGATEWAY:条件同步;CALLACTIVITY:外部子流程;\r\n if (\r\n this.curSelectNodeType != \"CALLACTIVITY\" &&\r\n this.curSelectNodeType != \"SERVICETASK\" &&\r\n this.curSelectNodeType != \"PARALLELGATEWAY\" &&\r\n this.curSelectNodeType != \"EXCLUSIVEGATEWAY\" &&\r\n this.curSelectNodeType != \"INCLUSIVEGATEWAY\"\r\n ) {\r\n //跳转规则设置\r\n if (newValue && JSON.stringify(this.ruleData) != \"{}\") {\r\n let data = this.ruleData[newValue]; //获取当前鼠标点击的节点任务的跳转规则信息\r\n //判断当前鼠标点击的节点任务的跳转规则信息是否有值,没有则重新查询\r\n if (data) {\r\n this.nodeDef = data.nodeDef; //获取跳转规则配置当前节点信息\r\n this.nodeDefList = data.nodeDefList;\r\n for (let i = 0; i < this.nodeDefList.length; i++) {\r\n if (this.nodeDef.name == this.nodeDefList[i].name) {\r\n this.nodeDefList.splice(i, 1);\r\n break;\r\n }\r\n }\r\n } else {\r\n this.getNodeJumpRule(this.defId, newValue); //获取任务节点的跳转规则设置\r\n }\r\n }\r\n //催办设置\r\n if (newValue && JSON.stringify(this.reminderData) != \"{}\") {\r\n let data = this.reminderData[newValue]; //获取当前鼠标点击的节点任务的催办信息\r\n //判断当前鼠标点击的节点任务的催办信息是否有值,没有则重新查询\r\n this.getReminders(this.defId, newValue); //获取任务节点的催办设置\r\n }\r\n\r\n this.getStartNewFlowConf(this.defId, newValue); //获取自动触发新流程的配置\r\n\r\n \r\n //事件脚本设置\r\n if (newValue && JSON.stringify(this.scriptData) != \"{}\") {\r\n let data = this.scriptData[newValue]; //获取当前鼠标点击的节点任务的事件脚本信息\r\n //判断当前鼠标点击的节点任务的事件脚本信息是否有值,没有则重新查询\r\n if (data) {\r\n //任务类型大写转换成小写\r\n if (data.bpmNodeDef.type) {\r\n data.bpmNodeDef.type = data.bpmNodeDef.type.toLowerCase();\r\n }\r\n this.eventScriptData = data;\r\n } else {\r\n this.getNodeScript(this.defId, newValue); //获取任务节点的事件脚本设置\r\n }\r\n }\r\n //如果节点绑定了表单,则获取节点表单对应的bo数据,且以PC端表单为准\r\n if(this.defConfigData.nodeSetData.bpmDefSetting.nodeForms && this.curSelectNodeId){\r\n let curSelectNodeId = this.curSelectNodeId;\r\n let nodeFormKey = '';\r\n this.defConfigData.nodeSetData.bpmDefSetting.nodeForms.forEach(nodeForm => {\r\n if(nodeForm.type == 'INNER' && nodeForm.formType == 'pc' && curSelectNodeId == nodeForm.nodeId && nodeForm.formValue){\r\n nodeFormKey = nodeForm.formValue;\r\n return ;\r\n }\r\n });\r\n if(!nodeFormKey){\r\n nodeFormKey = this.defConfigData.nodeSetData.bpmDefSetting.globalForm.formValue;\r\n }\r\n this.getBoDefJson(nodeFormKey);\r\n }\r\n }\r\n },\r\n deep: true\r\n },\r\n 'defConfigData.nodeSetData.bpmDefSetting.globalForm.formValue':{\r\n handler(newValue, oldValue){\r\n if (newValue && oldValue!=newValue && this.defConfigData.nodeSetData.bpmDefSetting.globalForm.type == 'INNER'){\r\n this.getBoDefJson(newValue);\r\n }else{\r\n this.boDefJson=[];\r\n }\r\n }\r\n }\r\n },\r\n methods: {\r\n //获取自动任务设置\r\n getBoDefJson(formkey){\r\n //escape() 编码url地址,防止报错; unescape() 解码\r\n req.get(window.context.form+'/form/form/v1/getBoJsonByFormKey?formkey='+escape(formkey)).then(response => {\r\n let data = response.data;\r\n let list = [];\r\n if(data){\r\n for(let index=0,pf;pf=data[index++];){\r\n //只返回主表字段\r\n pf.children=pf.children.filter(item => item.nodeType!=\"sub\" )\r\n list.push(pf);\r\n /*for(let s=0,f;f=pf.children[s++];){\r\n\t\t\t //子表\r\n\t\t\t if(f.children){\r\n\t\t\t\tf.sub=true;\r\n\t\t\t\t//nodeType \"sub\"\r\n\t\t\t\tf.children=f.children.filter(item => item.nodeType!=\"sub\" )\r\n\t\t\t\tconsole.log(f.children);\r\n\t\t\t\tlist.push(f);\r\n\t\t\t }\r\n\t\t\t}*/\r\n }\r\n }\r\n this.boDefJson=list;\r\n });\r\n },\r\n getAutoTask(defId, nodeId) {\r\n const this_ = this;\r\n //获取自动任务的配置信息\r\n req\r\n .get(\r\n \"${bpmModel}/flow/node/v1/getNodeAutoTask?defId=\" +\r\n defId +\r\n \"&nodeId=\" +\r\n nodeId,\r\n {}\r\n )\r\n .then(function(data) {\r\n data = data.data;\r\n if (data) {\r\n this_.autoTask = data;\r\n this_.autoTaskData[nodeId] = data;\r\n } else {\r\n this_.autoTask = {};\r\n this_.autoTaskData[nodeId] = \"无数据\";\r\n }\r\n });\r\n },\r\n //获取任务节点的事件脚本设置\r\n getNodeScript(defId, nodeId) {\r\n const this_ = this;\r\n //获取事件脚本的配置信息\r\n req\r\n .get(\r\n \"${bpmModel}/flow/node/v1/eventScriptEdit?defId=\" +\r\n defId +\r\n \"&nodeId=\" +\r\n nodeId\r\n )\r\n .then(function(data) {\r\n data = data.data;\r\n if (data) {\r\n //任务类型大写转换成小写\r\n if (data.bpmNodeDef.type) {\r\n data.bpmNodeDef.type = data.bpmNodeDef.type.toLowerCase();\r\n }\r\n this_.eventScriptData = data;\r\n this_.scriptData[nodeId] = data;\r\n }\r\n });\r\n },\r\n //获取任务节点的跳转规则设置\r\n getNodeJumpRule(defId, nodeId) {\r\n const this_ = this;\r\n //获取任务跳转规则的配置信息\r\n req\r\n .get(\r\n \"${bpmModel}/flow/node/v1/ruleEdit?definitionId=\" +\r\n defId +\r\n \"&nodeId=\" +\r\n nodeId\r\n )\r\n .then(function(data) {\r\n data = data.data;\r\n if (data) {\r\n this_.nodeDef = data.nodeDef; //获取跳转规则配置当前节点信息\r\n this_.nodeDefList = data.nodeDefList;\r\n for (let i = 0; i < this_.nodeDefList.length; i++) {\r\n if (this_.nodeDef.name == this_.nodeDefList[i].name) {\r\n this_.nodeDefList.splice(i, 1);\r\n break;\r\n }\r\n }\r\n this_.ruleData[nodeId] = data;\r\n }\r\n });\r\n },\r\n //获取任务节点的催办设置\r\n getReminders(defId, nodeId) {\r\n const this_ = this;\r\n //获取任务催办的配置信息\r\n req\r\n .get(\r\n \"${bpmModel}/flow/plugins/v1/remindersJson?defId=\" +\r\n defId +\r\n \"&nodeId=\" +\r\n nodeId,\r\n {}\r\n )\r\n .then(function(data) {\r\n data = data.data;\r\n this_.reminders = data.reminders;\r\n this_.reminderData[nodeId] = data;\r\n });\r\n //获取催办配置流程所有节点\r\n req\r\n .get(\"${bpmModel}/flow/node/v1/getNodes?defId=\" + defId)\r\n .then(function(data) {\r\n data = data.data;\r\n this_.nodeList = data;\r\n });\r\n },\r\n //获取任务节点的催办设置\r\n getStartNewFlowConf(defId, nodeId) {\r\n const this_ = this;\r\n //获取当前流程的变量,触发新流程配置可能使用\r\n if (this.flowVar == null) {\r\n req\r\n .post(window.context.bpmModel + \"/flow/node/v1/varTree\", {\r\n defId: defId,\r\n nodeId: nodeId,\r\n includeBpmConstants: false,\r\n removeSub: true,\r\n bpmForm:true\r\n })\r\n .then(response => {\r\n response.data = response.data || [];\r\n this_.flowVar = response.data;\r\n });\r\n }\r\n if (this.startNewFlowConfMap && this.startNewFlowConfMap.hasOwnProperty(nodeId)) {\r\n return;\r\n }\r\n req\r\n .get(\r\n \"${bpmModel}/flow/plugins/v1/startNewFlowJson?defId=\" +\r\n defId +\r\n \"&nodeId=\" +\r\n nodeId,\r\n {}\r\n )\r\n .then(function(data) {\r\n this_.$set(this_.startNewFlowConfMap,nodeId,data.data ||[]);\r\n });\r\n },\r\n\r\n //更多设置手风琴中的某一个时触发 如:点击催办设置\r\n handleChange(val) {\r\n const this_ = this;\r\n let defId = this_.defId;\r\n let nodeId = this_.curSelectNodeId;\r\n //点击催办设置时\r\n if (val == \"6\" && nodeId != \"\") {\r\n this_.getReminders(defId, nodeId); //获取任务节点的催办设置\r\n //点击跳转规则设置时\r\n } else if (val == \"3\" && nodeId != \"\") {\r\n this.getNodeJumpRule(defId, nodeId); //获取任务跳转规则的配置信息\r\n } else if (val == \"4\" && nodeId != \"\") {\r\n this.getNodeScript(defId, nodeId); //获取任务节点的事件脚本设置\r\n } else if (val == \"7\" && nodeId != \"\") {\r\n this.getAutoTask(defId, nodeId); //获取自动任务的设置\r\n }\r\n },\r\n //设置全局任务节点的节点事件\r\n setRestFul() {\r\n this.$refs.flowNodeRestfuls[0].setRestFul(); //调用设置任务节点的事件的方法\r\n },\r\n //点击帮助事件\r\n helpGlobalClick() {\r\n this.$refs.flowNodeAttributes[0].helpClick(\"\", \"\");\r\n },\r\n toEditNode(layout) {\r\n this.autoCollapsePaneName = \"\";\r\n layout.defId = this.defId;\r\n this.curSelectNodeType = layout.nodeType;\r\n this.curSelectNodeId = layout.nodeId;\r\n if (\r\n \"EXCLUSIVEGATEWAY\" == layout.nodeType ||\r\n \"INCLUSIVEGATEWAY\" == layout.nodeType\r\n ) {\r\n this.curCollapse = \"6\";\r\n //此处为了防止用户在2个分支之间切换,而配置的条件不切换到额问题\r\n setTimeout(() => {\r\n this.autoCollapsePaneName = \"6\";\r\n }, 1);\r\n } else if (\"SIGNTASK\" == layout.nodeType) {\r\n setTimeout(() => {\r\n this.autoCollapsePaneName = \"7\";\r\n }, 1);\r\n } else if (\"CALLACTIVITY\" == layout.nodeType) {\r\n this.curCollapse = \"8\";\r\n setTimeout(() => {\r\n this.autoCollapsePaneName = \"8\";\r\n }, 1);\r\n }\r\n this.$store.dispatch(\"flow/updateConfig\", { curEditNode: layout });\r\n this.isEditAllNode_forms = false;\r\n this.isEditAllNode_btns = false;\r\n this.isEditAllNode_nodeUser = false;\r\n this.isEditAllNode_nodeReadUser = false;\r\n this.isEditAllNode_properties = false;\r\n this.isEditAllNode_restful = false;\r\n },\r\n editAllNodes(name) {\r\n if (this[\"isEditAllNode_\" + name]) {\r\n this[\"isEditAllNode_\" + name] = false;\r\n } else {\r\n this[\"isEditAllNode_\" + name] = true;\r\n }\r\n },\r\n setSubflow() {\r\n this.$confirm(\r\n \"此操作会丢失当前流程未保存的配置,是否继续前往设置子流程?\",\r\n \"警告\",\r\n {\r\n cancelButtonText: \"取消\",\r\n confirmButtonText: \"确定\",\r\n type: \"warning\",\r\n closeOnClickModal: false\r\n }\r\n ).then(() => {\r\n this.$root.$emit(\"set-sub-flow\", {\r\n defId: this.defConfigData.curEditNode.defId,\r\n nodeId: this.defConfigData.curEditNode.nodeId\r\n });\r\n });\r\n },\r\n saveDefSetting() {\r\n if (!this.defConfigData.nodeSetData.bpmDefSetting.globalForm || !this.defConfigData.nodeSetData.bpmDefSetting.globalForm.formValue) {\r\n this.$confirm(\"尚未配置全局表单,可能导致流程发起异常,是否确认保存?\", \"提醒\", {\r\n confirmButtonText: \"继续保存\",\r\n cancelButtonText: \"设置表单\",\r\n type: \"warning\",\r\n }).then(() => {\r\n this.doSaveDefSetting();\r\n }).catch(()=>{\r\n this.curActiveSet = 'basic';\r\n this.curCollapse = '1';\r\n })\r\n }else{\r\n this.doSaveDefSetting();\r\n }\r\n },\r\n removeNotChangeConf(){\r\n let tempConf = JSON.parse(JSON.stringify(this.defConfigData));\r\n if (!tempConf.nodeSetData || !this.copyDefConfigData || !this.copyDefConfigData.nodeSetData ) {\r\n return;\r\n }\r\n let nodeFormKeys = [];\r\n //比对节点表单\r\n if (tempConf.nodeSetData.bpmDefSetting.formMap) {\r\n for (const nodeId in tempConf.nodeSetData.bpmDefSetting.formMap) {\r\n let nodeForm = tempConf.nodeSetData.bpmDefSetting.formMap[nodeId];\r\n if (nodeForm.type == 'INNER' && nodeForm.formValue) {\r\n nodeFormKeys.push(nodeForm.formValue);\r\n }\r\n if (htUiUtil.objectEquals(nodeForm,this.copyDefConfigData.nodeSetData.bpmDefSetting.formMap[nodeId])) {\r\n delete tempConf.nodeSetData.bpmDefSetting.formMap[nodeId];\r\n }\r\n }\r\n }\r\n\r\n if (tempConf.nodeSetData.bpmDefSetting.mobileFormMap) {\r\n for (const nodeId in tempConf.nodeSetData.bpmDefSetting.mobileFormMap) {\r\n let nodeMbForm = tempConf.nodeSetData.bpmDefSetting.mobileFormMap[nodeId];\r\n if (nodeMbForm.type == 'INNER' && nodeMbForm.formValue) {\r\n nodeFormKeys.push(nodeMbForm.formValue);\r\n }\r\n if (htUiUtil.objectEquals(nodeMbForm,this.copyDefConfigData.nodeSetData.bpmDefSetting.mobileFormMap[nodeId])) {\r\n delete tempConf.nodeSetData.bpmDefSetting.mobileFormMap[nodeId];\r\n }\r\n }\r\n }\r\n\r\n if (tempConf.nodeSetData.bpmDefSetting.nodePropertieMap) {\r\n for (const nodeId in tempConf.nodeSetData.bpmDefSetting.nodePropertieMap) {\r\n if (htUiUtil.objectEquals(tempConf.nodeSetData.bpmDefSetting.nodePropertieMap[nodeId],this.copyDefConfigData.nodeSetData.bpmDefSetting.nodePropertieMap[nodeId])) {\r\n delete tempConf.nodeSetData.bpmDefSetting.nodePropertieMap[nodeId];\r\n }\r\n }\r\n }\r\n\r\n if (tempConf.nodeSetData.nodeReadUserMap) {\r\n for (const nodeId in tempConf.nodeSetData.nodeReadUserMap) {\r\n if (htUiUtil.objectEquals(tempConf.nodeSetData.nodeReadUserMap[nodeId],this.copyDefConfigData.nodeSetData.nodeReadUserMap[nodeId])) {\r\n delete tempConf.nodeSetData.nodeReadUserMap[nodeId];\r\n }\r\n }\r\n }\r\n\r\n if (tempConf.nodeSetData.nodeRestfulMap) {\r\n for (const nodeId in tempConf.nodeSetData.nodeRestfulMap) {\r\n if (htUiUtil.objectEquals(tempConf.nodeSetData.nodeRestfulMap[nodeId],this.copyDefConfigData.nodeSetData.nodeRestfulMap[nodeId])) {\r\n delete tempConf.nodeSetData.nodeRestfulMap[nodeId];\r\n }\r\n }\r\n }\r\n\r\n if (tempConf.nodeSetData.nodeUserMap) {\r\n for (const nodeId in tempConf.nodeSetData.nodeUserMap) {\r\n if (htUiUtil.objectEquals(tempConf.nodeSetData.nodeUserMap[nodeId],this.copyDefConfigData.nodeSetData.nodeUserMap[nodeId])) {\r\n delete tempConf.nodeSetData.nodeUserMap[nodeId];\r\n }\r\n }\r\n }\r\n tempConf.nodeFormKeys = nodeFormKeys;\r\n return tempConf;\r\n },\r\n doSaveDefSetting() {\r\n let tempConf = this.removeNotChangeConf();\r\n let tempSetting = tempConf.nodeSetData.bpmDefSetting;\r\n delete tempSetting.nodeForms;\r\n delete tempSetting.nodeProperties;\r\n tempSetting.parentDefKey = this.topDefKey;\r\n let param = {\r\n defSettingJson: JSON.stringify(tempSetting),\r\n userJson: JSON.stringify(tempConf.nodeSetData.nodeUserMap),\r\n userReadJson: JSON.stringify(tempConf.nodeSetData.nodeReadUserMap),\r\n restfulJson: JSON.stringify(tempConf.nodeSetData.nodeRestfulMap),\r\n defId: this.defId,\r\n rev: tempConf.initData.bpmDefinition.rev,\r\n topDefKey: this.topDefKey,\r\n nodeFormKeys:tempConf.nodeFormKeys.join(',')\r\n };\r\n let this_ = this;\r\n this.fullscreenLoading = true;\r\n req\r\n .post(window.context.bpmModel + \"/flow/node/v1/saveDefConf\", param)\r\n .then(response => {\r\n let data = response.data;\r\n if (data.state) {\r\n this_.$message.success(data.message);\r\n this_.init();\r\n this_.flowVar = null;\r\n this.$root.$emit(\"nodeSetUpdate\",tempSetting);//发布点击保存流程配置事件\r\n }\r\n })\r\n .finally(response => {\r\n this.fullscreenLoading = false;\r\n });\r\n },\r\n init() {\r\n let param = { defId: this.defId, topDefKey: this.topDefKey || \"\" };\r\n let this_ = this;\r\n this.$store.dispatch(\"flow/getDefSetting\", param).then(function(data) {\r\n const rnd = new Date().getTime();\r\n let url = window.context.bpmModel +\"/flow/def/v1/image?defId=\" +this_.defId +\"&bpmnInstId=&taskId=&rnd=\" +rnd;\r\n let tenantId = '-1';\r\n try {\r\n if(this_.$store.state.login.currentUser.userAttrs.tenantId){\r\n tenantId = this_.$store.state.login.currentUser.userAttrs.tenantId;\r\n }\r\n } catch (error) {}\r\n if(tenantId!='-1'){\r\n url = url + '&tenantId='+tenantId;\r\n }\r\n let backgroundUrl =\r\n \"url('\" +url+\"') no-repeat\";\r\n let flowCanvasStyle = {\r\n position: \"relative\",\r\n background: backgroundUrl,\r\n width: data.initData.bpmDefLayout.width,\r\n height: data.initData.bpmDefLayout.height\r\n };\r\n this_.flowCanvasStyle = flowCanvasStyle;\r\n });\r\n },\r\n upRuleData(nodeDef){\r\n if(this.ruleData[nodeDef.nodeId]){\r\n this.ruleData[nodeDef.nodeId]['nodeDef'] = nodeDef;\r\n }\r\n }\r\n },\r\n created() {\r\n if (this.defId) {\r\n this.init();\r\n }\r\n }\r\n};\r\n",null]}