From 63066f8fab50e0966eb89542f9a88e7602c74d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Tue, 9 Mar 2021 15:11:39 +0800 Subject: [PATCH] 0 --- app/admin/view/auth_group/create.html | 6 +- app/admin/view/auth_group_access/index.html | 3 +- app/admin/view/index/create.html | 5 +- app/admin/view/index/create_all.html | 9 +- app/kaoshi/controller/Index.php | 2 +- app/kaoshi/controller/KaoshiSet.php | 2 +- app/kaoshi/controller/LuruFengong.php | 2 +- app/kaoshi/controller/TongjiXiangmu.php | 2 +- app/kaoshi/route/kaoshi.php | 8 +- app/kaoshi/view/index/create.html | 220 +++++------- app/kaoshi/view/index/create_setp1.html | 295 +++++++--------- app/kaoshi/view/index/index.html | 248 +++++++------- app/kaoshi/view/kaoshi_set/index.html | 29 +- app/rongyu/view/jiaoshi/create.html | 113 +++---- app/rongyu/view/jiaoshi/index.html | 191 ++++++----- app/rongyu/view/js_rongyu_info/create.html | 277 ++++++++------- .../view/js_rongyu_info/create_all.html | 69 ++-- app/rongyu/view/js_rongyu_info/index.html | 214 ++++++------ .../view/js_rongyu_info/rongyu_list.html | 245 +++++++------- app/student/route/student.php | 2 +- app/student/view/index/by_list.html | 254 +++++++------- app/student/view/index/create.html | 319 +++++++----------- app/student/view/index/create_all.html | 97 ++---- app/student/view/index/del_list.html | 235 ++++++------- app/student/view/index/deletes.html | 79 ++--- app/student/view/index/index.html | 282 ++++++++-------- app/student/view/index/read.html | 101 +++--- app/system/controller/School.php | 19 ++ app/system/model/School.php | 2 +- app/system/route/system.php | 5 +- app/teach/controller/Xueqi.php | 20 ++ app/teach/model/Banji.php | 20 +- app/teach/model/Xueqi.php | 12 + app/teach/route/teach.php | 2 + public/static/x-admin2.2/js/canyuKaoshi.js | 23 ++ public/static/x-admin2.2/js/createInput.js | 134 ++++++-- 36 files changed, 1744 insertions(+), 1802 deletions(-) create mode 100644 public/static/x-admin2.2/js/canyuKaoshi.js diff --git a/app/admin/view/auth_group/create.html b/app/admin/view/auth_group/create.html index 51b2888f..2fbc0886 100755 --- a/app/admin/view/auth_group/create.html +++ b/app/admin/view/auth_group/create.html @@ -75,11 +75,7 @@ layui.use(['form', 'createInput'], function() { } form.on('checkbox(auth)', function(data) { - pid = $(data.elem).attr('pid'); - cid = $(data.elem).attr('cid'); - check = data.elem.checked; - cInput.checkboxChildren(cid, check); - cInput.checkboxParent(pid, check); + cInput.checkboxChecked(data); }); }); diff --git a/app/admin/view/auth_group_access/index.html b/app/admin/view/auth_group_access/index.html index 62f2064d..867fa1e5 100755 --- a/app/admin/view/auth_group_access/index.html +++ b/app/admin/view/auth_group_access/index.html @@ -51,9 +51,10 @@ diff --git a/app/kaoshi/controller/Index.php b/app/kaoshi/controller/Index.php index 3e853654..b80aa34f 100755 --- a/app/kaoshi/controller/Index.php +++ b/app/kaoshi/controller/Index.php @@ -374,7 +374,7 @@ class Index extends AdminBase // 删除考试 - public function delete($id) + public function delete() { // 整理数据 $id = request()->delete('id'); diff --git a/app/kaoshi/controller/KaoshiSet.php b/app/kaoshi/controller/KaoshiSet.php index 81038dbc..be99d8a8 100755 --- a/app/kaoshi/controller/KaoshiSet.php +++ b/app/kaoshi/controller/KaoshiSet.php @@ -246,7 +246,7 @@ class KaoshiSet extends AdminBase * @return \think\Response */ // 删除考号 - public function delete($id) + public function delete() { // 整理数据 diff --git a/app/kaoshi/controller/LuruFengong.php b/app/kaoshi/controller/LuruFengong.php index dc5f8294..93739771 100644 --- a/app/kaoshi/controller/LuruFengong.php +++ b/app/kaoshi/controller/LuruFengong.php @@ -161,7 +161,7 @@ class LuruFengong extends AdminBase * @return \think\Response */ // 删除考号 - public function delete($id) + public function delete() { // 整理数据 diff --git a/app/kaoshi/controller/TongjiXiangmu.php b/app/kaoshi/controller/TongjiXiangmu.php index cfc76f8b..b653df0c 100755 --- a/app/kaoshi/controller/TongjiXiangmu.php +++ b/app/kaoshi/controller/TongjiXiangmu.php @@ -183,7 +183,7 @@ class TongjiXiangmu extends AdminBase } // 删除考试 - public function delete($id) + public function delete() { // 整理数据 $id = request()->delete('id'); diff --git a/app/kaoshi/route/kaoshi.php b/app/kaoshi/route/kaoshi.php index dbb95bd0..7564c816 100755 --- a/app/kaoshi/route/kaoshi.php +++ b/app/kaoshi/route/kaoshi.php @@ -19,7 +19,7 @@ Route::group('index', function () { // Route::rule('read/','Index/read','get'); # 读取信息 Route::rule('edit/','Index/edit','get'); # 修改信息 Route::rule('update/','Index/update','put'); # 更新信息 - Route::rule('delete/','Index/delete','delete'); # 删除信息 + Route::rule('delete','Index/delete','delete'); # 删除信息 Route::rule('status','Index/setStatus','post'); # 删除信息 Route::rule('more/','Index/moreAction','get'); # 修改信息 Route::rule('luru','Index/luru','post'); # 考试编辑状态 @@ -42,7 +42,7 @@ Route::group('kaoshiset', function () { Route::rule('save','KaoshiSet/save','post'); # 保存信息 Route::rule('edit/','KaoshiSet/edit','get'); # 修改信息 Route::rule('update/','KaoshiSet/update','put'); # 更新信息 - Route::rule('delete/','KaoshiSet/delete','delete'); # 删除信息 + Route::rule('delete','KaoshiSet/delete','delete'); # 删除信息 Route::rule('status','KaoshiSet/setStatus','post'); # 修改状态 }); @@ -64,7 +64,7 @@ Route::group('tjxm', function () { Route::rule('data','TongjiXiangmu/ajaxData','post'); Route::rule('tongji','TongjiXiangmu/setTongji','post'); # 是否参与统计 Route::rule('status','TongjiXiangmu/setStatus','post'); # 修改状态 - Route::rule('delete/','TongjiXiangmu/delete','delete'); # 删除信息 + Route::rule('delete','TongjiXiangmu/delete','delete'); # 删除信息 }); @@ -74,7 +74,7 @@ Route::group('lrfg', function () { Route::rule('data','LuruFengong/ajaxdata','post'); # 获取数据 Route::rule('create/','LuruFengong/create','get'); # 添加信息 Route::rule('save','LuruFengong/save','post'); # 保存信息 - Route::rule('delete/','LuruFengong/delete','delete'); # 删除信息 + Route::rule('delete','LuruFengong/delete','delete'); # 删除信息 }); diff --git a/app/kaoshi/view/index/create.html b/app/kaoshi/view/index/create.html index 3be7de0a..b798244a 100755 --- a/app/kaoshi/view/index/create.html +++ b/app/kaoshi/view/index/create.html @@ -1,145 +1,93 @@ {extend name=".././view/create.html" /} - {block name="form"} -
-
- -
- {php} $schoollist = kaoshiSchoolList();{/php} - -
-
-
- -
- -
-
-
- -
- {php} - $xueqi = new \app\teach\model\Xueqi; - $xueqilist = $xueqi - ->limit(6) - ->order(['id'=>'desc']) - ->field('id,title') - ->select(); - {/php} - -
-
-
- -
- {php} $category = categoryChildren(109);{/php} - -
-
-
-
- -
- -
-
- -
-
-
-
- -
- {php} $category = categoryChildren(124);{/php} - -
-
-
- -
-
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/kaoshi/view/index/create_setp1.html b/app/kaoshi/view/index/create_setp1.html index e55c8818..698088c2 100644 --- a/app/kaoshi/view/index/create_setp1.html +++ b/app/kaoshi/view/index/create_setp1.html @@ -1,7 +1,7 @@ {extend name=".././view/create.html" /} {block name="jscss"} - {/block} {block name="form"} -
-
开始
-
考试信息
-
各年级参加考试学科和分数线
-
生成参加考试学生名单
-
分配录入成绩任务
-
完成
-
- -
-
- -
- {php} $schoollist = kaoshiSchoolList();{/php} - -
-
-
- -
- -
-
-
- -
- {php} - $xueqi = new \app\teach\model\Xueqi; - $xueqilist = $xueqi - ->limit(6) - ->order(['id'=>'desc']) - ->field('id,title') - ->select(); - {/php} - -
-
-
- -
- {php} $category = categoryChildren(109);{/php} - -
-
-
-
- -
- -
-
- -
-
-
-
- -
- {php} $category = categoryChildren(124);{/php} - -
-
- -
- -
-
+
+
开始
+
考试信息
+
各年级参加考试学科和分数线
+
生成参加考试学生名单
+
分配录入成绩任务
+
完成
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/kaoshi/view/index/index.html b/app/kaoshi/view/index/index.html index d9e91ce1..9dab2a48 100755 --- a/app/kaoshi/view/index/index.html +++ b/app/kaoshi/view/index/index.html @@ -1,50 +1,41 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 考试管理 - 考试列表 - + + 考试管理 + 考试列表 + {/block} {block name="search"} -
- -
- -
-
-
- -
- - {php} $category = categoryChildren(108);{/php} - {volist name="category" id="vo"} - - {/volist} -
+
+ +
+
-
- -
- - {php} $category = categoryChildren(109);{/php} - {volist name="category" id="vo"} - - {/volist} -
+
+
+ +
+
+
+
+ +
+ +
+
{/block} {block name="table"} -
+
{/block} {block name="myjs"} - + {/block} diff --git a/app/kaoshi/view/kaoshi_set/index.html b/app/kaoshi/view/kaoshi_set/index.html index 20a6ad33..45b57a94 100755 --- a/app/kaoshi/view/kaoshi_set/index.html +++ b/app/kaoshi/view/kaoshi_set/index.html @@ -51,7 +51,15 @@ {/block} - diff --git a/app/rongyu/view/jiaoshi/index.html b/app/rongyu/view/jiaoshi/index.html index 46bb6fe4..d8187483 100755 --- a/app/rongyu/view/jiaoshi/index.html +++ b/app/rongyu/view/jiaoshi/index.html @@ -1,25 +1,22 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 荣誉管理 - 荣誉册 - + + 荣誉管理 + 荣誉册 + {/block} {block name="search"} -
- -
- -
-
-
+
+ +
+ +
+
+
-
-
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
- -
- +
+ {eq name="$list.set.formpost" value="PUT" } + + {/eq} + {eq name="$list.set.formpost" value="POST" } + + {/eq} +
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/rongyu/view/js_rongyu_info/create_all.html b/app/rongyu/view/js_rongyu_info/create_all.html index 710b0ca8..2ca53390 100755 --- a/app/rongyu/view/js_rongyu_info/create_all.html +++ b/app/rongyu/view/js_rongyu_info/create_all.html @@ -1,59 +1,36 @@ {extend name=".././view/create.html" /} {block name="jscss"} {/block} {block name="form"} -
-
- -

点击上传,或将文件拖拽到此处

-
-
-
-
+
+
+ +

点击上传,或将文件拖拽到此处

+
+
+
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/rongyu/view/js_rongyu_info/index.html b/app/rongyu/view/js_rongyu_info/index.html index 6e04652f..c8570e4d 100755 --- a/app/rongyu/view/js_rongyu_info/index.html +++ b/app/rongyu/view/js_rongyu_info/index.html @@ -1,26 +1,23 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 荣誉管理 - 荣誉册 - 荣誉列表 - + + 荣誉管理 + 荣誉册 + 荣誉列表 + {/block} {block name="search"} -
- -
- -
-
-
+
+ +
+ +
+
+
-
+
{/block} {block name="table"} -
+
{/block} {block name="myjs"} - + {/block} diff --git a/app/rongyu/view/js_rongyu_info/rongyu_list.html b/app/rongyu/view/js_rongyu_info/rongyu_list.html index 644c046c..6a49a912 100755 --- a/app/rongyu/view/js_rongyu_info/rongyu_list.html +++ b/app/rongyu/view/js_rongyu_info/rongyu_list.html @@ -1,46 +1,43 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 荣誉管理 - 荣誉册 - 荣誉列表 - + + 荣誉管理 + 荣誉册 + 荣誉列表 + {/block} {block name="search"} -
- -
- -
-
-
+
+ +
+ +
+
+
-
- -
- -
-
- +
+ +
+ +
+
+ {/block} {block name="table"} -
+
{/block} {block name="myjs"} - + {/block} diff --git a/app/student/route/student.php b/app/student/route/student.php index c1672f28..aa8cb4f8 100755 --- a/app/student/route/student.php +++ b/app/student/route/student.php @@ -19,7 +19,7 @@ Route::group('index', function () { Route::rule('edit/','Index/edit','get'); # 修改信息 Route::rule('update/','Index/update','put'); # 更新信息 Route::rule('read/','Index/read','get'); # 读取信息 - Route::rule('delete/','Index/delete','delete'); # 删除信息 + Route::rule('delete','Index/delete','delete'); # 删除信息 Route::rule('status','Index/setStatus','post'); # 删除信息 Route::rule('createall','Index/createAll','get'); # 批量导入 Route::rule('saveall','Index/saveAll','post'); # 批量保存 diff --git a/app/student/view/index/by_list.html b/app/student/view/index/by_list.html index df26620c..070555c7 100755 --- a/app/student/view/index/by_list.html +++ b/app/student/view/index/by_list.html @@ -1,145 +1,143 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 师生名单 - 学生管理 - 毕业学生 - + + 师生名单 + 学生管理 + 毕业学生 + {/block} {block name="search"} -
- -
- -
-
-
- -
- {php} $schoollist = danweiJibie('校级', '校级');{/php} - {volist name="schoollist" id="vo"} - - {/volist} -
-
-
- -
- {php} - $njlist = nianJiNameList('str', $list['thistime']); - {/php} - {volist name="njlist" id="vo"} - - {/volist} -
-
-
- -
-
-
-{/block} -{block name="table"} -
-{/block} -{block name="myjs"} - - - - - - -{/block} + + {/block} diff --git a/app/student/view/index/create.html b/app/student/view/index/create.html index a03f2a91..765568aa 100755 --- a/app/student/view/index/create.html +++ b/app/student/view/index/create.html @@ -1,214 +1,147 @@ {extend name=".././view/create.html" /} {block name="jscss"} - {load href="__MAYI__/js/Convert_Pinyin.js" /} +{load href="__MAYI__/js/Convert_Pinyin.js" /} {/block} {block name="form"} -
-
- -
- -
-
-
-
- -
- -
-
- -
-
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- {if (isset($list.data.kaoshi)) } - - - {else /} - - - {/if} -
-
-
- -
- -
-
-
- -
- {php} $schoollist = danweiJibie('校级', '校级');{/php} - -
-
-
- -
- {php} $njlist = nianJiNameList();{/php} - -
-
-
- -
- -
-
-
- -
-
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+
+ +
+ {if (isset($list.data.kaoshi)) } + {else /} + + {/if} +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ {php} $njlist = nianJiNameList();{/php} +
+
+ +
+ +
+
+
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/student/view/index/create_all.html b/app/student/view/index/create_all.html index 8cfe32d5..bb8b8293 100755 --- a/app/student/view/index/create_all.html +++ b/app/student/view/index/create_all.html @@ -1,74 +1,45 @@ {extend name=".././view/createhref.html" /} - {block name="form"} -
-
- -
-
- -
-
- -
-
-
-
- -
- {php} $schoollist = danweiJibie('校级', '校级');{/php} - -
-
-
- -
-
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/student/view/index/del_list.html b/app/student/view/index/del_list.html index a5e4de8f..2873b772 100755 --- a/app/student/view/index/del_list.html +++ b/app/student/view/index/del_list.html @@ -1,146 +1,155 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 师生名单 - 学生管理 - 异动学生 - + + 师生名单 + 学生管理 + 异动学生 + {/block} {block name="search"} -
- -
- -
-
-
- -
- {php} $schoollist = danweiJibie('校级', '校级');{/php} - {volist name="schoollist" id="vo"} - - {/volist} -
+
+ +
+
-
- -
- {php} $njlist = nianJiNameList();{/php} - {volist name="njlist" id="vo"} - - {/volist} -
+
+
+ +
+
-
- -
-
-
+
+
+ +
+ {php} + $njlist = nianJiNameList('str', time()); + {/php} + +
+
+
+ +
+
+
{/block} {block name="table"} -
+
{/block} {block name="myjs"} - + {/block} diff --git a/app/student/view/index/deletes.html b/app/student/view/index/deletes.html index 5bfa3ad5..ba26c1e2 100755 --- a/app/student/view/index/deletes.html +++ b/app/student/view/index/deletes.html @@ -1,60 +1,37 @@ {extend name=".././view/create.html" /} - {block name="form"} -
-
- -
-
- -
-
- -
-
-
-
- -
-
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/student/view/index/index.html b/app/student/view/index/index.html index 3c8f294a..fee17a8e 100755 --- a/app/student/view/index/index.html +++ b/app/student/view/index/index.html @@ -1,58 +1,54 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 师生名单 - 学生管理 - 学生列表 - + + 师生名单 + 学生管理 + 学生列表 + {/block} {block name="search"} -
- -
- -
-
-
- -
- -
-
-
- -
- {php} - $njlist = nianJiNameList('str', time()); - {/php} - - -
+
+ +
+
-
- -
-
-
+
+
+ +
+ +
+
+
+ +
+ {php} + $njlist = nianJiNameList('str', time()); + {/php} + +
+
+
+ +
+
+
{/block} {block name="table"} -
+
{/block} {block name="myjs"} - + {/block} diff --git a/app/student/view/index/read.html b/app/student/view/index/read.html index 3bdcb66e..e9ca5aba 100755 --- a/app/student/view/index/read.html +++ b/app/student/view/index/read.html @@ -1,51 +1,58 @@ - - - {php}echo session('webtitle'){/php} - - - - {load href="__XADMIN__/css/font.css" /} - {load href="__XADMIN__/css/xadmin.css" /} - {load href="__XADMIN__/js/jquery.min.js" /} - {load href="__XADMIN__/lib/layui/layui.js" /} - {load href="__XADMIN__/js/xadmin.js" /} - {load href="__XADMIN__/js/cookie.js" /} - {load href="__XADMIN__/js/md5.min.js" /} - {$list.webtitle} - - -
-
- 个人信息 -
- - - - - - - - - - - - - - - - - - - - - - -
姓名{$list.xingming}        {$list.quanpin}        {$list.shoupin}
性别{$list.sex}
出生日期{$list.shengri}        {$list.age}周岁
学校班级{$list.stuBanji.glSchool.title}        {$list.stuBanji.banjiTitle}
是否参加考试{$list.kaoshi}
创建时间{$list.create_time}
-
-
-
- + + + {php}echo session('webtitle'){/php} + + + + {load href="__XADMIN__/css/font.css" /} + {load href="__XADMIN__/css/xadmin.css" /} + {load href="__XADMIN__/js/jquery.min.js" /} + {load href="__XADMIN__/lib/layui/layui.js" /} + {load href="__XADMIN__/js/xadmin.js" /} + {load href="__XADMIN__/js/cookie.js" /} + {load href="__XADMIN__/js/md5.min.js" /} + {$list.webtitle} + + + +
+
+ 个人信息 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
姓名{$list.xingming}        {$list.quanpin}        {$list.shoupin}
性别{$list.sex}
出生日期{$list.shengri}        {$list.age}周岁
学校班级{$list.stuBanji.glSchool.title}        {$list.stuBanji.banjiTitle}
是否参加考试{$list.kaoshi}
创建时间{$list.create_time}
+
+
+
+ + diff --git a/app/system/controller/School.php b/app/system/controller/School.php index 8280e9a9..7f2711af 100755 --- a/app/system/controller/School.php +++ b/app/system/controller/School.php @@ -261,4 +261,23 @@ class School extends AdminBase return json($data); } + + + // 查询单位列表 + public function srcKaoshi() + { + // 获取表单数据 + $src = request()->only([ + 'page' => '1' + ,'limit' => '10' + ,'field' => 'jibie_id' + ,'order' => 'asc' + ], 'post'); + // 实例化单位模型 + $sch = new sch; + $data = $sch->kaoshi(); + $data = reSetObject($data, $src); + + return json($data); + } } diff --git a/app/system/model/School.php b/app/system/model/School.php index 486cd156..b6e69705 100755 --- a/app/system/model/School.php +++ b/app/system/model/School.php @@ -101,7 +101,7 @@ class School extends BaseModel { $data = $this->where('kaoshi', 1) ->order(['jibie_id', 'paixu']) - ->field('id, title, jiancheng') + ->field('id, title, jiancheng, jibie_id') ->select(); return $data; } diff --git a/app/system/route/system.php b/app/system/route/system.php index fc281159..d8710ebb 100755 --- a/app/system/route/system.php +++ b/app/system/route/system.php @@ -35,8 +35,9 @@ Route::group('school', function () { Route::rule('update/', 'School/update', 'put'); # 更新信息 Route::rule('delete', 'School/delete', 'delete'); # 删除信息 Route::rule('status', 'School/setStatus', 'post'); # 删除信息 - Route::rule('kaoshi', 'School/setKaoshi', 'post'); # 删除信息 - Route::rule('srcschool', 'School/srcSchool', 'post'); # 获取数据 + Route::rule('kaoshi', 'School/setKaoshi', 'post'); # 删除信息 + Route::rule('srcschool', 'School/srcSchool', 'post'); # 获取数据 + Route::rule('srckaoshi', 'School/srcKaoshi', 'post'); # 获取数据 }); // 类别管理 diff --git a/app/teach/controller/Xueqi.php b/app/teach/controller/Xueqi.php index 16a8a2cd..3d407dff 100755 --- a/app/teach/controller/Xueqi.php +++ b/app/teach/controller/Xueqi.php @@ -206,4 +206,24 @@ class Xueqi extends AdminBase // 返回信息 return json($data); } + + + // 获取最近6个学期 + // 查询单位列表 + public function srcXueqi() + { + // 获取参数 + $src = $this->request + ->only([ + 'page' => '1' + ,'limit' => '10' + ], 'POST'); + + // 实例化单位模型 + $xq = new XQ; + $data = $xq->lastXueqi(); + $data = reSetObject($data, $src); + + return json($data); + } } diff --git a/app/teach/model/Banji.php b/app/teach/model/Banji.php index 07099849..ed6039b2 100755 --- a/app/teach/model/Banji.php +++ b/app/teach/model/Banji.php @@ -49,7 +49,7 @@ class Banji extends BaseModel $query->where('status', 1); } ]) - ->append(['banjiTitle', 'banTitle', 'grade', 'ban','bzr']) + ->append(['banjiTitle', 'banTitle', 'grade', 'bzr']) ->select(); return $data; @@ -186,17 +186,17 @@ class Banji extends BaseModel } - // 班名获取器 - public function getBanAttr() - { - $bj = $this->getAttr('paixu'); - $title = self::numToWord($bj) . '班'; + // // 班名获取器 + // public function getBanAttr() + // { + // $bj = $this->getAttr('paixu'); + // $title = self::numToWord($bj) . '班'; - $del = $this->getAttr('delete_time'); - $del == null ? $title : $title = $title & '(删)' ; + // $del = $this->getAttr('delete_time'); + // $del == null ? $title : $title = $title & '(删)' ; - return $title; - } + // return $title; + // } // 班主任获取器 diff --git a/app/teach/model/Xueqi.php b/app/teach/model/Xueqi.php index 9c9f962e..391f5eca 100755 --- a/app/teach/model/Xueqi.php +++ b/app/teach/model/Xueqi.php @@ -85,4 +85,16 @@ class Xueqi extends BaseModel return $data; } + + + // 获取最近6个学期 + public function lastXueqi() + { + $list = $this + ->limit(6) + ->order(['bfdate'=>'desc']) + ->field('id,title') + ->select(); + return $list; + } } diff --git a/app/teach/route/teach.php b/app/teach/route/teach.php index 271ab8b4..2ef4350f 100755 --- a/app/teach/route/teach.php +++ b/app/teach/route/teach.php @@ -21,6 +21,7 @@ Route::group('xueqi', function () { Route::rule('update/','xueqi/update','put'); # 更新信息 Route::rule('delete','xueqi/delete','delete'); # 删除信息 Route::rule('status','xueqi/setStatus','post'); # 删除信息 + Route::rule('srcxueqi','Xueqi/srcXueqi','post'); # 获取数据 }); // 班级管理 @@ -35,6 +36,7 @@ Route::group('banji', function () { Route::rule('mybanji','banji/mybanji','post'); # 删除信息 Route::rule('mybanjis','banji/banjiList','post'); # 删除信息 Route::rule('alias','banji/setAlias','put'); # 删除信息 + }); diff --git a/public/static/x-admin2.2/js/canyuKaoshi.js b/public/static/x-admin2.2/js/canyuKaoshi.js new file mode 100644 index 00000000..e386e222 --- /dev/null +++ b/public/static/x-admin2.2/js/canyuKaoshi.js @@ -0,0 +1,23 @@ +/** + 扩展cjgl模块 + **/ + +layui.extend({ + // 根路径下的具体路径(xmSelect/xmSelect.js) + xmSelect: "xm-select" +}).define(['table', 'form', 'xmSelect', 'upload'], function(exports) { + //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); + var table = layui.table, + form = layui.form, + upload = layui.upload, + xmSelect = layui.xmSelect; + + var obj = { + nianji:function(myid, data, hasNull = true){ + + } + + }; + //输出test接口 + exports('canyuKaoshi', obj); +}); diff --git a/public/static/x-admin2.2/js/createInput.js b/public/static/x-admin2.2/js/createInput.js index f437ecf9..75e706de 100644 --- a/public/static/x-admin2.2/js/createInput.js +++ b/public/static/x-admin2.2/js/createInput.js @@ -45,47 +45,54 @@ layui.extend({ }); }, + // 选中checkbox + checkboxChecked: function(data) { + pid = $(data.elem).attr('pid'); + cid = $(data.elem).attr('cid'); + check = data.elem.checked; + editCid(cid, check); + editPid(pid, check); - // 选中后代的复选框 - checkboxChildren: function(cid, check) { - edit(cid, check); - - function edit(cid, check) { + function editCid(cid, check) { $("input[pid='" + cid + "']").each(function(i, el) { this.checked = check; cid = $(this).attr('cid'); - edit(cid, check); + editCid(cid, check); }); } - form.render('checkbox'); - }, - - // 选中父级的复选框 - checkboxParent: function(pid, check) { - if (check == true) { - edit(pid, check) - }; - - function edit(pid, check) { - $("input[cid='" + pid + "']").each(function(i, el) { - this.checked = check; - pid = $(this).attr('pid'); - edit(pid, check); - }); + function editPid(pid, check) { + if (check == true) { + $("input[cid='" + pid + "']").each(function(i, el) { + this.checked = check; + pid = $(this).attr('pid'); + editPid(pid, check); + }); + } else { + cnt = $("input[pid='" + pid + "']:checked").length; + if (cnt == 0) { + $("input[cid='" + pid + "']").each(function(i, el) { + this.checked = check; + pid = $(this).attr('pid'); + editPid(pid, check); + }); + } + } } + form.render('checkbox'); }, // 创建单位的Select - schoolSelect: function(myid, low = '班级', high = '其它级', value, hasNull = true) { + schoolSelect: function(myid, low = '班级', high = '其它级', value, kaoshi='', hasNull = true) { $.ajax({ url: '/system/school/srcschool', type: 'POST', data: { low: low, - high: high + high: high, + kaoshi:kaoshi }, success: function(result) { if (hasNull == true) { @@ -245,11 +252,11 @@ layui.extend({ }, - // 上传图片 - uploadXls: function(uploadId, url, category, serurl, backId) { + // 上传电子表格 + uploadXls: function(uploadId, category, serurl, backId) { upload.render({ elem: '#' + uploadId, //绑定元素 - url: url, //上传接口 + url: '/tools/file/upload', //上传接口 done: function(res) { if (res.val == 1) { $('#' + backId).val(res.url); @@ -287,13 +294,13 @@ layui.extend({ // 创建类别的Select - subjectSelect: function(myid, value = '', kaoshi='', hasNull = true) { + subjectSelect: function(myid, value = '', kaoshi = '', hasNull = true) { $.ajax({ url: '/teach/subject/data', type: 'POST', data: { - status:1, - kaoshi:kaoshi + status: 1, + kaoshi: kaoshi }, success: function(result) { if (hasNull == true) { @@ -321,7 +328,7 @@ layui.extend({ // 创建班级checkbox - banjiCheckbox: function (myid, data, value, hasAll=true) { + banjiCheckbox: function(myid, data, value, hasAll = true) { $.ajax({ url: '/teach/banji/mybanji', type: 'POST', @@ -336,9 +343,9 @@ layui.extend({ temp = ""; $(result.data).each(function(i, el) { if (value != '' && value == el.id) { - temp = ''; + temp = ''; } else { - temp = ''; + temp = ''; } str = str + temp; }); @@ -349,7 +356,68 @@ layui.extend({ layer.msg('数据扔半道啦。', function() {}); }, }); - } + }, + + + // 创建班级checkbox + banjiSelect: function(myid, data, value, hasAll = true) { + $.ajax({ + url: '/teach/banji/mybanji', + type: 'POST', + data: data, + success: function(result) { + $('#' + myid).children().remove(); + if (hasAll == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, + + // 创建学期的Select + xueqiSelect: function(myid, value = '', hasNull = true) { + $.ajax({ + url: '/teach/xueqi/srcxueqi', + type: 'POST', + success: function(result) { + if (hasNull == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, }; //输出test接口