From 715d8ace1c344ad0ced43c31de89ce9efed2173d Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Thu, 27 Feb 2020 14:00:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E4=B8=AD=E5=BF=83=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/DownloadController.class.php | 8 ++++---- Application/Home/View/default/Download/listsIndex.html | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 31f6d6830..9bca36c1e 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -2015,12 +2015,12 @@ class DownloadController extends BaseController { */ public function export() { //开始导出 $id = $_REQUEST['lid']; - $dataname = $_REQUEST['dname']; - $downloadStatus = M('downloadlog','tab_')->where(['id'=>$id])->field('status')->select(); + $downloadStatus = M('downloadlog','tab_')->where(['id'=>$id])->field('dataname,status,conditions')->select(); if($downloadStatus[0]['status'] == 1) { $this->error("该数据已下载请重新添加",U('listsIndex')); } - $conditions = $_REQUEST['conditions']; + $dataname = $downloadStatus[0]['dataname']; + $conditions = $downloadStatus[0]['conditions']; $map = array(); foreach (json_decode($conditions,FALSE) as $key => $value) { if($value !== 0 && $value !== "" ) { @@ -2351,7 +2351,7 @@ class DownloadController extends BaseController { fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中 $accessNum = '100000';//从数据库获取总量,假设是十万 $accessNum = count($data1)?:0 ; - + var_dump($data1);die(); $perSize = 5000;//每次查询的条数 $pages = ceil($accessNum / $perSize); for($i = 1; $i <= $pages; $i++) { diff --git a/Application/Home/View/default/Download/listsIndex.html b/Application/Home/View/default/Download/listsIndex.html index 4580da579..3b626d6f6 100644 --- a/Application/Home/View/default/Download/listsIndex.html +++ b/Application/Home/View/default/Download/listsIndex.html @@ -179,10 +179,8 @@
- - - - 可下载 + + 可下载
已下载
@@ -283,7 +281,8 @@ });