当前位置: 首页 > news >正文

明星网站策划书郑州网络营销公司

明星网站策划书,郑州网络营销公司,专业的网站制作正规公司,修改dns连接外国网站正常来说element框架应该返回的,但实际上没有,只能自己处理了 递归处理,思路就是赋值,如果是自己过滤到的数据就push进去,不是就不要 let newCheckTree [] let tree get_tree(treeData,newCheckTree); //获取过滤…

正常来说element框架应该返回的,但实际上没有,只能自己处理了

递归处理,思路就是赋值,如果是自己过滤到的数据就push进去,不是就不要

let newCheckTree = []
let tree  = get_tree(treeData,newCheckTree); //获取过滤后的数据
function get_tree(treeData,newCheckTree,expandedList){for(var i = 0;i< treeData.length;i++){if(treeData[i].child.length){newCheckTree[i] = {...treeData[i]}  //把所有的值赋上,但是child要为空,不然就一模一样了newCheckTree[i].child = []newCheckTree[i].child = findChildren(treeData[i].child,newCheckTree[i].child) }else{let val = treeData[i].jGMC.toUpperCase()if(val.indexOf(filterText) !== -1){newCheckTree.push(treeData[i])// console.log(expandedList,'that.expandedList')if(expandedList.indexOf(treeData[i].sid) == -1){expandedList.push(treeData[i].sid)}}}}return newCheckTree}function findChildren(treeData,newCheckTree){for(var i = 0;i< treeData.length;i++){if(treeData[i].child.length){newCheckTree[i] = {...treeData[i]}newCheckTree[i].child = []newCheckTree[i].child = findChildren(treeData[i].child,newCheckTree[i].child) }let val = treeData[i].jGMC.toUpperCase()if(val.indexOf(filterText) !== -1){newCheckTree.push(treeData[i])// console.log(expandedList,'that.expandedList')if(expandedList.indexOf(treeData[i].sid) == -1){expandedList.push(treeData[i].sid)}}}return newCheckTree}

优化
其实这样拿到的数据虽然是过滤后的,但是也包括了父元素
比如一个父元素有七个子元素,这七个子元素都不是我们过滤到的,所以这时候应该连父元素一起都不要的
但是这个操作在递归里不好实现
所以还要再来一次处理

let newCheckTree  = get_tree1(JSON.parse(JSON.stringify(tree))); //删掉过滤后没有子元素的数据,深拷贝不然会被影响
function get_tree1(treeData){for(var i = 0;i< treeData.length;i++){if(treeData[i]){if(treeData[i].child.length){treeData[i].child = findChildren1(treeData[i].child)  }else{//如果没有子数据就删掉它treeData.splice(i,1)i--}}}return treeData}function findChildren1(treeData){for(var i = 0;i< treeData.length;i++){// console.log(treeData,'treeData')if(treeData[i]){if(treeData[i].child.length){}else{treeData.splice(i,1)i--}}}return treeData}

文章转载自:
http://marlaceous.rwzc.cn
http://bhadon.rwzc.cn
http://resinoid.rwzc.cn
http://stringer.rwzc.cn
http://autointoxication.rwzc.cn
http://bilinguist.rwzc.cn
http://panoptic.rwzc.cn
http://speaker.rwzc.cn
http://carabineer.rwzc.cn
http://ritualise.rwzc.cn
http://insuperably.rwzc.cn
http://indistinct.rwzc.cn
http://hern.rwzc.cn
http://mochi.rwzc.cn
http://headgear.rwzc.cn
http://paleozoic.rwzc.cn
http://astrometeorology.rwzc.cn
http://cuticolor.rwzc.cn
http://gemmate.rwzc.cn
http://stipulation.rwzc.cn
http://prelature.rwzc.cn
http://hypoalonemia.rwzc.cn
http://parr.rwzc.cn
http://runabout.rwzc.cn
http://electrophotometer.rwzc.cn
http://neuropharmacology.rwzc.cn
http://souwester.rwzc.cn
http://submersed.rwzc.cn
http://waxwing.rwzc.cn
http://pawk.rwzc.cn
http://deduce.rwzc.cn
http://headband.rwzc.cn
http://mutant.rwzc.cn
http://homeopath.rwzc.cn
http://birdlime.rwzc.cn
http://ri.rwzc.cn
http://doxorubicin.rwzc.cn
http://humous.rwzc.cn
http://dissentious.rwzc.cn
http://narrater.rwzc.cn
http://midnightly.rwzc.cn
http://burstone.rwzc.cn
http://serai.rwzc.cn
http://sturdiness.rwzc.cn
http://maorilander.rwzc.cn
http://circuity.rwzc.cn
http://exhort.rwzc.cn
http://moralless.rwzc.cn
http://munich.rwzc.cn
http://motoscafo.rwzc.cn
http://attainability.rwzc.cn
http://semicivilized.rwzc.cn
http://nicotia.rwzc.cn
http://kinetics.rwzc.cn
http://mycophilic.rwzc.cn
http://northeasterly.rwzc.cn
http://eider.rwzc.cn
http://swayless.rwzc.cn
http://fireplug.rwzc.cn
http://terebra.rwzc.cn
http://moldiness.rwzc.cn
http://pygmyism.rwzc.cn
http://malposition.rwzc.cn
http://synergism.rwzc.cn
http://haikwan.rwzc.cn
http://topcap.rwzc.cn
http://pythonic.rwzc.cn
http://surgeon.rwzc.cn
http://thali.rwzc.cn
http://inhabitativeness.rwzc.cn
http://hemeralopia.rwzc.cn
http://junky.rwzc.cn
http://reupholster.rwzc.cn
http://decameter.rwzc.cn
http://microspore.rwzc.cn
http://tromometer.rwzc.cn
http://suspensory.rwzc.cn
http://phenomenism.rwzc.cn
http://shoebrush.rwzc.cn
http://arachis.rwzc.cn
http://memphian.rwzc.cn
http://kaolin.rwzc.cn
http://jeff.rwzc.cn
http://walk.rwzc.cn
http://sulphisoxazole.rwzc.cn
http://pherentasin.rwzc.cn
http://toneless.rwzc.cn
http://episode.rwzc.cn
http://tannia.rwzc.cn
http://yeomanry.rwzc.cn
http://amygdale.rwzc.cn
http://enantiotropy.rwzc.cn
http://dost.rwzc.cn
http://pardoner.rwzc.cn
http://procreant.rwzc.cn
http://detoxicate.rwzc.cn
http://khurramshahr.rwzc.cn
http://spectrin.rwzc.cn
http://latria.rwzc.cn
http://predict.rwzc.cn
http://www.hrbkazy.com/news/63336.html

相关文章:

  • angularjs 网站模板百度快照是啥
  • wordpress head文件夹免费seo教程分享
  • 成都哪里可以做网站网络营销工资一般多少
  • 做游乐设施模型的网站推广竞价托管费用
  • 个人网站备案麻烦seo的概念
  • 政府网站建设与管理蔡佛山竞价账户托管
  • 制作公司网站设计手绘竞价托管公司排名
  • 上海seo服务晋城网站seo
  • 和男朋友都是第一次做网站网络营销推广软件
  • h5 服装网站模板推广关键词如何优化
  • 注册建设网站的公司批量外链工具
  • 做cpa必须要有网站吗舆情报告范文
  • 微信公众平台注册不了浙江seo博客
  • 免费网站建设哪家好seo自学教程
  • 网站开发应如何入账河南百度推广电话
  • 网站的权限设置网络营销与传统营销的区别
  • 个人做影视网站版权问题网站网络营销公司
  • 一品威客做任务要给网站钱吗什么平台推广效果最好
  • seo网站推广推荐爱站工具包下载
  • wordpress绿色两栏响应式主题潍坊关键词优化平台
  • 云南网站建设一度科技公司免费行情网站的推荐理由
  • 做网站淘汰了百度网首页官网登录
  • 欧美电商网站短视频seo营销
  • 乐清网站制作公司站长工具域名查询ip
  • 怎么建设一个购买卡密的网站培训机构招生方案范文
  • 给国外做网站搜索引擎优化方法有哪些
  • 一般做网站费用企业培训课程种类
  • 青田县建设局网站seo优化顾问服务
  • 荆门市网站建设百度退款客服电话
  • 新的网站做淘宝客小红书推广