{"remainingRequest":"/Users/admin/projects/dms/src/dealer_admin/node_modules/thread-loader/dist/cjs.js!/Users/admin/projects/dms/src/dealer_admin/node_modules/babel-loader/lib/index.js!/Users/admin/projects/dms/src/dealer_admin/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/admin/projects/dms/src/dealer_admin/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/admin/projects/dms/src/dealer_admin/src/views/system/organization/components/UserResign.vue?vue&type=script&lang=js","dependencies":[{"path":"/Users/admin/projects/dms/src/dealer_admin/src/views/system/organization/components/UserResign.vue","mtime":1713161556000},{"path":"/Users/admin/projects/dms/src/dealer_admin/babel.config.js","mtime":1713161556000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["import _regeneratorRuntime from \"/Users/admin/projects/dms/src/dealer_admin/node_modules/@babel/runtime-corejs2/helpers/esm/regeneratorRuntime.js\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"/Users/admin/projects/dms/src/dealer_admin/node_modules/@babel/runtime-corejs2/helpers/esm/asyncToGenerator.js\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 * as API from \"@/api/admin\";\nimport * as DealerInviteAPI from \"@/api/dealer_invite\";\nimport _ from \"lodash\";\nimport * as AdminAPI from \"@/api/admin\";\nimport * as Utils from \"@/utils/validate\";\nexport default {\n  components: {},\n  data: function data() {\n    return {\n      dateVal: \"\",\n      dialogFormVisible: false,\n      adminUserId: null,\n      dealerList: [],\n      userList: []\n    };\n  },\n  computed: {},\n  created: function created() {\n    this.$forceUpdate();\n  },\n  methods: {\n    change: function change(index, user) {\n      this.$forceUpdate();\n      var dealerList = _.cloneDeep(this.dealerList);\n      ;\n      var dealer = dealerList[index];\n      dealer.invite_user = user;\n      dealerList[index] = dealer;\n      this.dealerList = [];\n      this.dealerList = dealerList;\n    },\n    getAdminInviteDealerList: function () {\n      var _getAdminInviteDealerList = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {\n        var res, __error, msg, result;\n        return _regeneratorRuntime().wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              this.dealerList = [];\n              _context.next = 3;\n              return DealerInviteAPI.getAdminInviteDealerList({\n                adminUserId: this.adminUserId\n              });\n            case 3:\n              res = _context.sent;\n              __error = res.__error, msg = res.msg, result = res.result;\n              if (__error == 0) {\n                this.dealerList = [];\n                this.dealerList = result.dealerList;\n                this.getAllAdminList();\n              }\n            case 6:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      function getAdminInviteDealerList() {\n        return _getAdminInviteDealerList.apply(this, arguments);\n      }\n      return getAdminInviteDealerList;\n    }(),\n    getAllAdminList: function () {\n      var _getAllAdminList = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {\n        var res;\n        return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              _context2.next = 2;\n              return AdminAPI.getAllAdminList();\n            case 2:\n              res = _context2.sent;\n              this.userList = [];\n              this.userList = res.result.list;\n            case 5:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2, this);\n      }));\n      function getAllAdminList() {\n        return _getAllAdminList.apply(this, arguments);\n      }\n      return getAllAdminList;\n    }(),\n    init: function () {\n      var _init = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(id) {\n        return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              this.dialogFormVisible = true;\n              this.adminUserId = id;\n              this.getAdminInviteDealerList();\n            case 3:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3, this);\n      }));\n      function init(_x) {\n        return _init.apply(this, arguments);\n      }\n      return init;\n    }(),\n    submitConfirm: function submitConfirm() {\n      var _this = this;\n      this.$confirm(\"确认离职\", \"提示\").then(/*#__PURE__*/function () {\n        var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_) {\n          return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n            while (1) switch (_context4.prev = _context4.next) {\n              case 0:\n                console.log(\"确认\");\n                _this.dataFormSubmit();\n              case 2:\n              case \"end\":\n                return _context4.stop();\n            }\n          }, _callee4);\n        }));\n        return function (_x2) {\n          return _ref.apply(this, arguments);\n        };\n      }()).catch(function (_) {\n        //console.log(\"取消\");\n      });\n    },\n    dataFormSubmit: function () {\n      var _dataFormSubmit = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {\n        var postData, resData, __error, msg;\n        return _regeneratorRuntime().wrap(function _callee5$(_context5) {\n          while (1) switch (_context5.prev = _context5.next) {\n            case 0:\n              postData = {\n                id: this.adminUserId,\n                dealerList: JSON.stringify(this.dealerList)\n              };\n              _context5.next = 3;\n              return API.resign(postData);\n            case 3:\n              resData = _context5.sent;\n              __error = resData.__error, msg = resData.msg;\n              if (__error == 0) {\n                this.$message({\n                  message: msg,\n                  type: \"success\"\n                });\n                this.$emit(\"refreshDataList\");\n                this.dialogFormVisible = false;\n              }\n            case 6:\n            case \"end\":\n              return _context5.stop();\n          }\n        }, _callee5, this);\n      }));\n      function dataFormSubmit() {\n        return _dataFormSubmit.apply(this, arguments);\n      }\n      return dataFormSubmit;\n    }()\n  }\n};",null]}