|
|
|
|
@ -52,6 +52,7 @@ class QuestionnaireController extends Controller
|
|
|
|
|
if (!!$question) {
|
|
|
|
|
if ($level < 3) {
|
|
|
|
|
$question->option = json_decode($question->option, true);
|
|
|
|
|
|
|
|
|
|
$item_data = [
|
|
|
|
|
'id' => $question->id,
|
|
|
|
|
'type' => $question->type,
|
|
|
|
|
@ -63,7 +64,13 @@ class QuestionnaireController extends Controller
|
|
|
|
|
$item_data['value'] = $v;
|
|
|
|
|
$item_data['placeholder'] = $question->option['input']['placeholder'];
|
|
|
|
|
} else {
|
|
|
|
|
$item_data['value'] = '';
|
|
|
|
|
if($question->question=='性别'){
|
|
|
|
|
if($person->sex==1) $vl=0;
|
|
|
|
|
if($person->sex==2) $vl=1;
|
|
|
|
|
}else{
|
|
|
|
|
$vl='';
|
|
|
|
|
}
|
|
|
|
|
$item_data['value'] = $vl;
|
|
|
|
|
$select = $question->option['select']['value'];
|
|
|
|
|
$select_array = [];
|
|
|
|
|
foreach ($select as $select_value) {
|
|
|
|
|
|