{"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\\components\\CascaderCompany_.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\statisticalReport\\components\\CascaderCompany_.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 _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport _toConsumableArray from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.function.name\";\nimport _typeof from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/typeof.js\";\n//\n//\n//\n//\n//\n//\n//\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 orgData from \"./orgData.json\";\nexport default {\n props: {\n value: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n placeholder: {\n type: String,\n default: '请选择'\n }\n },\n data: function data() {\n return {\n childrens: [],\n options: orgData.list,\n companyId: ['1419863231459102720'],\n // 组织id(做为查询参数)\n companyIds: [],\n roadSegmentId: ''\n };\n },\n created: function created() {\n // this.getOptions()\n },\n methods: _defineProperty({\n getOptions: function getOptions() {\n var _this = this;\n this.$http.get('${yhxt}/Company/v1/getTree/Newcompany/' + '1258608622670319616').then(function (res) {\n _this.options = _this.deepClone(res.data);\n });\n },\n //深层拷贝\n deepClone: function deepClone(obj, id) {\n var objClone = Array.isArray(obj) ? [] : {};\n if (obj && _typeof(obj) === 'object') {\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n //判断ojb子元素是否为对象,如果是,递归复制\n if (obj[key] && _typeof(obj[key]) === 'object') {\n objClone[key] = this.deepClone(obj[key]);\n } else {\n objClone.label = obj.name;\n objClone.value = obj.id;\n //如果不是,简单复制\n objClone[key] = obj[key];\n }\n }\n }\n }\n return objClone;\n },\n getChildren: function getChildren(obj, id) {\n for (var i in obj) {\n if (obj[i].id == id) {\n this.childrens = obj[i].children || [];\n } else {\n this.getChildren(obj[i].children, id);\n }\n }\n },\n getAllChildren: function getAllChildren(obj) {\n var _this2 = this;\n if (Object.prototype.toString.call(obj) === '[object Array]') {\n obj.forEach(function (item) {\n if (item.children) {\n _this2.getAllChildren(item.children);\n _this2.childrens.push(item);\n } else {\n _this2.childrens.push(item);\n }\n });\n }\n },\n handleChange: function handleChange(val) {\n this.$emit('changecom', val);\n if (this.$refs.cascaderHandle.checkedValue.length === 0) {\n this.$emit('clear');\n } else {\n if (val.length == 0) {\n this.$emit('input', '');\n } else {\n var arr = [],\n arr_ = [];\n this.childrens = [];\n if (val.length == 1) {\n this.getAllChildren(this.options);\n } else {\n this.getChildren(this.options, val[val.length - 1]);\n }\n this.childrens.length !== 0 && this.childrens.forEach(function (item) {\n arr.push(item.id);\n });\n if (this.childrens.length === 0) {\n arr_.push(val[val.length - 1]);\n } else {\n arr_ = _toConsumableArray(val);\n }\n this.$emit('input', [].concat(_toConsumableArray(arr_), arr));\n }\n }\n },\n handleCascaderChange: function handleCascaderChange(val) {\n var _this3 = this;\n this.$emit('changecom', val);\n if (val && val.length == 0) {\n this.companyId = ['1419863231459102720'];\n this.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 this.companyIds = [];\n this.deepClone(selectedList);\n this.companyIds = [].concat(_toConsumableArray(val), _toConsumableArray(this.companyIds));\n selectedList.forEach(function (i) {\n if (!i.hasChildren && i.data.roadKey) {\n _this3.roadSegmentId = i.data.id;\n }\n });\n console.log(this.companyIds, this.roadSegmentId, 'rrr');\n }\n }, \"deepClone\", function deepClone(source) {\n var _this4 = this;\n if (source && source.length == 0) return;\n source.forEach(function (i) {\n if (i.hasChildren) {\n _this4.deepClone(i.children);\n }\n // 筛选出不是路段信息的数据id\n if (!i.data.roadKey) {\n _this4.companyIds.push(i.data.id);\n }\n });\n })\n};",null]}