{"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\\performanceAnalysis\\gztj.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\performanceAnalysis\\gztj.vue","mtime":1667545182582},{"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":["//\n//\n//\n//\n//\n//\n//\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 zData: [],\n myChart: null,\n curPage: 1,\n totalPage: 1,\n itemNumPerPage: 10\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 performanceAnalysis.getCount({}, function (res) {\n if (res.state) {\n console.log(res.value);\n _this.zData = res.value.rows;\n _this.curPage = res.value.page;\n _this.itemNumPerPage = res.value.pageSize;\n\n _this.$nextTick(function () {\n _this.initChart();\n });\n }\n });\n },\n initChart: function initChart() {\n var _this2 = this;\n\n var xAxis = [];\n var yAxis = [];\n\n for (var i = 0; i < this.zData.length; i++) {\n xAxis[i] = this.zData[i].deviceName;\n }\n\n for (var _i = 0; _i < this.zData.length; _i++) {\n yAxis[_i] = this.zData[_i].count;\n }\n\n var chartDom = document.getElementById('echarts');\n this.myChart = echarts.init(chartDom);\n var option = {\n title: {\n text: '故障统计次数'\n },\n tooltip: {},\n legend: {},\n xAxis: {\n data: xAxis\n },\n yAxis: {\n type: 'value'\n },\n series: [{\n name: '故障统计次数',\n type: 'bar',\n // 类型为柱状图\n data: yAxis,\n barWidth: '20%',\n // 柱条宽度 每个柱条的宽度就是类目宽度的 20%\n // 柱子的样式\n itemStyle: {\n color: '#5574c2'\n }\n }]\n };\n option && this.myChart.setOption(option);\n window.addEventListener('resize', function () {\n _this2.myChart.resize();\n });\n } // handleChange(e){\n // console.log(e)\n // this.getStatistics(this.curPage+1)\n // }\n\n }\n};",null]}