{"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\\children\\ManagementInfoStatistics.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\statisticalReport\\children\\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/es6.object.keys\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.array.find-index\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 basicData from '@/api/basicData.js';\nimport eipOrgSelector from '@/components/eipControl/selector/EipOrgSelector.vue';\nimport RoadInfoDialog from '@/components/dialog/RoadInfoDialog.vue';\nimport routerInfoSelector from '@/components/selector/routerInfoSelector.vue';\nimport CascaderCompany from \"../components/CascaderCompany_.vue\";\nexport default {\n components: {\n // eipOrgSelector,\n // RoadInfoDialog,\n // routerInfoSelector\n CascaderCompany: CascaderCompany\n },\n data: function data() {\n return {\n formInline: {\n companyIds: ['1419863231459102720', '1430734631036129280'],\n roadSegmentId: ''\n },\n tableData: [],\n roadOptions: [],\n //选取路段\n roadSegmentIds: ''\n };\n },\n created: function created() {\n this.getRoadInfo();\n },\n mounted: function mounted() {\n // this.load()\n this.companyChange(['1419863231459102720', '1430734631036129280']);\n },\n methods: {\n companyChange: function companyChange(val) {\n var _this = this;\n this.formInline = {\n companyIds: val\n };\n var id = val && val[val.length - 1] || '';\n if (!id) return;\n this.$http.get('${yhxt}/statisticalStatement/v1/findAllRoadIds?id=' + id).then(function (res) {\n var ids = res.data.value.join(',') || id || '';\n _this.roadSegmentIds = ids;\n if (!ids) {\n _this.tableData = [];\n } else {\n _this.load(ids);\n }\n });\n },\n getRoadInfo: function getRoadInfo() {\n var _this2 = this;\n basicData.getRoadManagement().then(function (res) {\n if (res.rows.length !== 0) {\n _this2.roadOptions = res.rows;\n var index = _this2.roadOptions.findIndex(function (item) {\n return item.id == _this2.$route.params.value.id;\n });\n var id = _this2.roadOptions[index].id;\n _this2.formInline = {\n roadSegmentId: id\n };\n _this2.load(id);\n }\n });\n },\n handleRoadChanged: function handleRoadChanged(id) {\n if (id) {\n this.load(id);\n } else {\n this.load(this.roadSegmentIds);\n }\n },\n // 数组去重\n duplicate: function duplicate(tempArr) {\n var result = [];\n var obj = {};\n for (var i = 0; i < tempArr.length; i++) {\n if (!obj[tempArr[i].orgName]) {\n result.push(tempArr[i]);\n obj[tempArr[i].orgName] = true;\n }\n }\n return result;\n },\n load: function load(roadSegmentId) {\n var _this3 = this;\n this.$http.post('${yhxt}/statisticalStatement/v1/maintainMessage', {\n roadSegmentId: roadSegmentId\n }).then(function (res) {\n // if (this.formInline.companyIds.length == 2) {\n var tableData = res.data.value;\n if (roadSegmentId.split(',').length === 10) {\n var arr = [];\n tableData.forEach(function (item, index) {\n var a = tableData.filter(function (c) {\n return c.orgName == item.orgName;\n });\n arr.push(a[0]);\n });\n var result = _this3.duplicate(arr);\n result.forEach(function (item) {\n item.children = [];\n tableData.forEach(function (e) {\n if (e.orgName == item.orgName && e.roadSegmentName != item.roadSegmentName) {\n item.children.push(e);\n }\n });\n });\n _this3.tableData = result;\n } else {\n var sortTableData = [];\n tableData.forEach(function (e) {\n if (e.roadSegmentName == '小计') {\n e.children = [];\n e.roadSegmentId = e.companyId;\n sortTableData.push(e);\n }\n });\n tableData.forEach(function (e) {\n sortTableData.forEach(function (item) {\n if (e.companyName == item.companyName && e.roadSegmentName != item.roadSegmentName) {\n // item.hasChildren = true\n item.children.push(e);\n }\n });\n });\n _this3.tableData = sortTableData;\n }\n\n // this.$set(this.tableData, sortTableData)\n console.log(_this3.tableData, 'this.tableData');\n // }else{\n // this.tableData = res.data.value\n // }\n // console.log(this.tableData)\n }).finally(function () {\n if (Object.keys(_this3.$route.params).length !== 0 && Object.keys(_this3.$route.params.value).length !== 0 && !_this3.isFindinfo) {\n _this3.isFindinfo = true;\n // console.log(this.$route.params)\n // let path = this.$route.params.value.path\n // let roadSegmentId = this.$route.params.value.id\n // this.formInline = {\n // roadSegmentId\n // }\n // path = path.split('.').slice(0, path.split('.').length - 1)\n // this.formInline.companyIds = path\n // this.companyChange(path)\n // this.load(roadSegmentId)\n }\n });\n },\n onSubmit: function onSubmit() {\n console.log('submit!');\n },\n //所属路段获取焦点触发事件\n handleFocusRoad: function handleFocusRoad() {\n this.$refs.road.open();\n },\n //所属路线打开弹框\n openRoad: function openRoad() {\n this.$refs.road.open();\n },\n //路线信息赋值\n changed: function changed(obj) {\n // console.log(obj)\n this.formInline.roadSegmentName = obj.name;\n this.formInline.roadSegmentId = obj.id;\n },\n value: function value(obj) {\n console.log(obj);\n this.formInline.roadSegmentName = obj.name;\n this.formInline.roadSegmentId = obj.id;\n },\n //公司赋值\n handleChanged: function handleChanged(obj) {\n // console.log(obj.valueInfo.join(','))\n this.formInline.companyIds = JSON.stringify(obj.valueInfo);\n this.formInline.companyName = obj.name;\n this.formInline.companyId = obj.id;\n },\n companyValue: function companyValue(obj) {\n // console.log(obj)\n this.formInline.companyName = obj.name;\n this.formInline.companyId = obj.id;\n this.formInline.companyIds = JSON.stringify(obj.id.split(' ')); //必须是空格\n }\n }\n};",null]}