get_type_title_list = MaintainConstant::get_type_title_list(); } /** * 列表 * @auth true * @menu true * @throws \think\Exception * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ public function index() { $this->title = '维修人员列表'; $query = $this->_query($this->table) ->field('is_deleted',true) ->where('is_deleted', CommonConstant::IS_DELETED_0) ->like('name,mobile'); $query->page(); } /** * 列表数据处理 * @param array $data * @throws \Exception */ protected function _index_page_filter(&$data) { } /** * 启用 * @auth true * @throws \think\Exception * @throws \think\exception\PDOException */ public function resume() { $this->applyCsrfToken(); $this->_save($this->table, ['status' => CommonConstant::STATUS_NORMAL]); } /** * 禁用 * @auth true * @throws \think\Exception * @throws \think\exception\PDOException */ public function forbid() { $this->applyCsrfToken(); $this->_save($this->table, ['status' => CommonConstant::STATUS_FROZEN]); } /** * 删除 * @auth true * @throws \think\Exception * @throws \think\exception\PDOException */ public function remove() { $this->applyCsrfToken(); $this->_delete($this->table); } }