select-subject.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <el-row :gutter="20">
  3. <el-col :span="12">
  4. <el-card>
  5. <template #header>
  6. <div class="fx-row fx-bet-cen">
  7. 您的自选专业:
  8. <el-button @click="toMatch">整体匹配</el-button>
  9. </div>
  10. </template> <div>
  11. <el-popover
  12. placement="bottom"
  13. trigger="hover"
  14. v-for="item in optionalMajors"
  15. >
  16. <el-button type="primary" @click="toGroupMatch(item)">匹配组合</el-button>
  17. <el-tag class="mr10 mb10" type="success" slot="reference">{{ item.majorCategoryName }}</el-tag>
  18. </el-popover>
  19. </div>
  20. </el-card>
  21. </el-col>
  22. <el-col :span="12">
  23. <el-card>
  24. <template #header>
  25. <div class="fx-row fx-bet-cen">
  26. 您的测评推荐专业:
  27. <el-button>整体匹配</el-button>
  28. </div>
  29. </template>
  30. </el-card>
  31. </el-col>
  32. <!-- 整体组合匹配 -->
  33. <group-match ref="groupMatch"></group-match>
  34. <!-- 单组合匹配-->
  35. <single-group-match ref="singleMatch"></single-group-match>
  36. </el-row>
  37. </template>
  38. <script>
  39. import GroupMatch from './groups-match'
  40. import SingleGroupMatch from './single-group-match'
  41. export default {
  42. components: {
  43. GroupMatch,
  44. SingleGroupMatch
  45. },
  46. props: {
  47. list: {
  48. type:Array,
  49. default: _ => {}
  50. },
  51. optionalMajors: {
  52. type:Array,
  53. default: _ => {}
  54. }
  55. },
  56. data() {
  57. return {
  58. dialogVisible:false,
  59. propDefines: {},
  60. }
  61. },
  62. created() {
  63. },
  64. methods: {
  65. // 整体组合匹配
  66. toMatch() {
  67. this.$refs.groupMatch.open(this.list,this.optionalMajors)
  68. },
  69. // 单组合匹配
  70. toGroupMatch(major) {
  71. this.$refs.singleMatch.open(major,this.list)
  72. }
  73. }
  74. }
  75. </script>
  76. <style scoped>
  77. </style>