Commit ac4c8093 by 宁成龙

修复权限

parent d5d11062
...@@ -32,7 +32,7 @@ class TransferUserHandle extends Form implements LazyRenderable ...@@ -32,7 +32,7 @@ class TransferUserHandle extends Form implements LazyRenderable
->refresh(); ->refresh();
} catch (\Throwable $throwable) { } catch (\Throwable $throwable) {
// var_dump((string)$throwable); // var_dump((string)$throwable);
return $this->response()->error(trans('admin.update_failed').": {$throwable->getMessage()}"); return $this->response()->error(trans('admin.update_failed') . ": {$throwable->getMessage()}");
} }
} }
...@@ -43,7 +43,7 @@ class TransferUserHandle extends Form implements LazyRenderable ...@@ -43,7 +43,7 @@ class TransferUserHandle extends Form implements LazyRenderable
{ {
$this->disableResetButton(); $this->disableResetButton();
$this->hidden('id')->attribute('id', 'id'); $this->hidden('id')->attribute('id', 'id');
$this->select('sale_id')->options(CmsUser::pluck('name', 'userId')->toArray())->default(0)->required(); $this->select('sale_id')->options(CmsUser::getUserList())->default(0)->required();
} }
/** /**
......
...@@ -9,16 +9,13 @@ class CmsUserService ...@@ -9,16 +9,13 @@ class CmsUserService
/** /**
* 根据不同的部门权限以及部门id来获取员工列表 * 根据不同的部门权限以及部门id来获取员工列表
* getCmsUserListByDepartmentType * getCmsUserListByDepartmentType
* @param $departmentType
* @param $departmentId
* @return array * @return array
* @author tioncico * @author tioncico
* Time: 9:38 AM * Time: 9:38 AM
*/ */
public static function getCmsUserListByDepartmentType($departmentType,$departmentId) public static function getCmsUserListByDepartmentType()
{ {
$res = CmsUser::pluck('name', 'userId') $res = CmsUser::getUserList();
->toArray();
return $res; return $res;
} }
......
...@@ -34,7 +34,7 @@ class UserService ...@@ -34,7 +34,7 @@ class UserService
$filter->startWith('name')->width(2); $filter->startWith('name')->width(2);
$filter->equal('status')->select(admin_trans('user.options.status'))->width(2); $filter->equal('status')->select(admin_trans('user.options.status'))->width(2);
$filter->equal('sale_id', trans('user.fields.sale_name'))->select $filter->equal('sale_id', trans('user.fields.sale_name'))->select
(CmsUserService::getCmsUserListByDepartmentType(1, 0))->width(3); (CmsUser::getUserList())->width(3);
$filter->equal('reg_source')->select(admin_trans('user.options.reg_source'))->width(2); $filter->equal('reg_source')->select(admin_trans('user.options.reg_source'))->width(2);
}); });
} }
......
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
namespace App\Models\Cms; namespace App\Models\Cms;
use App\Models\BaseModel;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
class CmsUser extends Model class CmsUser extends BaseModel
{ {
protected $connection = 'cms'; protected $connection = 'cms';
protected $table = 'user_info'; protected $table = 'user_info';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment