|
|
@@ -56,6 +56,9 @@
|
|
|
style="width: 100%; overflow-y: auto"
|
|
|
>
|
|
|
<el-table-column prop="ind" label="序号" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ (page - 1) * 20 + scope.row.ind }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="real_name" label="组织成员" width="330">
|
|
|
</el-table-column>
|
|
|
@@ -373,7 +376,7 @@ export default {
|
|
|
loading2: false,
|
|
|
defaultProps: {
|
|
|
children: "childrens",
|
|
|
- label: "org_name"
|
|
|
+ label: "org_name",
|
|
|
},
|
|
|
|
|
|
// 分页
|
|
|
@@ -416,7 +419,7 @@ export default {
|
|
|
websock: null,
|
|
|
getUserObj: {}, // 获取到当前点击的行数据
|
|
|
msgList: [], //当前点击的账号消息列表
|
|
|
- userName: ""
|
|
|
+ userName: "",
|
|
|
};
|
|
|
},
|
|
|
//监听属性 类似于data概念
|
|
|
@@ -429,7 +432,7 @@ export default {
|
|
|
this.fullHeight = val;
|
|
|
this.timer = true;
|
|
|
let that = this;
|
|
|
- setTimeout(function() {
|
|
|
+ setTimeout(function () {
|
|
|
//防止过度调用监测事件,导致卡顿
|
|
|
that.timer = false;
|
|
|
}, 400);
|
|
|
@@ -472,7 +475,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
// 测试
|
|
|
},
|
|
|
//方法集合
|
|
|
@@ -516,21 +519,21 @@ export default {
|
|
|
data: this.qs.stringify({
|
|
|
page: this.page,
|
|
|
page_item: "100000000",
|
|
|
- org_name: ""
|
|
|
- })
|
|
|
+ org_name: "",
|
|
|
+ }),
|
|
|
})
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
if (res.data.data.page_list.length !== 0) {
|
|
|
var obj = {
|
|
|
org_name: "全部",
|
|
|
- id: ""
|
|
|
+ id: "",
|
|
|
};
|
|
|
var data = res.data.data.page_list;
|
|
|
this.data = [obj, ...data]; // 左侧组织列表
|
|
|
}
|
|
|
this.loading2 = false;
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
+ .catch((err) => {
|
|
|
this.loading2 = false;
|
|
|
});
|
|
|
},
|
|
|
@@ -545,10 +548,10 @@ export default {
|
|
|
page_item: "20",
|
|
|
real_name: this.nameVal, //用户名称
|
|
|
mobile: this.phoneVal, // 电话
|
|
|
- org_id: this.org_id
|
|
|
- })
|
|
|
+ org_id: this.org_id,
|
|
|
+ }),
|
|
|
})
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
if (res.data.data.total_item !== 0) {
|
|
|
var data = res.data.data.page_list;
|
|
|
var list = [];
|
|
|
@@ -561,7 +564,7 @@ export default {
|
|
|
this.loading = false;
|
|
|
}
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
+ .catch((err) => {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
@@ -578,8 +581,8 @@ export default {
|
|
|
recv_user_id: data.user_id,
|
|
|
data: {
|
|
|
msg_status: false,
|
|
|
- msg_info: ""
|
|
|
- }
|
|
|
+ msg_info: "",
|
|
|
+ },
|
|
|
};
|
|
|
this.websock.send(JSON.stringify(obj)); // 获取聊天记录
|
|
|
var readObj = {};
|
|
|
@@ -588,8 +591,8 @@ export default {
|
|
|
send_user_id: data.user_id,
|
|
|
data: {
|
|
|
msg_status: false,
|
|
|
- msg_info: ""
|
|
|
- }
|
|
|
+ msg_info: "",
|
|
|
+ },
|
|
|
};
|
|
|
this.websock.send(JSON.stringify(readObj)); // 消息已读
|
|
|
this.dialogVisible = true;
|
|
|
@@ -609,8 +612,8 @@ export default {
|
|
|
recv_user_id: data.user_id,
|
|
|
data: {
|
|
|
msg_status: false,
|
|
|
- msg_info: ""
|
|
|
- }
|
|
|
+ msg_info: "",
|
|
|
+ },
|
|
|
};
|
|
|
this.websock.send(JSON.stringify(obj));
|
|
|
// // 登录房间
|
|
|
@@ -676,10 +679,10 @@ export default {
|
|
|
// 当音视频通话关闭时的回调
|
|
|
handleClose(done) {
|
|
|
this.$confirm("目前正在音视频通话中,确认关闭?")
|
|
|
- .then(_ => {
|
|
|
+ .then((_) => {
|
|
|
done();
|
|
|
})
|
|
|
- .catch(_ => {});
|
|
|
+ .catch((_) => {});
|
|
|
},
|
|
|
|
|
|
// 发送消息
|
|
|
@@ -689,7 +692,7 @@ export default {
|
|
|
this.$message({
|
|
|
message: "不能发送空白消息!",
|
|
|
type: "warning",
|
|
|
- duration: 1500
|
|
|
+ duration: 1500,
|
|
|
});
|
|
|
}
|
|
|
this.input = "";
|
|
|
@@ -701,8 +704,8 @@ export default {
|
|
|
recv_user_id: this.getUserObj.user_id,
|
|
|
data: {
|
|
|
msg_status: false,
|
|
|
- msg_info: this.input
|
|
|
- }
|
|
|
+ msg_info: this.input,
|
|
|
+ },
|
|
|
};
|
|
|
var v = JSON.stringify(obj);
|
|
|
this.websock.send(v);
|
|
|
@@ -734,7 +737,7 @@ export default {
|
|
|
this.websock = new window.WebSocket(
|
|
|
this.url + "&token=" + localStorage.getItem("session")
|
|
|
);
|
|
|
- this.websock.onopen = event => {
|
|
|
+ this.websock.onopen = (event) => {
|
|
|
console.log("WebSocket:已连接");
|
|
|
console.log(event);
|
|
|
// 发送消息 - 获取对话列表
|
|
|
@@ -744,12 +747,12 @@ export default {
|
|
|
recv_user_id: "",
|
|
|
data: {
|
|
|
msg_status: false,
|
|
|
- msg_info: ""
|
|
|
- }
|
|
|
+ msg_info: "",
|
|
|
+ },
|
|
|
};
|
|
|
this.websock.send(JSON.stringify(obj1));
|
|
|
};
|
|
|
- this.websock.onmessage = event => {
|
|
|
+ this.websock.onmessage = (event) => {
|
|
|
// console.log("WebSocket:消息");
|
|
|
var data = JSON.parse(event.data);
|
|
|
if (data.action == "none") {
|
|
|
@@ -778,8 +781,8 @@ export default {
|
|
|
recv_user_id: this.getUserObj.user_id,
|
|
|
data: {
|
|
|
msg_status: false,
|
|
|
- msg_info: ""
|
|
|
- }
|
|
|
+ msg_info: "",
|
|
|
+ },
|
|
|
};
|
|
|
this.websock.send(JSON.stringify(obj));
|
|
|
} else if (data.action == "recv_video") {
|
|
|
@@ -797,7 +800,7 @@ export default {
|
|
|
{ userID: this.UserID, userName: this.UserID },
|
|
|
{ userUpdate: true }
|
|
|
)
|
|
|
- .then(result => {
|
|
|
+ .then((result) => {
|
|
|
if (result == true) {
|
|
|
console.log("0000000000000000000000000000000000000登录成功");
|
|
|
this.plugFlow(); //推流
|
|
|
@@ -806,11 +809,11 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
- this.websock.onerror = event => {
|
|
|
+ this.websock.onerror = (event) => {
|
|
|
console.log("WebSocket:发生错误 ");
|
|
|
console.log(event);
|
|
|
};
|
|
|
- this.websock.onclose = event => {
|
|
|
+ this.websock.onclose = (event) => {
|
|
|
console.log("WebSocket:已关闭");
|
|
|
console.log(event);
|
|
|
};
|
|
|
@@ -841,7 +844,7 @@ export default {
|
|
|
this.$message({
|
|
|
message: "没人接听,请稍后重试",
|
|
|
type: "warning",
|
|
|
- duration: 2500
|
|
|
+ duration: 2500,
|
|
|
});
|
|
|
}
|
|
|
this.videoVisible = false;
|
|
|
@@ -887,7 +890,7 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
|
|
|
- this.zg.on("publisherStateUpdate", result => {
|
|
|
+ this.zg.on("publisherStateUpdate", (result) => {
|
|
|
// 推流状态更新回调
|
|
|
console.log("推流状态更新");
|
|
|
});
|
|
|
@@ -924,7 +927,7 @@ export default {
|
|
|
} else {
|
|
|
console.log("不兼容");
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
@@ -953,7 +956,7 @@ export default {
|
|
|
updated() {}, //生命周期 - 更新之后
|
|
|
beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
destroyed() {}, //生命周期 - 销毁完成
|
|
|
- activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+ activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|