Commit bf1f5353 by 赵增煜

增加sheetname打印

parent e450280d
...@@ -32,10 +32,10 @@ public function handle(array $input): JsonResponse ...@@ -32,10 +32,10 @@ public function handle(array $input): JsonResponse
$filePath = storage_path('app/'.$file); $filePath = storage_path('app/'.$file);
// Log::info("====>".$filePath); // Log::info("====>".$filePath);
try { try {
$excel = Excel::import($filePath)->toArray(); # $excel = Excel::import($filePath)->toArray();
// Get the sheet names from the file // Get the sheet names from the file
$sheetNames = $excel[0]->getSheetNames(); # $sheetNames = $excel[0]->getSheetNames();
Log::info("====>".$sheetNames."====>".json_encode($excel)); # Log::info("====>".$sheetNames."====>".json_encode($excel));
// 每100行数据为一批数据进行读取 // 每100行数据为一批数据进行读取
$chunkSize = 10; $chunkSize = 10;
$successNum = 0; $successNum = 0;
...@@ -118,7 +118,7 @@ public function form() ...@@ -118,7 +118,7 @@ public function form()
->required() ->required()
->help("导入要求:<br /> ->help("导入要求:<br />
<span style='color:red;'> <span style='color:red;'>
1、仅支持xlsx两种格式 1、仅支持xlsx格式
</span>"); </span>");
// $downloadUrl = admin_url('dosage-template'); // $downloadUrl = admin_url('dosage-template');
// $this->html("<a target='_blank' href='{$downloadUrl}'>下载用法用量导入模板</a>"); // $this->html("<a target='_blank' href='{$downloadUrl}'>下载用法用量导入模板</a>");
......
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 sign in to comment