diff --git a/src/assets/config/apiConfig.ts b/src/assets/config/apiConfig.ts index d80866f..88510fa 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", /** * 科室成员信息 @@ -25,5 +26,6 @@ export enum apiConfig{ * 收费接口 */ - "ChargeListChargeLog"="charge/listChargeLog"//查询收费记录 + "ChargeListChargeLog"="charge/listChargeLog",//查询收费记录 + "recordGetChargeQueue"="medical/record/getChargeQueue"//查询收费记录 } diff --git a/src/components/charge/ChargeQueue.vue b/src/components/charge/ChargeQueue.vue index 3107200..3a60749 100644 --- a/src/components/charge/ChargeQueue.vue +++ b/src/components/charge/ChargeQueue.vue @@ -1,7 +1,21 @@ 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 b1fd5e0..ae3e352 100644 --- a/src/views/outpatient/index.vue +++ b/src/views/outpatient/index.vue @@ -139,8 +139,7 @@ const clickItem = (item: any) => { } const medicalQueueRef =ref(); const cancelReception = () => { - post('registration/changeStatus', {id: registerId.value, status: 1}).then((res: any) => { - debugger + 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