| | |
| | | init() { |
| | | var that = this; |
| | | window.addEventListener("message", res => { |
| | | if (res.data.status === "ok") { |
| | | that.setMsgMatching(res.data.params); |
| | | } |
| | | }); |
| | | }, |
| | | clearTime(){ |
| | | if (this.setTimeInterval) { |
| | | clearInterval(this.setTimeInterval); |
| | | this.setTimeInterval = null; |
| | | |
| | | } |
| | | if (res.data.status === "ok") { |
| | | that.setMsgMatching(res.data.params); |
| | | this.setTime(); |
| | | }, |
| | | setTime(){ |
| | | if(this.setTimeInterval){ |
| | | clearInterval(this.setTimeInterval); |
| | | this.setTimeInterval = null; |
| | | } |
| | | this.setTimeInterval = setTimeout((res) => { |
| | | vueEvents.$emit("queryData", false); |
| | |
| | | clearInterval(this.setTimeInterval); |
| | | this.setTimeInterval = null; |
| | | }, 90000) |
| | | |
| | | }); |
| | | }, |
| | | //消息匹配 |
| | | setMsgMatching(result) { |
| | |
| | | var rom = mapData.msgMach.lineRoam; |
| | | var closeRomData = mapData.msgMach.closeRoam; |
| | | var acceptData =mapData.msgMach.acceptMsg; |
| | | console.log(result) |
| | | var valRest = rest.filter((rs) => { |
| | | if (param.indexOf(rs) > -1) { |
| | | return rs; |
| | |
| | | |
| | | // 地图复位 |
| | | if (valRest.length > 0) { |
| | | |
| | | this.clearTime(); |
| | | vueEvents.$emit("queryData", false); |
| | | rpc.setClearAllMsg(); |
| | | rpc.setMapRest(); |
| | |
| | | if (valRom.length > 0) { |
| | | |
| | | vueEvents.$emit("queryData", false); |
| | | this.clearTime(); |
| | | rpc.setClearAllMsg(); |
| | | rpc.setLineRoaming() |
| | | return |
| | |
| | | } |
| | | }); |
| | | if (closeRom.length > 0) { |
| | | this.clearTime(); |
| | | rpc.setCloseLineRomaing(); |
| | | return |
| | | } |
| | |
| | | } |
| | | }) |
| | | if (accept.length > 0) { |
| | | this.clearTime(); |
| | | rpc.getFuzzyQuery(result) |
| | | } |
| | | |
| | |
| | | |
| | | this.dataQuery = []; |
| | | this.objArr = []; |
| | | this.pointrange = 2000; |
| | | this.pointrange = 6000; |
| | | for (var i = 0; i < length; i++) { |
| | | var world = keyWorld[i].word; |
| | | if (world.indexOf('奔驰') > -1) { |
| | | if(world == '奔驰')return |
| | | if (world.indexOf('奔驰公司') > -1) { |
| | | world = '奔驰'; |
| | | this.pointrange = 12000 |
| | | } else if (world.indexOf('京东') > -1) { |
| | |
| | | world = '机器人' |
| | | } else if (world.indexOf('汽车') > -1) { |
| | | world = '汽车' |
| | | }else if (world.indexOf('园') > -1) { |
| | | |
| | | }else if (world.indexOf('博大') > -1 && world.indexOf('博大大厦') == -1){ |
| | | world = '博大' |
| | | } else{ |
| | | continue |
| | | } |
| | | |
| | | this.setFuzzyQueryData(world, i, length - 1); |
| | | } |
| | | } |
| | |
| | | window.Viewer.scene.screenSpaceCameraController.minimumZoomDistance = 500 |
| | | mapMsg.init(); |
| | | rpc.clickToCoordinates(); |
| | | |
| | | mapMsg.setTime(); |
| | | //标会编辑 |
| | | sgworld.Creator.SimpleGraphic.setEdit(true, { |
| | | editProp: true, |
| | |
| | | border-radius: 10px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .bgbox { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 8px; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .mid { |
| | | position: absolute; |
| | | top: 50%; |
| | |
| | | lineRoam: ['漫游', '导航'], |
| | | closeRoam: ['停止漫游', '停止导航'], |
| | | localPage: ['一', '二', '三', '四', '五', '六'], |
| | | acceptMsg:['定位','奔驰','京东','小米','博大大厦','第','办事流程','园','信息技术','生物医药','机器人','汽车',] |
| | | acceptMsg:['定位','奔驰','京东','小米','博大大厦','博大','第','办事流程','园','信息技术','生物医药','机器人','汽车',] |
| | | } |
| | | }; |
| | | export default mapData; |