From e3c09549ed72cfd9f9d8ba0bc84b88d77c77b419 Mon Sep 17 00:00:00 2001 From: yanzai Date: Thu, 19 Dec 2024 20:18:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=A1=E6=84=8F=E5=BA=A6=E8=B0=83=E6=9F=A5?= =?UTF-8?q?=EF=BC=8C=E6=8C=89=E6=97=B6=E9=97=B4=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/API/Admin/YeWu/QuestionLogController.php | 4 +++- admin/src/views/HospitalMngr/Questions.vue | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/QuestionLogController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/QuestionLogController.php index d0048f5..69feaf4 100644 --- a/Laravel/app/Http/Controllers/API/Admin/YeWu/QuestionLogController.php +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/QuestionLogController.php @@ -18,8 +18,10 @@ class QuestionLogController extends Controller public function Export() { $q_type = request('q_type'); + $dateRange = request('dateRange'); + if(!isset($dateRange) or count($dateRange)<>2) return \Yz::echoError1("请选择日期"); $q_list=DB::table('questions')->where(['q_type'=>2,'is_del'=>0,'status'=>1])->orderBy('order','asc')->get(); - $log_list = DB::table('questions_log')->where(['q_type' => $q_type])->get(); + $log_list = DB::table('questions_log')->whereBetween('created_at',$dateRange)->where(['q_type' => $q_type])->get(); if(count($log_list)==0) return \Yz::echoError1("暂无数据可导出"); $cols_SN = $this->generateSequence(400); diff --git a/admin/src/views/HospitalMngr/Questions.vue b/admin/src/views/HospitalMngr/Questions.vue index bee866f..0b87d46 100644 --- a/admin/src/views/HospitalMngr/Questions.vue +++ b/admin/src/views/HospitalMngr/Questions.vue @@ -23,7 +23,10 @@ - 导出用户问卷 + + + 导出用户问卷 @@ -293,7 +296,8 @@ const Export=()=>{ loading.value = true QuestionExport({ - q_type: searchInfo.value.q_type + q_type: searchInfo.value.q_type, + dateRange:searchInfo.value.dateRange }).then(res => { loading.value = false if (res.status) {