{"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\\ManagementInfoStatistics.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\statisticalReport\\ManagementInfoStatistics.vue","mtime":1706175429381},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 };\n },\n created: function created() {\n this.loadData();\n },\n watch: {\n // tableData(newVal) {\n // this.total.name = '总数'\n // this.total.bigBridgeCount = this.calculation('bigBridgeCount', newVal)\n // this.total.bigBridgeLinearMeter = this.calculation(\n // 'bigBridgeLinearMeter',\n // newVal\n // )\n // this.total.bigBridgeSingleCount = this.calculation(\n // 'bigBridgeSingleCount',\n // newVal\n // )\n // this.total.bigTunnelCount = this.calculation('bigTunnelCount', newVal)\n // this.total.bigTunnelLinearMeter = this.calculation(\n // 'bigTunnelLinearMeter',\n // newVal\n // )\n // this.total.bigTunnelSingleCount = this.calculation(\n // 'bigTunnelSingleCount',\n // newVal\n // )\n // this.total.bridgeCount = this.calculation('bridgeCount', newVal)\n // this.total.bridgeLinearMeter = this.calculation(\n // 'bridgeLinearMeter',\n // newVal\n // )\n // this.total.bridgeSingleCount = this.calculation(\n // 'bridgeSingleCount',\n // newVal\n // )\n // this.total.culvertCount = this.calculation('culvertCount', newVal)\n // this.total.extraBigBridgeCount = this.calculation(\n // 'extraBigBridgeCount',\n // newVal\n // )\n // this.total.extraBigBridgeLinearMeter = this.calculation(\n // 'extraBigBridgeLinearMeter',\n // newVal\n // )\n // this.total.extraBigBridgeSingleCount = this.calculation(\n // 'extraBigBridgeSingleCount',\n // newVal\n // )\n // this.total.extraBigTunnelCount = this.calculation(\n // 'extraBigTunnelCount',\n // newVal\n // )\n // this.total.extraBigTunnelLinearMeter = this.calculation(\n // 'extraBigTunnelLinearMeter',\n // newVal\n // )\n // this.total.extraBigTunnelSingleCount = this.calculation(\n // 'extraBigTunnelSingleCount',\n // newVal\n // )\n // this.total.middleBridgeCount = this.calculation(\n // 'middleBridgeCount',\n // newVal\n // )\n // this.total.middleBridgeLinearMeter = this.calculation(\n // 'middleBridgeLinearMeter',\n // newVal\n // )\n // this.total.middleBridgeSingleCount = this.calculation(\n // 'middleBridgeSingleCount',\n // newVal\n // )\n // this.total.middleTunnelCount = this.calculation(\n // 'middleTunnelCount',\n // newVal\n // )\n // this.total.middleTunnelLinearMeter = this.calculation(\n // 'middleTunnelLinearMeter',\n // newVal\n // )\n // this.total.middleTunnelSingleCount = this.calculation(\n // 'middleTunnelSingleCount',\n // newVal\n // )\n // this.total.sideSlopeCount = this.calculation('sideSlopeCount', newVal)\n // this.total.smallBridgeCount = this.calculation('smallBridgeCount', newVal)\n // this.total.smallBridgeLinearMeter = this.calculation(\n // 'smallBridgeLinearMeter',\n // newVal\n // )\n // this.total.smallBridgeSingleCount = this.calculation(\n // 'smallBridgeSingleCount',\n // newVal\n // )\n // this.total.smallTunnelCount = this.calculation('smallTunnelCount', newVal)\n // this.total.smallTunnelLinearMeter = this.calculation(\n // 'smallTunnelLinearMeter',\n // newVal\n // )\n // this.total.smallTunnelSingleCount = this.calculation(\n // 'smallTunnelSingleCount',\n // newVal\n // )\n // this.total.tunnelCount = this.calculation('tunnelCount', newVal)\n // this.total.tunnelLinearMeter = this.calculation(\n // 'tunnelLinearMeter',\n // newVal\n // )\n // this.total.tunnelSingleCount = this.calculation(\n // 'tunnelSingleCount',\n // newVal\n // )\n // },\n },\n methods: {\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: 'managementInfoStatisticsChildren',\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.bigBridgeCount = this.calculation('bigBridgeCount', newVal);\n this.total.bigBridgeLinearMeter = this.calculation('bigBridgeLinearMeter', newVal);\n this.total.bigBridgeSingleCount = this.calculation('bigBridgeSingleCount', newVal);\n this.total.bigTunnelCount = this.calculation('bigTunnelCount', newVal);\n this.total.bigTunnelLinearMeter = this.calculation('bigTunnelLinearMeter', newVal);\n this.total.bigTunnelSingleCount = this.calculation('bigTunnelSingleCount', newVal);\n this.total.bridgeCount = this.calculation('bridgeCount', newVal);\n this.total.bridgeLinearMeter = this.calculation('bridgeLinearMeter', newVal);\n this.total.bridgeSingleCount = this.calculation('bridgeSingleCount', newVal);\n this.total.culvertCount = this.calculation('culvertCount', newVal);\n this.total.extraBigBridgeCount = this.calculation('extraBigBridgeCount', newVal);\n this.total.extraBigBridgeLinearMeter = this.calculation('extraBigBridgeLinearMeter', newVal);\n this.total.extraBigBridgeSingleCount = this.calculation('extraBigBridgeSingleCount', newVal);\n this.total.extraBigTunnelCount = this.calculation('extraBigTunnelCount', newVal);\n this.total.extraBigTunnelLinearMeter = this.calculation('extraBigTunnelLinearMeter', newVal);\n this.total.extraBigTunnelSingleCount = this.calculation('extraBigTunnelSingleCount', newVal);\n this.total.middleBridgeCount = this.calculation('middleBridgeCount', newVal);\n this.total.middleBridgeLinearMeter = this.calculation('middleBridgeLinearMeter', newVal);\n this.total.middleBridgeSingleCount = this.calculation('middleBridgeSingleCount', newVal);\n this.total.middleTunnelCount = this.calculation('middleTunnelCount', newVal);\n this.total.middleTunnelLinearMeter = this.calculation('middleTunnelLinearMeter', newVal);\n this.total.middleTunnelSingleCount = this.calculation('middleTunnelSingleCount', newVal);\n this.total.sideSlopeCount = this.calculation('sideSlopeCount', newVal);\n this.total.smallBridgeCount = this.calculation('smallBridgeCount', newVal);\n this.total.smallBridgeLinearMeter = this.calculation('smallBridgeLinearMeter', newVal);\n this.total.smallBridgeSingleCount = this.calculation('smallBridgeSingleCount', newVal);\n this.total.smallTunnelCount = this.calculation('smallTunnelCount', newVal);\n this.total.smallTunnelLinearMeter = this.calculation('smallTunnelLinearMeter', newVal);\n this.total.smallTunnelSingleCount = this.calculation('smallTunnelSingleCount', newVal);\n this.total.tunnelCount = this.calculation('tunnelCount', newVal);\n this.total.tunnelLinearMeter = this.calculation('tunnelLinearMeter', newVal);\n this.total.tunnelSingleCount = this.calculation('tunnelSingleCount', newVal);\n },\n loadData: function loadData() {\n var _this = this;\n this.loading = true;\n this.$http.post('${yhxt}/statisticalStatement/v1/getMessageCountVo').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]}