From 2fe250ece8de95b3f70172fe5b45793ab6a3084a Mon Sep 17 00:00:00 2001 From: D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore <chenjingjing@LAPTOP-E51P2139> Date: 星期五, 18 一月 2019 17:30:50 +0800 Subject: [PATCH] 未审批可更改 --- gx_tieta/WebRoot/mobil/iframe/homeinfo1.html | 53 +++++++++++++++++++++++++++++++++++------------------ 1 files changed, 35 insertions(+), 18 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/iframe/homeinfo1.html b/gx_tieta/WebRoot/mobil/iframe/homeinfo1.html index 630c67d..9ebc728 100644 --- a/gx_tieta/WebRoot/mobil/iframe/homeinfo1.html +++ b/gx_tieta/WebRoot/mobil/iframe/homeinfo1.html @@ -129,7 +129,6 @@ <thead> <tr> <th>鍥剧墖棰勮</th> - <th>鏂囦欢鍚�</th> <th>澶у皬</th> <th lay-data="{fixed: 'right', sort: true, minWidth: 100, align: 'center'}">鎿嶄綔</th> </tr> @@ -297,7 +296,7 @@ data: "json="+temp, dataType: 'json', success:function(data) { - console.info(data); + //console.info(data); data = JSON.parse(data.result); if(data.code==1){ layer.msg("鐢宠楠屾敹鎴愬姛!3绉掑悗鍏抽棴闈㈡澘"); @@ -317,17 +316,29 @@ setTimeout(function() { var lng = $('#lng').val(); // 缁忓害 var lat = $('#lat').val(); // 绾害 - console.log(lng+'***'+lat); + //console.log(lng+'***'+lat); var point = new BMap.Point(lng, lat); delMkByLabel('鏂版満鎴�'); var mk = new BMap.Marker(point); var label = new BMap.Label("鏂版満鎴�",{offset:new BMap.Size(20,-10)}); label.setStyle({display: 'none', padding: '4px 2px'}); - mk.disableDragging(); // 璁剧疆涓嶅彲鎷栧姩 + mk.enableDragging(); // 璁剧疆鍙嫋鍔� map.addOverlay(mk); // 灏嗚鐩栫墿娣诲姞鍒板湴鍥句腑 mk.setLabel(label); // 缁欒鐩栫墿娣诲姞label鎻愮ず map.panTo(point); // 灏嗗湴鍥剧Щ鍔ㄥ埌娣诲姞鐨勭偣浣嶇疆 - map.setZoom(20); // 璁剧疆鍦板浘鐨勭缉鏀剧瓑绾� + map.setZoom(20); // 璁剧疆鍦板浘鐨勭缉鏀剧瓑绾� + + // 缁檓k鐐规坊鍔犵Щ鍔ㄤ簨浠� + mk.addEventListener('dragend', function(e) { + //console.log(e.point); + var lat = e.point.lat; + var lng = e.point.lng; + + // 鏍规嵁鎷栧姩鐨勪綅缃洿鏂扮粡绾害 + $('#lng').val(lng); + $('#lat').val(lat); + + }); }, 500); }); @@ -351,7 +362,6 @@ var footerMenu = new FooterMenu($('#pageFooter')); // 瀹炰緥鍖栧簳閮ㄥ鑸爮 - // 涓婁紶瑙嗛妯″潡 var videoInfoTbl = $('#videoInfoTbl'); // 娓叉煋骞跺垵濮嬪寲涓婁紶鎸夐挳 @@ -368,11 +378,12 @@ VideoOrImage: 'video' }) } + ,exts: 'mp4|MOV|avi|rmvb' ,accept: 'video' //瑙嗛 ,choose: function(obj) { var files = this.files = obj.pushFile(); - console.log(obj.pushFile()); + //console.log(obj.pushFile()); videoInfoTbl.text(''); // 閬嶅巻 Object.keys(files).forEach(function(key) { @@ -397,7 +408,7 @@ }); } ,progress: function(e , percent) { - console.log(percent); + //console.log(percent); element.progress('uploadProgress',percent + '%'); } ,done: function(res, index, upload) { @@ -413,15 +424,10 @@ var uploadImgsLoad; var uploadImgs = upload.render({ elem: '#imgsSelect' - ,url: 'MyFileAction!uploadStationFile' + ,url: 'MyFileAction!uploadStationFile_mobile' ,accept: 'image' ,multiple: true - ,data: { - json:JSON.stringify( { - StationId: homeInfo.homeId, - VideoOrImage: 'image' - }) - } + ,data:{} ,auto: false ,bindAction: '#uploadImgs' ,choose: function(obj){ @@ -431,7 +437,6 @@ obj.preview(function(index, file, result){ var tr = $(['<tr id="upload-'+ index +'">' ,'<td><img src="'+result+'">' - ,'<td>'+ file.name +'</td>' ,'<td>'+ (file.size/1014).toFixed(1) +'kb</td>' ,'<td>' ,'<button class="layui-btn layui-btn-xs imgs-reload layui-hide">閲嶄紶</button>' @@ -454,8 +459,20 @@ imgsInfo.append(tr); }); } - ,before:function() { - uploadImgsLoad = layer.load(1); + ,before:function(obj) { + //uploadImgsLoad = layer.load(1); + // 璁剧疆鎻愪氦鐨勫弬鏁� + this.data.json = JSON.stringify({ + StationId: homeInfo.homeId + ,VideoOrImage: 'image' + ,binfmation: { + StationId: homeInfo.homeId + ,StationName: $('#homeName').val() + ,latitude: $('#lat').val() // 绾害 + ,longitude: $('#lng').val() // 缁忓害 + ,Address: $('#addr').val() // 鍦板潃 + } + }) } ,done:function(res) { var rs = JSON.parse(res.result); -- Gitblit v1.9.1