{"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/dealer/list/components/loginModal.vue?vue&type=script&lang=js","dependencies":[{"path":"/Users/admin/projects/dms/src/dealer_admin/src/views/dealer/list/components/loginModal.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;\nrequire(\"core-js/modules/es6.function.name\");\nrequire(\"core-js/modules/es6.regexp.search\");\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/dealer\"));\nvar _lodash = _interopRequireDefault(require(\"lodash\"));\nvar echarts = _interopRequireWildcard(require(\"echarts\"));\nvar _DealerSearch = _interopRequireDefault(require(\"@/views/components/DealerSearch.vue\"));\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = exports.default = {\n  name: 'LoginModal',\n  components: {\n    DealerSearch: _DealerSearch.default\n  },\n  data: function data() {\n    return {\n      dialogFormVisible: false,\n      dealer_id: null,\n      logChart: null,\n      search: {\n        dealerId: \"\",\n        dealer_name: \"\"\n      }\n    };\n  },\n  computed: {},\n  created: function created() {},\n  methods: {\n    init: function () {\n      var _init = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(id) {\n        return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              this.initData(id);\n              this.getLoginStatistic();\n            case 2:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      function init(_x) {\n        return _init.apply(this, arguments);\n      }\n      return init;\n    }(),\n    resetSearch: function resetSearch() {\n      this.search = {\n        dealerId: \"\",\n        dealer_name: \"\"\n      };\n    },\n    choiceDealer: function choiceDealer(item) {\n      var search = this.search;\n      if (item) {\n        search.dealerId = item.value;\n        search.dealer_name = item.name;\n      } else {\n        search.dealerId = \"\";\n        search.dealer_name = \"\";\n      }\n      this.search = {};\n      this.search = search;\n    },\n    initData: function initData(id) {\n      this.resetSearch();\n      if (id && id != undefined) {\n        this.search.dealerId = id;\n      }\n    },\n    getLoginStatistic: function () {\n      var _getLoginStatistic = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2() {\n        var _this = this;\n        var params, resData;\n        return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              params = {\n                dealerId: this.search.dealerId\n              };\n              _context2.next = 3;\n              return API.getLoginStatistic(params);\n            case 3:\n              resData = _context2.sent;\n              if (resData.__error == 0) {\n                this.dialogFormVisible = true;\n                this.$nextTick(function () {\n                  _this.initChart(resData.result);\n                });\n              }\n            case 5:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2, this);\n      }));\n      function getLoginStatistic() {\n        return _getLoginStatistic.apply(this, arguments);\n      }\n      return getLoginStatistic;\n    }(),\n    initChart: function initChart(list) {\n      console.log(\"list:\", list);\n      var xList = [];\n      var yList = [];\n      list.map(function (v) {\n        xList.push(v.date);\n        yList.push(v.value);\n      });\n      console.log(\"xList:\", xList);\n      console.log(\"yList:\", yList);\n      this.logChart = echarts.init(document.getElementById('logChart'));\n      this.logChart.setOption({\n        xAxis: {\n          type: 'category',\n          data: xList\n        },\n        yAxis: {\n          type: 'value'\n        },\n        dataZoom: [{\n          show: true,\n          realtime: true,\n          start: 0,\n          end: 100\n        }],\n        grid: {\n          left: '0%',\n          right: '0%',\n          bottom: '0%',\n          containLabel: true\n        },\n        series: [{\n          data: yList,\n          type: 'line',\n          smooth: true\n        }]\n      });\n    }\n  }\n};",null]}