提交 643377fe 编写于 作者: xiaoping.di's avatar xiaoping.di

大盘修改

上级 7de96d4e
import request from 'mn-template/plugins/http';
export const conditionUpdate = async(data) => {
return request({
url: '/diagnose/socket/condition/update',
data: data,
method: 'post',
});
export const conditionUpdate = async (data) => {
return request({
url: '/diagnose/socket/condition/update',
data: data,
method: 'post',
});
};
export const conditionNewList = async(data) => {
return request({
url: '/diagnose/admin/diagnose/operator/newList',
params: data,
method: 'get',
});
};
\ No newline at end of file
// 轮循 获取卡边正常信息和异常信息
export const conditionNewList = async (data) => {
return request({
url: '/diagnose/admin/diagnose/operator/newList',
data: data,
method: 'post',
});
};
// 诊断建议
export const doctorAdviceList = async (data) => {
return request({
url: `/diagnose/admin/diagnose/doctorAdvice/list/${data.diagnoseLogId}`,
method: 'get',
});
};
// 手动呼叫
export const manualCall = async (data) => {
return request({
url: '/diagnose/admin/diagnose/manual/call',
data: data,
method: 'post',
});
};
// 查询当前上级医生下排队的信息
export const waitPersonNum = async (doctorId) => {
return request({
url: `/admin/diagnose/queueList/${doctorId}`,
method: 'post',
});
};
import { teamDetail, callDirect } from '@/api/diagnosis';
import {
teamDetail,
callDirect,
doctorAdviceList,
manualCall,
} from '@/api/diagnosis';
import { createNamespacedHelpers } from 'vuex';
const { mapState } = createNamespacedHelpers('main');
export default {
props: {
item: {
type: Object,
default: () => {
return {};
},
waitPersonNum,
doctorAdviceList,
manualCall,
} from '@/api/workbench.js';
import { createNamespacedHelpers } from 'vuex';
const { mapState } = createNamespacedHelpers('main');
export default {
props: {
item: {
type: Object,
default: () => {
return {};
},
},
data() {
return {
callImg: require('@/assets/image/workbench/call.png'),
infocallImg: require('@/assets/image/workbench/calling.png'),
callouting: require('@/assets/image/workbench/remindalready.png'),
offline: require('@/assets/image/workbench/offline.png'),
manuacall: require('@/assets/image/workbench/maulcall.png'),
manuacallIng: require('@/assets/image/workbench/calling.gif'),
timer: null,
isChat: false,
isUserChat: false,
isDoctorChat: false,
isCall: false,
isManuacall: false,
isManuacallType: false,
accId: '',
mockData: [{}, {}, {}],
isShowWait: false,
};
orderType: {
// 订单类型
type: String,
default: '',
},
computed: {
...mapState({
showChat: (state) => state.showChat,
showAdvice: (state) => state.showAdvice,
}),
doctorCallStatus() {
switch (this.item.doctorCallStatus) {
key: {
// 订单类型
type: String,
default: '',
},
},
data() {
return {
callImg: require('@/assets/image/workbench/call.png'),
infocallImg: require('@/assets/image/workbench/calling.png'),
callouting: require('@/assets/image/workbench/remindalready.png'),
offline: require('@/assets/image/workbench/offline.png'),
manuacall: require('@/assets/image/workbench/maulcall.png'),
manuacallIng: require('@/assets/image/workbench/calling.gif'),
timer: null,
isChat: false,
isUserChat: false,
isDoctorChat: false,
isCall: false,
isManuacall: false,
isManuacallType: false,
accId: '',
waitPersonList: [],
isShowWait: false,
};
},
computed: {
...mapState({
showChat: (state) => state.showChat,
showAdvice: (state) => state.showAdvice,
}),
doctorCallStatus() {
switch (this.item.doctorCallStatus) {
case 1:
return '未拨打';
case 2:
......@@ -52,10 +62,10 @@ import {
return '已拨打完成';
default:
return '';
}
},
userCallStatus() {
switch (this.item.userCallStatus) {
}
},
userCallStatus() {
switch (this.item.userCallStatus) {
case 1:
return '未拨打';
case 2:
......@@ -66,10 +76,10 @@ import {
return '已拨打完成';
default:
return '';
}
},
diagnoseType() {
switch (this.item.diagnoseType) {
}
},
diagnoseType() {
switch (this.item.diagnoseType) {
case 1:
return '语音问诊';
case 2:
......@@ -78,10 +88,10 @@ import {
return '图文问诊';
default:
return '';
}
},
diagnoseTypeIcon() {
switch (this.item.diagnoseType) {
}
},
diagnoseTypeIcon() {
switch (this.item.diagnoseType) {
case 1:
return 'voice';
case 2:
......@@ -90,247 +100,277 @@ import {
return 'photo';
default:
return 'photo';
}
},
appointBeginTime() {
}
},
appointBeginTime() {
if (this.item.appointBeginTime) {
return new Date(this.item.appointBeginTime).format('hh:mm');
},
appointEndTime() {
} else {
return '';
}
},
appointEndTime() {
if (this.item.appointEndTime) {
return new Date(this.item.appointEndTime).format('hh:mm');
},
userCallTime() {
return new Date(this.item.userCallTime).format('hh:mm');
},
// 助诊呼叫状态
userCallKfStatus() {
return this.item.userCallKfStatus;
},
// 接诊呼叫状态
doctorCallKfStatus() {
return this.item.doctorCallKfStatus;
},
// 接诊 在线状态
doctorTrtcEntryStatus() {
return this.item.doctorTrtcEntryStatus;
},
// 助诊 在线状态
userTrtcEntryStatus() {
return this.item.userTrtcEntryStatus;
},
pastUserCallTime() {
if (this.item.userCallTime) {
return this.formatDateData(this.item.userCallTime);
} else {
return null;
}
},
doctorCallTime() {
return new Date(this.item.doctorCallTime).format('hh:mm');
},
pastDoctorCallTime() {
if (this.item.doctorCallTime) {
return this.formatDateData(this.item.doctorCallTime);
} else {
return null;
}
},
nowtime() {
return new Date().getTime() - this.item.appointBeginTime;
},
} else {
return '';
}
},
watch: {
item(newVal, oldVal) {
console.log(newVal, oldVal, 'newVal, oldVal');
if (newVal !== oldVal) {
if (newVal.doctorTrtcEntryStatus == 2) {
this.isDoctorChat = false;
}
if (newVal.userTrtcEntryStatus == 2) {
this.isUserChat = false;
}
if (newVal.doctorCallStatus !== oldVal.doctorCallStatus) {
this.isManuacall = false;
}
if (newVal.userCallStatus !== oldVal.userCallStatus) {
this.isManuacallType = false;
}
}
},
userCallTime() {
return new Date(this.item.userCallTime).format('hh:mm');
},
created() {},
mounted() {
if (this.item.returnStatus == 1 || this.item.returnStatus == 3) {
const nowData = new Date().getTime();
const timeleft = this.item.appointBeginTime - nowData;
if (timeleft < 120000 && nowData < this.item.appointEndTime) {
clearInterval(this.timer);
this.down();
} else {
this.isCall = true;
}
// 助诊呼叫状态
userCallKfStatus() {
return this.item.userCallKfStatus;
},
// 接诊呼叫状态
doctorCallKfStatus() {
return this.item.doctorCallKfStatus;
},
// 接诊 在线状态
doctorTrtcEntryStatus() {
return this.item.doctorTrtcEntryStatus;
},
// 助诊 在线状态
userTrtcEntryStatus() {
return this.item.userTrtcEntryStatus;
},
pastUserCallTime() {
if (this.item.userCallTime) {
return this.formatDateData(this.item.userCallTime);
} else {
return null;
}
},
doctorCallTime() {
return new Date(this.item.doctorCallTime).format('hh:mm');
},
pastDoctorCallTime() {
if (this.item.doctorCallTime) {
return this.formatDateData(this.item.doctorCallTime);
} else {
return null;
}
},
methods: {
manualDialing(type) {
if (this.doctorCallKfStatus === 1) {
return;
nowtime() {
return new Date().getTime() - this.item.appointBeginTime;
},
},
watch: {
item(newVal, oldVal) {
console.log(newVal, 'newValnewValnewVal');
console.log(newVal, oldVal, 'newVal, oldVal');
if (newVal !== oldVal) {
if (newVal.doctorTrtcEntryStatus == 2) {
this.isDoctorChat = false;
}
this.$confirm('确认要电话通知该医生吗?', '提示', {
confirmButtonText: '电话通知',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
let userMobilePhone = '';
let userId = '';
let doctorId = '';
let doctorMobilePhone = '';
if (type === 1) {
userMobilePhone = null;
userId = null;
doctorId = this.item.doctorId;
doctorMobilePhone = this.item.doctorMobile;
} else {
userMobilePhone = this.item.userMobile;
userId = this.item.userId;
doctorId = null;
doctorMobilePhone = null;
}
const params = {
diagnoseId: this.item.diagnoseLogId,
doctorId: doctorId,
doctorMobilePhone: doctorMobilePhone,
userId: userId,
userMobilePhone: userMobilePhone,
};
manualCall(params).then((res) => {
if (res.code === '000000') {
if (type === 1) {
this.isManuacall = true;
} else {
this.isManuacallType = true;
}
}
});
})
.catch(() => {
this.$message({
type: 'info',
message: '取消拨打电话',
});
});
},
formatDateData(time) {
const now_data = new Date().getTime();
const my_time = now_data - time;
const hours = my_time / 1000 / 60 / 60;
const hoursRound = Math.floor(hours);
const minutes = my_time / 1000 / 60 - 60 * hoursRound;
const minutesRound = Math.floor(minutes);
const seconds = (
my_time / 1000 -
60 * 60 * hoursRound -
60 * minutesRound
).toFixed(0);
if (hoursRound > 0 && minutesRound > 0) {
return hoursRound + '小时' + minutesRound + '分' + seconds + '秒';
if (newVal.userTrtcEntryStatus == 2) {
this.isUserChat = false;
}
if (hoursRound == 0 && minutesRound > 0) {
return minutesRound + '分';
if (newVal.doctorCallStatus !== oldVal.doctorCallStatus) {
this.isManuacall = false;
}
if (hoursRound == 0 && minutesRound == 0) {
return seconds + '秒';
if (newVal.userCallStatus !== oldVal.userCallStatus) {
this.isManuacallType = false;
}
},
down() {
this.timer = setInterval(() => {
const nowData = new Date().getTime();
const timeleft = this.item.appointBeginTime - nowData;
if (timeleft < 120000 && nowData < this.item.appointEndTime) {
this.isCall = true;
clearInterval(this.timer);
}
},
key(newVal, oldVal) {
console.log(newVal, oldVal);
},
},
created() {},
mounted() {
if (this.item.returnStatus == 1 || this.item.returnStatus == 3) {
const nowData = new Date().getTime();
const timeleft = this.item.appointBeginTime - nowData;
if (timeleft < 120000 && nowData < this.item.appointEndTime) {
clearInterval(this.timer);
this.down();
} else {
this.isCall = true;
}
}
},
methods: {
manualDialing(type) {
if (this.doctorCallKfStatus === 1) {
return;
}
this.$confirm('确认要电话通知该医生吗?', '提示', {
confirmButtonText: '电话通知',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
let userMobilePhone = '';
let userId = '';
let doctorId = '';
let doctorMobilePhone = '';
if (type === 1) {
userMobilePhone = null;
userId = null;
doctorId = this.item.doctorId;
doctorMobilePhone = this.item.doctorMobile;
} else {
userMobilePhone = this.item.userMobile;
userId = this.item.userId;
doctorId = null;
doctorMobilePhone = null;
}
}, 1000);
},
getInfo(id) {
return teamDetail({
tid: this.item.imTeamId,
})
.then((res) => {
if (res.code == '000000') {
const { memberList } = res.data;
console.log('---memberList', memberList);
if (memberList) {
const accId = memberList.filter((val) => {
return val.id == id;
});
return accId[0].accId;
}
}
})
.catch(() => {});
},
// 主动呼叫 roletype 1:助诊医生 2:接诊医生
drivingCall(id, roletype) {
if (roletype == 1 && this.isUserChat) {
return false;
}
if (roletype == 2 && this.isDoctorChat) {
return false;
}
this.getInfo(id).then((res) => {
const params = {
imAccId: res,
imTeamId: this.item.imTeamId,
liveRoomId: this.item.roomId,
diagnoseId: this.item.diagnoseLogId,
doctorId: doctorId,
doctorMobilePhone: doctorMobilePhone,
userId: userId,
userMobilePhone: userMobilePhone,
};
callDirect(params).then((res) => {
manualCall(params).then((res) => {
if (res.code === '000000') {
if (roletype == 1) {
this.isUserChat = true;
if (type === 1) {
this.isManuacall = true;
} else {
this.isDoctorChat = true;
this.isManuacallType = true;
}
} else {
this.$message({
message: res.message,
type: 'warning',
});
}
});
});
},
openChat() {
if (this.showChat) {
this.$message({
message: '不可同时进入多个诊室,请先退出已进入的诊室,再试。',
type: 'warning',
duration: 1000,
});
return false;
}
const i = this.item;
this.$store.dispatch('main/gotoInquiry', i);
},
openAdvice() {
if (this.showAdvice) {
})
.catch(() => {
this.$message({
message: '不可同时打开多个诊断建议,请先退出已打开的诊断建议,再试。',
type: 'warning',
duration: 1000,
type: 'info',
message: '取消拨打电话',
});
return false;
});
},
formatDateData(time) {
const now_data = new Date().getTime();
const my_time = now_data - time;
const hours = my_time / 1000 / 60 / 60;
const hoursRound = Math.floor(hours);
const minutes = my_time / 1000 / 60 - 60 * hoursRound;
const minutesRound = Math.floor(minutes);
const 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 + '秒';
}
},
down() {
this.timer = setInterval(() => {
const nowData = new Date().getTime();
const timeleft = this.item.appointBeginTime - nowData;
if (timeleft < 120000 && nowData < this.item.appointEndTime) {
this.isCall = true;
clearInterval(this.timer);
}
// const i = 11;
doctorAdviceList({
diagnoseLogId: this.item.diagnoseLogId,
}, 1000);
},
getInfo(id) {
return teamDetail({
tid: this.item.imTeamId,
})
.then((res) => {
if (res.code == '000000') {
const { memberList } = res.data;
console.log('---memberList', memberList);
if (memberList) {
const accId = memberList.filter((val) => {
return val.id == id;
});
return accId[0].accId;
}
}
})
.catch(() => {});
},
// 主动呼叫 roletype 1:助诊医生 2:接诊医生
drivingCall(id, roletype) {
if (roletype == 1 && this.isUserChat) {
return false;
}
if (roletype == 2 && this.isDoctorChat) {
return false;
}
this.getInfo(id).then((res) => {
const params = {
imAccId: res,
imTeamId: this.item.imTeamId,
liveRoomId: this.item.roomId,
};
callDirect(params).then((res) => {
if (res.code === '000000') {
if (roletype == 1) {
this.isUserChat = true;
} else {
this.isDoctorChat = true;
}
} else {
this.$message({
message: res.message,
type: 'warning',
});
}
});
});
},
openChat() {
if (this.showChat) {
this.$message({
message: '不可同时进入多个诊室,请先退出已进入的诊室,再试。',
type: 'warning',
duration: 1000,
});
return false;
}
const i = this.item;
this.$store.dispatch('main/gotoInquiry', i);
},
openAdvice() {
if (this.showAdvice) {
this.$message({
message: '不可同时打开多个诊断建议,请先退出已打开的诊断建议,再试。',
type: 'warning',
duration: 1000,
});
return false;
}
// const i = 11;
doctorAdviceList({
diagnoseLogId: this.item.diagnoseLogId,
})
.then((res) => {
if (res.code == '000000') {
this.$store.commit('main/updateShowAdvice', true);
this.$store.commit('main/updateCurrentAdvice', res.data);
} else {
this.$message({
message: res.message,
type: 'warning',
duration: 1000,
});
}
})
.catch((err) => {
console.log(err);
});
},
waitPersonFun() {
if (!this.isShowWait) {
console.log(this.item.doctorId, 'this.item.doctorId');
waitPersonNum(this.item.doctorId)
.then((res) => {
if (res.code == '000000') {
this.$store.commit('main/updateShowAdvice', true);
this.$store.commit('main/updateCurrentAdvice', res.data);
if (res.code === '000000') {
this.waitPersonList = res.data || [];
} else {
this.$message({
message: res.message,
......@@ -338,13 +378,18 @@ import {
duration: 1000,
});
}
this.isShowWait = !this.isShowWait;
})
.catch((err) => {
console.log(err);
this.isShowWait = !this.isShowWait;
this.$message({
message: '服务查询失败',
type: 'warning',
duration: 1000,
});
});
},
waitPersonFun() {
this.isShowWait = !this.isShowWait;
},
}
},
};
\ No newline at end of file
},
};
.inquiry-wrap {
box-sizing: border-box;
margin-bottom: 10px;
padding: 20px;
background: #ffffff;
border-radius: 18px;
user-select: none;
position: relative;
.line {
display: flex;
justify-content: space-between;
font-size: 14px;
color: #999999;
.left {
.time {
color: #ff5e57;
box-sizing: border-box;
margin-bottom: 10px;
padding: 20px;
background: #ffffff;
border-radius: 18px;
user-select: none;
position: relative;
.line {
display: flex;
justify-content: space-between;
font-size: 14px;
color: #999999;
.left {
.time {
color: #ff5e57;
font-size: 18px;
margin-top: 3px;
}
}
.right {
margin-left: 23px;
.orderno {
display: flex;
align-items: center;
margin-top: 3px;
.num {
font-size: 18px;
margin-top: 3px;
color: #02120f;
}
}
.right {
margin-left: 23px;
.orderno {
display: flex;
align-items: center;
margin-top: 3px;
.num {
font-size: 18px;
color: #02120f;
}
.copy {
font-size: 12px;
margin-left: 16px;
padding: 0 5px;
border: 1px solid #d9d9d9;
border-radius: 15px;
color: #212121;
}
.copy {
font-size: 12px;
margin-left: 16px;
padding: 0 5px;
border: 1px solid #d9d9d9;
border-radius: 15px;
color: #212121;
}
.grey {
color: #6a7990;
}
.grey {
color: #6a7990;
}
.org {
color: #ff5e57;
}
}
.superior-doctor {
width: 49%;
display: flex;
justify-content: flex-start;
align-items: flex-start;
.inquiry-user-img {
display: flex;
flex-direction: column;
justify-content: center;
position: relative;
width: 40px;
height: 40px;
.offline {
position: absolute;
left: -4px;
top: -4px;
z-index: 10;
}
.org {
color: #ff5e57;
.avatar {
position: absolute;
left: 0;
top: 0;
background: #dddddd;
border-radius: 36px;
display: flex;
flex-direction: column;
justify-content: center;
}
}
.superior-doctor{
width: 49%;
display: flex;
justify-content:flex-start;
align-items: flex-start;
.inquiry-user-img {
display: flex;
flex-direction: column;
justify-content: center;
position: relative;
width: 40px;
height: 40px;
.offline {
position: absolute;
left: -4px;
top: -4px;
z-index: 10;
}
.avatar {
position: absolute;
left: 0;
top: 0;
background: #dddddd;
border-radius: 36px;
display: flex;
flex-direction: column;
justify-content: center;
}
.inquiry-user-info {
font-size: 14px;
margin-left: 6px;
.info-name-wrap {
display: flex;
align-items: center;
}
.inquiry-user-info {
font-size: 14px;
margin-left: 6px;
.info-name-wrap {
display: flex;
align-items: center;
}
.info-name {
display: inline-block;
max-width: 85px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 18px;
color: #02120f;
font-weight: bold;
}
.info-name {
display: inline-block;
max-width: 85px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 18px;
color: #02120f;
font-weight: bold;
}
.info-container {
.info-container {
align-items: center;
flex-direction: row;
height: auto;
line-height: 30px;
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;
flex-direction: row;
height: auto;
line-height: 30px;
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;
}
}
img {
width: 15px;
height: 15px;
}
}
}
.manual-call-status {
}
.manual-call-status {
display: flex;
.manual-dialing {
margin-right: 5px;
cursor: pointer;
img {
margin-right: 5px;
cursor: pointer;
img {
width: 27px;
height: 48px;
}
}
}
.call-status {
// width: 45px;
// height: 46px;
img {
// width: 45px;
// height: 46px;
img {
cursor: pointer;
width: 27px;
height: 48px;
}
}
}
}
}
.basic-doctor{
width: 49%;
display:flex;
justify-content:flex-start;
.basic-user-img,.basic-user-info{
padding-right:6px;
.info-name-wrap{
display:flex;
align-items:center;
justify-content:space-between;
.info-name{
max-width: 85px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 18px;
color: #02120f;
font-weight: bold;
}
}
.info-container {
align-items: center;
flex-direction: row;
height: auto;
line-height: 30px;
line-height: 25px;
.info-phone {
color: #666;
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;
}
}
}
.basic-doctor {
width: 49%;
display: flex;
justify-content: flex-start;
.basic-user-img,
.basic-user-info {
padding-right: 6px;
.info-name-wrap {
display: flex;
align-items: center;
justify-content: space-between;
.info-name {
max-width: 85px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 18px;
color: #02120f;
font-weight: bold;
}
}
.info-container {
align-items: center;
flex-direction: row;
height: auto;
line-height: 30px;
line-height: 25px;
.info-phone {
color: #666;
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;
}
}
}
}
.no-info{
}
.inquiry-user-status {
width: 100%;
padding: 4px 0;
height: auto;
overflow: hidden;
.status-cll-user-answer {
background: rgba(255, 94, 87, 0.07);
border-radius: 10px;
border: 1px solid rgba(255, 94, 87, 0.15);
padding: 0 4px;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ff5e57;
line-height: 20px;
margin-right: 6px;
}
.status-cll-user-finish {
background: rgba(0, 189, 165, 0.07);
border-radius: 10px;
border: 1px solid rgba(0, 189, 165, 0.17);
padding: 0 4px;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
line-height: 20px;
margin-right: 6px;
}
}
.no-info {
width: 100%;
height: auto;
color: #ff5e57;
}
.inquiry-user-status {
width: 100%;
padding: 4px 0;
height: auto;
overflow: hidden;
.status-cll-user-answer {
background: rgba(255, 94, 87, 0.07);
border-radius: 10px;
border: 1px solid rgba(255, 94, 87, 0.15);
padding: 0 4px;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ff5e57;
line-height: 20px;
margin-right: 6px;
}
.line-btn {
cursor: pointer;
position: relative;
width: 45%;
height: 35px;
background: rgba(68, 146, 132, 0.09);
border-radius: 23px;
text-align: center;
line-height: 35px;
color: #0d9078;
.status-cll-user-finish {
background: rgba(0, 189, 165, 0.07);
border-radius: 10px;
border: 1px solid rgba(0, 189, 165, 0.17);
padding: 0 4px;
height: 20px;
font-size: 14px;
font-weight: bold;
.line-btn-tap {
position: absolute;
top: -10px;
right: 20px;
width: 48px;
height: 20px;
background: #0d9078;
border-radius: 7px 7px 7px 0px;
font-size: 14px;
color: #ffffff;
line-height: 20px;
}
span {
font-weight: bold;
}
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
line-height: 20px;
margin-right: 6px;
}
.line-btn-enter {
}
.line-btn {
cursor: pointer;
position: relative;
width: 45%;
height: 35px;
background: rgba(68, 146, 132, 0.09);
border-radius: 23px;
text-align: center;
line-height: 35px;
color: #0d9078;
font-size: 14px;
font-weight: bold;
.line-btn-tap {
position: absolute;
top: -10px;
right: 20px;
width: 48px;
height: 20px;
background: #0d9078;
color: #fff;
.call-box {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
img {
margin-right: 14px;
}
}
}
.isManuacall {
background: #ff5e57;
border-radius: 7px 7px 7px 0px;
font-size: 14px;
color: #ffffff;
line-height: 20px;
}
.noIsCall {
background: #0d9078;
span {
font-weight: bold;
}
}
.mt30 {
margin-top: 30px;
.line-btn-enter {
background: #0d9078;
color: #fff;
.call-box {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
img {
margin-right: 14px;
}
}
}
.line-second {
margin-top: 13px;
justify-content: flex-start;
align-items: center;
.isManuacall {
background: #ff5e57;
}
.mt20 {
margin-top: 20px;
.noIsCall {
background: #0d9078;
}
.line-position {
position: absolute;
top: 96%;
left: 0;
width: 100%;
height: auto;
background: #fff;
.wait {
}
.mt30 {
margin-top: 30px;
}
.line-second {
margin-top: 13px;
justify-content: flex-start;
align-items: center;
}
.mt20 {
margin-top: 20px;
}
.line-position {
position: absolute;
top: 96%;
left: 0;
width: 100%;
height: auto;
background: #fff;
.wait {
display: flex;
margin: 0px 20px;
font-size: 14px;
justify-content: space-between;
border-bottom: 1px solid #e9e9e9;
.wait-info {
display: flex;
margin: 0px 20px;
font-size: 14px;
justify-content: space-between;
border-bottom: 1px solid #e9e9e9;
.wait-info {
display: flex;
height: 40px;
align-items: center;
.header {
width: 20px;
height: 20px;
img {
width: 100%;
height: auto;
}
}
.name {
color: #02120f;
padding-left: 5px;
line-height: 16px;
}
.connect {
color: #ff5e57;
margin-left: 5px;
}
.order {
color: #999999;
span {
color: #212121;
}
height: 40px;
align-items: center;
.header {
width: 20px;
height: 20px;
img {
width: 100%;
height: auto;
}
}
&:last-of-type {
border-bottom: none;
.name {
color: #02120f;
padding-left: 5px;
line-height: 16px;
}
.connect {
color: #ff5e57;
margin-left: 5px;
}
.order {
color: #999999;
span {
color: #212121;
}
}
}
&:last-of-type {
border-bottom: none;
}
}
.wait-person {
width: 300px;
height: auto;
display: flex;
}
}
\ No newline at end of file
}
.wait-person {
width: 300px;
height: auto;
display: flex;
}
}
<template>
<div class="inquiry-wrap">
<div class="line">
<!--上级医生头信息 -->
<div class="superior-doctor">
<div class="inquiry-user-img">
<div
......@@ -31,19 +32,8 @@
<li class="info-phone">
{{ item.doctorMobile }}
</li>
<li
v-if="item.doctorCallTime"
class="info-call-time"
>
{{ pastDoctorCallTime }}前呼叫
</li>
<li
v-if="doctorCallKfStatus == 1"
class="info-calling"
>
正在呼叫
</li>
<li class="inquiry-user-status">
<!-- 只有-->
<span
:class="
doctorCallStatus === '已拨打完成'
......@@ -51,12 +41,21 @@
: 'status-cll-user-answer'
"
>{{ doctorCallStatus }}</span>
<span
v-if="doctorCallKfStatus == 1"
class="status-cll-user-answer"
>正在呼叫</span>
<span
v-else
class="status-cll-user-answer"
> 未呼叫</span>
</li>
</ul>
</div>
</div>
<!-- 助诊医生 -->
<!-- 助诊医生头信息 -->
<div
v-if="item.userId"
class="basic-doctor"
>
<ul class="basic-user-img">
......@@ -88,20 +87,11 @@
<div class="info-phone">
{{ item.userMobile }}
</div>
<div
v-if="item.userCallTime"
class="info-call-time"
>
{{ pastUserCallTime }}前呼叫
</div>
<div
v-if="userCallKfStatus == 1"
class="info-calling"
>
<img
:src="infocallImg"
alt=""
>
呼叫中
</div>
</li>
<li class="inquiry-user-status">
......@@ -115,36 +105,72 @@
</li>
</ul>
</div>
<!-- 未开始接诊 或停止接诊-->
<div class="no-info" />
<div
v-else
class="no-info"
>
<div
v-if="item.acceptStatus == 4"
class="doctor-late"
>
未开始接诊
</div>
<div
v-if="item.acceptStatus == 1"
class="doctor-stop"
>
暂停接诊
</div>
</div>
</div>
<!-- 预约时间,复制单号 -->
<div class="line line-second">
<div class="left">
<div>预约时间</div>
<div class="time">
<div
v-if="appointBeginTime && appointEndTime"
class="time"
>
<span>{{ appointBeginTime }}</span> -
<span>{{ appointEndTime }}</span>
</div>
<div
v-else
class="time"
>
</div>
</div>
<div class="right">
<div>问诊单号</div>
<ul class="orderno">
<li class="num">
{{ item.diagnoseLogId }}
{{ item.diagnoseLogId || '空' }}
</li>
<li class="copy">
<li
v-if="item.diagnoseLogId"
class="copy"
@click="copyDiagnoseLogId"
>
复制
</li>
</ul>
</div>
</div>
<!-- 当前排队 -->
<div class="line mt30 line-last">
<div
class="line-btn"
@click="waitPersonFun"
>
<div>当前排队5人<i class="el-icon-arrow-down el-icon--right" /></div>
<div>
当前排队{{ item.queueCount || '0' }}<i
class="el-icon-arrow-down el-icon--right"
/>
</div>
</div>
<div
class="line-btn line-btn-enter"
......@@ -175,12 +201,14 @@
</div>
</div>
</div>
<!-- 排队详细 -->
<div
v-if="isShowWait"
class="line-position"
>
<ul
v-for="(ele, index) in mockData"
v-for="(item, index) in waitPersonList"
:key="index"
class="wait"
>
......@@ -188,19 +216,22 @@
<div class="header">
<img
:src="item.userImageUrl"
alt=""
alt="headImg"
>
</div>
<div class="name">
name
{{ item.userName }}
</div>
<div class="connect">
连接失败 2次
<div
v-if="item.failCount"
class="connect"
>
连接失败 {{ item.failCount }}
</div>
</li>
<li class="wait-info">
<div class="order">
问诊单号 <span>877654</span>
问诊单号 <span>{{ item.diagnoseLogId || '空' }}</span>
</div>
</li>
</ul>
......@@ -212,5 +243,5 @@
export default index;
</script>
<style lang="scss" scoped>
@import "index";
@import 'index';
</style>
......@@ -55,6 +55,11 @@ const socket = {
}
});
socketClient.on('diagnose_call_push_event', (socket) => {
console.log(
socket,
'socketsocket',
window._VM.$store.state.main.soketQuest
);
const l = window._VM.$store.state.main.noticeList;
if (l.length >= 5) {
l.shift();
......
......@@ -5,18 +5,6 @@
我的工作台
</div>
<!-- 时间 -->
<div class="search-box">
<div class="search-item">
<el-date-picker
v-model="searchParam.dateTime"
type="date"
size="small"
clear-icon="el-input-icon"
:clearable="false"
@change="changeDatetime"
/>
</div>
</div>
<!-- tab栏 -->
<el-radio-group
v-model="tabPositionValue"
......@@ -25,8 +13,8 @@
>
<el-radio-button
v-for="(item, index) in currentCalListNew"
:key="'for' + index"
:label="item.name"
:key="'tab' + index"
:label="item.id"
>
{{ item.name }}
</el-radio-button>
......@@ -34,11 +22,11 @@
</div>
<div class="workbench-content">
<div
v-if="currentDiagList"
v-if="currentDiagList.length"
class="workbench-li-c"
>
<div
v-if="tabPositionValue == '全部订单'"
v-if="tabPositionValue == '3'"
class="grid-c"
>
<el-checkbox-group
......@@ -66,10 +54,9 @@
class="workbench-li-c"
>
<div class="workbench-title">
<department @select-department="selectDepartment" />
<div class="searh-input">
<el-input
v-model="searchValue"
v-model="orderOrName"
placeholder="输入问诊单号/医生姓名"
class="input-with-select"
@change="getSerachValue"
......@@ -77,25 +64,32 @@
<el-button
slot="append"
class="search-botton"
@click="getSerValue"
@click="getSearchValue"
>
搜索
</el-button>
</el-input>
</div>
</div>
<!-- 1111 -->
<div class="grid-c">
<!-- 问诊状态内容 -->
<div
v-if="isShowCardData"
class="grid-c"
>
<div
v-for="(item, index) in currentDiagList"
:key="index"
class="workbench-li"
>
<consultation-card :item="item" />
{{ item.diagnoseLogId }}
<!-- key 动态随机无意义 促发组件数据更新 -->
<consultation-card
:key="item.definitionRandom"
:item="item"
:order-type="tabPositionValue"
/>
</div>
</div>
<!-- 1111 -->
</div>
</div>
</div>
......@@ -120,42 +114,29 @@
const { mapState } = createNamespacedHelpers('main');
import storejs from 'storejs';
import consultationCard from '@/components/common/consultationCard/index.vue';
import department from '@/components/common/department.vue';
import { conditionUpdate, conditionNewList } from '@/api/workbench';
import { conditionNewList } from '@/api/workbench';
export default {
components: {
consultationCard,
department,
},
data() {
const s = storejs.get('soketQuest');
const t = s ? s.returnStatus : 1;
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd');
const id =
s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID;
return {
departmentId:'',
tabPosition: t,
showChat: true,
totalRows: 0,
isShowCardData: false,
loading: false,
searchParam: {
dateTime: d,
checkvalue: '', // 模拟值后去
operateUserId: id,
returnStatus: 1,
pageSize: 6,
pageNo: 1,
},
currentCalListNew: [
{
id: 1,
id: 3,
name: '全部订单',
},
{
id: 1,
name: '我的待处理',
},
{
id: 2,
name: '无需处理',
},
],
cityOptions: [
{
......@@ -192,150 +173,184 @@
},
],
checkedValues: [],
tabPositionValue: '全部订单',
searchValue: '',
userInfo:null,
timer:null
tabPositionValue: '3',
orderOrName: '',
userInfo: null,
timer: null,
currentDiagList: [], // 卡片列表数据
mockData: [
{
adviceStatus: 2,
appointBeginTime: '2021-12-02 18:00:00',
appointEndTime: '2021-12-02 19:00:00',
department: '心血管内科',
departmentId: 16,
diagnoseLogId: 3825,
diagnoseType: 2,
doctorCallKfStatus: 2,
doctorCallStatus: 1,
doctorCallTime: null,
doctorId: 1006276891,
doctorImageUrl:
'https://test-file.yunqueyi.com//image/png/2019/04/08/20190408101124702-0db0bcea.png',
doctorMobile: '13817741320',
doctorName: '金晖',
doctorTrtcEntryStatus: 2,
imStatus: 1,
imTeamId: '3942064849',
operateUserId: 221,
returnStatus: 2,
roomId: '520001199',
sort: null,
status: null,
userCallKfStatus: 2,
userCallStatus: 1,
userCallTime: null,
userId: 1006276934,
userImageUrl:
'https://test-file.yunqueyi.com//image/png/2019/04/08/20190408101124702-0db0bcea.png',
userMobile: '13817741327',
userName: '郑志猛',
userTrtcEntryStatus: 2,
},
{
adviceStatus: 2,
appointBeginTime: '2021-12-02 20:00:00',
appointEndTime: '2021-12-02 21:00:00',
department: '呼吸内科',
departmentId: 12,
diagnoseLogId: 3824,
diagnoseType: 1,
doctorCallKfStatus: 2,
doctorCallStatus: 1,
doctorCallTime: null,
doctorId: 1006276946,
doctorImageUrl:
'https://test-file.yunqueyi.com//image/png/2019/04/08/20190408101124702-0db0bcea.png',
doctorMobile: '15821297620',
doctorName: '朱建波',
doctorTrtcEntryStatus: 2,
imStatus: 1,
imTeamId: '3942066774',
operateUserId: 221,
returnStatus: 2,
roomId: '520001207',
sort: null,
status: null,
userCallKfStatus: 2,
userCallStatus: 1,
userCallTime: null,
userId: 1006276934,
userImageUrl:
'https://test-file.yunqueyi.com//image/png/2019/04/08/20190408101124702-0db0bcea.png',
userMobile: '13817741327',
userName: '郑志猛',
userTrtcEntryStatus: 2,
},
],
};
},
computed: {
...mapState({
currentDiagList: (state) => state.currentDiagList,
// currentCalList: (state) => state.currentCalList,
// currentDiagList: (state) => state.currentDiagList,
soketQuest: (state) => state.soketQuest,
isSuperAdmin: (state) => state.isSuperAdmin,
}),
},
watch: {
isSuperAdmin(newdata, olddata) {
if (newdata !== olddata && newdata.userID) {
console.log('-isSuperAdminisSuperAdmin', newdata);
const s = storejs.get('soketQuest');
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd');
const id =
s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID;
const p = {
dateTime: d,
operateUserId: id,
pageNo: s ? s.pageNo : 1,
pageSize: s ? s.pageSize : 6,
returnStatus: s ? s.returnStatus : 1,
};
this.searchParam = p;
const r = s ? s.returnStatus : 1;
this.tabPosition = r;
this.$store.commit('main/updateCurrentTabStatus', r);
this.inquirySearch('clear');
}
},
},
watch: {},
created() {
console.log('currentCalList---------------------', this.currentCalList);
console.log('currentDiagList---------------------', this.currentDiagList);
},
mounted() {
const s = storejs.get('soketQuest');
const t = s ? s.returnStatus : 1;
this.tabPosition = t;
this.$store.commit('main/updateCurrentTabStatus', t);
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd');
this.searchParam.dateTime = d;
const id =
s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID;
this.operateUserId = id;
this.userInfo = storejs.get('initSocketInfo');
console.log(this.userInfo.userId, 'userInfouserInfo');
console.log(
this.userInfo.userId,
'userInfouserInfo',
this.tabPositionValue
);
this.initCard();
// this.timer = window.setInterval(() => {
// setTimeout(() => {
// this.initCard();
// }, 0);
// }, 5000);
const that = this;
// if(this.tabPositionValue != 3) {
// 轮循
this.timer = window.setInterval(() => {
setTimeout(() => {
// that.isShowCardData = false;
that.initCard();
}, 0);
}, 4000);
// }
},
destroyed() {
window.clearInterval(this.timer);
},
methods: {
initCard() {
conditionNewList({bizType:1, userId:this.userInfo.userId}).then(res => {
if(res.code === '000000') {
console.log(111);
}else{
console.log(222);
}
});
console.log(this.isShowCardData);
const parms = {
bizType: this.tabPositionValue, // 1,异常的列表 2,不需要处理的列表
userId: this.userInfo.userId || this.operateUserId, // userId
condition: this.orderOrName || '',
};
// this.currentDiagList = this.mockData;
conditionNewList(parms)
.then((res) => {
if (res.code === '000000') {
this.handleData(res.data);
} else {
this.$message({
message: res.message,
type: 'warning',
duration: 1000,
});
}
})
.catch((err) => {
console.log(err);
// mock 数据
this.handleData(this.mockData);
});
},
selectDepartment(val) {
this.departmentId = val;
console.log(889910, val);
handleData(data) {
this.currentDiagList = [];
data.forEach((item, index) => {
item.diagnoseLogId = '--' + Math.random() * 10;
item['definitionRandom'] = Math.random() * 10;
this.$set(this.currentDiagList, index, item);
});
this.isShowCardData = true;
// this.$nextTick(() => {
// });
},
getSerachValue(value) {
this.searchValue = value;
this.orderOrName = value;
},
handleCheckedCitiesChange(value) {
console.log(value, 'value11');
},
getSerValue() {
console.log(this.searchValue, 'this.searchValue');
getSearchValue() {
if (!this.orderOrName) {
console.log(789, this.departmentId);
return this.$message({
message: '医生名字或订单号不能为空',
type: 'warning',
duration: 1000,
});
} else {
this.initCard();
}
},
tabChange(val) {
console.log(val, 'val1111====');
this.tabPositionValue = val;
// const s = this.searchParam;
// s.returnStatus = val;
// this.searchParam = s;
// s.pageNo = 1;
// this.$store.commit('main/updateCurrentTabStatus', val);
// this.inquirySearch('tab');
},
changeDatetime(val) {
const s = this.searchParam;
s.dateTime = val.format('yyyy-MM-dd');
this.searchParam = s;
s.pageNo = 1;
this.inquirySearch('clear');
},
handleSizeChange(val) {
const s = this.searchParam;
s.pageSize = val;
this.searchParam = s;
this.inquirySearch();
},
handleCurrentChange(val) {
const s = this.searchParam;
s.pageNo = val;
this.searchParam = s;
this.inquirySearch();
},
inquirySearch(type) {
console.log(type);
const p = this.searchParam;
if (type == 'clear') {
// this.$store.commit('main/clearRawCurrentCalList');
if (val != 3) {
this.initCard();
}
conditionUpdate(p).then((res) => {
if (res.code == '000000') {
this.$store.commit('main/updateSoketQuest', p);
if (type == 'tab') {
// const returnStatus = p.returnStatus;
// const RespList = res.data.list[0].recordResp.countRespList.filter(
// (val) => {
// return val.status == returnStatus;
// }
// );
// this.$store.commit('main/changeRawCurrentCalList', RespList[0]);
}
} else {
this.$message({
message: res.message,
type: 'warning',
duration: 1000,
});
}
});
},
}
},
};
</script>
<style lang="scss">
......@@ -425,15 +440,17 @@
}
}
.workbench-content {
padding:0 2px;
.workbench-title{
border-top:1px solid #F0F2F5;
height:75px;
display:flex;
line-height:75px;
background:#fff;
margin-bottom:10px;
padding: 0 2px;
.workbench-title {
border-top: 1px solid #f0f2f5;
height: 75px;
display: flex;
justify-content: flex-end;
line-height: 75px;
background: #fff;
margin-bottom: 10px;
.searh-input {
margin-left: 8px;
.el-input {
width: 364px;
.search-botton {
......@@ -451,7 +468,7 @@
grid-template-rows: auto auto auto;
//grid-template-columns: 32% 32% 32%;
//grid-row-gap: 2%;
grid-column-gap:10px;
grid-column-gap: 10px;
padding: 0px 7px;
.el-checkbox-group {
.el-checkbox {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册