{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\views\\maintenanceInspection\\maintenanceInspection.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\maintenanceInspection\\maintenanceInspection.vue","mtime":1719944004367},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/web.dom.iterable\";\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//\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//\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport utils from '@/utils'; // thousandBit格式化千分位\nvar BigNumber = require('bignumber.js');\nimport * as echarts from 'echarts';\nimport moment from 'moment';\nexport default {\n name: 'maintenanceInspection',\n data: function data() {\n return {\n tableData: [],\n data: [],\n startTime: moment().startOf('year').format('YYYY-MM-DD'),\n endTime: moment().endOf('year').format('YYYY-MM-DD'),\n loading: false,\n cstatus: '',\n date: '',\n total: {},\n utils: utils,\n formInline: {\n companyIds: ['1419863231459102720', '1430734631036129280'],\n companyName: '',\n roadSegmentName: ''\n }\n };\n },\n created: function created() {\n var moment = require('moment');\n var endDate = moment().endOf('year').format('YYYY-MM-DD');\n // 获取当前时间6个月前的时间\n var startDate = moment().startOf('year').format('YYYY-MM-DD');\n this.date = [startDate, endDate];\n this.startTime = startDate;\n this.endTime = endDate;\n this.loadData();\n },\n watch: {\n tableData: function tableData(newVal) {\n this.total.dayCount = this.calculation('dayCount', newVal);\n this.total.nightCount = this.calculation('nightCount', newVal);\n this.total.timeOutCount = this.calculation('timeOutCount', newVal);\n this.total.fristStepCount = this.calculation('fristStepCount', newVal);\n this.total.secondStepCount = this.calculation('secondStepCount', newVal);\n this.total.thirdStepCount = this.calculation('thirdStepCount', newVal);\n this.total.seventhStepCount = this.calculation('seventhStepCount', newVal);\n this.total.fourthStepCount = this.calculation('fourthStepCount', newVal);\n this.total.fifthStepCount = this.calculation('fifthStepCount', newVal);\n this.total.sixthStepCount = this.calculation('sixthStepCount', newVal);\n this.total.allCount = this.calculation('allCount', newVal);\n }\n },\n methods: {\n reset: function reset() {\n var moment = require('moment');\n var endDate = moment().endOf('year').format('YYYY-MM-DD');\n // 获取当前时间6个月前的时间\n var startDate = moment().startOf('year').format('YYYY-MM-DD');\n this.date = [startDate, endDate];\n this.startTime = startDate;\n this.endTime = endTime;\n this.loadData();\n },\n format: function format(data) {\n var total = 0;\n var money = 0;\n data.forEach(function (item) {\n total += Number(item.pnameCount);\n money += Number(item.everyMoney);\n });\n console.log(total);\n data.forEach(function (item) {\n item.percentage = item.pnameCount / total * 100;\n item.percent = Number((item.everyMoney / money * 100).toFixed(2));\n item.money = (Number(item.everyMoney) / 10000).toFixed(2);\n });\n },\n /**\r\n * @description: 获取当前日期n个月前的日期\r\n * @param {String} n 几个月(为负数则表示前面的日期)\r\n * @return: 日期\r\n */\n diffMonth: function diffMonth(n) {\n var dt = new Date();\n dt.setMonth(dt.getMonth() - Number(n));\n return dt.toLocaleString().replace(/\\//g, '-');\n },\n calculation: function calculation(key, arr) {\n var total = 0;\n if (!key || arr.length === 0) return total;\n arr.forEach(function (item) {\n total += parseInt(item[key]);\n });\n if (total === 0) return 0;\n return utils.thousandBit(total);\n },\n calculationWY: function calculationWY(key, arr) {\n var total = 0;\n if (!key || arr.length === 0) return total;\n arr.forEach(function (item) {\n total += parseFloat((item[key] / 10000).toFixed(4)) * 10000;\n });\n if (total === 0) return 0;\n return utils.thousandBit(parseFloat((total / 10000).toFixed(4)));\n },\n changeYear: function changeYear(val) {\n var _this = this;\n if (!val) {\n return this.loadData();\n }\n this.loading = true;\n this.$http.post('${yhxt}/siteInspection/v1/getSiteCountvo' + \"?startDate=\".concat(val[0], \"&endDate=\").concat(val[1])).then(function (res) {\n _this.tableData = res && res.status == 200 && res.data || [];\n _this.data = [];\n _this.data.push(_this.tableData);\n _this.loading = false;\n });\n },\n findinfo: function findinfo() {\n var _this2 = this;\n var val = this.date;\n this.loading = true;\n this.$http.post('${yhxt}/siteInspection/v1/getSiteCountvo' + \"?startDate=\".concat(this.startTime, \"&endDate=\").concat(this.endTime)).then(function (res) {\n _this2.tableData = res && res.status == 200 && res.data || [];\n _this2.data = [];\n _this2.data.push(_this2.tableData);\n _this2.loading = false;\n });\n },\n handleReset: function handleReset() {\n var length = this.data.length - 1;\n if (length === 0) return;\n this.tableData = this.data[this.data.length - 2];\n this.data.splice(length, 1);\n },\n hanldeRowClick: function hanldeRowClick(row) {\n if (row.chirldren.length == 0) {\n return this.$router.push({\n name: 'taskManagement',\n params: {\n value: row,\n cstatus: this.cstatus\n }\n });\n }\n this.tableData = row.chirldren;\n this.data.push(row.chirldren);\n },\n handleCellClick: function handleCellClick(row, column) {\n this.cstatus = column.columnKey;\n },\n loadData: function loadData() {\n var _this3 = this;\n this.loading = true;\n var str = '';\n if (this.date) {\n str = \"?startDate=\".concat(this.date[0], \"&endDate=\").concat(this.date[1]);\n }\n this.$http.post('${yhxt}/siteInspection/v1/getSiteCountvo' + str).then(function (res) {\n _this3.tableData = res && res.status == 200 && res.data || [];\n _this3.data = [];\n _this3.data.push(_this3.tableData);\n _this3.loading = false;\n }).catch(function () {\n _this3.loading = false;\n });\n }\n }\n};",null]}