-
{{ item.label }} {{ item.num }}
@@ -34,12 +35,13 @@
alt="头像"/>

- {{ item.name }}
-
+
{{ item.name }}
+
{{ item.age || 0 }}岁
{{ formatListTime(item.createDatetime) || '-' }}
-
+
+
{{ item.type == 2 ? '医保' : '自费' }}
@@ -56,11 +58,12 @@ import {formatListTime, getToday, getThisMonth, getCurrentDate, getEndOfDay} fro
import {apiConfig} from "@/assets/config/apiConfig.ts";
import {ElMessageBox} from "element-plus";
import {CaretBottom} from '@element-plus/icons-vue'
+
const curStatus = ref(1)
const search = ref('')
const curItem = ref
('')
-const selectedDate:any = ref('')
-const selectedDateStr:any = ref('')
+const selectedDate: any = ref('')
+const selectedDateStr: any = ref('')
const emit = defineEmits(['clickItem', 'changeTab'])
const datePickerRef = ref()
const clickTab = (item: any) => {
@@ -69,7 +72,7 @@ const clickTab = (item: any) => {
curItem.value = {}
}
-const setDate=function (){
+const setDate = function () {
if (datePickerRef.value) {
datePickerRef.value.handleOpen()
}
@@ -94,31 +97,31 @@ const statusList = ref([
])
const itemId = defineModel()
onMounted(() => {
- selectedDate.value=getCurrentDate()
+ selectedDate.value = getCurrentDate()
initStatusList()
curItem.value = itemId
- if(curStatus.value==1){
+ if (curStatus.value == 1) {
init()
}
})
const loading = ref(true)
const init = async () => {
- selectedDateStr.value=setDateTip()
+ selectedDateStr.value = setDateTip()
+ clickLi(null)
loading.value = true
- try{
- let data:any=await post(apiConfig.RegistrationList, {
+ try {
+ let data: any = await post(apiConfig.RegistrationList, {
query: {
status: curStatus.value,
beginTime: selectedDate.value,
endTime: getEndOfDay(new Date(selectedDate.value))
}
- }, {catch_error:true});
+ }, {catch_error: true});
- list.value=data.list
- }
- catch (e){
+ list.value = data.list
+ } catch (e) {
- }finally {
+ } finally {
loading.value = false
}
initStatusList()
@@ -126,20 +129,21 @@ const init = async () => {
const initStatusList = () => {
post('statistics/getTipCount', {
beginTime: selectedDate.value,
- endTime: getEndOfDay(new Date(selectedDate.value))}).then((res: any) => {
+ endTime: getEndOfDay(new Date(selectedDate.value))
+ }).then((res: any) => {
statusList.value[0].num = res.waitDiagnosisCount
statusList.value[1].num = res.diagnosingCount
statusList.value[2].num = res.completeDiaCount
})
}
-const clickLi = (item: any,showBox:any = true) => {
+const clickLi = (item: any, showBox: any = true) => {
curItem.value = item
- if (item.status == 1 && showBox) {
+ if (item!=null&&item.status == 1 && showBox) {
ElMessageBox.confirm(`您将要接诊${item.name}`, "提示", {
confirmButtonText: '确定',
cancelButtonText: '取消',
callback: (action: any) => {
- if (action == "cancel"){
+ if (action == "cancel") {
curItem.value = null
return
}
@@ -153,14 +157,14 @@ const clickLi = (item: any,showBox:any = true) => {
}
},
})
- }else {
+ } else {
emit('clickItem', curItem.value)
}
}
-const changeCurItemOrStatus = (item:any, status:any) => {
- clickLi(item,false)
- if (curStatus != null){
+const changeCurItemOrStatus = (item: any, status: any) => {
+ clickLi(item, false)
+ if (curStatus != null) {
curStatus.value = status
}
}
@@ -168,28 +172,28 @@ defineExpose({changeCurItemOrStatus})
watch(() => curStatus.value, () => {
init() // 重新初始化数据
})
-const setDateTip=()=>{
+const setDateTip = () => {
const seletctedDateObj = new Date(selectedDate.value);
//如果选择的日期是今天
- if(seletctedDateObj.getFullYear()==new Date().getFullYear() && seletctedDateObj.getMonth()==new Date().getMonth() && seletctedDateObj.getDate()==new Date().getDate()){
+ if (seletctedDateObj.getFullYear() == new Date().getFullYear() && seletctedDateObj.getMonth() == new Date().getMonth() && seletctedDateObj.getDate() == new Date().getDate()) {
return '今天'
}
- if(seletctedDateObj.getFullYear()==new Date().getFullYear() && seletctedDateObj.getMonth()==new Date().getMonth() && seletctedDateObj.getDate()==new Date().getDate()-1){
+ if (seletctedDateObj.getFullYear() == new Date().getFullYear() && seletctedDateObj.getMonth() == new Date().getMonth() && seletctedDateObj.getDate() == new Date().getDate() - 1) {
return '昨天'
}
//如果为今年
- if(seletctedDateObj.getFullYear()==new Date().getFullYear()){
- return `${seletctedDateObj.getMonth()+1}-${seletctedDateObj.getDate()}`
+ if (seletctedDateObj.getFullYear() == new Date().getFullYear()) {
+ return `${seletctedDateObj.getMonth() + 1}-${seletctedDateObj.getDate()}`
}
return seletctedDateObj.getFullYear();
}
watch(() => selectedDate.value, (newValue, oldValue) => {
- if(newValue==oldValue){
+ if (newValue == oldValue) {
return;
}
- if(newValue==null){
+ if (newValue == null) {
return;
}
init()
@@ -219,23 +223,20 @@ watch(() => selectedDate.value, (newValue, oldValue) => {
.search {
position: relative;
- height: 82px;
- line-height: 82px;
- padding: 0 18px;
-
+ margin: 16px 0;
+ padding: 0 16px;
.search-icon {
position: absolute;
- left: 33px;
+ left: 32px;
top: 50%;
transform: translateY(-50%);
- width: 20px; // 调整图标大小
- height: 20px; // 调整图标大小
+ width: 16px; // 调整图标大小
+ height: 16px; // 调整图标大小
z-index: 1;
}
-
.search-input {
width: 100%;
- height: 50px;
+ height: 42px;
background: #FFFFFF;
border-radius: 6px;
border: 1px solid #EAEAEC;
@@ -254,50 +255,26 @@ watch(() => selectedDate.value, (newValue, oldValue) => {
display: flex;
min-height: 0;
flex-direction: column;
-
- .list-title {
- height: 48px;
- background: #F5FAFF;
- padding: 0 27px;
- display: flex;
- align-items: center;
- font-weight: 500;
- font-size: 14px;
- color: rgba(34, 42, 57, 0.8);
- font-style: normal;
-
- span {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
-
ul {
flex: 1;
min-height: 0;
-
.list-item {
height: 48px;
display: flex;
justify-content: space-between;
align-items: center;
- padding: 0 18px;
+ padding: 0 26px 0 28px;
font-weight: 400;
font-size: 14px;
color: rgba(34, 42, 57, 0.7);
font-style: normal;
cursor: pointer;
-
span {
display: flex;
align-items: center;
.avatar {
- margin-left: 15px;
width: 26px;
height: 26px;
- margin-right: 15px;
}
}
@@ -316,7 +293,6 @@ watch(() => selectedDate.value, (newValue, oldValue) => {
overflow: hidden; // 隐藏溢出的文本
text-overflow: ellipsis; // 显示省略号
text-align: center;
- margin-right: 24px;
}
}
@@ -333,7 +309,8 @@ watch(() => selectedDate.value, (newValue, oldValue) => {
}
-:deep(.el-input){
+
+:deep(.el-input) {
visibility: hidden;
width: 0;
height: 0;
diff --git a/src/views/outpatient/index.vue b/src/views/outpatient/index.vue
index ae3e352..f7db87c 100644
--- a/src/views/outpatient/index.vue
+++ b/src/views/outpatient/index.vue
@@ -1,33 +1,37 @@
-
+
-
-
+
+
-
+
-
+
-
-
-
-
+
+
+
@@ -51,6 +55,7 @@ import {apiConfig} from "@/assets/config/apiConfig.ts";
import PatientCard from "@/components/charge/PatientCard.vue";
import ServiceDetail from "@/components/common/service/ServiceDetail.vue";
import GoodsDetail from "@/components/common/goods/GoodsDetail.vue";
+
const curRegister = ref()
const registerId = ref()
const patientId = ref()
@@ -61,13 +66,13 @@ const formData = ref({
itemDetail: [],
goodsDetail: [],
})
-const initFormData = () => {
+const initFormData = () => {
formData.value = {
diagType: 1,
itemDetail: [],
goodsDetail: [],
}
- nextTick(()=>{
+ nextTick(() => {
caseRef.value?.clearDiagnosis()
patientCardRef.value?.clear()
})
@@ -100,9 +105,9 @@ const save = () => {
diagnosisMedicalRecord: medicalRecord,
}
- post('medical/record/save', {data: data}).then((res:any) => {
+ post('medical/record/save', {data: data}).then((res: any) => {
ElMessage.success("保存成功")
- medicalQueueRef.value?.changeCurItemOrStatus(null,2);
+ medicalQueueRef.value?.changeCurItemOrStatus(null, 2);
})
@@ -113,11 +118,12 @@ const patientCardRef = ref()
const patientRegistration = ref({})
const clickItem = (item: any) => {
curRegister.value = item
+ if(!item)return
registerId.value = item.id
itemId.value = item.id
patientId.value = item.patientInfoId
- if (item.status == 2){
+ if (item.status == 2) {
initFormData()
}
if (item.status == 3) {
@@ -137,10 +143,10 @@ const clickItem = (item: any) => {
})
}
-const medicalQueueRef =ref();
+const medicalQueueRef = ref();
const cancelReception = () => {
post(apiConfig.RegistrationChangeStatus, {id: registerId.value, status: 1}).then((res: any) => {
- medicalQueueRef.value?.changeCurItemOrStatus(res,1);
+ medicalQueueRef.value?.changeCurItemOrStatus(res, 1);
})
}
const changeTab = (e: any) => {
@@ -153,7 +159,7 @@ const changeTab = (e: any) => {
const itemId = ref('')
const edit = () => {
post('registration/changeStatus', {id: registerId.value, status: 2}).then((res: any) => {
- medicalQueueRef.value?.changeCurItemOrStatus(res,2);
+ medicalQueueRef.value?.changeCurItemOrStatus(res, 2);
})
}
const getOrderTotalPrice = () => {
@@ -167,34 +173,34 @@ const getOrderTotalPrice = () => {
formData.value.preTotalPrice = totalPrice
formData.value.totalPrice = totalPrice
}
-const caseRef= ref("")
-const copyForm=(item:any) => {
+const caseRef = ref("")
+const copyForm = (item: any) => {
formData.value = item.diagnosisMedicalRecord
- const diagnosisList =JSON.parse(item.diagnosisMedicalRecord.diagnosisDetail)
+ const diagnosisList = JSON.parse(item.diagnosisMedicalRecord.diagnosisDetail)
const nList = item.diagnosisMedicalRecord.diagnosisSummary.split(',')
- nextTick(()=>{
- caseRef.value?.initDiagnosisSearch(diagnosisList,nList)
+ nextTick(() => {
+ caseRef.value?.initDiagnosisSearch(diagnosisList, nList)
})
}
-const copyItemList=(item:any) => {
+const copyItemList = (item: any) => {
itemDetail.value = item.itemDetail
}
-const copyGoodsList=(item:any) => {
+const copyGoodsList = (item: any) => {
goodsList.value = item.goodsDetail
}
-const seeDockerInfo = ref()
-const getSeeDockerInfo = (newValue:any) => {
- if (!registerId.value)return;
+const seeDockerInfo = ref()
+const getSeeDockerInfo = (newValue: any) => {
+ if (!registerId.value) return;
post('medical/record/getSeeDockerInfo', {regisId: newValue}).then((res: any) => {
seeDockerInfo.value = res
formData.value.allergyHistory = res.patientInfo.allergyHistory;
formData.value.beforeMedicalHistory = res.patientInfo.beforeMedicalHistory;
})
}
-const isShowFrom= ref(false)
-const focus=(e:any)=>{
- isShowFrom.value=e
+const isShowFrom = ref(false)
+const focus = (e: any) => {
+ isShowFrom.value = e
}
watch(() => registerId.value, (newValue) => {
if (!newValue) {