{"remainingRequest":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js??ref--0-0!/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/test-v5inweb-5.x-vue/src/components/main_meter.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/src/components/main_meter.vue","mtime":1739760944318},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/babel.config.js","mtime":1739760943855},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":315532800000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":1655715099000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.array.fill\";\nimport _defineProperty from \"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/@babel/runtime-corejs2/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.function.name\";\nvar echarts = require('echarts/lib/echarts');\n// 引入柱状图组件\nrequire('echarts/lib/chart/bar');\n// 引入提示框和title组件\nrequire('echarts/lib/component/tooltip');\nrequire('echarts/lib/component/title');\n//import echarts from 'echarts';\nexport default {\n inject: [\"reload\"],\n components: {},\n watch: {\n chartData: function chartData() {\n var _this = this;\n this.$nextTick(function () {\n var datas = _this.chartData;\n _this.drawLine(datas);\n });\n }\n },\n data: function data() {\n var _this2 = this;\n return _defineProperty(_defineProperty({\n showMode: false,\n startDay: \"\",\n endDay: \"\",\n options: [],\n status: '',\n chartData: '',\n selectData: [{\n name: this.$t('view.finish'),\n id: 1\n }, {\n name: this.$t('view.no_finish'),\n id: 0\n }],\n select: 1,\n pickerOptions1: {\n disabledDate: function disabledDate(time) {\n var endField;\n var fields = _this2.$parent.getAllFields();\n if (fields) for (var i = 0; i < fields.length; i++) {\n if (fields[i].prev_Name == _this2.field.name) {\n endField = fields[i];\n break;\n }\n }\n if (endField) {\n return new Date(endField.value).getTime() < time.getTime();\n }\n return false;\n }\n }\n }, \"pickerOptions1\", {\n disabledDate: function disabledDate(time) {\n return new Date(_this2.endDay).getTime() < time.getTime();\n }\n }), \"pickerOptions2\", {\n disabledDate: function disabledDate(time) {\n return new Date(_this2.startDay).getTime() > time.getTime();\n }\n });\n },\n mounted: function mounted() {\n this.getConsuming();\n },\n created: function created() {\n this.getApplications();\n this.setTime();\n },\n methods: {\n search: function search() {\n var _this3 = this;\n var appId = this.$root.appid;\n var data = {\n application: appId,\n dateRange: \"\",\n enddate: this.writeCurrentDate(this.endDay),\n select: this.select,\n showMode: this.showMode ? 'all' : 'mine',\n startdate: this.writeCurrentDate(this.startDay)\n };\n this.$api.getConsuming(appId, data, {\n onSucess: function onSucess(res) {\n _this3.chartData = res.data.data;\n _this3.$forceUpdate();\n }\n });\n },\n //日期格式转换\n writeCurrentDate: function writeCurrentDate(val) {\n var day = new Date(val);\n var year = day.getFullYear();\n var Month = day.getMonth() + 1;\n var Day = day.getDate();\n Month = Month >= 10 ? Month : \"0\" + Month;\n Day = Day >= 10 ? Day : \"0\" + Day;\n var s = year + \"-\" + Month + \"-\" + Day;\n return s;\n },\n setTime: function setTime() {\n this.startDay = this.getCurrentMonthFirst();\n this.endDay = this.getCurrentMonthLast();\n },\n handleCheckChange: function handleCheckChange() {\n var _this4 = this;\n var startTime = this.writeCurrentDate(this.startDay),\n endTime = this.writeCurrentDate(this.endDay);\n var appId = this.$root.appid;\n var data = {\n application: appId,\n dateRange: \"\",\n enddate: endTime,\n select: this.select,\n showMode: this.showMode ? 'all' : 'mine',\n startdate: startTime\n };\n this.$api.getConsuming(appId, data, {\n onSucess: function onSucess(res) {\n _this4.chartData = res.data.data;\n _this4.$forceUpdate();\n }\n });\n },\n drawLine: function drawLine(datas) {\n if (datas[0].echart.yAxis != \"\") {\n var myChart = this.$echarts.init(this.$refs.myChart);\n var dataNums = datas[0].echart.num;\n var dataLg = dataNums.length;\n var dataNames = datas[0].echart.xAxis;\n var seriesData = [];\n var serie = {};\n var yAxis = datas[0].echart.yAxis;\n for (var i = 0; i < dataLg; i++) {\n var data = new Array(dataLg).fill(0); //新建数组\n data[i] = dataNums[i];\n serie = {\n name: dataNames[i],\n type: 'bar',\n barCategoryGap: '60%',\n barGap: '-100%',\n data: datas[0].echart.yAxis\n };\n seriesData.push(serie);\n }\n myChart.setOption({\n title: {\n text: this.$t('flow.use_time'),\n x: 'center'\n },\n tooltip: {\n trigger: 'item'\n },\n legend: {\n data: datas[0].echart.xAxis,\n y: 'bottom'\n },\n grid: {\n x: 50,\n y: 30,\n x2: 15,\n y2: 60\n },\n calculable: true,\n xAxis: [{\n show: false,\n type: 'category',\n data: datas[0].echart.xAxis\n }],\n yAxis: [{\n type: 'value',\n axisLabel: {\n formatter: '{value} h'\n }\n }],\n series: seriesData\n });\n var seriesData2 = [];\n var serie2 = {};\n for (var i = 0; i < dataLg; i++) {\n var data = new Array(dataLg).fill(0); //新建数组\n data[i] = dataNums[i];\n serie2 = {\n name: dataNames[i],\n type: 'bar',\n barCategoryGap: '60%',\n barGap: '-100%',\n data: data\n };\n seriesData2.push(serie2);\n }\n\n //第二个\n var myChart = this.$echarts.init(this.$refs.bar); //ec.init(document.getElementById('bar'));\n var option = {\n title: {\n text: this.$t('flow.num'),\n x: 'center'\n },\n tooltip: {\n trigger: 'item'\n },\n legend: {\n data: datas[0].echart.xAxis,\n y: 'bottom'\n },\n grid: {\n x: 50,\n y: 30,\n x2: 15,\n y2: 60\n },\n calculable: true,\n yAxis: [{\n type: 'value',\n boundaryGap: [0, 0],\n axisLabel: {\n formatter: '{value}个'\n }\n }],\n xAxis: [{\n show: false,\n type: 'category',\n data: datas[0].echart.xAxis\n }],\n series: seriesData2\n };\n myChart.setOption(option);\n } else {\n this.initchart();\n }\n },\n initchart: function initchart() {\n var myChart = this.$echarts.init(this.$refs.myChart);\n myChart.setOption({\n title: {\n text: this.$t('flow.use_time'),\n x: 'center'\n },\n tooltip: {\n trigger: 'item'\n },\n grid: {\n x: 50,\n y: 25,\n x2: 15,\n y2: 35\n },\n calculable: true,\n xAxis: [{\n type: 'category',\n data: [0, 0]\n }],\n yAxis: [{\n type: 'value'\n }],\n series: [{\n type: 'bar',\n barCategoryGap: '60%',\n data: [0, 0]\n }]\n }, true);\n var myChart = this.$echarts.init(this.$refs.bar);\n myChart.setOption({\n title: {\n text: this.$t('flow.num'),\n x: 'center'\n },\n tooltip: {\n trigger: 'item'\n },\n grid: {\n x: 50,\n y: 25,\n x2: 15,\n y2: 35\n },\n calculable: true,\n xAxis: [{\n type: 'value',\n boundaryGap: [0, 0.01]\n }],\n yAxis: [{\n type: 'category',\n data: [0, 0]\n }],\n series: [{\n type: 'bar',\n barCategoryGap: '60%',\n data: [0, 0]\n }]\n }, true);\n },\n getConsuming: function getConsuming() {\n var _this5 = this;\n var startTime = this.getCurrentMonthFirst(),\n endTime = this.getCurrentMonthLast();\n var appId = this.status ? this.status : this.$root.appid;\n var data = {\n application: appId,\n dateRange: \"\",\n enddate: endTime,\n select: this.select,\n showMode: \"mine\",\n startdate: startTime\n };\n this.$api.getConsuming(appId, data, {\n onSucess: function onSucess(res) {\n _this5.chartData = res.data.data;\n }\n });\n },\n getApplications: function getApplications() {\n var _this6 = this;\n this.$api.getApplications({\n onSucess: function onSucess(res) {\n //this.options = res.data.data.applications;\n var arr = [];\n res.data.data.applications.forEach(function (app) {\n if (app.id != \"km\" && app.id != \"pm\" && app.id != \"qm\") {\n arr.push(app);\n }\n });\n _this6.status = arr[0].id;\n _this6.options = arr;\n\n // for(let i = 0; i