{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\home-cell-components\\dormitory-electricity.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\home-cell-components\\dormitory-electricity.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nexport default {\n data: function data() {\n return {\n dataList: [],\n yAxis: [],\n series: []\n };\n },\n mounted: function mounted() {\n this.electricityFun();\n },\n activated: function activated() {\n var _this = this;\n\n var timer = setInterval(function () {\n _this.electricityFun();\n }, 30 * 1000);\n this.$once(\"hook:deactivated\", function () {\n clearInterval(timer);\n });\n this.$once(\"hook:destroyed\", function () {\n clearInterval(timer);\n });\n },\n methods: {\n draw: function draw() {\n // 实例化echarts对象\n var myChartDrawer = this.$echarts.init(this.$refs.myEchart);\n var option = option = {\n title: {\n text: '',\n subtext: ''\n },\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n type: 'shadow'\n }\n },\n grid: {\n borderWidth: 0,\n top: '10%',\n left: 0,\n right: '10%',\n bottom: '3%',\n containLabel: true\n },\n xAxis: {\n name: 'kW·h',\n type: 'value',\n boundaryGap: [0, 0.01],\n splitLine: {\n lineStyle: {\n color: '#FFF'\n }\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: \"#FFF\"\n }\n },\n axisLabel: {\n show: true,\n textStyle: {\n color: '#fff'\n }\n }\n },\n yAxis: {\n name: \"房间号\",\n type: 'category',\n splitLine: {\n lineStyle: {\n color: '#FFF'\n }\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: \"#FFF\"\n }\n },\n axisLabel: {\n show: true,\n textStyle: {\n color: '#fff'\n }\n },\n data: this.yAxis\n },\n series: [{\n name: '',\n type: 'bar',\n barWidth: '10px',\n data: this.series,\n itemStyle: {\n normal: {\n color: '#C40',\n barBorderRadius: 30\n }\n }\n }]\n };\n myChartDrawer.setOption(option);\n var that = this;\n myChartDrawer.on('click', function (param) {\n var room = param.name;\n var floorId = '';\n that.dataList.forEach(function (item) {\n if (room === item.chNum) {\n floorId = item.floorid;\n }\n }); // that.$store.state.user.floorId=floorId\n\n sessionStorage.setItem(\"floorId\", floorId);\n that.$router.push({\n name: \"dormitoryManage-room\"\n });\n });\n },\n //用电\n electricityFun: function electricityFun() {\n var _this2 = this;\n\n this.$http.get('/system/index/roomCurrentAlarm').then(function (_ref) {\n var res = _ref.data;\n\n if (res.code != 0) {\n return _this2.$message.error(res.msg);\n }\n\n _this2.yAxis = [];\n _this2.series = [];\n _this2.dataList = res.data;\n res.data.forEach(function (item) {\n _this2.yAxis.unshift(item.chNum);\n\n if (item.chEcurrent) {\n // 电压*电流累加值/(每小时采样次数*千瓦)\n item.chEcurrent = 220 * item.chEcurrent / (120 * 1000);\n\n _this2.series.unshift(item.chEcurrent.toFixed(2));\n }\n });\n\n _this2.draw();\n });\n }\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