提交 85aaacef 编写于 作者: 张磊's avatar 张磊

Merge branch 'feat/zl' into 'develop'

Feat/zl

See merge request com.pica.cloud.education.frontend/pica-admin-consultation!65
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="top-left"> <div class="top-left">
<div class="time-message "> <div class="time-message ">
<p class="msg-img"> <p class="msg-img">
<img :src=" diagnoseType == 1 ? im_text : im_video" alt /> <img :src="currentChat.diagnoseType == 2 ? im_text : im_video" />
</p> </p>
<span>{{ diagnoseType }}</span> <span>{{ diagnoseType }}</span>
</div> </div>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="main"> <div class="main" v-if="currentChat.diagnoseType == 1 || currentChat.diagnoseType == 2">
<div <div
class="viedo-wrapper" class="viedo-wrapper"
v-for="(item, index) of memberList" v-for="(item, index) of memberList"
...@@ -34,16 +34,16 @@ ...@@ -34,16 +34,16 @@
<p class="text-num">{{item.role == 1 ? currentChat.doctorMobile : currentChat.userMobile}}</p> <p class="text-num">{{item.role == 1 ? currentChat.doctorMobile : currentChat.userMobile}}</p>
</div> </div>
</div> </div>
<div :class="{viedowrap:currentChat.diagnoseType == 2}" :id="rtc.viewslist[index] ? rtc.viewslist[index].id : ''">
<div class="viedo"> </div>
<div class="viedo-container" v-if="rtc.viewslist[index]" :id="rtc.viewslist[index] ? rtc.viewslist[index].id : ''"></div> <div class="viedo-btn-wrap" :id="rtc.viewslist[index] ? rtc.viewslist[index].id : ''">
<el-button class="call-btn" :disabled="item.status === 2" @click="drivingCall(item)" > <el-button class="call-btn"
{{ showText(item.status, item.role, item) }} :class="{calling1: item.role == 1 && doctorTrtcEntryStatus== 3, calling2: item.role == 2 && userTrtcEntryStatus== 3}"
@click="drivingCall(item)">
{{ item.role == 1 ? showText(doctorTrtcEntryStatus) : showText(userTrtcEntryStatus)}}
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="vedio-man"> <div class="vedio-man">
<p class="man-img" @click="toggleVol"> <p class="man-img" @click="toggleVol">
...@@ -84,9 +84,11 @@ export default { ...@@ -84,9 +84,11 @@ export default {
watch: { watch: {
currentChat(newVal, oldVal) { currentChat(newVal, oldVal) {
if(newVal !== oldVal && newVal.imTeamId){ if(newVal !== oldVal && newVal.imTeamId){
const {imTeamId, diagnoseLogId} = this.currentChat; const {imTeamId, diagnoseLogId, doctorTrtcEntryStatus, userTrtcEntryStatus} = this.currentChat;
this.tid = imTeamId|| "3854284100"; this.tid = imTeamId|| "3854284100";
this.diagnoseLogId = diagnoseLogId || "38"; this.diagnoseLogId = diagnoseLogId || "38";
this.doctorTrtcEntryStatus = doctorTrtcEntryStatus;
this.userTrtcEntryStatus = userTrtcEntryStatus;
this.init(); this.init();
} }
} }
...@@ -127,7 +129,9 @@ export default { ...@@ -127,7 +129,9 @@ export default {
tid: "", // 群id tid: "", // 群id
diagnoseLogId: "", //问诊id diagnoseLogId: "", //问诊id
isMuted: false, isMuted: false,
liveInfoSave: {} liveInfoSave: {},
userTrtcEntryStatus:'',
doctorTrtcEntryStatus:''
}; };
}, },
created() { created() {
...@@ -177,6 +181,13 @@ export default { ...@@ -177,6 +181,13 @@ export default {
}, },
// 主动呼叫 // 主动呼叫
drivingCall(data) { drivingCall(data) {
if(data.role == 1 && this.doctorTrtcEntryStatus == 3){
return false;
}
if(data.role == 2 && this.userTrtcEntryStatus == 3){
return false;
}
let url = `/im/team/call/direct/`; let url = `/im/team/call/direct/`;
let params = { let params = {
imAccId: data.accId, imAccId: data.accId,
...@@ -185,7 +196,19 @@ export default { ...@@ -185,7 +196,19 @@ export default {
}; };
this.POST(url, params).then((res) => { this.POST(url, params).then((res) => {
if (res.code === "000000") { if (res.code === "000000") {
this.getInfo(data); // this.getInfo(data);
// this.rtc.join()
this.$message({
message: '呼叫成功',
type: "success",
});
console.log('--data', data);
if(data.role == 1){
this.doctorTrtcEntryStatus = 3;
}
if(data.role == 2){
this.userTrtcEntryStatus = 3;
}
} else { } else {
this.$message({ this.$message({
message: res.message, message: res.message,
...@@ -338,7 +361,7 @@ export default { ...@@ -338,7 +361,7 @@ export default {
this.rtc.unmuteLocalAudio(); this.rtc.unmuteLocalAudio();
}, },
// 显示文案 // 显示文案
showText(status, role) { showText(status) {
let text = ""; let text = "";
switch (status) { switch (status) {
case 1: case 1:
...@@ -663,13 +686,6 @@ export default { ...@@ -663,13 +686,6 @@ export default {
margin-left: 5px; margin-left: 5px;
color: #fff; color: #fff;
.time-content { .time-content {
.call-btn {
display: flex;
justify-content: center;
align-items: center;
min-width: 100px;
margin-bottom: 5px;
}
font-size: 12px; font-size: 12px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -677,9 +693,7 @@ export default { ...@@ -677,9 +693,7 @@ export default {
align-items: flex-end; align-items: flex-end;
} }
} }
.viedo { .viedo-btn-wrap {
.call-btn{ .call-btn{
width: 173px; width: 173px;
height: 38px; height: 38px;
...@@ -689,6 +703,9 @@ export default { ...@@ -689,6 +703,9 @@ export default {
margin-top: 15px; margin-top: 15px;
border: none; border: none;
} }
.calling1, .calling2 {
background: #9FC8C0;
}
.viedo-container{ .viedo-container{
width: 100px; width: 100px;
...@@ -702,8 +719,9 @@ export default { ...@@ -702,8 +719,9 @@ export default {
// bottom: 0; // bottom: 0;
// margin: auto; // margin: auto;
} }
}
.viedowrap{
height: 180px;
} }
} }
.vedio-man{ .vedio-man{
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
<div class="right-status" :class="{grey: 'returnStatus ==', org: ''}"> <div class="right-status" :class="{grey: 'returnStatus ==', org: ''}">
{{returnStatusText}} {{returnStatusText}}
</div> </div>
<div class="right-time"> <!-- <div class="right-time">-->
已经问诊 <!-- 已经问诊-->
</div> <!-- </div>-->
</div> </div>
</div> </div>
<div class="line mt30"> <div class="line mt30">
...@@ -37,9 +37,12 @@ ...@@ -37,9 +37,12 @@
<span class="info-phone"> <span class="info-phone">
{{item.doctorMobile}} {{item.doctorMobile}}
</span> </span>
<span class="info-call-time" v-if="item.doctorCallKfStatus == 1"> <span class="info-call-time" v-if="item.doctorCallTime">
{{doctorCallTime}}小时前呼叫 {{doctorCallTime}}小时前呼叫
</span> </span>
<span class="info-calling" v-if="item.doctorCallKfStatus == 1">
<img :src="infocallImg" alt="">
</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -58,9 +61,12 @@ ...@@ -58,9 +61,12 @@
<span class="info-phone"> <span class="info-phone">
{{item.userMobile}} {{item.userMobile}}
</span> </span>
<span class="info-call-time" v-if="item.userCallKfStatus == 1"> <span class="info-call-time" v-if="item.userCallTime">
{{userCallTime}}小时前呼叫 {{userCallTime}}小时前呼叫
</span> </span>
<span class="info-calling" v-if="item.userCallKfStatus == 1">
<img :src="infocallImg" alt="">
</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -77,7 +83,7 @@ import { mapState } from "vuex"; ...@@ -77,7 +83,7 @@ import { mapState } from "vuex";
export default { export default {
data() { data() {
return { return {
doctorIncomingcallImg: require('@/assets/image/workbench/doctorCallcustomer.gif') infocallImg: require('@/assets/image/workbench/calling.png')
}; };
}, },
props:{ props:{
...@@ -292,6 +298,14 @@ export default { ...@@ -292,6 +298,14 @@ export default {
.info-call-time{ .info-call-time{
color: #FF5E57; color: #FF5E57;
} }
.info-calling{
width: 15px;
height: 15px;
display: inline-block;
img{
width: 100%;
}
}
} }
} }
.line-btn{ .line-btn{
......
...@@ -37,7 +37,7 @@ class RtcClient { ...@@ -37,7 +37,7 @@ class RtcClient {
// 加入房间 // 加入房间
async join() { async join() {
if (this.isJoined_) { if (this.isJoined_) {
// alert('抱歉,您已经在房间里面为了') alert('抱歉,您已经在房间里面为了')
return; return;
} }
try { try {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册