{"remainingRequest":"/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/training/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/Users/admin/projects/dms/src/dealer_admin/src/views/training/index.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/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":["\"use strict\";\n\nvar _interopRequireWildcard = require(\"/Users/admin/projects/dms/src/dealer_admin/node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");\nvar _interopRequireDefault = require(\"/Users/admin/projects/dms/src/dealer_admin/node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\nvar _regeneratorRuntime2 = _interopRequireDefault(require(\"/Users/admin/projects/dms/src/dealer_admin/node_modules/@babel/runtime-corejs2/helpers/regeneratorRuntime.js\"));\nrequire(\"regenerator-runtime/runtime\");\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"/Users/admin/projects/dms/src/dealer_admin/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js\"));\nvar API = _interopRequireWildcard(require(\"@/api/training.js\"));\nvar _waves = _interopRequireDefault(require(\"@/directive/waves\"));\nvar _utils = require(\"@/utils\");\nvar _form = _interopRequireDefault(require(\"./components/form\"));\nvar _Pagination = _interopRequireDefault(require(\"@/components/Pagination\"));\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n// waves directive\nvar _default = exports.default = {\n  name: \"Training\",\n  components: {\n    Form: _form.default,\n    Pagination: _Pagination.default\n  },\n  directives: {\n    waves: _waves.default\n  },\n  data: function data() {\n    return {\n      list: [],\n      total: 0,\n      listLoading: true,\n      listQuery: {\n        page: 1,\n        limit: 10,\n        search: ''\n      }\n    };\n  },\n  created: function created() {\n    this.$forceUpdate();\n    this.getList();\n  },\n  methods: {\n    getList: function () {\n      var _getList = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {\n        var res, list;\n        return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              this.listLoading = true;\n              _context.next = 3;\n              return API.list(this.listQuery);\n            case 3:\n              res = _context.sent;\n              this.total = res.result.total;\n              list = res.result.list;\n              this.list = [];\n              this.list = list;\n              this.listLoading = false;\n            case 9:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      function getList() {\n        return _getList.apply(this, arguments);\n      }\n      return getList;\n    }(),\n    delHandle: function () {\n      var _delHandle = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3(id) {\n        var _this = this;\n        return (0, _regeneratorRuntime2.default)().wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              this.$confirm(\"确认删除???\", \"提示\").then(/*#__PURE__*/function () {\n                var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(_) {\n                  var res;\n                  return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {\n                    while (1) switch (_context2.prev = _context2.next) {\n                      case 0:\n                        console.log(\"确认\");\n                        _context2.next = 3;\n                        return API.del(id);\n                      case 3:\n                        res = _context2.sent;\n                        if (res.__error === 0) {\n                          _this.$message({\n                            message: \"成功\",\n                            type: \"success\"\n                          });\n                          _this.getList();\n                        }\n                      case 5:\n                      case \"end\":\n                        return _context2.stop();\n                    }\n                  }, _callee2);\n                }));\n                return function (_x2) {\n                  return _ref.apply(this, arguments);\n                };\n              }()).catch(function (_) {\n                console.log(\"取消\");\n              });\n            case 1:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3, this);\n      }));\n      function delHandle(_x) {\n        return _delHandle.apply(this, arguments);\n      }\n      return delHandle;\n    }(),\n    fromHandle: function fromHandle(id) {\n      var _this2 = this;\n      this.$nextTick(function () {\n        _this2.$refs.fromType.init(id);\n      });\n    },\n    checkStage: function checkStage(id) {\n      this.$router.push({\n        'path': '/training/stage',\n        'query': {\n          'training': id\n        }\n      });\n    },\n    handleFilter: function handleFilter() {\n      this.listQuery.page = 1;\n      this.getList();\n    },\n    disableChange: function disableChange(id, disable) {\n      var _this3 = this;\n      this.$confirm(\"确定修改状态\", \"提示\").then(/*#__PURE__*/function () {\n        var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee4(_) {\n          var updateData, res;\n          return (0, _regeneratorRuntime2.default)().wrap(function _callee4$(_context4) {\n            while (1) switch (_context4.prev = _context4.next) {\n              case 0:\n                updateData = {\n                  id: id,\n                  disable: disable\n                };\n                _context4.next = 3;\n                return API.update(updateData);\n              case 3:\n                res = _context4.sent;\n                if (res.__error === 0) {\n                  _this3.$message({\n                    message: \"成功\",\n                    type: \"success\"\n                  });\n                  _this3.getList();\n                }\n              case 5:\n              case \"end\":\n                return _context4.stop();\n            }\n          }, _callee4);\n        }));\n        return function (_x3) {\n          return _ref2.apply(this, arguments);\n        };\n      }()).catch(function (_) {\n        console.log(\"取消\");\n      });\n    }\n  }\n};",null]}