{"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":1667326395310},{"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":315532800000},{"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\";\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\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 options: [],\n childrens: []\n };\n },\n created: function created() {\n this.getOptions();\n },\n methods: {\n getOptions: function getOptions() {\n var _this = this;\n\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\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\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\n if (Object.prototype.toString.call(obj) === '[object Array]') {\n obj.forEach(function (item) {\n if (item.children) {\n _this2.getAllChildren(item.children);\n\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\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\n if (val.length == 1) {\n this.getAllChildren(this.options);\n } else {\n this.getChildren(this.options, val[val.length - 1]);\n }\n\n this.childrens.length !== 0 && this.childrens.forEach(function (item) {\n arr.push(item.id);\n });\n\n if (this.childrens.length === 0) {\n arr_.push(val[val.length - 1]);\n } else {\n arr_ = _toConsumableArray(val);\n }\n\n this.$emit('input', [].concat(_toConsumableArray(arr_), arr));\n }\n }\n }\n }\n};",null]}