123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <?php
- // +----------------------------------------------------------------------
- // | ThinkAdmin
- // +----------------------------------------------------------------------
- // | 版权所有 2014~2022 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
- // +----------------------------------------------------------------------
- // | 官方网站: https://thinkadmin.top
- // +----------------------------------------------------------------------
- // | 开源协议 ( https://mit-license.org )
- // | 免费声明 ( https://thinkadmin.top/disclaimer )
- // +----------------------------------------------------------------------
- // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
- // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
- // +----------------------------------------------------------------------
- namespace app\admin\controller;
- use app\data\model\DataPoolTalent;
- use app\data\model\DataTeachingKnowledge;
- use app\data\model\DataZhicheng;
- use Carbon\Carbon;
- use think\admin\Controller;
- use app\data\model\SystemUser;
- use think\Db;
- use think\db\Query;
- /**
- * 知识教学管理
- * Class PoolTalent
- * @package app\admin\controller
- */
- class TeachingKnowledge extends Controller
- {
- /**
- * 知识教学申请管理
- * @auth true
- * @menu true
- */
- public function index(){
- $this->title='知识教学列表';
- $name=input('name');
- DataTeachingKnowledge::mQuery()
- ->when($name,function (Query $query) use ($name) {
- $query->hasWhere('user',function (Query $query) use ($name) {
- $query->whereLike('nickname',"%{$name}%");
- });
- })
- ->like('title')
- ->with(['user'])
- ->where('type',1)
- ->where('is_del',1)
- ->order('id','desc')
- ->layTable();
- }
- protected function _index_page_filter(&$data)
- {
- }
- /**
- * 知识教学添加
- * @auth true
- * @menu true
- */
- public function add(){
- DataTeachingKnowledge::mForm('form');
- }
- /**
- * 知识教学编辑
- * @auth true
- * @menu true
- */
- public function edit(){
- DataTeachingKnowledge::mForm('form');
- }
- public function _form_filter($vo){
- if ($this->request->isGet()) {
- if (isset($vo['id'])){
- if (isset($vo['imgs'])){
- //$vo['imgs']= implode('|',explode(',',implode(',',$vo['imgs'])));
- }
- $this->assign('vo',$vo);
- $this->fetch('form');
- }
- }elseif ($this->request->isPost()){
- }
- }
- /**
- * 删除
- * @auth true
- * @menu true
- */
- public function del($id){
- DataTeachingKnowledge::whereIn('id',$id)->save([
- 'is_del'=>0,
- ]);
- $this->success('删除成功');
- }
- /**
- * 知识教学设置
- * @auth true
- * @menu true
- */
- public function setting(){
- $this->title='系统设置';
- if($this->request->isGet()){
- $config=systemConfig('teaching_config');
- $this->assign('config',$config);
- $this->fetch();
- }else{
- $data=$this->request->post();
- systemConfig('teaching_config',$data);
- $this->success('保存成功');
- }
- }
- }
|