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

修改呼出规则

上级 9fb217cc
......@@ -6,14 +6,6 @@
{{ item.diagnoseLogId }} 
<span class="dep">{{ item.department }}</span>
</div>
<div class="talk">
<i :class="diagnoseTypeIcon"></i>
{{ diagnoseType }}
</div>
<div class="time">
<i class="appointment"></i><span>{{ appointBeginTime }}</span
>-<span>{{ appointEndTime }}</span>
</div>
</div>
<div class="right">
<div
......@@ -27,6 +19,16 @@
<!-- </div>-->
</div>
</div>
<div class="tag-container">
<div class="talk">
<i class="talk-icon" :class="diagnoseTypeIcon"></i
><span>{{ diagnoseType }}</span>
</div>
<div class="time">
<i class="appointment"></i><span>{{ appointBeginTime }}</span
>-<span>{{ appointEndTime }}</span>
</div>
</div>
<div class="line mt30">
<div class="inquiry-user-container">
<div class="inquiry-user">
......@@ -46,21 +48,24 @@
</span>
<span>接诊医生</span>
</div>
<div>
<span class="info-phone">
<div class="info-container">
<div class="info-phone">
{{ item.doctorMobile }}
</span>
<span class="info-call-time" v-if="item.doctorCallTime">
{{ pastDoctorCallTime }}小时前呼叫
</span>
<span class="info-calling" v-if="doctorCallKfStatus == 1">
</div>
<div class="info-call-time" v-if="item.doctorCallTime">
{{ pastDoctorCallTime }}前呼叫
</div>
<div class="info-calling" v-if="doctorCallKfStatus == 1">
<img :src="infocallImg" alt="" />
</span>
</div>
</div>
</div>
</div>
<div class="call-status" v-if="item.diagnoseType == 1 || item.diagnoseType == 2">
<div
class="call-status"
v-if="item.diagnoseType == 1 || item.diagnoseType == 2"
>
<img
v-if="isCall"
@click="drivingCall(item.doctorId, 2)"
......@@ -70,9 +75,8 @@
</div>
</div>
<div class="line-btn" @click="openChat">
<!-- <span v-if="isDoctorChat">正在呼叫接诊医生,进入诊室</span>-->
<!-- <span v-else-if="isUserChat">正在呼叫医助,进入诊室</span>-->
<span>进入诊室</span>
<span v-if="userCallKfStatus==1">正在呼叫医助,进入诊室</span>
<span v-else>进入诊室</span>
</div>
</div>
<div class="inquiry-user-container">
......@@ -93,21 +97,24 @@
</span>
<span>助诊医生</span>
</div>
<div>
<span class="info-phone">
<div class="info-container">
<div class="info-phone">
{{ item.userMobile }}
</span>
<span class="info-call-time" v-if="item.userCallTime">
{{ pastUserCallTime }}小时前呼叫
</span>
<span class="info-calling" v-if="userCallKfStatus == 1">
</div>
<div class="info-call-time" v-if="item.userCallTime">
{{ pastUserCallTime }}前呼叫
</div>
<div class="info-calling" v-if="userCallKfStatus == 1">
<img :src="infocallImg" alt="" />
</span>
</div>
</div>
</div>
</div>
<div class="call-status" v-if="item.diagnoseType == 1 || item.diagnoseType == 2">
<div
class="call-status"
v-if="item.diagnoseType == 1 || item.diagnoseType == 2"
>
<img
v-if="isCall"
@click="drivingCall(item.userId, 1)"
......@@ -157,6 +164,9 @@ export default {
created() {},
mounted() {
console.log("this.item", this.item);
if(this.item.returnStatus==4||this.item.returnStatus==5){
return
}
let nowData = new Date().getTime();
let timeleft = this.item.appointBeginTime - nowData;
if (timeleft < 120000 && nowData < this.item.appointEndTime) {
......@@ -165,11 +175,6 @@ export default {
} else {
this.isCall = true;
}
// if (this.appointBeginTime > 0) {
// this.time=this.timeleft
// this.down();
// }
},
computed: {
......@@ -244,7 +249,7 @@ export default {
},
pastUserCallTime() {
if (this.item.userCallTime) {
return this.formatDateData(this.item.userCallTime)
return this.formatDateData(this.item.userCallTime);
} else {
return null;
}
......@@ -254,7 +259,7 @@ export default {
},
pastDoctorCallTime() {
if (this.item.doctorCallTime) {
return this.formatDateData(this.item.doctorCallTime)
return this.formatDateData(this.item.doctorCallTime);
} else {
return null;
}
......@@ -265,13 +270,25 @@ export default {
},
methods: {
formatDateData(time) {
let now_data = new Date().getTime();
let my_time= now_data- time
let hours = my_time / 1000 / 60 / 60 ;
let hoursRound = Math.floor(hours);
let minutes =my_time / 1000 / 60 - 60 * hoursRound;
let minutesRound = Math.floor(minutes);
return hoursRound+":"+minutesRound
let now_data = new Date().getTime();
let my_time = now_data - time;
let hours = my_time / 1000 / 60 / 60;
let hoursRound = Math.floor(hours);
let minutes = my_time / 1000 / 60 - 60 * hoursRound;
let minutesRound = Math.floor(minutes);
let seconds = (my_time / 1000 - 60 * 60 * hoursRound -60 * minutesRound).toFixed(0);
if(hoursRound>0&&minutesRound>0){
return hoursRound + "小时" + minutesRound+"分"+seconds+"秒";
}
if(hoursRound==0&&minutesRound>0){
return minutesRound+"分";
}
if(hoursRound==0&&minutesRound==0){
return seconds+"秒";
}
},
......@@ -305,6 +322,7 @@ export default {
},
// 主动呼叫 roletype 1:助诊医生 2:接诊医生
drivingCall(id, roletype) {
if (roletype == 1 && this.isUserChat) {
return false;
}
......@@ -324,7 +342,6 @@ export default {
if (roletype == 1) {
this.isUserChat = true;
} else {
console.log("ererer");
this.isDoctorChat = true;
}
} else {
......@@ -400,29 +417,6 @@ export default {
.dep {
font-size: 20px;
}
.talk {
margin-right: 5px;
display: inline-block;
width: 120px;
height: 24px;
background: #f0f2f5;
border-radius: 23px;
font-size: 14px;
color: #6a7990;
text-align: center;
line-height: 24px;
}
.time {
display: inline-block;
width: 217px;
height: 24px;
background: #f0f2f5;
border-radius: 23px;
font-size: 14px;
color: #6a7990;
text-align: center;
line-height: 24px;
}
}
.right {
.right-status {
......@@ -488,10 +482,11 @@ export default {
display: flex;
flex-direction: column;
justify-content: center;
.info-name-wrap{
.info-name-wrap {
display: flex;
align-items: center;
}
.info-name {
display: inline-block;
max-width: 85px;
......@@ -502,19 +497,31 @@ export default {
color: #02120f;
font-weight: bold;
}
.info-phone {
color: #6a7990;
font-size: 16px;
}
.info-call-time {
color: #ff5e57;
}
.info-calling {
width: 15px;
height: 15px;
display: inline-block;
img {
width: 100%;
.info-container {
display: flex;
justify-content: flex-start;
align-items: center;
flex-direction: row;
height: 25px;
line-height: 25px;
.info-phone {
color: #6a7990;
font-size: 16px;
}
.info-call-time {
color: #ff5e57;
}
.info-calling {
width: 15px;
height: 25px;
display: flex;
justify-content: center;
align-items: center;
img {
width: 15px;
height: 15px;
}
}
}
}
......@@ -562,6 +569,39 @@ export default {
}
}
}
.tag-container {
display: flex;
justify-content: flex-start;
.talk {
margin-right: 5px;
width: 120px;
height: 24px;
line-height: 24px;
background: #f0f2f5;
border-radius: 23px;
font-size: 14px;
color: #6a7990;
display: flex;
justify-content: center;
align-items: center;
.talk-icon {
margin-right: 5px;
}
}
.time {
display: flex;
justify-content: center;
align-items: center;
width: 217px;
height: 24px;
line-height: 24px;
background: #f0f2f5;
border-radius: 23px;
font-size: 14px;
color: #6a7990;
}
}
.mt30 {
margin-top: 30px;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册