1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <template>
- <div class="app-container" style="margin:0 10%">
- <evaluation-title
- navBackButton
- title="志愿详情"
- ></evaluation-title>
- <el-card class="box-card">
- <zhiyuan-list @expand="expand" :tableList="rows" :loading="loading" :cols="cols" readonly></zhiyuan-list>
- </el-card>
- </div>
- </template>
- <script>
- import ZhiyuanList from '@/views/career/zhiyuan/components/zhiyuan-list'
- import { getRecommendVoluntary, getVoluntaryHeaders, getVoluntaryMarjors } from '@/api/webApi/professlib'
- export default {
- components: {
- ZhiyuanList
- },
- data() {
- return {
- cols: [],
- rows: [],
- data: {},
- loading: false
- }
- },
- created() {
- this.data = JSON.parse(this.$route.query.data)
- this.getCols()
- this.getList()
- },
- methods: {
- getCols() {
- getVoluntaryHeaders({
- mode: this.data.mode
- // year: this.batch.year
- }).then(res => {
- 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,
- mode: this.data.mode,
- score: this.data.score,
- wishResId: this.data.id
- }
- const pageForm = {
- pageSize: 10,
- pageNum: 1
- }
- getRecommendVoluntary({ ...data }, { ...pageForm }).then(res => {
- console.log(res)
- const rows = res.rows.map(item => {
- item.isExpand = false
- item.majors = []
- item.recruitPlan = item.recruitPlan || {}
- return item
- })
- this.rows = rows
- })
- }
- }
- }
- </script>
- <style scoped>
- </style>
|