From 343bd2918cb227e47969ffad0a3fd2a7833ba1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Thu, 27 Dec 2018 16:30:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E8=8D=A3=E8=AA=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/rongyu/controller/DwRongyu.php | 15 +++- application/rongyu/view/dw_rongyu/create.html | 81 +++++++++---------- application/rongyu/view/dw_rongyu/index.html | 31 ++++--- .../migrations/20181218041034_dw_rongyu.php | 1 + 4 files changed, 69 insertions(+), 59 deletions(-) diff --git a/application/rongyu/controller/DwRongyu.php b/application/rongyu/controller/DwRongyu.php index 1beb1caf..8ea38e1c 100644 --- a/application/rongyu/controller/DwRongyu.php +++ b/application/rongyu/controller/DwRongyu.php @@ -66,12 +66,14 @@ class DwRongyu extends Base $dwry = new dwry(); // 获取荣誉总数 - $datacnt = $dwry->select()->count(); + $cnt = $dwry->select()->count(); // 查询数据 $data = $dwry->search($search); + $datacnt = $data->count(); - $cnt = $data->count(); + // 获取当前页数据 + $data = $data->slice($limit_start,$limit_length); // 重组返回内容 $data = [ @@ -91,7 +93,14 @@ class DwRongyu extends Base */ public function create() { - // + // 设置页面标题 + $list['title'] = '添加单位荣誉'; + + // 模板赋值 + $this->assign('list',$list); + + // 渲染 + return $this->fetch(); } /** diff --git a/application/rongyu/view/dw_rongyu/create.html b/application/rongyu/view/dw_rongyu/create.html index 68579819..a8d89e4c 100644 --- a/application/rongyu/view/dw_rongyu/create.html +++ b/application/rongyu/view/dw_rongyu/create.html @@ -2,47 +2,32 @@ {block name="formaa"}
- +
- +
- -
- + +
+ + {php}$list = getCategory(109);{/php} + +
- -
-
- - -
-
- - -
-
- - -
-
-
-
- -
- -
-
-
- +
- {php} $school = schlist('校级','校级');{/php} + {php} $school = schlist('校级','区级');{/php} +
+
+
+
- - {php} - $njlist = nianjiList(); - {/php} - + + {volist name="school" id="vo"} + + {/volist}
- +
- + + {volist name="list" id="vo"} + + {/volist}
diff --git a/application/rongyu/view/dw_rongyu/index.html b/application/rongyu/view/dw_rongyu/index.html index 11f8c3e1..d67afd3b 100644 --- a/application/rongyu/view/dw_rongyu/index.html +++ b/application/rongyu/view/dw_rongyu/index.html @@ -16,12 +16,17 @@
- + 批量删除 + + + + 批量上传 + - + 添加荣誉 @@ -89,11 +94,12 @@ - 姓名 - 性别 - 年龄 - 学校 - 班级 + 荣誉名称 + 获奖单位 + 荣誉类别 + 奖项 + 发证单位 + 发证时间 状态 操作 @@ -148,11 +154,12 @@ // 定义列参数 var mycolumns = [ { "data": "id" }, - { "data": "xingming" }, - { "data": "sex" }, - { "data": "age" ,"defaultContent": "","name":"shengri"}, - { "data": "stu_school.title","name":"school"}, - { "data": "stu_banji.title","name":"banji"}, + { "data": "title" }, + { "data": "hjschool" }, + { "data": "category"}, + { "data": "jiangxiang"}, + { "data": "fzschool" }, + { "data": "fzshijian" }, { "data": "status" }, { "data": "id" }, ]; diff --git a/database/migrations/20181218041034_dw_rongyu.php b/database/migrations/20181218041034_dw_rongyu.php index 62191e3b..7eb870fa 100644 --- a/database/migrations/20181218041034_dw_rongyu.php +++ b/database/migrations/20181218041034_dw_rongyu.php @@ -38,6 +38,7 @@ class DwRongyu extends Migrator ->addColumn('fzschool','integer',['limit'=>11,'null'=>false,'comment'=>'发证单位']) ->addColumn('fzshijian','integer',['limit'=>11,'null'=>false,'comment'=>'发证时间']) ->addColumn('category','string',['limit'=>100,'null'=>false,'comment'=>'荣誉图片']) + ->addColumn('jiangxiang','integer',['limit'=>11,'null'=>false,'comment'=>'奖项']) ->addColumn('pic','integer',['limit'=>15,'null'=>false,'comment'=>'荣誉类型']) ->addColumn('create_time','integer',['limit'=>11,'null'=>true,'comment'=>'创建时间']) ->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间'])