From 50d36bbc6371de0eca1dfa285de0c91746fa9328 Mon Sep 17 00:00:00 2001 From: win7 Date: Tue, 10 Dec 2019 16:57:11 +0800 Subject: [PATCH] 0 --- app/index/view/index/index.html | 2 +- app/keti/controller/KetiInfo.php | 9 +-- app/rongyu/controller/JsRongyuInfo.php | 85 +++++++++++++------------- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/app/index/view/index/index.html b/app/index/view/index/index.html index f71c43aa..06f11839 100644 --- a/app/index/view/index/index.html +++ b/app/index/view/index/index.html @@ -45,7 +45,7 @@ 表格录入
- + 添加学生
diff --git a/app/keti/controller/KetiInfo.php b/app/keti/controller/KetiInfo.php index ee97c24e..5235f6dd 100644 --- a/app/keti/controller/KetiInfo.php +++ b/app/keti/controller/KetiInfo.php @@ -10,6 +10,7 @@ use app\keti\model\KetiInfo as ktinfo; class KetiInfo extends BaseController { + // use \liliuwei\think\Jump; /** * 显示资源列表 * @@ -199,7 +200,7 @@ class KetiInfo extends BaseController } // 批量保存图片 - public function saveall($ketice) + public function saveAll($ketice) { // 获取文件信息 $list['text'] = $this->request->post('text'); @@ -514,8 +515,8 @@ class KetiInfo extends BaseController if($list->isEmpty()) { - $this->error('兄弟,没有要下载的信息呀~'); - return ''; + // $this->error('兄弟,没有要下载的信息呀~'); + return '没有找到记录,下载失败'; }else{ $filename = $list[0]['ryTuce']['title']; $fzschool = $list[0]['ryTuce']['fz_school']['title']; @@ -524,7 +525,7 @@ class KetiInfo extends BaseController } //通过工厂模式创建内容 - $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load('uploads/rongyu_teacher/js_rongyu.xlsx'); + $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load('uploads/keti/keti.xlsx'); $worksheet = $spreadsheet->getActiveSheet(); $worksheet->getCell('A1')->setValue($filename); diff --git a/app/rongyu/controller/JsRongyuInfo.php b/app/rongyu/controller/JsRongyuInfo.php index b34b4475..6bcd3c37 100644 --- a/app/rongyu/controller/JsRongyuInfo.php +++ b/app/rongyu/controller/JsRongyuInfo.php @@ -529,62 +529,61 @@ class JsRongyuInfo extends BaseController $spreadsheet->disconnectWorksheets(); unset($spreadsheet); - // return '下载后请关闭窗口'; } - // 搜索教师荣誉 - public function ryTeacher($id) - { - // 获取DT的传值 - $getdt = request()->param(); + // // 搜索教师荣誉 + // public function ryTeacher($id) + // { + // // 获取DT的传值 + // $getdt = request()->param(); - //得到排序的方式 - $order = $getdt['order'][0]['dir']; - //得到排序字段的下标 - $order_column = $getdt['order'][0]['column']; - //根据排序字段的下标得到排序字段 - $order_field = $getdt['columns'][$order_column]['name']; - if($order_field=='') - { - $order_field = $getdt['columns'][$order_column]['data']; - } - //得到limit参数 - $limit_start = $getdt['start']; - $limit_length = $getdt['length']; + // //得到排序的方式 + // $order = $getdt['order'][0]['dir']; + // //得到排序字段的下标 + // $order_column = $getdt['order'][0]['column']; + // //根据排序字段的下标得到排序字段 + // $order_field = $getdt['columns'][$order_column]['name']; + // if($order_field=='') + // { + // $order_field = $getdt['columns'][$order_column]['data']; + // } + // //得到limit参数 + // $limit_start = $getdt['start']; + // $limit_length = $getdt['length']; - //得到搜索的关键词 - $search = [ - 'teacherid'=>$id, - 'order'=>$order, - 'order_field'=>$order_field - ]; + // //得到搜索的关键词 + // $search = [ + // 'teacherid'=>$id, + // 'order'=>$order, + // 'order_field'=>$order_field + // ]; - // 实例化 - $ryinfo = new ryinfo; + // // 实例化 + // $ryinfo = new ryinfo; - // 获取荣誉总数 - $cnt = $ryinfo->select()->count(); + // // 获取荣誉总数 + // $cnt = $ryinfo->select()->count(); - // 查询数据 - $data = $ryinfo->srcTeacher($search); - $datacnt = $data->count(); + // // 查询数据 + // $data = $ryinfo->srcTeacher($search); + // $datacnt = $data->count(); - // 获取当前页数据 - $data = $data->slice($limit_start,$limit_length); + // // 获取当前页数据 + // $data = $data->slice($limit_start,$limit_length); - // 重组返回内容 - $data = [ - 'draw'=> $getdt["draw"] , // ajax请求次数,作为标识符 - 'recordsTotal'=>$cnt, // 获取到的结果数(每页显示数量) - 'recordsFiltered'=>$datacnt, // 符合条件的总数据量 - 'data'=>$data, //获取到的数据结果 - ]; + // // 重组返回内容 + // $data = [ + // 'draw'=> $getdt["draw"] , // ajax请求次数,作为标识符 + // 'recordsTotal'=>$cnt, // 获取到的结果数(每页显示数量) + // 'recordsFiltered'=>$datacnt, // 符合条件的总数据量 + // 'data'=>$data, //获取到的数据结果 + // ]; - return json($data); - } + // return json($data); + // }