UniversitiesColleges.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <div ref="UniversitiesColleges" class="app-container" >
  3. <el-card :style="{'background-image':backimg}" style="padding:30px;margin:10px 0;background-color:white;background-repeat: no-repeat;background-position: bottom right;">
  4. <p style="color:#A6A6A6;font-size:24px;font-weight:bold;">UNIVERSITIES AND COLLECGES</p>
  5. <p style="color:#414141;font-size:24px;font-weight:bold;">院校库</p>
  6. <hr class="layui-bg-orange" style="width:40px;height:4px;margin-top:10px;" />
  7. </el-card>
  8. <el-card style="background-color: #ffffff;font-size: 14px;padding:5px;">
  9. <div slot="header" class="radioInput" >
  10. <span class="radioTitle" :class="filter_type == 'all'?'active' : ''" @click="filter_type= 'all'">全部院校</span>
  11. <span class="radioTitle" :class="filter_type == 'top'?'active' : ''" @click="filter_type= 'top'">大学排名</span>
  12. </div>
  13. <keep-alive>
  14. <all-university v-if="filter_type == 'all'"></all-university>
  15. </keep-alive>
  16. <keep-alive>
  17. <rank-university v-if="filter_type == 'top'"></rank-university>
  18. </keep-alive>
  19. </el-card>
  20. </div>
  21. </template>
  22. <script>
  23. import { mapState } from 'vuex';
  24. import AllUniversity from '@/views/career/plan/compoents/AllUniversity';
  25. import RankUniversity from '@/views/career/plan/compoents/RankUniversity';
  26. export default {
  27. name: "UniversitiesColleges",
  28. components:{
  29. AllUniversity,
  30. RankUniversity
  31. },
  32. data() {
  33. return {
  34. backimg: 'url(' + require('@/assets/images/career/icon_colleges.png') + ')',
  35. filter_type:'all'
  36. }
  37. },
  38. computed: {
  39. ...mapState({ theme: state => state.settings.theme }),
  40. },
  41. watch: {
  42. theme: {
  43. immediate: true,
  44. handler(val) {
  45. this.$nextTick(() => {
  46. this.$refs.UniversitiesColleges.style.setProperty('--themeColor', val)
  47. })
  48. }
  49. },
  50. },
  51. methods: {
  52. }
  53. }
  54. </script>
  55. <style lang="scss" scoped>
  56. .layui-bg-orange {
  57. background-color: var(--themeColor);
  58. margin-left: 0;
  59. }
  60. .radioInput{
  61. background-color: #ffffff;
  62. padding:5px;
  63. padding-left: 30px;
  64. .radioTitle{
  65. cursor: pointer;
  66. display: inline-block;
  67. width: 80px;
  68. font-size: 14px;
  69. padding: 5px 10px ;
  70. text-align: center;
  71. &.active{
  72. color: #fff;
  73. border-radius: 4px ;
  74. border: none;
  75. font-weight: 400;
  76. background: #42b983;
  77. }
  78. }
  79. }
  80. </style>