From eeb0546f66c233f7e5d24c018fda7227a80c391b Mon Sep 17 00:00:00 2001 From: 81041 <81041@DESKTOP-025NVD9> Date: 星期五, 21 十二月 2018 10:38:03 +0800 Subject: [PATCH] Merge branch 'dev_lxw' of https://whyclxw1@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw --- gx_tieta/WebRoot/mobil/map.html | 206 ++++++++++++++++++++++++++++++++++ gx_tieta/WebRoot/ex-battinfo.jsp | 24 +++ gx_tieta/WebRoot/mobil/ele-param2.html | 21 +- gx_tieta/WebRoot/iframe/homeinfo.html | 4 gx_tieta/WebRoot/mobil/batt-edit.html | 8 gx_tieta/WebRoot/mobil/app/css/map.css | 33 +++++ gx_tieta/WebRoot/mobil/equipwarn.html | 21 +++ gx_tieta/WebRoot/mobil/iframe/homeinfo.html | 2 gx_tieta/WebRoot/mobil/equiphistwarn.html | 23 +++ 9 files changed, 319 insertions(+), 23 deletions(-) diff --git a/gx_tieta/WebRoot/ex-battinfo.jsp b/gx_tieta/WebRoot/ex-battinfo.jsp index 9b42cea..e94e7b1 100644 --- a/gx_tieta/WebRoot/ex-battinfo.jsp +++ b/gx_tieta/WebRoot/ex-battinfo.jsp @@ -483,7 +483,7 @@ var resData = []; if(rs.code == 1) { var data = rs.data; - //console.log(data); + // console.log(data); // 閬嶅巻鏁版嵁鐨勫�� for(var i=0; i<data.length; i++) { var _data = data[i]; @@ -491,6 +491,8 @@ resData.push(_tmp); Page.setAll(_data.apply_note); } + }else { + Page.setAll(0); } pagePage.setVal(); // 璁剧疆鍒嗛〉淇℃伅 $('#applyNum').text(Page.all); // 璁剧疆寰界珷 @@ -544,9 +546,12 @@ resData.push(_tmp); acceptPage.setAll(_data.apply_note); } + // console.log(resData); + }else { + acceptPage.setAll(0); } pagePage.setVal(); // 璁剧疆鍒嗛〉淇℃伅 - $('#acceptNum').text(acceptPage.all); // 璁剧疆寰界珷 + $('#acceptNum').text(getAcceptHome(resData)); // 璁剧疆寰界珷 acceptOptions.data = resData; // 璁剧疆琛ㄦ牸鐨勬暟鎹� // 鐢熸垚琛ㄦ牸鏁版嵁 @@ -588,6 +593,21 @@ return temp; } + + // 鑾峰彇寰呴獙鏀剁殑鏈烘埧 + function getAcceptHome(data) { + // 閬嶅巻data + var num = 0; + for(var i=0; i<data.length; i++) { + var _data = data[i]; + // 鍒ゆ柇鏄惁琚獙鏀� + if(!_data.check_en) { + num++; + } + } + + return num; + } }); </script> </body> diff --git a/gx_tieta/WebRoot/iframe/homeinfo.html b/gx_tieta/WebRoot/iframe/homeinfo.html index dc16d0a..4a8eeb3 100644 --- a/gx_tieta/WebRoot/iframe/homeinfo.html +++ b/gx_tieta/WebRoot/iframe/homeinfo.html @@ -309,9 +309,10 @@ <div class="layui-form mrl8"> <div class="layui-form-item"> <button type="button" class="layui-btn" id="test5"><i class="layui-icon"> </i>閫夋嫨涓婁紶瑙嗛</button> + <span style="color: #FF0000;">璇蜂笂浼犳湁鍏虫満鎴跨殑瑙嗛</span> <div class="layui-input-inline"> <input type="text" name="title" autocomplete="off" placeholder="璇疯緭鍏ヨ棰戝悕绉�" class="layui-input"> - </div> + </div> </div> </div> <div class="layui-upload"> @@ -349,6 +350,7 @@ <div class="layui-form mrl8"> <div class="layui-form-item"> <button type="button" class="layui-btn" id="addImgs"><i class="layui-icon"> </i>閫夋嫨涓婁紶鍥剧墖</button> + <span style="color: #FF0000;">璇蜂笂浼犳湁鍏虫満鎴跨殑鍥剧墖</span> </div> </div> <div class="layui-upload"> diff --git a/gx_tieta/WebRoot/mobil/app/css/map.css b/gx_tieta/WebRoot/mobil/app/css/map.css index 5c71360..92ad033 100644 --- a/gx_tieta/WebRoot/mobil/app/css/map.css +++ b/gx_tieta/WebRoot/mobil/app/css/map.css @@ -113,4 +113,37 @@ } .hdw-tbl td { padding: 4px 0 4px 8px; +} +/* temp-map */ +.temp-map-container { + display: none; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #FFFFFF; + z-index: 99999; +} +.temp-map-container.temp-map-container-show { + display: block; +} +.temp-map-container-rel { + position: relative; + width: 100%; + height: 100%; +} +.temp-map-container-close { + position: absolute; + top: 8px; + right: 8px; + z-index: 999; + font-size: 20px; +} +.temp-map-container-close:hover { + color: #FF0000; +} +.temp-map { + width: 100%; + height: 100%; } \ No newline at end of file diff --git a/gx_tieta/WebRoot/mobil/batt-edit.html b/gx_tieta/WebRoot/mobil/batt-edit.html index 9421b51..2478666 100644 --- a/gx_tieta/WebRoot/mobil/batt-edit.html +++ b/gx_tieta/WebRoot/mobil/batt-edit.html @@ -105,25 +105,25 @@ <tr> <td>鐪�</td> <td> - <input type="text" id="station_name1" data-mini="true" /> + <input type="text" id="station_name1"class="unable" data-mini="true" /> </td> </tr> <tr> <td>鍩庡競</td> <td> - <input type="text" id="city" data-mini="true" /> + <input type="text" id="city" class="unable"data-mini="true" /> </td> </tr> <tr> <td>鍖哄幙</td> <td> - <input type="text" id="county" data-mini="true" /> + <input type="text" id="county" class="unable"data-mini="true" /> </td> </tr> <tr> <td>鏈烘埧鍚嶇О</td> <td> - <input type="text" id="StationName3" data-mini="true" /> + <input type="text" id="StationName3"class="unable" data-mini="true" /> </td> </tr> <tr> diff --git a/gx_tieta/WebRoot/mobil/ele-param2.html b/gx_tieta/WebRoot/mobil/ele-param2.html index 70fe2da..69c72b5 100644 --- a/gx_tieta/WebRoot/mobil/ele-param2.html +++ b/gx_tieta/WebRoot/mobil/ele-param2.html @@ -69,7 +69,7 @@ .abs{ position: fixed; width:100%; - height:4.5em; + height:8em; overflow: hidden; z-index:999; } @@ -78,7 +78,7 @@ } .mt7{ - margin-top:7em; + margin-top:8em; } </style> </head> @@ -127,7 +127,7 @@ <div data-role="footer" data-position="fixed" data-theme="a"> <div data-role="navbar"> <ul> - <li><a href="index.html" id="cancel" class="ui-btn ui-btn-inline ui-corner-all ui-btn-icon-delete" data-position-to="window" data-icon="delete" data-role="button">棣栭〉</a></li> + <li><a href="index.html" id="cancel" class="ui-btn ui-btn-inline ui-corner-all ui-btn-icon-delete" data-position-to="window" data-icon="home" data-role="button">棣栭〉</a></li> <li><a href="#yourPopup" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all ui-btn-icon-check" data-position-to="window" data-icon="check" data-role="button">鏂板缓</a></li> </ul> </div> @@ -241,8 +241,8 @@ - // 鏈烘埧瀹氫綅闈㈡澘 - $('#homeLocation').on('click', function() { + // + $('#homeLocation').off('click').on('click.cjj', function() { var homeInfo = $(this).data('homeInfo'); console.warn(homeInfo); searchBattLife(); @@ -295,11 +295,12 @@ function setcookieCreat(index){ var arrcookie = new Array(); for(var i=0;i<33;i++){//鍏�33椤� - var value = Math.floor(33*index); - console.info(value); + var value = Math.floor(arrTh.length*index); + //console.info(value) + console.warn(value); value = Math.floor(value+i); if(i==13){//鏂板缓鍔熻兘锛岀數姹犵粍ID榛樿涓哄綋椤垫渶鍚庝竴涓數姹犵粍ID鍙峰姞1 - var groupid = Math.floor(arrTd[value]+1); + var groupid = Math.floor(arrTd[value]); console.info(groupid); arrcookie.push(groupid); }else{ @@ -408,11 +409,11 @@ function setcookieedit(index){ var arrcookie = new Array(); for(var i=0;i<33;i++){//鍏�33椤� - var value = Math.floor(33*index); + var value = Math.floor(arrTh.length*index); console.info(value); value = Math.floor(value+i); if(i==13){//鏂板缓鍔熻兘锛岀數姹犵粍ID榛樿涓哄綋椤垫渶鍚庝竴涓數姹犵粍ID鍙峰姞1 - var groupid = Math.floor(arrTd[value]+1); + var groupid = Math.floor(arrTd[value]); console.info(groupid); arrcookie.push(groupid); }else{ diff --git a/gx_tieta/WebRoot/mobil/equiphistwarn.html b/gx_tieta/WebRoot/mobil/equiphistwarn.html index bd81cf1..b911856 100644 --- a/gx_tieta/WebRoot/mobil/equiphistwarn.html +++ b/gx_tieta/WebRoot/mobil/equiphistwarn.html @@ -152,7 +152,7 @@ $.post("Batt_devalarm_data_historyAction!serchByCondition","json="+json,function(data){ data=data.result; model=eval("("+data+")"); - //console.info(data); + console.info(data); if(model.code==1){ var dev_no = (Page.pageCurr-1)*Page.pageSize+1; for(var i=0;i<model.data.length;i++){ @@ -161,7 +161,7 @@ newArrTd.push(model.data[i].dev_name); //璁惧鍚嶇О newArrTd.push(model.data[i].dev_ip); //璁惧ip newArrTd.push(model.data[i].stationName); //鏈烘埧鍚嶇О - newArrTd.push("閫氳鏁呴殰"); //閫氳鏁呴殰 + newArrTd.push(getAlarmTypeByAlmType(model.data[i].alm_type)); //閫氳鏁呴殰 newArrTd.push(getAlarmLevel(model.data[i].alm_level)); //鍛婅绛夌骇 if(model.data[i].alm_is_confirmed == 1){ newArrTd.push('鏄�'); @@ -413,6 +413,25 @@ } return ""; } + + //鑾峰彇璁惧鐨勫憡璀︾被鍨� + function getAlarmTypeByAlmType(alm_type){ + if(alm_type>0){ + switch(alm_type){ + case 618501:return "缁х數鍣↘1鍛婅"; + case 618502:return "閫氳鍛婅"; + case 618503:return "璁惧杩囨俯鍛婅"; + case 618504:return "浜屾瀬绠1鍛婅"; + case 119023:return "缁埅涓嶈冻鍛婅"; + case 119024:return "鍩虹珯鍋滅數鍛婅"; + case 119025:return "鍩虹珯鍙戠數鍛婅"; + case 119026:return "鍩虹珯鎺夌珯鍛婅"; + case 119027:return "鍩虹珯寮�闂ㄥ憡璀�"; + case 119028:return "璁惧楂樻俯鍛婅"; + } + } + return "閫氫俊鏁呴殰"; + } </script> </div> </body> diff --git a/gx_tieta/WebRoot/mobil/equipwarn.html b/gx_tieta/WebRoot/mobil/equipwarn.html index 79b2137..f47b736 100644 --- a/gx_tieta/WebRoot/mobil/equipwarn.html +++ b/gx_tieta/WebRoot/mobil/equipwarn.html @@ -183,7 +183,7 @@ arr[index++]=data[i].dev_ip ; //璁惧IP arr[index++]=data[i].stationName; //鏈烘埧鍚� - arr[index++]=data[i].alm_type; //鍛婅浜嬩欢 + arr[index++]=getAlarmTypeByAlmType(data[i].alm_type); //鍛婅浜嬩欢 arr[index++]=getAlarmLevel(data[i].alm_level); //鍛婅绛夌骇 arr[index++]=data[i].alm_is_confirmed==0?"鍚�":"鏄�"; //鍛婅纭 if(data[i].alm_is_confirmed==1){ @@ -278,7 +278,24 @@ return ""; }; - + //鑾峰彇璁惧鐨勫憡璀︾被鍨� + function getAlarmTypeByAlmType(alm_type){ + if(alm_type>0){ + switch(alm_type){ + case 618501:return "缁х數鍣↘1鍛婅"; + case 618502:return "閫氳鍛婅"; + case 618503:return "璁惧杩囨俯鍛婅"; + case 618504:return "浜屾瀬绠1鍛婅"; + case 119023:return "缁埅涓嶈冻鍛婅"; + case 119024:return "鍩虹珯鍋滅數鍛婅"; + case 119025:return "鍩虹珯鍙戠數鍛婅"; + case 119026:return "鍩虹珯鎺夌珯鍛婅"; + case 119027:return "鍩虹珯寮�闂ㄥ憡璀�"; + case 119028:return "璁惧楂樻俯鍛婅"; + } + } + return "閫氫俊鏁呴殰"; + } diff --git a/gx_tieta/WebRoot/mobil/iframe/homeinfo.html b/gx_tieta/WebRoot/mobil/iframe/homeinfo.html index e45fe6d..7fff326 100644 --- a/gx_tieta/WebRoot/mobil/iframe/homeinfo.html +++ b/gx_tieta/WebRoot/mobil/iframe/homeinfo.html @@ -64,6 +64,7 @@ <div class="layui-row"> <div class="layui-col-12"> <button class="layui-btn layui-btn-normal layui-btn-sm" id="videoSelect">瑙嗛閫夋嫨</button> + <span style="color: #FF0000;">璇蜂笂浼犳湁鍏虫満鎴跨殑瑙嗛</span> </div> <div class="layui-col-12 mrt5"> <div class="layui-upload"> @@ -98,6 +99,7 @@ <div class="layui-form layui-form-pane layui-form-default mrt5 mrl8 mrr8 mrb10" action="" lay-filter=""> <div class="layui-col-12"> <button class="layui-btn layui-btn-normal layui-btn-sm" id="imgsSelect">鍥剧墖閫夋嫨</button> + <span style="color: #FF0000;">璇蜂笂浼犳湁鍏虫満鎴跨殑鍥剧墖</span> </div> <div class="layui-col-12"> <div class="layui-upload"> diff --git a/gx_tieta/WebRoot/mobil/map.html b/gx_tieta/WebRoot/mobil/map.html index 26203c4..d68554d 100644 --- a/gx_tieta/WebRoot/mobil/map.html +++ b/gx_tieta/WebRoot/mobil/map.html @@ -88,6 +88,13 @@ <div class="page-content abs abs-top40"> <div class="rel-full"> <div id="map" class="full-height"></div> + <div id="tempMapContainer" class="temp-map-container"> + <div class="temp-map-container-rel"> + <div class="temp-map-container-close"><i class="fa fa-close"></i></div> + <div id="changeMapMarker" class="temp-map"></div> + </div> + + </div> <div id="mapSearch" class="map-search-container"> <div class="layui-form layui-form-pane" action=""> <div class="layui-form-item"> @@ -123,7 +130,17 @@ map.disableDoubleClickZoom(); // 缁欏湴鍥炬坊鍔犲伐鍏锋潯(鍦板浘-鍗槦-涓夌淮)鍜屾瘮渚嬪昂鎺т欢 map.addControl(new BMap.MapTypeControl({anchor: BMAP_ANCHOR_BOTTOM_RIGHT})); - + + // 鐧惧害鍦板浘涓存椂妯″潡 + var tmpMap = new BMap.Map('changeMapMarker'); + var point = new BMap.Point(125.3192,43.8090); + tmpMap.centerAndZoom(point, 11); // 鐢ㄥ煄甯傚悕璁剧疆鍦板浘涓績鐐� + tmpMap.enableScrollWheelZoom(); + tmpMap.disableDoubleClickZoom(); + // 缁欏湴鍥炬坊鍔犲伐鍏锋潯(鍦板浘-鍗槦-涓夌淮)鍜屾瘮渚嬪昂鎺т欢 + tmpMap.addControl(new BMap.MapTypeControl({anchor: BMAP_ANCHOR_BOTTOM_RIGHT})); + + // 娴忚鍣ㄥ畾浣嶏紙鍓嶆彁鏄湁缃戠粶鍜屽紑鍚疓PS鏉冮檺锛� var geolocation = new BMap.Geolocation(); @@ -455,7 +472,8 @@ '<br>'+ '<div class="t-align-right">'+ '<a href="javascript:seenHomeInfo();" class="map-panel-seen-btn mrl8">鏌ョ湅</a>'+ - '<a href="javascript:editHomeInfo();" class="map-panel-seen-btn mrl8">淇敼</a>'+ + /* '<a href="javascript:editHomeInfo();" class="map-panel-seen-btn mrl8">淇敼</a>'+ */ + '<a href="javascript:showTempMap();" class="map-panel-seen-btn mrl8">閲嶆柊瀹氫綅</a>'+ '<a href="javascript:delHomeInfo();" class="map-panel-seen-btn mrl8">鍒犻櫎</a>'+ '</div>'+ '<input type="hidden" class="ipt-hide lng" value="'+data.data.longitude+'">'+ @@ -518,6 +536,176 @@ function delHomeInfo() { layer.msg('鏆傛棤鏉冮檺鍒犻櫎锛�') } + + // 鏄剧ず閲嶆柊瀹氫綅鏈烘埧闈㈡澘 + function showTempMap() { + var lng = $('.ipt-hide.lng').val(); // 鑾峰彇缁忓害 + var lat = $('.ipt-hide.lat').val(); // 鑾峰彇绾害 + var addr = $('.ipt-hide.addr').val(); // 鑾峰彇鍦板潃 + var homeId = $('.ipt-hide.sid').val(); // 鏈烘埧Id + var homeName = $('.ipt-hide.home').val(); // 鏈烘埧鍚嶇О + console.log(lng+"***"+lat); + var baiduPoint = GPS.wgs2bd(Number(lat), Number(lng)); // 灏嗗師濮嬪潗鏍囪浆鍖栦负鐧惧害鍧愭爣 + console.log(baiduPoint); + var temp = { + homeId: homeId + ,homeName: homeName + ,addr: addr + ,lng: lng + ,lat: lat + }; + tmpMap.clearOverlays(); + $('#tempMapContainer').addClass('temp-map-container-show'); // 鏄剧ず闈㈡澘 + + // 鍧愭爣闆嗗悎 + var points = []; + + // 鏃ф満鎴跨殑浣嶇疆 + var oldPoint = new BMap.Point(baiduPoint.lon, baiduPoint.lat); + points.push(oldPoint); + var oldLabel = new BMap.Label("鍘熷鏈烘埧浣嶇疆",{offset:new BMap.Size(20,-10)}); + var oldMk = new BMap.Marker(oldPoint); + oldMk.disableDragging(); // 璁剧疆涓嶅彲鎷栧姩 + tmpMap.addOverlay(oldMk); // 灏嗚鐩栫墿娣诲姞鍒板湴鍥句腑 + oldMk.setLabel(oldLabel); // 缁欒鐩栫墿娣诲姞label鎻愮ず + // tmpMap.panTo(oldPoint); // 瀹氫綅鍒颁綅缃� + + var load = layer.load(1); + geolocation.getCurrentPosition(function(r){ + layer.close(load); + if(this.getStatus() == BMAP_STATUS_SUCCESS){ + // 鏂版満鎴跨殑浣嶇疆 + points.push(r.point); + var mk = new BMap.Marker(r.point); + var label = new BMap.Label("鏂版満鎴夸綅缃�",{offset:new BMap.Size(20,-10)}); + mk.enableDragging(); // 璁剧疆鍙嫋鍔� + tmpMap.addOverlay(mk); // 灏嗚鐩栫墿娣诲姞鍒板湴鍥句腑 + mk.setLabel(label); // 缁欒鐩栫墿娣诲姞label鎻愮ず + + // 灏嗗潗鏍囧畾浣嶅埌鏈�鏂板潗鏍� + tmpMap.setViewport(points); // 灏嗗湴鍥剧Щ鍔ㄥ埌娣诲姞鐨勭偣浣嶇疆 + + // 缁檓aker鐐圭粦瀹氱偣鍑讳簨浠� + mk.addEventListener('click', function(e) { + var target = e.target; + console.log(target); + showChangeMkPanle(target, homeId, homeName, addr); + }); + + }else { + layer.msg('瀹氫綅澶辫触锛岃妫�鏌PS鎴栫綉缁滐紒'); + } + }); + } + + // 鏄剧ず淇敼闈㈡澘 + function showChangeMkPanle(target, id, name, addr) { + var searchInforWin = null; + var pt = target.point; + + var opts = { + title : '璁剧疆绔欑偣浣嶇疆', //鏍囬 + width : 290, //瀹藉害 + height : 150, //楂樺害 + panel : "panel", //妫�绱㈢粨鏋滈潰鏉� + enableAutoPan : true, //鑷姩骞崇Щ + searchTypes :[ + // BMAPLIB_TAB_SEARCH, //鍛ㄨ竟妫�绱� + // BMAPLIB_TAB_TO_HERE, //鍒拌繖閲屽幓 + // BMAPLIB_TAB_FROM_HERE //浠庤繖閲屽嚭鍙� + ] + }; + var content = '<div class="add-panel">'+ + '<div style="padding: 6px 4px"><span>鍦板潃锛�</span>'+ + '<span class="addr">'+addr+'</span></div>'+ + '<div style="padding: 6px 4px">缁忓害锛�<span class="lng">'+pt.lng+'</span>锛岀含搴︼細<span class="lat">'+pt.lat+'</span></div>'+ + '<div style="padding: 6px 4px"><span>璁剧疆绔欑偣鍚嶏細</span>'+'<span class="home-name">'+name+'</span></div>'+ + '<input type="hidden" class="home-id" value="'+id+'">'+ + '<div style="padding: 6px 4px; margin-top: 20px">'+ + '<a href="javascript:replaceHomePoint();" class="map-panel-btn">纭畾</a></div>' + +'</div>'; + + searchInforWin = new BMapLib.SearchInfoWindow(tmpMap, content, opts); + + searchInforWin.open(pt); + $('.BMapLib_sendToPhone').hide(); + } + + // 鏇挎崲鏈�鏂颁綅缃� + function replaceHomePoint() { + var addr = $('.add-panel .addr').text(); + var lng = $('.add-panel .lng').text(); + var lat = $('.add-panel .lat').text(); + var homeName = $('.add-panel .home-name').text(); + var homeId = $('.add-panel .home-id').val(); + var wgsPoint = GPS.bd2wgs(lat, lng); // 鐧惧害鍦板浘鍧愭爣杞寲涓篏PS + + layer.confirm('鏄惁纭畾閲嶆柊瀹氫綅', {icon:3, title: '鎻愮ず'}, function(index) { + layer.close(index); + var temp = { + StationId: homeId, //鏈烘埧缂栧彿 + StationName: homeName, //鏈烘埧鍚嶇О + Address: addr, //鏈烘埧鐗╃悊淇℃伅 + longitude: wgsPoint.lon, // 缁忓害 + latitude: wgsPoint.lat, // 绾害 + information:"", //澶囨敞 + }; + // 璇锋眰鍚庡彴 + var json = JSON.stringify(temp); + //console.info(json); + $.ajax({ + type: "post", + url: "BattMap_informationAction!replace", + async:true, + dataType:'text', + data:"json="+json, + success: function(data){ + data = eval('('+data+')'); + var model = eval('('+data.result+')'); + if(model.code == 1){ + alert("淇敼鎴愬姛"); + $('#tempMapContainer').removeClass('temp-map-container-show'); // 闅愯棌闈㈡澘 + addNewMapMark(homeName, lng, lat); + }else{ + alert("淇敼澶辫触"); + } + } + }); + + }); + + + } + + + // 鍒犻櫎map鐨勫浘鏍囩劧鍚庢坊鍔犱竴涓柊鐨勫浘鏍� + function addNewMapMark(name, lng, lat) { + delMkByLabel(name); // 鍒犻櫎mk鐐� + var pt = new BMap.Point(lng, lat); + var mk = new BMap.Marker(pt); // 瀹氫箟marker鐐� + // 鍚憁k鐐规坊鍔爈abel + var home_name = new BMap.Label(name, {offset:new BMap.Size(20,-10)}); + home_name.setStyle({display: 'none', padding: '4px 2px'}); // 璁剧疆涓嶅彲瑙� + mk.setLabel(home_name); // 璁剧疆label + + mk.addEventListener('click', function(e) { + var target = e.target; + //showMapPanel(target, dotList); + searchPanelInfo(target.point); + }); + map.addOverlay(mk); // 娣诲姞瑕嗙洊鐗� + + // 鏇存柊鍐呭 + updateAllStationData(name, lng, lat); + + locationByHomeName(map, name); + + } + + // 鍏抽棴閲嶆柊瀹氫綅鏈烘埧闈㈡澘 + $('#tempMapContainer .temp-map-container-close').click(function() { + $('#tempMapContainer').removeClass('temp-map-container-show'); // 鍏抽棴闈㈡澘 + }); // 鏌ョ湅鏈烘埧淇℃伅 function seenHomeInfo() { @@ -683,6 +871,20 @@ history.pushState(null, null, location.href ); //姝ゅ鍔犲叆鍥為��鏃朵綘瑕佹墽琛岀殑浠g爜 }); + + // 鏇存柊鎵�鏈夋満鎴跨殑淇℃伅 + function updateAllStationData(name, lng, lat) { + console.log(allStation); + for(var i=0; i<allStation.length; i++) { + var _data = allStation[i]; + if(_data.title == name) { + _data.lng = lng; + _data.lat = lat; + } + } + } + + </script> </body> </html> \ No newline at end of file -- Gitblit v1.9.1