1 line
8.4 KiB
JSON
1 line
8.4 KiB
JSON
{"remainingRequest":"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=style&index=0&id=86cd1d62&scoped=true&lang=scss&","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\\css-loader\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\sass-loader\\lib\\loader.js","mtime":1533139052000},{"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":["\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\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\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.electric-current {\n\tcolor: #FFF;\n\n\t.title {\n\t\tfont-size: 18px;\n\t\tline-height: 36px;\n\t\tbackground-color: #133C6F;\n\t\twidth: 220px;\n\t\ttext-align: center;\n\t\tposition: relative;\n\t\tcolor: #fff;\n\t\tmargin-bottom: 20px;\n\n\t\t.angle-border {\n\t\t\tposition: absolute;\n\t\t\twidth: 12px;\n\t\t\theight: 12px;\n\t\t}\n\n\t\t.left-top-border {\n\t\t\ttop: -6px;\n\t\t\tleft: -6px;\n\t\t\tborder-left: 1px solid #01FFFF;\n\t\t\tborder-top: 1px solid #01FFFF;\n\t\t}\n\n\t\t.right-top-border {\n\t\t\ttop: -6px;\n\t\t\tright: -6px;\n\t\t\tborder-right: 1px solid #01FFFF;\n\t\t\tborder-top: 1px solid #01FFFF;\n\t\t}\n\n\t\t.left-bottom-border {\n\t\t\tbottom: -6px;\n\t\t\tleft: -6px;\n\t\t\tborder-left: 1px solid #01FFFF;\n\t\t\tborder-bottom: 1px solid #01FFFF;\n\t\t}\n\n\t\t.right-bottom-border {\n\t\t\tbottom: -6px;\n\t\t\tright: -6px;\n\t\t\tborder-right: 1px solid #01FFFF;\n\t\t\tborder-bottom: 1px solid #01FFFF;\n\t\t}\n\t}\n\n\t.chart-map {\n\t\theight: 300px\n\t}\n}\n",{"version":3,"sources":["dormitory-electricity.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmKA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA","file":"dormitory-electricity.vue","sourceRoot":"src/views/modules/home-cell-components","sourcesContent":["<template>\n\t<div class=\"electric-current\">\n\t\t<div class=\"title\">\n\t\t\t宿舍今日用电量TOP10\n\t\t\t<div class=\"angle-border left-top-border\"></div>\n\t\t\t<div class=\"angle-border right-top-border\"></div>\n\t\t\t<div class=\"angle-border left-bottom-border\"></div>\n\t\t\t<div class=\"angle-border right-bottom-border\"></div>\n\t\t</div>\n\t\t<div class=\"chart-map\" ref=\"myEchart\">\n\t\t</div>\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tdataList: [],\n\t\t\t\tyAxis: [],\n\t\t\t\tseries: [],\n\t\t\t}\n\t\t},\n\t\tmounted() {\n\t\t\tthis.electricityFun()\n\t\t},\n\t\tactivated() {\n\t\t\tconst timer = setInterval(() => {\n\t\t\t\tthis.electricityFun();\n\t\t\t}, 30*1000);\n\t\t\tthis.$once(\"hook:deactivated\", () => {\n\t\t\t\tclearInterval(timer)\n\t\t\t})\n\t\t\tthis.$once(\"hook:destroyed\", () => {\n\t\t\t\tclearInterval(timer)\n\t\t\t})\n\t\t},\n\t\tmethods: {\n\t\t\tdraw() {\n\t\t\t\t// 实例化echarts对象\n\t\t\t\tlet myChartDrawer = this.$echarts.init(this.$refs.myEchart);\n\t\t\t\tlet option = option = {\n\t\t\t\t\ttitle: {\n\t\t\t\t\t\ttext: '',\n\t\t\t\t\t\tsubtext: ''\n\t\t\t\t\t},\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\ttrigger: 'axis',\n\t\t\t\t\t\taxisPointer: {\n\t\t\t\t\t\t\ttype: 'shadow'\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tgrid: {\n\t\t\t\t\t\tborderWidth: 0,\n\t\t\t\t\t\ttop: '10%',\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tright: '10%',\n\t\t\t\t\t\tbottom: '3%',\n\t\t\t\t\t\tcontainLabel: true\n\t\t\t\t\t},\n\t\t\t\t\txAxis: {\n\t\t\t\t\t\tname: 'kW·h',\n\t\t\t\t\t\ttype: 'value',\n\t\t\t\t\t\tboundaryGap: [0, 0.01],\n\t\t\t\t\t\tsplitLine: {\n\t\t\t\t\t\t\tlineStyle: {\n\t\t\t\t\t\t\t\tcolor: '#FFF'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\taxisLine: {\n\t\t\t\t\t\t\tshow: true,\n\t\t\t\t\t\t\tlineStyle: {\n\t\t\t\t\t\t\t\tcolor: \"#FFF\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\taxisLabel: {\n\t\t\t\t\t\t\tshow: true,\n\t\t\t\t\t\t\ttextStyle: {\n\t\t\t\t\t\t\t\tcolor: '#fff'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tyAxis: {\n\t\t\t\t\t\tname: \"房间号\",\n\t\t\t\t\t\ttype: 'category',\n\t\t\t\t\t\tsplitLine: {\n\t\t\t\t\t\t\tlineStyle: {\n\t\t\t\t\t\t\t\tcolor: '#FFF'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\taxisLine: {\n\t\t\t\t\t\t\tshow: true,\n\t\t\t\t\t\t\tlineStyle: {\n\t\t\t\t\t\t\t\tcolor: \"#FFF\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\taxisLabel: {\n\t\t\t\t\t\t\tshow: true,\n\t\t\t\t\t\t\ttextStyle: {\n\t\t\t\t\t\t\t\tcolor: '#fff'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdata: this.yAxis\n\t\t\t\t\t},\n\t\t\t\t\tseries: [{\n\t\t\t\t\t\tname: '',\n\t\t\t\t\t\ttype: 'bar',\n\t\t\t\t\t\tbarWidth: '10px',\n\t\t\t\t\t\tdata: this.series,\n\t\t\t\t\t\titemStyle: {\n\t\t\t\t\t\t\tnormal: {\n\t\t\t\t\t\t\t\tcolor: '#C40',\n\t\t\t\t\t\t\t\tbarBorderRadius: 30,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}]\n\t\t\t\t};\n\t\t\t\tmyChartDrawer.setOption(option);\n\t\t\t\tlet that = this\n\t\t\t\tmyChartDrawer.on('click', function(param) {\n\t\t\t\t\tlet room = param.name\n\t\t\t\t\tlet floorId = ''\n\t\t\t\t\tthat.dataList.forEach(item => {\n\t\t\t\t\t\tif (room === item.chNum) {\n\t\t\t\t\t\t\tfloorId = item.floorid\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t// that.$store.state.user.floorId=floorId\n\t\t\t\t\tsessionStorage.setItem(\"floorId\", floorId)\n\t\t\t\t\tthat.$router.push({\n\t\t\t\t\t\tname: \"dormitoryManage-room\"\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t},\n\t\t\t//用电\n\t\t\telectricityFun() {\n\t\t\t\tthis.$http.get('/system/index/roomCurrentAlarm')\n\t\t\t\t\t.then(({\n\t\t\t\t\t\tdata: res\n\t\t\t\t\t}) => {\n\t\t\t\t\t\tif (res.code != 0) {\n\t\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.yAxis = []\n\t\t\t\t\t\tthis.series = []\n\t\t\t\t\t\tthis.dataList = res.data\n\t\t\t\t\t\tres.data.forEach(item => {\n\t\t\t\t\t\t\tthis.yAxis.unshift(item.chNum)\n\t\t\t\t\t\t\tif (item.chEcurrent) {\n\n\t\t\t\t\t\t\t\t// 电压*电流累加值/(每小时采样次数*千瓦)\n\t\t\t\t\t\t\t\titem.chEcurrent = 220 * item.chEcurrent / (120 * 1000)\n\t\t\t\t\t\t\t\tthis.series.unshift(item.chEcurrent.toFixed(2))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis.draw()\n\t\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n</script>\n\n<style scoped lang=\"scss\">\n\t.electric-current {\n\t\tcolor: #FFF;\n\n\t\t.title {\n\t\t\tfont-size: 18px;\n\t\t\tline-height: 36px;\n\t\t\tbackground-color: #133C6F;\n\t\t\twidth: 220px;\n\t\t\ttext-align: center;\n\t\t\tposition: relative;\n\t\t\tcolor: #fff;\n\t\t\tmargin-bottom: 20px;\n\n\t\t\t.angle-border {\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 12px;\n\t\t\t\theight: 12px;\n\t\t\t}\n\n\t\t\t.left-top-border {\n\t\t\t\ttop: -6px;\n\t\t\t\tleft: -6px;\n\t\t\t\tborder-left: 1px solid #01FFFF;\n\t\t\t\tborder-top: 1px solid #01FFFF;\n\t\t\t}\n\n\t\t\t.right-top-border {\n\t\t\t\ttop: -6px;\n\t\t\t\tright: -6px;\n\t\t\t\tborder-right: 1px solid #01FFFF;\n\t\t\t\tborder-top: 1px solid #01FFFF;\n\t\t\t}\n\n\t\t\t.left-bottom-border {\n\t\t\t\tbottom: -6px;\n\t\t\t\tleft: -6px;\n\t\t\t\tborder-left: 1px solid #01FFFF;\n\t\t\t\tborder-bottom: 1px solid #01FFFF;\n\t\t\t}\n\n\t\t\t.right-bottom-border {\n\t\t\t\tbottom: -6px;\n\t\t\t\tright: -6px;\n\t\t\t\tborder-right: 1px solid #01FFFF;\n\t\t\t\tborder-bottom: 1px solid #01FFFF;\n\t\t\t}\n\t\t}\n\n\t\t.chart-map {\n\t\t\theight: 300px\n\t\t}\n\t}\n</style>\n"]}]} |