作者 sgj
1 个管道 的构建 失败 耗费 0 秒

志愿者导出信息

... ... @@ -694,6 +694,7 @@ class ActivityController extends AdminBaseController
}
$join[$k]['photo']=get_image_path($v['photo']);
if (!empty($v['apply_food'])){
$select[$k]=json_decode($v['apply_food'],true);
foreach ($select[$k] as $k1=>$v1){
... ... @@ -703,6 +704,32 @@ class ActivityController extends AdminBaseController
}else{
$join[$k]['apply_food']='';
}
switch ($v['status']){
case 0:
$data['status']='未审核';
break;
case 1:
$data['status']='已通过';
break;
case 2:
$data['status']='未通过';
break;
case 3:
$data['status']='已签到';
break;
}
switch ($v['type']){
case 1:
$data['type']='线上';
break;
case 2:
$data['type']='线下';
break;
case 3:
$data['type']='线上及线下';
break;
}
}
$title = [
['ID', 15, 'id', 1],
... ...
... ... @@ -55,6 +55,16 @@ class Excel
}
//excel
/**
* @param $letter
* @param $title
* @param $list 数据
* @param $name
* @throws \PHPExcel_Exception
* @throws \PHPExcel_Reader_Exception
* @throws \PHPExcel_Writer_Exception
*/
public function excel($letter,$title,$list,$name){
// 导出Exl
import("Org.Util.PHPExcel");
... ... @@ -79,8 +89,6 @@ class Excel
// 垂直居中
$objPHPExcel->getActiveSheet()->getStyle($v)->getAlignment()->setVertical(\PHPExcel_Style_Alignment::VERTICAL_CENTER);
}
foreach($list as $k=>$v){
$k +=2;
foreach ($letter as $key=>$val){
... ...