{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\otherMonitor\\components\\CMonthWaterPoint.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\otherMonitor\\components\\CMonthWaterPoint.vue","mtime":1684458239277},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport * as echarts from 'echarts'\r\nimport waterPointContrast from '@/api/monitor/otherMonitor/waterPointContrast.js'\r\nexport default {\r\n name: 'MonthWaterPoint',\r\n data() {\r\n return {\r\n showFormDias: false,\r\n title: '',\r\n parmas: {\r\n subTime: \"\",\r\n type: \"yyyy-MM\"\r\n\r\n },\r\n monthEchart: null,\r\n monthList: []\r\n }\r\n\r\n },\r\n created() {\r\n },\r\n mounted() {\r\n this.monthEcharts()\r\n },\r\n methods: {\r\n handleOpen(moth) {\r\n this.showFormDias = true\r\n this.title = moth\r\n this.parmas.subTime = moth\r\n this.getData()\r\n },\r\n handleClose() {\r\n this.showFormDias = false\r\n this.title = \"\"\r\n },\r\n getData() {\r\n waterPointContrast.stationStatisticsSub(this.parmas, res => {\r\n if (res.state) {\r\n // console.log(res.value);\r\n this.monthList = res.value\r\n this.$nextTick(() => {\r\n this.monthEcharts()\r\n })\r\n }\r\n })\r\n },\r\n monthEcharts() {\r\n let times = []\r\n let ANum = []\r\n let BNum = []\r\n this.monthList.forEach(e => {\r\n times.push(e.x)\r\n ANum.push(e.ychain.last)\r\n BNum.push(e.ychain.current)\r\n })\r\n if (this.monthEchart != null && this.monthEchart != \"\" && this.monthEchart != undefined) {\r\n this.monthEchart.dispose();//销毁\r\n }\r\n // let chartDom = document.getElementById('echartsBox')\r\n this.monthEchart = echarts.init(this.$refs.box)\r\n let option = {\r\n grid: {\r\n top: 30,\r\n },\r\n xAxis: {\r\n type: 'category',\r\n data: times\r\n },\r\n\t\t\t\tlegend: {\r\n\t\t\t\t\tshow: true,\r\n\t\t\t\t\tdata: ['当前', '环比'],\r\n\t\t\t\t},\r\n yAxis: {\r\n name: '万m³',\r\n type: 'value'\r\n },\r\n tooltip: {\r\n trigger: 'axis',\r\n axisPointer: {\r\n type: 'shadow'\r\n }\r\n },\r\n series: [{\r\n\t\t\t\t\t\tname: '当前',\r\n\t\t\t\t\t\tdata: BNum,\r\n\t\t\t\t\t\ttype: 'bar',\r\n\t\t\t\t\t\tcolor: \"#91CC75\",\r\n\t\t\t\t\t}, {\r\n\t\t\t\t\t\tname: '环比',\r\n\t\t\t\t\t\tdata: ANum,\r\n\t\t\t\t\t\ttype: 'bar',\r\n\t\t\t\t\t\tcolor: \"#FFB938\",\r\n\t\t\t\t\t}]\r\n };\r\n option && this.monthEchart.setOption(option)\r\n },\r\n }\r\n}\r\n",null]}