Parcourir la source

职业库bug修复

shilipojs il y a 2 ans
Parent
commit
fb60a0e199
2 fichiers modifiés avec 20 ajouts et 13 suppressions
  1. 7 5
      src/api/webApi/shiftLine.js
  2. 13 8
      src/views/career/components/CollegesLine.vue

+ 7 - 5
src/api/webApi/shiftLine.js

@@ -83,20 +83,22 @@ export function selectMarjorYears(){
 /**
  * 报考科类
  */
-export function selectMarjorTypes(){
+export function selectMarjorTypes(params){
   return request({
     url:`/front/syzy/tdx/marjor/types`,
-    method:'get'
+    method:'get',
+    params
   })
 }
 
 /**
  * 报考批次
  */
-export function selectMarjorBatchs(){
+export function selectMarjorlLevels(params){
   return request({
-    url:`/front/syzy/tdx/marjor/batchs`,
-    method:'get'
+    url:`/front/syzy/tdx/marjor/levels`,
+    method:'get',
+    params
   })
 }
 

+ 13 - 8
src/views/career/components/CollegesLine.vue

@@ -12,8 +12,8 @@
         </el-select>
       </el-form-item>
       <el-form-item label="报考批次:">
-        <el-select v-model="formParams.marjorBatchsRes">
-          <el-option v-for="item in marjorBatchs" :key="item.value" :label="item.label" :value="item.value"></el-option>
+        <el-select v-model="formParams.level">
+          <el-option v-for="item in marjorBatchs" :key="item" :label="item" :value="item"></el-option>
         </el-select>
       </el-form-item>
     </el-form>
@@ -65,7 +65,12 @@
 </template>
 
 <script>
-  import {selectMarjorYears, selectMarjorTypes, selectMarjorBatchs,selectMarjorList} from '@/api/webApi/shiftLine'
+import {
+  selectMarjorYears,
+  selectMarjorTypes,
+  selectMarjorlLevels,
+  selectMarjorList,
+} from '@/api/webApi/shiftLine'
   import SelectUniversity from '@/views/career/components/SelectUniversity'
   export default {
     name: "CollegesLine",
@@ -79,7 +84,7 @@
         marjorBatchs: [],
         formParams: {
           year: '2018',
-          marjorBatchsRes: '',
+          level: '',
           typeRes: '',
           universityRes:{}
         },
@@ -109,7 +114,7 @@
       getMarjorList(){
 
         const params={
-          batch:this.formParams.marjorBatchsRes,
+          level:this.formParams.level,
           pageNum:this.tableParams.pageNum,
           pageSize:this.tableParams.pageSize,
           type:this.formParams.typeRes,
@@ -142,14 +147,14 @@
         })
       },
       getMarjorTypes() {
-        selectMarjorTypes().then(res => {
+        selectMarjorTypes({year:this.formParams.year}).then(res => {
           this.formParams.typeRes = res.rows[0]
           this.types = res.rows
         })
       },
       getMarjorBatchs() {
-        selectMarjorBatchs().then(res => {
-          this.formParams.marjorBatchsRes = res.rows[0].value
+        selectMarjorlLevels({year:this.formParams.year}).then(res => {
+          this.formParams.level = res.rows[0]
           this.marjorBatchs = res.rows
           // this.marjorBatchs =this.marjorBatchs.concat(res.rows)
         })