function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"427374","map_x":"106.297761","map_y":"29.587283","pointname":"千豪(大学城一实校区","pointaddress":"重庆沙坪坝区大学城西路11号","areaname":"沙坪坝区","areacode":"100050001006"},{"id":"427373","map_x":"106.52297","map_y":"29.545627","pointname":"千豪(大坪校区)","pointaddress":"渝中区大坪正街19号","areaname":"渝中区","areacode":"100050001003"},{"id":"385481","map_x":"106.550823","map_y":"29.405492","pointname":"千豪(巴南区)","pointaddress":"巴南区万达广场","areaname":"巴南区","areacode":"100050001013"},{"id":"372542","map_x":"106.522774","map_y":"29.545418","pointname":"千豪(渝中区)","pointaddress":"重庆市渝中区大坪英利国际","areaname":"渝中区","areacode":"100050001003"},{"id":"372541","map_x":"106.320753","map_y":"29.608294","pointname":"千豪(大学城科巴校区","pointaddress":"重庆市沙坪坝区大学城","areaname":"沙坪坝区","areacode":"100050001006"},{"id":"372540","map_x":"106.539111","map_y":"29.58043","pointname":"千豪(江北校区)","pointaddress":"重庆市江北区观音桥未来国际","areaname":"江北区","areacode":"100050001005"},{"id":"341677","map_x":"106.571035","map_y":"29.531678","pointname":"千豪(南坪校区)","pointaddress":"南坪CITY城市广场","areaname":"南岸区","areacode":"100050001008"},{"id":"341676","map_x":"106.472533","map_y":"29.566029","pointname":"千豪(沙坪坝校区)","pointaddress":"清华源","areaname":"沙坪坝区","areacode":"100050001006"},{"id":"323887","map_x":"106.600766","map_y":"29.733136","pointname":"千豪(渝八校区)","pointaddress":"公园北路","areaname":"渝北区","areacode":"100050001012"},{"id":"323886","map_x":"106.527553","map_y":"29.66075","pointname":"千豪(金州校区)","pointaddress":"湖红路","areaname":"渝北区","areacode":"100050001012"},{"id":"323885","map_x":"106.472069","map_y":"29.596303","pointname":"千豪(宏帆校区)","pointaddress":"宏盛路","areaname":"江北区","areacode":"100050001005"},{"id":"323884","map_x":"106.521948","map_y":"29.526286","pointname":"千豪(育才校区)","pointaddress":"圣陶苑","areaname":"九龙坡区","areacode":"100050001007"},{"id":"323883","map_x":"106.524016","map_y":"29.516519","pointname":"千豪(杨家坪校区)","pointaddress":"九龙坡区龙湖西街天街","areaname":"九龙坡区","areacode":"100050001007"},{"id":"323882","map_x":"106.457232","map_y":"29.499755","pointname":"千豪(华岩二区)校区","pointaddress":"华龙大道","areaname":"九龙坡区","areacode":"100050001007"},{"id":"323881","map_x":"106.457279","map_y":"29.499352","pointname":"千豪(华岩一区)校区","pointaddress":"华龙大道","areaname":"九龙坡区","areacode":"100050001007"},]; //补充其他行政区分组 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(); } }