Commit 7f9a4c95 by wenyi.chen

增加指标完整页面

parent a86ffc53
...@@ -101,8 +101,18 @@ class ExcelFile extends BaseController ...@@ -101,8 +101,18 @@ class ExcelFile extends BaseController
$arr['remark'] = $value[$current]; $arr['remark'] = $value[$current];
$current++; $current++;
// 文件路径 // 文件路径
if($value[$current]){
$str = [];
$ex = explode(",",$value[$current]);
foreach ($ex as $va){
array_push($str,config("config.resource_address").'/public/storage/import_pdf/'.$va);
}
$arr['fileListPdf'] = implode(',',$str);
}else{
$arr['fileListPdf'] = $value[$current]; $arr['fileListPdf'] = $value[$current];
}
$current++; $current++;
// 文件名称 // 文件名称
$arr['file_name'] = $value[$current]; $arr['file_name'] = $value[$current];
...@@ -356,6 +366,8 @@ class ExcelFile extends BaseController ...@@ -356,6 +366,8 @@ class ExcelFile extends BaseController
'refer_type'=>$value['refer_type'], 'refer_type'=>$value['refer_type'],
'remark'=>$value['remark'], 'remark'=>$value['remark'],
'imgPath'=>$value['imgPath'], 'imgPath'=>$value['imgPath'],
'fileListPdf'=>$value['fileListPdf'],
'file_name'=>$value['file_name'],
]; ];
$norm_collects_id = Db::name('norm_collects')->insertGetId($arr); $norm_collects_id = Db::name('norm_collects')->insertGetId($arr);
if(empty($norm_collects_id)){ if(empty($norm_collects_id)){
...@@ -567,7 +579,7 @@ class ExcelFile extends BaseController ...@@ -567,7 +579,7 @@ class ExcelFile extends BaseController
} }
// 保存 ExcelFile 文件 // 保存 ExcelFile 文件
$writer = new Xlsx($spreadsheet); $writer = new Xlsx($spreadsheet);
$name = 'xlsx/'.$task['name'].'_'.date('YmdHis').'.xlsx'; $name = 'storage/xlsx/'.$task['name'].'_'.date('YmdHis').'.xlsx';
$writer->save($name); $writer->save($name);
// header('Content-Type: application/vnd.ms-excel'); // header('Content-Type: application/vnd.ms-excel');
...@@ -721,7 +733,7 @@ class ExcelFile extends BaseController ...@@ -721,7 +733,7 @@ class ExcelFile extends BaseController
} }
// 保存 ExcelFile 文件 // 保存 ExcelFile 文件
$writer = new Xlsx($spreadsheet); $writer = new Xlsx($spreadsheet);
$name = 'xlsx/'.$norm['name'].'_'.date('YmdHis').'.xlsx'; $name = 'storage/xlsx/'.$norm['name'].'_'.date('YmdHis').'.xlsx';
$writer->save($name); $writer->save($name);
return returnResult(config("config.code.success"),config("config.describe.success"),config("config.resource_address").'public/'.$name); return returnResult(config("config.code.success"),config("config.describe.success"),config("config.resource_address").'public/'.$name);
}else{ }else{
...@@ -869,7 +881,7 @@ class ExcelFile extends BaseController ...@@ -869,7 +881,7 @@ class ExcelFile extends BaseController
} }
// 保存 ExcelFile 文件 // 保存 ExcelFile 文件
$writer = new Xlsx($spreadsheet); $writer = new Xlsx($spreadsheet);
$name = 'xlsx/多选子任务导出_'.date('YmdHis').'.xlsx'; $name = 'storage/xlsx/多选子任务导出_'.date('YmdHis').'.xlsx';
$writer->save($name); $writer->save($name);
// header('Content-Type: application/vnd.ms-excel'); // header('Content-Type: application/vnd.ms-excel');
......
...@@ -215,7 +215,7 @@ class Norm ...@@ -215,7 +215,7 @@ class Norm
} }
/** /**
* 返回指标详情 * 返回指标详情V1版本
* @return \josn * @return \josn
*/ */
public function detail() public function detail()
...@@ -241,7 +241,6 @@ class Norm ...@@ -241,7 +241,6 @@ class Norm
$data['receivesList'] = $NormReceivesBus->getConditionalQueryAll(['norm_id'=>$id]); $data['receivesList'] = $NormReceivesBus->getConditionalQueryAll(['norm_id'=>$id]);
}else{ }else{
$list= $NormReceivesBus->getConditionalQueryAllPaging(['norm_id'=>$id],$page,$limit); $list= $NormReceivesBus->getConditionalQueryAllPaging(['norm_id'=>$id],$page,$limit);
// var_dump($list);
$data['receivesList'] = $list['data']; $data['receivesList'] = $list['data'];
$data['total'] = $list['total']; $data['total'] = $list['total'];
} }
...@@ -287,7 +286,7 @@ class Norm ...@@ -287,7 +286,7 @@ class Norm
* 返回指标完整详情信息 * 返回指标完整详情信息
* @return \josn * @return \josn
*/ */
public function whole() public function wholeDetail()
{ {
$id = input("param.id"); $id = input("param.id");
$page = input("param.page")?input("param.page"):-1; $page = input("param.page")?input("param.page"):-1;
...@@ -310,7 +309,6 @@ class Norm ...@@ -310,7 +309,6 @@ class Norm
$data['receivesList'] = $NormReceivesBus->getConditionalQueryAll(['norm_id'=>$id]); $data['receivesList'] = $NormReceivesBus->getConditionalQueryAll(['norm_id'=>$id]);
}else{ }else{
$list= $NormReceivesBus->getConditionalQueryAllPaging(['norm_id'=>$id],$page,$limit); $list= $NormReceivesBus->getConditionalQueryAllPaging(['norm_id'=>$id],$page,$limit);
// var_dump($list);
$data['receivesList'] = $list['data']; $data['receivesList'] = $list['data'];
$data['total'] = $list['total']; $data['total'] = $list['total'];
} }
...@@ -353,14 +351,14 @@ class Norm ...@@ -353,14 +351,14 @@ class Norm
} }
/** /**
* 返回指标详情 * 返回指标部分信息
* @return \josn * @return \josn
*/ */
public function detail1() public function partDetail()
{ {
$id = input("param.id"); $id = input("param.id");
if(empty($id)){ if(empty($id)){
return returnResult(config("config.code.error"),'填写信息错误,请检查!'); return returnResult(config("config.code.error"),'ID错误,请检查!');
} }
$normBus = new CommonBus('NormBus'); // 通过公共业务初始化指标类 $normBus = new CommonBus('NormBus'); // 通过公共业务初始化指标类
$data = []; $data = [];
...@@ -371,43 +369,12 @@ class Norm ...@@ -371,43 +369,12 @@ class Norm
$normExtendBus = new CommonBus('NormExtendBus'); $normExtendBus = new CommonBus('NormExtendBus');
$res = $normExtendBus->getConditionalQueryAll(['norm_id'=>$id]); $res = $normExtendBus->getConditionalQueryAll(['norm_id'=>$id]);
$data['custom']=$res; $data['custom']=$res;
// 领取信息
$NormReceivesBus = new CommonBus('NormReceivesBus'); // 通过公共业务初始化指标类
$data['receivesList'] = $NormReceivesBus->getConditionalQueryAll(['norm_id'=>$id]);
if (!empty($data['receivesList'])){
foreach ($data['receivesList'] as $index => $vlues){
$TaskPackageBus = new CommonBus('TaskPackageBus'); // 通过公共业务初始化指标类
$data['receivesList'][$index]['task_info'] = $TaskPackageBus->getConditionalQuery(['id'=>$vlues['task_id']]);
$NormListBus = new CommonBus('NormListBus'); // 通过公共业务初始化指标类
$data['receivesList'][$index]['norm_list_info'] = $NormListBus->getConditionalQuery(['id'=>$vlues['norm_list_id']]);
$NormListExtendBus = new CommonBus('NormListExtendBus'); // 通过公共业务初始化指标类
$data['receivesList'][$index]['norm_list_extend'] = $NormListExtendBus->getConditionalQueryAll(['norm_list_id'=>$vlues['norm_list_id']]);
$NormCollectsBus = new CommonBus('NormCollectsBus'); // 通过公共业务初始化指标类
$collectsInfo = $NormCollectsBus->getConditionalQuery(['norm_receive_id'=>$vlues['id']]);
if ($collectsInfo){
$NormCollectsExtendBus = new CommonBus('NormCollectsExtendBus'); // 通过公共业务初始化指标类
$normCollectsExtend = $NormCollectsExtendBus->getConditionalQueryAll(['norm_collects_id'=>$collectsInfo['id']]);
$data['receivesList'][$index]['refer_type'] = $collectsInfo['refer_type'];
$data['receivesList'][$index]['remark'] = $collectsInfo['remark'];
$data['receivesList'][$index]['imgPath'] = $collectsInfo['imgPath'];
$data['receivesList'][$index]['normCollectsExtend'] = $normCollectsExtend;
}else{
$normExtendBus = new CommonBus('NormExtendBus');
$res = $normExtendBus->getConditionalQueryAll(['norm_id'=>$id,'user_filled'=>1]);
$data['receivesList'][$index]['refer_type'] = '';
$data['receivesList'][$index]['remark'] = '';
$data['receivesList'][$index]['imgPath'] = '';
$data['receivesList'][$index]['normCollectsExtend'] =$res;
}
}
}
if($data){ if($data){
return returnResult(config("config.code.success"),config("config.describe.success"),$data); return returnResult(config("config.code.success"),config("config.describe.success"),$data);
}else{ }else{
return returnResult(config("config.code.success"),config("config.describe.null_data"),[]); return returnResult(config("config.code.success"),config("config.describe.null_data"),[]);
} }
} }
/** /**
* 修改指标信息 * 修改指标信息
* @return \josn|void\ * @return \josn|void\
......
...@@ -61,7 +61,8 @@ Route::rule("taskPackage/delete","TaskPackage/delete"); // 删除任务列表 ...@@ -61,7 +61,8 @@ Route::rule("taskPackage/delete","TaskPackage/delete"); // 删除任务列表
Route::rule("norm/add","Norm/add"); // 新增指标 Route::rule("norm/add","Norm/add"); // 新增指标
Route::rule("norm/list","Norm/list"); // 指标列表 Route::rule("norm/list","Norm/list"); // 指标列表
Route::rule("norm/detail","Norm/detail"); // 指标详情 Route::rule("norm/detail","Norm/detail"); // 指标详情
Route::rule("norm/whole","Norm/whole"); // 指标完整详情信息 Route::rule("norm/whole","Norm/wholeDetail"); // 指标完整详情信息
Route::rule("norm/partDetail","Norm/partDetail"); // 部分详情信息
Route::rule("norm/edit","Norm/edit"); // 指标详情 Route::rule("norm/edit","Norm/edit"); // 指标详情
Route::rule("norm/finalData","Norm/finalData"); // 返回最后的ID Route::rule("norm/finalData","Norm/finalData"); // 返回最后的ID
Route::rule("norm/delete","Norm/delete"); // 删除详情 Route::rule("norm/delete","Norm/delete"); // 删除详情
......
...@@ -12,7 +12,7 @@ return [ ...@@ -12,7 +12,7 @@ return [
"success" => "ok", "success" => "ok",
"error" => "系统內部错误!", "error" => "系统內部错误!",
"server_failure" => "服务器故障!", "server_failure" => "服务器故障!",
"interface_error" => "请求方式或接口错误,请检查!", "interface_error" => "请检查请求方式、接口名称、资源名称是否正确!",
"format_error" => "数据格式错误!", "format_error" => "数据格式错误!",
"request_error" => "请求错误!", "request_error" => "请求错误!",
"server_error" => "服务器错误!", "server_error" => "服务器错误!",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment