| | |
| | | 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) |
| | | } |
| | | |