修改排序
This commit is contained in:
parent
6977442b05
commit
13d3734dba
@ -38,7 +38,7 @@ class Department extends CatchModel
|
|||||||
return $this->withoutField(['department_name'])
|
return $this->withoutField(['department_name'])
|
||||||
->addFields(['department_name as title'])
|
->addFields(['department_name as title'])
|
||||||
->catchSearch()
|
->catchSearch()
|
||||||
->order()
|
->catchOrder()
|
||||||
->select()->toArray();
|
->select()->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,8 +44,7 @@ class Permissions extends CatchModel
|
|||||||
public function getList($isMenu = false)
|
public function getList($isMenu = false)
|
||||||
{
|
{
|
||||||
return $this->catchSearch()
|
return $this->catchSearch()
|
||||||
->order('sort', 'desc')
|
->catchOrder()
|
||||||
->order('id', 'desc')
|
|
||||||
->when($isMenu, function ($query){
|
->when($isMenu, function ($query){
|
||||||
$query->where('type', self::MENU_TYPE);
|
$query->where('type', self::MENU_TYPE);
|
||||||
})
|
})
|
||||||
@ -74,7 +73,7 @@ class Permissions extends CatchModel
|
|||||||
'route', 'icon', 'component', 'redirect',
|
'route', 'icon', 'component', 'redirect',
|
||||||
'keepalive as keepAlive', 'hide_children_in_menu', 'type', 'permission_mark', 'status'
|
'keepalive as keepAlive', 'hide_children_in_menu', 'type', 'permission_mark', 'status'
|
||||||
])
|
])
|
||||||
->order()
|
->catchOrder()
|
||||||
->select();
|
->select();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user