|
@@ -1,21 +1,22 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <zhiyuan-list @expand="expand" :tableList="rows" :loading="loading" :cols="cols"></zhiyuan-list>
|
|
|
+ <zhiyuan-list @expand="expand" :tableList="rows" :loading="loading" :cols="cols" readonly></zhiyuan-list>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import ZhiyuanList from '@/views/career/zhiyuan/components/zhiyuan-list';
|
|
|
+import ZhiyuanList from '@/views/career/zhiyuan/components/zhiyuan-list'
|
|
|
import { getRecommendVoluntary, getVoluntaryHeaders, getVoluntaryMarjors } from '@/api/webApi/professlib'
|
|
|
+
|
|
|
export default {
|
|
|
- components:{
|
|
|
+ components: {
|
|
|
ZhiyuanList
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- cols:[],
|
|
|
- rows:[],
|
|
|
- data:{},
|
|
|
- loading:false
|
|
|
+ cols: [],
|
|
|
+ rows: [],
|
|
|
+ data: {},
|
|
|
+ loading: false
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -23,10 +24,10 @@ export default {
|
|
|
this.getCols()
|
|
|
this.getList()
|
|
|
},
|
|
|
- methods:{
|
|
|
+ methods: {
|
|
|
getCols() {
|
|
|
getVoluntaryHeaders({
|
|
|
- mode:this.data.mode,
|
|
|
+ mode: this.data.mode
|
|
|
// year: this.batch.year
|
|
|
}).then(res => {
|
|
|
this.cols = res.data
|
|
@@ -34,10 +35,10 @@ export default {
|
|
|
},
|
|
|
expand(item) {
|
|
|
console.log(item)
|
|
|
- if(item.isExpand) {
|
|
|
+ if (item.isExpand) {
|
|
|
// 取消
|
|
|
return
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
item.isExpand = true
|
|
|
this.getVoluntaryMarjors(item)
|
|
|
}
|
|
@@ -46,11 +47,11 @@ export default {
|
|
|
getVoluntaryMarjors(
|
|
|
{
|
|
|
batchName: this.data.name,
|
|
|
- // // collegeCode: item.recruitPlan.collegeCode,
|
|
|
+ collegeCode: item.recruitPlan.collegeCode,
|
|
|
mode: this.data.mode,
|
|
|
// // universityId: item.recruitPlan.universityId,
|
|
|
// // year: item.recruitPlan.year,
|
|
|
- wishResId:this.data.id
|
|
|
+ wishResId: this.data.id
|
|
|
}
|
|
|
).then(res => {
|
|
|
item.majors = res.data.map(item => {
|
|
@@ -69,18 +70,18 @@ export default {
|
|
|
}
|
|
|
const pageForm = {
|
|
|
pageSize: 10,
|
|
|
- pageNum:1
|
|
|
+ pageNum: 1
|
|
|
}
|
|
|
- getRecommendVoluntary({ ...data }, { ...pageForm }).then(res =>{
|
|
|
+ getRecommendVoluntary({ ...data }, { ...pageForm }).then(res => {
|
|
|
console.log(res)
|
|
|
const rows = res.rows.map(item => {
|
|
|
item.isExpand = false
|
|
|
item.majors = []
|
|
|
return item
|
|
|
})
|
|
|
- this.rows = rows
|
|
|
+ this.rows = rows
|
|
|
})
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|