diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php
index bca95233..c8062fc8 100644
--- a/application/admin/controller/Index.php
+++ b/application/admin/controller/Index.php
@@ -132,9 +132,11 @@ class Index extends Base
// 读取用户信息
public function read($id)
{
-
// 获取管理员信息
- $list = AD::where('id',$id)->find();
+ $list = AD::where('id',$id)
+ ->field('id,xingming,sex,shengri,username,school,phone,denglucishu,lastip,ip,lasttime,thistime,create_time,update_time')
+ ->find();
+ $list['webtitle'] = '帐号信息';
// 模板赋值
$this->assign('list',$list);
@@ -143,6 +145,25 @@ class Index extends Base
return $this->fetch();
}
+
+ // 读取用户信息
+ public function myinfo()
+ {
+ $id = session('userid');
+ // 获取管理员信息
+ $list = AD::where('id',$id)
+ ->field('id,xingming,sex,shengri,username,school,phone,denglucishu,lastip,ip,lasttime,thistime,create_time,update_time')
+ ->find();
+ $list['webtitle'] = '我的信息';
+
+ // 模板赋值
+ $this->assign('list',$list);
+
+
+ // 渲染模板
+ return $this->fetch('read');
+ }
+
diff --git a/application/admin/view/index/index.html b/application/admin/view/index/index.html
index bb2747a6..f7a260ab 100644
--- a/application/admin/view/index/index.html
+++ b/application/admin/view/index/index.html
@@ -37,6 +37,7 @@
@@ -99,7 +100,7 @@
var tr = obj.tr; //获得当前行 tr 的DOM对象
switch(layEvent){
case 'detail':// 查看
- layer.msg('查看' + data.id);
+ cjgl.add(obj.data.xingming+'信息','/admin/'+obj.data.id,'','',true);
break;
case 'del':// 删除
cjgl.del(obj,"/admin");
diff --git a/application/admin/view/index/read.html b/application/admin/view/index/read.html
index d0912f70..f826fabe 100644
--- a/application/admin/view/index/read.html
+++ b/application/admin/view/index/read.html
@@ -1,51 +1,64 @@
-{extend name="common@admininfo" /}
-{block name="topdiv"}
-
-

-
- -
- {$list.xingming}
- 帐号:{$list.username}
-
- - 这家伙很懒,什么也没有留下
-
-
-{/block}
-{block name="mytable"}
-
-
-
- | 性别: |
- {$list.sex} |
-
-
- | 出生日期: |
- {$list.shengri} |
-
-
- | 手机: |
- {$list.phone} |
-
-
- | 注册时间: |
- {$list.create_time} |
-
-
- | 登录次数: |
- {$list.denglucishu} |
-
-
- | 最后登录时间: |
- {$list.lasttime} |
-
-
- | 最后登录IP: |
- {$list.lastip} |
-
-
- | 备注: |
- {$list.beizhu} |
-
-
-
-{/block}
\ No newline at end of file
+
+
+
+
+ {php}echo session('webtitle'){/php}
+
+
+
+ {load href="__STATIC__/xadmin/css/font.css" /}
+ {load href="__STATIC__/xadmin/css/xadmin.css" /}
+ {load href="__STATIC__/xadmin/js/jquery.min.js" /}
+ {load href="__STATIC__/xadmin/lib/layui/layui.js" /}
+ {load href="__STATIC__/xadmin/js/xadmin.js" /}
+ {load href="__STATIC__/xadmin/js/cookie.js" /}
+ {load href="__STATIC__/xadmin/js/md5.min.js" /}
+ {$list.webtitle}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/http/middleware/YanZheng.php b/application/http/middleware/YanZheng.php
index 53283e78..8c6fb078 100644
--- a/application/http/middleware/YanZheng.php
+++ b/application/http/middleware/YanZheng.php
@@ -49,11 +49,11 @@ class YanZheng extends Controller
$uneed_c = array(); # 荣誉器名首字母要大写
// 排除方法
$uneed_a = array(
- 'welcome','update','save','upload',
+ 'welcome','update','save','upload','myinfo',
'index','mybanji','banjilist',
'editpassword','updatepassword',
// 教师信息查询
- 'srcteacher',
+ 'srcteacher','srcry','srckt',
// 查询班级成绩、查询年级成绩
'ajaxbianji','ajaxnianji',
// 批量保存
diff --git a/application/index/view/index/index.html b/application/index/view/index/index.html
index 1bc80a9c..e7188292 100644
--- a/application/index/view/index/index.html
+++ b/application/index/view/index/index.html
@@ -28,12 +28,14 @@
@@ -41,8 +43,8 @@
{$list.username}
- - 个人信息
-
+ - 个人信息
+
- 切换帐号
diff --git a/application/keti/model/Keti.php b/application/keti/model/Keti.php
index 2020cba7..4489eb3e 100644
--- a/application/keti/model/Keti.php
+++ b/application/keti/model/Keti.php
@@ -39,7 +39,7 @@ class Keti extends Base
)
->withCount(['ktInfo'=>'lxcount'],'id')
->withCount(['ktInfo'=>function($query){
- $query->where('id','between',[1,1000]);
+ $query->where('jddengji','between',[1,2]);
}])
->select();
diff --git a/application/keti/model/KetiInfo.php b/application/keti/model/KetiInfo.php
index 26c84b64..fcf615aa 100644
--- a/application/keti/model/KetiInfo.php
+++ b/application/keti/model/KetiInfo.php
@@ -88,8 +88,7 @@ class KetiInfo extends Base
}
]);
}
- ]
- )
+ ])
->select();
diff --git a/application/renshi/controller/Index.php b/application/renshi/controller/Index.php
index e50034cf..f43b5652 100644
--- a/application/renshi/controller/Index.php
+++ b/application/renshi/controller/Index.php
@@ -125,9 +125,10 @@ class Index extends Base
return json($data);
}
- //
+ // 查看教师信息
public function read($id)
{
+
// 查询教师信息
$myInfo = Teacher::where('id',$id)
->with(
@@ -149,14 +150,13 @@ class Index extends Base
},
]
)
+ ->append(['age','gongling'])
->limit(1)
->select();
$myInfo = $myInfo[0];
- // 设置数据总数
- $myInfo['count'] = '';
// 设置页面标题
- $myInfo['title'] = $myInfo->xingming;
-
+ $myInfo['webtitle'] = $myInfo->xingming.'信息';
+
// 模板赋值
$this->assign('list',$myInfo);
// 渲染模板
@@ -403,5 +403,118 @@ class Index extends Base
}
+ // 查询教师荣誉
+ public function srcRy($teacherid)
+ {
+ // 实例化荣誉数据模型
+ $ry = new \app\rongyu\model\JsRongyuInfo;
+
+ // 查询荣誉信息
+ $data = $ry->where('status',1)
+ ->where('id','in',function($query) use($teacherid){
+ $query->name('jsRongyuCanyu')
+ ->where('teacherid',$teacherid)
+ ->field('rongyuid');
+ })
+ ->with(
+ [
+ 'jxCategory'=>function($query){
+ $query->field('id,title');
+ },
+ 'ryTuce'=>function($query){
+ $query->field('id,title,fzschool,category')
+ ->with([
+ 'fzSchool'=>function($query){
+ $query->field('id,jiancheng,jibie')
+ ->with(['dwJibie'=>function($q){
+ $q->field('id,title');
+ }]);
+ },
+ 'lxCategory'=>function($query){
+ $query->field('id,title');
+ },
+
+ ]);
+ },
+ 'hjJsry'=>function($query){
+ $query->field('rongyuid,teacherid')
+ ->with(['teacher'=>function($query){
+ $query->field('id,xingming');
+ }]);
+ },
+ ])
+ ->field('id,rongyuce,jiangxiang,hjshijian,title')
+ ->order('hjshijian')
+ ->select();
+
+ // 获取符合条件记录总数
+ $cnt = $data->count();
+
+ // 重组返回内容
+ $data = [
+ 'code'=> 0 , // ajax请求次数,作为标识符
+ 'msg'=>"", // 获取到的结果数(每页显示数量)
+ 'count'=>$cnt, // 符合条件的总数据量
+ 'data'=>$data, //获取到的数据结果
+ ];
+
+
+ return json($data);
+ }
+
+
+ // 查询教师课题
+ public function srcKt($teacherid)
+ {
+ // 实例化荣誉数据模型
+ $ry = new \app\keti\model\KetiInfo;
+
+ // 查询荣誉信息
+ $data = $ry->where('status',1)
+ ->where('id','in',function($query) use($teacherid){
+ $query->name('KetiCanyu')
+ ->where('teacherid',$teacherid)
+ ->field('ketiinfoid');
+ })
+ ->with(
+ [
+ 'fzSchool'=>function($query){
+ $query->field('id,jiancheng,jibie')
+ ->with(['dwJibie'=>function($q){
+ $q->field('id,title');
+ }]);
+ },
+ 'ktCategory'=>function($query){
+ $query->field('id,title');
+ },
+ 'ktZcr'=>function($query){
+ $query->field('ketiinfoid,teacherid')
+ ->with([
+ 'teacher'=>function($q){
+ $q->field('id,xingming');
+ }
+ ]);
+ }
+ ])
+ ->field('id,title,fzdanweiid,category,jddengji')
+ ->order('id')
+ ->select();
+
+ // 获取符合条件记录总数
+ $cnt = $data->count();
+
+ // 重组返回内容
+ $data = [
+ 'code'=> 0 , // ajax请求次数,作为标识符
+ 'msg'=>"", // 获取到的结果数(每页显示数量)
+ 'count'=>$cnt, // 符合条件的总数据量
+ 'data'=>$data, //获取到的数据结果
+ ];
+
+
+ return json($data);
+ }
+
+
}
diff --git a/application/renshi/model/Student.php b/application/renshi/model/Student.php
index 97f5f708..fa3c7cb6 100644
--- a/application/renshi/model/Student.php
+++ b/application/renshi/model/Student.php
@@ -77,7 +77,7 @@ class Student extends Base
$query->field('id,ruxuenian,paixu')->append(['banjiTitle']);
}
])
- ->field('id,xingming,school,sex,shengri')
+ ->field('id,xingming,school,sex,shengri,banji')
->append(['age'])
->select();
diff --git a/application/renshi/model/Teacher.php b/application/renshi/model/Teacher.php
index 87fad972..57dc1e1c 100644
--- a/application/renshi/model/Teacher.php
+++ b/application/renshi/model/Teacher.php
@@ -139,4 +139,7 @@ class Teacher extends Base
}
+
+
+
}
diff --git a/application/renshi/view/index/index.html b/application/renshi/view/index/index.html
index 88b32016..2a99d2c4 100644
--- a/application/renshi/view/index/index.html
+++ b/application/renshi/view/index/index.html
@@ -74,7 +74,7 @@
@@ -146,7 +146,7 @@
var tr = obj.tr; //获得当前行 tr 的DOM对象
switch(layEvent){
case 'detail':// 查看
- layer.msg('查看' + data.id);
+ cjgl.add(obj.data.xingming+'信息','/teacher/'+obj.data.id,'','',true);
break;
case 'del':// 删除
cjgl.del(obj,"/teacher");
diff --git a/application/renshi/view/index/read.html b/application/renshi/view/index/read.html
index 73c11da0..1e6d45dd 100644
--- a/application/renshi/view/index/read.html
+++ b/application/renshi/view/index/read.html
@@ -1,245 +1,186 @@
-
-
-
-
-
-
-
-
-
-
-
-{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"}
-
+
+
+
+
+ {php}echo session('webtitle'){/php}
+
+
+
+ {load href="__STATIC__/xadmin/css/font.css" /}
+ {load href="__STATIC__/xadmin/css/xadmin.css" /}
+ {load href="__STATIC__/xadmin/js/jquery.min.js" /}
+ {load href="__STATIC__/xadmin/lib/layui/layui.js" /}
+ {load href="__STATIC__/xadmin/js/xadmin.js" /}
+ {load href="__STATIC__/xadmin/js/cookie.js" /}
+ {load href="__STATIC__/xadmin/js/md5.min.js" /}
+ {$list.webtitle}
+
+
+
+
+