{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\hydropsDevice\\AnalysisHydrops.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\hydropsDevice\\AnalysisHydrops.vue","mtime":1667545182489},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\nimport * as echarts from 'echarts';\nimport performanceAnalysis from '@/api/device/performanceAnalysis.js';\nexport default {\n data: function data() {\n return {\n chartData: []\n };\n },\n mounted: function mounted() {\n this.getStatistics();\n this.initChart();\n },\n methods: {\n //获取设备统计分析\n getStatistics: function getStatistics() {\n var _this = this;\n\n var productType = 'water';\n performanceAnalysis.deviceType(productType, function (res) {\n // console.log(res)\n if (res.state) {\n _this.chartData = res.value;\n\n _this.$nextTick(function () {\n _this.initChart();\n });\n }\n });\n },\n initChart: function initChart() {\n var names = [];\n var brower = [];\n this.chartData.forEach(function (item) {\n names.push(item.statusName);\n brower.push({\n name: item.statusName,\n value: item.count\n });\n });\n var chartDom = document.getElementById('echarts'); //注意此处与全局不同\n\n var myChart = echarts.init(chartDom);\n var option = {\n title: {\n text: '设备状态统计',\n left: 'center'\n },\n tooltip: {\n trigger: 'item'\n },\n legend: {\n data: this.names,\n orient: 'vertical',\n left: 'right'\n },\n series: [{\n name: names,\n type: 'pie',\n radius: '50%',\n data: brower,\n emphasis: {\n itemStyle: {\n shadowBlur: 10,\n shadowOffsetX: 0,\n shadowColor: 'rgba(0, 0, 0, 0.5)'\n }\n },\n itemStyle: {\n normal: {\n color: function color(colors) {\n var colorList = ['#ef6567', '#91cd77', '#f9c956', '#5470c6', '#75bedc'];\n return colorList[colors.dataIndex];\n }\n }\n }\n }]\n };\n myChart.setOption(option);\n window.addEventListener('resize', function () {\n if (myChart) {\n myChart.resize();\n }\n });\n }\n }\n};",null]}