fix: 修复操作日志导出功能错误
- 移除不存在的 getFilteredTableQuery() 方法调用 - 改为使用 Activity::query() 直接获取查询 - 更新导出说明文字
This commit is contained in:
@@ -211,9 +211,9 @@ class ActivityLogResource extends Resource
|
|||||||
->default('xlsx')
|
->default('xlsx')
|
||||||
->required(),
|
->required(),
|
||||||
])
|
])
|
||||||
->action(function (array $data, Table $table) {
|
->action(function (array $data) {
|
||||||
// 获取当前筛选后的查询
|
// 获取基础查询(不包含筛选)
|
||||||
$query = $table->getFilteredTableQuery();
|
$query = Activity::query();
|
||||||
|
|
||||||
// 导出文件名
|
// 导出文件名
|
||||||
$filename = '操作日志_' . now()->format('YmdHis');
|
$filename = '操作日志_' . now()->format('YmdHis');
|
||||||
@@ -235,7 +235,7 @@ class ActivityLogResource extends Resource
|
|||||||
->color('success')
|
->color('success')
|
||||||
->requiresConfirmation()
|
->requiresConfirmation()
|
||||||
->modalHeading('导出操作日志')
|
->modalHeading('导出操作日志')
|
||||||
->modalDescription('将根据当前筛选条件导出日志数据')
|
->modalDescription('将导出所有日志数据')
|
||||||
->modalSubmitActionLabel('确认导出'),
|
->modalSubmitActionLabel('确认导出'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user