function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"176938","map_x":"113.231761","map_y":"35.247104","pointname":"解放校区","pointaddress":"焦作市解放区解放中路国控大药房中心店","areaname":"解放区","areacode":"100041008002"},{"id":"176933","map_x":"113.257037","map_y":"35.217232","pointname":"山阳校区","pointaddress":"焦作市山阳区老山阳商城恒信商务","areaname":"山阳区","areacode":"100041008011"},{"id":"176932","map_x":"113.077692","map_y":"35.17654","pointname":"博爱校区","pointaddress":"博爱县中山路新世纪对面","areaname":"博爱县","areacode":"100041008022"},{"id":"176934","map_x":"113.419521","map_y":"35.103373","pointname":"武陟校区","pointaddress":"武陟县朝阳一街青少年宫","areaname":"武陟县","areacode":"100041008023"},{"id":"176935","map_x":"113.087831","map_y":"34.941128","pointname":"温县校区","pointaddress":"温县人民大街盛宏弘城对面秀添服装市场","areaname":"温县","areacode":"100041008025"},{"id":"176936","map_x":"112.948688","map_y":"35.094756","pointname":"沁阳校区","pointaddress":"沁阳市怀府中路中心市场西侧天一眼镜店","areaname":"沁阳市","areacode":"100041008082"},{"id":"176937","map_x":"113.601568","map_y":"35.036549","pointname":"詹店校区","pointaddress":"武陟县詹店镇商贸中心南门","areaname":"武陟县","areacode":"100041008023"},]; //补充其他行政区分组 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(); } }