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

save

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