Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web

This commit is contained in:
ChenQiuYu 2025-05-08 14:57:59 +08:00
commit 3cc94b2430
7 changed files with 118 additions and 85 deletions

View File

@ -36,6 +36,28 @@
</div> </div>
</Panel> </Panel>
</template> </template>
<script setup lang="ts">
import {formatDate} from "@/utils/dateUtils.ts"
import Panel from "@/components/common/Panel.vue";
import {onMounted, ref} from "vue";
import {post} from "@/utils/request.ts";
const seeDockerInfo = ref<any>();
const getSeeDockerInfo = (newValue:any) => {
if (!newValue)return;
post('medical/record/getSeeDockerInfo', {regisId: newValue}).then((res: any) => {
seeDockerInfo.value = res
})
}
const init =(regisId:any)=>{
getSeeDockerInfo(regisId)
}
const clear = () => {
seeDockerInfo.value = {}
}
defineExpose({ init,clear})
</script>
<style scoped lang="scss"> <style scoped lang="scss">
.avatar { .avatar {
@ -128,22 +150,3 @@
} }
} }
</style> </style>
<script setup lang="ts">
import {formatDate} from "@/utils/dateUtils.ts"
import Panel from "@/components/common/Panel.vue";
import {onMounted, ref} from "vue";
import {post} from "@/utils/request.ts";
const seeDockerInfo = ref<any>();
const getSeeDockerInfo = (newValue:any) => {
if (!newValue)return;
post('medical/record/getSeeDockerInfo', {regisId: newValue}).then((res: any) => {
seeDockerInfo.value = res
})
}
const init =(regisId:any)=>{
getSeeDockerInfo(regisId)
}
defineExpose({ init})
</script>

View File

@ -123,7 +123,11 @@ const emit = defineEmits(['focus'])
const focus = (e:any)=>{ const focus = (e:any)=>{
emit('focus',e) emit('focus',e)
} }
defineExpose({initDiagnosisSearch}) const clearDiagnosis = ()=>{
diagnosisSearchRef.value?.clear()
}
defineExpose({initDiagnosisSearch,clearDiagnosis})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.content { .content {

View File

@ -36,7 +36,7 @@ const props = defineProps({
}, },
width: { width: {
type: Number, type: Number,
default: 1000 default: 600
}, },
showConfig: { showConfig: {
@ -123,7 +123,12 @@ const focus = () => {
const handleBlur = () => { const handleBlur = () => {
isVisible.value = false isVisible.value = false
} }
defineExpose({init}) const clear = () => {
selectList.value = []
nameList.value = []
keyword.value = ""
}
defineExpose({init,clear})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
:deep(.el-table--small .el-table__cell) { :deep(.el-table--small .el-table__cell) {

View File

@ -2,8 +2,8 @@
<Panel :title="'就诊队列'" style="height: 100%"> <Panel :title="'就诊队列'" style="height: 100%">
<div class="panel-content" style="display: flex;flex-direction: column;height: 100%"> <div class="panel-content" style="display: flex;flex-direction: column;height: 100%">
<div class="tabs"> <div class="tabs">
<span v-for="(item,index) in statusList" :class="props.status == index+1 ? 'tabs-item' : ''" <span v-for="(item,index) in statusList" :class="curStatus == item.status ? 'tabs-item' : ''"
@click="tab(item)">{{ item.label }}&nbsp;{{ item.num }}</span> @click="clickTab(item)">{{ item.label }}&nbsp;{{ item.num }}</span>
</div> </div>
<div class="search"> <div class="search">
<img src="/static/images/outpatient/search.png" class="search-icon" alt="搜索图标"> <img src="/static/images/outpatient/search.png" class="search-icon" alt="搜索图标">
@ -12,7 +12,7 @@
<div class="list"> <div class="list">
<ul style="height: 100%"> <ul style="height: 100%">
<el-scrollbar style="height: 100%"> <el-scrollbar style="height: 100%">
<li class="list-item" :class="curItem.id == item.id ? 'active' : ''" v-for="(item, index) in list" <li class="list-item" :class="curItem?.id == item.id ? 'active' : ''" v-for="(item, index) in list"
:key="index" @click="clickLi(item)"> :key="index" @click="clickLi(item)">
<span> <span>
<img v-if="item.gender==1" class="avatar" src="/static/images/outpatient/man.png" <img v-if="item.gender==1" class="avatar" src="/static/images/outpatient/man.png"
@ -39,41 +39,30 @@ import {post} from "@/utils/request.ts";
import {formatListTime, getToday, getThisMonth} from "@/utils/dateUtils.ts"; import {formatListTime, getToday, getThisMonth} from "@/utils/dateUtils.ts";
import {apiConfig} from "@/assets/config/apiConfig.ts"; import {apiConfig} from "@/assets/config/apiConfig.ts";
import {ElMessageBox} from "element-plus"; import {ElMessageBox} from "element-plus";
const curStatus = ref(1)
const props = defineProps({
status: {
type: Number,
default: 1
}
})
const search = ref('') const search = ref('')
const curItem = ref<any>('') const curItem = ref<any>('')
const emit = defineEmits(['getId', 'changeDetail', 'getStatus']) const emit = defineEmits(['clickItem', 'changeTab'])
const tab = (item: any) => { const clickTab = (item: any) => {
nextTick(() => { curStatus.value = item.status
emit('getStatus', item.value) emit('changeTab')
if (item.value == 3) { curItem.value = {}
emit('changeDetail', true)
} else {
emit('changeDetail', false)
}
})
} }
const list = ref<any>([]) const list = ref<any>([])
const statusList = ref<any>([ const statusList = ref<any>([
{ {
value: 1, status: 1,
label: '候诊', label: '候诊',
num: 0 num: 0
}, },
{ {
value: 2, status: 2,
label: '在诊', label: '在诊',
num: 0 num: 0
}, },
{ {
value: 3, status: 3,
label: '已诊', label: '已诊',
num: 0 num: 0
} }
@ -82,7 +71,7 @@ const itemId = defineModel()
onMounted(() => { onMounted(() => {
initStatusList() initStatusList()
curItem.value = itemId curItem.value = itemId
if(props.status==1){ if(curStatus.value==1){
init() init()
} }
}) })
@ -91,13 +80,14 @@ const init = () => {
loading.value = true loading.value = true
post(apiConfig.RegistrationList, { post(apiConfig.RegistrationList, {
query: { query: {
status: props.status, status: curStatus.value,
beginTime: '2024-05-07 23:59:59', beginTime: '2024-05-07 23:59:59',
endTime: data.value.end endTime: data.value.end
} }
}).then((res: any) => { }).then((res: any) => {
loading.value = false loading.value = false
list.value = res.list list.value = res.list
initStatusList()
}) })
} }
const data = ref<any>(getToday()) const data = ref<any>(getToday())
@ -110,11 +100,36 @@ const initStatusList = () => {
} }
const clickLi = (item: any) => { const clickLi = (item: any) => {
curItem.value = item curItem.value = item
emit('getId', item) if (item.status == 1) {
ElMessageBox.confirm(`您将要接诊${item.name}`, "提示", {
confirmButtonText: '确定',
cancelButtonText: '取消',
callback: (action: any) => {
if (action == "confirm") {
post('registration/changeStatus', {id: item.id, status: 2}).then((res: any) => {
curStatus.value = 2
curItem.value = res
initStatusList()
})
}
},
})
}
emit('clickItem', curItem.value)
} }
const changeCurItemOrStatus = (item:any, status:any) => {
if (item !=null){
curItem.value = item
}
if (curStatus != null){
curStatus.value = status
}
watch(() => props.status, () => {
console.log('status', props.status) }
defineExpose({changeCurItemOrStatus})
watch(() => curStatus.value, () => {
console.log('status', curStatus.value)
init() // init() //
}) })
</script> </script>

View File

@ -2,12 +2,12 @@
import Panel from '../common/Panel.vue'; import Panel from '../common/Panel.vue';
import {defineEmits, defineModel,defineProps} from 'vue' import {defineEmits, defineModel,defineProps} from 'vue'
const {status}=defineProps(['status']) const {status}=defineProps(['status'])
const emit = defineEmits(['save','deleteItem','edit']); const emit = defineEmits(['save','cancelReception','edit']);
const save = () => { const save = () => {
emit('save'); emit('save');
}; };
const deleteItem = () => { const deleteItem = () => {
emit('deleteItem'); emit('cancelReception');
}; };
const totalAmount = defineModel<any>() const totalAmount = defineModel<any>()
const editItem= () => { const editItem= () => {

View File

@ -290,7 +290,10 @@ const btn = (item: any, i: number) => {
} catch (error) { } catch (error) {
areaData = null; // areaData = null; //
} }
areaName.value=findAreaName(areaData[areaData?.length-1]) if (areaData != null){
areaName.value=findAreaName(areaData[areaData?.length-1])
}
getChargeList(listItem.value.id) getChargeList(listItem.value.id)
} }
// //
@ -352,8 +355,11 @@ const searchVip = () => {
pageSize: 50, pageSize: 50,
keyword: input3.value, keyword: input3.value,
}).then((res: any) => { }).then((res: any) => {
list.value = res;
listItem.value = res[0]; list.value = res.list;
totalCount.value = res.total_count
listItem.value = res.list[0];
console.log(listItem)
}); });
}; };
// //

View File

@ -1,23 +1,23 @@
<template> <template>
<div class="container"> <div class="container">
<div class="left"> <div class="left">
<MedicalQueue v-model="itemId" :status="status" @getId="getId" @getStatus="getStatus"></MedicalQueue> <MedicalQueue v-model="itemId" @clickItem="clickItem" @changeTab="changeTab" ref="medicalQueueRef"></MedicalQueue>
</div> </div>
<div class="middle"> <div class="middle">
<el-scrollbar> <el-scrollbar>
<div class="case"> <div class="case">
<CaseDetail v-if="patientRegistration.status==3" v-model="formData" ></CaseDetail> <CaseDetail v-if="patientRegistration.status==3" v-model="formData" ></CaseDetail>
<Case ref="caseRef" v-else v-model="formData" :status="status" :isShowFrom="isShowFrom" @focus="focus"></Case> <Case ref="caseRef" v-else v-model="formData" :isShowFrom="isShowFrom" @focus="focus"></Case>
</div> </div>
<div class="service-items"> <div class="service-items">
<ServiceDetail v-model="formData.itemDetail" :status="status" @focus="focus" @totalPriceChange="getOrderTotalPrice"></ServiceDetail> <ServiceDetail v-model="formData.itemDetail" @focus="focus" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
</div> </div>
<div class="pharmaceutical-consumables"> <div class="pharmaceutical-consumables">
<GoodsDetail v-model="formData.goodsDetail" :status="status" @focus="focus" @totalPriceChange="getOrderTotalPrice"></GoodsDetail> <GoodsDetail v-model="formData.goodsDetail" @focus="focus" @totalPriceChange="getOrderTotalPrice"></GoodsDetail>
</div> </div>
</el-scrollbar> </el-scrollbar>
<div class="bottom"> <div class="bottom">
<Settlement v-model="totalAmount" @deleteItem="deleteItem" @save="save" :status="status" <Settlement v-model="totalAmount" @cancelReception="cancelReception" @save="save" :status="curRegister?.status"
@edit="edit"></Settlement> @edit="edit"></Settlement>
</div> </div>
@ -51,7 +51,7 @@ import {apiConfig} from "@/assets/config/apiConfig.ts";
import PatientCard from "@/components/charge/PatientCard.vue"; import PatientCard from "@/components/charge/PatientCard.vue";
import ServiceDetail from "@/components/common/service/ServiceDetail.vue"; import ServiceDetail from "@/components/common/service/ServiceDetail.vue";
import GoodsDetail from "@/components/common/goods/GoodsDetail.vue"; import GoodsDetail from "@/components/common/goods/GoodsDetail.vue";
const curRegister = ref()
const registerId = ref() const registerId = ref()
const patientId = ref() const patientId = ref()
const itemDetail = ref([]) const itemDetail = ref([])
@ -61,6 +61,18 @@ const formData = ref<any>({
itemDetail: [], itemDetail: [],
goodsDetail: [], goodsDetail: [],
}) })
const initFormData = () => {
formData.value = {
diagType: 1,
itemDetail: [],
goodsDetail: [],
}
nextTick(()=>{
caseRef.value?.clearDiagnosis()
patientCardRef.value?.clear()
})
}
const save = () => { const save = () => {
let json = { let json = {
chinaAdjunctCheck: formData.value.chinaAdjunctCheck, chinaAdjunctCheck: formData.value.chinaAdjunctCheck,
@ -90,33 +102,23 @@ const save = () => {
} }
post('medical/record/save', {data: data}).then(() => { post('medical/record/save', {data: data}).then(() => {
ElMessage.success("保存成功") ElMessage.success("保存成功")
medicalQueueRef.value?.changeCurItemOrStatus(null,1);
}) })
} }
const totalAmount = ref(0) const totalAmount = ref(0)
const medicalInformationRef = ref()
const medicalHistoryRef = ref() const medicalHistoryRef = ref()
const patientCardRef = ref() const patientCardRef = ref()
const patientRegistration = ref<any>({}) const patientRegistration = ref<any>({})
const getId = (item: any) => { const clickItem = (item: any) => {
curRegister.value = item
registerId.value = item.id registerId.value = item.id
itemId.value = item.id itemId.value = item.id
patientId.value = item.patientInfoId patientId.value = item.patientInfoId
status.value = item.status
if (item.status == 1) { if (item.status == 2){
ElMessageBox.confirm(`您将要接诊${item.name}`, "提示", { initFormData()
confirmButtonText: '确定',
cancelButtonText: '取消',
callback: (action: any) => {
if (action == "confirm") {
post('registration/changeStatus', {id: item.id, status: 2}).then((res: any) => {
status.value = 2
})
}
},
})
} }
if (item.status == 3) { if (item.status == 3) {
post(apiConfig.RegistrationDetail, { post(apiConfig.RegistrationDetail, {
@ -131,20 +133,18 @@ const getId = (item: any) => {
} }
nextTick(() => { nextTick(() => {
medicalHistoryRef.value?.init(patientId.value); medicalHistoryRef.value?.init(patientId.value);
patientCardRef.value?.init(registerId.value) patientCardRef.value?.init(curRegister.value.id)
}) })
} }
const status = ref<any>(1) const medicalQueueRef =ref();
const deleteItem = () => { const cancelReception = () => {
post('registration/changeStatus', {id: registerId.value, status: 1}).then((res: any) => { post('registration/changeStatus', {id: registerId.value, status: 1}).then((res: any) => {
status.value = 1 medicalQueueRef.value?.changeCurItemOrStatus(res,1);
}) })
} }
const getStatus = (e: any) => { const changeTab = (e: any) => {
status.value = e initFormData()
formData.value.itemDetail = []
formData.value.goodsDetail = []
patientRegistration.value = {} patientRegistration.value = {}
nextTick(() => { nextTick(() => {
medicalHistoryRef.value?.clearList(); medicalHistoryRef.value?.clearList();
@ -153,7 +153,7 @@ const getStatus = (e: any) => {
const itemId = ref<any>('') const itemId = ref<any>('')
const edit = () => { const edit = () => {
post('registration/changeStatus', {id: registerId.value, status: 2}).then((res: any) => { post('registration/changeStatus', {id: registerId.value, status: 2}).then((res: any) => {
status.value = 2 medicalQueueRef.value?.changeCurItemOrStatus(res,2);
}) })
} }
const getOrderTotalPrice = () => { const getOrderTotalPrice = () => {