'ID', 'code' => 'Code', 'name' => 'Name', 'state' => 'State', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } //返回全部信息 static public function getAllData($mtype=0){ $list = self::find() ->where('state = 1 and mtype ='.$mtype) ->orderBy('id ASC') ->all(); return $list; } public function getShowName() { return $this->name; } public function getShowType() { switch($this->mtype){ case 1: $type = '新保(续保)组'; break; case 2: $type = '跟踪组'; break; default: $type = '(未选择)'; } return $type; } }