{"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/role/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/Users/admin/projects/dms/src/dealer_admin/src/views/system/role/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\nimport * as API from \"@/api/role\";\nimport waves from \"@/directive/waves\"; // waves directive\nimport { parseTime } from \"@/utils\";\nimport Form from \"./components/form\";\nimport MenuList from \"./components/menuList\";\nexport default {\n  name: \"Menu\",\n  components: {\n    Form: Form,\n    MenuList: MenuList\n  },\n  directives: {\n    waves: waves\n  },\n  data: function data() {\n    return {\n      pic_base_url: process.env.VUE_APP_BASE_PIC,\n      picbase: \"\",\n      tableKey: 0,\n      list: [],\n      total: 0,\n      listLoading: true,\n      listQuery: {},\n      isAdmin: false //记录,只有是admin用户才有删除权限\n    };\n  },\n  created: function created() {\n    this.$forceUpdate();\n    this.getList();\n    this.picbase = process.env.VUE_APP_BASE_PIC;\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              list = res.result.list;\n              console.log(\"list:\", list);\n              this.list = [];\n              this.list = list;\n              console.log(this.list);\n              this.listLoading = false;\n            case 10:\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 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(id) {\n        var _this = this;\n        return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              this.$confirm(\"确认删除???\", \"提示\").then(/*#__PURE__*/function () {\n                var _ref = _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                        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    handleDisable: function () {\n      var _handleDisable = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(id) {\n        return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n          while (1) switch (_context4.prev = _context4.next) {\n            case 0:\n              _context4.next = 2;\n              return this.$confirm(\"\\u786E\\u8BA4\\uFF1F\", \"提示\", {\n                type: \"warning\"\n              });\n            case 2:\n              if (!id) {\n                _context4.next = 9;\n                break;\n              }\n              this.btnLoading = true;\n              _context4.next = 6;\n              return API.set({\n                id: id\n              });\n            case 6:\n              this.btnLoading = false;\n              _context4.next = 9;\n              return this.getList();\n            case 9:\n            case \"end\":\n              return _context4.stop();\n          }\n        }, _callee4, this);\n      }));\n      function handleDisable(_x3) {\n        return _handleDisable.apply(this, arguments);\n      }\n      return handleDisable;\n    }(),\n    fromHandle: function fromHandle(id) {\n      var _this2 = this;\n      this.$nextTick(function () {\n        _this2.$refs.fromType.init(id);\n      });\n    },\n    showMenuList: function showMenuList(id) {\n      var _this3 = this;\n      this.$nextTick(function () {\n        _this3.$refs.menuList.init(id);\n      });\n    },\n    handleFilter: function handleFilter() {\n      this.listQuery.page = 1;\n      this.getList();\n    },\n    handleModifyStatus: function handleModifyStatus(row, status) {\n      this.$confirm(\"\\u786E\\u8BA4\\u8FDB\\u884C\\u6B64\\u64CD\\u4F5C\\u5417\\uFF1F\", \"提示\", {\n        type: \"warning\"\n      });\n      this.$message({\n        message: \"操作Success\",\n        type: \"success\"\n      });\n      row.status = status;\n    }\n  }\n};",null]}