123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?php
- // +----------------------------------------------------------------------
- // | ThinkAdmin
- // +----------------------------------------------------------------------
- // | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
- // +----------------------------------------------------------------------
- // | 官方网站: http://demo.thinkadmin.top
- // +----------------------------------------------------------------------
- // | 开源协议 ( https://mit-license.org )
- // +----------------------------------------------------------------------
- // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
- // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
- // +----------------------------------------------------------------------
- namespace app\approve\controller;
- use app\common\constant\CommonConstant;
- use app\common\constant\EvectionConstant;
- use app\common\constant\LeaveConstant;
- use app\common\constant\MaintainConstant;
- use library\Controller;
- /**
- * 审批流程设置
- */
- class ApproveFlow extends Controller
- {
- /**
- * 绑定数据表
- * @var string
- */
- protected $table = 'ApproveFlow';
- /**
- * 列表
- * @auth true
- * @menu true
- * @throws \think\Exception
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\ModelNotFoundException
- * @throws \think\exception\DbException
- */
- public function index()
- {
- $module = input('module');
- $get_item_list = [];
- switch ($module){
- case CommonConstant::MODULE_5:
- $get_item_list = EvectionConstant::get_type_list();
- break;
- case CommonConstant::MODULE_6:
- $get_item_list = LeaveConstant::get_time_list();
- break;
- case CommonConstant::MODULE_8:
- $get_item_list = MaintainConstant::get_type_list();
- break;
- }
- $this->get_item_list = $get_item_list;
- $this->get_type_list = CommonConstant::get_type_list();
- $this->get_module_list = CommonConstant::get_module_list();
- $this->title = $this->get_module_list[$module].'审批流程';
- $query = $this->_query($this->table)
- ->where('module',$module);
- $query->page(false);
- }
- /**
- * 列表数据处理
- * @param array $data
- * @throws \Exception
- */
- protected function _index_page_filter(&$data)
- {
- foreach ($data as &$value) {
- }
- }
- /**
- * 编辑
- * @auth true
- */
- public function edit()
- {
- $this->title = '编辑';
- $this->_form($this->table, 'form');
- }
- /**
- * 数据处理
- * @auth true
- * @menu true
- * @param array $data
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\ModelNotFoundException
- * @throws \think\exception\DbException
- */
- protected function _form_filter(&$data)
- {
- if($this->request->isGet()) {
- // $this->all_user = User::where('is_deleted',0)->column('name','id');
- }
- }
- /**
- * 列表
- */
- public function flow()
- {
- $this->title = '审批流';
- $list = CommonConstant::get_module_list();
- return $this->fetch('', compact("list"));
- }
- }
|