{"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\\components\\selector\\CascaderCompany.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\components\\selector\\CascaderCompany.vue","mtime":1717524831402},{"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 _toConsumableArray from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\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\nimport orgData from \"./orgData.json\";\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: this.companyId,\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 this.$http.get('${yhxt}/road/roadmanage/v1/roadTree').then(function (res) {\n var data = res && res.status == 200 && res.data || [];\n _this.deepSetChildren(data); // 设置路段的children为null\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 data.forEach(function (i) {\n var child = i.chirldren;\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 _this3 = this;\n var companyIds = [];\n // val.length == 0\n if (val && val.length == 1) {\n // this.companyId = ['1419863231459102720']\n companyIds = ['1419863231459102720', '1497492989159804928', '1430710034819584000', '1497492555523297280', '1497492614272913408', '1497492713090715648', '1497492783722795008', '1497492820871745536', '1497492898147602432', '1430734631036129280', '1497493076619431936', '1497493109293060096', '1497493158022483968', '1494140182780317696', '1497493254181097472', '1497493287089606656', '1497493237982695424', '1419863231459102720'];\n }\n var selectedList = this.$refs.cascader.getCheckedNodes();\n companyIds = this.deepClone(selectedList);\n companyIds = [].concat(_toConsumableArray(val), _toConsumableArray(companyIds));\n selectedList.forEach(function (i) {\n if (!i.hasChildren && i.data.roadSegmentId) {\n _this3.roadSegmentId = i.data.id;\n }\n });\n this.companyIds = companyIds;\n if (companyIds.length == 0) {\n this.companyIds = '';\n }\n if (this.roadSegmentId) {\n this.companyIds = '';\n }\n this.$emit('update:companyIds', this.companyIds);\n this.$emit('update:companyId', this.value);\n this.$emit('update:roadSegmentId', this.roadSegmentId);\n },\n deepClone: function deepClone(source) {\n var _this4 = this;\n var result = [];\n if (source && source.length === 0) return [];\n source.forEach(function (i) {\n if (i.children.length !== 0) {\n result = [].concat(_toConsumableArray(result), _toConsumableArray(_this4.deepClone(i.children)));\n } else {\n result.push(i.data.id);\n }\n });\n return result;\n }\n }\n};",null]}