| | |
| | | this.oldlng = data[0].jd; |
| | | }, |
| | | changeDom(data) { |
| | | console.log(data, 'changeDom'); |
| | | // console.log(data, 'changeDom'); |
| | | |
| | | function changeDoms(dom, item) { |
| | | $(dom).empty(); |
| | |
| | | $('#jieshou').show(); |
| | | $('#wanchen').hide(); |
| | | } |
| | | // if (this.isFromJQ == false) { |
| | | // $('#wanchen').show(); |
| | | // } |
| | | |
| | | }, |
| | | //url解码 |
| | |
| | | return map; //抛出map |
| | | }, |
| | | Submit() { |
| | | $('#loding').show(); |
| | | var time = setTimeout(() => { |
| | | $('#loding').hide(); |
| | | }, 2000) |
| | | var data = this.getdata[0]; |
| | | console.log(data) |
| | | // receives() {// 接受任务 |
| | | var url = data.url, |
| | | Pid = data.id, |
| | | id = data.userid, //警察id |
| | | name = data.username, //警察id |
| | | data = { |
| | | id: Pid, |
| | | securityId: id, |
| | | alarmPeople: name |
| | | }; |
| | | // console.log(data); |
| | | axios({ |
| | | url: url, |
| | | data: data, |
| | | header: { |
| | | "content-type": "application/x-www-form-urlencoded" |
| | | }, |
| | | method: 'POST', |
| | | success(res) { |
| | | console.log(res); |
| | | |
| | | $('#loding').show(); |
| | | var time = setTimeout(() => { |
| | | $('#loding').hide(); |
| | | }, 1000) |
| | | $('#jieshou').show(); |
| | | $('#wanchen').hide(); |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | SubmitDown() { |
| | | // $('#SubmitDown').show(); |
| | | console.log(uni.navigateTo) |
| | | uni.navigateTo({ |
| | | url: '/pages/poput/mapJQtijiao/mapJQtijiao/mapJQtijiao' |
| | | url: '/pages/poput/mapJQtijiao/mapJQtijiao/mapJQtijiao?id=' + this.getdata[0].id |
| | | }); |
| | | }, |
| | | SubmitSD() { |
| | |
| | | // console.log([this.lat, this.lng]) |
| | | this.map.setView([this.lat, this.lng], 20); |
| | | }, |
| | | toJQposition(){ |
| | | toJQposition() { |
| | | this.map.setView([this.oldlat, this.oldlng], 20); |
| | | }, |
| | | // 获取实时位置 |
| | |
| | | that.lat = position.lat; // |
| | | that.lng = position.lng; //火星坐标 //TODO 实现业务代码逻辑 |
| | | that.haveShishiweizhi++; //控制只执行一次 |
| | | console.log(that.haveShishiweizhi) |
| | | // console.log(that.haveShishiweizhi) |
| | | if (that.haveShishiweizhi == 2) { |
| | | // console.log(position) |
| | | if (that.LXdhStart == null) { |
| | |
| | | } else { |
| | | |
| | | var resdata = res.data.result.coords; |
| | | console.log(resdata) |
| | | // console.log(res) |
| | | var data = []; |
| | | for (var i = 0; i < resdata.length; i++) { |
| | | var xy = []; |
| | |
| | | xy.push(resdata[i][0]); |
| | | data.push(xy); |
| | | } |
| | | var w = resdata[0][0] - resdata[resdata.length - 1][0]; |
| | | w = Math.abs(w); |
| | | w = w / 0.00000899; |
| | | w = w.toFixed(2); |
| | | console.log(w); |
| | | // var w = resdata[0][0] - resdata[resdata.length - 1][0]; |
| | | // w = Math.abs(w); |
| | | // w = w / 0.00000899; |
| | | // w = w.toFixed(2); |
| | | // console.log(w); |
| | | $('#t-mi').empty(); |
| | | $('#t-mi').append(w + '米'); |
| | | $('#t-mi').append(res.data.result.dist + '米'); |
| | | $('#t-fz').empty(); |
| | | $('#t-fz').append(w / 30 + '分钟'); |
| | | $('#t-fz').append(res.data.result.flen + '分钟'); |
| | | |
| | | if (that.LXdhEnd != null) { |
| | | that.map.removeLayer(that.LXdhEnd); |
| | |
| | | console.log('shuaxin') |
| | | |
| | | }, |
| | | // resultFeedbackClick() { //结果反馈跳转小程序 |
| | | // uni.webView.navigateTo({ |
| | | // url: `../poput/workbench/policeDetails/policeDetails?id=${this.seedata.id}` |
| | | // }); |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | |
| | | var time = setInterval(() => { |
| | | if (this.haveShishiweizhi == 1) { |
| | | this.getLocationData(); |
| | | console.log(this.haveShishiweizhi) |
| | | // console.log(this.haveShishiweizhi) |
| | | |
| | | } else if (this.haveShishiweizhi == 2) { |
| | | clearInterval(time); |