修复岗位错误
This commit is contained in:
+4
-4
@@ -8,11 +8,11 @@ use Gdoo\Model\Grid;
|
||||
use Gdoo\Model\Form;
|
||||
|
||||
use Gdoo\User\Models\User;
|
||||
use Gdoo\User\Models\UserPosition;
|
||||
use Gdoo\User\Models\UserPost;
|
||||
|
||||
use Gdoo\Index\Controllers\DefaultController;
|
||||
|
||||
class PositionController extends DefaultController
|
||||
class PostController extends DefaultController
|
||||
{
|
||||
public $permission = ['dialog'];
|
||||
|
||||
@@ -21,7 +21,7 @@ class PositionController extends DefaultController
|
||||
$header = Grid::header([
|
||||
'code' => 'user_post',
|
||||
'referer' => 1,
|
||||
'search' => ['tab' => 'position'],
|
||||
'search' => ['tab' => 'post'],
|
||||
'trash_btn' => 0,
|
||||
]);
|
||||
|
||||
@@ -89,7 +89,7 @@ class PositionController extends DefaultController
|
||||
]);
|
||||
|
||||
if (Request::method() == 'POST') {
|
||||
$model = UserPosition::orderBy('sort', 'asc');
|
||||
$model = UserPost::orderBy('sort', 'asc');
|
||||
foreach ($search['where'] as $where) {
|
||||
if ($where['active']) {
|
||||
$model->search($where);
|
||||
@@ -13,7 +13,7 @@ use App\Support\Pinyin;
|
||||
use App\Support\License;
|
||||
|
||||
use Gdoo\Hr\Models\Hr;
|
||||
use Gdoo\User\Models\UserPosition;
|
||||
use Gdoo\User\Models\UserPost;
|
||||
use Gdoo\User\Models\User;
|
||||
|
||||
use Gdoo\Index\Controllers\DefaultController;
|
||||
|
||||
@@ -26,7 +26,7 @@ class User extends BaseModel implements
|
||||
['value' => 'role', 'type' => 'a', 'url' => 'user/role/index', 'name' => '角色'],
|
||||
['value' => 'department', 'type' => 'a', 'url' => 'user/department/index', 'name' => '部门'],
|
||||
['value' => 'group', 'type' => 'a', 'url' => 'user/group/index', 'name' => '用户组'],
|
||||
['value' => 'position', 'type' => 'a', 'url' => 'user/position/index', 'name' => '岗位'],
|
||||
['value' => 'post', 'type' => 'a', 'url' => 'user/post/index', 'name' => '岗位'],
|
||||
]
|
||||
];
|
||||
|
||||
@@ -80,9 +80,9 @@ class User extends BaseModel implements
|
||||
return $this->hasOne('Gdoo\Hr\Models\Hr');
|
||||
}
|
||||
|
||||
public function position()
|
||||
public function post()
|
||||
{
|
||||
return $this->belongsTo('Gdoo\User\Models\UserPosition', 'post');
|
||||
return $this->belongsTo('Gdoo\User\Models\UserPost', 'post');
|
||||
}
|
||||
|
||||
public function tasks()
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
use Gdoo\Index\Models\BaseModel;
|
||||
|
||||
class UserPosition extends BaseModel
|
||||
class UserPost extends BaseModel
|
||||
{
|
||||
protected $table = 'user_post';
|
||||
|
||||
public static $tabs = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['value' => 'position.index', 'url' => 'user/position/index', 'name' => '职位列表'],
|
||||
['value' => 'post.index', 'url' => 'user/post/index', 'name' => '职位列表'],
|
||||
]
|
||||
];
|
||||
|
||||
@@ -19,10 +19,10 @@ return [
|
||||
'model' => 'Gdoo\User\Models\Role::Dialog',
|
||||
'url' => 'user/role/dialog',
|
||||
],
|
||||
'position' => [
|
||||
'post' => [
|
||||
'name' => '岗位',
|
||||
'model' => 'Gdoo\User\Models\UserPosition::Dialog',
|
||||
'url' => 'user/position/dialog',
|
||||
'model' => 'Gdoo\User\Models\UserPost::Dialog',
|
||||
'url' => 'user/post/dialog',
|
||||
],
|
||||
'user' => [
|
||||
'name' => '用户',
|
||||
@@ -126,7 +126,7 @@ return [
|
||||
]
|
||||
]
|
||||
],
|
||||
"position" => [
|
||||
"post" => [
|
||||
"name" => "用户职位",
|
||||
"actions" => [
|
||||
"index" => [
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
<form class="form-horizontal form-controller" method="post" id="user_position" name="user_position">
|
||||
<form class="form-horizontal form-controller" method="post" id="user_post" name="user_post">
|
||||
{{$form['tpl']}}
|
||||
</form>
|
||||
Reference in New Issue
Block a user