问诊记录按钮
This commit is contained in:
parent
e9e8c5d69e
commit
944b42dbd5
193
src/components/addInquiryConfigModal.vue
Normal file
193
src/components/addInquiryConfigModal.vue
Normal file
@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<!-- Modal -->
|
||||
<a-modal v-model:visible="modalVisible" fullscreen title="添加问诊配置" title-align="start" :footer="false"
|
||||
@cancel="handleClose">
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">基本信息</div>
|
||||
</div>
|
||||
<a-form :model="modalForm" ref="modalFormRef" :auto-label-width="true">
|
||||
<a-row :gutter="24" style="margin-top: 35px;">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="真实姓名:">
|
||||
<span>{{modalForm.card_name}} ({{modalForm.sex==1?'男,':'女,'}}{{modalForm.age
|
||||
}}岁)</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="身份证号:" >
|
||||
<div class="box" v-show="!showEye ">
|
||||
<div class="cardNum">{{modalForm.id_number_mask}}</div>
|
||||
<icon-eye-invisible class="eye" @click="handelDecryptCard(modalForm.user.user_id,modalForm.family_id)" />
|
||||
</div>
|
||||
<div class="box" v-show="showEye">
|
||||
<div class="cardNum">{{id_card_num}}</div>
|
||||
<icon-eye class="eye" @click="()=>{showEye=false}" />
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.mobile_mask">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="手机号码:" >
|
||||
<div class="box" v-show="!family_Eye">
|
||||
<div class="cardNum">{{modalForm.mobile_mask}}</div>
|
||||
<icon-eye-invisible class="eye" @click="handleDecryptMobile(modalForm.user.user_id,modalForm.family_id)" />
|
||||
</div>
|
||||
<div class="box" v-show="family_Eye">
|
||||
<div class="cardNum">{{family_mobile}}</div>
|
||||
<icon-eye class="eye" @click="()=>{family_Eye=false}" />
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">所属账号</div>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px;">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="账号用户名:">
|
||||
<span>{{modalForm.user.user_name}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
|
||||
<a-form-item field="idCard" label="账号电话:" >
|
||||
<div class="box" v-show="!count_Eye">
|
||||
<div class="cardNum">{{modalForm.user.mobile}}</div>
|
||||
<icon-eye-invisible class="eye" @click="handleDecryptMobile(modalForm.user.user_id)" />
|
||||
</div>
|
||||
<div class="box" v-show="count_Eye">
|
||||
<div class="cardNum">{{count_mobile}}</div>
|
||||
<icon-eye class="eye" @click="()=>{count_Eye=false}" />
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="与就诊人关系:" >
|
||||
<span v-if="modalForm.relation">{{formatRelation(modalForm.relation)}}</span>
|
||||
<span v-else>-</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
<!-- <div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">病例信息</div>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px;">
|
||||
<a-col :span="12">
|
||||
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider /> -->
|
||||
|
||||
</a-form>
|
||||
<!-- <div class="titlebox" >
|
||||
<div class="bar"></div>
|
||||
<div class="name">操作</div>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px;" >
|
||||
<a-col :span="24">
|
||||
<a-form-item field="" label="" no-style>
|
||||
<a-space >
|
||||
<a-button type="primary" status="danger" @click="">禁用</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row> -->
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref,toRefs} from 'vue';
|
||||
import {decryptCard} from '@/api/doctor/list';
|
||||
import {decryptMobile} from '@/api/patient/family';
|
||||
import {formatRelation} from "@/utils/format"
|
||||
const props = defineProps({
|
||||
// 是否显示
|
||||
modalVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
modalForm: {
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(['familyVisibleChange']);
|
||||
const {modalVisible,modalForm} = toRefs(props);
|
||||
//切换小眼睛
|
||||
const showEye = ref(false);
|
||||
const id_card_num = ref('');
|
||||
//解密身份证号码
|
||||
const handelDecryptCard = async (user_id,family_id) => {
|
||||
showEye.value = true;
|
||||
const { data, code, message } = await decryptCard({
|
||||
user_id,
|
||||
family_id
|
||||
});
|
||||
if (code == 200) {
|
||||
id_card_num.value = data;
|
||||
}
|
||||
};
|
||||
//切换手机号
|
||||
const count_Eye= ref(false);
|
||||
const family_Eye= ref(false);
|
||||
const count_mobile=ref('');
|
||||
const family_mobile=ref('')
|
||||
const handleDecryptMobile=async(user_id,family_id='')=>{
|
||||
let dataObj=null;
|
||||
if(family_id){
|
||||
dataObj={ user_id,family_id}
|
||||
family_Eye.value=true
|
||||
}else{
|
||||
dataObj={ user_id,family_id};
|
||||
count_Eye.value=true
|
||||
}
|
||||
const { data, code, message } = await decryptMobile(dataObj);
|
||||
if(code==200){
|
||||
if(family_id){
|
||||
family_mobile.value=data
|
||||
}else{
|
||||
count_mobile.value=data;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
const handleClose = () => {
|
||||
emits('familyVisibleChange', false);
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.cardNum {
|
||||
width: 150px;
|
||||
}
|
||||
.arco-form-item-layout-horizontal:first-child,
|
||||
.arco-form-item-layout-horizontal:nth-child(2) {
|
||||
align-items: center;
|
||||
}
|
||||
.cellbox{
|
||||
margin-top: 35px;
|
||||
}
|
||||
.cellbox .cell{
|
||||
width:50%;
|
||||
border-bottom:1px dashed #efefef;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.cellbox .cell:first-child{
|
||||
border: none;
|
||||
}
|
||||
|
||||
.box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cert .arco-form-item-label-col {
|
||||
flex: 0 0 8px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
354
src/components/chatRecord.vue
Normal file
354
src/components/chatRecord.vue
Normal file
@ -0,0 +1,354 @@
|
||||
<template>
|
||||
<div class="phone">
|
||||
<div class="phonecont" v-if="chatlist.length>0">
|
||||
<a-button class="more" v-if="showMore" @click="loadMore">点击加载更多</a-button>
|
||||
<div class="nomore" v-else>---没有更多了---</div>
|
||||
|
||||
<div
|
||||
class="msgbox"
|
||||
:class="
|
||||
user_doctor.user_id == item.from_user_id
|
||||
? 'patientmsg'
|
||||
: ''
|
||||
"
|
||||
v-for="item in chatlist"
|
||||
:key="item.message_id"
|
||||
>
|
||||
<a-avatar v-if="user_doctor.user_id == item.from_user_id && (item.message_type!='TIMCustomElem' || (item.message_type=='TIMCustomElem' && JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 7))">
|
||||
<img
|
||||
|
||||
class="chatAvater"
|
||||
:src="user_doctor.avatar"
|
||||
alt=""
|
||||
/>
|
||||
|
||||
</a-avatar>
|
||||
|
||||
<a-avatar v-if="user_doctor.user_id != item.from_user_id && item.message_type!='TIMCustomElem'">
|
||||
<img
|
||||
|
||||
class="chatAvater"
|
||||
src="https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png"
|
||||
|
||||
alt=""
|
||||
/>
|
||||
</a-avatar>
|
||||
<div class="msgcon" :class="item.message_type=='TIMCustomElem'?'tipcon':''"
|
||||
:style="(item.message_type=='TIMCustomElem'&& JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 7)?'margin:6px;':''">
|
||||
<div class="msgtext" v-if="item.message_type == 'TIMTextElem'">
|
||||
{{ JSON.parse(item.message_content).Text }}
|
||||
</div>
|
||||
<div class="msgtext" v-if="item.message_type == 'TIMImageElem'">
|
||||
|
||||
<a-image width="200" :src="(JSON.parse(item.message_content).ImageInfoArray)[0].URL" :preview-props="{
|
||||
actionsLayout: ['rotateRight', 'zoomIn', 'zoomOut'],
|
||||
}" />
|
||||
</div>
|
||||
<div
|
||||
class="msgtext"
|
||||
v-else-if="item.message_type == 'TIMCustomElem'"
|
||||
:class="JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 7?'otherColor':''"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 1
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
{{ JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.title}}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 2
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送评价消息
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 3
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送医生端系统通知
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 4
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送医生端服务通知
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 5
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送患者端系统消息
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 6
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
药师审核中
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 7
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
<div class="chufangbox">
|
||||
<div class="title">处方已开具</div>
|
||||
<div class="productbox">
|
||||
<div class="row">
|
||||
<div class="name">RP:</div>
|
||||
<div class="desc">{{ JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.data.product_name }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">开方日期:</div>
|
||||
<div class="desc">{{JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.data.pharmacist_verify_time}}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 10
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送糖组检测报告
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 11
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送患者病例
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 11
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送患者信息
|
||||
</div>
|
||||
</div>
|
||||
<div class="date" v-if="item.message_type != 'TIMCustomElem'">{{ parseTime(item.message_send_time) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="phonecont" v-else>
|
||||
<a-empty />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, toRefs, reactive, watch,nextTick } from 'vue';
|
||||
import {getIm } from '@/api/order/list';
|
||||
const props = defineProps({
|
||||
id:{
|
||||
type: String,
|
||||
default:'',
|
||||
},
|
||||
user_doctor:{
|
||||
type:Object
|
||||
}
|
||||
|
||||
});
|
||||
const {user_doctor}=toRefs(props);
|
||||
const firstIn=ref(false);
|
||||
const pager = reactive({
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
});
|
||||
const chatlist = ref([]);
|
||||
const showMore = ref(true);
|
||||
const HandleGetIm = async (id, params = {}) => {
|
||||
const { code, data } = await getIm(id, params);
|
||||
if (code == 200) {
|
||||
|
||||
if ( data.data.length < 10) {
|
||||
showMore.value = false;
|
||||
}else{
|
||||
showMore.value = true;
|
||||
}
|
||||
chatlist.value = data.data.reverse().concat(chatlist.value);
|
||||
if(!firstIn.value){
|
||||
nextTick(() => {
|
||||
// 要放在对响应式数据修改之后
|
||||
let ele = document.querySelector('.phonecont');
|
||||
ele.scrollTop = ele.scrollHeight;
|
||||
});
|
||||
}
|
||||
|
||||
firstIn.value=true
|
||||
}
|
||||
};
|
||||
watch(()=>props.id,(newVal,oldVal)=>{
|
||||
if(newVal){
|
||||
firstIn.value=false;
|
||||
chatlist.value=[];
|
||||
pager.page=1;
|
||||
HandleGetIm(newVal, { ...pager });
|
||||
}
|
||||
},{immediate:true,deep:true})
|
||||
|
||||
|
||||
const loadMore=()=>{
|
||||
pager.page= pager.page+1;
|
||||
let id=props.id;
|
||||
HandleGetIm(id, { ...pager });
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.more {
|
||||
display: flex;
|
||||
margin: 20px auto 10px;
|
||||
}
|
||||
.nomore {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
margin: 20px auto 10px;
|
||||
}
|
||||
.phone {
|
||||
margin-top: 35px;
|
||||
position: relative;
|
||||
background: #111;
|
||||
border-radius: 55px;
|
||||
box-shadow: 0px 0px 0px 2px #aaa;
|
||||
width: 360px;
|
||||
height: 480px;
|
||||
padding: 105px 25px 60px;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.phone:before {
|
||||
content: '';
|
||||
width: 60px;
|
||||
height: 10px;
|
||||
border-radius: 10px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -30px;
|
||||
background: #333;
|
||||
top: 50px;
|
||||
}
|
||||
.phonecont {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: scroll;
|
||||
background: #fff;
|
||||
}
|
||||
.chatAvater {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.msgbox {
|
||||
display: flex;
|
||||
margin: 4px 12px 12px;
|
||||
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
.patientmsg {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.phonecont .msgtext {
|
||||
max-width: 80vw;
|
||||
border-radius: 5px;
|
||||
padding: 5px 8px;
|
||||
word-break: break-all;
|
||||
color: var(--color-text-1);
|
||||
background: #efefef;
|
||||
|
||||
}
|
||||
.patientmsg .msgtext{
|
||||
background: #3CC7C0;
|
||||
color:#fff;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.msgbox .msgcon {
|
||||
margin-right: 6px;
|
||||
}
|
||||
.patientmsg .msgcon {
|
||||
margin-left: 6px;
|
||||
}
|
||||
.date {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
}
|
||||
.patientmsg .tipcon{
|
||||
width:88%;
|
||||
margin:0 auto;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
.tipcon .msgtext{
|
||||
color: var(--color-text-1);
|
||||
background: #efefef;
|
||||
}
|
||||
.phonecont .otherColor{
|
||||
background: #3CC7C0;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.tipcon .msgtext{
|
||||
padding:0px;
|
||||
font-size: 15px;
|
||||
}
|
||||
.chufangbox{
|
||||
margin:0 20px;
|
||||
}
|
||||
.productbox .row{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.chufangbox .title{
|
||||
padding: 8px 0;
|
||||
border-bottom:1px solid #E7E7E7;;
|
||||
}
|
||||
.productbox{
|
||||
padding: 8px 0;
|
||||
}
|
||||
.productbox .row .name{
|
||||
color:#fff;
|
||||
}
|
||||
.desc{
|
||||
line-height: 28px;
|
||||
color:#fff;
|
||||
font-size: 15px;
|
||||
}
|
||||
</style>
|
||||
@ -168,171 +168,7 @@
|
||||
<div class="name">聊天记录</div>
|
||||
</div>
|
||||
<a-form-item field="license_cert" :hide-label="true">
|
||||
<div class="phone">
|
||||
<div class="phonecont">
|
||||
<a-button class="more" v-if="showMore" @click="loadMore">点击加载更多</a-button>
|
||||
<div class="nomore" v-else>---没有更多了---</div>
|
||||
|
||||
<div
|
||||
class="msgbox"
|
||||
:class="
|
||||
modalForm.user_doctor.user_id == item.from_user_id
|
||||
? 'patientmsg'
|
||||
: ''
|
||||
"
|
||||
v-for="item in chatlist"
|
||||
:key="item.message_id"
|
||||
>
|
||||
<a-avatar v-if="modalForm.user_doctor.user_id == item.from_user_id && (item.message_type!='TIMCustomElem' || (item.message_type=='TIMCustomElem' && JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 7))">
|
||||
<img
|
||||
|
||||
class="chatAvater"
|
||||
:src="modalForm.user_doctor.avatar"
|
||||
alt=""
|
||||
/>
|
||||
|
||||
</a-avatar>
|
||||
|
||||
<a-avatar v-if="modalForm.user_doctor.user_id != item.from_user_id && item.message_type!='TIMCustomElem'">
|
||||
<img
|
||||
|
||||
class="chatAvater"
|
||||
src="https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png"
|
||||
|
||||
alt=""
|
||||
/>
|
||||
</a-avatar>
|
||||
<div class="msgcon" :class="item.message_type=='TIMCustomElem'?'tipcon':''"
|
||||
:style="(item.message_type=='TIMCustomElem'&& JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 7)?'margin:6px;':''">
|
||||
<div class="msgtext" v-if="item.message_type == 'TIMTextElem'">
|
||||
{{ JSON.parse(item.message_content).Text }}
|
||||
</div>
|
||||
<div class="msgtext" v-if="item.message_type == 'TIMImageElem'">
|
||||
|
||||
<a-image width="200" :src="(JSON.parse(item.message_content).ImageInfoArray)[0].URL" :preview-props="{
|
||||
actionsLayout: ['rotateRight', 'zoomIn', 'zoomOut'],
|
||||
}" />
|
||||
</div>
|
||||
<div
|
||||
class="msgtext"
|
||||
v-else-if="item.message_type == 'TIMCustomElem'"
|
||||
:class="JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 7?'otherColor':''"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 1
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
{{ JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.title}}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 2
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送评价消息
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 3
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送医生端系统通知
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 4
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送医生端服务通知
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 5
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送患者端系统消息
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 6
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
药师审核中
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 7
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
<div class="chufangbox">
|
||||
<div class="title">处方已开具</div>
|
||||
<div class="productbox">
|
||||
<div class="row">
|
||||
<div class="name">RP:</div>
|
||||
<div class="desc">{{ JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.data.product_name }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">开方日期:</div>
|
||||
<div class="desc">{{JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.data.pharmacist_verify_time}}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 10
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送糖组检测报告
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 11
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送患者病例
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
JSON.parse(JSON.parse(item.message_content).Data)
|
||||
.message_type == 11
|
||||
"
|
||||
class="text"
|
||||
>
|
||||
系统推送患者信息
|
||||
</div>
|
||||
</div>
|
||||
<div class="date" v-if="item.message_type != 'TIMCustomElem'">{{ parseTime(item.message_send_time) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<chatRecord :id="modalForm.order_inquiry_id" :user_doctor="modalForm.user_doctor"></chatRecord>
|
||||
</a-form-item>
|
||||
<a-divider />
|
||||
<div class="titlebox">
|
||||
@ -417,10 +253,9 @@
|
||||
import { ref, toRefs, reactive, watch,nextTick } from 'vue';
|
||||
import { formatDoctorTitle } from '@/utils/format';
|
||||
import { parseTime } from '@/utils/parseTime';
|
||||
import { inquiryCase, getIm } from '@/api/order/list';
|
||||
import { inquiryCase} from '@/api/order/list';
|
||||
import { formatInquiryType, formatInquiryStatus } from '@/utils/format';
|
||||
const emits = defineEmits(['inquiryVisibleChange']);
|
||||
const showMore = ref(true);
|
||||
const props = defineProps({
|
||||
// 是否显示
|
||||
modalVisible: {
|
||||
@ -429,9 +264,13 @@ const props = defineProps({
|
||||
},
|
||||
modalForm: {
|
||||
type: Object,
|
||||
default:{
|
||||
order_inquiry_case:{
|
||||
inquiry_case_id:''
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
const firstIn=ref(false);
|
||||
const doctorVisible = ref(false);
|
||||
const doctor_id = ref('');
|
||||
const patientVisible = ref(false);
|
||||
@ -441,36 +280,8 @@ const { modalVisible, modalForm } = toRefs(props);
|
||||
const openPatient = () => {
|
||||
patientVisible.value = true;
|
||||
};
|
||||
const pager = reactive({
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
});
|
||||
const chatlist = ref([]);
|
||||
const HandleGetIm = async (id, params = {}) => {
|
||||
const { code, data } = await getIm(id, params);
|
||||
if (code == 200) {
|
||||
|
||||
if ( data.data.length < 10) {
|
||||
showMore.value = false;
|
||||
}else{
|
||||
showMore.value = true;
|
||||
}
|
||||
chatlist.value = data.data.reverse().concat(chatlist.value);
|
||||
if(!firstIn.value){
|
||||
nextTick(() => {
|
||||
// 要放在对响应式数据修改之后
|
||||
let ele = document.querySelector('.phonecont');
|
||||
ele.scrollTop = ele.scrollHeight;
|
||||
});
|
||||
}
|
||||
|
||||
firstIn.value=true
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.modalForm,
|
||||
() => {
|
||||
const order_inquiry_id=ref('');
|
||||
watch(() => props.modalForm,() => {
|
||||
if (
|
||||
props.modalForm.order_inquiry_case &&
|
||||
props.modalForm.order_inquiry_case.inquiry_case_id
|
||||
@ -480,15 +291,10 @@ watch(
|
||||
Object.assign(patientData, data.data);
|
||||
});
|
||||
}
|
||||
if (props.modalForm.order_inquiry_id) {
|
||||
let id = props.modalForm.order_inquiry_id;
|
||||
chatlist.value=[];
|
||||
pager.page=1;
|
||||
HandleGetIm(id, { ...pager });
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
// if(props.modalForm.order_inquiry_id){
|
||||
// order_inquiry_id.value=props.modalForm.order_inquiry_id;
|
||||
// }
|
||||
},{ immediate: true, deep: true })
|
||||
const openDcotor = () => {
|
||||
doctor_id.value = props.modalForm.doctor_id;
|
||||
doctorVisible.value = true;
|
||||
@ -496,24 +302,10 @@ const openDcotor = () => {
|
||||
const handleClose = () => {
|
||||
emits('inquiryVisibleChange', (modalVisible.value = false));
|
||||
};
|
||||
const loadMore=()=>{
|
||||
pager.page= pager.page+1;
|
||||
let id=props.modalForm.order_inquiry_case.inquiry_case_id
|
||||
HandleGetIm(id, { ...pager });
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.more {
|
||||
display: flex;
|
||||
margin: 20px auto 10px;
|
||||
}
|
||||
.nomore {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
margin: 20px auto 10px;
|
||||
}
|
||||
|
||||
.headImg {
|
||||
margin-right: 20px;
|
||||
border-radius: 50%;
|
||||
@ -529,117 +321,5 @@ const loadMore=()=>{
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.phone {
|
||||
margin-top: 35px;
|
||||
position: relative;
|
||||
background: #111;
|
||||
border-radius: 55px;
|
||||
box-shadow: 0px 0px 0px 2px #aaa;
|
||||
width: 360px;
|
||||
height: 480px;
|
||||
padding: 105px 25px 60px;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.phone:before {
|
||||
content: '';
|
||||
width: 60px;
|
||||
height: 10px;
|
||||
border-radius: 10px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -30px;
|
||||
background: #333;
|
||||
top: 50px;
|
||||
}
|
||||
.phonecont {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: scroll;
|
||||
background: #fff;
|
||||
}
|
||||
.chatAvater {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.msgbox {
|
||||
display: flex;
|
||||
margin: 4px 12px 12px;
|
||||
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
.patientmsg {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.phonecont .msgtext {
|
||||
max-width: 80vw;
|
||||
border-radius: 5px;
|
||||
padding: 5px 8px;
|
||||
word-break: break-all;
|
||||
color: var(--color-text-1);
|
||||
background: #efefef;
|
||||
|
||||
}
|
||||
.patientmsg .msgtext{
|
||||
background: #3CC7C0;
|
||||
color:#fff;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.msgbox .msgcon {
|
||||
margin-right: 6px;
|
||||
}
|
||||
.patientmsg .msgcon {
|
||||
margin-left: 6px;
|
||||
}
|
||||
.date {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
}
|
||||
.patientmsg .tipcon{
|
||||
width:88%;
|
||||
margin:0 auto;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
.tipcon .msgtext{
|
||||
color: var(--color-text-1);
|
||||
background: #efefef;
|
||||
}
|
||||
.phonecont .otherColor{
|
||||
background: #3CC7C0;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.tipcon .msgtext{
|
||||
padding:0px;
|
||||
font-size: 15px;
|
||||
}
|
||||
.chufangbox{
|
||||
margin:0 20px;
|
||||
}
|
||||
.productbox .row{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.chufangbox .title{
|
||||
padding: 8px 0;
|
||||
border-bottom:1px solid #E7E7E7;;
|
||||
}
|
||||
.productbox{
|
||||
padding: 8px 0;
|
||||
}
|
||||
.productbox .row .name{
|
||||
color:#fff;
|
||||
}
|
||||
.desc{
|
||||
line-height: 28px;
|
||||
color:#fff;
|
||||
font-size: 15px;
|
||||
}
|
||||
</style>
|
||||
@ -176,7 +176,7 @@
|
||||
<a-button type="primary" @click="lookMedince" v-has="'admin:sysPrescriptionList:vieworder'">查看订单</a-button>
|
||||
</a-space>
|
||||
<a-space >
|
||||
<a-button type="primary" status="danger" @click="downloadFile(downloadUrl)" v-has="'admin:sysPrescriptionList:download'" >下载</a-button>
|
||||
<a-button type="primary" @click="downloadFile(downloadUrl)" v-has="'admin:sysPrescriptionList:download'" >下载</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
@ -37,12 +37,12 @@
|
||||
<a-divider />
|
||||
|
||||
<!-- action -->
|
||||
<!-- <div class="action">
|
||||
<div class="action">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysFamilyList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
|
||||
<a-button v-has="'admin:sysFamilyList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button>
|
||||
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button> -->
|
||||
</a-space>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- table -->
|
||||
<a-table :columns="columns" :data="tableData"
|
||||
@ -84,7 +84,7 @@
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<familyModal :modalVisible="modalVisible" :modalForm="modalForm" @familyVisibleChange="()=>{modalVisible=false}"></familyModal>
|
||||
<addInquiryConfigModal :modalVisible="modalVisible" :modalForm="modalForm" @familyVisibleChange="()=>{modalVisible=false}"></addInquiryConfigModal>
|
||||
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
||||
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeFamily"
|
||||
@deleteVisibleChange="() => deleteVisible = false" /> -->
|
||||
|
||||
@ -82,7 +82,7 @@
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysFamilyList:detail'" type="text"
|
||||
<a-button v-has="'admin:sysInquiryRecord:detail'" type="text"
|
||||
@click="handleDetail(record)"><icon-book />详情</a-button>
|
||||
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||
修改</a-button> -->
|
||||
|
||||
@ -378,9 +378,9 @@
|
||||
<a-row :gutter="24" style="margin-top: 35px;" >
|
||||
<a-col :span="24">
|
||||
<a-form-item field="" label="" no-style>
|
||||
<!-- <a-space style="margin-right: 8px;">
|
||||
<a-button type="primary" @click="openInquiryRecord">问诊记录</a-button>
|
||||
</a-space> -->
|
||||
<a-space style="margin-right: 8px;" v-if="modalForm.inquiry_status==4 || modalForm.inquiry_status==5 || modalForm.inquiry_status==6">
|
||||
<a-button type="primary" @click="openInquiryRecord" v-has="'admin:sysOrderList:record'">问诊记录</a-button>
|
||||
</a-space>
|
||||
<a-space style="margin-right: 8px;" v-if="modalForm.inquiry_status==4 || modalForm.inquiry_status==5">
|
||||
<a-button type="primary" status="danger" v-has="'admin:sysOrderList:cancel'" @click="()=>{okVisible=true;cur_inruiry_id=modalForm.order_inquiry_id;}">取消问诊</a-button>
|
||||
</a-space>
|
||||
@ -396,6 +396,24 @@
|
||||
<patientModal :patientVisible="patientVisible" :data="patientData" @patientVisibleChange="() => {patientVisible = false;}"></patientModal>
|
||||
|
||||
<confirmModal :okVisible="okVisible" :api="cancelInquiry" :title="'确定取消此订单吗?'" :dealType="'order_inquiry_id'" :id="cur_inruiry_id" @closeChange="handelCloseChange"></confirmModal>
|
||||
|
||||
<!-- 聊天记录 -->
|
||||
<!-- Modal -->
|
||||
<!-- <a-modal v-model:visible="chatVisible" fullscreen title="聊天记录" title-align="start" :footer="false"
|
||||
@close="() => {}">
|
||||
<a-form :model="modalForm" :disabled="true" :rules="rules" ref="modalFormRef" :auto-label-width="true">
|
||||
<a-row :gutter="24" >
|
||||
<a-col :span="24">
|
||||
<a-form-item field="license_cert" :hide-label="true">
|
||||
<chatRecord :id="modalForm.order_inquiry_id" :user_doctor="modalForm.user_doctor"></chatRecord>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-modal> -->
|
||||
<!-- 问诊记录详情 -->
|
||||
<inquiryDetailModal :modalVisible="recordVisible" :modalForm="modalForm" @inquiryVisibleChange="()=>{recordVisible=false}"></inquiryDetailModal>
|
||||
</div>
|
||||
|
||||
|
||||
@ -421,7 +439,8 @@ const patientData=reactive({
|
||||
});
|
||||
const comment=reactive({
|
||||
|
||||
})
|
||||
});
|
||||
const recordVisible=ref(false);
|
||||
// Akiraka 20230210 监听删除事件
|
||||
watch(() => deleteVisible.value ,(value) => {
|
||||
|
||||
@ -617,7 +636,6 @@ const handleQuery = async () => {
|
||||
getOrderInfo(params);
|
||||
};
|
||||
|
||||
|
||||
//获取订单详情
|
||||
const handleDetail = async (record) => {
|
||||
modalVisible.value = true;
|
||||
@ -629,6 +647,7 @@ const handleQuery = async () => {
|
||||
Object.assign(modalForm, data);
|
||||
let result=data.order_evaluation;
|
||||
if(data.order_inquiry_case && data.order_inquiry_case.inquiry_case_id){
|
||||
|
||||
const caseInfo= await inquiryCase(data.order_inquiry_case.inquiry_case_id);
|
||||
Object.assign(patientData,caseInfo.data);
|
||||
|
||||
@ -684,7 +703,7 @@ const openPatient=()=>{
|
||||
patientVisible.value=true;
|
||||
}
|
||||
const openInquiryRecord=()=>{
|
||||
alert("开发中");
|
||||
recordVisible.value=true;
|
||||
}
|
||||
//关闭确认框
|
||||
const handelCloseChange=(data)=>{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user