From e0ca52ce67596d41c9817252486190ede36b78d1 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 31 May 2024 13:09:40 +0800 Subject: [PATCH 1/6] 1 --- resources/views/admin/home.blade.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/views/admin/home.blade.php b/resources/views/admin/home.blade.php index f01e84b..379991b 100644 --- a/resources/views/admin/home.blade.php +++ b/resources/views/admin/home.blade.php @@ -516,6 +516,13 @@ setBarChartOption($(this).val()) }) } + function hospitalSelectListner () { + $("[name=hospital-select]").change(function () { + var url = window.location.href; + url += window.location.search ? ("&project_id=" + $(this).val()) : ("?project_id=" + $(this).val()); + window.open(url); + }) + } (function () { initPieChart() initBarChart() From 16768f214a7fbf3799225b50041203756e7a2ddf Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 31 May 2024 13:10:22 +0800 Subject: [PATCH 2/6] 1 --- resources/views/admin/home.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/admin/home.blade.php b/resources/views/admin/home.blade.php index 379991b..8d7f1df 100644 --- a/resources/views/admin/home.blade.php +++ b/resources/views/admin/home.blade.php @@ -527,6 +527,7 @@ initPieChart() initBarChart() typeSwitchListener() + hospitalSelectListner() })() @endpush From ebbf36c16e236398f89e15890c7b1f4a9631327f Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 31 May 2024 13:12:30 +0800 Subject: [PATCH 3/6] 1 --- resources/views/admin/home.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/admin/home.blade.php b/resources/views/admin/home.blade.php index 8d7f1df..94f5449 100644 --- a/resources/views/admin/home.blade.php +++ b/resources/views/admin/home.blade.php @@ -520,7 +520,7 @@ $("[name=hospital-select]").change(function () { var url = window.location.href; url += window.location.search ? ("&project_id=" + $(this).val()) : ("?project_id=" + $(this).val()); - window.open(url); + window.open(url,'_self'); }) } (function () { From 25128f2ccaf42103c5bb87452513e68abad4af4e Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 31 May 2024 13:14:25 +0800 Subject: [PATCH 4/6] 1 --- resources/views/admin/home.blade.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/views/admin/home.blade.php b/resources/views/admin/home.blade.php index 94f5449..3971080 100644 --- a/resources/views/admin/home.blade.php +++ b/resources/views/admin/home.blade.php @@ -240,7 +240,7 @@ @@ -517,6 +517,7 @@ }) } function hospitalSelectListner () { + $("[name=hospital-select]").change(function () { var url = window.location.href; url += window.location.search ? ("&project_id=" + $(this).val()) : ("?project_id=" + $(this).val()); From c4c6b85558e216808d26e539767b748d8501c0aa Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 31 May 2024 13:17:06 +0800 Subject: [PATCH 5/6] 1 --- resources/views/admin/home.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/admin/home.blade.php b/resources/views/admin/home.blade.php index 3971080..a8141e8 100644 --- a/resources/views/admin/home.blade.php +++ b/resources/views/admin/home.blade.php @@ -519,8 +519,8 @@ function hospitalSelectListner () { $("[name=hospital-select]").change(function () { - var url = window.location.href; - url += window.location.search ? ("&project_id=" + $(this).val()) : ("?project_id=" + $(this).val()); + var url = window.location.origin + window.location.pathname; + url += ("?project_id=" + $(this).val()); window.open(url,'_self'); }) } From 6112bfbf4a069bb88a610f5c7fc124e53e9c1c4c Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 31 May 2024 13:24:57 +0800 Subject: [PATCH 6/6] 1 --- resources/views/admin/home.blade.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/views/admin/home.blade.php b/resources/views/admin/home.blade.php index a8141e8..1669938 100644 --- a/resources/views/admin/home.blade.php +++ b/resources/views/admin/home.blade.php @@ -517,6 +517,12 @@ }) } function hospitalSelectListner () { + if (window.location.search) { + var project_id = window.location.search.split("=") + if (project_id[1]) { + $("[name=hospital-select] option[value="+project_id[1]+"]").prop("selected",true) + } + } $("[name=hospital-select]").change(function () { var url = window.location.origin + window.location.pathname;