perf: 修复一些问题

This commit is contained in:
Pang
2024-01-21 16:12:24 +08:00
parent c8b8cc578d
commit 8f4399dc2f
4 changed files with 9 additions and 5 deletions

View File

@@ -571,9 +571,9 @@ class UsersController extends AbstractController
$list->transform(function (User $userInfo) use ($user, $state) {
$tags = [];
$dep = $userInfo->getDepartmentName();
$dep = array_filter(explode(",", $dep), function($item) {
$dep = array_values(array_filter(explode(",", $dep), function($item) {
return preg_match("/\(M\)$/", $item);
});
}));
if ($dep) {
$tags[] = preg_replace("/\(M\)$/", "", trim($dep[0])) . Doo::translate("负责人");
}