{"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\\dailyMaintenance\\overdueWorkOrders.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\dailyMaintenance\\overdueWorkOrders.vue","mtime":1735064047746},{"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/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/es6.regexp.split\";\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');\nexport default {\n name: 'DailyMaintenance',\n data: function data() {\n return {\n tableData: [],\n data: [],\n startTime: this.diffMonth(6).split(' ')[0],\n endTime: utils.formatDate(new Date()).split(' ')[0],\n loading: false,\n cstatus: '',\n date: '',\n total: {},\n utils: utils,\n path: '1419863231459102720,'\n };\n },\n created: function created() {\n var endDate = utils.formatDate(new Date()).split(' ')[0];\n // 获取当前时间6个月前的时间\n var startDate = this.diffMonth(6).split(' ')[0];\n this.date = [startDate, endDate];\n this.loadData();\n },\n watch: {\n tableData: function tableData(newVal) {\n this.total.allCount = this.calculation('allCount', newVal);\n this.total.overdueCount = this.calculation('overdueCount', newVal);\n }\n },\n methods: {\n reset: function reset() {\n this.date = '';\n this.startTime = '';\n this.endTime = '';\n this.loadData();\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 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}/workOrderInformation/v1/getWorkTimeOutCountVo' + \"?startDate=\".concat(this.startTime, \"&endDate=\").concat(this.endTime)).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 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 console.log(this.date, 'this.date');\n if (row.chirldren.length == 0 && row.roadId) {\n this.path += row.roadId;\n return this.$router.push({\n name: 'overdueWorkOrdersChildren',\n params: {\n value: row,\n cstatus: this.cstatus,\n date: this.date,\n startTime: this.startTime,\n endTime: this.endTime,\n path: this.path\n }\n });\n } else {\n this.path += row.id + ',';\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 _this2 = this;\n this.loading = true;\n var str = '';\n if (this.startTime || this.endTime) {\n str = \"?startDate=\".concat(this.startTime, \"&endDate=\").concat(this.endTime);\n }\n this.$http.post('${yhxt}/workOrderInformation/v1/getWorkTimeOutCountVo' + str).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 }).catch(function () {\n _this2.loading = false;\n });\n },\n //查询\n handleSearch: function handleSearch() {\n this.date = [this.startTime, this.endTime];\n this.loadData();\n }\n }\n};",null]}