<template>
    <el-dialog
      append-to-body
      v-if="dialogVisible"
      title="选择自选专业"
      :visible.sync="dialogVisible"
      :close-on-click-modal ="false"
      width="70%"
    >
      <subject-choice :course0="course0" :course1="course1" :year="year" ></subject-choice>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="cancel">确 定</el-button>
      </span>
    </el-dialog>
</template>
<script>
import SubjectChoice from'@/views/career/subject/subjectChoice'
export default {
  components: {
    SubjectChoice
  },
  inject: ['optionalMajors'],
  data() {
    return{
      dialogVisible:false,
      course0: '',
      year: '',
      course1: '',
    }
  },
  methods: {
    open(course0, course1,year) {
      this.dialogVisible = true
      this.year = year
      this.course0 = course0
      this.course1 = course1
    },
    cancel() {
      this.dialogVisible = false
      this.optionalMajors()
      this.$emit('chooseReally',)
    }
  }
}
</script>
<style scoped>
</style>
