<template> <div id="CesiumVue"> <swqj3Dmap @showcall='showcall(arguments)'/> <div id="SHIPINTONGHUA" @click="spthClick('15824808463')"> 点击进行视频通话 </div> <el-dialog title="视频对话" :visible.sync="dialogVisible" width="700px" :close-on-click-modal="false" @close="closeDialog()" > <div id="TongHuaBox" v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" > <!-- <router-view ref="TongHua"></router-view> --> <div style="height: 500px; position: relative;overflow:hidden"> <Callss ref="TongHua" :partentInfo="partentInfo"></Callss> </div> </div> </el-dialog> </div> </template> <script> import Callss from "./../../components/call.vue"; import swqj3Dmap from "./swqj3Dmap"; var setting = window.RongCall.setting; export default { name: "CesiumVue", data: function () { return { dialogVisible: false, loading: false, unsrNo: "", RongLoginOkData: {}, partentInfo: {}, }; }, components: { Callss,swqj3Dmap }, methods: { //showcall调用人员的电话视频 showcall(val) { this.spthClick(val[0]) }, // 前端代码======================================================A // 关闭弹窗 closeDialog() { this.$refs.TongHua.hungup(); }, //视频通话按钮------------------------------------------------------------------- spthClick(peopleNo) { console.log("人员编号是:" + peopleNo); this.login("PCUser", peopleNo); }, // 视频通话功能----------------------------------------------------------A login(PCUser, peopleNo) { this.loading = true; var userId = PCUser; let _this = this; // var loginDetail; console.log("第二次登录"); // let result = await this.$axios.login({ // userId, // }); this.$http .post(this.nozzle.login, { userId: userId, }) .then((result) => { if (result.data.code !== 200) { this.loading = false; _this.$message("登录失败, 请检查 CallLib Demo Server 是否启动"); } else { this.loading = false; setting.token = result.data.token; this.RongLoginOkData = result.data; let RongCall = window.RongCall; RongCall.initIM(setting); let query = { phone: peopleNo, userId: PCUser, }; this.partentInfo = query; this.dialogVisible = true; this.$refs.TongHua.inputCall(false); } }); }, // 视频通话功能----------------------------------------------------------B // 前端代码======================================================E }, mounted: function () {}, }; </script> <style scoped> #CesiumVue { width: 100%; height: 100%; } </style>