From 0dbee995fc46ac082a0da00f811de35ada688c47 Mon Sep 17 00:00:00 2001 From: cxdbz Date: Sun, 28 Oct 2018 22:37:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=AD=A6=E6=A0=A1=E4=B8=8E?= =?UTF-8?q?=E6=95=99=E5=B8=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/AuthRule.php | 2 +- application/admin/controller/Index.php | 6 +- application/admin/model/Admin.php | 2 +- application/admin/view/index/edit.html | 2 +- application/common.php | 25 ++ application/system/model/Category.php | 10 - application/system/model/School.php | 11 +- application/system/view/category/create.html | 4 - application/system/view/category/edit.html | 4 - application/system/view/school/create.html | 8 +- application/system/view/school/edit.html | 8 +- application/teach/common.php | 1 + application/teach/controller/Index.php | 229 ++++++++++++++++++ application/teach/controller/Kaoshi.php | 85 +++++++ application/teach/controller/Xueqi.php | 85 +++++++ application/teach/model/Kaoshi.php | 11 + application/teach/model/Teacher.php | 78 ++++++ application/teach/model/Xueqi.php | 11 + application/teach/validate/Kaoshi.php | 24 ++ application/teach/validate/School.php | 37 +++ application/teach/validate/Teacher.php | 37 +++ application/teach/validate/Xueqi.php | 24 ++ application/teach/view/index/create.html | 194 +++++++++++++++ application/teach/view/index/edit.html | 192 +++++++++++++++ application/teach/view/index/index.html | 132 ++++++++++ application/teach/view/kaoshi/create.html | 107 ++++++++ application/teach/view/kaoshi/edit.html | 107 ++++++++ application/teach/view/kaoshi/index.html | 130 ++++++++++ application/teach/view/xueqi/create.html | 107 ++++++++ application/teach/view/xueqi/edit.html | 107 ++++++++ application/teach/view/xueqi/index.html | 130 ++++++++++ config/shcool/app.php | 5 + config/teach/app.php | 5 + config/teacher/app.php | 5 + config/test/app.php | 5 + .../migrations/20181028023517_teacher.php | 55 +++++ database/migrations/20181028024920_xueqi.php | 48 ++++ database/migrations/20181028025648_kaoshi.php | 47 ++++ database/seeds/Category.php | 26 +- database/seeds/Rule.php | 34 +++ route/teach.php | 15 ++ 41 files changed, 2118 insertions(+), 37 deletions(-) create mode 100644 application/teach/common.php create mode 100644 application/teach/controller/Index.php create mode 100644 application/teach/controller/Kaoshi.php create mode 100644 application/teach/controller/Xueqi.php create mode 100644 application/teach/model/Kaoshi.php create mode 100644 application/teach/model/Teacher.php create mode 100644 application/teach/model/Xueqi.php create mode 100644 application/teach/validate/Kaoshi.php create mode 100644 application/teach/validate/School.php create mode 100644 application/teach/validate/Teacher.php create mode 100644 application/teach/validate/Xueqi.php create mode 100644 application/teach/view/index/create.html create mode 100644 application/teach/view/index/edit.html create mode 100644 application/teach/view/index/index.html create mode 100644 application/teach/view/kaoshi/create.html create mode 100644 application/teach/view/kaoshi/edit.html create mode 100644 application/teach/view/kaoshi/index.html create mode 100644 application/teach/view/xueqi/create.html create mode 100644 application/teach/view/xueqi/edit.html create mode 100644 application/teach/view/xueqi/index.html create mode 100644 config/shcool/app.php create mode 100644 config/teach/app.php create mode 100644 config/teacher/app.php create mode 100644 config/test/app.php create mode 100644 database/migrations/20181028023517_teacher.php create mode 100644 database/migrations/20181028024920_xueqi.php create mode 100644 database/migrations/20181028025648_kaoshi.php create mode 100644 route/teach.php diff --git a/application/admin/controller/AuthRule.php b/application/admin/controller/AuthRule.php index abb1b154..a8380747 100644 --- a/application/admin/controller/AuthRule.php +++ b/application/admin/controller/AuthRule.php @@ -161,7 +161,7 @@ class AuthRule extends Base $validate = new \app\admin\validate\Rule; // 获取表单数据 - $list = request()->only(['title','name','pid','condition','paixu','ismenu','font','beizhu'],'post'); + $list = request()->only(['title','name','pid','condition','paixu','ismenu','font','beizhu'],'put'); // 验证表单数据 $result = $validate->check($list); diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index 6b078d34..7c488e5d 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -193,11 +193,12 @@ class Index extends Base $validate = new \app\admin\validate\Admin; // 获取表单数据 - $list = request()->only(['xingming','username','sex','shengri','phone','beizhu'],'put'); + $list = request()->only(['xingming','username','sex','shengri','phone','beizhu','group_id'],'put'); // 验证表单数据 $result = $validate->check($list); $msg = $validate->getError(); + unset($list['group_id']); // 如果验证不通过则停止保存 if(!$result){ @@ -205,7 +206,8 @@ class Index extends Base } // 更新管理员信息 - $data = AD::where('id',$id)->update($list); + $admin = new AD(); + $data = $admin->save($list,['id'=>$id]); // 更新管理员角色 $group_id = request()->put('group_id'); diff --git a/application/admin/model/Admin.php b/application/admin/model/Admin.php index b63bafb2..4119b814 100644 --- a/application/admin/model/Admin.php +++ b/application/admin/model/Admin.php @@ -20,7 +20,7 @@ class Admin extends Base } // 生日修改器 - public function setShenriAttr($value) + public function setShengriAttr($value) { return strtotime($value); } diff --git a/application/admin/view/index/edit.html b/application/admin/view/index/edit.html index ccdebb9c..3e081dae 100644 --- a/application/admin/view/index/edit.html +++ b/application/admin/view/index/edit.html @@ -19,7 +19,7 @@ {php} $group = db('auth_group')->where('status',true)->field('id,title')->all(); {/php} - {volist name="group" id="vo" key="k"}{$list['group_id']}{$vo.id} + {volist name="group" id="vo" key="k"}
diff --git a/application/common.php b/application/common.php index 62eb271a..266a749d 100644 --- a/application/common.php +++ b/application/common.php @@ -11,3 +11,28 @@ // 应用公共文件 +// 获取类别列表 +function getCategory($id = 0) +{ + // 根据父级id查询类别列表 + $list = db('category') + ->where('pid',$id) + ->where('status',1) + ->field('id,title') + ->select(); + + // 返回类别列表 + return $list; +} + + +// 获取类别名称 +function getCategoryTitle($id) +{ + // 根据id查询类别名 + $value = db('category') + ->where('id',$id) + ->vlaue('title'); + // 返回类别名 + return $value; +} \ No newline at end of file diff --git a/application/system/model/Category.php b/application/system/model/Category.php index 2ea00666..462e8a2b 100644 --- a/application/system/model/Category.php +++ b/application/system/model/Category.php @@ -6,16 +6,6 @@ use app\common\model\Base; class Category extends Base { - // 获取类别列表 - public function getCategory($id = 0) - { - return $this - ->where('pid',$id) - ->where('status',1) - ->field('id,title') - ->select(); - } - // 父级类别获取器 public function getPidAttr($value) diff --git a/application/system/model/School.php b/application/system/model/School.php index 152b73fd..968bb403 100644 --- a/application/system/model/School.php +++ b/application/system/model/School.php @@ -24,12 +24,13 @@ class School extends Base return $this->getcategory($value); } - - // category查询 + // 获取类别名 public function getcategory($id) { - return db('category') - ->where('id',$id) - ->value('title'); + return db('category') + ->where('id',$id) + ->value('title'); } + + } diff --git a/application/system/view/category/create.html b/application/system/view/category/create.html index e3d2492c..51ad17d0 100644 --- a/application/system/view/category/create.html +++ b/application/system/view/category/create.html @@ -17,10 +17,6 @@ {volist name="pid" id="vo"} - {php} $child = $cgmod->getCategory($vo['id']);{/php} - {volist name="child" id="va"} - - {/volist} {/volist} diff --git a/application/system/view/category/edit.html b/application/system/view/category/edit.html index c4419132..caeb4f74 100644 --- a/application/system/view/category/edit.html +++ b/application/system/view/category/edit.html @@ -17,10 +17,6 @@ {volist name="pid" id="vo"} - {php} $child = $authrulemod->getCategory($vo['id']);{/php} - {volist name="child" id="va"} - - {/volist} {/volist} diff --git a/application/system/view/school/create.html b/application/system/view/school/create.html index f4a4efca..f7d4fd07 100644 --- a/application/system/view/school/create.html +++ b/application/system/view/school/create.html @@ -15,7 +15,7 @@
- +
@@ -24,7 +24,7 @@
- {php} $cgmod = new app\system\model\Category;$category = $cgmod->getCategory(1);{/php} + {php}$category = getCategory(1);{/php} {volist name="category" id="vo"} @@ -52,7 +52,7 @@
- {php} $cgmod = new app\system\model\Category;$catetory = $cgmod->getCategory(3);{/php} + {php} $catetory = getCategory(3);{/php}
@@ -24,7 +24,7 @@
- {php} $cgmod = new app\system\model\Category;$category = $cgmod->getCategory(1);{/php} + {php} $category = getCategory(1);{/php} {volist name="category" id="vo"} @@ -52,7 +52,7 @@
- {php} $cgmod = new app\system\model\Category;$catetory = $cgmod->getCategory(3);{/php} + {php} $catetory = getCategory(3);{/php} +
+
+
+ +
+ + +
+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ + {php} $school = new app\system\model\School; $list = $school->where('jibie','>',1)->field('id,title')->all();{/php} + + +
+
+
+ +
+ + {php}$list = getCategory(7);{/php} + + +
+
+
+ +
+ + {php}$list = getCategory(6);{/php} + + +
+
+
+ +
+ + {php}$list = getCategory(5);{/php} + + +
+
+ + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+ +{/block} +{block name="yanzheng"} + +{/block} \ No newline at end of file diff --git a/application/teach/view/index/edit.html b/application/teach/view/index/edit.html new file mode 100644 index 00000000..97355bca --- /dev/null +++ b/application/teach/view/index/edit.html @@ -0,0 +1,192 @@ +{extend name="common@create" /} +{block name="formaa"} +
+
+ +
+ +
+
+
+ +
+ + +
+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ + {php} $school = new app\system\model\School; $category = $school->where('jibie','>',1)->field('id,title,jiancheng')->all();{/php} + + +
+
+
+ +
+ + {php}$category = getCategory(7);{/php} + + +
+
+
+ +
+ + {php}$category = getCategory(6);{/php} + + +
+
+
+ +
+ + {php}$category = getCategory(5);{/php} + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+{/block} +{block name="yanzheng"} + +{/block} \ No newline at end of file diff --git a/application/teach/view/index/index.html b/application/teach/view/index/index.html new file mode 100644 index 00000000..7f6f120c --- /dev/null +++ b/application/teach/view/index/index.html @@ -0,0 +1,132 @@ +{extend name="common@list" /} +{block name="topnav"} + +{/block} +{block name="bouttons"} +
+ + + + + 批量删除 + + + + + 添加教师 + + + + 共有数据:{$list.count} 条 + +
+{/block} +{block name="tables"} + + + + + + + + + + + + + + + + + + +
姓名性别年龄学历毕业院校工作时间专业工作单位状态操作
+ + +{/block} +{block name="myjs"} + +{/block} \ No newline at end of file diff --git a/application/teach/view/kaoshi/create.html b/application/teach/view/kaoshi/create.html new file mode 100644 index 00000000..2d37d9af --- /dev/null +++ b/application/teach/view/kaoshi/create.html @@ -0,0 +1,107 @@ +{extend name="common@create" /} +{block name="formaa"} +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + {php} $authrulemod = new app\admin\model\AuthRule; $pid = $authrulemod->getRule();{/php} + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+{/block} +{block name="yanzheng"} + +{/block} \ No newline at end of file diff --git a/application/teach/view/kaoshi/edit.html b/application/teach/view/kaoshi/edit.html new file mode 100644 index 00000000..2e93b6c8 --- /dev/null +++ b/application/teach/view/kaoshi/edit.html @@ -0,0 +1,107 @@ +{extend name="common@create" /} +{block name="formaa"} +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + {php} $authrulemod = new app\admin\model\AuthRule; $pid = $authrulemod->getRule();{/php} + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+{/block} +{block name="yanzheng"} + +{/block} \ No newline at end of file diff --git a/application/teach/view/kaoshi/index.html b/application/teach/view/kaoshi/index.html new file mode 100644 index 00000000..5d5cde23 --- /dev/null +++ b/application/teach/view/kaoshi/index.html @@ -0,0 +1,130 @@ +{extend name="common@list" /} +{block name="topnav"} + +{/block} +{block name="bouttons"} +
+ + + + + 批量删除 + + + + + 添加考试 + + + + 共有数据:{$list.count} 条 + +
+{/block} +{block name="tables"} + + + + + + + + + + + + + + + + + +
名称规则表达式父级规则排序是否是菜单 菜单字体状态操作
+ + +{/block} +{block name="myjs"} + +{/block} \ No newline at end of file diff --git a/application/teach/view/xueqi/create.html b/application/teach/view/xueqi/create.html new file mode 100644 index 00000000..2d37d9af --- /dev/null +++ b/application/teach/view/xueqi/create.html @@ -0,0 +1,107 @@ +{extend name="common@create" /} +{block name="formaa"} +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + {php} $authrulemod = new app\admin\model\AuthRule; $pid = $authrulemod->getRule();{/php} + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+{/block} +{block name="yanzheng"} + +{/block} \ No newline at end of file diff --git a/application/teach/view/xueqi/edit.html b/application/teach/view/xueqi/edit.html new file mode 100644 index 00000000..2e93b6c8 --- /dev/null +++ b/application/teach/view/xueqi/edit.html @@ -0,0 +1,107 @@ +{extend name="common@create" /} +{block name="formaa"} +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + {php} $authrulemod = new app\admin\model\AuthRule; $pid = $authrulemod->getRule();{/php} + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+{/block} +{block name="yanzheng"} + +{/block} \ No newline at end of file diff --git a/application/teach/view/xueqi/index.html b/application/teach/view/xueqi/index.html new file mode 100644 index 00000000..5d9d52c5 --- /dev/null +++ b/application/teach/view/xueqi/index.html @@ -0,0 +1,130 @@ +{extend name="common@list" /} +{block name="topnav"} + +{/block} +{block name="bouttons"} +
+ + + + + 批量删除 + + + + + 添加学期 + + + + 共有数据:{$list.count} 条 + +
+{/block} +{block name="tables"} + + + + + + + + + + + + + + + + + +
名称规则表达式父级规则排序是否是菜单 菜单字体状态操作
+ + +{/block} +{block name="myjs"} + +{/block} \ No newline at end of file diff --git a/config/shcool/app.php b/config/shcool/app.php new file mode 100644 index 00000000..3779064a --- /dev/null +++ b/config/shcool/app.php @@ -0,0 +1,5 @@ +table('teacher'); + + // 添加当前表字段 + $table + ->addColumn('xingming','string',['limit'=>8,'null'=>false,'comment'=>'姓名']) + ->addColumn('sex','boolean',['limit'=>1,'default'=>2,'null'=>false,'comment'=>'性别']) + ->addColumn('shengri','string',['limit'=>11,'null'=>true,'comment'=>'生日']) + ->addColumn('worktime','string',['limit'=>11,'null'=>true,'comment'=>'工作时间']) + ->addColumn('zhiwu','string',['limit'=>11,'null'=>true,'comment'=>'职务']) + ->addColumn('zhicheng','string',['limit'=>11,'null'=>true,'comment'=>'职称']) + ->addColumn('danwei','string',['limit'=>11,'null'=>false,'comment'=>'现工作单位']) + ->addColumn('biye','string',['limit'=>50,'null'=>true,'comment'=>'毕业学校']) + ->addColumn('zhuanye','string',['limit'=>20,'null'=>true,'comment'=>'专业']) + ->addColumn('xueli','string',['limit'=>20,'null'=>true,'comment'=>'学历']) + ->addColumn('quanpin','string',['limit'=>30,'null'=>false,'comment'=>'全拼']) + ->addColumn('shoupin','string',['limit'=>5,'null'=>false,'comment'=>'简拼']) + ->addColumn('status','boolean',['limit'=>1,'default'=>true,'null'=>false,'comment'=>'状态']) + ->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间']) + ->addColumn('create_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间']) + ->addColumn('update_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间']) + ->addColumn('beizhu','string',['limit'=>80,'null'=>true,'comment'=>'备注']) + ->create(); + } +} diff --git a/database/migrations/20181028024920_xueqi.php b/database/migrations/20181028024920_xueqi.php new file mode 100644 index 00000000..e2c255bd --- /dev/null +++ b/database/migrations/20181028024920_xueqi.php @@ -0,0 +1,48 @@ +table('xueqi'); + + // 添加当前表字段 + $table + ->addColumn('title','string',['limit'=>25,'null'=>false,'comment'=>'学期标题']) + ->addColumn('xuenan','string',['limit'=>15,'null'=>false,'comment'=>'学年标题']) + ->addColumn('catagory','string',['limit'=>11,'null'=>false,'comment'=>'学期分类']) + ->addColumn('bfdate','string',['limit'=>11,'null'=>false,'comment'=>'开始日期']) + ->addColumn('endate','string',['limit'=>11,'null'=>false,'comment'=>'结束日期']) + ->addColumn('status','boolean',['limit'=>1,'default'=>'1','null'=>false,'comment'=>'0=禁用,1=正常']) + ->addColumn('create_time','integer',['limit'=>11,'null'=>true,'comment'=>'创建时间']) + ->addColumn('update_time','integer',['limit'=>11,'null'=>true,'comment'=>'更新时间']) + ->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间']) + ->addColumn('beizhu','string',['limit'=>80,'null'=>true,'comment'=>'备注']) + ->create(); + } +} diff --git a/database/migrations/20181028025648_kaoshi.php b/database/migrations/20181028025648_kaoshi.php new file mode 100644 index 00000000..58d2577f --- /dev/null +++ b/database/migrations/20181028025648_kaoshi.php @@ -0,0 +1,47 @@ +table('kaoshi'); + + // 添加当前表字段 + $table + ->addColumn('title','string',['limit'=>25,'null'=>false,'comment'=>'考试名称']) + ->addColumn('xueqi','string',['limit'=>11,'null'=>false,'comment'=>'学期']) + ->addColumn('bfdate','string',['limit'=>11,'null'=>false,'comment'=>'开始日期']) + ->addColumn('endate','string',['limit'=>11,'null'=>false,'comment'=>'结束日期']) + ->addColumn('status','boolean',['limit'=>1,'default'=>'1','null'=>false,'comment'=>'0=禁用,1=正常']) + ->addColumn('create_time','integer',['limit'=>11,'null'=>true,'comment'=>'创建时间']) + ->addColumn('update_time','integer',['limit'=>11,'null'=>true,'comment'=>'更新时间']) + ->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间']) + ->addColumn('beizhu','string',['limit'=>80,'null'=>true,'comment'=>'备注']) + ->create(); + } +} diff --git a/database/seeds/Category.php b/database/seeds/Category.php index fe745c72..06cc49d8 100644 --- a/database/seeds/Category.php +++ b/database/seeds/Category.php @@ -21,6 +21,9 @@ class Category extends Seeder ['id'=>2,'title'=>'单位级别','pid'=>0,'paixu' =>2], ['id'=>3,'title'=>'大学段','pid'=>0,'paixu' =>3], ['id'=>4,'title'=>'小学段','pid'=>0,'paixu' =>4], + ['id'=>5,'title'=>'学历','pid'=>0,'paixu'=>5], + ['id'=>6,'title'=>'职称','pid'=>0,'paixu'=>6], + ['id'=>7,'title'=>'职务','pid'=>0,'paixu'=>7], // 二级类别 // 单位性质 @@ -34,7 +37,7 @@ class Category extends Seeder ['title'=>'教育行政部门','pid'=>1,'paixu'=>8], ['title'=>'其他教育机构','pid'=>1,'paixu'=>9], // 单位级别 - ['title'=>'学校','pid'=>2,'paixu'=>1], + ['title'=>'校级','pid'=>2,'paixu'=>1], ['title'=>'区级','pid'=>2,'paixu'=>2], ['title'=>'市级','pid'=>2,'paixu'=>3], ['title'=>'省级','pid'=>2,'paixu'=>4], @@ -52,6 +55,27 @@ class Category extends Seeder ['title'=>'中年级','pid'=>4,'paixu'=>2], ['title'=>'高级年','pid'=>4,'paixu'=>3], ['title'=>'其他学段','pid'=>4,'paixu'=>4], + // 学历 + ['title'=>'高中/中专','pid'=>5,'paixu'=>1], + ['title'=>'专科','pid'=>5,'paixu'=>2], + ['title'=>'本科','pid'=>5,'paixu'=>3], + ['title'=>'硕士研究生','pid'=>5,'paixu'=>4], + ['title'=>'博士研究生','pid'=>5,'paixu'=>5], + ['title'=>'其他学历','pid'=>5,'paixu'=>6], + // 职称 + ['title'=>'正高级','pid'=>6,'paixu'=>1], + ['title'=>'高级','pid'=>6,'paixu'=>2], + ['title'=>'一级','pid'=>6,'paixu'=>3], + ['title'=>'二级','pid'=>6,'paixu'=>4], + ['title'=>'三级','pid'=>6,'paixu'=>5], + ['title'=>'其他','pid'=>6,'paixu'=>6], + // 职务 + ['title'=>'校长','pid'=>7,'paixu'=>1], + ['title'=>'副校长','pid'=>7,'paixu'=>2], + ['title'=>'主任','pid'=>7,'paixu'=>3], + ['title'=>'教研组长','pid'=>7,'paixu'=>4], + ['title'=>'教师','pid'=>7,'paixu'=>5], + ['title'=>'其他','pid'=>7,'paixu'=>6], ]; // 保存数据 $this->table('category')->insert($rows)->save(); diff --git a/database/seeds/Rule.php b/database/seeds/Rule.php index 0ed0e968..418323b6 100644 --- a/database/seeds/Rule.php +++ b/database/seeds/Rule.php @@ -19,6 +19,7 @@ class Rule extends Seeder // 一级菜单 1 ['id'=>1,'title'=>'系统管理','name' =>'system','paixu' =>5,'ismenu'=>true,'font' =>'Hui-iconfont-system'], ['id'=>2,'title' =>'管理员管理','name'=>'admin','paixu' =>4,'ismenu' =>true,'font'=>'Hui-iconfont-root'], + ['id'=>3,'title' =>'教务管理','name'=>'teach','paixu' =>3,'ismenu' =>true,'font'=>'Hui-iconfont-yuyin2'], // 二级菜单 // 系统设置 ['id'=>11,'title'=>'类别管理','name'=>'system/Category/index','paixu'=>1,'ismenu' =>true,'pid' =>1,'url'=>'/category',], @@ -28,7 +29,40 @@ class Rule extends Seeder ['id'=>21,'title'=>'管理员列表','name'=>'admin/Index/index','paixu'=>1,'ismenu' =>true,'pid' =>2,'url'=>'/admin',], ['id'=>22,'title'=>'权限列表','name'=>'admin/AuthRule/index','paixu'=>2,'ismenu' =>true,'pid' =>2,'url'=>'/authrule',], ['id'=>23,'title'=>'角色列表','name'=>'admin/AuthGroup/index','paixu'=>3,'ismenu' =>true,'pid' =>2,'url'=>'/authgroup',], + // 教务管理 + ['id'=>31,'title'=>'考试列表','name'=>'teach/Kaoshi/index','paixu'=>1,'ismenu' =>true,'pid' =>3,'url'=>'/kaoshi',], + ['id'=>32,'title'=>'教师列表','name'=>'teach/Index/index','paixu'=>2,'ismenu' =>true,'pid' =>3,'url'=>'/teacher',], + ['id'=>33,'title'=>'学生列表','name'=>'teach/Studen/index','paixu'=>3,'ismenu' =>true,'pid' =>3,'url'=>'/teacher',], + ['id'=>34,'title'=>'学期列表','name'=>'teach/Xueqi/index','paixu'=>4,'ismenu' =>true,'pid' =>3,'url'=>'/xueqi',], + + // 教务管理 + // 考试管理权限 + ['title'=>'添加','name'=>'teach/Kaoshi/create','paixu' =>1,'pid'=>31], + ['title'=>'删除','name'=>'teach/Kaoshi/delete','paixu'=>2,'pid'=>31], + ['title'=>'编辑','name'=>'teach/Kaoshi/edit','paixu'=>3,'pid'=>31,], + ['title'=>'查看','name'=>'teach/Kaoshi/read','paixu'=>4,'pid'=>31,], + ['title'=>'状态','name'=>'teach/Kaoshi/status','paixu'=>5,'pid'=>31], + // 教师管理权限 + ['title'=>'添加','name'=>'teach/Index/create','paixu' =>1,'pid'=>32], + ['title'=>'删除','name'=>'teach/Index/delete','paixu'=>2,'pid'=>32], + ['title'=>'编辑','name'=>'teach/Index/edit','paixu'=>3,'pid'=>32,], + ['title'=>'查看','name'=>'teach/Index/read','paixu'=>4,'pid'=>32,], + ['title'=>'状态','name'=>'teach/Index/status','paixu'=>5,'pid'=>32], + // 学生管理权限 + ['title'=>'添加','name'=>'teach/Student/create','paixu' =>1,'pid'=>33], + ['title'=>'删除','name'=>'teach/Student/delete','paixu'=>2,'pid'=>33], + ['title'=>'编辑','name'=>'teach/Student/edit','paixu'=>3,'pid'=>33,], + ['title'=>'查看','name'=>'teach/Student/read','paixu'=>4,'pid'=>33,], + ['title'=>'状态','name'=>'teach/Student/status','paixu'=>5,'pid'=>33], + // 学期管理权限 + ['title'=>'添加','name'=>'teach/Xueqi/create','paixu' =>1,'pid'=>34], + ['title'=>'删除','name'=>'teach/Xueqi/delete','paixu'=>2,'pid'=>34], + ['title'=>'编辑','name'=>'teach/Xueqi/edit','paixu'=>3,'pid'=>34,], + ['title'=>'查看','name'=>'teach/Xueqi/read','paixu'=>4,'pid'=>34,], + ['title'=>'状态','name'=>'teach/Xueqi/status','paixu'=>5,'pid'=>34], + + // 系统设置 // 类别管理权限 ['title'=>'添加','name'=>'system/Category/create','paixu' =>1,'pid'=>11], diff --git a/route/teach.php b/route/teach.php new file mode 100644 index 00000000..0054d996 --- /dev/null +++ b/route/teach.php @@ -0,0 +1,15 @@ + +// +---------------------------------------------------------------------- + +//系统设置路由 +Route::resource('teacher','teach/Index'); +Route::resource('xueqi','teach/Xueqi'); +Route::resource('kaoshi','teach/Kaoshi');