Merge branch 'xadmin' of gitee.com:dlbz/student_achievement_statistics

This commit is contained in:
小松树 committed 2019-03-27 13:52:46 +08:00
commit 19935e24aa
1355 files changed
+10958 -300172

No files matched your search

@@ -223,4 +223,6 @@ class AuthRule extends Base
// 返回信息
return json($data);
}
}
+1
View File
@@ -21,6 +21,7 @@ class Index extends Base
$list['title'] = '管理员列表';
$list['count'] = $count;
// 模板赋值
$this->assign('list',$list);
+44 -28
View File
@@ -8,45 +8,61 @@ use app\common\model\Base;
class AuthRule extends Base
{
// 顶级权限列表
public function getRule($pid = 0)
// 父级菜单数据模型关联
public function authPid()
{
return $this
->where('pid',$pid)
->where('status',1)
->field('id,title')
->order(['paixu'])
->select();
return $this->belongsTo('AuthRule','pid','id');
}
// 是否是菜单获取器
public function getIsmenuAttr($value)
{
$arr = array('0'=>'否','1'=>'是');
return $arr[$value];
// 子菜单数据模型关联
public function authCid()
{
return $this->hasMany('AuthRule','pid','id');
}
// 父级菜单名获取器
public function getPidAttr($value)
{
return $this->where('id',$value)->value('title');
}
// // 顶级权限列表
// public function getRule($pid = 0)
// {
// return $this
// ->where('pid',$pid)
// ->where('status',1)
// ->field('id,title')
// ->order(['paixu'])
// ->select();
// }
// 获取二级菜单
public function getMymenuAttr($value)
{
return $this
->where('pid',$this->getAttr('id'))
->where('status&ismenu',1)
->field('title,url,name')
->order(['paixu'])
->select();
}
// // 是否是菜单获取器
// public function getIsmenuAttr($value)
// {
// $arr = array('0'=>'否','1'=>'是');
// return $arr[$value];
// }
// // 父级菜单名获取器
// public function getPidAttr($value)
// {
// return $this->where('id',$value)->value('title');
// }
// // 获取二级菜单
// public function getMymenuAttr($value)
// {
// return $this
// ->where('pid',$this->getAttr('id'))
// ->where('status&ismenu',1)
// ->field('title,url,name')
// ->order(['paixu'])
// ->select();
// }
Loaded 3 of 1355 files, more files were not shown because too many files have changed in this diff. Show more