From 2b64719d460646ab3a714b20a8fc8163f4dbe1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=80=E5=BD=A7?= <荀彧@gentronhealth.com> Date: Sun, 10 May 2026 10:41:11 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#499:=20=E3=80=90=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E7=94=B3=E8=AF=B7=E3=80=91=E6=A3=80=E6=9F=A5=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=88=97=E8=A1=A8=E7=BC=BA=E5=A4=B1=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=B8=8D=E7=AC=A6?= =?UTF-8?q?=E5=90=88=E4=B8=B4=E5=BA=8A=E9=AB=98=E6=95=88=E6=A3=80=E7=B4=A2?= =?UTF-8?q?=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增关键字搜索输入框,支持按申请单号/检查项目名称模糊搜索 - 时间范围筛选默认显示近一周数据 - 关键字输入支持回车键快捷查询 Co-Authored-By: Claude Opus 4.7 --- .../applicationShow/examineApplication.vue | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue index 23614584..f81ff8fa 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue @@ -49,6 +49,15 @@ + + + @@ -180,9 +189,22 @@ const descJsonData = ref(null); const orgOptions = ref([]); // 筛选表单数据 +const getDefaultDateRange = () => { + const now = new Date(); + const weekAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000); + const formatDate = (d) => { + const year = d.getFullYear(); + const month = String(d.getMonth() + 1).padStart(2, '0'); + const day = String(d.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; + }; + return [formatDate(weekAgo), formatDate(now)]; +}; + const filterForm = ref({ - dateRange: [], // [startDate, endDate] + dateRange: getDefaultDateRange(), // 默认近一周 status: '', // 申请单状态 + keyword: '', // 关键字搜索 }); const fetchData = async () => { @@ -207,6 +229,11 @@ const fetchData = async () => { params.status = filterForm.value.status; } + // 添加关键字搜索 + if (filterForm.value.keyword && filterForm.value.keyword.trim()) { + params.keyword = filterForm.value.keyword.trim(); + } + const res = await getCheck(params); if (res.code === 200 && res.data) { const raw = res.data?.records || res.data; @@ -243,8 +270,9 @@ const handleSearch = async () => { * 重置按钮处理 */ const handleReset = () => { - filterForm.value.dateRange = []; + filterForm.value.dateRange = getDefaultDateRange(); filterForm.value.status = ''; + filterForm.value.keyword = ''; fetchData(); }; @@ -344,8 +372,9 @@ watch( getLocationInfo(); } else { tableData.value = []; - filterForm.value.dateRange = []; + filterForm.value.dateRange = getDefaultDateRange(); filterForm.value.status = ''; + filterForm.value.keyword = ''; } }, { immediate: true }