|
|
@ -6,6 +6,7 @@ use App\Admin\Actions\Form\Follow\EditEnrollStatusForm; |
|
|
|
use App\Admin\Actions\Form\Follow\FollowRecordForm; |
|
|
|
use App\Admin\Actions\Form\Follow\FollowRecordForm; |
|
|
|
use App\Models\AdminFollowShow; |
|
|
|
use App\Models\AdminFollowShow; |
|
|
|
use App\Models\AdmissionNewStudents; |
|
|
|
use App\Models\AdmissionNewStudents; |
|
|
|
|
|
|
|
use App\Models\DcatAdminUsers; |
|
|
|
use App\Models\SecondaryCollege; |
|
|
|
use App\Models\SecondaryCollege; |
|
|
|
use App\Models\Speciality; |
|
|
|
use App\Models\Speciality; |
|
|
|
use App\Models\UserFollowRecord; |
|
|
|
use App\Models\UserFollowRecord; |
|
|
@ -76,13 +77,16 @@ class UserFollowRecordController extends AdminController |
|
|
|
$grid->column('followRecordHasOne.follow_id', "回访状态")->display(function ($val) { |
|
|
|
$grid->column('followRecordHasOne.follow_id', "回访状态")->display(function ($val) { |
|
|
|
return (int)$val; |
|
|
|
return (int)$val; |
|
|
|
})->using($followList)->expand(function () use ($followList) { |
|
|
|
})->using($followList)->expand(function () use ($followList) { |
|
|
|
$titles = ['ID', '回访状态', '回访状态', '回访时间', '用户ID']; |
|
|
|
$titles = ['ID', '回访状态', '回访状态', '回访时间', '用户ID', '用户名', '用户昵称']; |
|
|
|
$data = UserFollowRecord::query() |
|
|
|
$data = UserFollowRecord::query() |
|
|
|
->where(['unique_number' => $this['unique_number']]) |
|
|
|
->where(['unique_number' => $this['unique_number']]) |
|
|
|
->orderByDesc('id') |
|
|
|
->orderByDesc('id') |
|
|
|
->get(['id', 'follow_id', 'theme', 'follow_time', 'user_id']) |
|
|
|
->get(['id', 'follow_id', 'theme', 'follow_time', 'user_id']) |
|
|
|
->map(function ($val) use ($followList) { |
|
|
|
->map(function ($val) use ($followList) { |
|
|
|
$val->follow_id = $followList[$val->follow_id] ?? ''; |
|
|
|
$val->follow_id = $followList[$val->follow_id] ?? ''; |
|
|
|
|
|
|
|
$info = DcatAdminUsers::query()->find($val->user_id); |
|
|
|
|
|
|
|
$val->username = $info['username']??''; |
|
|
|
|
|
|
|
$val->name = $info['name']??''; |
|
|
|
return $val; |
|
|
|
return $val; |
|
|
|
}) |
|
|
|
}) |
|
|
|
->toArray(); |
|
|
|
->toArray(); |
|
|
|