Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ac4c8093
authored
Dec 06, 2022
by
宁成龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复权限
parent
d5d11062
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
app/Admin/Forms/User/TransferUserHandle.php
app/Admin/Service/CmsUserService.php
app/Admin/Service/UserService.php
app/Models/Cms/CmsUser.php
app/Admin/Forms/User/TransferUserHandle.php
View file @
ac4c8093
...
...
@@ -32,7 +32,7 @@ class TransferUserHandle extends Form implements LazyRenderable
->
refresh
();
}
catch
(
\Throwable
$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
{
$this
->
disableResetButton
();
$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
();
}
/**
...
...
app/Admin/Service/CmsUserService.php
View file @
ac4c8093
...
...
@@ -9,16 +9,13 @@ class CmsUserService
/**
* 根据不同的部门权限以及部门id来获取员工列表
* getCmsUserListByDepartmentType
* @param $departmentType
* @param $departmentId
* @return array
* @author tioncico
* Time: 9:38 AM
*/
public
static
function
getCmsUserListByDepartmentType
(
$departmentType
,
$departmentId
)
public
static
function
getCmsUserListByDepartmentType
()
{
$res
=
CmsUser
::
pluck
(
'name'
,
'userId'
)
->
toArray
();
$res
=
CmsUser
::
getUserList
();
return
$res
;
}
...
...
app/Admin/Service/UserService.php
View file @
ac4c8093
...
...
@@ -34,7 +34,7 @@ class UserService
$filter
->
startWith
(
'name'
)
->
width
(
2
);
$filter
->
equal
(
'status'
)
->
select
(
admin_trans
(
'user.options.status'
))
->
width
(
2
);
$filter
->
equal
(
'sale_id'
,
trans
(
'user.fields.sale_name'
))
->
select
(
CmsUser
Service
::
getCmsUserListByDepartmentType
(
1
,
0
))
->
width
(
3
);
(
CmsUser
::
getUserList
(
))
->
width
(
3
);
$filter
->
equal
(
'reg_source'
)
->
select
(
admin_trans
(
'user.options.reg_source'
))
->
width
(
2
);
});
}
...
...
app/Models/Cms/CmsUser.php
View file @
ac4c8093
...
...
@@ -2,9 +2,10 @@
namespace
App\Models\Cms
;
use
App\Models\BaseModel
;
use
Illuminate\Database\Eloquent\Model
;
class
CmsUser
extends
Model
class
CmsUser
extends
Base
Model
{
protected
$connection
=
'cms'
;
protected
$table
=
'user_info'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment