|
@ -31,13 +31,13 @@ export default { |
|
|
// 建立 websocket 连接 |
|
|
// 建立 websocket 连接 |
|
|
this.socket.initialize({ |
|
|
this.socket.initialize({ |
|
|
// url: 'ws://' + location.hostname + ':' + port + path, |
|
|
// url: 'ws://' + location.hostname + ':' + port + path, |
|
|
//url: 'wss://' + locatoin.hostname + ':' + window.location.port + '/ws' || 80 + '/ws', |
|
|
url: 'wss://' + locatoin.hostname + ':' + window.location.port + '/ws' || 80 + '/ws', |
|
|
// url: "ws://10.168.66.196:7789" + path, |
|
|
// url: "ws://10.168.66.196:7789" + path, |
|
|
// url: 'ws://10.168.77.128:7789/ws', |
|
|
// url: 'ws://10.168.77.128:7789/ws', |
|
|
// url: "ws://10.7.179.15" + ":" + port + path, |
|
|
// url: "ws://10.7.179.15" + ":" + port + path, |
|
|
// url: "ws://10.168.64.171" + ":" + port + path, |
|
|
// url: "ws://10.168.64.171" + ":" + port + path, |
|
|
// url: 'ws://10.168.78.127'+ ':' + port + path, |
|
|
// url: 'ws://10.168.78.127'+ ':' + port + path, |
|
|
url: 'ws://127.0.0.1'+ ':' + 7789 + '/ws', |
|
|
// url: 'ws://127.0.0.1'+ ':' + 7789 + '/ws', |
|
|
password: password, |
|
|
password: password, |
|
|
tokenSN: this.token, |
|
|
tokenSN: this.token, |
|
|
heartRate: interval, |
|
|
heartRate: interval, |
|
@ -107,6 +107,7 @@ export default { |
|
|
case "0": |
|
|
case "0": |
|
|
case "3": |
|
|
case "3": |
|
|
case "2": |
|
|
case "2": |
|
|
|
|
|
case "externalPlatformOffline": |
|
|
case "trafficFlowDataEarlyWarning": |
|
|
case "trafficFlowDataEarlyWarning": |
|
|
this.$emit("newEvent", params); |
|
|
this.$emit("newEvent", params); |
|
|
break; |
|
|
break; |
|
@ -130,7 +131,7 @@ export default { |
|
|
case "eventProcess": |
|
|
case "eventProcess": |
|
|
this.$root.$emit('update-eventProcess', content); |
|
|
this.$root.$emit('update-eventProcess', content); |
|
|
break; |
|
|
break; |
|
|
// |
|
|
// |
|
|
default: |
|
|
default: |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
@ -154,7 +155,7 @@ export default { |
|
|
// let params = {"subEvent":"eventProcess","content":{"id":3598,"eventId":"a026a03962d94089b67858d6c7e6cd42","operationTime":"2024-08-27 11:39:11","operator":"1","operatorName":"管理员","source":1,"processName":"","context":"这是处置记录","type":"text","remark":""}} |
|
|
// let params = {"subEvent":"eventProcess","content":{"id":3598,"eventId":"a026a03962d94089b67858d6c7e6cd42","operationTime":"2024-08-27 11:39:11","operator":"1","operatorName":"管理员","source":1,"processName":"","context":"这是处置记录","type":"text","remark":""}} |
|
|
// _this.$root.$emit('update-eventProcess', params.content); |
|
|
// _this.$root.$emit('update-eventProcess', params.content); |
|
|
// 消息数字 |
|
|
// 消息数字 |
|
|
// _this.$root.$emit('update-warning', Math.floor(Math.random() * 20)); |
|
|
// _this.$root.$emit('update-warning', Math.floor(Math.random() * 20)); |
|
|
// 事件弹窗 |
|
|
// 事件弹窗 |
|
|
const audio = new Audio(audioSrc); |
|
|
const audio = new Audio(audioSrc); |
|
|
audio.play(); |
|
|
audio.play(); |
|
@ -177,7 +178,7 @@ export default { |
|
|
// "earlyWorningContent":"平阴县气象台2024年06月24日16时40分发布高温黄色预警信号。受大陆暖高压脊影响,预计25日至28日我县将出现大范围持续性高温天气,全部乡镇和街道最高气温可达35~37℃,其中28日部分地区最高气温可达40℃左右。请注意防范。", |
|
|
// "earlyWorningContent":"平阴县气象台2024年06月24日16时40分发布高温黄色预警信号。受大陆暖高压脊影响,预计25日至28日我县将出现大范围持续性高温天气,全部乡镇和街道最高气温可达35~37℃,其中28日部分地区最高气温可达40℃左右。请注意防范。", |
|
|
// "earlyWorningTitle":"高温黄色","roadName":"G35济广高速","sectionName":"G35济广高速济南段","earlyWorningLevel":3,"orgCode":"370124", |
|
|
// "earlyWorningTitle":"高温黄色","roadName":"G35济广高速","sectionName":"G35济广高速济南段","earlyWorningLevel":3,"orgCode":"370124", |
|
|
// "earlyWorningContentNotic":"","stationName":"平阴","warningLevelString":"YELLOW_ALERT","earlyWarningTypeStringNumber":"6", |
|
|
// "earlyWorningContentNotic":"","stationName":"平阴","warningLevelString":"YELLOW_ALERT","earlyWarningTypeStringNumber":"6", |
|
|
// "earlyWorningSignal":"6yj1","warningLevelStringNumber":"1","earlyWorningIssueDate":"2024-06-24T16:40:00","earlyWarningTypeString":"HYPERTHERMIA"} |
|
|
// "earlyWorningSignal":"6yj1","warningLevelStringNumber":"1","earlyWorningIssueDate":"2024-06-24T16:40:00","earlyWarningTypeString":"HYPERTHERMIA"} |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
//设备故障 |
|
|
//设备故障 |
|
@ -201,7 +202,7 @@ export default { |
|
|
// "params": {} |
|
|
// "params": {} |
|
|
// }, |
|
|
// }, |
|
|
// "content": "K112+037菏泽方向远端机(K112+037)发生故障" |
|
|
// "content": "K112+037菏泽方向远端机(K112+037)发生故障" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
// } |
|
|
// } |
|
|
// } |
|
@ -211,8 +212,8 @@ export default { |
|
|
// "subEvent": "deviceState", |
|
|
// "subEvent": "deviceState", |
|
|
// "content": [ |
|
|
// "content": [ |
|
|
// { |
|
|
// { |
|
|
// "id": 896, |
|
|
// "id": 896, |
|
|
// "iotDeviceId": "K67+240tynb", |
|
|
// "iotDeviceId": "K67+240tynb", |
|
|
// "deviceType":"2", |
|
|
// "deviceType":"2", |
|
|
// deviceState |
|
|
// deviceState |
|
|
// } |
|
|
// } |
|
@ -224,6 +225,6 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|