{"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/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/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 \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.search\";\nimport _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\nimport * as API from \"@/api/dealer\";\nimport _ from \"lodash\";\nimport * as echarts from 'echarts';\nimport DealerSearch from '@/views/components/DealerSearch.vue';\nexport default {\n  name: 'LoginModal',\n  components: {\n    DealerSearch: DealerSearch\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 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(id) {\n        return _regeneratorRuntime().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 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {\n        var _this = this;\n        var params, resData;\n        return _regeneratorRuntime().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]}