作者 景龙
1 个管道 的构建 通过 耗费 1 秒

修改导出图片

... ... @@ -114,7 +114,7 @@ class AdminCheckController extends AdminBaseController
$adminCommon = new AdminCommonController();
$adminExcel = new AdminExcelDataController();
$res_ins = $adminCommon->exportCheckList('check',$param,'t.*');
$res_ins = $adminCommon->exportCheckList('check',$param,'t.*,p name project_name');
$arr_url = [];
$arr_time = [];
... ... @@ -125,7 +125,7 @@ class AdminCheckController extends AdminBaseController
$url = $adminExcel->checkExcelData($arr);
//按日导出
$arr_url[$key] = $url;
$arr_time[$key] = $arr['time'].'报表.xls';
$arr_time[$key] = $value['project_name'].'('.$arr['time'].')报表.xls';
}
$xlsName = '月检报表';
... ...
... ... @@ -123,7 +123,7 @@ class AdminExerciseController extends AdminBaseController
$adminCommon = new AdminCommonController();
$adminExcel = new AdminExcelDataController();
$res_ins = $adminCommon->exportCheckList('exercise',$param,'t.*');
$res_ins = $adminCommon->exportCheckList('exercise',$param,'t.*,p.name project_name');
$arr_url = [];
$arr_time = [];
... ... @@ -134,7 +134,7 @@ class AdminExerciseController extends AdminBaseController
$url = $adminExcel->trainExcelData($arr,'exercise');
//按日导出
$arr_url[$key] = $url;
$arr_time[$key] = $arr['time'].'报表.xls';
$arr_time[$key] = $value['project_name'].'('.$arr['time'].')报表.xls';
}
$xlsName = '演习报表';
... ...
... ... @@ -221,20 +221,23 @@ class AdminInspectAController extends AdminBaseController
$url = $adminExcel->inspectExcelData($arr);
$month = date('Y-m',$value['create_time']);
$year = date('Y',$value['create_time']);
//excel名称
$arr_table = $value['project_name'].'('.$arr['time'].')报表.xls';
if($mark == 'day'){
//按日导出
$arr_url[$key] = $url;
$arr_time[$key] = $arr['time'].'报表.xls';
$arr_time[$key] = $arr_table;
}else if($mark == 'month'){
//按月导出
$arr_url[$month][$key] = $url;
$arr_time[$month][$key] = $arr['time'].'报表.xls';
$arr_time[$month][$key] = $arr_table;
}else{
//按年导出
$arr_url[$year][$month][$key] = $url;
$arr_time[$year][$month][$key] = $arr['time'].'报表.xls';
$arr_time[$year][$month][$key] = $arr_table;
}
}
... ...
... ... @@ -166,20 +166,23 @@ class AdminInspectBController extends AdminBaseController
$url = $adminExcel->inspectExcelData($arr);
$month = date('Y-m',$value['create_time']);
$year = date('Y',$value['create_time']);
//excel名称
$arr_table = $value['project_name'].'('.$arr['time'].')报表.xls';
if($mark == 'day'){
//按日导出
$arr_url[$key] = $url;
$arr_time[$key] = $arr['time'].'报表.xls';
$arr_time[$key] = $arr_table;
}else if($mark == 'month'){
//按月导出
$arr_url[$month][$key] = $url;
$arr_time[$month][$key] = $arr['time'].'报表.xls';
$arr_time[$month][$key] = $arr_table;
}else{
//按年导出
$arr_url[$year][$month][$key] = $url;
$arr_time[$year][$month][$key] = $arr['time'].'报表.xls';
$arr_time[$year][$month][$key] = $arr_table;
}
}
... ...
... ... @@ -130,7 +130,7 @@ class AdminReformAController extends AdminBaseController
$adminCommon = new AdminCommonController();
$adminExcel = new AdminExcelDataController();
$res_ins = $adminCommon->exportRepairList('reform',$param,0,'r.*');
$res_ins = $adminCommon->exportRepairList('reform',$param,0,'r.*,p.name project_name');
$arr_url = [];
$arr_time = [];
... ... @@ -141,7 +141,7 @@ class AdminReformAController extends AdminBaseController
$url = $adminExcel->repairExcelData($arr,'reform',0);
//按日导出
$arr_url[$key] = $url;
$arr_time[$key] = $arr['time'].'报表.xls';
$arr_time[$key] = $value['project_name'].'('.$arr['time'].')报表.xls';
}
$xlsName = '甲方改造报表';
... ...
... ... @@ -130,7 +130,7 @@ class AdminReformBController extends AdminBaseController
$adminCommon = new AdminCommonController();
$adminExcel = new AdminExcelDataController();
$res_ins = $adminCommon->exportRepairList('reform',$param,1,'r.*');
$res_ins = $adminCommon->exportRepairList('reform',$param,1,'r.*,p.name project_name');
$arr_url = [];
$arr_time = [];
... ... @@ -141,7 +141,7 @@ class AdminReformBController extends AdminBaseController
$url = $adminExcel->repairExcelData($arr,'reform',1);
//按日导出
$arr_url[$key] = $url;
$arr_time[$key] = $arr['time'].'报表.xls';
$arr_time[$key] = $value['project_name'].'('.$arr['time'].')报表.xls';
}
$xlsName = '乙方改造报表';
... ...
... ... @@ -130,7 +130,7 @@ class AdminRepairAController extends AdminBaseController
$adminCommon = new AdminCommonController();
$adminExcel = new AdminExcelDataController();
$res_ins = $adminCommon->exportRepairList('repair',$param,0,'r.*');
$res_ins = $adminCommon->exportRepairList('repair',$param,0,'r.*,p.name project_name');
$arr_url = [];
$arr_time = [];
... ... @@ -141,7 +141,7 @@ class AdminRepairAController extends AdminBaseController
$url = $adminExcel->repairExcelData($arr,'repair',0);
//按日导出
$arr_url[$key] = $url;
$arr_time[$key] = $arr['time'].'报表.xls';
$arr_time[$key] = $value['project_name'].'('.$arr['time'].')报表.xls';
}
$xlsName = '甲方报修报表';
... ...
... ... @@ -130,7 +130,7 @@ class AdminRepairBController extends AdminBaseController
$adminCommon = new AdminCommonController();
$adminExcel = new AdminExcelDataController();
$res_ins = $adminCommon->exportRepairList('repair',$param,1,'r.*');
$res_ins = $adminCommon->exportRepairList('repair',$param,1,'r.*,p.name project_name');
$arr_url = [];
$arr_time = [];
... ... @@ -141,7 +141,7 @@ class AdminRepairBController extends AdminBaseController
$url = $adminExcel->repairExcelData($arr,'repair',1);
//按日导出
$arr_url[$key] = $url;
$arr_time[$key] = $arr['time'].'报表.xls';
$arr_time[$key] = $value['project_name'].'('.$arr['time'].')报表.xls';
}
$xlsName = '乙方报修报表';
... ...
... ... @@ -123,7 +123,7 @@ class AdminTrainController extends AdminBaseController
$adminCommon = new AdminCommonController();
$adminExcel = new AdminExcelDataController();
$res_ins = $adminCommon->exportCheckList('train',$param,'t.*');
$res_ins = $adminCommon->exportCheckList('train',$param,'t.*,p.name project_name');
$arr_url = [];
$arr_time = [];
... ... @@ -134,7 +134,7 @@ class AdminTrainController extends AdminBaseController
$url = $adminExcel->trainExcelData($arr,'train');
//按日导出
$arr_url[$key] = $url;
$arr_time[$key] = $arr['time'].'报表.xls';
$arr_time[$key] = $value['project_name'].'('.$arr['time'].')报表.xls';
}
$xlsName = '培训报表';
... ...