diff --git a/.gitignore b/.gitignore
index dc240db6..c64833fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,8 +5,5 @@
.DS_Store
/runtime
/public/uploads
-<<<<<<< HEAD
+!/public/uploads/pic.jpg
/vendor
-=======
-/vendor
->>>>>>> master
diff --git a/application/renshi/controller/Index.php b/application/renshi/controller/Index.php
index 8e7ca3fb..6e0543aa 100644
--- a/application/renshi/controller/Index.php
+++ b/application/renshi/controller/Index.php
@@ -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();
}
diff --git a/application/renshi/view/index/index.html b/application/renshi/view/index/index.html
index fe36b82b..ebb1e81f 100644
--- a/application/renshi/view/index/index.html
+++ b/application/renshi/view/index/index.html
@@ -227,6 +227,12 @@
return ''
}
},
+ {
+ "targets": 1,
+ "render": function(data, type, row, meta) {
+ return ''+row.xingming+''
+ }
+ },
{
"targets": -1,
"className":'.td-manage',
diff --git a/application/renshi/view/index/read.html b/application/renshi/view/index/read.html
new file mode 100644
index 00000000..73c11da0
--- /dev/null
+++ b/application/renshi/view/index/read.html
@@ -0,0 +1,245 @@
+
+
+
+
+
+
+
+
+
+
+
+{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/css/H-ui.min.css" /}
+{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/H-ui.admin.css" /}
+{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css" /}
+{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/skin/default/skin.css" id="skin" /}
+{css rel="stylesheet" type="text/css" href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/css/style.css" /}
+{css rel="stylesheet" type="text/css" href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/css/jquery.dataTables.css" /}
+
+
+{$list.title}
+
+
+
+
+
+
+
+
+
+ | 姓名: |
+ {$list.xingming} |
+ 性别: |
+ {$list.sex} |
+
+
+ | 出生日期: |
+ {$list.shengri} |
+ 职称 |
+ {$list.js_zhicheng.title} |
+
+
+ | 工作单位: |
+ {$list.js_danwei.title} |
+ 参加工作时间: |
+ {$list.worktime} |
+
+
+ | 毕业学校: |
+ {$list.biye} |
+ 专业: |
+ {$list.zhuanye} |
+
+
+ | 学历: |
+ {$list.js_xueli.title} |
+ 任教学科: |
+ {$list.js_subject.title} |
+
+
+ | 备注: |
+ {$list.beizhu} |
+
+
+
+
+
+
+
+
+ | 标题 |
+ 编号 |
+ 级别 |
+ 奖项 |
+ 荣誉册 |
+ 单位 |
+ 时间 |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/jquery/1.9.1/jquery.min.js"}
+{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/layer/2.4/layer.js"}
+{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui/js/H-ui.min.js"}
+{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/static/h-ui.admin/js/H-ui.admin.js"}
+
+
+
+{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/datatables/1.10.15/js/jquery.dataTables.min.js"}
+
+
+
\ No newline at end of file
diff --git a/application/rongyu/controller/JsRongyuInfo.php b/application/rongyu/controller/JsRongyuInfo.php
index a5d08bed..61373fdb 100644
--- a/application/rongyu/controller/JsRongyuInfo.php
+++ b/application/rongyu/controller/JsRongyuInfo.php
@@ -495,6 +495,60 @@ class JsRongyuInfo extends Base
}
+ // 搜索教师荣誉
+ public function ryTeacher($id)
+ {
+ // 获取DT的传值
+ $getdt = request()->param();
+
+ //得到排序的方式
+ $order = $getdt['order'][0]['dir'];
+ //得到排序字段的下标
+ $order_column = $getdt['order'][0]['column'];
+ //根据排序字段的下标得到排序字段
+ $order_field = $getdt['columns'][$order_column]['name'];
+ if($order_field=='')
+ {
+ $order_field = $getdt['columns'][$order_column]['data'];
+ }
+ //得到limit参数
+ $limit_start = $getdt['start'];
+ $limit_length = $getdt['length'];
+
+ //得到搜索的关键词
+ $search = [
+ 'teacherid'=>$id,
+ 'order'=>$order,
+ 'order_field'=>$order_field
+ ];
+
+
+ // 实例化
+ $ryinfo = new ryinfo;
+
+ // 获取荣誉总数
+ $cnt = $ryinfo->select()->count();
+
+ // 查询数据
+ $data = $ryinfo->srcTeacher($search);
+ $datacnt = $data->count();
+
+ // 获取当前页数据
+ $data = $data->slice($limit_start,$limit_length);
+
+
+ // 重组返回内容
+ $data = [
+ 'draw'=> $getdt["draw"] , // ajax请求次数,作为标识符
+ 'recordsTotal'=>$cnt, // 获取到的结果数(每页显示数量)
+ 'recordsFiltered'=>$datacnt, // 符合条件的总数据量
+ 'data'=>$data, //获取到的数据结果
+ ];
+
+ return json($data);
+ }
+
+
diff --git a/application/rongyu/model/JsRongyuInfo.php b/application/rongyu/model/JsRongyuInfo.php
index a2187ade..f8c603e2 100644
--- a/application/rongyu/model/JsRongyuInfo.php
+++ b/application/rongyu/model/JsRongyuInfo.php
@@ -114,6 +114,58 @@ class JsRongyuInfo extends Base
}
+ //搜索单位获奖荣誉
+ public function srcTeacher($search)
+ {
+ // 获取参数
+ $teacherid = $search['teacherid'];
+ $order_field = $search['order_field'];
+ $order = $search['order'];
+
+ $data = $this->order([$order_field =>$order])
+ ->where('id','in',function($query) use($teacherid){
+ $query->name('JsRongyuCanyu')
+ ->where('category',1)
+ ->where('teacherid',$teacherid)
+ ->field('rongyuid');
+ })
+ ->where('status',1)
+ ->with(
+ [
+ 'hjSchool'=>function($query){
+ $query->field('id,jiancheng');
+ },
+ 'rySubject'=>function($query){
+ $query->field('id,title');
+ },
+ 'jxCategory'=>function($query){
+ $query->field('id,title');
+ },
+ 'ryTuce'=>function($query){
+ $query->field('id,title')
+ ->with([
+ 'fzSchool'=>function($query){
+ $query->field('id,title,jibie')
+ ->with(['']);
+ }
+ ]);
+ },
+ 'hjJsry'=>function($query){
+ $query->field('rongyuid,teacherid')
+ ->with(['teacher'=>function($query){
+ $query->field('id,xingming');
+ }]);
+ },
+ ]
+ )
+ ->append(['hjJsName','cyJsName'])
+ ->select();
+
+
+ return $data;
+ }
+
+
// 荣誉图册关联
public function ryTuce()
{
diff --git a/database/seeds/Rule.php b/database/seeds/Rule.php
index a614c785..be872d94 100644
--- a/database/seeds/Rule.php
+++ b/database/seeds/Rule.php
@@ -116,7 +116,8 @@ class Rule extends Seeder
['title'=>'编辑','name'=>'renshi/Index/edit','paixu'=>3,'pid'=>402,],
['title'=>'查看','name'=>'renshi/Index/read','paixu'=>4,'pid'=>402,],
['title'=>'状态','name'=>'renshi/Index/setStatus','paixu'=>5,'pid'=>402],
-
+ ['title'=>'查询教师','name'=>'renshi/Index/srcTeacher','paixu'=>6,'pid'=>402],
+
// 教务管理
// 学期管理权限
@@ -188,6 +189,10 @@ class Rule extends Seeder
['title'=>'编辑','name'=>'rongyu/JsRongyu/edit','paixu'=>3,'pid'=>802,],
['title'=>'查看','name'=>'rongyu/JsRongyu/read','paixu'=>4,'pid'=>802,],
['title'=>'状态','name'=>'rongyu/JsRongyu/setStatus','paixu'=>5,'pid'=>802],
+ ['title'=>'查看荣誉信息','name'=>'rongyu/JsRongyuInfo/rongyuList','paixu'=>6,'pid'=>802],
+ ['title'=>'下载表格','name'=>'rongyu/JsRongyuInfo/outXlsx','paixu'=>7,'pid'=>802],
+
+
// 教师荣誉信息管理
['title'=>'添加','name'=>'rongyu/JsRongyuInfo/create','paixu' =>1,'pid'=>803],
['title'=>'删除','name'=>'rongyu/JsRongyuInfo/delete','paixu'=>2,'pid'=>803],
@@ -195,8 +200,7 @@ class Rule extends Seeder
['title'=>'查看','name'=>'rongyu/JsRongyuInfo/read','paixu'=>4,'pid'=>803,],
['title'=>'状态','name'=>'rongyu/JsRongyuInfo/setStatus','paixu'=>5,'pid'=>803],
['title'=>'批量上传','name'=>'rongyu/JsRongyuInfo/createAll','paixu'=>6,'pid'=>803],
- ['title'=>'下载表格','name'=>'rongyu/JsRongyuInfo/outXlsx','paixu'=>7,'pid'=>803],
-
+
// 课题管理
// 课题册
@@ -206,13 +210,16 @@ class Rule extends Seeder
['title'=>'课题信息','name'=>'keti/ketiinfo/KetiCe','paixu'=>4,'pid'=>901,],
['title'=>'查看','name'=>'keti/index/read','paixu'=>5,'pid'=>901,],
['title'=>'状态','name'=>'keti/index/setStatus','paixu'=>6,'pid'=>901],
+ ['title'=>'查看课题信息','name'=>'keti/ketiinfo/ketiList','paixu'=>7,'pid'=>901],
// 课题信息
- ['title'=>'添加','name'=>'ketiinfo/index/create','paixu' =>1,'pid'=>902],
- ['title'=>'删除','name'=>'ketiinfo/index/delete','paixu'=>2,'pid'=>902],
- ['title'=>'编辑','name'=>'ketiinfo/index/edit','paixu'=>3,'pid'=>902,],
- ['title'=>'查看','name'=>'ketiinfo/index/read','paixu'=>4,'pid'=>902,],
- ['title'=>'状态','name'=>'ketiinfo/index/setStatus','paixu'=>5,'pid'=>902],
- ['title'=>'批量上传','name'=>'ketiinfo/index/createAll','paixu'=>6,'pid'=>902],
+ ['title'=>'添加','name'=>'keti/ketiinfo/create','paixu' =>1,'pid'=>902],
+ ['title'=>'删除','name'=>'keti/ketiinfo/delete','paixu'=>2,'pid'=>902],
+ ['title'=>'编辑','name'=>'keti/ketiinfo/edit','paixu'=>3,'pid'=>902,],
+ ['title'=>'查看','name'=>'keti/ketiinfo/read','paixu'=>4,'pid'=>902,],
+ ['title'=>'状态','name'=>'keti/ketiinfo/setStatus','paixu'=>5,'pid'=>902],
+ ['title'=>'批量上传','name'=>'keti/ketiinfo/createAll','paixu'=>6,'pid'=>902],
+ ['title'=>'结题','name'=>'keti/ketiinfo/jieTi','paixu'=>7,'pid'=>902],
+