{"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\\AgentEdit.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\flow\\AgentEdit.vue","mtime":1675071991756},{"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/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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\";\n\nvar eipUserSelector = function eipUserSelector() {\n  return import(\"@/components/selector/EipUserSelector.vue\");\n};\n\nexport default {\n  components: {\n    eipUserSelector: eipUserSelector\n  },\n  data: function data() {\n    return {\n      initData: {\n        isMail: 1,\n        isUsable: 1\n      },\n      dialogVisible: false,\n      isSubmit: true,\n      data: {\n        isMail: 1,\n        isUsable: 1\n      }\n    };\n  },\n  props: {\n    editData: {\n      type: Object,\n      default: function _default() {}\n    }\n  },\n  methods: {\n    beforeClose: function beforeClose() {\n      this.dialogVisible = false;\n    },\n    handleOpen: function handleOpen() {\n      var _this2 = this;\n\n      this.dialogVisible = true;\n      this.$nextTick(function () {\n        if (!_this2.editData.userName) {\n          _this2.data = _objectSpread({}, _this2.initData);\n        } else {\n          _this2.data = _this2.editData;\n        }\n      });\n    },\n    close: function close() {\n      this.data = {};\n      this.dialogVisible = false;\n    },\n    save: function save() {\n      if (!this.data.userId) {\n        this.$message({\n          message: '请选择被代理人！',\n          type: \"warning\"\n        });\n        return;\n      }\n\n      if (!this.data.agentId) {\n        this.$message({\n          message: '请选择代理人！',\n          type: \"warning\"\n        });\n        return;\n      }\n\n      if (this.data.userId === this.data.agentId) {\n        this.$message({\n          message: '代理人和被代理人不能是同一人！',\n          type: \"warning\"\n        });\n        return;\n      }\n\n      var _this = this;\n\n      flow.getUserById(this.data.userId).then(function (rep) {\n        if (rep) {\n          if (_this.data.agentId !== rep.agentId) {\n            _this.$confirm(\"确定将用户【\" + _this.data.userName + \"】的代理人由【\" + rep.agentName + \"】修改为【\" + _this.data.agentName + \"】吗？\", '提示', {\n              confirmButtonText: '确定',\n              cancelButtonText: '取消',\n              type: 'warning'\n            }).then(function () {\n              _this.toSave();\n            });\n          } else {\n            _this.toSave();\n          }\n        } else {\n          _this.toSave();\n        }\n      });\n    },\n    toSave: function toSave() {\n      var _this = this;\n\n      flow.saveAgent(this.data).then(function (rep) {\n        if (rep && rep.state) {\n          _this.$message({\n            type: \"success\",\n            message: rep.message\n          });\n\n          _this.afterSave();\n        } else {\n          _this.$message.error(rep.message);\n        }\n      });\n    },\n    afterSave: function afterSave() {\n      this.close();\n      this.$emit(\"after-save\", {});\n    },\n    input: function () {\n      var _input = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(value) {\n        var resp;\n        return regeneratorRuntime.wrap(function _callee$(_context) {\n          while (1) {\n            switch (_context.prev = _context.next) {\n              case 0:\n                if (!this.data.userId) {\n                  _context.next = 5;\n                  break;\n                }\n\n                _context.next = 3;\n                return flow.getUserById(this.data.userId);\n\n              case 3:\n                resp = _context.sent;\n\n                if (resp) {\n                  this.data = _objectSpread({}, resp);\n                } else {\n                  this.data.id = \"\";\n                  this.data.agentId = \"\";\n                  this.data.agentName = \"\";\n                }\n\n              case 5:\n              case \"end\":\n                return _context.stop();\n            }\n          }\n        }, _callee, this);\n      }));\n\n      function input(_x) {\n        return _input.apply(this, arguments);\n      }\n\n      return input;\n    }()\n  }\n};",null]}