角色站位调整

main
limu 11 months ago
parent 0c5afe6524
commit f2a5f5bece
  1. 7
      app/common/repositories/user/UserPartnerRepository.php

@ -73,17 +73,16 @@ class UserPartnerRepository extends BaseRepository
public function changePartnerForm($uid)
{
/** @var UserLabelRepository $make */
$list = $this->dao->getAll($uid)->column('partner_id') ?? [];
$list = UserPartner::getDB()->where('uid',$uid)->column('id') ?? [];
$data = ['partner_id' => $list, 'uid' => $uid];
$url = 'sys/user/partner/' . $uid;
$res = Elm::createForm($url, [
Elm::input('uid', '用户 ID', '')->disabled(true)->required(true),
Elm::selectMultiple('partner_id', '用户合作人角色')->options(function () {
$partnerForm = new PartnerDao();
$data = $partnerForm->getAll();
$data = UserPartner::getDB()->select()->toArray();
foreach ($data as $value => $label) {
$name = (string)$label['id'];
$value = $label['name'];
$value = $label['partner_name'];
$options[] = compact('value', 'name');
}
return $options;

Loading…
Cancel
Save