|
@@ -36,6 +36,24 @@ class AccountController extends AdminController
|
|
|
|
|
|
$grid->disableViewButton();
|
|
$grid->disableViewButton();
|
|
|
|
|
|
|
|
+ $grid->export()
|
|
|
|
+ ->titles([
|
|
|
|
+ 'user_name' => '用户名',
|
|
|
|
+ 'type_text' => '用户类型',
|
|
|
|
+ 'account' => '账号',
|
|
|
|
+ 'status_text' => '状态',
|
|
|
|
+ 'remark' => '备注',
|
|
|
|
+ 'created_at' => '添加时间',
|
|
|
|
+ ])->rows(function ($rows){
|
|
|
|
+ foreach ($rows as &$row) {
|
|
|
|
+ $row['type_text']= config('global.user_type')[$row['type']];
|
|
|
|
+ $row['status_text'] = config('global.user_status')[$row['status']];
|
|
|
|
+ }
|
|
|
|
+ return $rows;
|
|
|
|
+ })
|
|
|
|
+ ->xlsx()
|
|
|
|
+ ->disableExportSelectedRow();
|
|
|
|
+
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|