提交 647a8b19 编写于 作者: 张磊's avatar 张磊

save

上级 d1f4c66e
......@@ -80,7 +80,6 @@ export default {
currentChat(newVal, oldVal) {
if(newVal !== oldVal && newVal.imTeamId){
const {imTeamId, diagnoseLogId} = this.currentChat;
console.log('---currentChat', this.currentChat);
this.tid = imTeamId|| "3854284100";
this.diagnoseLogId = diagnoseLogId || "38";
this.init();
......@@ -107,7 +106,6 @@ export default {
userSig: "",
userId: "",
viedoParams: null,
isMicOn: false,
askTime: 0, // 问诊医生接入时长
answerTime: 0, // 接诊医生接入时长
useTime: 0, // 问诊时长
......@@ -149,27 +147,20 @@ export default {
},
},
methods: {
init() {
if (this.checkChrome()) {
this.getViedoParams();
this.getInfo();
} else {
async init() {
if(!this.checkChrome()){
this.$nextTick(() => {
this.$refs.alert
.init({
this.$refs.alert.init({
confirmTxt: "我知道了",
title: `请下载新版Chrome浏览器`,
})
.then(() => {
closeLoading(this);
this.$router.go(-1);
})
.catch((err) => {
closeLoading(this);
this.$router.go(-1);
});
});
return false;
}
// 获取视频参数
this.getViedoParams();
const info = this.getInfo();
},
toggleVol () {
if(this.isMuted){
......@@ -192,8 +183,6 @@ export default {
this.POST(url, params).then((res) => {
if (res.code === "000000") {
// this.tid = this.$route.query.tid || "";
// this.diagnoseLogId = this.$route.query.diagnoseLogId || "";
this.getInfo(data);
} else {
this.$message({
......@@ -204,14 +193,12 @@ export default {
});
},
// 获取相关信息
getInfo(data) {
let role = data ? data.role : "";
getInfo() {
let url = `/im/team/detail?tid=${this.tid}`;
this.GET(url)
.then((res) => {
if (res.code == "000000") {
let { liveInfo, memberList } = res.data;
console.log('----memberList', memberList);
if (liveInfo) {
this.startTime = liveInfo.startTimestamp;
this.endTime = liveInfo.endTimestamp;
......@@ -219,52 +206,16 @@ export default {
this.roomId = Number(liveInfo.roomId);
this.type = liveInfo.liveType;
}
console.log('--memberList', memberList);
if (memberList && memberList.length) {
memberList.forEach((item) => {
if (role) {
if (item.role == 1) {
if (role == 1) {
this.memberList[0] = Object.assign(item, {
status: 1,
timeleft: 60,
});
}
//等待连接还是已经下麦 1为等待 2为进行中 3为下麦
}
if (item.role == 2) {
if (role == 2) {
this.memberList[1] = Object.assign(item, {
status: 1,
timeleft: 60,
});
}
}
} else {
if (item.role == 1) {
this.memberList[0] = Object.assign(item, {
status: 1,
timeleft: 0,
});
//等待连接还是已经下麦 1为等待 2为进行中 3为下麦
}
if (item.role == 2) {
this.memberList[1] = Object.assign(item, {
status: 1,
timeleft: 0,
});
}
}
//在当前群组中的角色 1: 问诊医生 2: 接诊医生 3: 居民 4: 其他
if (item.role == 4) {
this.userId = item.liveUserId;
}
});
}
this.getAppId();
} else {
this.getErr();
}
})
.catch(() => {
......@@ -369,22 +320,12 @@ export default {
console.log("获取视频参数数据失败");
});
},
// 切换话筒
taggleM() {
if (this.isMicOn) {
this.muteLocalAudio();
} else {
this.unmuteLocalAudio();
}
},
// 关闭mc
muteLocalAudio() {
this.isMicOn = false;
this.rtc.muteLocalAudio();
},
// 打开mc
unmuteLocalAudio() {
this.isMicOn = true;
this.rtc.unmuteLocalAudio();
},
// 显示文案
......@@ -499,10 +440,6 @@ export default {
}, 1000);
}
},
// 检查是否为chrome
checkChrome() {
return getBroswer().broswer == "Chrome";
},
// client离开房间
leave() {
this.rtc.leave();
......@@ -595,6 +532,10 @@ export default {
sessionStorage.removeItem("TIME_useTime");
sessionStorage.removeItem("TIME_loseTime");
},
// 检查是否为chrome
checkChrome() {
return getBroswer().broswer == "Chrome";
},
},
beforeDestroy() {
this.clearTime();
......
......@@ -33,8 +33,9 @@ export default {
uploadMusic
},
data() {
return{
diagnoseAdvice:'',
diagnoseAdvice: '',
illnessAudioUrls:[]
}
},
......@@ -44,8 +45,16 @@ export default {
default:false
},
},
watch: {
showAdvice(newVal, oldVal) {
if(newVal !== oldVal && newVal){
const c = this.currentAdvice && this.currentAdvice.content;
console.log('ccc=cc=c=c=', c)
this.diagnoseAdvice = c;
}
}
},
created() {
},
mounted() {
......
......@@ -23,7 +23,9 @@
</div>
<div class="line mt30">
<div class="inquiry-user">
<div class="inquiry-user-img"> <el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></el-avatar></div>
<div class="inquiry-user-img">
<el-avatar :src="item.doctorImageUrl"></el-avatar>
</div>
<div class="inquiry-user-info">
<div>
<span class="info-name">
......@@ -42,7 +44,9 @@
</div>
</div>
<div class="inquiry-user">
<div class="inquiry-user-img"> <el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></el-avatar></div>
<div class="inquiry-user-img">
<el-avatar :src="item.userImageUrl"></el-avatar>
</div>
<div class="inquiry-user-info">
<div>
<span class="info-name">
......@@ -63,7 +67,7 @@
</div>
<div class="line mt20">
<div class="line-btn" @click="openChat">进入诊室 </div>
<div class="line-btn" @click="openAdvice">诊断建议 <div class="line-btn-tap">未写</div></div>
<div class="line-btn" @click="openAdvice">诊断建议 <div class="line-btn-tap" v-if="item.adviceStatus && item.adviceStatus == 2">未写</div></div>
</div>
</div>
</template>
......
......@@ -125,7 +125,6 @@ class RtcClient {
this.isPublished_ = true;
// 手动将麦克风打开
this.unmuteLocalAudio()
this.vueInstance.isMicOn = true
}).catch(error => {
console.log('本地流发布失败')
this.isPublished_ = false;
......@@ -190,6 +189,7 @@ class RtcClient {
//对于本地流,调用该方法会停止发送音频,远端会触发 Client.on('mute-audio') 事件。
//对于远端流,调用该方法会停止播放音频,但是仍然接收音频数据。
muteLocalAudio() {
console.log('--this.localStream_', this.localStream_);
this.localStream_.muteAudio();
}
......
......@@ -83,7 +83,6 @@ export default {
if (newdata !== olddata && newdata.userID) {
const s = storejs.get("soketQuest");
const d = s ? s.dateTime : new Date().format("yyyy-MM-dd");
console.log("---s", s, this.isSuperAdmin);
let id =
s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID;
const p = {
......@@ -101,6 +100,8 @@ export default {
data() {
const s = storejs.get("soketQuest");
const d = s ? s.dateTime : new Date().format("yyyy-MM-dd");
let id =
s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID;
return {
tabPosition: "1",
showChat: true,
......@@ -108,7 +109,7 @@ export default {
loading: false,
searchParam: {
dateTime: d,
operateUserId: "",
operateUserId: id,
returnStatus: 1,
pageSize: 1,
pageNo: 1,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册