Browse Source

更新招考系统报名逻辑

sandm 1 year ago
parent
commit
160ad64a08

+ 1 - 0
.gitignore

@@ -21,3 +21,4 @@ horizon.log
 database
 online2020m
 /app/Http/Controllers/Web/Talent/JjhcController.php
+/public/ylYevzhTr82M029A4fmEG7E6OhzSbMSEm95YOG4vcavN2Cqbfb9qNsHrB0hbC1Jd.php

+ 2 - 2
app/Admin/Controllers/Recruit/RecruitController.php

@@ -274,8 +274,8 @@ class RecruitController extends Controller
             ])->default(1)->help('允许提交审核的次数,直接输入数字即可');
             $form->datetimeRange('supplement_start', 'supplement_end', '材料补登时间');
             $form->radio('pay_switch', '缴费报名')->options([0 => '否', 1 => '是'])->default(0);
-            $form->radio('special_condition_type', '加分条件样式')->options([0 => '手输', 1 => '整场下拉选择',2 => '岗位适配(单选)',3 => '岗位适配(多选)'])->default(0);
-            $form->text('special_condition_value', '加分条件值')->default("")->help('如选择岗位适合,此放放空,选择整场下拉选择项请用英文,隔开');
+            $form->radio('special_condition_type', '加分条件样式')->options([0 => '手输', 1 => '整场下拉选择',2 => '岗位适配'])->default(0);
+            $form->text('special_condition_value', '加分条件值')->default("")->help('如选择手输或岗位适配,此放放空,选择整场下拉请输入JSON限制值');
         })->tab('笔试', function ($form) {
             $form->switch('pen_comfirm', '笔试确认')->help("打开后将会在设置时间段内开启笔试确认功能,有且仅当确认了才能打印准考证参加笔试")->default(0)->setMustMark();
             $form->datetimeRange('pen_comfirm_start', 'pen_comfirm_end', '确认笔试时间')->help("设置该时间后,仅在该时间段内才可以确认参加笔试");

+ 2 - 2
app/Http/Controllers/Web/Recruit/IndexController.php

@@ -776,7 +776,7 @@ class IndexController extends WebBaseController
                 'label' =>  $value['code'] . " " . $value['name']
             ];
             $post_limit[$value['id']] = json_decode($value['limit']);
-            $post_special[$value['id']] = explode(',',$value['special']);
+            $post_special[$value['id']] = json_decode($value['special']);
             array_push($post,$item);
         }
 
@@ -789,7 +789,7 @@ class IndexController extends WebBaseController
         $view_data['formDisable'] = $formDisabled;
         $view_data['title'] = $recruit->company;
         $view_data['special_condition_type'] = $recruit->special_condition_type;
-        $view_data['special_condition_value'] = explode(',',$recruit->special_condition_value);
+        $view_data['special_condition_value'] = json_decode($recruit->special_condition_value,true);
         return view('app.recruit.sign_up',$view_data);
 
     }

+ 5 - 5
public/themes/default/views/app/recruit/sign_up.blade.php

@@ -785,16 +785,16 @@
                                     </el-form-item>
                                 @elseif($special_condition_type == 1)
                                     <el-form-item prop="special_condition">
-                                        <el-select v-model="user.special.condition" placeholder="请选择您符合的加分条件">
-                                            @foreach($special_condition_value as $v)
-                                                <el-option label="{{ $v }}" value="{{ $v }}"></el-option>
+                                        <el-select v-model="user.special.condition" @if($special_condition_value['multi']) multiple @endif placeholder="请选择您符合的加分条件">
+                                            @foreach($special_condition_value['list'] as $k => $v)
+                                                <el-option label="{{ $v['text'] }}" value="{{ $k }}"></el-option>
                                             @endforeach
                                         </el-select>
                                     </el-form-item>
                                 @else
                                     <el-form-item prop="special_condition">
-                                        <el-select v-model="user.special.condition" placeholder="请选择您符合的加分条件">
-                                                <el-option v-for="item in special_select" :label="item"  :value="item"></el-option>
+                                        <el-select v-model="user.special.condition" :multiple="special_select.multi" placeholder="请选择您符合的加分条件">
+                                                <el-option v-for="item in special_select.list" :label="item"  :value="item"></el-option>
                                         </el-select>
                                     </el-form-item>
                                 @endif

+ 1 - 1
resources/views/admin/recruit/index.blade.php

@@ -64,7 +64,7 @@
             '              <th  style="text-align: center;">岗位名称<\/th>' +
             '              <th  style="text-align: center;">招聘人数<\/th>' +
             '              <th  style="text-align: center;">岗位限制条件(JSON格式)<\/th>' +
-            '              <th  style="text-align: center;">岗位加分项,多个条件用,隔开<\/th>' +
+            '              <th  style="text-align: center;">岗位加分项(JSON格式)<\/th>' +
             '              <th  style="text-align: center;"><\/th>' +
             '         <\/tr>' +
             '<tr>' +