管理员列表
This commit is contained in:
1 parent
781c5f891d
commit
cd9616d13a
2 files changed
+13
-7
No files matched your search
@@ -17,7 +17,7 @@ class Admin extends Base
|
||||
$data = $this
|
||||
->order([$src['field'] =>$src['order']])
|
||||
->when(strlen($searchval)>0,function($query) use($searchval){
|
||||
$query->where('xingming','like','%'.$searchval.'%');
|
||||
$query->where('xingming|username','like','%'.$searchval.'%');
|
||||
})
|
||||
->with([
|
||||
'adSchool'=>function($query){
|
||||
@@ -83,6 +83,12 @@ class Admin extends Base
|
||||
return date('Y年m月d日 h:i:s',$value);
|
||||
}
|
||||
|
||||
// 本次登录时间取器
|
||||
public function getThistimeAttr($value)
|
||||
{
|
||||
return date('Y年m月d日 h:i:s',$value);
|
||||
}
|
||||
|
||||
|
||||
// 角色关联
|
||||
public function authGroup()
|
||||
|
||||
@@ -94,8 +94,8 @@ layui.use(['table','laypage','form','cjgl'], function(){
|
||||
}},
|
||||
{field: 'phone', title: '联系电话', sort: true},
|
||||
{field: 'denglucishu', title: '登录次数', sort: true},
|
||||
{field: 'lasttime', title: '最后登录时间', sort: true},
|
||||
{field: 'lastip', title: '最后登录地址', sort: true},
|
||||
{field: 'thistime', title: '最后登录时间', sort: true},
|
||||
{field: 'ip', title: '最后登录地址', sort: true},
|
||||
{field: 'status', title: '状态',templet:'#status', sort: true},
|
||||
{field: 'id', title: '操作',toolbar: '#barDemo',minWidth:140}
|
||||
]],
|
||||
@@ -133,10 +133,10 @@ layui.use(['table','laypage','form','cjgl'], function(){
|
||||
switch(obj.event){
|
||||
case 'dels':
|
||||
var checkStatus = table.checkStatus('mytable'); //idmytable 即为基础参数 id 对应的值
|
||||
cjgl.delAll(checkStatus,'/school','mytable');
|
||||
cjgl.delAll(checkStatus,'/admin','mytable');
|
||||
break;
|
||||
case 'add':
|
||||
cjgl.add('添加单位','/school/create','650','500');
|
||||
cjgl.add('添加管理员','/admin/create','650','500');
|
||||
break;
|
||||
};
|
||||
});
|
||||
@@ -153,10 +153,10 @@ layui.use(['table','laypage','form','cjgl'], function(){
|
||||
layer.msg('查看' + data.id);
|
||||
break;
|
||||
case 'del':// 删除
|
||||
cjgl.del(obj,"/school");
|
||||
cjgl.del(obj,"/admin");
|
||||
break;
|
||||
case 'edit':// 编辑
|
||||
cjgl.add('编辑单位','/school/'+obj.data.id+'/edit','650','500');
|
||||
cjgl.add('编辑管理员','/admin/'+obj.data.id+'/edit','650','500');
|
||||
break;
|
||||
case 'status':// 状态
|
||||
cjgl.status(obj,"{:url('setstatus')}");
|
||||
|
||||
Reference in new issue
Block a user