{"remainingRequest":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\Normal\\components\\cascaderCompany.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\Normal\\components\\cascaderCompany.vue","mtime":1701284905356},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import _toConsumableArray from \"D:/jenkins/workspace/sfz-lh-fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\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//\nexport default {\n props: {\n placeholder: {\n type: String,\n default: '请选择'\n },\n companyId: {\n type: Array,\n default: function _default() {\n return ['1419863231459102720'];\n }\n }\n },\n data: function data() {\n return {\n options: [],\n // orgData.list,\n value: ['1419863231459102720'],\n companyIds: [],\n roadSegmentId: ''\n };\n },\n watch: {\n companyId: function companyId(newVal) {\n this.value = newVal;\n }\n },\n created: function created() {\n this.loadData();\n },\n methods: {\n loadData: function loadData() {\n var _this = this;\n\n this.$http.get('${portal}/bizRoadSection/v1/roadTree').then(function (res) {\n var data = res && res.status == 200 && res.data || [];\n\n _this.deepSetChildren(data); // 设置路段的children为null\n\n\n _this.options = [{\n isDelete: '0',\n id: '1419863231459102720',\n name: '全国',\n parentId: '0',\n code: '10',\n grade: '1',\n orgKind: 'ogn',\n demId: '1258608622670319616',\n orderNo: 145,\n isMaster: 0,\n path: '1258608622670319616.1419863231459102720.',\n pathName: '/中铁建昆仑投资集团',\n limitNum: 0,\n exceedLimitNum: 0,\n disabled: false,\n chirldren: data\n }];\n });\n },\n deepSetChildren: function deepSetChildren(data) {\n var _this2 = this;\n\n data.forEach(function (i) {\n var child = i.chirldren;\n\n if (child && child.length !== 0) {\n return _this2.deepSetChildren(child);\n } else {\n i.chirldren = null;\n }\n });\n return data;\n },\n handleCascaderChange: function handleCascaderChange(val) {\n var result = []; // 如果选中全国 那么就是查全部 不需要传参数\n\n if (val.length == 1) {\n result = '';\n } else if (val.length == 4) {\n var selectedList = this.$refs.cascader.getCheckedNodes();\n result = [selectedList[0].data.roadSegmentId];\n } else {\n var _selectedList = this.$refs.cascader.getCheckedNodes();\n\n result = this.getChildNodeId(_selectedList);\n }\n\n this.$emit('change', result);\n },\n getChildNodeId: function getChildNodeId(data) {\n var _this3 = this;\n\n var result = [];\n data.forEach(function (node) {\n if (node.children && node.children.length !== 0) {\n result = [].concat(_toConsumableArray(result), _toConsumableArray(_this3.getChildNodeId(node.children)));\n } else {\n result.push(node.data.roadSegmentId);\n }\n });\n return result;\n }\n }\n};",null]}