From daad0f78121b0e5dbe5b05ab0c1eafd0fee44147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 06:08:43 +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 - 新增关键字搜索输入框(申请单号/检查项目名称模糊匹配) - 设置日期范围默认为近7天 - 关键字搜索支持回车触发查询 Co-Authored-By: Claude Opus 4.7 --- .../applicationShow/examineApplication.vue | 31 +++++++++++++++++-- 1 file changed, 28 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 5e6bd41bf..1ad323bbe 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 @@ + + + @@ -213,10 +222,19 @@ const currentDetail = ref(null); const descJsonData = ref(null); const orgOptions = ref([]); +// 获取近7天的日期范围作为默认值 +const getDefaultDateRange = () => { + const now = new Date(); + const endDate = now.toISOString().split('T')[0]; + const startDate = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000).toISOString().split('T')[0]; + return [startDate, endDate]; +}; + // 筛选表单数据 const filterForm = ref({ - dateRange: [], // [startDate, endDate] + dateRange: getDefaultDateRange(), // 默认近一周 status: '', // 申请单状态 + keyword: '', // 关键字搜索 }); const fetchData = async () => { @@ -241,6 +259,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; @@ -277,8 +300,9 @@ const handleSearch = async () => { * 重置按钮处理 */ const handleReset = () => { - filterForm.value.dateRange = []; + filterForm.value.dateRange = getDefaultDateRange(); filterForm.value.status = ''; + filterForm.value.keyword = ''; fetchData(); }; @@ -486,8 +510,9 @@ watch( getLocationInfo(); } else { tableData.value = []; - filterForm.value.dateRange = []; + filterForm.value.dateRange = getDefaultDateRange(); filterForm.value.status = ''; + filterForm.value.keyword = ''; } }, { immediate: true }