{"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\\FlowBranchConditionSet.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\flow\\FlowBranchConditionSet.vue","mtime":1675071991788},{"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":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es7.symbol.async-iterator\";\nimport \"core-js/modules/es6.symbol\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.array.from\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.to-string\";\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 flow from '@/api/flow.js';\nimport req from '@/request.js';\nimport { mapState, mapActions } from 'vuex';\nimport FlowVarSelector from '@/components/flow/FlowVarSelector.vue';\nimport FlowConditionBuildDialog from '@/components/flow/FlowConditionBuildDialog.vue';\nexport default {\n  components: {\n    FlowVarSelector: FlowVarSelector,\n    FlowConditionBuildDialog: FlowConditionBuildDialog\n  },\n  data: function data() {\n    return {\n      dialogVisible: false,\n      data: {},\n      curEditNodeId: '',\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        lineWrapping: true\n      }\n    };\n  },\n  computed: mapState({\n    curNode: function curNode(state) {\n      return state.flow.defConfigData.curEditNode;\n    }\n  }),\n  methods: {\n    showDialog: function showDialog(param) {\n      if (param == 'close') {\n        this.dialogVisible = false;\n        this.curEditNodeId = '';\n        return;\n      }\n\n      var this_ = this;\n      this_.$store.dispatch('flow/getCurSelectBranches').then(function (data) {\n        if (data && data.outcomeNodes) {\n          data.conditions = data.conditions || {};\n\n          var _iterator = _createForOfIteratorHelper(data.outcomeNodes),\n              _step;\n\n          try {\n            for (_iterator.s(); !(_step = _iterator.n()).done;) {\n              var node = _step.value;\n\n              if (!data.conditions[node.nodeId]) {\n                data.conditions[node.nodeId] = '';\n              }\n            }\n          } catch (err) {\n            _iterator.e(err);\n          } finally {\n            _iterator.f();\n          }\n        }\n\n        this_.data = JSON.parse(JSON.stringify(data));\n      });\n      this.dialogVisible = true;\n    },\n    setCurEditNodeId: function setCurEditNodeId(nodeId) {\n      this.curEditNodeId = nodeId;\n    },\n    conditionDialogConfirm: function conditionDialogConfirm(data) {\n      this.data.conditions[this.curEditNodeId] = data;\n    },\n    varTreeOnConfirm: function varTreeOnConfirm(data) {\n      this.data.conditions[this.curEditNodeId] = this.data.conditions[this.curEditNodeId] + data.pathValue;\n    },\n    showConditionBuild: function showConditionBuild() {\n      if (!this.curEditNodeId) {\n        this.$message.warning('请先选择要设置表达式的节点');\n        return;\n      }\n\n      this.$refs.flowConditionBuildDialog.showDialog();\n    },\n    setEditorVal: function setEditorVal(type, op) {\n      var val = '';\n\n      if (type == 1) {\n        val = op == 1 ? 'taskCmd.getActionName().equals(\"agree\")' : 'taskCmd.getActionName().equals(\"oppose\")';\n      } else {\n        val = op == 1 ? 'signResult_' + type + '.equals(\"agree\")' : 'signResult_' + type + '.equals(\"oppose\")';\n      }\n\n      if (!this.data.conditions[this.curEditNodeId]) {\n        this.data.conditions[this.curEditNodeId] = '';\n      }\n\n      this.data.conditions[this.curEditNodeId] = val;\n    },\n    handleClose: function handleClose() {\n      var _this = this;\n\n      var param = {\n        defId: this.curNode.defId,\n        nodeId: this.curNode.nodeId,\n        condition: JSON.stringify(this.data.conditions)\n      };\n      var this_ = this;\n      req.post('${bpmModel}/flow/node/v1/branchConditionSave', param).then(function (response) {\n        var data = response.data;\n\n        if (data.state) {\n          this_.$message.success('分支条件设置成功');\n          var obj = {};\n          obj['nodeBranches.' + this_.curNode.nodeId + '.conditions'] = this_.data.conditions;\n          this_.$store.dispatch('flow/updateConfig', obj);\n          this_.dialogVisible = false;\n\n          _this.$emit('onConfirm');\n        } else {\n          this_.$message.fail('分支条件设置失败!' + data.message);\n        }\n      });\n    },\n    //关闭分支条件配置对话框\n    close: function close() {\n      this.dialogVisible = false;\n    },\n    dialogOnConfirm: function dialogOnConfirm(selection) {\n      if (!selection || selection.length == 0) {\n        this.$message.error('请至少选择一个用户');\n        return;\n      }\n\n      var names = [];\n      var ids = [];\n\n      var _iterator2 = _createForOfIteratorHelper(selection),\n          _step2;\n\n      try {\n        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n          var user = _step2.value;\n          names.push(user.fullname);\n          ids.push(user.id);\n        }\n      } catch (err) {\n        _iterator2.e(err);\n      } finally {\n        _iterator2.f();\n      }\n\n      this.curSelectItem.id = ids.join(',');\n      this.curSelectItem.name = names.join(',');\n      this.$forceUpdate();\n    }\n  }\n};",null]}