function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"297770","map_x":"117.150016","map_y":"36.727811","pointname":"龙湖北宸校区","pointaddress":"龙湖北宸天街","areaname":"历城区","areacode":"100024001005"},{"id":"221865","map_x":"117.068241","map_y":"36.688147","pointname":"印象城校区","pointaddress":"悦立方6号楼","areaname":"历城区","areacode":"100024001005"},{"id":"221212","map_x":"116.992832","map_y":"36.694972","pointname":"翡翠郡校区","pointaddress":"重汽翡翠郡南区","areaname":"天桥区","areacode":"100024001004"},{"id":"221211","map_x":"117.011598","map_y":"36.599646","pointname":"领秀城校区","pointaddress":"鲁能领秀城美丽汇领寓5号楼","areaname":"市中区","areacode":"100024001001"},{"id":"221210","map_x":"116.988378","map_y":"36.642898","pointname":"阳光100校区","pointaddress":"槐荫区阳光美乐汇T区6号楼楼北","areaname":"槐荫区","areacode":"100024001003"},{"id":"221209","map_x":"117.00764","map_y":"36.669245","pointname":"经四路万达校区","pointaddress":"经四路万达广场C座","areaname":"市中区","areacode":"100024001001"},{"id":"221208","map_x":"117.062196","map_y":"36.661861","pointname":"文东校区","pointaddress":"恒大帝景9号楼","areaname":"历下区","areacode":"100024001002"},{"id":"221206","map_x":"117.150626","map_y":"36.654707","pointname":"东城逸家校区","pointaddress":"东城逸家贤园二区晨嘉路","areaname":"高新区","areacode":"100024001007"},{"id":"221205","map_x":"117.137416","map_y":"36.692815","pointname":"高新校区","pointaddress":"高新万达J2写字楼","areaname":"高新区","areacode":"100024001007"},]; //补充其他行政区分组 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(); } }