|
@@ -25,6 +25,7 @@ use think\admin\service\AdminService;
|
|
|
use think\db\exception\DataNotFoundException;
|
|
|
use think\db\exception\DbException;
|
|
|
use think\db\exception\ModelNotFoundException;
|
|
|
+use think\model\Relation;
|
|
|
|
|
|
/**
|
|
|
* 系统用户管理
|
|
@@ -44,7 +45,11 @@ class User extends Controller
|
|
|
public function index()
|
|
|
{
|
|
|
$this->type = input('get.type', 'index');
|
|
|
- $this->_query(SystemUser::class)->layTable(function () {
|
|
|
+ $this->_query(SystemUser::mk()->with([
|
|
|
+ 'userinfo' => function (Relation $relation) {
|
|
|
+ $relation->field('code,name,content');
|
|
|
+ },
|
|
|
+ ]))->layTable(function () {
|
|
|
$this->title = '系统用户管理';
|
|
|
$this->bases = SystemBase::mk()->items('身份权限');
|
|
|
}, function (QueryHelper $query) {
|
|
@@ -61,15 +66,6 @@ class User extends Controller
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 数据列表处理
|
|
|
- * @param array $data
|
|
|
- */
|
|
|
- protected function _page_filter(array &$data)
|
|
|
- {
|
|
|
- SystemBase::mk()->items('身份权限', $data, 'usertype', 'userinfo');
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* 添加系统用户
|
|
|
* @auth true
|
|
|
* @throws DataNotFoundException
|