UniversitiesDetail.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <div id="universityDetail" v-loading="loading" class="bg-page fx-column fx-cen-cen app-container">
  3. <index-card v-if="baseInfo" class="width100">
  4. <div slot="title" class="fx-row fx-sta-cen">
  5. <img class="pointer icon72" :src="baseInfo.logo" alt="" @click="toWindow(baseInfo.url)">
  6. <div class="fx-column ml30">
  7. <span class="f24 bold pf">{{ baseInfo.name }}</span>
  8. <div class="mt5 mb5">
  9. <el-tag v-for="item in formatFeatures" :key="item" class="mr5" size="mini">{{ item }}</el-tag>
  10. </div>
  11. <span class="f14 f-666">{{ formatLongInfo }}</span>
  12. </div>
  13. </div>
  14. <el-button slot="more" v-has-history size="small" round @click="$router.back()">返回</el-button>
  15. <!--Body-->
  16. <div class="tabs-wrap mb20">
  17. <span
  18. v-for="(tab, index) in tabs"
  19. :key="tab"
  20. class="tabs-item"
  21. :class="{'bg-primary':tabActive == index}"
  22. @click="tabActive = index"
  23. >{{ tab }}</span>
  24. </div>
  25. <!-- 院校概况 -->
  26. <keep-alive>
  27. <college-profile v-if="tabActive == 0" :code="code" :detail-data="detailData" />
  28. </keep-alive>
  29. <!-- 招生简章 -->
  30. <keep-alive>
  31. <enroll-list v-if="tabActive == 1" :code="code" />
  32. </keep-alive>
  33. <!-- 院校风采 -->
  34. <keep-alive>
  35. <university-style v-if="tabActive == 2" :code="code" />
  36. </keep-alive>
  37. <!-- 院校投档线 -->
  38. <keep-alive>
  39. <universities-line v-if="tabActive==3" :university-code="code" disabled-name-link disabled-level />
  40. </keep-alive>
  41. <!-- 专业投档线 -->
  42. <keep-alive>
  43. <colleges-line v-if="tabActive==4" :university-code="code" disabled-name-link />
  44. </keep-alive>
  45. <!-- 招生计划 -->
  46. <keep-alive>
  47. <enroll-plan-content v-if="tabActive == 5" :form="enrollForm" disabled-name-link />
  48. </keep-alive>
  49. <!-- 提前批 招生计划 -->
  50. <keep-alive>
  51. <prev-enroll-plan v-if="tabActive==6&&!isPreEnrollFormatted" :category="prevCategory" :university-code="code" />
  52. <prev-enroll-plan-v2 v-if="tabActive==6&&isPreEnrollFormatted" :category="prevCategory" :university-code="code" />
  53. </keep-alive>
  54. <!-- 提前批 投档线 -->
  55. <keep-alive>
  56. <prev-shift-line v-if="tabActive==7&&isPreEnrollSupport" :category="prevCategory" :university-code="code" />
  57. <prev-shift-line-v2 v-if="tabActive==7&&!isPreEnrollSupport" :category="prevCategory" :university-code="code" />
  58. </keep-alive>
  59. </index-card>
  60. <scroll-top />
  61. </div>
  62. </template>
  63. <script>
  64. import EnrollList from '../plan/components/EnrollList'
  65. import UniversityStyle from '../plan/components/UniversityDetail/UniversityStyle'
  66. import { selectUniversityDetail } from '@/api/webApi/career-course'
  67. import transferMixin from '@/components/mx-transfer-mixin'
  68. import IndexCard from '@/views/login/components/modules/shared/IndexCard'
  69. import ScrollTop from '@/components/ScrollTop/index'
  70. import CollegeProfile from '@/views/career/LibraryCollege/Tabs/CollegeProfile'
  71. import UniversityDetailData from '@/views/career/LibraryCollege/UniversityDetailData'
  72. import EnrollPlanContent from '@/views/career/plan/components/EnrollPlanContent'
  73. import CollegesLine from '@/views/career/components/CollegesLine'
  74. import UniversitiesLine from '@/views/career/components/UniversitiesLine'
  75. import { mapGetters } from 'vuex'
  76. import PrevEnrollPlan from '@/views/career/PrevBatch/PrevEnrollPlan.vue'
  77. import PrevEnrollPlanV2 from '@/views/career/PrevBatch/PrevEnrollPlanV2.vue'
  78. import PrevShiftLine from '@/views/career/PrevBatch/PrevShiftLine.vue'
  79. import PrevShiftLineV2 from '@/views/career/PrevBatch/PrevShiftLineV2.vue'
  80. import MxConst from '@/common/MxConst'
  81. export default {
  82. name: 'UniversityDetail',
  83. components: {
  84. PrevShiftLineV2,
  85. PrevShiftLine,
  86. PrevEnrollPlanV2,
  87. PrevEnrollPlan,
  88. UniversitiesLine,
  89. CollegesLine,
  90. EnrollPlanContent,
  91. CollegeProfile,
  92. ScrollTop,
  93. IndexCard,
  94. EnrollList,
  95. UniversityStyle
  96. },
  97. mixins: [transferMixin, UniversityDetailData],
  98. data() {
  99. return {
  100. code: '',
  101. tabs: ['院校概况', '招生简章', '院校风采', '院校投档线', '专业投档线', '招生计划', '特殊批招生计划', '特殊批投档线'],
  102. tabActive: 0,
  103. loading: false,
  104. detailData: null,
  105. enrollForm: {
  106. universityCode: '',
  107. year: '',
  108. type: '',
  109. level: '',
  110. universityNameText: ''
  111. }
  112. }
  113. },
  114. computed: {
  115. ...mapGetters(['isPreEnrollSupport', 'isPreEnrollFormatted']),
  116. prevCategory() {
  117. return '' // this.isPreEnrollSupport ? MxConst.enum.recruitPlanCategory.common : ''
  118. }
  119. },
  120. mounted() {
  121. this.code = this.prevData.code
  122. this.tabActive = (this.prevData.tab || 0) * 1
  123. this.enrollForm.universityCode = this.code
  124. this.loadUniversityDetail()
  125. },
  126. methods: {
  127. loadUniversityDetail() {
  128. selectUniversityDetail({ code: this.code }).then(res => this.detailData = res.data)
  129. }
  130. }
  131. }
  132. </script>
  133. <style lang="scss">
  134. #universityDetail {
  135. .tabs-wrap {
  136. border-bottom: 1px solid var(--themeColor);
  137. height: 40px;
  138. .tabs-item {
  139. cursor: pointer;
  140. padding: 0 24px;
  141. border-radius: 4px 4px 0 0;
  142. display: inline-block;
  143. line-height: 40px;
  144. &:hover {
  145. color: var(--themeColor);
  146. }
  147. &.bg-primary {
  148. background: var(--themeColor);
  149. color: white;
  150. }
  151. }
  152. }
  153. .format-tit {
  154. border-left: 4px solid var(--themeColor);
  155. padding-left: 10px;
  156. margin-bottom: 20px;
  157. font-size: 20px;
  158. }
  159. .info-tips {
  160. overflow: hidden;
  161. text-overflow: ellipsis;
  162. display: -webkit-box;
  163. -webkit-line-clamp: 4;
  164. -webkit-box-orient: vertical;
  165. word-wrap: break-word;
  166. }
  167. .list-item {
  168. display: flex;
  169. justify-content: space-between;
  170. align-items: center;
  171. border-bottom: 1px solid #f2f2f2;
  172. font-size: 14px;
  173. padding-bottom: 10px;
  174. .url:hover {
  175. color: var(--themeColor);
  176. }
  177. }
  178. .major-wrap {
  179. text-align: left;
  180. span {
  181. display: inline-block;
  182. margin-right: 20px;
  183. margin-top: 10px;
  184. margin-bottom: 10px;
  185. }
  186. a {
  187. display: inline-block;
  188. margin-right: 20px;
  189. margin-top: 10px;
  190. margin-bottom: 10px;
  191. &:hover {
  192. color: var(--themeColor);
  193. }
  194. }
  195. }
  196. }
  197. </style>