{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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\\FlowNodeScript.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\flow\\FlowNodeScript.vue","mtime":1675071991850},{"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//\nimport req from \"@/request.js\";\nimport { mapState, mapActions } from \"vuex\";\nimport { Message } from 'element-ui';\n\nvar eipScriptDialog = function eipScriptDialog() {\n  return import(\"@/components/dialog/EipScriptDialog.vue\");\n};\n\nvar MessageTypeSelector = function MessageTypeSelector() {\n  return import(\"@/components/flow/MessageTypeSelector.vue\");\n};\n\nvar FlowVarSelector = function FlowVarSelector() {\n  return import(\"@/components/flow/FlowVarSelector.vue\");\n};\n\nvar FlowConditionBuildDialog = function FlowConditionBuildDialog() {\n  return import(\"@/components/flow/FlowConditionBuildDialog.vue\");\n};\n\nexport default {\n  name: \"FlowNodeScript\",\n  components: {\n    MessageTypeSelector: MessageTypeSelector,\n    eipScriptDialog: eipScriptDialog,\n    FlowVarSelector: FlowVarSelector,\n    FlowConditionBuildDialog: FlowConditionBuildDialog\n  },\n  props: {\n    //任务节点信息\n    node: {\n      type: Object,\n      required: true\n    },\n    //流程配置信息\n    defConfigData: {\n      type: Object,\n      required: true\n    },\n    //事件脚本配置的信息\n    eventScriptData: {\n      type: Object,\n      required: true\n    }\n  },\n  data: function data() {\n    return {\n      tabType: \"create\",\n      //start：开始事件配置；end：结束事件配置；complete：后置事件配置；create：前置事件配置；\n      dialogVisibleSetting: false,\n      titleSetting: \"设置事件脚本\",\n      //某个节点事件脚本的标题\n      eventScriptDataCopy: {},\n      //复制一份最开始的事件脚本配置的信息\n      eventScriptMap: {\n        START: \"\",\n        END: \"\",\n        CREATE: \"\",\n        COMPLETE: \"\"\n      },\n      //初始化事件脚本信息\n      cmOptions2: {\n        value: \"\",\n        mode: \"groovy\",\n        readOnly: false,\n        smartIndent: true,\n        tabSize: 1,\n        theme: 'base16-light',\n        lineNumbers: true,\n        line: true\n      }\n    };\n  },\n  methods: {\n    //监听条件脚本确认事件\n    conditionDialogConfirm: function conditionDialogConfirm(data) {\n      if (this.tabType == \"end\") {\n        //如果是结束事件点击的条件脚本，返回结果则绑定给结束事件\n        this.eventScriptMap.END = this.eventScriptMap.END + data;\n      } else if (this.tabType == \"start\") {\n        //如果是开始事件点击的条件脚本，返回结果则绑定给开始事件\n        this.eventScriptMap.START = this.eventScriptMap.START + data;\n      } else if (this.tabType == \"create\") {\n        //如果是前置事件点击的条件脚本，返回结果则绑定给前置事件\n        this.eventScriptMap.CREATE = this.eventScriptMap.CREATE + data;\n      } else if (this.tabType == \"complete\") {\n        //如果是后置事件点击的条件脚本，返回结果则绑定给后置事件\n        // this.eventScriptMap.COMPLETE=this.eventScriptMap.COMPLETE+data;\n        this.$set(this.eventScriptMap, \"COMPLETE\", this.eventScriptMap.COMPLETE + data);\n      }\n    },\n    //显示条件脚本对话框 \n    showConditionBuild: function showConditionBuild() {\n      this.$refs.flowConditionBuildDialog.showDialog();\n    },\n    //监督可选变量的返回值(开始事件)\n    varTreeOnConfirmStart: function varTreeOnConfirmStart(data) {\n      this.eventScriptMap.START = this.eventScriptMap.START + data.pathValue;\n    },\n    //监督可选变量的返回值(结束事件)\n    varTreeOnConfirmEnd: function varTreeOnConfirmEnd(data) {\n      this.eventScriptMap.END = this.eventScriptMap.END + data.pathValue;\n    },\n    //监督可选变量的返回值(前置事件)\n    varTreeOnConfirmCreate: function varTreeOnConfirmCreate(data) {\n      this.eventScriptMap.CREATE = this.eventScriptMap.CREATE + data.pathValue;\n    },\n    //监督可选变量的返回值(后置事件)\n    varTreeOnConfirmComplete: function varTreeOnConfirmComplete(data) {\n      this.eventScriptMap.COMPLETE = this.eventScriptMap.COMPLETE + data.pathValue;\n    },\n    //显示常用脚本\n    showDialog: function showDialog(action) {\n      this.$refs[action].showDialog();\n    },\n    //设置事件脚本\n    editTaskScript: function editTaskScript() {\n      this.eventScriptMap = {\n        START: \"\",\n        END: \"\",\n        CREATE: \"\",\n        COMPLETE: \"\"\n      };\n      this.eventScriptDataCopy = JSON.parse(JSON.stringify(this.eventScriptData));\n\n      if (this.eventScriptDataCopy.eventScriptMap.START) {\n        this.eventScriptMap.START = this.eventScriptDataCopy.eventScriptMap.START;\n      }\n\n      if (this.eventScriptDataCopy.eventScriptMap.END) {\n        this.eventScriptMap.END = this.eventScriptDataCopy.eventScriptMap.END;\n      }\n\n      if (this.eventScriptDataCopy.eventScriptMap.CREATE) {\n        this.eventScriptMap.CREATE = this.eventScriptDataCopy.eventScriptMap.CREATE;\n      }\n\n      if (this.eventScriptDataCopy.eventScriptMap.COMPLETE) {\n        this.$set(this.eventScriptMap, \"COMPLETE\", this.eventScriptDataCopy.eventScriptMap.COMPLETE); // this.eventScriptMap.COMPLETE=this.eventScriptDataCopy.eventScriptMap.COMPLETE;\n      }\n\n      if (this.eventScriptDataCopy.bpmNodeDef.type == \"end\") {\n        this.tabType = \"end\";\n      } else if (this.eventScriptDataCopy.bpmNodeDef.type == \"start\") {\n        this.tabType = \"start\";\n      } else {\n        this.tabType = \"create\";\n      }\n\n      this.dialogVisibleSetting = true;\n    },\n    //保存事件脚本\n    saveScript: function saveScript() {\n      var this_ = this;\n      var eventScriptArray = [];\n\n      if (JSON.stringify(this_.eventScriptMap) == \"{}\") {\n        Message.warning(\"请至少添加一个事件脚本\");\n        return;\n      }\n\n      for (var key in this_.eventScriptMap) {\n        var object = {\n          \"scriptType\": key,\n          \"content\": this_.eventScriptMap[key]\n        };\n        eventScriptArray.push(object);\n      }\n\n      var param = {\n        defId: this_.node.defId,\n        nodeId: this_.node.nodeId,\n        eventScriptArray: JSON.stringify(eventScriptArray)\n      };\n      this_.eventScriptDataCopy.eventScriptMap = this_.eventScriptMap;\n      req.post(\"${bpmModel}/flow/node/v1/eventScriptSave\", param).then(function (response) {\n        response = response.data;\n\n        if (response.state) {\n          Message.success(response.message);\n          this_.$emit(\"update:eventScriptData\", this_.eventScriptDataCopy); //子组件更新父组件的值\n\n          this_.dialogVisibleSetting = false;\n        } else {\n          Message.error(response.message);\n        }\n      });\n    },\n    //关闭设置节点事件脚本列弹框\n    close: function close() {\n      this.dialogVisibleSetting = false;\n    },\n    // 刷新codemirror编辑器内容\n    refreshCode: function refreshCode() {\n      this.$refs.mycode.refresh();\n    }\n  },\n  mounted: function mounted() {\n    this.$validator = this.$root.$validator;\n  }\n};",null]}