| | |
| | | resultFeedbackPopupShow: false, |
| | | popupDisplay: "none", |
| | | userId: null, |
| | | |
| | | geolocation: null |
| | | }, |
| | | methods: { |
| | | |
| | |
| | | resultData.push(item) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | this.map = this.beginMap(this.map, resultData); //创建并接受map |
| | | this.move = new myDomMove('#seedata', '.title', '#map'); |
| | |
| | | return null; |
| | | }, |
| | | beginMap(map, data) { |
| | | var that = this, center = [28.708432053474827, 115.85883507433789]; |
| | | var that = this, |
| | | center = [28.708432053474827, 115.85883507433789]; |
| | | // url = `http://s16s652780.51mypc.cn/api/alarm/alarm/APP-getAlarm?id=${data[0].id}`; |
| | | // url = `http://localhost:89/alarm/alarm/APP-getAlarm?id=${data[0].id}`; |
| | | this.nowPosition = center; |
| | |
| | | |
| | | }); |
| | | this.nowPosition = center; |
| | | |
| | | |
| | | this.getLocationData(this.geolocation); |
| | | |
| | | return map; //抛出map |
| | | }, |
| | | getDHLine(x, y) { |
| | |
| | | upData() { |
| | | console.log('上传信息成功') |
| | | }, |
| | | getLocationData() { |
| | | getLocationData(geolocation) { |
| | | var that = this; |
| | | var geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "mapqq"); |
| | | var positionNum = 0; |
| | | var options = { |
| | | timeout: 8000 |
| | |
| | | var addr = position.addr; //详细地址 |
| | | that.lat = position.lat; // |
| | | that.lng = position.lng; //火星坐标 //TODO 实现业务代码逻辑 |
| | | |
| | | |
| | | console.log(adCode, position, addr, 15145) |
| | | |
| | | |
| | | axios.post("http://223.82.109.183:2080/api/liveLocation/saveLiveLocationAndLocus", { |
| | | type: 1, |
| | | workerId: that.userId, |
| | | longitude: position.lng, |
| | | latitude: position.lat, |
| | | location: addr == '' ? position.province + position.city : addr |
| | | }).then((res) => { |
| | | |
| | | console.log(res, 4848) |
| | | |
| | | }) |
| | | |
| | | if (that.LXdhStart != null) { |
| | | that.map.removeLayer(that.LXdhStart); |
| | |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | | this.geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "mapqq"); |
| | | |
| | | this.beginCome(); |
| | | this.getLocationData(); |
| | | |
| | | var that = this; |
| | | |
| | | setInterval(() => { |
| | | |
| | | that.getLocationData(); |
| | | that.getLocationData(that.geolocation); |
| | | |
| | | }, 10000); |
| | | }, 30000); |
| | | }, |
| | | wacth: {} |
| | | }) |
| | |
| | | "pagePath": "pages/groupChat/groupChat", |
| | | "iconPath": "static/images/tabbar/demo.png", |
| | | "selectedIconPath": "static/images/tabbar/demo_selected.png", |
| | | "text": "好友" |
| | | "text": "聊天" |
| | | }, |
| | | { |
| | | "pagePath": "pages/manage/manage", |
| | | "iconPath": "static/images/tabbar/manage.png", |
| | | "selectedIconPath": "static/images/tabbar/manage_selected.png", |
| | | "text": "管理" |
| | | "text": "工作台" |
| | | }, |
| | | { |
| | | "pagePath": "pages/user/center", |
| | |
| | | |
| | | }, |
| | | recipientConfirm(e) { |
| | | if (e.length > 1) { |
| | | this.form.recipient = e[1].value |
| | | this.form.recipientText = e[1].label |
| | | } else { |
| | | |
| | | if (e.length == 1) { |
| | | this.form.recipient = e[0].value |
| | | this.form.recipientText = e[0].label |
| | | } else if (e.length == 2) { |
| | | this.form.recipient = e[1].value |
| | | this.form.recipientText = e[1].label |
| | | } else if (e.length == 3) { |
| | | this.form.recipient = e[2].value |
| | | this.form.recipientText = e[2].label |
| | | } |
| | | |
| | | |
| | | }, |
| | | initiateClick() { |
| | | var imgurl = ''; |
| | |
| | | |
| | | }, |
| | | recipientConfirm(e) { |
| | | if (e.length > 1) { |
| | | this.form.recipient = e[1].value |
| | | this.form.recipientText = e[1].label |
| | | } else { |
| | | |
| | | if (e.length == 1) { |
| | | this.form.recipient = e[0].value |
| | | this.form.recipientText = e[0].label |
| | | } else if (e.length == 2) { |
| | | this.form.recipient = e[1].value |
| | | this.form.recipientText = e[1].label |
| | | } else if (e.length == 3) { |
| | | this.form.recipient = e[2].value |
| | | this.form.recipientText = e[2].label |
| | | } |
| | | |
| | | |
| | | }, |
| | | initiateClick() { |
| | | this.$refs.uForm.validate(valid => { |
| | |
| | | |
| | | peopleConfirm(e) { |
| | | |
| | | if (e.length > 1) { |
| | | this.form.people = e[1].value |
| | | this.form.peopleText = e[1].label |
| | | |
| | | this.form.unitText = e[0].label |
| | | |
| | | } else { |
| | | if (e.length == 1) { |
| | | this.form.people = e[0].value |
| | | this.form.peopleText = e[0].label |
| | | } else if (e.length == 2) { |
| | | this.form.people = e[1].value |
| | | this.form.peopleText = e[1].label |
| | | this.form.unitText = e[0].label |
| | | } else if (e.length == 3) { |
| | | this.form.people = e[2].value |
| | | this.form.peopleText = e[2].label |
| | | this.form.unitText = e[1].label |
| | | } |
| | | |
| | | }, |
| | |
| | | export default { |
| | | components: { |
| | | seeImgs |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | |
| | | }, |
| | | |
| | | unitConfirm(e) { |
| | | if (e.length > 1) { |
| | | this.form.unit = e[1].value |
| | | this.form.unitText = e[1].label |
| | | } else { |
| | | |
| | | if (e.length == 1) { |
| | | this.form.unit = e[0].value |
| | | this.form.unitText = e[0].label |
| | | } else if (e.length == 2) { |
| | | this.form.unit = e[1].value |
| | | this.form.unitText = e[1].label |
| | | } else if (e.length == 3) { |
| | | this.form.unit = e[2].value |
| | | this.form.unitText = e[2].label |
| | | } |
| | | |
| | | }, |
| | |
| | | }, |
| | | judgeMsg() { |
| | | this.msg = this.names == '' ? (this.passwords == '' ? '账号密码不能为空' : '账号不能为空') : (this.passwords == '' ? |
| | | '密码不能为空' : this.passwords.length <= 5 ? '密码最少6位' : |
| | | '密码不能为空' : this.passwords.length <= 4 ? '密码最少6位' : |
| | | '格式正确'); |
| | | if (this.msg == "格式正确") { |
| | | this.icons = 'success'; |
| | |
| | | mounted() {}, |
| | | onLoad: function(options) { |
| | | |
| | | this.urls = "http://web.byisf.com/mapWz/xcxmap.html?id="+ this.$store.state.UserData.jurisdiction + "&userid="+ this.$store.state.UserData.role_id; |
| | | // this.urls = "http://127.0.0.1:5500/mapWz/xcxmap.html?id="+ this.$store.state.UserData.jurisdiction + "&userid="+ this.$store.state.UserData.role_id; |
| | | // this.urls = "http://web.byisf.com/mapWz/xcxmap.html?id="+ this.$store.state.UserData.jurisdiction + "&userid="+ this.$store.state.UserData.role_id; |
| | | this.urls = "http://127.0.0.1:5500/mapWz/xcxmap.html?id="+ this.$store.state.UserData.jurisdiction + "&userid="+ this.$store.state.UserData.role_id; |
| | | |
| | | }, |
| | | } |
| | |
| | | this.form.typeText = e[0].label |
| | | }, |
| | | recipientConfirm(e) { |
| | | if (e.length > 1) { |
| | | this.form.recipient = e[1].value |
| | | this.form.recipientText = e[1].label |
| | | } else { |
| | | |
| | | if (e.length == 1) { |
| | | this.form.recipient = e[0].value |
| | | this.form.recipientText = e[0].label |
| | | } else if (e.length == 2) { |
| | | this.form.recipient = e[1].value |
| | | this.form.recipientText = e[1].label |
| | | } else if (e.length == 3) { |
| | | this.form.recipient = e[2].value |
| | | this.form.recipientText = e[2].label |
| | | } |
| | | |
| | | |
| | | }, |
| | | initiateClick() { |
| | | this.$refs.uForm.validate(valid => { |
| | |
| | | import md5 from 'js-md5' |
| | | import axios from 'axios' |
| | | |
| | | const geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "mapqq"); |
| | | |
| | | const getLocationData = (userId) => { |
| | | var positionNum = 0; |
| | | var options = { |
| | | timeout: 8000 |
| | | }; |
| | | |
| | | function showPosition(position) { |
| | | var adCode = position.adCode; //邮政编码 |
| | | var nation = position.nation; //中国 |
| | | var city = position.city; //城市 |
| | | var addr = position.addr; //详细地址 |
| | | |
| | | axios.post("http://223.82.109.183:2080/api/liveLocation/saveLiveLocationAndLocus", { |
| | | type: 1, |
| | | workerId: userId, |
| | | longitude: position.lng, |
| | | latitude: position.lat, |
| | | location: addr == '' ? position.province + position.city : position.province + position.city + |
| | | addr |
| | | }).then((res) => { |
| | | |
| | | }) |
| | | |
| | | }; |
| | | |
| | | function showErr() { |
| | | //TODO 如果出错了调用此方法 |
| | | }; |
| | | |
| | | geolocation.getLocation(showPosition, showErr, options); |
| | | |
| | | }; |
| | | |
| | | const actions = { |
| | | loging(store, data) { |
| | | var user = [{ |
| | |
| | | data.accounts = data.name; |
| | | data.pass = data.pass; |
| | | // data.userPhon = res.user_id; |
| | | |
| | | |
| | | |
| | | setInterval(function() { |
| | | getLocationData(res.data.user_id); |
| | | }, |
| | | 30000) |
| | | |
| | | uni.request({ |
| | | url: "http://223.82.109.183:2080/api/blade-system/dept/detail?id=" + res.data.dept_id, |
| | | url: "http://223.82.109.183:2080/api/blade-system/dept/detail?id=" + res |
| | | .data.dept_id, |
| | | method: "get", |
| | | data: { |
| | | |
| | | |
| | | }, |
| | | success: (result) => { |
| | | data.deptName = result.data.data.deptName |
| | |
| | | uni.$u.func.login(res.data) |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico"> |
| | | <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> |
| | | <meta name="viewport" |
| | | content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> |
| | | <title> |
| | | <%= htmlWebpackPlugin.options.title %> |
| | | </title> |
| | |
| | | document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px' |
| | | }) |
| | | </script> |
| | | <!-- 百度地图api --> |
| | | <script type="text/javascript" src="https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js"> |
| | | </script> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>static/index.css" /> |
| | | </head> |
| | | <body> |