function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"172156","map_x":"113.030319","map_y":"28.074276","pointname":"长沙总部基地","pointaddress":"长沙市雨花区长沙总部基地10栋","areaname":"雨花区","areacode":"100043001011"},{"id":"172155","map_x":"113.022944","map_y":"28.069848","pointname":"长沙云塘校区","pointaddress":"长沙市天心区创世纪广场5栋2楼","areaname":"天心区","areacode":"100043001003"},{"id":"172154","map_x":"113.09258","map_y":"28.196169","pointname":"湖南农大校区","pointaddress":"长沙市芙蓉区新润市场-东2门文都教学中心","areaname":"芙蓉区","areacode":"100043001002"},{"id":"172152","map_x":"112.900747","map_y":"28.135339","pointname":"中医药大学校区","pointaddress":"长沙市岳麓区湖南中医药大学二教","areaname":"岳麓区","areacode":"100043001004"},{"id":"172151","map_x":"112.931918","map_y":"28.212703","pointname":"湖南财政经济学院","pointaddress":"长沙市岳麓区湖南财政经济学院职工宿舍-9栋","areaname":"岳麓区","areacode":"100043001004"},{"id":"172149","map_x":"112.926311","map_y":"28.226303","pointname":"湖南工商大学校区","pointaddress":"长沙市岳麓区新华书店(湖南商学院店)","areaname":"岳麓区","areacode":"100043001004"},{"id":"172148","map_x":"112.953414","map_y":"28.172498","pointname":"大学城校区","pointaddress":"长沙市岳麓区未名电脑城6楼","areaname":"岳麓区","areacode":"100043001004"},{"id":"172147","map_x":"112.878511","map_y":"28.204505","pointname":"涉外/一师范校区","pointaddress":"长沙市岳麓区湖南涉外经济学院-南门文都涉外服务中心","areaname":"岳麓区","areacode":"100043001004"},{"id":"172146","map_x":"112.93928","map_y":"28.168907","pointname":"中南大学校区","pointaddress":"长沙市岳麓区中南·麓南商业广场二楼","areaname":"岳麓区","areacode":"100043001004"},{"id":"172145","map_x":"113.030516","map_y":"28.247897","pointname":"长沙学院校区","pointaddress":"长沙市开福区赫马力网咖(春迪店)隔壁文都教学中心","areaname":"开福区","areacode":"100043001005"},{"id":"172144","map_x":"112.917473","map_y":"28.367581","pointname":"林科大涉外学院校区","pointaddress":"长沙市望城区中南林业科技大学涉外学院正门长沙银行对面柚子酒店","areaname":"望城区","areacode":"100043001022"},{"id":"172143","map_x":"113.018144","map_y":"28.120042","pointname":"女子学院校区","pointaddress":"长沙市雨花区湖南女子学院-笃行楼","areaname":"雨花区","areacode":"100043001011"},{"id":"172142","map_x":"113.017286","map_y":"28.073192","pointname":"长理城南校区","pointaddress":"长沙市天心区长沙理工大学-图书馆B馆","areaname":"天心区","areacode":"100043001003"},{"id":"172141","map_x":"113.008473","map_y":"28.138746","pointname":"林科大分校","pointaddress":"中南林业大学科技大学东门橙子酒店3楼","areaname":"天心区","areacode":"100043001003"},{"id":"172140","map_x":"113.001233","map_y":"28.137636","pointname":"林科大分校(一)","pointaddress":"长沙市天心区中南林业科技大学德润楼","areaname":"天心区","areacode":"100043001003"},]; //补充其他行政区分组 if(data_info.length>10){ var areaGroupArr=new Array(); var defaultCode=''; for(var i=0;i< data_info.length;i++){ if(data_info[i].id==campusid){ defaultCode=data_info[i].areacode; } var _item=areaGroupArr.find(it=>it.areacode==data_info[i].areacode); if(_item){ _item.count++; }else{ areaGroupArr.push({areacode:data_info[i].areacode,areaname:data_info[i].areaname,count:1,fid:data_info[i].id}); } } $('#areaul li:gt(0)').remove(); for(var i=0;i< areaGroupArr.length;i++){ $('#areaul').append(`
  • ${areaGroupArr[i].areaname}(${areaGroupArr[i].count})
  • `); } } //2023-6-7 简化之前逻辑,对网点列表重新构建数据 var _uls=$('.school-list-container ul'); for(var i=0;i< _uls.length;i++){ var _ul=$(_uls[i]); var _id=_ul.attr('id'); var _code=''; if(/\d+/.test(_id)){ _code=/\d+/.exec(_id)[0]; } _ul.empty(); var _index=0; var visible=_ul.is(':visible'); for(var j=0;j< data_info.length;j++){ if(_code&&data_info[j].areacode!=_code){ continue; } _index++; var _li=`
  • ${_index}${data_info[j].id==campusid?'':''}
    ${data_info[j].pointname} ${data_info[j].pointaddress}
  • `; _ul.append(_li); if(visible){ if(locationPoint && data_info[j].id==campusid){ var overlay = new ComplexCustomOverlay(new BMap.Point(locationPoint.lng, locationPoint.lat), _index, data_info[j].pointname, data_info[j].pointaddress, data_info[j].id); map.addOverlay(overlay); map.centerAndZoom(new BMap.Point(locationPoint.lng, locationPoint.lat), 15); }else{ var overlay = new ComplexCustomOverlay(new BMap.Point(data_info[j].map_x, data_info[j].map_y), _index, data_info[j].pointname, data_info[j].pointaddress, data_info[j].id); map.addOverlay(overlay); } } } if(visible){ var _activeTop=_ul.find('li.active').offset().top; var _parentTop=_ul.offset().top; _ul.scrollTop(_activeTop-_parentTop-_ul.find('li.active').outerHeight()); } } resetJybTabLine(); } }