{"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\\FlowNodeJumpRule.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\flow\\FlowNodeJumpRule.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\r\nimport req from \"@/request.js\";\r\nimport { mapState, mapActions } from \"vuex\";\r\nimport { Message } from 'element-ui';\r\nimport M from 'minimatch';\r\nconst eipScriptDialog = () => import(\"@/components/dialog/EipScriptDialog.vue\");\r\nconst MessageTypeSelector = () => import(\"@/components/flow/MessageTypeSelector.vue\");\r\nconst FlowVarSelector = () => import(\"@/components/flow/FlowVarSelector.vue\");\r\nconst FlowConditionBuildDialog  = () => import(\"@/components/flow/FlowConditionBuildDialog.vue\");\r\nexport default {\r\n  name:\"FlowNodeJumpRule\",\r\n  components: {MessageTypeSelector,eipScriptDialog,FlowVarSelector,FlowConditionBuildDialog },\r\n  props: {\r\n    //任务节点信息\r\n    node:{\r\n      type: Object,\r\n      required: true\r\n    },\r\n    //流程配置信息\r\n    defConfigData:{\r\n      type: Object,\r\n      required: true\r\n    },\r\n    //跳转规则配置的信息\r\n    nodeDef:{\r\n      type: Object,\r\n      required: true\r\n    },\r\n    //跳转规则配置流程跳转节点\r\n    nodeDefList:{\r\n      type: Array,\r\n      required: true\r\n    },\r\n  },\r\n  data() {\r\n    return {\r\n      titleSetting:\"设置跳转规则\",//某个节点跳转规则的标题\r\n      dialogVisibleSetting:false,//是否显示设置节点跳转规则侧边栏\r\n      isSave:false,//判断是否可以保存\r\n      nodeDefCopy:{},//复制一份最开始的跳转规则配置的信息\r\n      filterNodeType: [\"EXCLUSIVEGATEWAY\",\"SUBPROCESS\",\"CALLACTIVITY\",\"PARALLELGATEWAY\",\"INCLUSIVEGATEWAY\",\"SUBSTARTGATEWAY\",\"SUBENDGATEWAY\",\"SUBMULTISTARTGATEWAY\"], // 过滤节点  分支\r\n      curRule:{\"ruleName\":\"\",\"targetNode\":\"\",\"condition\":\"\",\"isAdd\":true},//初始化跳转规则信息\r\n    };\r\n  },\r\n  methods: {\r\n    //监听条件脚本确认事件\r\n    conditionDialogConfirm(data) {\r\n      this.curRule.condition = this.curRule.condition+data;\r\n    },\r\n    //显示条件脚本对话框 \r\n    showConditionBuild() {\r\n        this.$refs.flowConditionBuildDialog.showDialog();\r\n    },\r\n    //监督可选变量的返回值\r\n    varTreeOnConfirm(data){\r\n        this.curRule.condition = this.curRule.condition+data.pathValue;\r\n    },\r\n    //显示常用脚本\r\n    showDialog(action){\r\n      this.$refs[action].showDialog();\r\n    },\r\n    //设置跳转规则\r\n    editNodeRules(){\r\n      this.nodeDefCopy = JSON.parse(JSON.stringify(this.nodeDef));//复制一份最开始的跳转规则配置的信息\r\n      this.isSave=false;\r\n      this.dialogVisibleSetting=true;\r\n    },\r\n    //点击跳转规则列表某一条数据时触发\r\n    orgRowClick(row, column, event) {\r\n      if(column.label !=\"操作\"){\r\n        this.curRule = row;\r\n        this.isSave=true;\r\n      }\r\n    },\r\n    //保存跳转规则\r\n    saveRule(){\r\n        //判断是否有新增的数据\r\n        if(!this.isSave){\r\n            Message.warning(\"请先新增跳转规则再保存\");\r\n            return;\r\n        }else{\r\n            const this_ = this;\r\n            req.post(\"${bpmModel}/flow/node/v1/ruleSave?nodeId=\"+this_.node.nodeId+\"&defId=\"+this_.node.defId,this_.nodeDefCopy.jumpRuleList).then(function(response){\r\n                response = response.data;\r\n                if(response.state){\r\n                    Message.success(response.message);\r\n                    this_.$emit(\"update:nodeDef\",this_.nodeDefCopy);//子组件更新父组件的值\r\n                    this_.$emit(\"upRuleData\",this_.nodeDefCopy);//更新规则数据，防止点击其他节点时，当前保存的规则数据未更新显示\r\n                    this_.dialogVisibleSetting = false;\r\n                }else{\r\n                    Message.error(response.message);\r\n                }\r\n            });\r\n        }\r\n    },\r\n    //新增跳转规则\r\n    addRule(){\r\n      const this_ = this;\r\n      this_.$validator.validateAll(\"settingSave\").then(result => {\r\n        if (result) {\r\n            if(this_.curRule.isAdd){\r\n                delete this_.curRule.isAdd;\r\n                this_.isSave=true;\r\n                this_.nodeDefCopy.jumpRuleList.push(this_.curRule);\r\n                this_.isSave=true;\r\n                this_.curRule={\"ruleName\":\"\",\"targetNode\":\"\",\"condition\":\"\",\"isAdd\":true};//初始化跳转规则信息\r\n            }\r\n        } else {\r\n            let arr = this_.$validator.errors.items.filter(item=>item.scope==\"settingSave\");\r\n            let errorLength = arr.length;\r\n            this_.$message({\r\n                showClose: true,\r\n                message: `有${errorLength}个字段未通过校验，请正确填写表单内容。`,\r\n                type: \"warning\"\r\n            });\r\n        }\r\n      });\r\n    },\r\n    //关闭设置节点跳转规则列弹框\r\n    close(){\r\n       this.dialogVisibleSetting=false;\r\n    },\r\n    //删除跳转规则\r\n    deleteSetting(list,index){\r\n      list.splice(index,1);\r\n      this.isSave=true;\r\n      this.curRule={\"ruleName\":\"\",\"targetNode\":\"\",\"condition\":\"\",\"isAdd\":true};//初始化跳转规则信息\r\n    },\r\n  },\r\n  mounted() {\r\n    this.$validator = this.$root.$validator;\r\n  }\r\n};\r\n",null]}