| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 | 
							- <?php
 
- namespace App\Admin\Exports\Caiqing;
 
- use App\Admin\Exports\RowExport;
 
- use Illuminate\Support\Collection;
 
- class OverallExport extends RowExport
 
- {
 
-     public $name = '';
 
-     function __construct($name)
 
-     {
 
-         $this->name = $name;
 
-     }
 
-     /**
 
-      * 设置标题,返回标题数组
 
-      * @return array
 
-      */
 
-     public function headings(): array
 
-     {
 
-         return [
 
-             '时间',
 
-             '需求人数(人)',
 
-             '求职人数(人)',
 
-             '求人倍率'
 
-         ];
 
-     }
 
-     /**
 
-      * 处理行数据
 
-      * @param Model $row
 
-      * @return array
 
-      */
 
-     public function map($row): array
 
-     {
 
-         $result['date_time'] = $row['date_time'];
 
-         $result['job_num'] = $row['job_num'];
 
-         $result['resume_num'] = $row['resume_num'];
 
-         $result['multiple'] = $row['multiple'];
 
-         return $result;
 
-     }
 
-     /**
 
-      * 设置文件名
 
-      * @return string
 
-      */
 
-     public function getFilename(): string
 
-     {
 
-         return $this->name.".xlsx";
 
-     }
 
-     /**
 
-      * 格式化指定列.
 
-      * 只有在需要的时候设置,例如在身份证不要显示科学计数时设定列格式:['A'=>NumberFormat::FORMAT_NUMBER]
 
-      * @return array
 
-      */
 
-     public function columnFormats(): array
 
-     {
 
-         return [
 
-         ];
 
-     }
 
- }
 
 
  |