{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\otherMonitor\\waterPointContrast.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\otherMonitor\\waterPointContrast.vue","mtime":1684458239309},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"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":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.replace\";\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//\nimport req from '@/request.js';\nimport * as echarts from 'echarts';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport waterPointContrast from '@/api/monitor/otherMonitor/waterPointContrast.js';\nimport CYearWaterPoint from \"./components/CYearWaterPoint.vue\";\nimport CMonthWaterPoint from \"./components/CMonthWaterPoint.vue\";\nimport CDateWaterPoint from \"./components/CDateWaterPoint.vue\";\nexport default {\n name: 'waterPointContrast',\n components: {\n CYearWaterPoint: CYearWaterPoint,\n CMonthWaterPoint: CMonthWaterPoint,\n CDateWaterPoint: CDateWaterPoint\n },\n data: function data() {\n return {\n startDatePicker: this.beginDate(),\n endDatePicker: this.processDate(),\n yeartsStart: '',\n yeartsEnd: '',\n monthValue: '',\n dateValue: '',\n yearEchart: null,\n monthEchart: null,\n dateEchart: null,\n parmas: {\n timeLine: [],\n type: ''\n },\n monthList: [],\n yearList: [],\n dateList: []\n };\n },\n created: function created() {\n this.initialize();\n },\n mounted: function mounted() {\n var _this = this;\n\n this.yearEcharts();\n this.monthEcharts();\n this.dateEcharts();\n this.$root.$on('resize', function () {\n _this.resize(500);\n });\n },\n methods: {\n resize: function resize(delay) {\n var _this2 = this;\n\n // 动态计算表格的高度,自适应当前容器\n setTimeout(function () {\n _this2.yearEchart.resize();\n\n _this2.monthEchart.resize();\n\n _this2.dateEchart.resize();\n }, delay || 0);\n },\n initialize: function initialize() {\n var moment = require('moment'); //打开时默认时间为一天前至获取当前年月日时分秒\n\n\n var endTime = moment().format('YYYY-MM-DD 23:59:59'); //当前年月日\n\n var January = moment(new Date().getFullYear() + \"-\" + \"01\").format('YYYY-MM-DD 00:00:00'); //当年一月\n\n var monthOne = moment().startOf('month').format('YYYY-MM-DD 00:00:00'); //当月第一天\n\n var oneYearTime = moment(new Date()).subtract(1, 'years').format('YYYY-MM-DD 00:00:00'); //前一月\n\n var oneEonthTime = moment(new Date()).subtract(1, 'months').format('YYYY-MM-DD 00:00:00'); //前一月\n\n var oneDayTime = moment(new Date()).subtract(1, 'day').format('YYYY-MM-DD 00:00:00'); //前一天\n\n this.yeartsStart = oneYearTime;\n this.yeartsEnd = endTime;\n this.monthValue = [January, endTime];\n this.dateValue = [monthOne, endTime];\n this.yearChange();\n this.monthChange();\n this.dateChange();\n },\n yearChange: function yearChange(val) {\n var _this3 = this;\n\n var times = [];\n\n if (val) {\n if (this.yeartsStart.length == 4 && this.yeartsEnd.length == 19) {\n times = [this.yeartsStart + '-01-01 00:00:00', this.yeartsEnd];\n } else if (this.yeartsEnd.length == 4 && this.yeartsStart.length == 19) {\n times = [this.yeartsStart, this.yeartsEnd + '-12-31 23:59:59'];\n } else if (this.yeartsEnd.length == 4 && this.yeartsStart.length == 4) {\n times = [this.yeartsStart + '-01-01 00:00:00', this.yeartsEnd + '-12-31 23:59:59'];\n }\n } else {\n times = [this.yeartsStart, this.yeartsEnd];\n }\n\n var parmas = {\n timeLine: times,\n type: 'yyyy'\n };\n waterPointContrast.stationStatistics(parmas, function (res) {\n if (res.state) {\n _this3.yearList = res.value;\n\n _this3.$nextTick(function () {\n _this3.yearEcharts();\n });\n }\n });\n },\n monthChange: function monthChange(val) {\n var _this4 = this;\n\n this.monthValue[1] = this.createEndTime(this.monthValue[1]);\n var parmas = {\n timeLine: this.monthValue,\n type: 'yyyy-MM'\n };\n waterPointContrast.stationStatistics(parmas, function (res) {\n if (res.state) {\n _this4.monthList = res.value;\n\n _this4.$nextTick(function () {\n _this4.monthEcharts();\n });\n }\n });\n },\n dateChange: function dateChange(val) {\n var _this5 = this;\n\n this.dateValue[1] = this.dateValue[1].replace('00:00:00', '23:59:59');\n console.log(this.dateValue);\n var parmas = {\n timeLine: this.dateValue,\n type: 'yyyy-MM-dd'\n };\n waterPointContrast.stationStatistics(parmas, function (res) {\n if (res.state) {\n _this5.dateList = res.value;\n\n _this5.$nextTick(function () {\n _this5.dateEcharts();\n });\n }\n });\n },\n createEndTime: function createEndTime(startTimeString) {\n var moment = require('moment'); //打开时默认时间为一天前至获取当前年月日时分秒\n\n\n var currDate = moment(startTimeString);\n var date = new Date(parseInt(currDate.endOf(\"month\").valueOf()));\n var Y = date.getFullYear() + '-';\n var M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) + '-' : date.getMonth() + 1 + '-';\n var D = date.getDate() < 10 ? '0' + date.getDate() + ' ' : date.getDate() + ' ';\n return Y + M + D + '23:59:59';\n },\n getData: function getData() {\n var _this6 = this;\n\n waterPointContrast.stationStatistics(this.parmas, function (res) {\n if (res.state) {\n if (_this6.parmas.type == 'yyyy') {\n _this6.yearList = res.value;\n } else if (_this6.parmas.type == 'yyyy-MM') {\n _this6.monthList = res.value;\n } else if (_this6.parmas.type == 'yyyy-MM-dd') {\n _this6.dateList = res.value;\n }\n\n _this6.$nextTick(function () {\n _this6.yearEcharts();\n\n _this6.monthEcharts();\n\n _this6.dateEcharts();\n });\n }\n });\n },\n beginDate: function beginDate() {\n var self = this;\n return {\n disabledDate: function disabledDate(time) {\n if (self.yeartsEnd !== '') {\n var fixedTime = new Date(time);\n return fixedTime.getFullYear() > self.yeartsEnd;\n }\n }\n };\n },\n // 提出结束时间必须大于提出开始时间\n processDate: function processDate() {\n var self = this;\n return {\n disabledDate: function disabledDate(time) {\n var fixedTime = new Date(time);\n return fixedTime.getFullYear() < self.yeartsStart;\n }\n };\n },\n startTime: function startTime(val) {},\n yearEcharts: function yearEcharts() {\n var _this7 = this;\n\n var times = [];\n var ANum = [];\n var BNum = [];\n this.yearList.forEach(function (e) {\n times.push(e.x);\n ANum.push(e.ychain.last);\n BNum.push(e.ychain.current);\n });\n var chartDom = document.getElementById('yearEcharts');\n this.yearEchart = echarts.init(chartDom);\n var option = {\n grid: {\n top: 35,\n left: 70 // 调整这个属性\n\n },\n xAxis: {\n type: 'category',\n data: times\n },\n legend: {\n show: true,\n data: ['当前', '环比']\n },\n yAxis: {\n name: '万m³',\n type: 'value'\n },\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n type: 'shadow'\n }\n },\n series: [{\n name: '当前',\n data: BNum,\n type: 'bar',\n color: \"#91CC75\"\n }, {\n name: '环比',\n data: ANum,\n type: 'bar',\n color: \"#FFB938\"\n }]\n };\n option && this.yearEchart.setOption(option); // 点击事件\n\n this.yearEchart.on('click', function (parmas) {\n _this7.$refs.CYearWaterPoint.handleOpen(parmas.name);\n\n console.log(parmas.name); // console.log(parmas);\n });\n },\n monthEcharts: function monthEcharts() {\n var _this8 = this;\n\n var times = [];\n var ANum = [];\n var BNum = [];\n this.monthList.forEach(function (e) {\n times.push(e.x);\n ANum.push(e.ychain.last);\n BNum.push(e.ychain.current);\n });\n var chartDom = document.getElementById('monthEcharts');\n this.monthEchart = echarts.init(chartDom);\n var option = {\n grid: {\n top: 35,\n left: 70 // 调整这个属性\n\n },\n xAxis: {\n type: 'category',\n data: times\n },\n legend: {\n show: true,\n data: ['当前', '环比']\n },\n yAxis: {\n name: '万m³',\n type: 'value'\n },\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n type: 'shadow'\n }\n },\n series: [{\n name: '当前',\n data: BNum,\n type: 'bar',\n color: \"#91CC75\"\n }, {\n name: '环比',\n data: ANum,\n type: 'bar',\n color: \"#FFB938\"\n }]\n };\n option && this.monthEchart.setOption(option); // 点击事件\n\n this.monthEchart.on('click', function (parmas) {\n _this8.$refs.CMonthWaterPoint.handleOpen(parmas.name);\n\n console.log(parmas.name); // console.log(parmas);\n });\n },\n dateEcharts: function dateEcharts() {\n var _this9 = this;\n\n var times = [];\n var ANum = [];\n var BNum = [];\n this.dateList.forEach(function (e) {\n times.push(e.x);\n ANum.push(e.ychain.last);\n BNum.push(e.ychain.current);\n });\n var chartDom = document.getElementById('dateEcharts');\n this.dateEchart = echarts.init(chartDom);\n var option = {\n grid: {\n top: 35,\n left: 60,\n // 调整这个属性\n right: 60\n },\n legend: {\n show: true,\n data: ['当前', '环比']\n },\n xAxis: {\n type: 'category',\n data: times\n },\n yAxis: {\n name: '万m³',\n type: 'value'\n },\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n type: 'shadow'\n }\n },\n series: [{\n name: '当前',\n data: BNum,\n type: 'bar',\n color: \"#91CC75\"\n }, {\n name: '环比',\n data: ANum,\n type: 'bar',\n color: \"#FFB938\"\n }]\n };\n option && this.dateEchart.setOption(option); // 点击事件\n\n this.dateEchart.on('click', function (parmas) {\n _this9.$refs.CDateWaterPoint.handleOpen(parmas.name);\n\n console.log(parmas.name);\n });\n }\n }\n};",null]}