From 97856ac4f2fa91b4348ba77c7d4f67417344b452 Mon Sep 17 00:00:00 2001 From: Dai Date: Sun, 11 Aug 2024 19:19:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E8=AF=BE=E6=B1=87=E6=80=BB=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/admin/app/controller/TeacherScheduleTimeController.php | 4 +++- .../app/view/teacher-schedule-time/export_schedule_index.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/admin/app/controller/TeacherScheduleTimeController.php b/plugin/admin/app/controller/TeacherScheduleTimeController.php index ab59dac..2b22f80 100644 --- a/plugin/admin/app/controller/TeacherScheduleTimeController.php +++ b/plugin/admin/app/controller/TeacherScheduleTimeController.php @@ -445,7 +445,9 @@ class TeacherScheduleTimeController extends Crud $worksheet->setCellValue('F1', 'Tutor'); $worksheet->setCellValue('G1', 'Duration'); $worksheet->setCellValue('H1', 'Note'); -// $worksheet->getStyle('A1:H1')->(); + $worksheet->getStyle('A1:H1')->getFill() + ->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID) + ->getStartColor()->setRGB('4f81bd'); $month_days = get_dates_in_month(date('Y', strtotime($month)), date('m', strtotime($month))); diff --git a/plugin/admin/app/view/teacher-schedule-time/export_schedule_index.html b/plugin/admin/app/view/teacher-schedule-time/export_schedule_index.html index 2646d85..e3fbd9f 100644 --- a/plugin/admin/app/view/teacher-schedule-time/export_schedule_index.html +++ b/plugin/admin/app/view/teacher-schedule-time/export_schedule_index.html @@ -264,7 +264,7 @@ const link = document.createElement('a'); link.style.display = 'none'; // 设置下载地址 - link.setAttribute('href', res.date.file_url); + link.setAttribute('href', res.data.file_url); // 设置文件名 link.setAttribute('download', res.data.file_name); document.body.appendChild(link);