医院管理
This commit is contained in:
parent
994afb3549
commit
500a9d578d
3
components.d.ts
vendored
3
components.d.ts
vendored
@ -17,7 +17,7 @@ declare module '@vue/runtime-core' {
|
|||||||
AddVisitConfigModal: typeof import('./src/components/addVisitConfigModal.vue')['default']
|
AddVisitConfigModal: typeof import('./src/components/addVisitConfigModal.vue')['default']
|
||||||
ChatRecord: typeof import('./src/components/chatRecord.vue')['default']
|
ChatRecord: typeof import('./src/components/chatRecord.vue')['default']
|
||||||
ConfirmModal: typeof import('./src/components/confirmModal.vue')['default']
|
ConfirmModal: typeof import('./src/components/confirmModal.vue')['default']
|
||||||
copy: typeof import('./src/components/isOkModal copy.vue')['default']
|
copy: typeof import('./src/components/medinceDetailModal copy.vue')['default']
|
||||||
CouponDetail: typeof import('./src/components/couponDetail.vue')['default']
|
CouponDetail: typeof import('./src/components/couponDetail.vue')['default']
|
||||||
DeleteModal: typeof import('./src/components/DeleteModal.vue')['default']
|
DeleteModal: typeof import('./src/components/DeleteModal.vue')['default']
|
||||||
DoctorModal: typeof import('./src/components/doctorModal.vue')['default']
|
DoctorModal: typeof import('./src/components/doctorModal.vue')['default']
|
||||||
@ -25,6 +25,7 @@ declare module '@vue/runtime-core' {
|
|||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
FamilyModal: typeof import('./src/components/familyModal.vue')['default']
|
FamilyModal: typeof import('./src/components/familyModal.vue')['default']
|
||||||
GiveCouponModal: typeof import('./src/components/giveCouponModal.vue')['default']
|
GiveCouponModal: typeof import('./src/components/giveCouponModal.vue')['default']
|
||||||
|
HospitalDetailModal: typeof import('./src/components/hospitalDetailModal.vue')['default']
|
||||||
InquiryDetailModal: typeof import('./src/components/inquiryDetailModal.vue')['default']
|
InquiryDetailModal: typeof import('./src/components/inquiryDetailModal.vue')['default']
|
||||||
InquiryDetailMoneyModal: typeof import('./src/components/inquiryDetailMoneyModal.vue')['default']
|
InquiryDetailMoneyModal: typeof import('./src/components/inquiryDetailMoneyModal.vue')['default']
|
||||||
IsOkCouponModal: typeof import('./src/components/isOkCouponModal.vue')['default']
|
IsOkCouponModal: typeof import('./src/components/isOkCouponModal.vue')['default']
|
||||||
|
|||||||
51
src/api/basic/list.js
Normal file
51
src/api/basic/list.js
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import request from '../../utils/request'
|
||||||
|
export function getHospitalList(data){
|
||||||
|
return request({
|
||||||
|
url:'/admin/basic/hospital/page',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getHospitalDetail(id){
|
||||||
|
return request({
|
||||||
|
url:'/admin/basic/hospital/'+id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function addHospital(data){//新增医院
|
||||||
|
return request({
|
||||||
|
url:'/admin/basic/hospital',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function updateHospital(id,data){//修改医院
|
||||||
|
return request({
|
||||||
|
url:'/admin/basic/hospital/'+id,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getAreaList(params){
|
||||||
|
return request({
|
||||||
|
url:'/admin/basic/area',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addArea(data){//新增医院
|
||||||
|
return request({
|
||||||
|
url:'/admin/basic/area',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function updateArea(id,data){//修改医院
|
||||||
|
return request({
|
||||||
|
url:'/admin/basic/area/'+id,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
294
src/components/hospitalDetailModal.vue
Normal file
294
src/components/hospitalDetailModal.vue
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
<template>
|
||||||
|
<!-- Modal -->
|
||||||
|
<a-modal
|
||||||
|
v-model:visible="modalVisible"
|
||||||
|
fullscreen
|
||||||
|
:title="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" :rules="rules">
|
||||||
|
<a-row :gutter="24" style="margin-top: 35px">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="hospital_name" label="医院名称:">
|
||||||
|
<a-input
|
||||||
|
v-model="modalForm.hospital_name"
|
||||||
|
placeholder="请输入医院名称"
|
||||||
|
:style="{ width: '250px' }"
|
||||||
|
></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="county_id" label="选择省市区:">
|
||||||
|
<div class="row">
|
||||||
|
<a-select
|
||||||
|
v-model="modalForm.province_id"
|
||||||
|
placeholder="请选择省份"
|
||||||
|
:style="{ width: '162px',marginRight:'10px' }"
|
||||||
|
@change="changeProvice"
|
||||||
|
>
|
||||||
|
<a-option
|
||||||
|
v-for="item in provinceData"
|
||||||
|
:key="item.area_id"
|
||||||
|
:value="Number(item.area_id)"
|
||||||
|
:label="item.area_name"
|
||||||
|
>{{ item.area_name }}</a-option
|
||||||
|
>
|
||||||
|
</a-select>
|
||||||
|
|
||||||
|
|
||||||
|
<a-select
|
||||||
|
v-model="modalForm.city_id"
|
||||||
|
placeholder="请选择城市"
|
||||||
|
:style="{ width: '162px',marginRight:'10px' }"
|
||||||
|
@change="changeCity"
|
||||||
|
>
|
||||||
|
<a-option
|
||||||
|
v-for="item in cityData"
|
||||||
|
:key="item.area_id"
|
||||||
|
:value="Number(item.area_id)"
|
||||||
|
:label="item.area_name"
|
||||||
|
>{{ item.area_name }}</a-option
|
||||||
|
>
|
||||||
|
</a-select>
|
||||||
|
<a-select
|
||||||
|
v-model="modalForm.county_id"
|
||||||
|
placeholder="请选择区县"
|
||||||
|
:style="{ width: '182px' }"
|
||||||
|
>
|
||||||
|
<a-option
|
||||||
|
v-for="item in countryData"
|
||||||
|
:key="item.area_id"
|
||||||
|
:value="Number(item.area_id)"
|
||||||
|
:label="item.area_name"
|
||||||
|
>{{ item.area_name }}</a-option
|
||||||
|
>
|
||||||
|
</a-select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="address" label="详细地址:">
|
||||||
|
<a-input
|
||||||
|
v-model="modalForm.address"
|
||||||
|
placeholder="请输入详细地址"
|
||||||
|
:style="{ width: '250px' }"
|
||||||
|
></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="hospital_level_name" label="医院等级:">
|
||||||
|
<a-select v-model="modalForm.hospital_level_name" placeholder="请选择药品类型" :style="{ width: '182px' }">
|
||||||
|
<a-option value="一级">一级</a-option>
|
||||||
|
<a-option value="二级">二级</a-option>
|
||||||
|
<a-option value="三级">三级</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="tele_phone" label="电话:">
|
||||||
|
<a-input
|
||||||
|
v-model="modalForm.tele_phone"
|
||||||
|
placeholder="请输入电话"
|
||||||
|
:style="{ width: '250px' }"
|
||||||
|
></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="post_code" label="邮政编码:">
|
||||||
|
<a-input
|
||||||
|
v-model="modalForm.post_code"
|
||||||
|
placeholder="请输入邮政编码"
|
||||||
|
:style="{ width: '250px' }"
|
||||||
|
></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="desc" label="描述:">
|
||||||
|
<a-textarea v-model="modalForm.desc " :auto-size="{
|
||||||
|
minRows:2,
|
||||||
|
maxRows:5
|
||||||
|
}" />
|
||||||
|
</a-form-item>
|
||||||
|
</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" @click="handleSubmit">保存</a-button>
|
||||||
|
</a-space>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref, toRefs,watch,getCurrentInstance} from 'vue';
|
||||||
|
import { getAreaList,addHospital,updateHospital } from '@/api/basic/list';
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const props = defineProps({
|
||||||
|
// 是否显示
|
||||||
|
modalVisible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
id:{
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
modalForm: {
|
||||||
|
type: Object,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const title=ref('');
|
||||||
|
const emits = defineEmits(['familyVisibleChange','freshDetail']);
|
||||||
|
const { modalVisible, modalForm } = toRefs(props);
|
||||||
|
const provinceData = ref([]);
|
||||||
|
const cityData = ref([]);
|
||||||
|
const countryData = ref([]);
|
||||||
|
|
||||||
|
//获取区域列表
|
||||||
|
const handelAreaList = (area_id = '', parent_id = '', area_type) => {
|
||||||
|
getAreaList({
|
||||||
|
area_id,
|
||||||
|
area_type,
|
||||||
|
parent_id,
|
||||||
|
}).then((res) => {
|
||||||
|
const { data, code, message } = res;
|
||||||
|
if (code == 200) {
|
||||||
|
if (area_type == 2) {
|
||||||
|
provinceData.value = data;
|
||||||
|
|
||||||
|
}
|
||||||
|
if (area_type == 3) {
|
||||||
|
cityData.value = data;
|
||||||
|
|
||||||
|
}
|
||||||
|
if (area_type == 4) {
|
||||||
|
countryData.value = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//切换省份
|
||||||
|
const changeProvice = (value) => {
|
||||||
|
modalForm.city_id = '';
|
||||||
|
modalForm.county_id = '';
|
||||||
|
handelAreaList('', value, 3);
|
||||||
|
};
|
||||||
|
//切换省份
|
||||||
|
const changeCity = (value) => {
|
||||||
|
modalForm.county_id = '';
|
||||||
|
handelAreaList('', value, 4);
|
||||||
|
};
|
||||||
|
watch(()=>props.id,()=>{
|
||||||
|
if(props.id){
|
||||||
|
title.value="编辑医院"
|
||||||
|
}else{
|
||||||
|
title.value="修改医院"
|
||||||
|
}
|
||||||
|
|
||||||
|
},{immediate:true})
|
||||||
|
watch(()=>props.modalForm,()=>{
|
||||||
|
if(props.id){
|
||||||
|
handelAreaList('',modalForm.value.province_id
|
||||||
|
,3)
|
||||||
|
handelAreaList('',modalForm.value.city_id
|
||||||
|
,4)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},{immediate:true,deep:true})
|
||||||
|
|
||||||
|
const rules = {
|
||||||
|
hospital_name: [{ required: true, message: '请输入医院名称' }],
|
||||||
|
county_id:[{ required: true, message: '请选择省市区' }],
|
||||||
|
hospital_level_name:[{ required: true, message: '请选择医院等级' }],
|
||||||
|
address:[{ required: true, message: '请输入详细地址' }],
|
||||||
|
};
|
||||||
|
const handleSubmit=()=>{
|
||||||
|
proxy.$refs.modalFormRef.validate(async (valid) => {
|
||||||
|
let data=null;
|
||||||
|
let {hospital_name,hospital_status,hospital_level_name,post_code,tele_phone,province_id,city_id,county_id,address,desc}=modalForm.value;
|
||||||
|
if (!valid) {
|
||||||
|
if(props.id){
|
||||||
|
data= await updateHospital(props.id,{
|
||||||
|
hospital_name,
|
||||||
|
hospital_status,
|
||||||
|
hospital_level_name,
|
||||||
|
post_code,
|
||||||
|
tele_phone,
|
||||||
|
province_id,
|
||||||
|
city_id,
|
||||||
|
county_id,
|
||||||
|
address,
|
||||||
|
desc
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
data= await addHospital({
|
||||||
|
hospital_name,
|
||||||
|
hospital_status,
|
||||||
|
hospital_level_name,
|
||||||
|
post_code,
|
||||||
|
tele_phone,
|
||||||
|
province_id,
|
||||||
|
city_id,
|
||||||
|
county_id,
|
||||||
|
address,
|
||||||
|
desc
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if(data.code==200){
|
||||||
|
props.id?proxy.$message.success('修改成功'):proxy.$message.success('添加成功');
|
||||||
|
emits('freshDetail');
|
||||||
|
}
|
||||||
|
handleClose();
|
||||||
|
emits('freshDetail');
|
||||||
|
|
||||||
|
}else {
|
||||||
|
console.log(valid)
|
||||||
|
proxy.$message.error('表单校验失败');
|
||||||
|
//done(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// Akiraka 20230210 关闭弹窗
|
||||||
|
const handleClose = () => {
|
||||||
|
proxy.$refs.modalFormRef.resetFields();
|
||||||
|
emits('familyVisibleChange', false);
|
||||||
|
};
|
||||||
|
const getData = () => {
|
||||||
|
handelAreaList('', '', 2);
|
||||||
|
};
|
||||||
|
defineExpose({
|
||||||
|
getData,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.row {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
398
src/views/basic/area/index.vue
Normal file
398
src/views/basic/area/index.vue
Normal file
@ -0,0 +1,398 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
||||||
|
|
||||||
|
<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="hospital_level_name" label="医院等级">
|
||||||
|
<a-select v-model="queryForm.hospital_level_name" placeholder="请选择医院等级" :style="{ width: '182px' }">
|
||||||
|
<a-option value="一级">一级</a-option>
|
||||||
|
<a-option value="二级">二级</a-option>
|
||||||
|
<a-option value="三级">三级</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="province_id" label="省份">
|
||||||
|
<a-select v-model="queryForm.province_id" placeholder="请选择省份" :style="{ width: '182px' }" @change="changeProvice">
|
||||||
|
<a-option v-for="item in provinceData" :key="item.area_id" :value="Number(item.area_id)"
|
||||||
|
:label="item.area_name">{{ item.area_name}}</a-option>
|
||||||
|
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="city_id" label="城市">
|
||||||
|
<a-select v-model="queryForm.city_id" placeholder="请选择城市" :style="{ width: '182px' }" @change="changeCity">
|
||||||
|
<a-option v-for="item in cityData" :key="item.area_id" :value="Number(item.area_id)"
|
||||||
|
:label="item.area_name">{{ item.area_name}}</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="county_id" label="区县">
|
||||||
|
<a-select v-model="queryForm.county_id" placeholder="请选择区县" :style="{ width: '182px' }">
|
||||||
|
<a-option v-for="item in countryData" :key="item.area_id" :value="Number(item.area_id)"
|
||||||
|
:label="item.area_name">{{ item.area_name}}</a-option>
|
||||||
|
</a-select>
|
||||||
|
</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-form>
|
||||||
|
|
||||||
|
<a-divider />
|
||||||
|
|
||||||
|
<!-- action -->
|
||||||
|
<div class="action">
|
||||||
|
<a-space>
|
||||||
|
<a-button v-has="'admin:platformMedinceList:selectExport'" type="primary" @click="handleAdd"><icon-plus /> 添加 </a-button>
|
||||||
|
<!-- <a-button v-has="'admin:platformMedinceList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
||||||
|
<a-button v-has="'admin:platformMedinceList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button> -->
|
||||||
|
</a-space>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- table -->
|
||||||
|
<!-- :row-selection="{ type: 'checkbox', showCheckedAll: true }" -->
|
||||||
|
<a-table :columns="columns" :data="tableData"
|
||||||
|
:scroll="{ x: 1600 }"
|
||||||
|
|
||||||
|
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
||||||
|
row-key="hospital_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)*pager.page_size}}</div>
|
||||||
|
</template>
|
||||||
|
<template #action="{ record }">
|
||||||
|
<a-space>
|
||||||
|
<a-button v-has="'admin:platformMedinceList:detail'" type="text"
|
||||||
|
@click="handleDetail(record)"><icon-book />详情</a-button>
|
||||||
|
<!-- <a-button v-has="'admin:platformMedinceList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||||
|
修改</a-button> -->
|
||||||
|
<!-- <a-button v-has="'admin:platformMedinceList:remove'" type="text"
|
||||||
|
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
|
||||||
|
<hospitalDetailModal ref="hospitalChild" :modalVisible="modalVisible" :modalForm="modalForm" :id="modalForm.hospital_id" @freshDetail="handleQuery" @familyVisibleChange="()=>{modalVisible=false,modalForm.hospital_id=''}"></hospitalDetailModal>
|
||||||
|
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
||||||
|
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeFamily"
|
||||||
|
@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 { getHospitalList,getHospitalDetail,getAreaList} from '@/api/basic/list';
|
||||||
|
import { downloadFile } from '@/utils/downloadFile';
|
||||||
|
// Akiraka 20230210 删除数据
|
||||||
|
const deleteData = ref([])
|
||||||
|
// Akiraka 20230210 删除对话框
|
||||||
|
const deleteVisible = ref(false)
|
||||||
|
// Akiraka 20230210 监听删除事件
|
||||||
|
const okVisible = ref(false);
|
||||||
|
const hospitalChild=ref(null);
|
||||||
|
watch(() => deleteVisible.value, (value) => {
|
||||||
|
if (value == false) {
|
||||||
|
getMedinceInfo(pager);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const file = ref();
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const currentPage = ref(1);
|
||||||
|
|
||||||
|
|
||||||
|
// Pager
|
||||||
|
const pager = {
|
||||||
|
total: 0,
|
||||||
|
page: 1,
|
||||||
|
page_size: 10,
|
||||||
|
};
|
||||||
|
// form
|
||||||
|
const queryForm = reactive({
|
||||||
|
|
||||||
|
});
|
||||||
|
const modalForm = reactive({
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
const provinceData = ref([]);
|
||||||
|
const cityData = ref([]);
|
||||||
|
const countryData = ref([]);
|
||||||
|
//获取区域列表
|
||||||
|
const handelAreaList = (area_id = '', parent_id = '', area_type) => {
|
||||||
|
getAreaList({
|
||||||
|
area_id,
|
||||||
|
area_type,
|
||||||
|
parent_id
|
||||||
|
}).then((res) => {
|
||||||
|
const { data, code, message } = res;
|
||||||
|
if (code == 200) {
|
||||||
|
if (area_type == 2) {
|
||||||
|
provinceData.value = data;
|
||||||
|
}
|
||||||
|
if (area_type == 3) {
|
||||||
|
cityData.value = data;
|
||||||
|
};
|
||||||
|
if (area_type == 4) {
|
||||||
|
countryData.value = data;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//切换省份
|
||||||
|
const changeProvice = (value) => {
|
||||||
|
queryForm.city_id = '';
|
||||||
|
queryForm.county_id = '';
|
||||||
|
handelAreaList('', value, 3);
|
||||||
|
};
|
||||||
|
//切换省份
|
||||||
|
const changeCity = (value) => {
|
||||||
|
queryForm.county_id = '';
|
||||||
|
handelAreaList("", value, 4);
|
||||||
|
|
||||||
|
}
|
||||||
|
// Modal
|
||||||
|
const modalVisible = ref(false);
|
||||||
|
const modalTitle = ref('默认标题');
|
||||||
|
|
||||||
|
// Batch Del List
|
||||||
|
let batchList = [];
|
||||||
|
|
||||||
|
// Table Columns
|
||||||
|
const columns = [
|
||||||
|
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
|
||||||
|
{ title: '医院名字', dataIndex: 'hospital_name',width:200 },
|
||||||
|
{ title: '省份', dataIndex: 'province',width:200 },
|
||||||
|
{ title: '城市', dataIndex: 'city', slotName: 'product_price',width: 150 },
|
||||||
|
{ title: '区县', dataIndex: 'county',width:200 },
|
||||||
|
{ title: '地址', dataIndex: 'address',width:200 },
|
||||||
|
{ title: '创建时间', dataIndex: 'created_at',width:200 },
|
||||||
|
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||||
|
];
|
||||||
|
|
||||||
|
// Table Data
|
||||||
|
const tableData = ref([]);
|
||||||
|
//弹框状态
|
||||||
|
const modalSatus = ref('add');
|
||||||
|
|
||||||
|
// 新增Satus
|
||||||
|
const handleAdd = () => {
|
||||||
|
modalVisible.value = true;
|
||||||
|
modalTitle.value = '新增患者';
|
||||||
|
modalForm.hospital_id ='';
|
||||||
|
modalForm.hospital_name='',
|
||||||
|
modalForm.hospital_status=1,
|
||||||
|
modalForm.hospital_level_name='',
|
||||||
|
modalForm.post_code='',
|
||||||
|
modalForm.tele_phone='',
|
||||||
|
modalForm.province_id='',
|
||||||
|
modalForm.city_id='',
|
||||||
|
modalForm.county_id='',
|
||||||
|
modalForm.address='',
|
||||||
|
modalForm.desc=''
|
||||||
|
};
|
||||||
|
|
||||||
|
//详情
|
||||||
|
const handleDetail = async (record) => {
|
||||||
|
const { code, data, message } = await getHospitalDetail(record.hospital_id)
|
||||||
|
hospitalChild.value.getData();
|
||||||
|
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 removeFamily({ ids: batchList });
|
||||||
|
proxy.$message.success(res.message);
|
||||||
|
getMedinceInfo(pager);
|
||||||
|
},
|
||||||
|
onCancel: () => {
|
||||||
|
proxy.$message.info('已取消批量删除数据');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
proxy.$message.error('请勾选需要删除的数据!');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页改变
|
||||||
|
* @param {Number} [page]
|
||||||
|
*/
|
||||||
|
const handlePageChange = (page) => {
|
||||||
|
pager.page = page;
|
||||||
|
|
||||||
|
// 修改当前页码
|
||||||
|
currentPage.value = page;
|
||||||
|
getMedinceInfo({ ...pager, ...queryForm });
|
||||||
|
};
|
||||||
|
|
||||||
|
// 每页数据量
|
||||||
|
const handlepage_sizeChange = (page_size) => {
|
||||||
|
pager.page_size = page_size;
|
||||||
|
getMedinceInfo({ ...pager, ...queryForm });
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取患者信息
|
||||||
|
const getMedinceInfo = async (params = {}) => {
|
||||||
|
const { data, code, message } = await getHospitalList(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,
|
||||||
|
};
|
||||||
|
|
||||||
|
getMedinceInfo(params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 重置搜索
|
||||||
|
const handleResetQuery = () => {
|
||||||
|
proxy.$refs.queryFormRef.resetFields();
|
||||||
|
getMedinceInfo(queryForm);
|
||||||
|
}
|
||||||
|
const handlExport=async(type)=>{
|
||||||
|
proxy.$loading.show();
|
||||||
|
let fromData=null;
|
||||||
|
if(type==1){
|
||||||
|
fromData={
|
||||||
|
type,
|
||||||
|
...queryForm
|
||||||
|
}
|
||||||
|
}else if(type==2){
|
||||||
|
if(deleteData.value.length==0){
|
||||||
|
proxy.$message.warning('请勾选数据');
|
||||||
|
proxy.$loading.hide();
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
let id='';
|
||||||
|
deleteData.value.forEach((item)=>{
|
||||||
|
if(id){
|
||||||
|
id+=","+item
|
||||||
|
}else{
|
||||||
|
id=item;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
fromData={
|
||||||
|
type,
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}else if(type==3){
|
||||||
|
fromData={
|
||||||
|
type
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const {code,data}=await exportFamily(fromData);
|
||||||
|
if(code==200){
|
||||||
|
downloadFile(data,'就诊人列表');
|
||||||
|
}
|
||||||
|
proxy.$loading.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getMedinceInfo(pager);
|
||||||
|
handelAreaList("", "", 2);
|
||||||
|
});
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
.reason{
|
||||||
|
width:250px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
399
src/views/basic/hospital/index.vue
Normal file
399
src/views/basic/hospital/index.vue
Normal file
@ -0,0 +1,399 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
||||||
|
|
||||||
|
<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="hospital_level_name" label="医院等级">
|
||||||
|
<a-select v-model="queryForm.hospital_level_name" placeholder="请选择医院等级" :style="{ width: '182px' }">
|
||||||
|
<a-option value="一级">一级</a-option>
|
||||||
|
<a-option value="二级">二级</a-option>
|
||||||
|
<a-option value="三级">三级</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="province_id" label="省份">
|
||||||
|
<a-select v-model="queryForm.province_id" placeholder="请选择省份" :style="{ width: '182px' }" @change="changeProvice">
|
||||||
|
<a-option v-for="item in provinceData" :key="item.area_id" :value="Number(item.area_id)"
|
||||||
|
:label="item.area_name">{{ item.area_name}}</a-option>
|
||||||
|
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="city_id" label="城市">
|
||||||
|
<a-select v-model="queryForm.city_id" placeholder="请选择城市" :style="{ width: '182px' }" @change="changeCity">
|
||||||
|
<a-option v-for="item in cityData" :key="item.area_id" :value="Number(item.area_id)"
|
||||||
|
:label="item.area_name">{{ item.area_name}}</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="county_id" label="区县">
|
||||||
|
<a-select v-model="queryForm.county_id" placeholder="请选择区县" :style="{ width: '182px' }">
|
||||||
|
<a-option v-for="item in countryData" :key="item.area_id" :value="Number(item.area_id)"
|
||||||
|
:label="item.area_name">{{ item.area_name}}</a-option>
|
||||||
|
</a-select>
|
||||||
|
</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-form>
|
||||||
|
|
||||||
|
<a-divider />
|
||||||
|
|
||||||
|
<!-- action -->
|
||||||
|
<div class="action">
|
||||||
|
<a-space>
|
||||||
|
<a-button v-has="'admin:platformMedinceList:selectExport'" type="primary" @click="handleAdd"><icon-plus /> 添加 </a-button>
|
||||||
|
<!-- <a-button v-has="'admin:platformMedinceList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
||||||
|
<a-button v-has="'admin:platformMedinceList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button> -->
|
||||||
|
</a-space>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- table -->
|
||||||
|
<!-- :row-selection="{ type: 'checkbox', showCheckedAll: true }" -->
|
||||||
|
<a-table :columns="columns" :data="tableData"
|
||||||
|
:scroll="{ x: 1600 }"
|
||||||
|
|
||||||
|
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
||||||
|
row-key="hospital_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)*pager.page_size}}</div>
|
||||||
|
</template>
|
||||||
|
<template #action="{ record }">
|
||||||
|
<a-space>
|
||||||
|
<a-button v-has="'admin:platformMedinceList:detail'" type="text"
|
||||||
|
@click="handleDetail(record)"><icon-book />详情</a-button>
|
||||||
|
<!-- <a-button v-has="'admin:platformMedinceList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||||
|
修改</a-button> -->
|
||||||
|
<!-- <a-button v-has="'admin:platformMedinceList:remove'" type="text"
|
||||||
|
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
|
||||||
|
<hospitalDetailModal ref="hospitalChild" :modalVisible="modalVisible" :modalForm="modalForm" :id="modalForm.hospital_id" @freshDetail="handleQuery" @familyVisibleChange="()=>{modalVisible=false,modalForm.hospital_id=''}"></hospitalDetailModal>
|
||||||
|
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
||||||
|
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeFamily"
|
||||||
|
@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 { getHospitalList,getHospitalDetail,getAreaList} from '@/api/basic/list';
|
||||||
|
import { downloadFile } from '@/utils/downloadFile';
|
||||||
|
// Akiraka 20230210 删除数据
|
||||||
|
const deleteData = ref([])
|
||||||
|
// Akiraka 20230210 删除对话框
|
||||||
|
const deleteVisible = ref(false)
|
||||||
|
// Akiraka 20230210 监听删除事件
|
||||||
|
const okVisible = ref(false);
|
||||||
|
const hospitalChild=ref(null);
|
||||||
|
watch(() => deleteVisible.value, (value) => {
|
||||||
|
if (value == false) {
|
||||||
|
getMedinceInfo(pager);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const file = ref();
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const currentPage = ref(1);
|
||||||
|
|
||||||
|
|
||||||
|
// Pager
|
||||||
|
const pager = {
|
||||||
|
total: 0,
|
||||||
|
page: 1,
|
||||||
|
page_size: 10,
|
||||||
|
};
|
||||||
|
// form
|
||||||
|
const queryForm = reactive({
|
||||||
|
|
||||||
|
});
|
||||||
|
const modalForm = reactive({
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
const provinceData = ref([]);
|
||||||
|
const cityData = ref([]);
|
||||||
|
const countryData = ref([]);
|
||||||
|
//获取区域列表
|
||||||
|
const handelAreaList = (area_id = '', parent_id = '', area_type) => {
|
||||||
|
getAreaList({
|
||||||
|
area_id,
|
||||||
|
area_type,
|
||||||
|
parent_id
|
||||||
|
}).then((res) => {
|
||||||
|
const { data, code, message } = res;
|
||||||
|
if (code == 200) {
|
||||||
|
if (area_type == 2) {
|
||||||
|
provinceData.value = data;
|
||||||
|
}
|
||||||
|
if (area_type == 3) {
|
||||||
|
cityData.value = data;
|
||||||
|
};
|
||||||
|
if (area_type == 4) {
|
||||||
|
countryData.value = data;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//切换省份
|
||||||
|
const changeProvice = (value) => {
|
||||||
|
queryForm.city_id = '';
|
||||||
|
queryForm.county_id = '';
|
||||||
|
handelAreaList('', value, 3);
|
||||||
|
};
|
||||||
|
//切换省份
|
||||||
|
const changeCity = (value) => {
|
||||||
|
queryForm.county_id = '';
|
||||||
|
handelAreaList("", value, 4);
|
||||||
|
|
||||||
|
}
|
||||||
|
// Modal
|
||||||
|
const modalVisible = ref(false);
|
||||||
|
const modalTitle = ref('默认标题');
|
||||||
|
|
||||||
|
// Batch Del List
|
||||||
|
let batchList = [];
|
||||||
|
|
||||||
|
// Table Columns
|
||||||
|
const columns = [
|
||||||
|
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
|
||||||
|
{ title: '医院名字', dataIndex: 'hospital_name',width:200 },
|
||||||
|
{ title: '省份', dataIndex: 'province',width:200 },
|
||||||
|
{ title: '城市', dataIndex: 'city', slotName: 'product_price',width: 150 },
|
||||||
|
{ title: '区县', dataIndex: 'county',width:200 },
|
||||||
|
{ title: '地址', dataIndex: 'address',width:200 },
|
||||||
|
{ title: '创建时间', dataIndex: 'created_at',width:200 },
|
||||||
|
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||||
|
];
|
||||||
|
|
||||||
|
// Table Data
|
||||||
|
const tableData = ref([]);
|
||||||
|
//弹框状态
|
||||||
|
const modalSatus = ref('add');
|
||||||
|
|
||||||
|
// 新增Satus
|
||||||
|
const handleAdd = () => {
|
||||||
|
modalVisible.value = true;
|
||||||
|
modalTitle.value = '新增患者';
|
||||||
|
modalForm.hospital_id ='';
|
||||||
|
modalForm.hospital_name='',
|
||||||
|
modalForm.hospital_status=1,
|
||||||
|
modalForm.hospital_level_name='',
|
||||||
|
modalForm.post_code='',
|
||||||
|
modalForm.tele_phone='',
|
||||||
|
modalForm.province_id='',
|
||||||
|
modalForm.city_id='',
|
||||||
|
modalForm.county_id='',
|
||||||
|
modalForm.address='',
|
||||||
|
modalForm.desc='';
|
||||||
|
hospitalChild.value.getData();
|
||||||
|
};
|
||||||
|
|
||||||
|
//详情
|
||||||
|
const handleDetail = async (record) => {
|
||||||
|
const { code, data, message } = await getHospitalDetail(record.hospital_id)
|
||||||
|
hospitalChild.value.getData();
|
||||||
|
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 removeFamily({ ids: batchList });
|
||||||
|
proxy.$message.success(res.message);
|
||||||
|
getMedinceInfo(pager);
|
||||||
|
},
|
||||||
|
onCancel: () => {
|
||||||
|
proxy.$message.info('已取消批量删除数据');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
proxy.$message.error('请勾选需要删除的数据!');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页改变
|
||||||
|
* @param {Number} [page]
|
||||||
|
*/
|
||||||
|
const handlePageChange = (page) => {
|
||||||
|
pager.page = page;
|
||||||
|
|
||||||
|
// 修改当前页码
|
||||||
|
currentPage.value = page;
|
||||||
|
getMedinceInfo({ ...pager, ...queryForm });
|
||||||
|
};
|
||||||
|
|
||||||
|
// 每页数据量
|
||||||
|
const handlepage_sizeChange = (page_size) => {
|
||||||
|
pager.page_size = page_size;
|
||||||
|
getMedinceInfo({ ...pager, ...queryForm });
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取患者信息
|
||||||
|
const getMedinceInfo = async (params = {}) => {
|
||||||
|
const { data, code, message } = await getHospitalList(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,
|
||||||
|
};
|
||||||
|
|
||||||
|
getMedinceInfo(params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 重置搜索
|
||||||
|
const handleResetQuery = () => {
|
||||||
|
proxy.$refs.queryFormRef.resetFields();
|
||||||
|
getMedinceInfo(queryForm);
|
||||||
|
}
|
||||||
|
const handlExport=async(type)=>{
|
||||||
|
proxy.$loading.show();
|
||||||
|
let fromData=null;
|
||||||
|
if(type==1){
|
||||||
|
fromData={
|
||||||
|
type,
|
||||||
|
...queryForm
|
||||||
|
}
|
||||||
|
}else if(type==2){
|
||||||
|
if(deleteData.value.length==0){
|
||||||
|
proxy.$message.warning('请勾选数据');
|
||||||
|
proxy.$loading.hide();
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
let id='';
|
||||||
|
deleteData.value.forEach((item)=>{
|
||||||
|
if(id){
|
||||||
|
id+=","+item
|
||||||
|
}else{
|
||||||
|
id=item;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
fromData={
|
||||||
|
type,
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}else if(type==3){
|
||||||
|
fromData={
|
||||||
|
type
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const {code,data}=await exportFamily(fromData);
|
||||||
|
if(code==200){
|
||||||
|
downloadFile(data,'就诊人列表');
|
||||||
|
}
|
||||||
|
proxy.$loading.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getMedinceInfo(pager);
|
||||||
|
handelAreaList("", "", 2);
|
||||||
|
});
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
.reason{
|
||||||
|
width:250px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user