From c84b16d2ac449622e0ed3a1a04544defc2c30154 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Mon, 12 Sep 2022 23:43:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=A4=8D=E8=BD=A6=E6=9E=B6=E5=A4=84?= =?UTF-8?q?=E7=90=86=E8=B0=83=E8=AF=9517?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/Task.php | 6 +++--- app/view/task/index.html | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/controller/Task.php b/app/controller/Task.php index ca2b132..eb09b9a 100644 --- a/app/controller/Task.php +++ b/app/controller/Task.php @@ -62,7 +62,7 @@ class Task extends BaseController $query = $this->model->field(['id','payload','remark', 'type', 'queue', 'download_times', "(case `status` when 2 then '100' else '0' end)" => 'process', 'date_format(from_unixtime(create_time),"%Y-%m-%d %H:%i:%s") as create_timestamp', - "(case `type` when 1 then '导入' when 2 then '导出' when 3 then '同行电话' when 4 then '重复车架号' when 5 then '更新车辆信息' when 6 then '清除重复电话' when 7 then '删除重复数据' else '' end)" => 'type_txt', + "(case `type` when 1 then '导入' when 2 then '导出' when 3 then '同行电话' when 4 then '重复车架号' when 5 then '更新车辆信息' when 6 then '清除重复电话' when 7 then '删除重复数据' when 8 then '导出删除重复数据' else '' end)" => 'type_txt', "(case `status` when 0 then '排队中' when 1 then '处理中' when 2 then '已完成' when 3 then '失败' else '' end)" => 'status', 'create_time']); if($queue != ''){ $query = $query->where('queue','like','%'. $queue .'%')->whereOr('payload','like','%'. str_replace(['\\','"'],['_',''],json_encode($queue)) .'%'); @@ -117,9 +117,9 @@ class Task extends BaseController $job_info = JobsT::find($params['source_id']); $job_info_payload = json_decode($job_info->payload,true)['data']['params']; $params = []; - $params['export_type'] = 'repeat'; + $params['export_type'] = $job_info->type == 8? 'repeat_delete': 'repeat'; $params['export_limit'] = 0; - $params['export_table'] = $job_info->type == 3? 'peer_phone_t': ($job_info->type == 4?'repeat_frame_t':''); + $params['export_table'] = $job_info->type == 3? 'peer_phone_t': ($job_info->type == 4?'repeat_frame_t':'repeat_data_t'); $params['source_id'] = $job_info->id; } if (($type == 1 || $type == 5) && ( $filename == '' || ($filename != '' && !file_exists(public_path('public/storage') . $filename)))) { diff --git a/app/view/task/index.html b/app/view/task/index.html index 4e8fcf9..2431025 100644 --- a/app/view/task/index.html +++ b/app/view/task/index.html @@ -246,6 +246,13 @@ {{# }else if(d.type == 1){ }} 查看 {{# } }} + {{# }else if(d.type == 8){ }} + {{# if(d.download_times > 0){ }} + 下载文件 + {{# }else { }} + 下载文件 + {{# } }} + {{# } }}