| | |
| | | wentifankui: '', |
| | | oldlat: '', |
| | | oldlng: '', |
| | | haveJDWD: true, |
| | | |
| | | }, |
| | | methods: { |
| | |
| | | this.getdata = this.getQueryVariable('data') || data; |
| | | // this.getdata = data; |
| | | this.changeDom(this.getdata[0]); |
| | | console.log(this.getdata[0]); |
| | | this.map = this.beginMap(this.map, this.getdata); //创建并接受map |
| | | // this.move = new myDomMove('#seedata', '.title', '#map'); |
| | | this.map.invalidateSize(true); //应用地图高度 |
| | | // this.move.followFinger(this.map, 'down'); |
| | | this.lat = data[0].wd; |
| | | this.lng = data[0].jd; |
| | | this.oldlat = data[0].wd; |
| | | this.oldlng = data[0].jd; |
| | | // this.lat = data[0].wd; |
| | | // this.lng = data[0].jd; |
| | | // this.oldlat = data[0].wd; |
| | | // this.oldlng = data[0].jd; |
| | | this.oldlat = this.getdata[0].wd; |
| | | this.oldlng = this.getdata[0].jd; |
| | | }, |
| | | changeDom(data) { |
| | | // console.log(data, 'changeDom'); |
| | |
| | | changeDoms('#um-m-t-bz', data.bz); |
| | | changeDoms('#um-m-t-dz', data.place); |
| | | // console.log(data.jtype, data.securityId, '11111111111') |
| | | if (data.jtype == 2) { |
| | | changeDoms('#um-m-t-states', '已处理'); |
| | | |
| | | } else if (data.jtype == 1) { |
| | | if (data.jtype == 1 && data.securityId != '') { |
| | | changeDoms('#um-m-t-states', '处理中'); |
| | | $('#jieshou').hide(); |
| | | $('#wanchen').show(); |
| | | } else { |
| | | } else if (data.jtype == 2) { |
| | | changeDoms('#um-m-t-states', '已处理'); |
| | | } else if (data.securityId == null || data.securityId == '') { |
| | | changeDoms('#um-m-t-states', '未处理'); |
| | | $('#jieshou').show(); |
| | | $('#wanchen').hide(); |
| | |
| | | for (var i = 0; i < data.length; i++) { |
| | | var a = data[i]; |
| | | if (a.jd == '' || a.wd == '') { |
| | | console.log('没有坐标', i) |
| | | console.log('没有坐标', i); |
| | | that.haveJDWD = false; |
| | | } else { |
| | | setData(a); |
| | | } |
| | | markers.addLayer(marker); |
| | | } |
| | | map.addLayer(markers); |
| | | if (that.haveJDWD) { |
| | | markers.addLayer(marker); |
| | | map.addLayer(markers); |
| | | |
| | | } |
| | | var i = 0; |
| | | markers.on('click', function(a) { |
| | | if (i == 0) { |
| | | |
| | | console.log(that.getdata) |
| | | |
| | | } else if (i == 1) { |
| | |
| | | }, |
| | | Submit() { |
| | | var data = this.getdata[0]; |
| | | console.log(data) |
| | | // console.log(data) |
| | | // receives() {// 接受任务 |
| | | var url = data.url, |
| | | Pid = data.id, |
| | | id = data.userid, //警察id |
| | | name = data.username, //警察id |
| | | data = { |
| | | datas = { |
| | | id: Pid, |
| | | securityId: id, |
| | | alarmPeople: name |
| | | }; |
| | | // console.log(data); |
| | | // console.log(datas); |
| | | axios({ |
| | | url: url, |
| | | data: data, |
| | | header: { |
| | | "content-type": "application/x-www-form-urlencoded" |
| | | }, |
| | | method: 'POST', |
| | | success(res) { |
| | | console.log(res); |
| | | url: url + |
| | | `?securityId=${datas.securityId}&id=${datas.id}&alarmPeople=datas.alarmPeople`, |
| | | // data: datas, |
| | | header: { |
| | | "content-type": "application/x-www-form-urlencoded" |
| | | }, |
| | | method: 'POST', |
| | | |
| | | $('#loding').show(); |
| | | var time = setTimeout(() => { |
| | | $('#loding').hide(); |
| | | }, 1000) |
| | | $('#jieshou').show(); |
| | | $('#wanchen').hide(); |
| | | } |
| | | }) |
| | | }).then(res => { |
| | | // console.log(res, 123); |
| | | |
| | | $('#loding').show(); |
| | | var time = setTimeout(() => { |
| | | $('#loding').hide(); |
| | | }, 1000) |
| | | $('#jieshou').hide(); |
| | | $('#wanchen').show(); |
| | | $('#um-m-t-states').empty(); |
| | | $('#um-m-t-states').append('处理中'); |
| | | }) |
| | | // console.log( 123); |
| | | |
| | | }, |
| | | SubmitDown() { |
| | | // $('#SubmitDown').show(); |
| | | console.log(uni.navigateTo) |
| | | // console.log(uni.navigateTo) |
| | | uni.navigateTo({ |
| | | url: '/pages/poput/mapJQtijiao/mapJQtijiao/mapJQtijiao?id=' + this.getdata[0].id |
| | | }); |
| | |
| | | that.LXdhStart.addLayer(L.marker([that.lat, that.lng], { |
| | | icon: qd, |
| | | })); |
| | | if (that.haveJDWD == false) { |
| | | that.map.setView([that.lat, that.lng], 20); |
| | | } |
| | | |
| | | that.map.addLayer(that.LXdhStart); |
| | | that.getDHLine(+that.oldlng, +that.oldlat) |