|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <zhiyuan-list :tableList="rows" :cols="cols"></zhiyuan-list>
|
|
|
+ <zhiyuan-list @expand="expand" :tableList="rows" :loading="loading" :cols="cols"></zhiyuan-list>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import ZhiyuanList from '@/views/career/zhiyuan/components/zhiyuan-list';
|
|
|
-import { getRecommendVoluntary, getVoluntaryHeaders } from '@/api/webApi/professlib'
|
|
|
+import { getRecommendVoluntary, getVoluntaryHeaders, getVoluntaryMarjors } from '@/api/webApi/professlib'
|
|
|
export default {
|
|
|
components:{
|
|
|
ZhiyuanList
|
|
@@ -14,11 +14,12 @@ export default {
|
|
|
return {
|
|
|
cols:[],
|
|
|
rows:[],
|
|
|
- data:{}
|
|
|
+ data:{},
|
|
|
+ loading:false
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.data = this.$route.params.data
|
|
|
+ this.data = JSON.parse(this.$route.query.data)
|
|
|
this.getCols()
|
|
|
this.getList()
|
|
|
},
|
|
@@ -31,6 +32,34 @@ export default {
|
|
|
this.cols = res.data
|
|
|
})
|
|
|
},
|
|
|
+ expand(item) {
|
|
|
+ console.log(item)
|
|
|
+ if(item.isExpand) {
|
|
|
+ // 取消
|
|
|
+ return
|
|
|
+ }else {
|
|
|
+ item.isExpand = true
|
|
|
+ this.getVoluntaryMarjors(item)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getVoluntaryMarjors(item) {
|
|
|
+ getVoluntaryMarjors(
|
|
|
+ {
|
|
|
+ batchName: this.data.name,
|
|
|
+ // // collegeCode: item.recruitPlan.collegeCode,
|
|
|
+ mode: this.data.mode,
|
|
|
+ // // universityId: item.recruitPlan.universityId,
|
|
|
+ // // year: item.recruitPlan.year,
|
|
|
+ wishResId:this.data.id
|
|
|
+ }
|
|
|
+ ).then(res => {
|
|
|
+ item.majors = res.data.map(item => {
|
|
|
+ item.selected = false
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
getList() {
|
|
|
const data = {
|
|
|
batchName: this.data.batchName,
|