subject_suitable_profession.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <div class="development_stage">
  3. <head-component :headinfo=headinfo></head-component>
  4. <div class="page-content">
  5. <div class="page-box">
  6. <p class="title">高中学科</p>
  7. <div class="two-page-result">
  8. <div v-for="(item,index) in subject"
  9. :class="{
  10. 'item-result-box-active': activeIndex === index,
  11. 'item-result-box': activeIndex !== index
  12. }"
  13. @click="detail(item.value,index)">
  14. <div v-html="item.value"></div>
  15. </div>
  16. </div>
  17. <p class="title">大学专业</p>
  18. <div class="two-page-result">
  19. <div v-for="(item,index) in data_list"
  20. :class="[item.selected?'item-result-box-active':'item-result-box']"
  21. @click="jumpToPro_details_video(item)">
  22. <div v-html="item.major"></div>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. <!-- <drag_component></drag_component>-->
  28. </div>
  29. </template>
  30. <script setup>
  31. import {onMounted} from "vue";
  32. import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
  33. import Drag_component from "@/views/xjc-integratedmachine/components/drag_component.vue";
  34. const headinfo = ref({})
  35. function setHeadinfo() {
  36. headinfo.value = {
  37. title: '学科适合专业',
  38. user: {
  39. avatar: '头像路径',
  40. nickName: '张三'
  41. },
  42. backUrl: '/xjc-integratedmachine/wakeup/career_recognize/index'
  43. }
  44. }
  45. import {subjectspecialdetail} from '@/api/xjc-integratedmachine/environment/tscareer.js'
  46. const router = useRouter()
  47. const {proxy} = getCurrentInstance()
  48. const {subject} = proxy.useDict('subject')
  49. const activeIndex = ref(null)
  50. const data_list = ref([])
  51. function detail(data, index) {
  52. setActive(index)
  53. subjectspecialdetail({
  54. id: data
  55. }).then(resp => {
  56. data_list.value = resp.subjectspecialdetail
  57. })
  58. }
  59. function setActive(index) {
  60. activeIndex.value = index; // 设置当前被激活的按钮的索引
  61. }
  62. function jumpToPro_details_video(item) {
  63. router.push({
  64. path: '/xjc-integratedmachine/environment/pro_details_video',
  65. query: {
  66. id: item.majorid
  67. }
  68. })
  69. }
  70. onMounted(() => {
  71. setHeadinfo()
  72. })
  73. </script>
  74. <style scoped lang="scss">
  75. p {
  76. margin: 0;
  77. padding: 0;
  78. }
  79. .development_stage {
  80. background: url('@/assets/images/login/login-home-background.png') no-repeat;
  81. background-size: 1920px 1080px;
  82. z-index: 10;
  83. width: 100%;
  84. height: 1080px;
  85. .page-content {
  86. width: 100%;
  87. height: 980px;
  88. position: absolute;
  89. top: 100px;
  90. bottom: 0;
  91. }
  92. .page-box {
  93. width: 1832px;
  94. height: 910px;
  95. background: #FFFFFF;
  96. border-radius: 35px 35px 35px 35px;
  97. margin: 13px auto 0;
  98. padding-top: 25px;
  99. position: relative;
  100. overflow: auto;
  101. padding-bottom: 30px;
  102. .title {
  103. height: 40px;
  104. border-left: 8px #8CE349 solid;
  105. margin-top: 33px;
  106. margin-left: 33px;
  107. font-weight: 400;
  108. font-size: 28px;
  109. color: #333333;
  110. line-height: 40px;
  111. padding-left: 11px;
  112. }
  113. }
  114. .two-page-result {
  115. //width: 1276px;
  116. //height: 337px;
  117. margin: 0 auto;
  118. display: flex;
  119. flex-wrap: wrap;
  120. align-items: center;
  121. .item-result-box {
  122. min-width: 244px;
  123. height: 92px;
  124. background: #E0EEF4;
  125. border-radius: 5px 5px 5px 5px;
  126. font-weight: 400;
  127. font-size: 30px;
  128. color: #000000;
  129. line-height: 90px;
  130. text-align: center;
  131. margin-left: 50px;
  132. margin-right: 50px;
  133. margin-top: 32px;
  134. padding-left: 20px;
  135. padding-right: 20px;
  136. }
  137. .item-result-box:hover {
  138. min-width: 244px;
  139. height: 92px;
  140. background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
  141. box-shadow: inset 0px -2px 7px 0px #1E410E;
  142. border-radius: 5px 5px 5px 5px;
  143. border: 1px solid #A2F57F;
  144. font-weight: 400;
  145. font-size: 30px;
  146. color: #000000;
  147. line-height: 90px;
  148. text-align: center;
  149. margin-left: 50px;
  150. margin-right: 50px;
  151. margin-top: 32px;
  152. padding-left: 20px;
  153. padding-right: 20px;
  154. }
  155. .item-result-box-active {
  156. min-width: 244px;
  157. height: 92px;
  158. background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
  159. box-shadow: inset 0px -2px 7px 0px #1E410E;
  160. border-radius: 5px 5px 5px 5px;
  161. border: 1px solid #A2F57F;
  162. font-weight: 400;
  163. font-size: 30px;
  164. color: #000000;
  165. line-height: 90px;
  166. text-align: center;
  167. margin-left: 50px;
  168. margin-right: 50px;
  169. margin-top: 32px;
  170. padding-left: 20px;
  171. padding-right: 20px;
  172. }
  173. }
  174. }
  175. </style>