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

大盘修改

上级 7de96d4e
import request from 'mn-template/plugins/http';
export const conditionUpdate = async(data) => {
export const conditionUpdate = async (data) => {
return request({
url: '/diagnose/socket/condition/update',
data: data,
......@@ -7,10 +7,36 @@ export const conditionUpdate = async(data) => {
});
};
export const conditionNewList = async(data) => {
// 轮循 获取卡边正常信息和异常信息
export const conditionNewList = async (data) => {
return request({
url: '/diagnose/admin/diagnose/operator/newList',
params: data,
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,
waitPersonNum,
doctorAdviceList,
manualCall,
} from '@/api/diagnosis';
import { createNamespacedHelpers } from 'vuex';
const { mapState } = createNamespacedHelpers('main');
export default {
} from '@/api/workbench.js';
import { createNamespacedHelpers } from 'vuex';
const { mapState } = createNamespacedHelpers('main');
export default {
props: {
item: {
type: Object,
......@@ -14,6 +14,16 @@ import {
return {};
},
},
orderType: {
// 订单类型
type: String,
default: '',
},
key: {
// 订单类型
type: String,
default: '',
},
},
data() {
return {
......@@ -31,7 +41,7 @@ import {
isManuacall: false,
isManuacallType: false,
accId: '',
mockData: [{}, {}, {}],
waitPersonList: [],
isShowWait: false,
};
},
......@@ -93,10 +103,18 @@ import {
}
},
appointBeginTime() {
if (this.item.appointBeginTime) {
return new Date(this.item.appointBeginTime).format('hh:mm');
} else {
return '';
}
},
appointEndTime() {
if (this.item.appointEndTime) {
return new Date(this.item.appointEndTime).format('hh:mm');
} else {
return '';
}
},
userCallTime() {
return new Date(this.item.userCallTime).format('hh:mm');
......@@ -140,6 +158,7 @@ import {
},
watch: {
item(newVal, oldVal) {
console.log(newVal, 'newValnewValnewVal');
console.log(newVal, oldVal, 'newVal, oldVal');
if (newVal !== oldVal) {
if (newVal.doctorTrtcEntryStatus == 2) {
......@@ -156,6 +175,9 @@ import {
}
}
},
key(newVal, oldVal) {
console.log(newVal, oldVal);
},
},
created() {},
mounted() {
......@@ -246,7 +268,6 @@ import {
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;
......@@ -344,7 +365,31 @@ import {
});
},
waitPersonFun() {
if (!this.isShowWait) {
console.log(this.item.doctorId, 'this.item.doctorId');
waitPersonNum(this.item.doctorId)
.then((res) => {
if (res.code === '000000') {
this.waitPersonList = res.data || [];
} else {
this.$message({
message: res.message,
type: 'warning',
duration: 1000,
});
}
this.isShowWait = !this.isShowWait;
})
.catch((err) => {
console.log(err);
this.isShowWait = !this.isShowWait;
this.$message({
message: '服务查询失败',
type: 'warning',
duration: 1000,
});
});
}
},
},
};
\ No newline at end of file
};
......@@ -44,10 +44,10 @@
color: #ff5e57;
}
}
.superior-doctor{
.superior-doctor {
width: 49%;
display: flex;
justify-content:flex-start;
justify-content: flex-start;
align-items: flex-start;
.inquiry-user-img {
display: flex;
......@@ -139,17 +139,18 @@
}
}
}
.basic-doctor{
.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{
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;
......@@ -186,8 +187,10 @@
}
}
}
.no-info{
.no-info {
width: 100%;
height: auto;
color: #ff5e57;
}
.inquiry-user-status {
width: 100%;
......@@ -331,4 +334,4 @@
height: auto;
display: flex;
}
}
\ No newline at end of file
}
<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');
},
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');
}
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,
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;
if (val != 3) {
this.initCard();
}
},
},
};
</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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册