| | |
| | | /* |
| | | * @Author: Morpheus |
| | | * @Date: 2021-08-26 16:22:11 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-08-28 15:03:25 |
| | | */ |
| | | var me = new Vue({ |
| | | el: '#mapVue', |
| | | data: { |
| | |
| | | //url解码 |
| | | |
| | | var jurisdictionId = this.GetQueryString('id') |
| | | |
| | | this.userId = this.GetQueryString('userid') |
| | | |
| | | axios.get('http://223.82.109.183:2080/api/blade-user/page?size=99999&jurisdiction=' + jurisdictionId).then((res) => { |
| | | var deptid = this.GetQueryString('deptid') |
| | | |
| | | var roleName = this.GetQueryChinese('roleName') |
| | | |
| | | console.log(roleName) |
| | | |
| | | var url = '' |
| | | |
| | | if (roleName == '保安公司管理员') { |
| | | |
| | | url = 'http://61.131.136.25:2080/api/blade-user/pages?¤t=1&size=999999&deptId=' + deptid |
| | | |
| | | } else { |
| | | |
| | | url = 'http://61.131.136.25:2080/api/blade-user/pages?dispatch=0&jurisdiction=' + jurisdictionId + '¤t=1&size=999999' |
| | | |
| | | } |
| | | |
| | | axios.get(url).then((res) => { |
| | | |
| | | if (res.data.data.records.length > 0) { |
| | | res.data.data.records.forEach(item => { |
| | | if (item.longitude && item.latitude) { |
| | | if (item.longitude && item.latitude && item.roleId != this.userId) { |
| | | resultData.push(item) |
| | | } |
| | | }) |
| | |
| | | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r != null) return unescape(r[2]); |
| | | return null; |
| | | }, |
| | | GetQueryChinese(name) { |
| | | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r != null) return decodeURI(r[2]); |
| | | return null; |
| | | }, |
| | | beginMap(map, data) { |
| | |
| | | }; |
| | | |
| | | function showPosition(position) { |
| | | |
| | | var adCode = position.adCode; //邮政编码 |
| | | var nation = position.nation; //中国 |
| | | var city = position.city; //城市 |
| | | var addr = position.addr; //详细地址 |
| | | that.lat = position.lat; // |
| | | that.lng = position.lng; //火星坐标 //TODO 实现业务代码逻辑 |
| | | that.lng = position.lng; //火星坐标 //TODO 实现业务代码逻辑 |
| | | |
| | | if (that.LXdhStart != null) { |
| | | that.map.removeLayer(that.LXdhStart); |
| | |
| | | }; |
| | | |
| | | function showErr() { |
| | | //TODO 如果出错了调用此方法 |
| | | //TODO 如果出错了调用此方法 |
| | | }; |
| | | |
| | | |
| | | geolocation.getLocation(showPosition, showErr, options); |
| | | |
| | |
| | | that.getLocationData(that.geolocation); |
| | | |
| | | }, 30000); |
| | | |
| | | }, |
| | | wacth: {} |
| | | }) |
| | | }) |