diff --git a/src/App.vue b/src/App.vue
index c5e5208..dd3e5e3 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -56,7 +56,7 @@ export default {
methods: {
initWebSocket(supplierId) {
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
- let wsUrl = `ws://192.168.3.32:81/websocket/${supplierId}`;
+ let wsUrl = `ws://192.168.1.34:81/websocket/${supplierId}`;
// let wsUrl = `ws://171.16.8.51:81/websocket/${supplierId}`//
this.websocket = new WebSocket(wsUrl);
this.websocket.onopen = this.websocketonopen;
diff --git a/src/page/index/index.vue b/src/page/index/index.vue
index e2edf4e..5a794fe 100644
--- a/src/page/index/index.vue
+++ b/src/page/index/index.vue
@@ -6,6 +6,7 @@
@@ -75,20 +76,19 @@
},
mounted() {
this.init();
- this.getAlarmInfo()
if(!window.sessionStorage.getItem("click")){
this.$alert('请允许系统提示报警声音', '提示', {
confirmButtonText: '确定',
callback: action => {
window.sessionStorage.setItem("click", 1)
// 添加socket通知监听
- // window.addEventListener('onmessageWS', this.getSocketData);
- this.timer = setInterval(() =>{
- this.getSocketData('222')
- },3000)
- setTimeout(() =>{
- clearInterval(this.timer)
- },6200)
+ window.addEventListener('onmessageWS', this.getSocketData);
+ // this.timer = setInterval(() =>{
+ // this.getSocketData('222')
+ // },3000)
+ // setTimeout(() =>{
+ // clearInterval(this.timer)
+ // },6200)
}
});
}else{
@@ -99,13 +99,13 @@
callback: action => {
window.sessionStorage.setItem("click", 1)
// 添加socket通知监听
- // window.addEventListener('onmessageWS', this.getSocketData);
- this.timer = setInterval(() =>{
- this.getSocketData('222')
- },3000)
- setTimeout(() =>{
- clearInterval(this.timer)
- },9200)
+ window.addEventListener('onmessageWS', this.getSocketData);
+ // this.timer = setInterval(() =>{
+ // this.getSocketData('222')
+ // },3000)
+ // setTimeout(() =>{
+ // clearInterval(this.timer)
+ // },9200)
}
});
}
@@ -123,31 +123,7 @@
})
},
getSocketData(res) {
- this.times++;
- let dom = document.querySelector('#play_audio')
- console.log('dom ===>',dom)
- dom.pause()
- if(this.times > 0){
- if(dom.readyState == 4){
- for(let i = 0;i<=this.times;i++){
- setTimeout(() =>{
- this.start++;
- this.isMuted = false,
- this.isPlay = true
- dom.play()
- },2500 * i)
- }
- }
- }
- this.$notify({
- title: '警告',
- message: res,
- type: 'warning'
- })
- // if (res.detail.data === 'success' || res.detail.data === '连接成功' || res.detail.data === 'heartBath') return
- // // ...业务处理
- // let obj = res.detail.data.indexOf('{') > -1 ? JSON.parse(res.detail.data) : null;
- // this.times++;
+ // this.times++;
// let dom = document.querySelector('#play_audio')
// console.log('dom ===>',dom)
// dom.pause()
@@ -163,13 +139,37 @@
// }
// }
// }
- // if (obj) {
- // this.$notify({
- // title: '警告',
- // message: obj.buildId + '号楼' + obj.floorNo + '层发生报警:' + obj.content,
+ // this.$notify({
+ // title: '警告',
+ // message: res,
// type: 'warning'
- // });
- // }
+ // })
+ if (res.detail.data === 'success' || res.detail.data === '连接成功' || res.detail.data === 'heartBath') return
+ // ...业务处理
+ let obj = res.detail.data.indexOf('{') > -1 ? JSON.parse(res.detail.data) : null;
+ this.times++;
+ let dom = document.querySelector('#play_audio')
+ console.log('dom ===>',dom)
+ dom.pause()
+ if(this.times > 0){
+ if(dom.readyState == 4){
+ for(let i = 0;i<=this.times;i++){
+ setTimeout(() =>{
+ this.start++;
+ this.isMuted = false,
+ this.isPlay = true
+ dom.play()
+ },2500 * i)
+ }
+ }
+ }
+ if (obj) {
+ this.$notify({
+ title: '警告',
+ message: obj.buildId + '号楼' + obj.floorNo + '层发生报警:' + obj.content,
+ type: 'warning'
+ });
+ }
},
showCollapse() {
this.$store.commit("SET_COLLAPSE");
diff --git a/src/views/dispatch/index.vue b/src/views/dispatch/index.vue
index 2b80387..f56272c 100644
--- a/src/views/dispatch/index.vue
+++ b/src/views/dispatch/index.vue
@@ -49,14 +49,14 @@
>
-
-
{{item.name}}
+
{{item.name}}{{item.isSelect}}
邀请
删除
@@ -736,7 +736,7 @@ export default {
// });
// })
- console.log('isRegisted ====>',isRegisted())
+ // console.log('isRegisted ====>',isRegisted())
// let mediaControl = null;
var mediaControl;
if (position == 1) {
@@ -745,8 +745,9 @@ export default {
mediaControl = document.getElementById('video1');
}
console.log(this.callItem)
+ console.log('inviteList ===>',this.inviteList)
// this.$nextTick(() =>{
- if(this.inviteList.length == 1){ //如果只邀请一人时,进行呼叫
+ if(this.inviteList.length == 0){ //如果只邀请一人时,进行呼叫
console.log('进入循环')
this.isMetting = false;
mediaControl = video1; //获取媒体控件
@@ -757,7 +758,7 @@ export default {
this.inviteList.push(this.callItem);
}).catch((reason) => {
- console.log("call fail");
+ console.log("call fail ===>",this.deviceData);
console.log(JSON.stringify(reason));
this.$message.error('呼叫失败')
});
@@ -852,7 +853,7 @@ export default {
// 音频呼叫
audioCall(){
this.isIntercom = false;
- this.callItem.isSelect = 1;
+ // this.callItem.isSelect = 1;
this.dialogCall = false;
console.log('callItem ===>',this.callItem)
this.makecall(false,1)
@@ -1337,6 +1338,10 @@ export default {
opacity: 0.4;
}
+ &.outline_devi{
+ opacity: 0.4;
+ }
+
.left_bor{
width: 0.03rem;
height: 0.35rem;