From 69d835a42866983af68b600609ee91f22009328d Mon Sep 17 00:00:00 2001 From: ChenQiuYu Date: Fri, 9 May 2025 11:25:04 +0800 Subject: [PATCH] dev --- src/assets/config/apiConfig.ts | 1 + src/components/home/index/PaymentDetails.vue | 85 ++++++++++++++++- src/components/home/index/ValidityWarning.vue | 57 ++++++----- src/components/outpatient/MedicalQueue.vue | 94 +++++++++++++++---- src/components/registration/Edit.vue | 38 ++++---- src/components/registration/List.vue | 2 +- src/components/statistics/over/Revenue.vue | 67 ++++--------- src/utils/dateUtils.ts | 10 +- src/views/outpatient/index.vue | 2 +- src/views/statistics/index.vue | 11 --- 10 files changed, 240 insertions(+), 127 deletions(-) delete mode 100644 src/views/statistics/index.vue diff --git a/src/assets/config/apiConfig.ts b/src/assets/config/apiConfig.ts index 3f3ebf9..4b530a0 100644 --- a/src/assets/config/apiConfig.ts +++ b/src/assets/config/apiConfig.ts @@ -11,6 +11,7 @@ export enum apiConfig{ */ "RegistrationDetail" ="medical/record/getDetailByRegisId",//详情 "RegistrationList" ="registration/getListByType",//患者列表 + "RegistrationChangeStatus"="registration/changeStatus", /** * 科室成员信息 diff --git a/src/components/home/index/PaymentDetails.vue b/src/components/home/index/PaymentDetails.vue index 7c9ddb9..cb0c854 100644 --- a/src/components/home/index/PaymentDetails.vue +++ b/src/components/home/index/PaymentDetails.vue @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/src/components/registration/Edit.vue b/src/components/registration/Edit.vue index 99039f2..dc7f891 100644 --- a/src/components/registration/Edit.vue +++ b/src/components/registration/Edit.vue @@ -21,12 +21,12 @@ + :disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0"> - + @@ -35,12 +35,12 @@ + :disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0"> - + @@ -49,7 +49,7 @@ v-model="edit_data.organizationDoctorId" placeholder="请选择医生" @change="getSectionList" - :disabled="edit_data.status==3" + :disabled="edit_data.status==3||edit_data.status==0" > + :disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0"> + :disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0"> - + @@ -111,7 +111,7 @@ - + @@ -143,10 +143,10 @@ @@ -181,7 +181,6 @@ import insutypes from "@/assets/config/directory/insutypes.json" import depts from "@/assets/config/directory/depts.json"; import {apiConfig} from "@/assets/config/apiConfig.ts"; - const height = ref(470) const certTypeList = ref( Object.entries(psnCertTypes) @@ -255,7 +254,7 @@ const save = () => { mdtrtCertNo: socialCard.value.mdtrtCertNo, mdtrtCertType: socialCard.value.mdtrtCertType }).then(() => { - ElMessage.success('新建成功') + ElMessage.success('挂号成功') close() }) } @@ -263,9 +262,10 @@ const save = () => { }) } -const deleteDetail = () => { - post('registration/delete', {id: edit_data.value.id}).then(() => { - ElMessage.success('删除成功') +//退出挂号 +const registrationCancel = () => { + post(apiConfig.RegistrationChangeStatus, {id: edit_data.value.id, status: 0}).then(() => { + ElMessage.success('退号成功') close() }) } diff --git a/src/components/registration/List.vue b/src/components/registration/List.vue index 76764f8..2d529dc 100644 --- a/src/components/registration/List.vue +++ b/src/components/registration/List.vue @@ -22,7 +22,7 @@ :type="scope.row.status === 1 ? 'warning' : scope.row.status === 2 ? 'success' : scope.row.status === 3 ? 'info' : 'danger'" > {{ - scope.row.status === 1 ? '待诊' : scope.row.status === 2 ? '在诊' : scope.row.status === 3 ? '已诊' : '-' + scope.row.status === 1 ? '待诊' : scope.row.status === 2 ? '在诊' : scope.row.status === 3 ? '已诊' : scope.row.status ===0 ? '已取消' : '-' }} diff --git a/src/components/statistics/over/Revenue.vue b/src/components/statistics/over/Revenue.vue index 19c377f..3e74d6c 100644 --- a/src/components/statistics/over/Revenue.vue +++ b/src/components/statistics/over/Revenue.vue @@ -10,7 +10,7 @@ :class="{active:curDate?.name==item.name}" @click="changeCheckDate(item)" > - {{ item.name }} + {{ item.name }} { - changeNum.value = index - timeList.value = [] - const now = new Date(); - const year = now.getFullYear(); - let month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1 - const day = String(now.getDate()).padStart(2, '0'); // 获取当前日 - if (index == 0) { - const day1 = String(now.getDate() + 1).padStart(2, '0'); // 获取当前日 - beginTime.value = `${year}-${month}-${day}`; - endTime.value = `${year}-${month}-${day1}` - } - if (index == 1) { - const yesterday = new Date(now); - yesterday.setDate(now.getDate() - 1);// 设置日期到昨天 - const yesterday_year = yesterday.getFullYear(); - const yesterday_month = String(yesterday.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要加 1 - const yesterday_day = String(yesterday.getDate()).padStart(2, '0'); - beginTime.value = `${yesterday_year}-${yesterday_month}-${yesterday_day}`; - endTime.value = `${year}-${month}-${day}` - } - if (index == 2) { - const dayOfWeek = now.getDay(); // 获取今天是周几,0 表示周日,1 表示周一,以此类推 - const diff = now.getDate() - dayOfWeek + (dayOfWeek === 0 ? -6 : 1); // 计算本周一的日期 - const startOfWeek = new Date(now.setDate(diff));// 设置日期到本周一 - const beginYear = startOfWeek.getFullYear(); - const beginMonth = String(startOfWeek.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1 - const beginDay = String(startOfWeek.getDate()).padStart(2, '0'); // 获取当前日 - beginTime.value = `${beginYear}-${beginMonth}-${beginDay}`; - endTime.value = `${year}-${month}-${day}`; - } - if (index == 3) { - // 本月的第一天 - let startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1); - const startYear = startOfMonth.getFullYear(); - const startMonth = String(startOfMonth.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1 - const startDay = String(startOfMonth.getDate()).padStart(2, '0'); - beginTime.value = `${startYear}-${startMonth}-${startDay}`; - endTime.value = `${year}-${month}-${day}`; - } - initChart(); -} const formatDate = (dateString: any) => { const date = new Date(dateString); const year = date.getFullYear(); @@ -169,11 +127,6 @@ const formatDate = (dateString: any) => { const day = String(date.getDate()).padStart(2, '0'); return `${year}-${month}-${day}`; }; -const changeTime = () => { - beginTime.value = formatDate(timeList.value[0]) - endTime.value = formatDate(timeList.value[1]) - initChart() -} // 创建 ref 引用 const centerRef = ref(null) const centerItemRef = ref(null) @@ -396,12 +349,22 @@ const changeCheckDate = (dateItem: any) => { padding: 0 5px; height: 30px; border: 1px solid #d7d9da; - color: #d7d9da; + color: #000; font-size: 15px; display: flex; align-items: center; + cursor: pointer; + &:hover { + color: #fff; + background: #409EFF; + } + } } +.active{ + color: #fff !important; + background: #409EFF; +} .container { display: flex; flex-direction: column; @@ -498,11 +461,13 @@ const changeCheckDate = (dateItem: any) => { .statistics-chart { height: 382px; display: flex; - .business-map{ + + .business-map { flex: 1; margin-right: 24px; } - .consumption-map{ + + .consumption-map { flex: 1; } } diff --git a/src/utils/dateUtils.ts b/src/utils/dateUtils.ts index 1cba7cb..403c6aa 100644 --- a/src/utils/dateUtils.ts +++ b/src/utils/dateUtils.ts @@ -120,4 +120,12 @@ export const getEndOfDay = (date: Date | string): string => { dateDetail.setHours(23, 59, 59, 0); // 设置为当天 23:59:00 return formatDate(dateDetail).slice(0, 19); // -}; \ No newline at end of file +}; +export const getCurrentDate=()=> { + const date = new Date(); + const year = date.getFullYear(); + // 月份从0开始,所以要加1 + const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要+1并补0 + const day = String(date.getDate()).padStart(2, '0'); // 补0操作 + return `${year}-${month}-${day}`; +} \ No newline at end of file diff --git a/src/views/outpatient/index.vue b/src/views/outpatient/index.vue index 8791501..61e88f0 100644 --- a/src/views/outpatient/index.vue +++ b/src/views/outpatient/index.vue @@ -139,7 +139,7 @@ const clickItem = (item: any) => { } const medicalQueueRef =ref(); const cancelReception = () => { - post('registration/changeStatus', {id: registerId.value, status: 1}).then((res: any) => { + post(apiConfig.RegistrationChangeStatus, {id: registerId.value, status: 1}).then((res: any) => { medicalQueueRef.value?.changeCurItemOrStatus(res,1); }) } diff --git a/src/views/statistics/index.vue b/src/views/statistics/index.vue deleted file mode 100644 index 89b1f33..0000000 --- a/src/views/statistics/index.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file