修改部门搜索

This commit is contained in:
wuyanwen 2020-01-13 21:39:42 +08:00
parent 64cd112d43
commit 5ba918f1a5

View File

@ -30,15 +30,13 @@ class Department extends CatchModel
* *
* @time 2020年01月09日 * @time 2020年01月09日
* @param $params * @param $params
* @return array
* @throws \think\db\exception\DbException * @throws \think\db\exception\DbException
*/ */
public function getList(): array public function getList(): array
{ {
return $this->field([ return $this->withoutField(['department_name'])
'id', ->addFields(['department_name as title'])
'department_name as title', 'parent_id', 'principal', 'mobile', 'email', 'creator_id', 'status', 'sort',
'created_at', 'updated_at'
])
->catchSearch() ->catchSearch()
->select()->toArray(); ->select()->toArray();
} }