예제 #1
0
 /**
  * Lists all Record models.
  * @return mixed
  */
 public function actionIndex()
 {
     $teClass = new teClass();
     $admin = new Users();
     $searchModel = new RecordSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $id = $searchModel->searchID();
     // var_dump($id);
     // die;
     $academy = $searchModel->searchacademy();
     $te_id = $searchModel->searchte_id();
     $array = $admin->getRole($te_id);
     //根据不同角色返回不同的查看权限
     $classArray = $teClass->getRoleClass($id, $te_id, $academy);
     $major = $teClass->getClass($id, $te_id, $academy);
     // var_dump($major);die;
     return $this->render('index', ['te_id' => $te_id, 'array' => $array, 'academy' => $academy, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'classArray' => $classArray, 'major' => $major]);
 }
예제 #2
0
 /**
  * Lists all Record models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new RecordSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }