{"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\\statisticalReport\\maintenanceInspectionStatistics\\checkStatisticsOften.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\statisticalReport\\maintenanceInspectionStatistics\\checkStatisticsOften.vue","mtime":1718388789165},{"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.function.name\";\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\nimport utils from '@/utils'; // thousandBit格式化千分位\nvar BigNumber = require('bignumber.js');\nexport default {\n name: 'ManagementInfoStatistics',\n data: function data() {\n return {\n tableData: [],\n data: [],\n loading: false,\n total: {},\n utils: utils,\n searchForm: {\n startDate: new Date().getFullYear() + '-01-01',\n endDate: new Date().getFullYear() + '-12-31'\n },\n cissueDate: [],\n pickerOption: {\n disabledDate: function disabledDate(time) {\n return time.getTime() > Date.now();\n }\n }\n };\n },\n created: function created() {\n // 默认查询当年的数据\n // this.cissueDate = [\n // new Date().getFullYear() + '-01-01',\n // new Date().getFullYear() + '-12-31',\n // ]\n // this.searchForm = {\n // startDate: new Date().getFullYear() + '-01-01',\n // endDate: new Date().getFullYear() + '-12-31',\n // }\n this.findinfo();\n },\n methods: {\n reset: function reset() {\n this.cissueDate = [];\n this.searchForm = {\n startDate: new Date().getFullYear() + '-01-01',\n endDate: new Date().getFullYear() + '-12-31'\n };\n this.loadData();\n },\n handleTimeChange: function handleTimeChange(time) {\n this.searchForm.startDate = time[0];\n this.searchForm.endDate = time[1];\n },\n findinfo: function findinfo() {\n var obj = this.searchForm;\n var arr = [];\n for (var i in obj) {\n var str = null;\n str = i + '=' + obj[i];\n arr.push(str);\n }\n var querys = '?' + arr.join('&');\n this.loadData(querys);\n },\n calculation: function calculation(key, arr) {\n if (!key || arr.length === 0) return 0;\n var total = new BigNumber(0);\n arr.forEach(function (item) {\n if (!item[key]) {\n item[key] = 0;\n }\n // console.log(key + '=', item[key])\n total = total.plus(item[key]);\n });\n if (typeof total == 'undefined') return 0;\n return total.toNumber();\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.tableData = this.tableData.slice(0, this.tableData.length - 1);\n this.updata(this.tableData);\n this.tableData.push(this.total);\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: 'checkFrequently',\n params: {\n value: row\n }\n });\n }\n var len = row.chirldren.length;\n if (row.chirldren[len - 1].name == '总数') {\n row.chirldren.splice(len - 1, 1);\n }\n this.tableData = row.chirldren;\n this.updata(this.tableData);\n this.tableData.push(this.total);\n this.data.push(row.chirldren);\n },\n handleCellClick: function handleCellClick(row, column) {\n // this.cstatus = column.label\n },\n updata: function updata(newVal) {\n this.total.name = '总数';\n this.total.bridgeCount = this.calculation('bridgeCount', newVal);\n this.total.allCount = this.calculation('allCount', newVal);\n this.total.bridgeCheckCount = this.calculation('bridgeCheckCount', newVal);\n this.total.bridgeMonthCheckCount = this.calculation('bridgeMonthCheckCount', newVal);\n this.total.culvertMonthCheckCount = this.calculation('culvertMonthCheckCount', newVal);\n this.total.culvertCount = this.calculation('culvertCount', newVal);\n this.total.culvertCheckCount = this.calculation('culvertCheckCount', newVal);\n this.total.sideCount = this.calculation('sideCount', newVal);\n this.total.sideCheckCount = this.calculation('sideCheckCount', newVal);\n this.total.sideMonthCheckCount = this.calculation('sideMonthCheckCount', newVal);\n this.total.tunnelCount = this.calculation('tunnelCount', newVal);\n this.total.tunnelCheckCount = this.calculation('tunnelCheckCount', newVal);\n this.total.tunnelMonthCheckCount = this.calculation('tunnelMonthCheckCount', newVal);\n },\n loadData: function loadData(params) {\n var _this = this;\n if (!params) {\n params = '';\n }\n this.loading = true;\n this.$http.get('${yhxt}/bridgeOftenCheck/v1/checkReportVo' + params).then(function (res) {\n _this.tableData = res && res.status == 200 && res.data || [];\n _this.updata(_this.tableData);\n _this.tableData.push(_this.total);\n _this.data = [];\n _this.data.push(_this.tableData);\n _this.loading = false;\n }).catch(function () {\n _this.loading = false;\n });\n }\n }\n};",null]}