| | |
| | | var PatrolList = null; |
| | | var ImgFile = null; |
| | | var dateTime; |
| | | var longitude = null; //百度地图(BD-09)经度 |
| | | var latitude = null; //百度地图(BD-09)纬度 |
| | | var longitude; //百度地图(BD-09)经度 |
| | | var latitude; //百度地图(BD-09)纬度 |
| | | var x_pi = 3.14159265358979324 * 3000.0 / 180.0; |
| | | var pi = 3.1415926535897932384626; |
| | | var a = 6378245.0; |
| | | var ee = 0.00669342162296594323; |
| | | //电子巡更记录 |
| | | var data = { |
| | | "interfaceId": "5601", |
| | |
| | | } |
| | | }) |
| | | |
| | | // PatrolList = [{ |
| | | // "id": "57", |
| | | // "userName": "程娟", |
| | | // "longitude": "34.585", |
| | | // "latitude": "114.235", |
| | | // "createTime": "1976-03-03 16:41:41" |
| | | // }, |
| | | // { |
| | | // "id": "1", |
| | | // "userName": "冯军", |
| | | // "longitude": "34.585", |
| | | // "latitude": "114.235", |
| | | // "createTime": "1981-01-06 17:40:24" |
| | | // }, |
| | | // { |
| | | // "id": "99", |
| | | // "userName": "黎洋", |
| | | // "longitude": "114.235", |
| | | // "latitude": "34.585", |
| | | // "createTime": "1991-04-04 23:06:09" |
| | | // } |
| | | // ] |
| | | |
| | | } |
| | | |
| | | function renderPatrol() { |
| | |
| | | if (PatrolList && PatrolList.length > 0) { |
| | | $.each(PatrolList, function(index, item) { |
| | | html += '<li><div class="item"><div class="top">' |
| | | html += '<div class="date">' + item.createTime + '</div><div class="r-btn" id = "' + item.id + '">查看照片</div></div>'; |
| | | html += '<div class="date">' + item.createTime + '</div><div class="r-btn" id = "' + item.id + |
| | | '">查看照片</div></div>'; |
| | | html += '<div class="cards"><div class="cd"><div class="con user">' |
| | | html += '<div class="tit">打卡人</div><div class="txt">' + item.userName + '</div></div></div>'; |
| | | html += '<div class="cd"><div class="con loc"><div class="tit">坐标</div>' |
| | | html += '<div class="txt">' + item.longitude + ', ' + item.latitude + '</div></div></div></div></div></li>' |
| | | html += '<div class="txt">' + item.longitude + ', ' + item.latitude + |
| | | '</div></div></div></div></div></li>' |
| | | }) |
| | | } else { |
| | | html += '<li><div class="item"><div class="top">' |
| | |
| | | |
| | | //使用相机拍照 |
| | | function cameraImg() { |
| | | //获取定位信息 |
| | | getLatLon(); |
| | | if (latitude == null || longitude == null) { |
| | | return; |
| | | } |
| | | var cmr = plus.camera.getCamera(); |
| | | cmr.captureImage(function(p) { |
| | | //成功 |
| | |
| | | |
| | | //电子巡更打卡 |
| | | function patrolClock() { |
| | | |
| | | console.log(latitude) |
| | | console.log(longitude) |
| | | data1.data.latitude = latitude; |
| | | data1.data.longitude = longitude |
| | | mui.ajax(url, { |