function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"117661","map_x":"118.798242","map_y":"32.047784","pointname":"大行宫校区","pointaddress":"南京市玄武区中山东路","areaname":"玄武区","areacode":"100032001002"},{"id":"117660","map_x":"118.797446","map_y":"32.048182","pointname":"全民校区","pointaddress":"南京市玄武区中山东路145号","areaname":"玄武区","areacode":"100032001002"},{"id":"117659","map_x":"118.646181","map_y":"32.0752","pointname":"江浦金盛田校区","pointaddress":"南京市浦口区龙华路3号","areaname":"浦口区","areacode":"100032001011"},{"id":"117658","map_x":"118.801131","map_y":"31.891848","pointname":"东大校区","pointaddress":"南京市江宁区吉印大道","areaname":"江宁区","areacode":"100032001015"},{"id":"117657","map_x":"118.933207","map_y":"32.108707","pointname":"仙林金鹰校区","pointaddress":"南京市栖霞区学海路1号金鹰购物中心","areaname":"栖霞区","areacode":"100032001013"},{"id":"117656","map_x":"118.789239","map_y":"32.045009","pointname":"新街口天安校区","pointaddress":"南京市秦淮区中山南路122号","areaname":"秦淮区","areacode":"100032001004"},{"id":"117655","map_x":"118.906973","map_y":"31.91871","pointname":"文鼎校区","pointaddress":"南京市江宁区江宁大学城格致路99号文鼎广场","areaname":"江宁区","areacode":"100032001015"},]; //补充其他行政区分组 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(); } }