作者 sgj
1 个管道 的构建 通过 耗费 2 秒

进修前台页面完成

<?php
/**
* Created by PhpStorm.
* auther: sgj
* Date: 2019/1/15
* Time: 11:10
*/
namespace app\admin\controller;
use cmf\controller\AdminBaseController;
/**
* Class GroupController
* @package app\admin\controller
* @adminMenuRoot(
* 'name' => '审批管理',
* 'action' => 'default',
* 'parent' => '',
* 'display'=> true,
* 'order' => 10000,
* 'icon' => '',
* 'remark' => ''
* )
*/
class ApprovalController extends AdminBaseController
{
/**
*进修审批列表
* @adminMenu(
* 'name' => '进修审批列表',
* 'parent' => 'default',
* 'display'=> true,
* 'hasView'=> true,
* 'order' => 10000,
* 'icon' => '',
* 'remark' => '进修审批管理',
* 'param' => ''
* )
*/
public function engageList(){
$map['delete_time']=null;
$list=db('engage')->where($map)->order('id','desc')->paginate('20');
$page = $list->render();
$this->assign('list', $list);
$this->assign('page', $page);
return $this->fetch();
}
/**
*进修详情
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function engageDetail(){
$id=input('id');
$info=db('engage')->where('id',$id)->find();
dump($info);
$this->assign('info',$info);
return $this->fetch();
}
}
\ No newline at end of file
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a></a></li>
</ul>
<!-- <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index')}">
用户ID:
<input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
placeholder="请输入用户ID">
关键字:
<input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
placeholder="用户名/昵称/邮箱">
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="{:url('user/adminIndex/index')}">清空</a>
</form>-->
<form method="post" class="js-ajax-form">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>ID</th>
<th>姓名</th>
<th>进行专业</th>
<th>进修单位</th>
<th>进修时长</th>
<th>提交时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<foreach name="list" item="vo">
<tr>
<td>{$vo.id}</td>
<td>{$vo.user_name}</td>
<td>{$vo.profession}</td>
<td>{$vo.hospital_name}</td>
<td>{$vo.duration}月</td>
<td>{:date('Y-m-d H:i:s',$vo.add_time)}</td>
<td>
<a href="{:url('engageDetail',['id'=>$vo.id])}">查看详情</a>
<a href="">删除</a>
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$page}</div>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -73,7 +73,6 @@
<text>等待平台回答</text>
</div>
<div class="user_info_box">
</div>
</div>
</if>
... ...