{"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/training/course/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/Users/admin/projects/dms/src/dealer_admin/src/views/training/course/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/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//\n//\n//\n//\n//\n//\n//\n//\n\nimport * as API from \"@/api/training_course.js\";\nimport waves from \"@/directive/waves\"; // waves directive\nimport { parseTime } from \"@/utils\";\nimport Form from \"../components/course_form.vue\";\nimport Pagination from \"@/components/Pagination\";\nexport default {\n  name: \"TrainingCourse\",\n  components: {\n    Form: Form,\n    Pagination: Pagination\n  },\n  directives: {\n    waves: waves\n  },\n  data: function data() {\n    return {\n      list: [],\n      total: 0,\n      listLoading: true,\n      listQuery: {\n        page: 1,\n        limit: 10,\n        training_id: '',\n        stage_id: ''\n      },\n      courseTypeList: [],\n      courseTypeMap: {}\n    };\n  },\n  created: function created() {\n    this.$forceUpdate();\n    var query = this.$route.query;\n    this.listQuery.training_id = query.training;\n    this.listQuery.stage_id = query.stage;\n    this.getCourseTypeList();\n    this.getCourseTypeMap();\n    this.getList();\n  },\n  methods: {\n    getList: function () {\n      var _getList = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {\n        var res, list;\n        return _regeneratorRuntime().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    getCourseTypeList: function () {\n      var _getCourseTypeList = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {\n        var res, list;\n        return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              _context2.next = 2;\n              return API.getCourseTypeList();\n            case 2:\n              res = _context2.sent;\n              list = res.result.list;\n              this.courseTypeList = list;\n            case 5:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2, this);\n      }));\n      function getCourseTypeList() {\n        return _getCourseTypeList.apply(this, arguments);\n      }\n      return getCourseTypeList;\n    }(),\n    getCourseTypeMap: function () {\n      var _getCourseTypeMap = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {\n        var res, course_type;\n        return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              _context3.next = 2;\n              return API.getCourseTypeMap();\n            case 2:\n              res = _context3.sent;\n              course_type = res.result.course_type;\n              this.courseTypeMap = course_type;\n            case 5:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3, this);\n      }));\n      function getCourseTypeMap() {\n        return _getCourseTypeMap.apply(this, arguments);\n      }\n      return getCourseTypeMap;\n    }(),\n    delHandle: function () {\n      var _delHandle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(id) {\n        var _this = this;\n        return _regeneratorRuntime().wrap(function _callee5$(_context5) {\n          while (1) switch (_context5.prev = _context5.next) {\n            case 0:\n              this.$confirm(\"确认删除???\", \"提示\").then(/*#__PURE__*/function () {\n                var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_) {\n                  var res;\n                  return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n                    while (1) switch (_context4.prev = _context4.next) {\n                      case 0:\n                        console.log(\"确认\");\n                        _context4.next = 3;\n                        return API.del(id);\n                      case 3:\n                        res = _context4.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 _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            case 1:\n            case \"end\":\n              return _context5.stop();\n          }\n        }, _callee5, 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, _this2.listQuery.training_id, _this2.listQuery.stage_id);\n      });\n    },\n    handleFilter: function handleFilter() {\n      this.listQuery.page = 1;\n      this.getList();\n    }\n  }\n};",null]}