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

添加呼叫修改布局

上级 50deada7
<template> <template>
<div class="consultationlist" style=" user-select:none; "> <div class="consultationlist" style="user-select: none">
<div class="list"> <div class="list">
<div class="name">{{ operatorsItem.name || ''}}</div> <div class="name">{{ operatorsItem.name || "" }}</div>
<div class="details" @click="goworkBench"> <div class="details" @click="goworkBench">
<div class="handle">待处理: <span> 暂无</span></div> <!-- <div class="handle">待处理: <span> 暂无</span></div> -->
<div class="see"> <div class="see">
<a href="#">查看详情</a> <span>查看详情</span>
<i class="el-icon-arrow-right"></i> <i class="el-icon-arrow-right"></i>
</div> </div>
</div> </div>
...@@ -34,20 +34,20 @@ ...@@ -34,20 +34,20 @@
<script> <script>
export default { export default {
data() { data() {
return { return {};
}
}, },
props:{ props: {
operatorsItem:{ operatorsItem: {
type: Object, type: Object,
default:{} default: {},
}, },
workbenchAdminDate: { workbenchAdminDate: {
type: String, type: String,
default:'' default: "",
} },
}, },
created() { created() {
console.log("operatorsItem", this.operatorsItem);
}, },
methods: { methods: {
goworkBench() { goworkBench() {
...@@ -56,24 +56,23 @@ export default { ...@@ -56,24 +56,23 @@ export default {
operateUserId: this.operatorsItem.id, operateUserId: this.operatorsItem.id,
pageNo: 1, pageNo: 1,
pageSize: 6, pageSize: 6,
returnStatus: 1 returnStatus: 1,
}; };
this.$store.commit("clearRawCurrentCalList") this.$store.commit("clearRawCurrentCalList");
this.POST('/diagnose/socket/condition/update', p).then(res=>{ this.POST("/diagnose/socket/condition/update", p).then((res) => {
if(res.code == '000000'){ if (res.code == "000000") {
this.$store.commit("updateSoketQuest", p);
this.$store.commit('updateSoketQuest', p) this.$router.push({ path: "/workbench" });
this.$router.push({path:'/workbench'}) } else {
}else{ this.$message({
this.$message({ message: res.message,
message: res.message, type: "warning",
type: "warning", duration: 1000,
duration:1000 });
}); }
} });
}) },
} },
}
}; };
</script> </script>
...@@ -81,14 +80,13 @@ export default { ...@@ -81,14 +80,13 @@ export default {
.consultationlist { .consultationlist {
padding: 25px; padding: 25px;
width: 100%; width: 100%;
background: #ffffff; background: #ffffff;
border-radius: 18px; border-radius: 18px;
.list { .list {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.details { .details {
width: 192px; width: 120px;
height: 40px; height: 40px;
background: rgba(68, 146, 132, 0.24); background: rgba(68, 146, 132, 0.24);
border-radius: 20px; border-radius: 20px;
...@@ -96,30 +94,30 @@ export default { ...@@ -96,30 +94,30 @@ export default {
border: 1px solid #449284; border: 1px solid #449284;
display: flex; display: flex;
justify-content: space-evenly; justify-content: space-evenly;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
.handle { .handle {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #6a7990; color: #6a7990;
line-height: 18px; line-height: 18px;
span{ span {
font-size: 18px; font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #449284; color: #449284;
} }
} }
.see { .see {
a{ span {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #6a7990; color: #6a7990;
}
} }
} }
}
.name { .name {
font-size: 24px; font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
...@@ -127,22 +125,22 @@ export default { ...@@ -127,22 +125,22 @@ export default {
color: #063948; color: #063948;
} }
} }
.data{ .data {
margin-top: 20px; margin-top: 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.totallist{ .totallist {
font-size: 18px; font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #063948; color: #063948;
line-height: 25px; line-height: 25px;
} }
.statelist{ .statelist {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #6A7990; color: #6a7990;
} }
} }
} }
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
{{ diagnoseType }} {{ diagnoseType }}
</div> </div>
<div class="time"> <div class="time">
<i class="appointment"></i><span>{{ appointBeginTime }}</span>-<span>{{ appointEndTime }}</span> <i class="appointment"></i><span>{{ appointBeginTime }}</span
>-<span>{{ appointEndTime }}</span>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
...@@ -51,16 +52,21 @@ ...@@ -51,16 +52,21 @@
</div> </div>
</div> </div>
<div class="call-status"> <div class="call-status">
<img v-if="isCall" @click="drivingCall" :src="callout" alt="" /> <img
v-if="isCall"
@click="drivingCall(item.doctorId, 2)"
:src="isDoctorChat ? callouting : callout"
alt=""
/>
</div> </div>
</div> </div>
<div class="line-btn" @click="openChat"> <div class="line-btn" @click="openChat">
<span v-if="isChat">正在呼叫医助,进入诊室</span> <span v-if="isDoctorChat">正在呼叫接诊医生,进入诊室</span>
<span v-else-if="isUserChat">正在呼叫医助,进入诊室</span>
<span v-else>进入诊室</span> <span v-else>进入诊室</span>
</div> </div>
</div> </div>
<div class="inquiry-user-container"> <div class="inquiry-user-container">
<div class="inquiry-user"> <div class="inquiry-user">
<div class="inquiry-user-img"> <div class="inquiry-user-img">
<div class="avatar"> <div class="avatar">
...@@ -87,7 +93,12 @@ ...@@ -87,7 +93,12 @@
</div> </div>
</div> </div>
<div class="call-status"> <div class="call-status">
<img v-if="isCall" @click="drivingCall" :src="callout" alt="" /> <img
v-if="isCall"
@click="drivingCall(item.userId, 1)"
:src="isUserChat ? callouting : callout"
alt=""
/>
</div> </div>
</div> </div>
...@@ -113,9 +124,12 @@ export default { ...@@ -113,9 +124,12 @@ export default {
infocallImg: require("@/assets/image/workbench/calling.png"), infocallImg: require("@/assets/image/workbench/calling.png"),
callout: require("@/assets/image/workbench/callout.png"), callout: require("@/assets/image/workbench/callout.png"),
callouting: require("@/assets/image/workbench/callouting.png"), callouting: require("@/assets/image/workbench/callouting.png"),
timer:null, timer: null,
isChat:false, isChat: false,
isCall:false isUserChat: false,
isDoctorChat: false,
isCall: false,
accId: "",
}; };
}, },
props: { props: {
...@@ -126,17 +140,15 @@ export default { ...@@ -126,17 +140,15 @@ export default {
}, },
created() {}, created() {},
mounted() { mounted() {
console.log("this.item",this.item) console.log("this.item", this.item);
let nowData = new Date().getTime() let nowData = new Date().getTime();
let timeleft= this.item.appointBeginTime-nowData let timeleft = this.item.appointBeginTime - nowData;
if(timeleft<120000&&nowData<this.item.appointEndTime){ if (timeleft < 120000 && nowData < this.item.appointEndTime) {
clearInterval(this.timer); clearInterval(this.timer);
this.down(); this.down();
} } else {
else{ this.isCall = true;
this.isCall=true }
}
// if (this.appointBeginTime > 0) { // if (this.appointBeginTime > 0) {
// this.time=this.timeleft // this.time=this.timeleft
...@@ -201,43 +213,64 @@ export default { ...@@ -201,43 +213,64 @@ export default {
doctorCallTime() { doctorCallTime() {
return new Date(this.item.doctorCallTime).format("hh:mm"); return new Date(this.item.doctorCallTime).format("hh:mm");
}, },
nowtime(){ nowtime() {
return new Date().getTime()-this.item.appointBeginTime return new Date().getTime() - this.item.appointBeginTime;
} },
}, },
methods: { methods: {
down() { down() {
this.timer = setInterval(() => { this.timer = setInterval(() => {
let nowData = new Date().getTime() let nowData = new Date().getTime();
let timeleft= this.item.appointBeginTime-nowData let timeleft = this.item.appointBeginTime - nowData;
if(timeleft<120000&&nowData<this.item.appointEndTime){ if (timeleft < 120000 && nowData < this.item.appointEndTime) {
this.isCall=true this.isCall = true;
clearInterval(this.timer); clearInterval(this.timer);
} }
}, 1000); }, 1000);
}, },
getInfo(id) {
drivingCall() { let url = `/im/team/detail?tid=${this.item.imTeamId}`;
let url = `/im/team/call/direct/`; return this.GET(url)
let params = { .then((res) => {
imAccId: data.accId, if (res.code == "000000") {
imTeamId: this.item.imTeamId, let { memberList } = res.data;
liveRoomId: this.item.roomId console.log("---memberList", memberList);
}; if (memberList) {
this.POST(url, params).then((res) => { let accId = memberList.filter((val) => {
if (res.code === "000000") { return val.id == id;
this.$message({ });
message: '呼叫成功', return accId[0].accId;
type: "success", }
}); }
} else { })
this.$message({ .catch(() => {});
message: res.message, },
type: "warning", // 主动呼叫 roletype 1:助诊医生 2:接诊医生
}); drivingCall(id, roletype) {
} this.getInfo(id).then((res) => {
console.log(res)
let url = `/im/team/call/direct/`;
let params = {
imAccId: res,
imTeamId: this.item.imTeamId,
liveRoomId: this.item.roomId,
};
this.POST(url, params).then((res) => {
if (res.code === "000000") {
if (roletype == 1) {
this.isUserChat = true;
} else {
console.log("ererer")
this.isDoctorChat = true;
}
} else {
this.$message({
message: res.message,
type: "warning",
});
}
});
}); });
}, },
openChat() { openChat() {
...@@ -345,66 +378,66 @@ export default { ...@@ -345,66 +378,66 @@ export default {
color: #ff5e57; color: #ff5e57;
} }
} }
.inquiry-user-container{ .inquiry-user-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.inquiry-user { .inquiry-user {
display: flex;
justify-content: space-between;
margin-bottom: 20px;
.inquiry-user-img {
display: flex; display: flex;
flex-direction: column; justify-content: space-between;
justify-content: center; margin-bottom: 20px;
.avatar { .inquiry-user-img {
background: #dddddd;
border-radius: 36px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
.avatar {
background: #dddddd;
border-radius: 36px;
display: flex;
flex-direction: column;
justify-content: center;
}
} }
} .inquiry-user-info {
.inquiry-user-info { font-size: 14px;
font-size: 14px; margin-left: 10px;
margin-left: 10px; display: flex;
display: flex; flex-direction: column;
flex-direction: column; justify-content: center;
justify-content: center; margin-right: 10px;
margin-right: 10px; .info-name {
.info-name { font-size: 18px;
font-size: 18px; color: #02120f;
color: #02120f; font-weight: bold;
font-weight: bold; }
} .info-phone {
.info-phone { color: #6a7990;
color: #6a7990; font-size: 16px;
font-size: 16px; }
} .info-call-time {
.info-call-time { color: #ff5e57;
color: #ff5e57; }
} .info-calling {
.info-calling { width: 15px;
width: 15px; height: 15px;
height: 15px; display: inline-block;
display: inline-block; img {
img { width: 100%;
width: 100%; }
} }
} }
} .call-status {
.call-status {
width: 45px;
height: 46px;
cursor: pointer;
img {
width: 45px; width: 45px;
height: 46px; height: 46px;
cursor: pointer;
img {
width: 45px;
height: 46px;
}
} }
} }
} }
}
.line-btn { .line-btn {
cursor: pointer; cursor: pointer;
...@@ -431,8 +464,8 @@ export default { ...@@ -431,8 +464,8 @@ export default {
color: #ffffff; color: #ffffff;
line-height: 20px; line-height: 20px;
} }
span{ span {
font-weight: bold; font-weight: bold;
} }
} }
} }
......
...@@ -130,16 +130,18 @@ export default { ...@@ -130,16 +130,18 @@ export default {
width: 100%; width: 100%;
padding: 20px; padding: 20px;
.consultation-content { .consultation-content {
display: flex; display: grid;
flex-wrap: wrap; grid-template-columns: 33.3% 33.3% 33.3%;
grid-row-gap: 20px;
justify-content: space-between; // grid-column-gap: 20px;
overflow: hidden; overflow: hidden;
.consultation-li { .consultation-li {
min-width: 488px; width: 90%;
width: 49%; margin: 0 auto;
margin-bottom: 20px; display: flex;
justify-content: center;
} }
} }
} }
......
...@@ -176,6 +176,8 @@ export default { ...@@ -176,6 +176,8 @@ export default {
s.dateTime = val.format("yyyy-MM-dd"); s.dateTime = val.format("yyyy-MM-dd");
this.searchParam = s; this.searchParam = s;
}, },
search() { search() {
this.inquirySearch("clear"); this.inquirySearch("clear");
}, },
...@@ -328,6 +330,7 @@ export default { ...@@ -328,6 +330,7 @@ export default {
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
margin-top: 10px; margin-top: 10px;
padding: 0 20px;
} }
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册