From 9032656d04e31a1c16a85bf60093f7f03c7cb824 Mon Sep 17 00:00:00 2001 From: win7 Date: Wed, 25 Dec 2019 10:52:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=A1=E5=AF=B9=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E5=90=8D=E5=8D=95=E5=90=8E=E8=BF=94=E5=9B=9E=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/renshi/controller/Student.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/renshi/controller/Student.php b/app/renshi/controller/Student.php index bb3a0465..c253afe0 100644 --- a/app/renshi/controller/Student.php +++ b/app/renshi/controller/Student.php @@ -533,6 +533,10 @@ class Student extends BaseController $delarr = array_merge($delarr,$data); } + // 获取学校名称 + $sch = new \app\system\model\school; + $sch = $sch::where('id',$list['school'])->value('jiancheng'); + // 导出要删除的信息 @@ -541,8 +545,8 @@ class Student extends BaseController $spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet; $sheet = $spreadsheet->getActiveSheet(); // 设置表头信息 - $sheet->setCellValue('A1', '需要删除学生名单'); - $sheet->setCellValue('A2', '此表中学生是系统中比上传表中多的数据,是否删除请结合实际情况'); + $sheet->setCellValue('A1', $sch.'需要删除学生名单'); + $sheet->setCellValue('A2', '此表中学生名单是系统中比上传名单中多的数据,是否删除请结合实际情况'); $sheet->setCellValue('A3', '序号'); $sheet->setCellValue('B3', 'ID'); $sheet->setCellValue('C3', '班级'); @@ -563,7 +567,7 @@ class Student extends BaseController // 保存文件 - $filename = '与数据库不相符的学生信息'.date('ymdHis').'.xlsx'; + $filename = $sch.'删除学生名单'.date('ymdHis').'.xlsx'; header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); header('Content-Disposition: attachment;filename="' . $filename . '"'); header('Cache-Control: max-age=0');