患者管理接口
This commit is contained in:
parent
15eced470a
commit
af36ae256c
@ -16,4 +16,10 @@ export function getPatientDetail(id){
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function changeStatus(id,data){
|
||||||
|
return request({
|
||||||
|
url:'/admin/patient/status/'+id,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
18
src/api/prescription/list.js
Normal file
18
src/api/prescription/list.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import request from '../../utils/request'
|
||||||
|
|
||||||
|
const url = '/admin/prescription';
|
||||||
|
|
||||||
|
|
||||||
|
export function getPrescriptionList(params){
|
||||||
|
return request({
|
||||||
|
url:'/admin/prescription',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getPrescriptionDetail(id){
|
||||||
|
return request({
|
||||||
|
url:'/admin/prescription/'+id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -1,252 +1,193 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal
|
<!-- Modal -->
|
||||||
v-model:visible="patientVisible"
|
<a-modal v-model:visible="modalVisible" fullscreen title="就诊人详情" title-align="start" :footer="false"
|
||||||
fullscreen
|
@cancel="handleClose">
|
||||||
:title="modalTitle"
|
|
||||||
title-align="start"
|
|
||||||
:footer="false"
|
|
||||||
@cancel="handleClose"
|
|
||||||
>
|
|
||||||
<div class="titlebox">
|
|
||||||
<div class="bar"></div>
|
|
||||||
<div class="name">基本信息</div>
|
|
||||||
</div>
|
|
||||||
<a-form
|
|
||||||
:model="data"
|
|
||||||
:disabled="modalSatus == 'detail'"
|
|
||||||
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
|
|
||||||
>{{ data.name }}({{ data.sex == 1 ? '男,' : '女,'
|
|
||||||
}}{{ data.age }}岁)</span
|
|
||||||
>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<!-- <a-col :span="12" >
|
|
||||||
<a-form-item field="mobile" label="手机号码:">
|
|
||||||
<span>{{data.mobile}}</span>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col> -->
|
|
||||||
</a-row>
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :span="12" v-if="data.disease_class_name">
|
|
||||||
<a-form-item field="avatar" label="所患疾病:">
|
|
||||||
<span>{{ data.disease_class_name }}</span>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" v-if="data.diagnosis_date">
|
|
||||||
<a-form-item field="mobile" label="确诊日期:" >
|
|
||||||
<span v-if="parseTime(data.diagnosis_date)">{{parseTime(data.diagnosis_date,'{y}-{m}-{d}') }}</span>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :span="12" v-if="data.disease_desc">
|
|
||||||
<a-form-item field="mobile" label="病情主诉:" >
|
|
||||||
<span>{{ data.disease_desc }}</span>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-divider />
|
|
||||||
<div class="titlebox">
|
<div class="titlebox">
|
||||||
<div class="bar"></div>
|
<div class="bar"></div>
|
||||||
<div class="name">其他信息</div>
|
<div class="name">基本信息</div>
|
||||||
</div>
|
</div>
|
||||||
<a-col style="margin-top: 35px;">
|
<a-form :model="modalForm" ref="modalFormRef" :auto-label-width="true">
|
||||||
<div class="box" v-if="otherList.length>0">
|
<a-row :gutter="24" style="margin-top: 35px;">
|
||||||
<div class="row" v-for="(item,index) in otherList" :key="item.type">
|
<a-col :span="12">
|
||||||
<div class="num">{{index+1}}、</div>
|
<a-form-item field="avatar" label="真实姓名:">
|
||||||
<div class="qabox" v-if="item.infoType==1">
|
<span>{{modalForm.card_name}} ({{modalForm.sex==1?'男,':'女,'}}{{modalForm.age
|
||||||
<div class="qa">
|
}}岁)</span>
|
||||||
{{item.name}}
|
</a-form-item>
|
||||||
<text class="answer" v-if="item.status==1">是</text><text class="answer" v-else>否</text>
|
</a-col>
|
||||||
</div>
|
<a-col :span="12">
|
||||||
<div class="radiotip" v-if="(item.status==1 && item.desc)">
|
<a-form-item field="idCard" label="身份证号:" >
|
||||||
<text>{{item.nameTip}}</text>
|
<div class="box" v-show="!showEye ">
|
||||||
{{item.desc}}
|
<div class="cardNum">{{modalForm.id_number_mask}}</div>
|
||||||
</div>
|
<icon-eye-invisible class="eye" @click="handelDecryptCard(modalForm.user.user_id,modalForm.family_id)" />
|
||||||
</div>
|
</div>
|
||||||
<div class="qabox" v-else-if="item.infoType==2">
|
<div class="box" v-show="showEye">
|
||||||
<div class="qa">
|
<div class="cardNum">{{id_card_num}}</div>
|
||||||
{{item.name}}
|
<icon-eye class="eye" @click="()=>{showEye=false}" />
|
||||||
<text class="answer" v-if="item.status==1">从不</text>
|
</div>
|
||||||
<text class="answer" v-else-if="item.status==2">偶尔</text>
|
</a-form-item>
|
||||||
<text class="answer" v-else-if="item.status==3">经常 </text>
|
</a-col>
|
||||||
<text class="answer" v-else-if="item.status==4">每天</text>
|
</a-row>
|
||||||
<text class="answer" v-else>
|
<a-row :gutter="24" v-if="modalForm.mobile_mask">
|
||||||
<text v-if="item.type=='smoke'">已戒烟</text>
|
<a-col :span="12">
|
||||||
<text v-else>已戒酒</text>
|
<a-form-item field="idCard" label="手机号码:" >
|
||||||
</text>
|
<div class="box" v-show="!family_Eye">
|
||||||
</div>
|
<div class="cardNum">{{modalForm.mobile_mask}}</div>
|
||||||
</div>
|
<icon-eye-invisible class="eye" @click="handleDecryptMobile(modalForm.user.user_id,modalForm.family_id)" />
|
||||||
<div class="qabox" v-else-if="item.infoType==3">
|
</div>
|
||||||
<div class="qa">
|
<div class="box" v-show="family_Eye">
|
||||||
{{item.name}}
|
<div class="cardNum">{{family_mobile}}</div>
|
||||||
<text class="answer" v-if="item.status==1">从不</text>
|
<icon-eye class="eye" @click="()=>{family_Eye=false}" />
|
||||||
<text class="answer" v-else-if="item.status==2">偶尔</text>
|
</div>
|
||||||
<text class="answer" v-else-if="item.status==3">经常 </text>
|
</a-form-item>
|
||||||
<text class="answer" v-else-if="item.status==4">每天</text>
|
</a-col>
|
||||||
</div>
|
</a-row>
|
||||||
<div class="radiotip" v-if="(item.status && item.status!=1)">
|
<a-divider />
|
||||||
<text>{{item.nameTip}}</text>
|
<div class="titlebox">
|
||||||
{{item.desc}}
|
<div class="bar"></div>
|
||||||
</div>
|
<div class="name">所属账号</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="qabox" v-else-if="item.infoType==4">
|
<a-row :gutter="24" style="margin-top: 35px;">
|
||||||
<div class="qa">
|
<a-col :span="12">
|
||||||
{{item.name}}
|
<a-form-item field="avatar" label="账号用户名:">
|
||||||
<text class="answer" >{{item.desc}}</text>
|
<span>{{modalForm.user.user_name}}</span>
|
||||||
</div>
|
</a-form-item>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</div>
|
<a-row :gutter="24" style="margin-top: 35px;">
|
||||||
<div v-else>暂无数据!</div>
|
<a-col :span="12">
|
||||||
</a-col>
|
|
||||||
</a-form>
|
</a-col>
|
||||||
</a-modal>
|
</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>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {reactive,ref,getCurrentInstance,watch,toRefs} from 'vue';
|
import {ref,toRefs} from 'vue';
|
||||||
import { parseTime } from '@/utils/parseTime';
|
import {decryptCard} from '@/api/doctor/list';
|
||||||
const otherList=ref([]);
|
import {decryptMobile} from '@/api/patient/family';
|
||||||
|
import {formatRelation} from "@/utils/format"
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 是否显示
|
// 是否显示
|
||||||
patientVisible: {
|
modalVisible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
data: {
|
modalForm: {
|
||||||
type: Object,
|
type: Object,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const emits = defineEmits(['patientVisibleChange']);
|
const emits = defineEmits(['familyVisibleChange']);
|
||||||
const { patientVisible, data } = toRefs(props);
|
const {modalVisible,modalForm} = toRefs(props);
|
||||||
const modalTitle = ref('就诊人详情');
|
//切换小眼睛
|
||||||
const modalSatus = ref('detail');
|
const showEye = ref(false);
|
||||||
const loading = ref(false);
|
const id_card_num = ref('');
|
||||||
|
//解密身份证号码
|
||||||
watch(
|
const handelDecryptCard = async (user_id,family_id) => {
|
||||||
() => props.patientVisible,
|
showEye.value = true;
|
||||||
(value) => {
|
const { data, code, message } = await decryptCard({
|
||||||
if (value) {
|
user_id,
|
||||||
patientVisible.value = value;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
|
||||||
watch(()=>props.data,(data)=>{
|
|
||||||
let filter1=[];
|
|
||||||
let filter2=[];
|
|
||||||
let arr=[
|
|
||||||
{
|
|
||||||
type:"taboo",
|
|
||||||
name:'是否服用过您想购买的药品且无相关禁忌:',
|
|
||||||
nameTip:'',
|
|
||||||
status:data.is_taboo,
|
|
||||||
desc:"",
|
|
||||||
infoType:1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type:"allergy_history",
|
|
||||||
name:'是否有过敏史:',
|
|
||||||
nameTip:'过敏史:',
|
|
||||||
infoType:1,
|
|
||||||
status:data.is_allergy_history,
|
|
||||||
desc:data.allergy_history
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type:"family_history",
|
|
||||||
name:'是否有家族史:',
|
|
||||||
nameTip:'家族史:',
|
|
||||||
infoType:1,
|
|
||||||
status:data.is_family_history,
|
|
||||||
desc:data.family_history
|
|
||||||
},
|
|
||||||
{
|
|
||||||
infoType:1,
|
|
||||||
type:"pregnant",
|
|
||||||
name:'是否处于备孕、妊娠、哺乳期:',
|
|
||||||
nameTip:'',
|
|
||||||
status:data.is_pregnant,
|
|
||||||
desc:data.pregnant
|
|
||||||
},
|
|
||||||
{ infoType:1,
|
|
||||||
type:"operation",
|
|
||||||
name:'是否做过手术:',
|
|
||||||
nameTip:'手术史',
|
|
||||||
status:data.is_operation,
|
|
||||||
desc:data.operation
|
|
||||||
},
|
|
||||||
{
|
|
||||||
infoType:2,
|
|
||||||
type:"drink_wine",
|
|
||||||
name:'是否有饮酒史:',
|
|
||||||
nameTip:'',
|
|
||||||
status:data.drink_wine_status,
|
|
||||||
desc:''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
infoType:2,
|
|
||||||
type:"smoke",
|
|
||||||
name:'是否有吸烟史:',
|
|
||||||
nameTip:'',
|
|
||||||
status:data.smoke_status,
|
|
||||||
desc:''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
infoType:3,
|
|
||||||
type:"chemical",
|
|
||||||
name:'是否有接触过化学物:',
|
|
||||||
nameTip:'接触过的化学物:',
|
|
||||||
status:data.chemical_compound_status,
|
|
||||||
desc:data.chemical_compound_describe
|
|
||||||
},
|
|
||||||
{
|
|
||||||
infoType:4,
|
|
||||||
type:'hospital',
|
|
||||||
name:'确诊医院:',
|
|
||||||
status:'',
|
|
||||||
nameTip:'',
|
|
||||||
desc:data.diagnosis_hospital
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type:"takeMedince",
|
|
||||||
name:'是否服药:',
|
|
||||||
nameTip:'正在服药:',
|
|
||||||
status:data.is_take_medicine,
|
|
||||||
desc:data.drugs_name,
|
|
||||||
infoType:1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
if(data.sex==1){
|
|
||||||
filter1=arr.filter((item)=>{
|
|
||||||
return item.type!="pregnant"
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
filter1=arr;
|
|
||||||
}
|
|
||||||
if(!data.diagnosis_hospital){
|
|
||||||
filter2=filter1.filter((item)=>{
|
|
||||||
return item.type!="hospital"
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
filter2=filter1
|
|
||||||
}
|
|
||||||
let newarr=filter2.filter((item)=>{
|
|
||||||
return item.status!=null
|
|
||||||
});
|
|
||||||
console.log(newarr)
|
|
||||||
otherList.value=newarr;
|
|
||||||
},{immediate:true,deep:true})
|
|
||||||
// Akiraka 20230210 关闭弹窗
|
// Akiraka 20230210 关闭弹窗
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
emits('patientVisibleChange', (patientVisible.value = false));
|
emits('familyVisibleChange', false);
|
||||||
// Akiraka 20230210 关闭弹窗
|
|
||||||
patientVisible.value = false;
|
|
||||||
//otherList.value=[];
|
|
||||||
};
|
};
|
||||||
</script>
|
</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>
|
||||||
@ -35,9 +35,9 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data, columns,pagination} = toRefs(props);
|
const { data,columns,pagination} = toRefs(props);
|
||||||
|
const emits = defineEmits(['handleFamilyDetail']);
|
||||||
// watch(()=>props.data,(value)=>{
|
const handleDetail=(record)=>{
|
||||||
// data.value=value;
|
emits('handleFamilyDetail',record.family_id)
|
||||||
// },{immediate:true})
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -8,6 +8,12 @@
|
|||||||
<a-form-item field="mobile" label="电话号码">
|
<a-form-item field="mobile" label="电话号码">
|
||||||
<a-input :style="{ width: '182px' }" v-model="queryForm.mobile" placeholder="请输入电话号码" @press-enter="handleQuery" />
|
<a-input :style="{ width: '182px' }" v-model="queryForm.mobile" placeholder="请输入电话号码" @press-enter="handleQuery" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item field="create_range_time" label="创建时间范围">
|
||||||
|
<a-range-picker
|
||||||
|
style="width: 260px"
|
||||||
|
v-model="queryForm.create_range_time"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
||||||
@ -58,151 +64,15 @@
|
|||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-has="'admin:sysFamilyList:detail'" type="text"
|
<a-button v-has="'admin:sysFamilyList:detail'" type="text"
|
||||||
@click="handleDetail(record)"><icon-book />详情</a-button>
|
@click="handleDetail(record)"><icon-book />详情</a-button>
|
||||||
<a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||||
修改</a-button>
|
修改</a-button> -->
|
||||||
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="text"
|
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="text"
|
||||||
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
|
||||||
<!-- Modal -->
|
<familyModal :modalVisible="modalVisible" :modalForm="modalForm" @familyVisibleChange="()=>{modalVisible=false}"></familyModal>
|
||||||
<a-modal v-model:visible="modalVisible" fullscreen :title="modalTitle" title-align="start" :footer="false"
|
|
||||||
@close="() => {$refs.modalFormRef.resetFields(); modalForm.patient_id = null;}">
|
|
||||||
<div class="titlebox">
|
|
||||||
<div class="bar"></div>
|
|
||||||
<div class="name">基本信息</div>
|
|
||||||
</div>
|
|
||||||
<a-form :model="modalForm" :disabled="modalSatus=='detail' || modalForm.iden_auth_status==2
|
|
||||||
" 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">
|
|
||||||
<tableUnit :pagination="false" :columns="family_columns" :data="family_data"></tableUnit>
|
|
||||||
</a-col>
|
|
||||||
|
|
||||||
</a-row>
|
|
||||||
<a-divider />
|
|
||||||
<div class="titlebox" v-if="modalForm.user_ship_address && modalForm.user_ship_address.length>0">
|
|
||||||
<div class="bar"></div>
|
|
||||||
<div class="name">收获地址</div>
|
|
||||||
</div>
|
|
||||||
<div class="cellbox" v-if="modalForm.user_ship_address && modalForm.user_ship_address.length>0">
|
|
||||||
<div class="cell" v-for="item in modalForm.user_ship_address">
|
|
||||||
<a-row :gutter="24" >
|
|
||||||
<a-col :span="12">
|
|
||||||
<a-form-item field="" label="收货人姓名:">
|
|
||||||
{{ item.consignee_name}}
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12">
|
|
||||||
<a-form-item field="" label="收货人电话:">
|
|
||||||
{{ item.consignee_tel}}
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row :gutter="24" >
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-form-item field="" label="收货人地址:">
|
|
||||||
{{ item.province}} {{item.city}}{{item.county}}{{item.address}}
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a-divider v-if="modalForm.user_ship_address && modalForm.user_ship_address.length>0"/>
|
|
||||||
</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-space v-if="modalSatus=='edit'">
|
|
||||||
<a-button type="primary" status="warning">拉黑</a-button>
|
|
||||||
<a-button type="primary" status="danger">删除</a-button>
|
|
||||||
</a-space> -->
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-modal>
|
|
||||||
|
|
||||||
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
||||||
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeFamily"
|
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeFamily"
|
||||||
@deleteVisibleChange="() => deleteVisible = false" /> -->
|
@deleteVisibleChange="() => deleteVisible = false" /> -->
|
||||||
@ -219,9 +89,9 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||||
import { getFamilyList,getFamilyDetail,decryptMobile} from '@/api/patient/family';
|
import { getFamilyList,getFamilyDetail} from '@/api/patient/family';
|
||||||
import {formatRelation} from "@/utils/format"
|
import {formatRelation} from "@/utils/format"
|
||||||
import {decryptCard} from '@/api/doctor/list';
|
|
||||||
// Akiraka 20230210 删除数据
|
// Akiraka 20230210 删除数据
|
||||||
const deleteData = ref([])
|
const deleteData = ref([])
|
||||||
// Akiraka 20230210 删除对话框
|
// Akiraka 20230210 删除对话框
|
||||||
@ -273,7 +143,16 @@
|
|||||||
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
|
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
|
||||||
|
|
||||||
});
|
});
|
||||||
|
watch(() => queryForm.create_range_time,
|
||||||
|
(value) => {
|
||||||
|
if (value) {
|
||||||
|
let [startTime, endTime] = value;
|
||||||
|
queryForm.created_at = startTime + '&' + endTime;
|
||||||
|
} else {
|
||||||
|
queryForm.created_at = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
// Modal
|
// Modal
|
||||||
const modalVisible = ref(false);
|
const modalVisible = ref(false);
|
||||||
const modalTitle = ref('默认标题');
|
const modalTitle = ref('默认标题');
|
||||||
@ -289,7 +168,7 @@
|
|||||||
{ title: '账号电话', dataIndex: 'mobile_mask' },
|
{ title: '账号电话', dataIndex: 'mobile_mask' },
|
||||||
{ title: '与账号关系', dataIndex: 'relation', slotName: 'relation' },
|
{ title: '与账号关系', dataIndex: 'relation', slotName: 'relation' },
|
||||||
{ title: '启用状态', dataIndex: 'status', slotName: 'status' },
|
{ title: '启用状态', dataIndex: 'status', slotName: 'status' },
|
||||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
{ title: '操作', slotName: 'action', fixed: "right", width: 120 },
|
||||||
];
|
];
|
||||||
|
|
||||||
// Table Data
|
// Table Data
|
||||||
@ -307,13 +186,13 @@
|
|||||||
|
|
||||||
//详情
|
//详情
|
||||||
const handleDetail = async (record) => {
|
const handleDetail = async (record) => {
|
||||||
modalVisible.value = true;
|
|
||||||
modalTitle.value = '就诊人详情';
|
|
||||||
modalSatus.value = 'detail';
|
|
||||||
const { code, data, message } = await getFamilyDetail(record.family_id);
|
const { code, data, message } = await getFamilyDetail(record.family_id);
|
||||||
|
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
Object.assign(modalForm, data);
|
Object.assign(modalForm, data);
|
||||||
|
modalVisible.value = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 批量删除
|
// 批量删除
|
||||||
@ -375,43 +254,7 @@
|
|||||||
|
|
||||||
getFamilyInfo(params);
|
getFamilyInfo(params);
|
||||||
};
|
};
|
||||||
//切换小眼睛
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 重置搜索
|
// 重置搜索
|
||||||
const handleResetQuery = () => {
|
const handleResetQuery = () => {
|
||||||
proxy.$refs.queryFormRef.resetFields();
|
proxy.$refs.queryFormRef.resetFields();
|
||||||
|
|||||||
@ -8,6 +8,12 @@
|
|||||||
<a-form-item field="mobile" label="电话号码">
|
<a-form-item field="mobile" label="电话号码">
|
||||||
<a-input :style="{ width: '182px' }" v-model="queryForm.mobile" placeholder="请输入电话号码" @press-enter="handleQuery" />
|
<a-input :style="{ width: '182px' }" v-model="queryForm.mobile" placeholder="请输入电话号码" @press-enter="handleQuery" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item field="create_range_time" label="创建时间范围">
|
||||||
|
<a-range-picker
|
||||||
|
style="width: 260px"
|
||||||
|
v-model="queryForm.create_range_time"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
||||||
@ -39,7 +45,8 @@
|
|||||||
<!-- 状态(0:禁用 1:正常 2:删除) -->
|
<!-- 状态(0:禁用 1:正常 2:删除) -->
|
||||||
<a-tag v-if="record.status == 0" color="#ffb400">禁用</a-tag>
|
<a-tag v-if="record.status == 0" color="#ffb400">禁用</a-tag>
|
||||||
<a-tag v-else-if="record.status == 1" color="green">正常</a-tag>
|
<a-tag v-else-if="record.status == 1" color="green">正常</a-tag>
|
||||||
<a-tag v-else color="red">删除</a-tag>
|
<a-tag v-else-if="record.status == 2" color="red" >删除</a-tag>
|
||||||
|
<!-- <a-switch @click="handleChangeStatus(record)" v-model="record.status" :loading="loading" :disabled="loading" :checked-value="1" :unchecked-value="0" v-else/> -->
|
||||||
</template>
|
</template>
|
||||||
<template #is_platform_deep_cooperation="{ record }">
|
<template #is_platform_deep_cooperation="{ record }">
|
||||||
<a-tag v-if="record.is_platform_deep_cooperation == 0" color="gray">否</a-tag>
|
<a-tag v-if="record.is_platform_deep_cooperation == 0" color="gray">否</a-tag>
|
||||||
@ -58,10 +65,7 @@
|
|||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-has="'admin:sysPatientList:detail'" type="text"
|
<a-button v-has="'admin:sysPatientList:detail'" type="text"
|
||||||
@click="handleDetail(record)"><icon-book />详情</a-button>
|
@click="handleDetail(record)"><icon-book />详情</a-button>
|
||||||
<a-button v-has="'admin:sysPatientList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
|
||||||
修改</a-button>
|
|
||||||
<!-- <a-button v-has="'admin:sysPatientList:remove'" type="text"
|
|
||||||
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -137,7 +141,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-row :gutter="24" style="margin-top: 35px;">
|
<a-row :gutter="24" style="margin-top: 35px;">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<tableUnit :pagination="false" :columns="family_columns" :data="family_data"></tableUnit>
|
<tableUnit :pagination="false" :columns="family_columns" :data="family_data" @handleFamilyDetail="handleFamilyDetail"></tableUnit>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -179,7 +183,8 @@
|
|||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item field="" label="" no-style>
|
<a-form-item field="" label="" no-style>
|
||||||
<a-space >
|
<a-space >
|
||||||
<a-button type="primary" status="danger" @click="">禁用</a-button>
|
<a-button type="primary" v-has="'admin:sysPatientList:disable'" status="danger" @click="handleChangeStatus('0')" v-if="modalForm.status==1">禁用</a-button>
|
||||||
|
<!-- <a-button type="primary" status="success" @click="handleChangeStatus('1')" v-if="modalForm.status==0">启用</a-button> -->
|
||||||
</a-space>
|
</a-space>
|
||||||
<!-- <a-space v-if="modalSatus=='edit'">
|
<!-- <a-space v-if="modalSatus=='edit'">
|
||||||
<a-button type="primary" status="warning">拉黑</a-button>
|
<a-button type="primary" status="warning">拉黑</a-button>
|
||||||
@ -190,31 +195,46 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
|
||||||
<DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removePatient"
|
<!-- 就诊人详情 -->
|
||||||
@deleteVisibleChange="() => deleteVisible = false" />
|
<familyModal :modalVisible="familyVisible" :modalForm="familyForm" @familyVisibleChange="()=>{familyVisible=false}"></familyModal>
|
||||||
<!-- Akiraka 20230223 删除与批量删除 结束 -->
|
<!-- Akiraka 20230223 删除与批量删除 结束 -->
|
||||||
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal"
|
<a-modal v-model:visible="okVisible" :modal-style="{width:'420px'}" body-class="okmodal"
|
||||||
@cancel="()=>okVisible=false">
|
@cancel="cancelOk" @ok="handleOk">
|
||||||
<template #title>
|
<template #title>
|
||||||
提示
|
提示
|
||||||
</template>
|
</template>
|
||||||
<div>确定保存当前信息?</div>
|
<a-form :model="okForm" :rules="formRules" ref="okModalFormRef" size="medium" label-align="left" auto-label-width>
|
||||||
|
<a-form-item field="disable_reason" label="禁用理由" >
|
||||||
|
<a-textarea v-model.trim="okForm.disable_reason" allow-clear placeholder="请输入取消订单理由"></a-textarea>
|
||||||
|
</a-form-item>
|
||||||
|
<!-- <template #footer>
|
||||||
|
<a-button @click="()=>okVisible=false"><template #icon><icon-close /></template>取消</a-button>
|
||||||
|
<a-button type="primary" @click="handleOk"><template #icon><icon-check /></template>确认</a-button>
|
||||||
|
</template> -->
|
||||||
|
</a-form>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||||
import { getPatientList, getPatientDetail } from '@/api/patient/list';
|
import { getPatientList,getPatientDetail,changeStatus} from '@/api/patient/list';
|
||||||
|
import {getFamilyDetail} from '@/api/patient/family';
|
||||||
import {parseTime} from "@/utils/parseTime"
|
import {parseTime} from "@/utils/parseTime"
|
||||||
// Akiraka 20230210 删除数据
|
// Akiraka 20230210 删除数据
|
||||||
const deleteData = ref([])
|
const deleteData = ref([])
|
||||||
// Akiraka 20230210 删除对话框
|
// Akiraka 20230210 删除对话框
|
||||||
const deleteVisible = ref(false)
|
const deleteVisible = ref(false)
|
||||||
// Akiraka 20230210 监听删除事件
|
// Akiraka 20230210 监听删除事件
|
||||||
|
const loading=ref(true);
|
||||||
const okVisible = ref(false);
|
const okVisible = ref(false);
|
||||||
|
const okForm = reactive({
|
||||||
|
disable_reason: ''
|
||||||
|
});
|
||||||
|
const formRules = reactive({
|
||||||
|
disable_reason: [{ required: true, message: '请输入禁用理由' }]
|
||||||
|
});
|
||||||
watch(() => deleteVisible.value, (value) => {
|
watch(() => deleteVisible.value, (value) => {
|
||||||
if (value == false) {
|
if (value == false) {
|
||||||
getPatientInfo(pager);
|
getPatientInfo(pager);
|
||||||
@ -258,7 +278,16 @@
|
|||||||
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
|
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
|
||||||
|
|
||||||
});
|
});
|
||||||
|
watch(() => queryForm.create_range_time,
|
||||||
|
(value) => {
|
||||||
|
if (value) {
|
||||||
|
let [startTime, endTime] = value;
|
||||||
|
queryForm.created_at = startTime + '&' + endTime;
|
||||||
|
} else {
|
||||||
|
queryForm.created_at = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
// Modal
|
// Modal
|
||||||
const modalVisible = ref(false);
|
const modalVisible = ref(false);
|
||||||
const modalTitle = ref('默认标题');
|
const modalTitle = ref('默认标题');
|
||||||
@ -275,7 +304,7 @@
|
|||||||
{ title: '注册时间', dataIndex: 'created_at', slotName: 'created_at' },
|
{ title: '注册时间', dataIndex: 'created_at', slotName: 'created_at' },
|
||||||
{ title: '启用状态', dataIndex: 'status', slotName: 'status' },
|
{ title: '启用状态', dataIndex: 'status', slotName: 'status' },
|
||||||
{ title: '禁用理由', dataIndex: 'disable_reason', slotName: 'disable_reason' },
|
{ title: '禁用理由', dataIndex: 'disable_reason', slotName: 'disable_reason' },
|
||||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
{ title: '操作', slotName: 'action', fixed: "right", width: 120 },
|
||||||
];
|
];
|
||||||
|
|
||||||
// Table Data
|
// Table Data
|
||||||
@ -303,26 +332,62 @@
|
|||||||
family_data.value=data.patient_family;
|
family_data.value=data.patient_family;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 批量删除
|
|
||||||
const handleBatchDelete = () => {
|
const cur_parent_id=ref('');
|
||||||
if (batchList.length !== 0) {
|
const switchStatus= async(patient_id,putData)=>{
|
||||||
proxy.$modal.warning({
|
const {code,message}= await changeStatus(patient_id,putData);
|
||||||
title: '提示',
|
if(code==200){
|
||||||
content: '是否批量删除以下选中的数据?',
|
putData.status==0?proxy.$notification.success("禁用成功"):proxy.$notification.success('启用成功');
|
||||||
hideCancel: false,
|
modalVisible.value=false;
|
||||||
onOk: async () => {
|
handleQuery();
|
||||||
const res = await removePatient({ ids: batchList });
|
proxy.$refs.okModalFormRef.resetFields();
|
||||||
proxy.$message.success(res.message);
|
}else{
|
||||||
getPatientInfo(pager);
|
proxy.$notification.error(message);
|
||||||
},
|
}
|
||||||
onCancel: () => {
|
|
||||||
proxy.$message.info('已取消批量删除数据');
|
|
||||||
},
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
proxy.$message.error('请勾选需要删除的数据!');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
const cancelOk=()=>{
|
||||||
|
okVisible.value=false;
|
||||||
|
}
|
||||||
|
const handleOk = () => {
|
||||||
|
proxy.$refs.okModalFormRef.validate(async(valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
switchStatus(cur_parent_id.value,{
|
||||||
|
status:0,
|
||||||
|
disable_reason:okForm.disable_reason
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
okVisible.value=true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//改变用户状态
|
||||||
|
const handleChangeStatus=async(status)=>{
|
||||||
|
if(status==0){
|
||||||
|
cur_parent_id.value=modalForm.patient_id;
|
||||||
|
okVisible.value=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if(record.status==0){
|
||||||
|
// okVisible.value=true;
|
||||||
|
// }else{
|
||||||
|
// switchStatus(record.patient_id,{
|
||||||
|
// status:1
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
//就诊人详情
|
||||||
|
const familyVisible=ref(false);
|
||||||
|
const familyForm=reactive({
|
||||||
|
user:{},
|
||||||
|
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
|
||||||
|
});
|
||||||
|
const handleFamilyDetail = async (family_id) => {
|
||||||
|
const { code, data} = await getFamilyDetail(family_id);
|
||||||
|
if (code == 200) {
|
||||||
|
Object.assign(familyForm, data);
|
||||||
|
familyVisible.value = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页改变
|
* 分页改变
|
||||||
@ -344,11 +409,13 @@
|
|||||||
|
|
||||||
// 获取患者信息
|
// 获取患者信息
|
||||||
const getPatientInfo = async (params = {}) => {
|
const getPatientInfo = async (params = {}) => {
|
||||||
|
loading.value=true;
|
||||||
const { data, code, message } = await getPatientList(params);
|
const { data, code, message } = await getPatientList(params);
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
tableData.value = data.data;
|
tableData.value = data.data;
|
||||||
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
|
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
|
||||||
}
|
}
|
||||||
|
loading.value=false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 查询患者信息
|
// 查询患者信息
|
||||||
@ -443,7 +510,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.reason{
|
.reason{
|
||||||
width:250px;
|
max-width:250px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|||||||
425
src/views/prescription/prescription-list/index.vue
Normal file
425
src/views/prescription/prescription-list/index.vue
Normal file
@ -0,0 +1,425 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
||||||
|
<a-form-item field="prescription_code" label="处方编号">
|
||||||
|
<a-input :style="{ width: '182px' }" v-model="queryForm.prescription_code" placeholder="请输入处方编号" @press-enter="handleQuery" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="inquiry_no" label="问诊编号">
|
||||||
|
<a-input :style="{ width: '182px' }" v-model="queryForm.inquiry_no" placeholder="请输入问诊订单编号" @press-enter="handleQuery" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="order_product_no" label="药品编号">
|
||||||
|
<a-input :style="{ width: '182px' }" v-model="queryForm.order_product_no" placeholder="请输入药品订单编号" @press-enter="handleQuery" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="doctor_name" label="医生姓名">
|
||||||
|
<a-input :style="{ width: '182px' }" v-model="queryForm.doctor_name" placeholder="请输入医生姓名" @press-enter="handleQuery" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="patient_name" label="患者姓名">
|
||||||
|
<a-input :style="{ width: '182px' }" v-model="queryForm.patient_name" placeholder="请输入患者姓名" @press-enter="handleQuery" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="mobile" label="电话号码">
|
||||||
|
<a-input :style="{ width: '182px' }" v-model="queryForm.mobile" placeholder="请输入医生或者患者电话号码" @press-enter="handleQuery" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="prescription_status" label="处方状态">
|
||||||
|
<a-select
|
||||||
|
v-model="queryForm.prescription_status"
|
||||||
|
placeholder="请选择处方状态"
|
||||||
|
:style="{ width: '182px' }"
|
||||||
|
>
|
||||||
|
<!-- 处方状态(1:待审核 2:待使用 3:已失效 4:已使用) -->
|
||||||
|
<a-option value="1">待审核</a-option>
|
||||||
|
<a-option value="2">待使用</a-option>
|
||||||
|
<a-option value="3">已失效</a-option>
|
||||||
|
<a-option value="4">已使用</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="pharmacist_audit_status" label="审核状态">
|
||||||
|
<a-select
|
||||||
|
v-model="queryForm.pharmacist_audit_status"
|
||||||
|
placeholder="请选择审核状态"
|
||||||
|
:style="{ width: '182px' }"
|
||||||
|
>
|
||||||
|
<!-- (0:审核中 1:审核成功 2:审核驳回) -->
|
||||||
|
<a-option value="0">审核中</a-option>
|
||||||
|
<a-option value="1">审核成功</a-option>
|
||||||
|
<a-option value="2">审核驳回</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
<a-row>
|
||||||
|
<a-form-item field="pharmacist_verify_range_time" label="审核时间范围">
|
||||||
|
<a-range-picker
|
||||||
|
style="width: 330px"
|
||||||
|
v-model="queryForm.pharmacist_verify_range_time"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="create_range_time" label="开具时间范围">
|
||||||
|
<a-range-picker
|
||||||
|
style="width: 330px"
|
||||||
|
v-model="queryForm.create_range_time"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="expired_range_time" label="过期时间范围">
|
||||||
|
<a-range-picker
|
||||||
|
style="width: 330px"
|
||||||
|
v-model="queryForm.expired_range_time"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item>
|
||||||
|
<a-space>
|
||||||
|
<a-button type="primary" @click="handleQuery"
|
||||||
|
><icon-search /> 搜索</a-button
|
||||||
|
>
|
||||||
|
<a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
|
||||||
|
</a-space>
|
||||||
|
</a-form-item>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
|
||||||
|
<a-divider />
|
||||||
|
|
||||||
|
<!-- action -->
|
||||||
|
<div class="action">
|
||||||
|
<a-space>
|
||||||
|
<a-button v-has="'admin:sysPrescriptionList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
|
||||||
|
<!-- <a-button v-has="'admin:sysPrescriptionList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button> -->
|
||||||
|
</a-space>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- table -->
|
||||||
|
<a-table :columns="columns" :data="tableData"
|
||||||
|
:scroll="{ x: 1400 }"
|
||||||
|
:row-selection="{ type: 'checkbox', showCheckedAll: true }"
|
||||||
|
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
||||||
|
row-key="doctor_id" @selection-change="(selection) => {deleteData = selection;console.log(selection)}"
|
||||||
|
@page-change="handlePageChange" @page-size-change="handlepage_sizeChange">
|
||||||
|
<template #doctor_id="{record,rowIndex}">
|
||||||
|
<div>{{(rowIndex+1)+(pager.page-1)*10}}</div>
|
||||||
|
</template>
|
||||||
|
<template #prescription_status="{ record }">
|
||||||
|
<span>{{formatPrescriptionStatus(record.prescription_status)}}</span>
|
||||||
|
</template>
|
||||||
|
<template #is_platform_deep_cooperation="{ record }">
|
||||||
|
<a-tag v-if="record.is_platform_deep_cooperation == 0" color="gray">否</a-tag>
|
||||||
|
<a-tag v-else color="green">是</a-tag>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #doctor_name="{record}">
|
||||||
|
<div class="doctor_name" :title="record.doctor_name">{{ record.doctor_name }}</div>
|
||||||
|
</template>
|
||||||
|
<template #pharmacist_name="{record}">
|
||||||
|
<div class="doctor_name" :title="record.pharmacist_name">{{record.pharmacist_name}}</div>
|
||||||
|
</template>
|
||||||
|
<template #patient_name="{record}">
|
||||||
|
<div class="doctor_name" :title="record.patient_name">{{record.patient_name}}({{
|
||||||
|
record.patient_sex == 1 ? '男,' : '女,'
|
||||||
|
}}{{ record.patient_age }}岁)</div>
|
||||||
|
</template>
|
||||||
|
<template #order_prescription_icd="{record}">
|
||||||
|
<div class="doctor_name" :title="record.order_prescription_icd">{{record.order_prescription_icd}}</div>
|
||||||
|
</template>
|
||||||
|
<template #action="{ record }">
|
||||||
|
<a-space>
|
||||||
|
<a-button v-has="'admin:sysPrescriptionList:detail'" type="text"
|
||||||
|
@click="handleDetail(record)"><icon-book />详情</a-button>
|
||||||
|
<!-- <a-button v-has="'admin:sysPrescriptionList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||||
|
修改</a-button> -->
|
||||||
|
<!-- <a-button v-has="'admin:sysPrescriptionList:remove'" type="text"
|
||||||
|
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
|
||||||
|
<familyModal :modalVisible="modalVisible" :modalForm="modalForm" @familyVisibleChange="()=>{modalVisible=false}"></familyModal>
|
||||||
|
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
||||||
|
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removePrescription"
|
||||||
|
@deleteVisibleChange="() => deleteVisible = false" /> -->
|
||||||
|
<!-- Akiraka 20230223 删除与批量删除 结束 -->
|
||||||
|
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal"
|
||||||
|
@cancel="()=>okVisible=false">
|
||||||
|
<template #title>
|
||||||
|
提示
|
||||||
|
</template>
|
||||||
|
<div>确定保存当前信息?</div>
|
||||||
|
</a-modal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||||
|
import { getPrescriptionList,getPrescriptionDetail} from '@/api/prescription/list';
|
||||||
|
import {formatPrescriptionStatus} from "@/utils/format"
|
||||||
|
|
||||||
|
// Akiraka 20230210 删除数据
|
||||||
|
const deleteData = ref([])
|
||||||
|
// Akiraka 20230210 删除对话框
|
||||||
|
const deleteVisible = ref(false)
|
||||||
|
// Akiraka 20230210 监听删除事件
|
||||||
|
const okVisible = ref(false);
|
||||||
|
|
||||||
|
watch(() => deleteVisible.value, (value) => {
|
||||||
|
if (value == false) {
|
||||||
|
getPrescriptionInfo(pager);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const file = ref();
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const currentPage = ref(1);
|
||||||
|
const family_data=ref([]);
|
||||||
|
const family_columns=ref([{
|
||||||
|
title: '编号',
|
||||||
|
dataIndex: 'code',
|
||||||
|
slotName:'code'
|
||||||
|
},{
|
||||||
|
title: '就诊人姓名',
|
||||||
|
dataIndex: 'card_name_mask',
|
||||||
|
},{
|
||||||
|
title: '身份证号',
|
||||||
|
dataIndex: 'id_number_mask',
|
||||||
|
},{
|
||||||
|
title: '与账号关系',
|
||||||
|
dataIndex: 'relation',
|
||||||
|
slotName:'relation'
|
||||||
|
},{
|
||||||
|
title: '添加时间',
|
||||||
|
dataIndex: 'created_at',
|
||||||
|
slotName:'created_at'
|
||||||
|
}, { title: '操作', slotName: 'action'}])
|
||||||
|
// Pager
|
||||||
|
const pager = {
|
||||||
|
total: 0,
|
||||||
|
page: 1,
|
||||||
|
page_size: 10,
|
||||||
|
};
|
||||||
|
// form
|
||||||
|
const queryForm = reactive({
|
||||||
|
|
||||||
|
});
|
||||||
|
const modalForm = reactive({
|
||||||
|
user:{},
|
||||||
|
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Modal
|
||||||
|
const modalVisible = ref(false);
|
||||||
|
const modalTitle = ref('默认标题');
|
||||||
|
watch(() => queryForm.pharmacist_verify_range_time,
|
||||||
|
(value) => {
|
||||||
|
if (value) {
|
||||||
|
let [startTime, endTime] = value;
|
||||||
|
queryForm.pharmacist_verify_time = startTime + '&' + endTime;
|
||||||
|
} else {
|
||||||
|
queryForm.pharmacist_verify_time = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
watch(() => queryForm.create_range_time,
|
||||||
|
(value) => {
|
||||||
|
if (value) {
|
||||||
|
let [startTime, endTime] = value;
|
||||||
|
queryForm.doctor_created_time = startTime + '&' + endTime;
|
||||||
|
} else {
|
||||||
|
queryForm.doctor_created_time = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
watch(() => queryForm.expired_range_time,
|
||||||
|
(value) => {
|
||||||
|
if (value) {
|
||||||
|
let [startTime, endTime] = value;
|
||||||
|
queryForm.expired = startTime + '&' + endTime;
|
||||||
|
} else {
|
||||||
|
queryForm.expired = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// Batch Del List
|
||||||
|
let batchList = [];
|
||||||
|
|
||||||
|
// Table Columns
|
||||||
|
const columns = [
|
||||||
|
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
|
||||||
|
{ title: '处方编号', dataIndex: 'order_prescription_id',width:180 },
|
||||||
|
{ title: '医生姓名', dataIndex: 'doctor_name',slotName: 'doctor_name', width: 150 },
|
||||||
|
{ title: '药师姓名', dataIndex: 'pharmacist_name',slotName:'pharmacist_name' },
|
||||||
|
{ title: '就诊人', dataIndex: 'patient_name', slotName: 'patient_name',width:180 },
|
||||||
|
{ title: '就诊人联系电话', dataIndex: 'mobile',width:130 },
|
||||||
|
{ title: '诊断', dataIndex: 'order_prescription_icd',slotName: 'order_prescription_icd' },
|
||||||
|
{ title: '处方状态', dataIndex: 'prescription_status',slotName:'prescription_status' },
|
||||||
|
{ title: '开方时间', dataIndex: 'created_at',slotName:'created_at',width:180 },
|
||||||
|
{ title: '操作', slotName: 'action', fixed: "right", width: 120 },
|
||||||
|
];
|
||||||
|
|
||||||
|
// Table Data
|
||||||
|
const tableData = ref([]);
|
||||||
|
//弹框状态
|
||||||
|
const modalSatus = ref('add');
|
||||||
|
|
||||||
|
// 新增Satus
|
||||||
|
const handleAdd = () => {
|
||||||
|
modalVisible.value = true;
|
||||||
|
modalTitle.value = '新增患者';
|
||||||
|
modalSatus.value = 'add';
|
||||||
|
modalForm.patient_id = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
//详情
|
||||||
|
const handleDetail = async (record) => {
|
||||||
|
|
||||||
|
|
||||||
|
const { code, data, message } = await getPrescriptionDetail(record.family_id);
|
||||||
|
|
||||||
|
if (code == 200) {
|
||||||
|
Object.assign(modalForm, data);
|
||||||
|
modalVisible.value = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 批量删除
|
||||||
|
const handleBatchDelete = () => {
|
||||||
|
if (batchList.length !== 0) {
|
||||||
|
proxy.$modal.warning({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否批量删除以下选中的数据?',
|
||||||
|
hideCancel: false,
|
||||||
|
onOk: async () => {
|
||||||
|
const res = await removePrescription({ ids: batchList });
|
||||||
|
proxy.$message.success(res.message);
|
||||||
|
getPrescriptionInfo(pager);
|
||||||
|
},
|
||||||
|
onCancel: () => {
|
||||||
|
proxy.$message.info('已取消批量删除数据');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
proxy.$message.error('请勾选需要删除的数据!');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页改变
|
||||||
|
* @param {Number} [page]
|
||||||
|
*/
|
||||||
|
const handlePageChange = (page) => {
|
||||||
|
pager.page = page;
|
||||||
|
|
||||||
|
// 修改当前页码
|
||||||
|
currentPage.value = page;
|
||||||
|
getPrescriptionInfo({ ...pager, ...queryForm });
|
||||||
|
};
|
||||||
|
|
||||||
|
// 每页数据量
|
||||||
|
const handlepage_sizeChange = (page_size) => {
|
||||||
|
pager.page_size = page_size;
|
||||||
|
getPrescriptionInfo({ ...pager, ...queryForm });
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取患者信息
|
||||||
|
const getPrescriptionInfo = async (params = {}) => {
|
||||||
|
const { data, code, message } = await getPrescriptionList(params);
|
||||||
|
if (code == 200) {
|
||||||
|
tableData.value = data.data;
|
||||||
|
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 查询患者信息
|
||||||
|
const handleQuery = async () => {
|
||||||
|
pager.page = 1;
|
||||||
|
const params = {
|
||||||
|
page: pager.page,
|
||||||
|
page_size: pager.page_size,
|
||||||
|
...queryForm,
|
||||||
|
};
|
||||||
|
|
||||||
|
getPrescriptionInfo(params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 重置搜索
|
||||||
|
const handleResetQuery = () => {
|
||||||
|
proxy.$refs.queryFormRef.resetFields();
|
||||||
|
//getPrescriptionInfo(queryForm);
|
||||||
|
currentPage.value=1;
|
||||||
|
//getProductInfo(queryForm);
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getPrescriptionInfo(pager);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.action {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.okmodal div {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hospital_name {
|
||||||
|
width: 140px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headImg {
|
||||||
|
margin-right: 20px;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
.cell{
|
||||||
|
.arco-form-item{
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cert .arco-form-item-label-col {
|
||||||
|
flex: 0 0 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.red {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: red;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardNum {
|
||||||
|
width: 148px;
|
||||||
|
}
|
||||||
|
.codbox{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.doctor_name{
|
||||||
|
max-width:250px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user