修改教师个人信息查看
This commit is contained in:
1 parent
4b48deb1e5
commit
71292b7618
7 files changed
+407
-14
No files matched your search
+1
-4
@@ -5,8 +5,5 @@
|
||||
.DS_Store
|
||||
/runtime
|
||||
/public/uploads
|
||||
<<<<<<< HEAD
|
||||
!/public/uploads/pic.jpg
|
||||
/vendor
|
||||
=======
|
||||
/vendor
|
||||
>>>>>>> master
|
||||
@@ -146,7 +146,39 @@ class Index extends Base
|
||||
//
|
||||
public function read($id)
|
||||
{
|
||||
//
|
||||
// 查询教师信息
|
||||
$myInfo = Teacher::where('id',$id)
|
||||
->with(
|
||||
[
|
||||
'jsDanwei'=>function($query){
|
||||
$query->field('id,title');
|
||||
},
|
||||
'jsZhiwu'=>function($query){
|
||||
$query->field('id,title');
|
||||
},
|
||||
'jsZhicheng'=>function($query){
|
||||
$query->field('id,title');
|
||||
},
|
||||
'jsXueli'=>function($query){
|
||||
$query->field('id,title');
|
||||
},
|
||||
'jsSubject'=>function($query){
|
||||
$query->field('id,title');
|
||||
},
|
||||
]
|
||||
)
|
||||
->limit(1)
|
||||
->select();
|
||||
$myInfo = $myInfo[0];
|
||||
// 设置数据总数
|
||||
$myInfo['count'] = '';
|
||||
// 设置页面标题
|
||||
$myInfo['title'] = $myInfo->xingming;
|
||||
|
||||
// 模板赋值
|
||||
$this->assign('list',$myInfo);
|
||||
// 渲染模板
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -227,6 +227,12 @@
|
||||
return '<input type="checkbox" name="test" value="' + row.id + '" />'
|
||||
}
|
||||
},
|
||||
{
|
||||
"targets": 1,
|
||||
"render": function(data, type, row, meta) {
|
||||
return '<a title="查看信息" data-href="teacher/'+ row.id +'" data-title="'+row.xingming+'" onClick="Hui_admin_tab(this)" class="" style="text-decoration:none"><i class="Hui-iconfont">'+row.xingming+'</i></a>'
|
||||
}
|
||||
},
|
||||
{
|
||||
"targets": -1,
|
||||
"className":'.td-manage',
|
||||
|
||||
Loaded 3 of 7 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user