@@ -2,79 +2,12 @@
< div class = "app-container" >
< a-form :model = "queryForm" ref = "queryFormRef" layout = "inline" >
< a-form-item field = "user_name" label = "医生 名字" >
< a-input : style = "{ width: '182px' }" v-model = "queryForm.user_name" placeholder="请输入医生 名字" @press-enter="handleQuery" / >
< a-form-item field = "user_name" label = "患者 名字" >
< a-input : style = "{ width: '182px' }" v-model = "queryForm.user_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 = "hospital_name" label = "所属医院" >
< a-input : style = "{ width: '182px' }" v-model = "queryForm.hospital_name" placeholder="请输入所属医院" @press-enter="handleQuery" / >
< / a-form-item >
<!-- < a-form-item field = "department_custom_name" label = "科室名称" >
< a-input v-model = "queryForm.department_custom_name" placeholder="请输入科室名称" @press-enter="handleQuery" / >
< / a-form-item > -- >
< a-form-item field = "doctor_title" label = "医生职称" >
< a-select v-model = "queryForm.doctor_title" placeholder="请选择医生职称" :style="{ width: '182px' }" >
< ! - - 医生职称 ( 1 : 主任医师 2 : 主任中医师 3 : 副主任医师 4 : 副主任中医师 5 : 主治医师 6 : 住院医师 ) - - >
< 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-option :value = "5" > 主治医师 < / a-option >
< a-option :value = "6" > 住院医师 < / a-option >
< / a-select >
< / a-form-item >
< a-form-item field = "inquiry_service" label = "服务类型" >
< a-select v-model = "queryForm.inquiry_service" 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 = "multi_point_status" label = "多点认证" >
< a-select v-model = "queryForm.multi_point_status" placeholder="请选择多点认证状态" :style="{ width: '182px' }" >
< ! - - 医生多点执业认证状态 ( 0 : 未认证 1 : 认证通过 2 : 审核中 3 : 认证失败 ) - - >
< a-option :value = "0" > 未认证 < / a-option >
< a-option :value = "1" > 认证通过 < / a-option >
< a-option :value = "2" > 审核中 < / a-option >
< a-option :value = "3" > 认证失败 < / a-option >
< / a-select >
< / a-form-item >
< a-form-item field = "iden_auth_status" label = "审核状态" >
< a-select v-model = "queryForm.iden_auth_status" placeholder="请选择审核状态" :style="{ width: '182px' }" >
< ! - - 医生多点执业认证状态 ( 0 : 未认证 1 : 认证通过 2 : 审核中 3 : 认证失败 ) - - >
< a-option :value = "0" > 未认证 < / a-option >
< a-option :value = "1" > 认证通过 < / a-option >
< a-option :value = "2" > 审核中 < / a-option >
< a-option :value = "3" > 认证失败 < / a-option >
< / a-select >
< / a-form-item >
< a-form-item field = "idcard_status" label = "实名认证" >
< a-select v-model = "queryForm.idcard_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-form-item field = "is_recommend" label = "首页推荐" >
< a-select v-model = "queryForm.is_recommend" placeholder="请选择是否首页推荐" :style="{ width: '182px' }" >
< ! - - 实名认证状态 ( 0 : 未认证 1 : 认证通过 2 : 认证失败 ) - - >
< a-option :value = "0" > 否 < / a-option >
< a-option :value = "1" > 是 < / a-option >
< / a-select >
< / a-form-item >
< a-form-item field = "is_platform_deep_cooperation" label = "深度合作" >
< a-select v-model = "queryForm.is_platform_deep_cooperation" placeholder="请选择是否是平台深度合作" :style="{ width: '182px' }" >
< ! - - 实名认证状态 ( 0 : 未认证 1 : 认证通过 2 : 认证失败 ) - - >
< a-option :value = "0" > 否 < / a-option >
< a-option :value = "1" > 是 < / a-option >
< / a-select >
< / a-form-item >
< a-form-item >
< a-space >
< a-button type = "primary" @click ="handleQuery" > < icon -search / > 搜索 < / a-button >
@@ -88,13 +21,13 @@
<!-- action -- >
< div class = "action" >
< a-space >
< a-button v-has = "'admin:sysDoctor List:add'" type="primary" @click="handleAdd" > < icon -plus / > 新增 < / a-button >
<!-- < a-button v-has = "'admin:sysDoctor List:remove'" type="primary" status="danger" > < icon -delete / > 批量删除 < / a-button > -- >
< a-button v-has = "'admin:sysPatient List:add'" type="primary" @click="handleAdd" > < icon -plus / > 新增 < / a-button >
<!-- < a-button v-has = "'admin:sysPatient List:remove'" type="primary" status="danger" > < icon -delete / > 批量删除 < / a-button > -- >
< / a-space >
< / div >
<!-- table -- >
< a-table :columns = "columns" :data = "tableData" : scroll = "{ x: 1700 }"
< a-table :columns = "columns" :data = "tableData"
: 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 ) } "
@@ -102,64 +35,32 @@
<template #doctor_id=" { record , rowIndex } ">
<div>{{(rowIndex+1)+(pager.page-1)*10}}</div>
</template>
<template #doctor_title=" { record } ">
<!-- 医生职称(1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师) -->
<div v-if=" record . doctor _title == 1 ">主任医师</div>
<div v-else-if=" record . doctor _title == 2 ">主任中医师</div>
<div v-else-if=" record . doctor _title == 3 ">副主任医师</div>
<div v-else-if=" record . doctor _title == 4 ">副主任中医师</div>
<div v-else-if=" record . doctor _title == 5 ">主治医师</div>
<div v-else-if=" record . doctor _title == 6 ">住院医师</div>
</template>
<template #hospital_name=" { record } ">
<div class=" hospital _name " :title=" record . hospital _name ">{{record.hospital_name}}</div>
</template>
<template #inquiry_service=" { record } ">
<span>{{filterService(record)}}</span>
</template>
<template #iden_auth_status=" { record } ">
<!-- 身份认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败) -->
<a-tag v-if=" record . iden _auth _status == 0 " color=" gray ">未认证</a-tag>
<a-tag v-else-if=" record . iden _auth _status == 1 " color=" green ">认证通过</a-tag>
<a-tag v-else-if=" record . iden _auth _status == 2 " color=" # ffb400 ">审核中</a-tag>
<a-tag v-else color=" red ">认证失败</a-tag>
</template>
<template #multi_point_status=" { record } ">
<!-- 身份认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败) -->
<a-tag v-if=" record . multi _point _status == 0 " color=" gray ">未认证</a-tag>
<a-tag v-else-if=" record . multi _point _status == 1 " color=" green ">认证通过</a-tag>
<a-tag v-else-if=" record . multi _point _status == 2 " color=" # ffb400 ">审核中</a-tag>
<a-tag v-else-if=" record . multi _point _status == 3 " color=" red ">认证失败</a-tag>
</template>
<template #is_recommend=" { record } ">
<a-tag v-if=" record . is _recommend == 0 " color=" gray ">否</a-tag>
<a-tag v-else color=" green ">是</a-tag>
</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 #idcard_status=" { record } ">
<!-- 实名认证状态(0:未认证 1:认证通过2:认证失败) -->
<a-tag v-if=" record . idcard _status == 0 " color=" gray ">未认证</a-tag>
<a-tag v-else-if=" record . idcard _status == 1 " color=" green ">认证通过</a-tag>
<a-tag v-else-if=" record . idcard _status == 2 " color=" red ">认证失败</a-tag>
</template>
<template #status=" { record } ">
<!-- 状态(0:禁用 1:正常 2:删除) -->
<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 color=" red ">删除</a-tag>
</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 #disable_reason=" { record } ">
<div class=" reason " v-if=" record . disable _reason " :title=" record . disable _reason ">{{ record.disable_reason }}</div>
<div v-else>-</div>
</template>
<template #patient_family_count=" { record } ">
<div>绑定了{{ record.patient_family_count}}个</div>
</template>
<template #action=" { record } ">
<a-space>
<a-button v-has=" 'admin:sysDoctor List:detail' " type=" text "
<a-button v-has=" 'admin:sysPatient List:detail' " type=" text "
@click=" handleDetail ( record ) "><icon-book />详情</a-button>
<a-button v-has=" 'admin:sysDoctor List:edit' " type=" text " @click=" handleUpdate ( record ) "><icon-edit />
<a-button v-has=" 'admin:sysPatient List:edit' " type=" text " @click=" handleUpdate ( record ) "><icon-edit />
修改</a-button>
<!-- <a-button v-has=" 'admin:sysDoctor List:remove' " type=" text "
<!-- <a-button v-has=" 'admin:sysPatient List:remove' " type=" text "
@click=" ( ) => { deleteVisible = true ; deleteData = [ record . doctor _id ] ; } "><icon-delete /> 删除</a-button> -->
</a-space>
</template>
@@ -573,7 +474,7 @@
</a-modal>
<!-- Akiraka 20230223 删除与批量删除 开始 -->
<DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeDoctor "
<DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removePatient "
@deleteVisibleChange="() => deleteVisible = false" />
<!-- Akiraka 20230223 删除与批量删除 结束 -->
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal" @ok="handleSubmit"
@@ -588,7 +489,7 @@
<script setup>
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
import { getDoctorList, addDoctor, removeDoctor, updateDoctor, getDoctor Detail, departmentList, decryptCard, hospitalList, expertiseList, areaList, bankList, decryptBank } from '@/api/doctor /list';
import { getPatientList, removePatient, updatePatient, getPatient Detail, departmentList, decryptCard, hospitalList, expertiseList, areaList, bankList, decryptBank } from '@/api/patient /list';
import { ossSign, ossUpload } from '@/api/oss';
import dayjs from 'dayjs'
// Akiraka 20230210 删除数据
@@ -600,7 +501,7 @@
watch(() => deleteVisible.value, (value) => {
if (value == false) {
getDoctor Info(pager);
getPatient Info(pager);
}
});
@@ -928,20 +829,12 @@
// Table Columns
const columns = [
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
{ title: '医生 名字', dataIndex: 'user_name' },
{ title: '手机 号码', dataIndex: 'mobile', width: 125 },
{ title: '医院 ', dataIndex: 'hospital_name', width: '150', slotName: 'hospital_name ' },
{ title: '职称 ', dataIndex: 'doctor_title ', slotName: 'doctor_title ' },
{ title: '开启服务 ', dataIndex: 'inquiry_service', slotName: 'inquiry_service ' },
{ title: '多点审核状态 ', dataIndex: 'multi_point_status', slotName: 'multi_point_status', width: 140 },
{ title: '是否推荐', dataIndex: 'is_recommend', slotName: 'is_recommend' },
{ title: '深度合作', dataIndex: 'is_platform_deep_cooperation', slotName: 'is_platform_deep_cooperation' },
{ title: '申请人', dataIndex: 'user_name' },
{ title: '审核状态', dataIndex: 'iden_auth_status', slotName: 'iden_auth_status' },
{ title: '实名认证', dataIndex: 'idcard_status', slotName: 'iden_auth_status' },
{ title: '状态', dataIndex: 'status', slotName: 'status' },
// { title: '创建时间', dataIndex: 'created_at', slotName: 'created_at' },
{ title: '患者 名字', dataIndex: 'user_name' },
{ title: '联系 号码', dataIndex: 'mobile', width: 125 },
{ title: '就诊人 ', dataIndex: 'patient_family_count', slotName: 'patient_family_count ' },
{ title: '注册时间 ', dataIndex: 'created_at ', slotName: 'created_at ' },
{ title: '启用状态 ', dataIndex: 'status', slotName: 'status ' },
{ title: '禁用理由 ', dataIndex: 'disable_reason', slotName: 'disable_reason' },
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
];
@@ -987,7 +880,7 @@
modalVisible.value = true;
modalTitle.value = '医生详情';
modalSatus.value = 'detail';
const { code, data, message } = await getDoctor Detail(record.doctor_id);
const { code, data, message } = await getPatient Detail(record.doctor_id);
if (code == 200) {
Object.assign(modalForm, data);
@@ -1037,7 +930,7 @@
modalVisible.value = true;
modalTitle.value = '修改医生';
modalSatus.value = 'edit';
const { code, data, message } = await getDoctor Detail(record.doctor_id);
const { code, data, message } = await getPatient Detail(record.doctor_id);
if (code == 200) {
Object.assign(modalForm, data);
handleDecryptBank();
@@ -1185,7 +1078,7 @@
}
proxy.$loading.show();
const { code, message } = await addDoctor (modalData);
const { code, message } = await addPatient (modalData);
if (code == 200) {
proxy.$notification.success('新增成功');
modalVisible.value = false;
@@ -1230,7 +1123,7 @@
}
proxy.$loading.show();
const { code, message } = await updateDoctor (modalData, modalForm.doctor_id);
const { code, message } = await updatePatient (modalData, modalForm.doctor_id);
if (code == 200) {
proxy.$notification.success('更新成功');
modalVisible.value = false;
@@ -1238,7 +1131,7 @@
proxy.$loading.hide();
}
//done();
getDoctor Info(pager);
getPatient Info(pager);
} else {
console.log(valid)
@@ -1256,9 +1149,9 @@
content: '是否批量删除以下选中的数据?',
hideCancel: false,
onOk: async () => {
const res = await removeDoctor ({ ids: batchList });
const res = await removePatient ({ ids: batchList });
proxy.$message.success(res.message);
getDoctor Info(pager);
getPatient Info(pager);
},
onCancel: () => {
proxy.$message.info('已取消批量删除数据');
@@ -1278,18 +1171,18 @@
// 修改当前页码
currentPage . value = page ;
getDoctorInfo ( { ... pager , ... queryForm } ) ;
getPatientInfo ( { ... pager , ... queryForm } ) ;
} ;
// 每页数据量
const handlepage _sizeChange = ( page _size ) => {
pager . page _size = page _size ;
getDoctorInfo ( { ... pager , ... queryForm } ) ;
getPatientInfo ( { ... pager , ... queryForm } ) ;
} ;
// 获取医生信息
const getDoctorInfo = async ( params = { } ) => {
const { data , code , message } = await getDoctorList ( params ) ;
const getPatientInfo = async ( params = { } ) => {
const { data , code , message } = await getPatientList ( params ) ;
if ( code == 200 ) {
tableData . value = data . data ;
Object . assign ( pager , { total : data . total , page : data . page , page _size : data . page _size } ) ;
@@ -1305,7 +1198,7 @@
... queryForm ,
} ;
getDoctorInfo ( params ) ;
getPatientInfo ( params ) ;
} ;
const departmentData = ref ( [ ] ) ;
@@ -1420,7 +1313,7 @@
// 重置搜索
const handleResetQuery = ( ) => {
proxy . $refs . queryFormRef . resetFields ( ) ;
getDoctorInfo ( queryForm ) ;
getPatientInfo ( queryForm ) ;
}
//获取oss签名
const getOssSign = async ( scene , File ) => {
@@ -1466,7 +1359,7 @@
getOssSign ( 1 , fileList [ 0 ] . file ) ;
}
onMounted ( ( ) => {
getDoctorInfo ( pager ) ;
getPatientInfo ( pager ) ;
handleHospitalList ( ) ;
getDepartmentList ( ) ;
handlExpertiseList ( ) ;
@@ -1538,4 +1431,10 @@
display : flex ;
align - items : center ;
}
. reason {
width : 250 px ;
white - space : nowrap ;
overflow : hidden ;
text - overflow : ellipsis ;
}
< / style >