提交 a74fc94f 编写于 作者: lyf's avatar lyf

Merge branch 'develop' into feat/yf

...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</div> </div>
<div class="viedo-btn-wrap" :id="rtc.viewslist[index] ? rtc.viewslist[index].id : ''"> <div class="viedo-btn-wrap" :id="rtc.viewslist[index] ? rtc.viewslist[index].id : ''">
<el-button class="call-btn" <el-button class="call-btn"
:class="{calling1: item.role == 1 && doctorTrtcEntryStatus== 3, calling2: item.role == 2 && userTrtcEntryStatus== 3}" :class="{calling1: item.role == 1 && doctorTrtcEntryStatus != 2, calling2: item.role == 2 && userTrtcEntryStatus != 2}"
@click="drivingCall(item)"> @click="drivingCall(item)">
{{ item.role == 1 ? showText(doctorTrtcEntryStatus) : showText(userTrtcEntryStatus)}} {{ item.role == 1 ? showText(doctorTrtcEntryStatus) : showText(userTrtcEntryStatus)}}
</el-button> </el-button>
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
memberList: [], memberList: [],
tid: "", // 群id tid: "", // 群id
diagnoseLogId: "", //问诊id diagnoseLogId: "", //问诊id
isMuted: false, isMuted: true,
liveInfoSave: {}, liveInfoSave: {},
userTrtcEntryStatus:'', userTrtcEntryStatus:'',
doctorTrtcEntryStatus:'' doctorTrtcEntryStatus:''
...@@ -181,18 +181,18 @@ export default { ...@@ -181,18 +181,18 @@ export default {
}, },
// 主动呼叫 // 主动呼叫
drivingCall(data) { drivingCall(data) {
if(data.role == 1 && this.doctorTrtcEntryStatus == 3){ if(data.role == 1 && this.doctorTrtcEntryStatus != 2){
return false; return false;
} }
if(data.role == 2 && this.userTrtcEntryStatus == 3){ if(data.role == 2 && this.userTrtcEntryStatus != 2){
return false; return false;
} }
console.log('--this.roomId', data, this.roomId);
let url = `/im/team/call/direct/`; let url = `/im/team/call/direct/`;
let params = { let params = {
imAccId: data.accId, imAccId: data.accId,
imTeamId: this.currentChat.tid, // imTeamId: this.currentChat.tid,
liveRoomId: this.roomId // liveRoomId: this.roomId
}; };
this.POST(url, params).then((res) => { this.POST(url, params).then((res) => {
if (res.code === "000000") { if (res.code === "000000") {
...@@ -202,7 +202,6 @@ export default { ...@@ -202,7 +202,6 @@ export default {
message: '呼叫成功', message: '呼叫成功',
type: "success", type: "success",
}); });
console.log('--data', data);
if(data.role == 1){ if(data.role == 1){
this.doctorTrtcEntryStatus = 3; this.doctorTrtcEntryStatus = 3;
} }
...@@ -224,6 +223,7 @@ export default { ...@@ -224,6 +223,7 @@ export default {
.then((res) => { .then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
let { liveInfo, memberList } = res.data; let { liveInfo, memberList } = res.data;
console.log('---liveInfo', liveInfo, memberList);
if (liveInfo) { if (liveInfo) {
this.startTime = liveInfo.startTimestamp; this.startTime = liveInfo.startTimestamp;
this.endTime = liveInfo.endTimestamp; this.endTime = liveInfo.endTimestamp;
...@@ -316,6 +316,7 @@ export default { ...@@ -316,6 +316,7 @@ export default {
.then(() => { .then(() => {
Promise.all([this.rtc.join()]).then((res) => { Promise.all([this.rtc.join()]).then((res) => {
this.ispending(); this.ispending();
this.muteLocalAudio();
let t = setTimeout(() => { let t = setTimeout(() => {
closeLoading(this); closeLoading(this);
this.muteLocalAudio(); this.muteLocalAudio();
...@@ -401,8 +402,15 @@ export default { ...@@ -401,8 +402,15 @@ export default {
if (item.liveUserId == id) { if (item.liveUserId == id) {
item.status = 2; item.status = 2;
this.setTime(item.role); this.setTime(item.role);
if(item.role == 1){
this.doctorTrtcEntryStatus = 1;
}
if(item.role == 2){
this.userTrtcEntryStatus = 1;
}
} }
}); });
console.log('---this.addNewMember', this.memberList, id);
}, },
// 用户下线 // 用户下线
removeMember(id) { removeMember(id) {
...@@ -411,6 +419,7 @@ export default { ...@@ -411,6 +419,7 @@ export default {
item.status = 3; item.status = 3;
} }
}); });
console.log('---this.removeMember', this.memberList, id);
}, },
//设置进行时长 1表示为问诊 2为接诊 3为问诊开始 4为问诊结束 //设置进行时长 1表示为问诊 2为接诊 3为问诊开始 4为问诊结束
setTime(flag) { setTime(flag) {
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.consultationlist { .consultationlist {
padding: 25px; padding: 25px;
width: 100%; width: 100%;
......
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.diagnoseAdvice-wrap{ .diagnoseAdvice-wrap{
position: absolute; position: absolute;
top: 125px; top: 125px;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div class="right-status" :class="{ grey: 'returnStatus ==', org: '' }"> <div class="right-status" :class="{grey: item.returnStatus >= 5, org: item.returnStatus == 1}">
{{ returnStatusText }} {{returnStatusText}}
</div> </div>
<!-- <div class="right-time">--> <!-- <div class="right-time">-->
<!-- 已经问诊--> <!-- 已经问诊-->
...@@ -188,15 +188,15 @@ export default { ...@@ -188,15 +188,15 @@ export default {
returnStatusText() { returnStatusText() {
switch (this.item.returnStatus) { switch (this.item.returnStatus) {
case 1: case 1:
return "待处理"; return '待处理'
case 2: case 2:
return "问诊进行中"; return '问诊进行中'
case 3: case 3:
return "未开始"; return '未开始'
case 4: case 4:
return "问诊已结束"; return '问诊已完成'
case 5: case 5:
return "已取消"; return '已取消'
default: default:
return "暂无"; return "暂无";
} }
......
...@@ -80,6 +80,14 @@ export default { ...@@ -80,6 +80,14 @@ export default {
style: `float:right;margin-top:${30}px;`, style: `float:right;margin-top:${30}px;`,
on: { on: {
click: function () { click: function () {
if(state.showChat){
_VM.$message({
message: '不可同时进入多个诊室,请先退出已进入的诊室,再试。',
type: "warning",
duration:1000
});
return false;
}
store.dispatch('gotoInquiry', payload); store.dispatch('gotoInquiry', payload);
cn.close(); cn.close();
}, },
......
...@@ -54,7 +54,7 @@ class RtcClient { ...@@ -54,7 +54,7 @@ class RtcClient {
userId: this.userId_, userId: this.userId_,
mirror: true mirror: true
}); });
// this.startRTC() this.startRTC()
} catch (e) { } catch (e) {
console.error('加入房间失败 ' + e); console.error('加入房间失败 ' + e);
this.vueInstance.reloadfn() this.vueInstance.reloadfn()
...@@ -198,6 +198,8 @@ class RtcClient { ...@@ -198,6 +198,8 @@ class RtcClient {
//对于本地流,调用该方法会触发远端 Client.on('unmute-audio') 事件。 //对于本地流,调用该方法会触发远端 Client.on('unmute-audio') 事件。
//音频轨道默认是开启的,若你调用 muteAudio() 后可用该方法重新启用音频。 //音频轨道默认是开启的,若你调用 muteAudio() 后可用该方法重新启用音频。
unmuteLocalAudio() { unmuteLocalAudio() {
const a = this.localStream_.getAudioTrack();
console.log('---a',a);
this.localStream_.unmuteAudio(); this.localStream_.unmuteAudio();
} }
......
...@@ -31,10 +31,8 @@ ...@@ -31,10 +31,8 @@
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from "vuex";
import { setTimeout } from "timers";
import { isNotEmptyUtils } from "../../utils/utils";
import { getInnerLoginUrl } from "../../utils"; import { getInnerLoginUrl } from "../../utils";
const BUILD_ENV = process.env.BUILD_ENV;
let vm = null; let vm = null;
export default { export default {
props: { props: {
...@@ -82,7 +80,8 @@ export default { ...@@ -82,7 +80,8 @@ export default {
isSuper:false, isSuper:false,
userID: userId userID: userId
}; };
this.$store.dispatch( 'socket/initSocket',{url: 'https://dev-sockets.yunqueyi.com',userId: userId}) const u = this.getSocketUrl(BUILD_ENV);
this.$store.dispatch( 'socket/initSocket',{url: u,userId: userId})
vueMenuDtos.map( item => { vueMenuDtos.map( item => {
if(item.index.indexOf('administrators') > -1){ if(item.index.indexOf('administrators') > -1){
// 超级管理员 // 超级管理员
...@@ -126,6 +125,27 @@ export default { ...@@ -126,6 +125,27 @@ export default {
if (navList.indexOf(path) == -1) { if (navList.indexOf(path) == -1) {
this.$router.push(`/${navList[0]}`); this.$router.push(`/${navList[0]}`);
} }
},
getSocketUrl (env){
let url = '';
switch(env) {
case 'development':
url ='https://dev-sockets.yunqueyi.com';
break;
case 'test':
url ='https://test1-sockets.yunqueyi.com';
break;
case 'uat':
url ='https://uat-sso-sockets.yunqueyi.com';
break;
case 'pro':
url ='https://sso-sockets.yunqueyi.com';
break;
default:
url ='https://dev-sockets.yunqueyi.com';
break;
}
return url
} }
} }
}; };
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册